Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/components/view/technology.vue
| | |
| | | addTechniqueByStandard:"/technique/add",//å³ä¸è§æ°å¢-->çäº§å·¥èº |
| | | chooseProByProduct:"/technique/choosePro",//å³ä¸è§æ°å¢-->ç产工èº-->鿩项ç®(ç¶å),åä½ |
| | | chooseDevByProduct:"/technique/chooseDev",//å³ä¸è§æ°å¢-->ç产工èº-->éæ©è®¾å¤ |
| | | |
| | | addVersion:"/material/addVersion",//æ·»å åä¸ä¸ªåå·å·¥èºè·¯çº¿,ææ¯ææ ,ç©ææ¸
å,ç产工èºççæ¬ |
| | | delAllByTechnology:"/technology/delAllTech",//å·¥èºè·¯çº¿-æ¹éå é¤ |
| | | delAllByTarget:"/product/delAllPro",//ææ¯ææ -æ¹éå é¤ |
| | | delAllByMBom:"/mbom/delAllMbom",//ç©ææ¸
å-æ¹éå é¤ |
| | | delAllByProduct:"/technique/delAllTeq",//ç产工èº-æ¹éå é¤ |
| | | // ææ¯ç®¡ç-ææ¯æä»¶ |
| | | selectAllOrder: "/orders/selectAllOrder", //æ¥è¯¢ææè®¢åå表 |
| | | selectOrderById: "/orders/selectOrderById", //æ ¹æ®è®¢åidæ¥è¯¢è®¢å详æ
|
| | |
| | | projectListByfinishId: "/inspection-item/list_user", //æ ¹æ®idæ¥è¯¢ææé¡¹ç® |
| | | processInspectAddProcess: "/processInspect/addProcess",//æ°å¢æ£éª |
| | | inspectionItemListUser: "/inspection-item/list_user",//æ¥è¯¢æææ£éªé¡¹ç® |
| | | finishedInspectChooseMater: "/finished-inspect/chooseMater",//æ ¹æ®è®¢åå·å¾å°ä¿¡æ¯ |
| | | finishedInspectAddFinish: "/finished-inspect/addFinish", //æ°å¢æåæ£éª |
| | | } |
| | | // è¿ç¨æ£éª |
| | | const processInspection = { |
| | | selectProcessInspectsList: "/processInspect/selectProcessInspectsList", // å页æ¥è¯¢è¿ç¨æ£éªåå表 |
| | | chooseMaterProcessInspect: "/processInspect/chooseMater",//æ ¹æ®è®¢åå·éæ©äº§ååå·¥èº |
| | | |
| | | inspectionItemUpdateDevByInsId: "/inspection-item/updateDevByInsId",//æ´æ¹è®¾å¤ |
| | | inspectionItemlose_focus_update: "/inspection-item/lose_focus_update",//æ£éªå¼ |
| | | processInspectUpdateProcessInspectsById: "/processInspect/updateProcessInspectsById",//䏿¥ |
| | | } |
| | | // QMSå®éªå®¤ç®¡ç |
| | | const laboratory = { |
| | |
| | | <template> |
| | | <div class="content-main"> |
| | | <div v-if="!showAddPage" class="rawPage"> |
| | | <div v-if="!showAdd" class="rawPage"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12">æåæ£éª</el-col> |
| | |
| | | </div> |
| | | <div class="nav"> |
| | | <span>æ£éªç»æï¼</span> |
| | | <el-select v-model="searchData.inspectResult" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 52px;"> |
| | | <el-option value="1" label="åæ ¼"></el-option> |
| | | <el-option value="2" label="ä¸åæ ¼"></el-option> |
| | | <el-select v-model="searchData.result" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="''" label="å
¨é¨"></el-option> |
| | | <el-option :value="1" label="åæ ¼"></el-option> |
| | | <el-option :value="0" label="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | <span>æ£éªæ¥æï¼</span> |
| | | <el-date-picker |
| | | v-model="searchData.inspectDate" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | style="margin-right: 52px"> |
| | | </el-date-picker> |
| | | <span>æ£éªäººï¼</span> |
| | | <el-select v-model="searchData.inspectUsername" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="item.id" :key="item.id" :label="item.name" v-for="item in usernameOptions"></el-option> |
| | | </el-select> |
| | | <span>产ååç§°ï¼</span> |
| | | <el-input v-model="searchData.material" size="small" placeholder="请è¾å
¥äº§ååç§°" style="width: 224px;margin-right: 52px;"></el-input> |
| | | <el-button size="mini" @click="()=>{searchData={};getInspectionTableData()}"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" @click="getInspectionTableData" style="background: #004EA2;"><span>æ¥ è¯¢</span></el-button> |
| | | </div> |
| | |
| | | min-width="108" |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | prop="material_code" |
| | | label="产åç¼ç " |
| | | min-width="100" |
| | | /> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="goToDetail(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small">æå°</el-button> |
| | | <el-button type="text" size="small">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <!-- åé¡µå¨ --> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | :current-page="pageParams.pageNo" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :page-size="pageParams.pageSize" |
| | | :current-page="pageParams.pageSize" |
| | | :page-sizes="[10, 50, 100, 200]" |
| | | :page-size="pageParams.countSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="pageParams.total" |
| | | @size-change="handleSizeChange" |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="newPage" v-if="showAdd"> |
| | | <finishedProductInspectionAdd /> |
| | | </div> |
| | | <div class="newPage" v-if="showLook"> |
| | | <finishedProductInspectionLook :rowInfo="rowInfo"/> |
| | | </div> |
| | | <div class="newPage" v-if="showUp"> |
| | | <finishedProductInspectionUp :rowInfo="rowInfo"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import finishedProductInspectionAdd from '@/components/view/finishedProductInspectionAdd' |
| | | import finishedProductInspectionUp from '@/components/view/finishedProductInspectionUp' |
| | | import finishedProductInspectionLook from '@/components/view/finishedProductInspectionLook' |
| | | export default { |
| | | components: { finishedProductInspectionAdd,finishedProductInspectionUp, finishedProductInspectionLook}, |
| | | data(){ |
| | | return { |
| | | searchData:{ |
| | | inspectionResult: '', |
| | | inspectionDate: '', |
| | | inspecter: '', |
| | | result: '', |
| | | material: '', |
| | | }, |
| | | // 主æºå·¥ä¸ææ¡ |
| | | usernameOptions:[], |
| | | inspectionTable:[ |
| | | ], |
| | | rowInfo:{}, |
| | | pageParams:{ |
| | | pageNo: 1, // å½å页ç |
| | | pageSize: 100, |
| | | countSize: 10, //æ¯é¡µæ°é |
| | | pageSize: 1, // å½å页ç |
| | | total:0 |
| | | }, |
| | | showAddPage: false, |
| | | showAdd: false, |
| | | showLook: false, |
| | | showUp: false, |
| | | showDetail:false, |
| | | addInspectionform: [{ |
| | | number: '', |
| | |
| | | this.currentPage = val |
| | | }, |
| | | handleAddNew(){ |
| | | this.showAddPage=true |
| | | this.showAdd=true |
| | | }, |
| | | async getInspectionTableData() { |
| | | const {data:{row,total}} = await this.$axios.get(this.$api.url.finishedInsListPage,{params:{...this.pageParams,...this.searchData}}) |
| | |
| | | this.pageParams.total = total |
| | | }, |
| | | goToDetail(row) { |
| | | this.showAddPage = true |
| | | this.showDetail = true |
| | | // this.showAddPage = true |
| | | // this.showDetail = true |
| | | this.finishedInsInfo = row |
| | | console.log(this.showDetail) |
| | | |
| | | // this.addInspectionform = [] |
| | | }, |
| | | async init() { |
| | | const {data} = await this.$axios.get(this.$api.url.finishedInspectUser) |
| | | this.usernameOptions = data |
| | | // const {data} = await this.$axios.get(this.$api.url.finishedInspectUser) |
| | | // this.usernameOptions = data |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <!-- æ°å¢é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">æ°å¢äº§åæ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <el-button type="primary" size="mini" style="background: #004EA2; " |
| | | icon="el-icon-circle-plus-outline">æ°å¢</el-button> |
| | | <el-button @click="showAddPage = false" type="primary" size="mini" icon="el-icon-back" |
| | | style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="120px" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input @blur="selectInfoByOrderId" style="width: 180px;" |
| | | v-model="processInspectVo.orderNumber" placeholder="请è¾å
¥è®¢åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="客æ·åç§°ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.prname" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥ç¨åç§°ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.sname" |
| | | placeholder="请è¾å
¥å·¥ç¨åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select @change="changeOptionsSamplename" style="width: 180px;" v-model="processInspectVo.material" size="small" |
| | | placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è´¨é追溯å·ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.qualityTraceability" |
| | | placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.mcode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.specificationsModel" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.unit" placeholder="请è¾å
¥äº§åç¼ç " |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 180px;" v-model="processInspectVo.quantity" placeholder="请è¾å
¥æ°é" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3" style="display: flex;justify-content: end;"> |
| | | <el-button type="primary" :disabled="isAddProject" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">æ£éªé¡¹ç®</el-col> |
| | | <el-col :span="12" class="inspectionProject_span" style="display: flex;justify-content: end;"> |
| | | <el-button size="mini" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="margin-right: 30px;" size="mini" |
| | | @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> |
| | | <!-- <el-button |
| | | size="mini" |
| | | style="margin-right: 30px;" |
| | | @click="clickAddLine()" |
| | | >æ·»å æ£éªè¡</el-button |
| | | > --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" height="calc(100vh - 550px)" |
| | | style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickTableSelect(scope)">{{ |
| | | scope.row.dname == null ? "è¯·éæ©" : scope.row.dname |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"></el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText" style="margin-bottom: 6px;"> |
| | | </el-input> |
| | | <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all |
| | | highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets' |
| | | }` |
| | | "></i> |
| | | {{ data.name }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | showUp: false, |
| | | isAddProject: false, |
| | | showLook: false, |
| | | detailId: 28, |
| | | rowInfp: {}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // æ£æµç¶æ |
| | | name: "", // 产ååç§° |
| | | techfather: "" // å·¥åº |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: 0, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | id: null, |
| | | material: null, |
| | | mcode: null, |
| | | prname: null, |
| | | sname: null, |
| | | orderNumber: "D-001", |
| | | qualityTraceability: null, |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | unit: null |
| | | }, |
| | | InspectioniD: null, |
| | | addInspectionform: [ |
| | | { |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | }] |
| | | , |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [ |
| | | { |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | } |
| | | ], |
| | | options: [], |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: "", // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: "", // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: "" // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.getTableData() |
| | | this.getOptions(); |
| | | }, |
| | | methods: { |
| | | changeOptionsSamplename(){ |
| | | let id=this.processInspectVo.material.split("-")[0] |
| | | let sample=this.optionsSamplename.filter(o=>{ |
| | | return o.id==id |
| | | })[0] |
| | | this.processInspectVo.qualityTraceability=sample.qualityTraceability |
| | | this.processInspectVo.mcode=sample.mcode |
| | | this.processInspectVo.specificationsModel=sample.specifications |
| | | this.processInspectVo.unit=sample.unit |
| | | }, |
| | | handleClick(row) { |
| | | this.rowInfp = row |
| | | this.showLook = true |
| | | }, |
| | | updateInsInfo(row) { |
| | | this.rowInfp = row |
| | | this.showUp = true |
| | | }, |
| | | combackMain() { |
| | | this.showUp = false |
| | | this.showLook = false |
| | | }, |
| | | searchPro() { |
| | | this.search.countSize = this.pageSize |
| | | this.search.pageSize = this.currentPage |
| | | this.defaultInitializationTable() |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions() { |
| | | this.$axios.get(this.$api.url.rawSelectDevice).then(res => { |
| | | this.materialOptions = res.data; |
| | | }); |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure() { |
| | | if (this.detailId == null) { |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].did = this.nodeData.id; |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].dname = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | type: 1, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | console.log(row); |
| | | if (row.did != null && row.did != '') { |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0, -1) |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | row.result = res.data.result |
| | | row.username = res.data.username |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.material = this.processInspectVo.material.split("-")[1] |
| | | val.id=this.processInspectVo.material.split("-")[0] |
| | | this.$axios.post(this.$api.url.finishedInspectAddFinish, val, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | console.log(this.detailId); |
| | | this.inspectionResultForm[0].id = val.materialCode |
| | | this.inspectionResultForm[0].name = val.material |
| | | // this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 1 |
| | | } |
| | | }).then(res => { |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.finishedInspectChooseMater, { |
| | | params: { |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.processInspectVo.sname = res.data[0].sname |
| | | this.processInspectVo.prname = res.data[0].prname |
| | | this.optionsSamplename = res.data[0].children |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultInitializationTable(); // åå§åè¡¨æ ¼æ°æ® |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <div class="laboratoryMangement"> |
| | | <el-row> |
| | | <el-col :span="12" class="top_left_name">设å¤ç»´æ¤</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-col :span="12" style="text-align: right;" class="title"> |
| | | <el-button |
| | | @click="testItem()" |
| | | type="primary" |
| | |
| | | line-height: 14px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .laboratoryMangement .title *{ |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .laboratoryMangement .table_top_div *{ |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .laboratoryMangement .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .laboratoryMangement .table_top_div .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="content-main"> |
| | | <div v-if="!showAddPage" class="rawPage"> |
| | | <div v-if="!showAddPage&&!showUp&&!showLook" class="rawPage"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12">è¿ç¨æ£éª</el-col> |
| | |
| | | <span>æ£éªç¶æï¼</span> |
| | | <el-select size="small" v-model="search.result" placeholder="è¯·éæ©æ£æµç¶æ" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="''" label="å
¨é¨"></el-option> |
| | | <el-option :value="1" label="å·²æ£æµ"></el-option> |
| | | <el-option :value="2" label="å¾
æ£æµ"></el-option> |
| | | <el-option :value="1" label="åæ ¼"></el-option> |
| | | <el-option :value="0" label="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | <span>产ååç§°ï¼</span> |
| | | <el-input size="small" style="width: 224px;margin-right: 30px;" v-model="search.name" |
| | |
| | | <el-input size="small" style="width: 224px;margin-right: 30px;" v-model="search.techfather" |
| | | placeholder="请è¾å
¥å·¥åº"></el-input> |
| | | <el-button size="mini"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>æ¥ è¯¢</span></el-button> |
| | | <el-button size="mini" @click="searchPro" type="primary" style="background: #004EA2;"><span>æ¥ è¯¢</span></el-button> |
| | | </div> |
| | | <div class="content-body"> |
| | | <div class="inspectionTable"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æä½" min-width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" style="margin-left: 0;">详æ
</el-button> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small" style="margin-left: 0;">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)" style="margin-left: 0;">详æ
</el-button> |
| | | <el-button type="text" size="small" >æ¥ç</el-button> |
| | | <el-button v-if="scope.row.result == null" type="text" size="small" style="margin-left: 0;" @click="updateInsInfo(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- åé¡µå¨ --> |
| | | <div class="pagination"> |
| | | <el-pagination :current-page="1" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" |
| | | <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" :total="inspectionTableTotal" @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" /> |
| | | </div> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10" style="display: flex;justify-content: end;"> |
| | | <el-button type="primary" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> |
| | | <el-button type="primary" :disabled="isAddProject" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | > --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :row-key="inspectionItems.id" :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" height="calc(100vh - 550px)" style="width: 100%"> |
| | | <el-table :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" height="calc(100vh - 550px)" |
| | | style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" label="æ£æµå¼" min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.deviceId === null" :value="item" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="è¯éªè®¾å¤"> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.device }} |
| | | <el-select v-model="scope.row.device" size="small" slot="append" style="width: 100px;"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickTableSelect(scope)">{{ |
| | | scope.row.dname == null ? "è¯·éæ©" : scope.row.dname |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | |
| | | <el-table-column prop="operation" label="䏿¥"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText" style="margin-bottom: 6px;"> |
| | | </el-input> |
| | | <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current |
| | | @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets' |
| | | }` |
| | | "></i> |
| | | {{ data.name }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | <div class="newPage" v-if="showUp"> |
| | | <processInspectionUpdate :rowInfo="rowInfp"/> |
| | | </div> |
| | | <div class="newPage" v-if="showLook"> |
| | | <processInspectionLook :rowInfo="rowInfp"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import processInspectionUpdate from '../view/processInspectionUpdate.vue' |
| | | import processInspectionLook from '../view/processInspectionLook.vue' |
| | | export default { |
| | | components: { processInspectionUpdate,processInspectionLook }, |
| | | data() { |
| | | return { |
| | | detailId: null, |
| | | showUp: false, |
| | | isAddProject:false, |
| | | showLook: false, |
| | | detailId: 28, |
| | | rowInfp:{}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: "", |
| | | inspectionTableTotal: 0, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: [], |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | material: null, |
| | | materialCode: null, |
| | | orderNumber: "D-001", |
| | | orderNumber: "", |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | techfather: null, |
| | |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [ |
| | | { |
| | | id: "274024", |
| | | name: "111", |
| | | inspecter: "111", |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | } |
| | |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0 |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: "", // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: "", // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: "" // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.getTableData() |
| | | this.getOptions(); |
| | | }, |
| | | methods: { |
| | | handleClick(row){ |
| | | this.rowInfp=row |
| | | this.showLook=true |
| | | }, |
| | | updateInsInfo(row){ |
| | | this.rowInfp=row |
| | | this.showUp=true |
| | | }, |
| | | combackMain(){ |
| | | this.showUp=false |
| | | this.showLook=false |
| | | }, |
| | | searchPro(){ |
| | | this.search.countSize=this.pageSize |
| | | this.search.pageSize=this.currentPage |
| | | this.defaultInitializationTable() |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions() { |
| | | this.$axios.get(this.$api.url.rawSelectDevice).then(res => { |
| | | this.materialOptions = res.data; |
| | | }); |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure() { |
| | | if (this.detailId == null) { |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].did = this.nodeData.id; |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].dname = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | type: 1, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | console.log(row); |
| | | if(row.did!=null&&row.did!=''){ |
| | | let str="" |
| | | row.empiricalValueAddss.forEach(e=>{ |
| | | str+=e+"," |
| | | }) |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0,-1) |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | row.result=res.data.result |
| | | row.username=res.data.username |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | getInsArr(val){ |
| | | console.log(val); |
| | | return val.split(",") |
| | | }, |
| | | handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row>0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if(columnIndex === 1){ |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row>0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList=[] |
| | | this.spanArr=[] |
| | | this.position=0 |
| | | this.inspectionItems.forEach((item,index) => { |
| | | if( index === 0){ |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | }else{ |
| | | if(this.inspectionItems[index].father === this.inspectionItems[index-1].father ){ |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | }else{ |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | this.isAddProject=true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.techname = this.processInspectVo.techname.split("-")[1] |
| | | val.technologyId = this.processInspectVo.techname.split("-")[0] |
| | |
| | | }); |
| | | return |
| | | } |
| | | this.InspectioniD = res.data |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id=val.materialCode |
| | | this.inspectionResultForm[0].name=val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: 28, |
| | | id: this.detailId, |
| | | type: 1 |
| | | } |
| | | }).then(res => { |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val=JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName=[] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAdd=[] |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | console.log(this.inspectionItems); |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name=[...new Set(uName)].filter(item => item !== null); |
| | | let rname='' |
| | | name.forEach(m=>{ |
| | | rname+=m+"," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter=rname.slice(0,-1) |
| | | this.empiricalValueAdd=arrSort[arrSort.length-1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | this.getTableData() |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | .div_device_dialog { |
| | | min-height: 400px; |
| | | overflow: auto; |
| | | } |
| | | .nav { |
| | | display: flex; |
| | | padding: 20px 20px; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <!-- ç¼è¾é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">ç¼è¾è¿ç¨æ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <!-- <el-button type="primary" size="mini" style="background: #004EA2; " |
| | | icon="el-icon-circle-plus-outline">æ°å¢</el-button> --> |
| | | <el-button @click="combackFather" type="primary" size="mini" icon="el-icon-back" |
| | | style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="120px" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input @blur="selectInfoByOrderId" disabled style="width: 210px;" size="small" |
| | | v-model="processInspectVo.orderNumber" placeholder="请è¾å
¥è®¢åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select style="width: 210px;" size="small" disabled @change="selectSample" |
| | | v-model="processInspectVo.material" placeholder="è¯·éæ©äº§å"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled |
| | | v-model="processInspectVo.materialCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled |
| | | v-model="processInspectVo.specificationsModel" placeholder="请è¾å
¥è§æ ¼åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥åºåç§°ï¼"> |
| | | <el-select @change="changeOptionSoptionSprocesses" disabled |
| | | v-model="processInspectVo.techfather" placeholder="è¯·éæ©" style="width: 210px;" |
| | | size="small"> |
| | | <el-option v-for="item in optionSoptionSprocesses" :key="item.name" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥èºåç§°ï¼"> |
| | | <el-select v-model="processInspectVo.techname" disabled placeholder="è¯·éæ©" |
| | | style="width: 210px;" size="small"> |
| | | <el-option v-for="item in optionTechnology" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.unit" |
| | | placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.quantity" |
| | | placeholder="请è¾å
¥æ°é" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="10" style="display: flex;justify-content: end;"> |
| | | <el-button type="primary" :disabled="isAddProject" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> |
| | | </el-col> --> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">æ£éªé¡¹ç®</el-col> |
| | | <el-col :span="12" class="inspectionProject_span"> |
| | | <!-- <el-button size="mini" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="margin-right: 30px;" size="mini" |
| | | @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> --> |
| | | <!-- <el-button |
| | | size="mini" |
| | | style="margin-right: 30px;" |
| | | @click="clickAddLine()" |
| | | >æ·»å æ£éªè¡</el-button |
| | | > --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" height="calc(100vh - 550px)" |
| | | style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-input disabled v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.dname }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.conclusion === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.conclusion === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.conclusion === null || scope.row.conclusion === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="operation" label="䏿¥"> |
| | | <el-button type="primary" @click="escalation" size="small">䏿¥</el-button> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText" style="margin-bottom: 6px;"> |
| | | </el-input> |
| | | <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all |
| | | highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets' |
| | | }` |
| | | "></i> |
| | | {{ data.name }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: ['rowInfo'], |
| | | data() { |
| | | return { |
| | | showUp: false, |
| | | isAddProject: false, |
| | | detailId: 0, |
| | | row: {}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // æ£æµç¶æ |
| | | name: "", // 产ååç§° |
| | | techfather: "" // å·¥åº |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: "", |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | material: null, |
| | | materialCode: null, |
| | | orderNumber: "", |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | techfather: null, |
| | | techname: null, |
| | | technologyId: null, |
| | | unit: null |
| | | }, |
| | | InspectioniD: null, |
| | | addInspectionform: [ |
| | | { |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | }] |
| | | , |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [ |
| | | { |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | } |
| | | ], |
| | | options: [], |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: "", // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: "", // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: "" // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | created() { |
| | | this.processInspectVo.orderNumber = this.rowInfo.order_number |
| | | this.processInspectVo.material = this.rowInfo.material |
| | | this.processInspectVo.materialCode = this.rowInfo.material_code |
| | | this.processInspectVo.specificationsModel = this.rowInfo.specifications_model |
| | | this.processInspectVo.techfather = this.rowInfo.techfather |
| | | this.processInspectVo.techname = this.rowInfo.techname |
| | | this.processInspectVo.unit = this.rowInfo.unit |
| | | this.processInspectVo.quantity = this.rowInfo.quantity |
| | | this.detailId = this.rowInfo.id |
| | | this.inspectionResultForm[0].id = this.rowInfo.material_code |
| | | this.inspectionResultForm[0].name = this.rowInfo.material |
| | | this.inspectionResultForm[0].conclusion = this.rowInfo.result |
| | | // console.log(this.detailId); |
| | | }, |
| | | mounted() { |
| | | this.getOptions(); |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | escalation() { |
| | | let arr = this.inspectionItems |
| | | let bl = false |
| | | for (let index = 0; index < arr.length; index++) { |
| | | const element = arr[index]; |
| | | if (element.dname != null && element.empiricalValueAddss[0] != '') { |
| | | bl = true |
| | | break |
| | | } else { |
| | | bl = false |
| | | } |
| | | } |
| | | if (bl != true) { |
| | | this.$message({ |
| | | message: '请å
æ£æµä¸é¡¹é¡¹ç®ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, { |
| | | id: this.detailId |
| | | }).then(res => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: '䏿¥æå', |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | handleClick() { }, |
| | | updateInsInfo(row) { |
| | | console.log(row); |
| | | this.row = row |
| | | this.showUp = true |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions() { |
| | | this.$axios.get(this.$api.url.rawSelectDevice).then(res => { |
| | | this.materialOptions = res.data; |
| | | }); |
| | | }, |
| | | //è¿å |
| | | combackFather() { |
| | | this.$parent.combackMain() |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure() { |
| | | if (this.detailId == null) { |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].did = this.nodeData.id; |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].dname = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | type: 1, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | console.log(row); |
| | | if (row.did != null && row.did != '') { |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0, -1) |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | row.result = res.data.result |
| | | row.username = res.data.username |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.techname = this.processInspectVo.techname.split("-")[1] |
| | | val.technologyId = this.processInspectVo.techname.split("-")[0] |
| | | this.$axios.post(this.$api.url.processInspectAddProcess, { |
| | | material: val.material, |
| | | materialCode: val.materialCode, |
| | | orderNumber: val.orderNumber, |
| | | quantity: val.quantity, |
| | | specificationsModel: val.specificationsModel, |
| | | techfather: val.techfather, |
| | | techname: val.techname, |
| | | technologyId: val.technologyId, |
| | | unit: val.unit |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id = res.data |
| | | this.inspectionResultForm[0].name = val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 1 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length < 1) { |
| | | return |
| | | } |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.chooseMaterProcessInspect, { |
| | | params: { |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.optionsSamplename = res.data |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <!-- ç¼è¾é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">ç¼è¾è¿ç¨æ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <!-- <el-button type="primary" size="mini" style="background: #004EA2; " |
| | | icon="el-icon-circle-plus-outline">æ°å¢</el-button> --> |
| | | <el-button @click="combackFather" type="primary" size="mini" icon="el-icon-back" |
| | | style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="120px" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input @blur="selectInfoByOrderId" disabled style="width: 210px;" size="small" |
| | | v-model="processInspectVo.orderNumber" placeholder="请è¾å
¥è®¢åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select style="width: 210px;" size="small" disabled @change="selectSample" |
| | | v-model="processInspectVo.material" placeholder="è¯·éæ©äº§å"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled |
| | | v-model="processInspectVo.materialCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled |
| | | v-model="processInspectVo.specificationsModel" placeholder="请è¾å
¥è§æ ¼åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥åºåç§°ï¼"> |
| | | <el-select @change="changeOptionSoptionSprocesses" disabled |
| | | v-model="processInspectVo.techfather" placeholder="è¯·éæ©" style="width: 210px;" |
| | | size="small"> |
| | | <el-option v-for="item in optionSoptionSprocesses" :key="item.name" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥èºåç§°ï¼"> |
| | | <el-select v-model="processInspectVo.techname" disabled placeholder="è¯·éæ©" |
| | | style="width: 210px;" size="small"> |
| | | <el-option v-for="item in optionTechnology" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.unit" |
| | | placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.quantity" |
| | | placeholder="请è¾å
¥æ°é" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="10" style="display: flex;justify-content: end;"> |
| | | <el-button type="primary" :disabled="isAddProject" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> |
| | | </el-col> --> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">æ£éªé¡¹ç®</el-col> |
| | | <el-col :span="12" class="inspectionProject_span"> |
| | | <el-button size="mini" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="margin-right: 30px;" size="mini" |
| | | @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> |
| | | <!-- <el-button |
| | | size="mini" |
| | | style="margin-right: 30px;" |
| | | @click="clickAddLine()" |
| | | >æ·»å æ£éªè¡</el-button |
| | | > --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" height="calc(100vh - 550px)" |
| | | style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickTableSelect(scope)">{{ |
| | | scope.row.dname == null ? "è¯·éæ©" : scope.row.dname |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.conclusion === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.conclusion === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.conclusion === null || scope.row.conclusion === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"> |
| | | <el-button type="primary" @click="escalation" size="small">䏿¥</el-button> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText" style="margin-bottom: 6px;"> |
| | | </el-input> |
| | | <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all |
| | | highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets' |
| | | }` |
| | | "></i> |
| | | {{ data.name }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: ['rowInfo'], |
| | | data() { |
| | | return { |
| | | showUp: false, |
| | | isAddProject: false, |
| | | detailId: 0, |
| | | row: {}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // æ£æµç¶æ |
| | | name: "", // 产ååç§° |
| | | techfather: "" // å·¥åº |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: "", |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | material: null, |
| | | materialCode: null, |
| | | orderNumber: "", |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | techfather: null, |
| | | techname: null, |
| | | technologyId: null, |
| | | unit: null |
| | | }, |
| | | InspectioniD: null, |
| | | addInspectionform: [ |
| | | { |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | }] |
| | | , |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [ |
| | | { |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | } |
| | | ], |
| | | options: [], |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: "", // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: "", // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: "" // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | created() { |
| | | this.processInspectVo.orderNumber = this.rowInfo.order_number |
| | | this.processInspectVo.material = this.rowInfo.material |
| | | this.processInspectVo.materialCode = this.rowInfo.material_code |
| | | this.processInspectVo.specificationsModel = this.rowInfo.specifications_model |
| | | this.processInspectVo.techfather = this.rowInfo.techfather |
| | | this.processInspectVo.techname = this.rowInfo.techname |
| | | this.processInspectVo.unit = this.rowInfo.unit |
| | | this.processInspectVo.quantity = this.rowInfo.quantity |
| | | this.detailId = this.rowInfo.id |
| | | this.inspectionResultForm[0].id = this.rowInfo.material_code |
| | | this.inspectionResultForm[0].name = this.rowInfo.material |
| | | this.inspectionResultForm[0].conclusion = this.rowInfo.result |
| | | // console.log(this.detailId); |
| | | }, |
| | | mounted() { |
| | | this.getOptions(); |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | escalation() { |
| | | let arr = this.inspectionItems |
| | | let bl = false |
| | | for (let index = 0; index < arr.length; index++) { |
| | | const element = arr[index]; |
| | | if (element.dname != null && element.empiricalValueAddss[0] != '') { |
| | | bl = true |
| | | break |
| | | } else { |
| | | bl = false |
| | | } |
| | | } |
| | | if (bl != true) { |
| | | this.$message({ |
| | | message: '请å
æ£æµä¸é¡¹é¡¹ç®ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, { |
| | | id: this.detailId |
| | | }).then(res => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: '䏿¥æå', |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | handleClick() { }, |
| | | updateInsInfo(row) { |
| | | console.log(row); |
| | | this.row = row |
| | | this.showUp = true |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions() { |
| | | this.$axios.get(this.$api.url.rawSelectDevice).then(res => { |
| | | this.materialOptions = res.data; |
| | | }); |
| | | }, |
| | | //è¿å |
| | | combackFather() { |
| | | this.$parent.combackMain() |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure() { |
| | | if (this.detailId == null) { |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].did = this.nodeData.id; |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].dname = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | type: 1, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | console.log(row); |
| | | if (row.did != null && row.did != '') { |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0, -1) |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | row.result = res.data.result |
| | | row.username = res.data.username |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.techname = this.processInspectVo.techname.split("-")[1] |
| | | val.technologyId = this.processInspectVo.techname.split("-")[0] |
| | | this.$axios.post(this.$api.url.processInspectAddProcess, { |
| | | material: val.material, |
| | | materialCode: val.materialCode, |
| | | orderNumber: val.orderNumber, |
| | | quantity: val.quantity, |
| | | specificationsModel: val.specificationsModel, |
| | | techfather: val.techfather, |
| | | techname: val.techname, |
| | | technologyId: val.technologyId, |
| | | unit: val.unit |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id = res.data |
| | | this.inspectionResultForm[0].name = val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 1 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length < 1) { |
| | | return |
| | | } |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.chooseMaterProcessInspect, { |
| | | params: { |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.optionsSamplename = res.data |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| | |
| | | data() { |
| | | return { |
| | | hasChildren:true, |
| | | selects: [] |
| | | selects: [], |
| | | isAllSelect:false, |
| | | deleteList:[], |
| | | } |
| | | }, |
| | | props:['tableData','tableType'], |
| | |
| | | } |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.deleteList = []; |
| | | val.forEach((v) => { |
| | | if (v.id !== undefined) { |
| | | this.deleteList.push(v.id); |
| | | //æ¹åéä¸ |
| | | toggleSelection(row, flag) { |
| | | this.$set(row, "isChecked", flag); |
| | | this.$nextTick(() => { |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.deleteList = []; |
| | | val.forEach((v) => { |
| | | this.searchIdFun(v); |
| | | }); |
| | | this.$emit("childData",this.deleteList); |
| | | }, |
| | | //é彿¥æ¾é䏿°æ®id |
| | | searchIdFun(data){ |
| | | let obj = data; |
| | | if(obj.children != undefined){ |
| | | this.searchIdFun(obj.children); |
| | | }else{ |
| | | this.deleteList.push(obj.id); |
| | | } |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® ç»æ |
| | | } |
| | | } |
| | |
| | | <span>{{scope.row.productFather}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="productFather" hidden></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="product" label="ææ "></el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="updateProduct(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | |
| | | deviceGroupDialog:false, |
| | | selects: [], |
| | | isAllSelect:false, |
| | | deleteList:[], |
| | | } |
| | | }, |
| | | props:['tableData','tableType'], |
| | | methods:{ |
| | | updateProduct(row){ |
| | | console.log(row); |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® |
| | | // å
¨é/åæ¶éæä½ |
| | | selectAll(val) { |
| | | this.isAllSelect = !this.isAllSelect; |
| | |
| | | } |
| | | } |
| | | }, |
| | | //æ¹åéä¸ |
| | | toggleSelection(row, flag) { |
| | | this.$set(row, "isChecked", flag); |
| | | this.$nextTick(() => { |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.deleteList = []; |
| | | val.forEach((v) => { |
| | | if (v.id !== undefined) { |
| | | this.deleteList.push(v.id); |
| | | } |
| | | this.searchIdFun(v); |
| | | }); |
| | | this.$emit("childData",this.deleteList); |
| | | }, |
| | | //é彿¥æ¾é䏿°æ®id |
| | | searchIdFun(data){ |
| | | let obj = data; |
| | | if(obj.children != undefined){ |
| | | this.searchIdFun(obj.children); |
| | | }else{ |
| | | this.deleteList.push(obj.tqid); |
| | | } |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® ç»æ |
| | | } |
| | |
| | | data() { |
| | | return { |
| | | selects: [], |
| | | deleteList:[], |
| | | isAllSelect:false, |
| | | } |
| | | }, |
| | | props:['tableData','tableType'], |
| | |
| | | } |
| | | } |
| | | }, |
| | | //æ¹åéä¸ |
| | | toggleSelection(row, flag) { |
| | | this.$set(row, "isChecked", flag); |
| | | this.$nextTick(() => { |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.deleteList = []; |
| | | val.forEach((v) => { |
| | | if (v.id !== undefined) { |
| | | this.deleteList.push(v.id); |
| | | } |
| | | this.searchIdFun(v); |
| | | }); |
| | | this.$emit("childData",this.deleteList); |
| | | }, |
| | | //é彿¥æ¾é䏿°æ®id |
| | | searchIdFun(data){ |
| | | let obj = data; |
| | | if(obj.children != undefined){ |
| | | this.searchIdFun(obj.children); |
| | | }else{ |
| | | this.deleteList.push(obj.pid); |
| | | } |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® ç»æ |
| | | updateVal(row){ |
| | |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | }, |
| | | } |
| | | } |
| | |
| | | methods: { |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® |
| | | // å
¨é/åæ¶éæä½ |
| | | selectAll(val) { |
| | | this.isAllSelect = !this.isAllSelect; |
| | | let data = this.tableData; |
| | | this.toggleSelect(data, this.isAllSelect, "all"); |
| | | }, |
| | | //éæ©æè¡ |
| | | selectTr(selection, row) { |
| | | this.$set(row, "isChecked", !row.isChecked); |
| | |
| | | } |
| | | } |
| | | }, |
| | | //æ¹åéä¸ |
| | | toggleSelection(row, flag) { |
| | | this.$set(row, "isChecked", flag); |
| | | this.$nextTick(() => { |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | selectAll(val) { |
| | | this.isAllSelect = !this.isAllSelect; |
| | | let data = this.tableData; |
| | | this.toggleSelect(data, this.isAllSelect, "all"); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.deleteList = []; |
| | | val.forEach((v) => { |
| | | if (v.id !== undefined) { |
| | | this.deleteList.push(v.id); |
| | | } |
| | | this.searchIdFun(v); |
| | | }); |
| | | this.$emit("childData",this.deleteList); |
| | | }, |
| | | //é彿¥æ¾é䏿°æ®id |
| | | searchIdFun(data){ |
| | | let obj = data; |
| | | if(obj.children != undefined){ |
| | | this.searchIdFun(obj.children); |
| | | }else{ |
| | | this.deleteList.push(obj.id); |
| | | } |
| | | }, |
| | | // è¡¨æ ¼æ å
¨é¨éä¸é
ç½® ç»æ |
| | | showDialog(){ |
| | |
| | | <el-col :span="12" style="line-height: 32px;">æ åBOM</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" |
| | | @click="bomAddModelVisible = true">æ°å¢</el-button> |
| | | <el-button icon="el-icon-plus">æ°å¢çæ¬</el-button> |
| | | <el-button @click="bomRightDl=true" icon="el-icon-delete">å é¤</el-button> |
| | | @click="showBomAddModel">æ°å¢</el-button> |
| | | <el-button icon="el-icon-plus" @click="addVersionBtn">æ°å¢çæ¬</el-button> |
| | | <el-button @click="deleteDataBtn" icon="el-icon-delete">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <div class="contentTable" v-if="this.typeselect == 0"> |
| | | <technology :tableType="tableType" :tableData="tableData"></technology> |
| | | <technology @childData="getChildData" :tableType="tableType" :tableData="tableData"></technology> |
| | | </div> |
| | | <div v-if="this.typeselect == 1"> |
| | | <target :tableType="tableType" :tableData="tableData"></target> |
| | | <target @childData="getChildData" :tableType="tableType" :tableData="tableData"></target> |
| | | </div> |
| | | <div v-if="this.typeselect == 2"> |
| | | <bom :tableType="tableType" :tableData="tableData"></bom> |
| | | <material @childData="getChildData" :tableType="tableType" :tableData="tableData"></material> |
| | | </div> |
| | | <div v-if="this.typeselect == 3">ç产工èº</div> |
| | | |
| | | <div v-if="this.typeselect == 3"> |
| | | <product @childData="getChildData" :tableType="tableType" :tableData="tableData"></product> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <script> |
| | | import technology from "./standard-table/technology.vue" |
| | | import material from "./standard-table/material.vue" |
| | | // import bom from "./standard-table/bom.vue" |
| | | import target from "./standard-table/target.vue" |
| | | import product from "./standard-table/product.vue" |
| | | import bomClickAdd from '@/components/view/standard-box/bomClickAdd' |
| | | export default { |
| | | components: { technology,material,bomClickAdd }, |
| | | components: { technology,material,target,product,bomClickAdd }, |
| | | |
| | | data() { |
| | | var checkPq = (rule,value,callback)=>{ |
| | |
| | | callback(); |
| | | }; |
| | | return { |
| | | //åç»ä»¶ä¼ çidå表 |
| | | childIds:[], |
| | | //å·¥åºå表 |
| | | technologyIdList:[], |
| | | fatherList:[], |
| | |
| | | // BOMæ æ°æ®ç»æ |
| | | list: [], |
| | | search: null, |
| | | tableType: 1, // è¡¨æ ¼ç±»å 1ï¼ææ¯ææ ï¼0ï¼å·¥èºè·¯çº¿ |
| | | tableType: 0, // è¡¨æ ¼ç±»å 1ï¼ææ¯ææ ï¼0ï¼å·¥èºè·¯çº¿ |
| | | searchName: "",// æ¥è¯¢æ¡ä»¶-åç§° |
| | | checkTreeNode: {},// ç¹å»é䏿 èç¹ |
| | | tableData: [], |
| | |
| | | bomRightDl: false, |
| | | formTypeOptions: null, |
| | | typeselect: 0, |
| | | returntree: { |
| | | id:28, |
| | | }, |
| | | returntree: {id:28}, |
| | | version: {}, |
| | | leftAdd:{ |
| | | type: [], |
| | |
| | | leftAddBom(){ |
| | | |
| | | }, |
| | | //è·ååç»ä»¶æ°æ® |
| | | getChildData(data){ |
| | | this.childIds = data; |
| | | }, |
| | | //å é¤æé® |
| | | deleteDataBtn(){ |
| | | let ids; |
| | | let url; |
| | | ids = this.childIds.filter(item=>{ |
| | | return item != undefined; |
| | | }); |
| | | if(ids.length < 1){ |
| | | this.$message.error("请å
éæ©æ°æ®ï¼"); |
| | | return; |
| | | } |
| | | switch(this.typeselect){ |
| | | case 0: |
| | | url = this.$api.url.delAllByTechnology; |
| | | break; |
| | | case 1: |
| | | url = this.$api.url.delAllByTarget; |
| | | break; |
| | | case 2: |
| | | url = this.$api.url.delAllByMBom; |
| | | break; |
| | | case 3: |
| | | url = this.$api.url.delAllByProduct; |
| | | break; |
| | | } |
| | | this.$confirm('确认å é¤å·²éä¸çæ°æ®å', 'å é¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.post(url,{ |
| | | ids : ids.join(",") |
| | | }).then(res=>{ |
| | | this.selectAll(); |
| | | this.$message.success(res.message); |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | }).catch(() => {}); |
| | | }, |
| | | //æ°å¢çæ¬ |
| | | addVersionBtn(){ |
| | | this.$confirm('确认æ°å¢çæ¬å', 'æ°å¢çæ¬', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'info' |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.url.addVersion,{ |
| | | specificationsId : this.returntree.id, |
| | | version : this.version2.substring(1,2), |
| | | }).then(res=>{ |
| | | this.selectVersion(); |
| | | this.$message.success(res.message); |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | }).catch(() => {}); |
| | | }, |
| | | //å³ä¾§bom,确认æ°å¢ |
| | | confirmAdd(formName){ |
| | | this.$refs[formName].validate(valid=>{ |
| | |
| | | <el-row> |
| | | <el-col :span="12">ææ¯æä»¶</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button icon="el-icon-plus">çæé¡¹ç®ä¹¦</el-button> |
| | | <el-button icon="el-icon-plus">çæé¡¹ç®ä¹¦</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | <el-input v-model="searchData.name" @input="query"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç¼å¶ç¶æ:" > |
| | | <el-select v-model="searchData.type" placeholder="å
¨é¨" style="width: 310px;"> |
| | | <el-select v-model="searchData.type" size="small" placeholder="å
¨é¨" style="width: 250px;"> |
| | | <el-option label="å¾
ç¼å¶" :value="0"></el-option> |
| | | <el-option label="å·²ç¼å¶" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | <el-button plain @click="resetBtn">é ç½®</el-button> |
| | | <el-button @click="searchTechnical">æ¥ è¯¢</el-button> |
| | | <el-form-item> |
| | | <el-button plain @click="resetBtn" style="margin-left: 12px;">é ç½®</el-button> |
| | | <el-button @click="searchTechnical">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | background: #fff; |
| | | padding: 24px 32px; |
| | | } |
| | | |
| | | .search-header .el-form-item__label{ |
| | | padding: 0 30px 0 0; |
| | | } |
| | |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .technical .title *{ |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .technical .search-header *{ |
| | | font-size: 14px; |
| | | } |
| | | </style> |
| | |
| | | query(val) { |
| | | this.selectAllTechTem(); |
| | | }, |
| | | selectAllTechTem() { |
| | | selectAllTechTem() { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllTechTem, { |
| | | params: { type: this.typeselect, message: this.search.technology }, |
| | |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | } |
| | | |
| | | .left .box i { |
| | | font-size: 32px; |
| | | font-size: 24px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | <style></style> |
| | | <template> |
| | | <div class="all"> |
| | | <div class="title"> |
| | |
| | | </div> |
| | | <div class="component_view"> |
| | | <component class="com_index" v-for="(com, index) in tabs" :is="com.u" :key="upIndex + '|' + index" |
| | | v-show="com.k == tabActive"> |
| | | v-show="com.k == tabActive" @removeAllTab="removeAllTab"> |
| | | </component> |
| | | </div> |
| | | </div> |
| | |
| | | u: "index-index" |
| | | }] |
| | | }, |
| | | |
| | | upTabActive(num) { |
| | | this.tabActive = num; |
| | | this.activeP = num; |
| | |
| | | sessionStorage.clear(); |
| | | localStorage.removeItem("autoenter"); |
| | | this.$router.push("/enter"); |
| | | }, |
| | | removeAllTab(){ |
| | | this.upIndex++ |
| | | } |
| | | } |
| | | }; |