src/api/business/reportPreparation.js
@@ -153,4 +153,13 @@ method: 'get', params: params }) } export function getURL(params) { return resquest({ url: '/file/attachmentType/getURL', method: 'get', params: params }) } src/api/cnas/resourceDemand/device.js
@@ -155,9 +155,9 @@ }); } //使ç¨è®°å½ å¯¼åº export function exportUseRecord(query) { export function deviceRecordExport(query) { return request({ url: "/deviceRecord/exportUseRecord", url: "/deviceRecord/deviceRecordExport", method: "get", responseType: "blob", params: query, @@ -398,41 +398,6 @@ }); } //设å¤ç»´æ¤å é¤ export function deleteDeviceMaintenance(query) { return request({ url: "/deviceMaintain/deleteDeviceMaintenance", method: "delete", params: query, }); } //设å¤ç»´æ¤å é¤ export function deviceMaintenanceExport(query) { return request({ url: "/deviceMaintain/deviceMaintenanceExport", method: "get", responseType: "blob", params: query, }); } // æ°å¢è®¾å¤ç»´æ¤ä¿å » export function addDeviceMaintenance(data) { return request({ url: "/deviceMaintain/addDeviceMaintenance", method: "post", data: data, }); } //设å¤ç»´æ¤è¡¨ æ¥è¯¢ export function getDeviceMaintenancePage(query) { return request({ url: "/deviceMaintain/getDeviceMaintenancePage", method: "get", params: query, }); } // åç¨-ä¿å export function saveDeviceBorrow(data) { return request({ @@ -534,208 +499,6 @@ params: query, }); } //è®¾å¤æ¥åºç³è¯·å表 export function pageDeviceScrapped(query) { return request({ url: "/deviceScrapped/pageDeviceScrapped", method: "get", params: query, }); } // å¯¼åº export function exportDeviceScrapped(query) { return request({ url: "/deviceScrapped/exportDeviceScrapped", method: "get", responseType: "blob", params: query, }); } //å é¤è®¾å¤æ¥åºç³è¯· export function delDeviceScrapped(query) { return request({ url: "/deviceScrapped/delDeviceScrapped", method: "delete", params: query, }); } //æ¥è¯¢è®¾å¤æ¥åºç³è¯· export function getDeviceScrapped(query) { return request({ url: "/deviceScrapped/getDeviceScrapped", method: "get", params: query, }); } // æ°å¢è®¾å¤æ¥åºç³è¯· export function addDeviceScrapped(data) { return request({ url: "/deviceScrapped/addDeviceScrapped", method: "post", data: data, }); } //è®¾å¤æ éç»´ä¿®å表 export function pageDeviceBreakdownMaintenance(query) { return request({ url: "/deviceBreakdownMaintenance/pageDeviceBreakdownMaintenance", method: "get", params: query, }); } // è®¾å¤æ éä¸ç»´ä¿®-å¯¼åº export function exportDeviceBreakdownMaintenance(query) { return request({ url: "/deviceBreakdownMaintenance/exportDeviceBreakdownMaintenance", method: "get", responseType: "blob", params: query, }); } //å é¤è®¾å¤æ éç»´ä¿® export function delDeviceBreakdownMaintenance(query) { return request({ url: "/deviceBreakdownMaintenance/delDeviceBreakdownMaintenance", method: "delete", params: query, }); } //æ¥è¯¢è®¾å¤æ éç»´ä¿® export function getDeviceBreakdownMaintenance(query) { return request({ url: "/deviceBreakdownMaintenance/getDeviceBreakdownMaintenance", method: "get", params: query, }); } // æ°å¢è®¾å¤æ éç»´ä¿® export function addDeviceBreakdownMaintenance(data) { return request({ url: "/deviceBreakdownMaintenance/addDeviceBreakdownMaintenance", method: "post", data: data, }); } //å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ export function getDeviceInspectionRecordByPage(query) { return request({ url: "/deviceInspectionRecord/getDeviceInspectionRecordByPage", method: "get", params: query, }); } // 导åºè®¾å¤ç¹æ£è®°å½ export function exportDeviceInspectionRecord(query) { return request({ url: "/deviceInspectionRecord/exportDeviceInspectionRecord", method: "get", responseType: "blob", params: query, }); } //å é¤è®¾å¤ç¹æ£è®°å½ export function deleteDeviceInspectionRecord(query) { return request({ url: "/deviceInspectionRecord/deleteDeviceInspectionRecord", method: "delete", params: query, }); } //设å¤ç¹æ£è®°å½è¯¦æ export function getDeviceInspectionRecord(query) { return request({ url: "/deviceInspectionRecord/getDeviceInspectionRecord", method: "get", params: query, }); } // æ°å¢è®¾å¤ç¹æ£è®°å½ export function addDeviceInspectionRecord(data) { return request({ url: "/deviceInspectionRecord/addDeviceInspectionRecord", method: "post", data: data, }); } // ä¿®æ¹è®¾å¤ç¹æ£è®°å½ export function updateDeviceInspectionRecord(data) { return request({ url: "/deviceInspectionRecord/updateDeviceInspectionRecord", method: "post", data: data, }); } // 夿 ¸è®¾å¤ç¹æ£è®°å½ export function reviewDeviceInspectionRecord(data) { return request({ url: "/deviceInspectionRecord/reviewDeviceInspectionRecord", method: "post", data: data, }); } //设å¤äºæ æ¥åå表 export function pageDeviceAccidentReport(query) { return request({ url: "/deviceAccidentReport/pageDeviceAccidentReport", method: "get", params: query, }); } // 导åºè®¾å¤äºæ export function exportDeviceAccidentReport(query) { return request({ url: "/deviceAccidentReport/exportDeviceAccidentReport", method: "get", responseType: "blob", params: query, }); } //å é¤è®¾å¤äºæ æ¥å export function delDeviceAccidentReport(query) { return request({ url: "/deviceAccidentReport/delDeviceAccidentReport", method: "delete", params: query, }); } //æ¥è¯¢è®¾å¤äºæ æ¥å export function getDeviceAccidentReport(query) { return request({ url: "/deviceAccidentReport/getDeviceAccidentReport", method: "get", params: query, }); } // æ°å¢è®¾å¤äºæ æ¥å export function addDeviceAccidentReport(data) { return request({ url: "/deviceAccidentReport/addDeviceAccidentReport", method: "post", data: data, }); } //ä½ä¸æå¯¼ä¹¦æ¥è¯¢ export function pageByPageQueryOfHomeworkInstructions(query) { return request({ @@ -821,14 +584,7 @@ params: query, }); } // 设å¤è¿è¡æ»è§-æ ¹æ®idè·åè®¾å¤æ éæ°æ® export function device(query) { return request({ url: "/deviceFaults/device", method: "get", params: query, }); } //设å¤éªæ¶ä¸å个tableè¡¨æ ¼çå é¤åè½ export function deleteIncidentReportAll(query) { return request({ @@ -879,6 +635,14 @@ responseType: "blob" }); } // 设å¤è¿è¡æ»è§-æ ¹æ®idè·åè®¾å¤æ éæ°æ® export function device(query) { return request({ url: "/deviceFaults/device", method: "get", params: query, }); } //æ·»å è®¾å¤æ é export function addOrUpdateDeviceFaultOne(query) { return request({ @@ -913,4 +677,37 @@ params: query, }); } //设å¤ç»´æ¤ å¯¼åº export function deviceMaintenanceExport(query) { return request({ url: "/deviceMaintain/deviceMaintenanceExport", method: "get", params: query, responseType: "blob" }); } //设å¤ç»´æ¤ å é¤ export function deleteMaintain(query) { return request({ url: "/deviceMaintain/delete", method: "delete", params: query, }); } //设å¤ç»´æ¤ æ°å¢ export function addMaintain(query) { return request({ url: "/deviceMaintain/add", method: "post", data: query, }); } //设å¤ç»´æ¤ æ¥è¯¢ export function getDeviceMaintenancePage(query) { return request({ url: "/deviceMaintain/getDeviceMaintenancePage", method: "get", params: query, }); } src/api/standard/standardLibrary.js
@@ -159,3 +159,12 @@ method: "get", }); } // ä» è·åå 纤çåå· export function getStandTreeBySampleType(query) { return request({ url: "/standardTree/getStandTreeBySampleType", method: "get", params:query }); } src/components/Table/lims-table.vue
@@ -1,7 +1,8 @@ <template> <div> <!-- è¡¨æ ¼ --> <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData" <el-table ref="multipleTable" v-loading="tableLoading" element-loading-text="å è½½ä¸..." element-loading-spinner="el-icon-loading" :border="border" :data="tableData" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" :height="height" :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" :row-key="rowKey" :span-method="spanMethod" :stripe="stripe" style="width: 100%" tooltip-effect="dark" src/views/CNAS/resourceDemand/device/component/borrow.vue
@@ -58,7 +58,7 @@ </el-col> <el-col :span="12"> <el-form-item label="åç¨äººèç³»æ¹å¼ï¼" prop="borrowerContactInformation" label-width="150px"> <el-input v-model="form.borrowerContactInformation" size="small"></el-input> <el-input v-model="form.borrowerContactInformation" :disabled="currentStep > 0" size="small"></el-input> </el-form-item> </el-col> <el-col :span="12"> @@ -341,7 +341,7 @@ // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° clickNodeVal(newVal) { if (newVal.value) { thisqueryParams.deviceId = this.clickNodeVal.value this.queryParams.deviceId = this.clickNodeVal.value this.refreshTable() } }, src/views/CNAS/resourceDemand/device/component/fault.vue
@@ -525,7 +525,7 @@ exportRewardAndPunishmentRecords({deviceId: this.clickNodeVal.value}).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$dowmload.saveAs(blob, 'è®¾å¤æ é表.xlsx') this.$download.saveAs(blob, 'è®¾å¤æ é表.xlsx') }) }, selectAllByOne(row) { src/views/CNAS/resourceDemand/device/component/maintenance.vue
@@ -68,12 +68,14 @@ <el-col :span="24"> <el-form-item :rules="[{ required: true, message: '请è¾å ¥ç»´æ¤å 容', trigger: 'blur' }]" label="ç»´æ¤å 容:" prop="content"> <el-input v-model="formData.content" placeholder="请è¾å ¥" size="small" type="textarea"></el-input> <el-input v-model="formData.content" :disabled="!this.editMode" placeholder="请è¾å ¥" size="small" type="textarea"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item :rules="[{ required: true, message: 'è¯·éæ©ç»´æ¤æ¶é´', trigger: 'blur' }]" label="ç»´æ¤æ¶é´:" prop="date"> <el-date-picker v-model="formData.date" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" <el-date-picker v-model="formData.date" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" :disabled="!this.editMode" style="width:100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </el-form-item> @@ -92,6 +94,7 @@ prop="nextDate"> <el-date-picker v-model="formData.nextDate" :disabled="!this.editMode" :picker-options="{ disabledDate: this.disabledDate }" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" @@ -103,12 +106,12 @@ </el-col> <el-col :span="12"> <el-form-item :rules="[{ required: true, message: '请è¾å ¥ç»´æ¤äºº', trigger: 'blur' }]" label="ç»´æ¤äºº:" prop="name"> <el-input v-model="formData.name" clearable placeholder="请è¾å ¥" size="small"></el-input> <el-input v-model="formData.name" clearable placeholder="请è¾å ¥" :disabled="!this.editMode" size="small"></el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="夿³¨:"> <el-input v-model="formData.comments" placeholder="请è¾å ¥" size="small" type="textarea"></el-input> <el-input v-model="formData.comments" placeholder="请è¾å ¥" :disabled="!this.editMode" size="small" type="textarea"></el-input> </el-form-item> </el-col> </el-row> @@ -123,12 +126,12 @@ <script> import { exportMaintenanceRecord, deleteDeviceMaintenance, selectDeviceByCode, addDeviceMaintenance, getDeviceMaintenancePage, deviceMaintenanceExport, } from '@/api/cnas/resourceDemand/device.js' addMaintain, deleteMaintain, deviceMaintenanceExport, getDeviceMaintenancePage, selectDeviceByCode } from "@/api/cnas/resourceDemand/device"; export default { props: { clickNodeVal: { @@ -160,13 +163,22 @@ }, methods: { //䏿¬¡ç»´æ¤æ¥æ:ç¦ç¨å¨ç»´æ¤æ¥æåçæ¥æ disabledDate(time) { disabledDate(time){ let selectDate = this.formData.date if (selectDate) { if(selectDate){ let oldDate = new Date(selectDate) return time <= oldDate.getTime() } return false }, //å¯¼åº handleDown() { this.outLoading = true deviceMaintenanceExport({deviceId: this.clickNodeVal.value}).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '设å¤ç»´æ¤.xlsx') }) }, handleSizeChange(val) { this.search.size = val @@ -182,15 +194,6 @@ this.dialogVisible = true; this.formData = row; }, // å¯¼åº handleDownOne() { this.outLoading = true deviceMaintenanceExport({ deviceId: this.clickNodeVal.value }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '设å¤ç»´æ¤.xlsx') }) }, //æä½è¯¦æ å é¤ handleDeleteClick(index, row) { this.$confirm('æ¤æä½å°æ°¸ä¹ å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { @@ -198,8 +201,8 @@ cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { deleteDeviceMaintenance({ id: row.id }).then(res => { this.getAllMessage(this.clickNodeVal.value) deleteMaintain({id: row.id}).then(res => { this.MaintainParam.splice(index, 1); this.$message({ type: 'success', message: 'å 餿å!' @@ -214,7 +217,7 @@ }, //ç¹å»åå¯ç¼è¾ add() { selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => { selectDeviceByCode({id: this.clickNodeVal.value}).then(res => { this.formData.deviceName = res.data.deviceName this.formData.managementNumber = res.data.managementNumber this.$nextTick(() => { @@ -228,15 +231,15 @@ this.$refs['form'].validate((valid) => { if (valid) { this.formData.deviceId = this.clickNodeVal.value; addDeviceMaintenance(this.formData).then(res => { addMaintain(this.formData).then(res => { if (res.code == 200) { this.$message.success('æ·»å æå'); this.getAllMessage(this.clickNodeVal.value) // this.MaintainParam.push(this.formData) this.dialogVisible = false; this.formData = {}; //æ¸ ç©ºè¡¨å this.getAllMessage(this.clickNodeVal.value) } }) // this.MaintainParam.push(this.formData) } }) }, @@ -251,10 +254,13 @@ }, //è·å表å设å¤ç»´æ¤ä¿¡æ¯ getAllMessage(deviceId) { getDeviceMaintenancePage({ deviceId, ...this.search }).then(res => { const params = { deviceId: deviceId, size: this.search.size, current: this.search.current, deviceNumber: this.search.deviceNumber, } getDeviceMaintenancePage(params).then(res => { if (res.code == 200) { this.MaintainParam = res.data.records this.search.total = res.data.total @@ -303,10 +309,10 @@ .search { background-color: #fff; height: 40px; display: flex; align-items: center; position: relative; margin-top: 10px; } .search_thing { @@ -339,7 +345,4 @@ transform: translate(0, -50%); } .form .search_label { width: 120px; } </style> src/views/CNAS/resourceDemand/device/component/record.vue
@@ -112,7 +112,7 @@ type="textarea"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-col :span="24"> <el-form-item :rules="[{ required: true, message: '请è¾å ¥ä½¿ç¨æ¥æ', trigger: 'blur' }]" label="ä½¿ç¨æ¥æ:" prop="useDateList"> @@ -125,24 +125,13 @@ start-placeholder="å¼å§æ¥æ" end-placeholder="ç»ææ¥æ"> </el-date-picker> <!-- <el-date-picker v-model="form.useDateList" :disabled="isShow" end-placeholder="ç»ææ¥æ" format="yyyy-MM-dd HH:mm:ss" size="small" start-placeholder="å¼å§æ¥æ" style="width:100%" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> --> </el-form-item> </el-col> <el-col :span="12"> <el-form-item :rules="[{ required: true, message: '请è¾å ¥ä½¿ç¨äºº', trigger: 'change' }]" label="使ç¨äºº:" <el-form-item :rules="[{ required: true, message: '请è¾å ¥ä½¿ç¨äºº', trigger: 'blur' }]" label="使ç¨äºº:" prop="usePerson"> <el-input v-model="form.usePerson" :disabled="isShow" size="small" style="width:100%"></el-input> <!-- <el-select v-model="form.usePerson" placeholder="è¯·éæ©" :disabled="isShow" size="small" style="width:100%"> <el-option v-for="item in responsiblePersonList" :key="item.name" :label="item.name" :value="item.id"> </el-option> </el-select> --> </el-form-item> </el-col> <el-col :span="24"> @@ -162,11 +151,9 @@ <script> import { deviceRecordPage, exportUseRecord, selectDeviceByCode, saveDeviceRecord, updateDeviceRecord, deleteDeviceRecord, deleteDeviceRecord, deviceRecordExport, } from '@/api/cnas/resourceDemand/device.js' import { selectUserCondition } from "@/api/system/user"; export default { @@ -224,7 +211,6 @@ remark: '', }, dialogVisible: false, operationType: '', formParamList: [], } }, @@ -264,25 +250,20 @@ } }) }, // æå¼å¯¼åºå¼¹æ¡éæ©ç¼å¶äººãæ¹å人 openHandleOut() { this.ratifyDialog = true }, //å¯¼åº handleDown() { this.outLoading = true exportUseRecord({ deviceRecordExport({ deviceId: this.clickNodeVal.value, exportDate: this.exportDate }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '设å¤ä½¿ç¨è®°å½.doc') this.$download.saveAs(blob, '设å¤ä½¿ç¨è®°å½.xlsx') }) }, //æ°å»º openAdd() { this.operationType = 'add' this.getUserList() selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => { this.form.deviceName = res.data.deviceName @@ -292,12 +273,6 @@ }) }); }, usePersonName(value) { const index = this.userList.findIndex(item => item.id === value) if (index > -1) { this.form.usePerson = this.userList[index].name } }, //确认添å è®°å½ saveRecord() { this.$refs.form.validate((valid) => { @@ -305,33 +280,22 @@ this.form.useStartDate = this.form.useDateList[0] this.form.useEndDate = this.form.useDateList[1] this.form.deviceId = this.clickNodeVal.value if (this.operationType === 'add') { saveDeviceRecord(this.form).then(res => { if (res.code == 200) { this.$message.success('æ°å¢æå') this.getTableList(this.clickNodeVal.value) this.dialogVisible = false } }) this.dialogVisible = false; } else { updateDeviceRecord(this.form).then(res => { if (res.code == 200) { this.$message.success('ä¿®æ¹æå') this.getTableList(this.clickNodeVal.value) this.dialogVisible = false } }) this.dialogVisible = false; } saveDeviceRecord(this.form).then(res => { if (res.code == 200) { this.$message.success('æ°å¢æå') this.getTableList(this.clickNodeVal.value) this.dialogVisible = false } }) this.dialogVisible = false; } }); }, //æ¥ç详æ showDetailsDialog(type, row) { this.operationType = type; showDetailsDialog(row) { console.log(row) this.dialogVisible = true; this.isShow = true; this.getUserList() this.form = row; let list = [] @@ -459,7 +423,7 @@ } .search_label { width: 140px; width: 74px; font-size: 14px; text-align: right; margin-right: 10px; src/views/CNAS/resourceDemand/device/component/state.vue
@@ -43,10 +43,9 @@ <el-table-column label="å½åç¶æ" min-width="130" prop="currentState"></el-table-column> <el-table-column label="å½å责任人" min-width="180" prop="currentResponsible"></el-table-column> <!-- æä½æé® --> <el-table-column fixed="right" label="æä½" min-width="150"> <el-table-column fixed="right" label="æä½" min-width="120" align="center"> <template #default="{ row }"> <el-button size="small" type="text" @click="handleViewClick(row)">æ¥ç</el-button> <el-button size="small" type="text" @click="handleDownOne(row)">导åº</el-button> <el-button size="small" type="text" @click="handleDeleteClick(row)">å é¤</el-button> </template> </el-table-column> @@ -240,7 +239,6 @@ import { saveDeviceState, selectDeviceByCode, exportDeviceStatus, deleteDeviceState, deviceStateExport, getDeviceStatePage, @@ -422,15 +420,6 @@ this.$refs['form'].clearValidate() }) this.dialogVisible = true }, // å¯¼åº handleDownOne(row) { this.outLoading = true exportDeviceStatus({ deviceId: row.deviceId, processNumber: row.processNumber }).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '设å¤å/å¯ç¨.doc') }) }, // å é¤ handleDeleteClick(row) { src/views/business/inspectionOrder/add.vue
@@ -1,9 +1,6 @@ <template> <div class="bg-1"> <div v-show="!configShow && !equipConfigShow && !cableConfigShow" style="margin: 5px 15px" > <div style="margin: 5px 15px" v-show="!configShow && !equipConfigShow"> <el-row class="title"> <el-col :span="6" >å§æåä¿¡æ¯ æ»ä»·ï¼<span style="color: #3a7bfa" @@ -80,17 +77,17 @@ v-show="active == 3 && addObj.companyId" >éè¿</el-button > <el-button size="medium" @click="$router.go(-1)"> <el-button size="medium" @click="$router.push('/business/inspectionOrder')" > <span style="color: #3a7bfa">è¿å</span> </el-button> </el-col> </el-row> </div> <basic-container> <div class="search" v-show="!configShow && !equipConfigShow && !cableConfigShow" > <basic-container v-show="!configShow && !equipConfigShow"> <div class="search"> <el-form :model="addObj" :rules="formRule" @@ -395,7 +392,7 @@ </basic-container> <div class="search" v-if="active == 1" v-if="active == 1 && !configShow && !equipConfigShow" style="display: flex; background: transparent" > <div style="display: flex; align-items: center"> @@ -443,7 +440,7 @@ </div> </div> </div> <basic-container> <basic-container v-show="!configShow && !equipConfigShow"> <div style="height: auto"> <el-table class="el-table sampleTable" @@ -909,104 +906,103 @@ <el-dialog title="æ£éªä¸å" :visible.sync="issuedDialogVisible" width="400px" width="450px" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" > <div class="body" style="max-height: 60vh"> <el-row> <el-col class="search_thing" :span="22"> <div class="search_label"> <span class="required-span">* </span>çº¦å®æ¶é´ï¼ </div> <div class="search_input"> <el-date-picker size="small" v-model="distributeData.appointed" :picker-options="pickerOptions" type="date" placeholder="éæ©æ¥æ" value-format="yyyy-MM-dd" style="width: 100%" format="yyyy-MM-dd" > </el-date-picker> </div> <el-row style="margin-bottom: 20px"> <el-col :span="8" style="text-align: right"> <div><span class="required-span">* </span>çº¦å®æ¶é´ï¼</div> </el-col> <el-col class="search_thing" :span="22"> <div class="search_label"> <el-col :span="16"> <el-date-picker size="small" v-model="distributeData.appointed" :picker-options="{ disabledDate: this.disabledDate }" type="date" placeholder="éæ©æ¥æ" value-format="yyyy-MM-dd" style="width: 100%" format="yyyy-MM-dd" > </el-date-picker> </el-col> </el-row> <el-row style="margin-bottom: 20px"> <el-col :span="8" style="text-align: right"> <div> <span class="required-span" v-if="addObj.type == 2">* </span >ææ´¾äººåï¼ </div> <div class="search_input"> <el-select multiple v-model="distributeData.userId" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" @change="changeUser" > <el-option-group v-for="(item, index) in Object.keys(personList)" :key="index" :label="item" > <el-option v-for="op in personList[item]" :key="op.id" :label="op.name" :value="op.id" > </el-option> </el-option-group> </el-select> </div> </el-col> <el-col class="search_thing" :span="22" v-if="distributeData.userId.length > 0" > <div class="search_label"> <span class="required-span">* </span>è¯éªå®¤ï¼ </div> <div class="search_input"> <el-select v-model="distributeData.sonLaboratory" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" <el-col :span="16"> <el-select multiple v-model="distributeData.userId" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" @change="changeUser" > <el-option-group v-for="(item, index) in Object.keys(personList)" :key="index" :label="item" > <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value" v-for="op in personList[item]" :key="op.id" :label="op.name" :value="op.id" > </el-option> </el-select> </div> </el-option-group> </el-select> </el-col> <el-col class="search_thing" :span="22"> <div class="search_label"> <span class="required-span">* </span>åå»ºå§æåï¼ </div> <div class="search_input"> <el-select v-model="distributeData.isCreate" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" </el-row> <el-row v-if="distributeData.userId.length > 0" style="margin-bottom: 20px" > <el-col :span="8" style="text-align: right"> <div><span class="required-span">* </span>è¯éªå®¤ï¼</div> </el-col> <el-col :span="16"> <el-select v-model="distributeData.sonLaboratory" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" > <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value" > <el-option label="æ¯" :value="true"></el-option> <el-option label="å¦" :value="false"></el-option> </el-select> </div> </el-option> </el-select> </el-col> </el-row> <el-row style="margin-bottom: 20px"> <el-col :span="8" style="text-align: right"> <div><span class="required-span">* </span>åå»ºå§æåï¼</div> </el-col> <el-col :span="16"> <el-select v-model="distributeData.isCreate" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" > <el-option label="æ¯" :value="true"></el-option> <el-option label="å¦" :value="false"></el-option> </el-select> </el-col> </el-row> </div> @@ -1022,17 +1018,15 @@ <el-dialog title="ä¸éè¿åå " :visible.sync="noDialogVisible" width="400px"> <div class="body" style="max-height: 60vh"> <el-row> <el-col class="search_thing" :span="22"> <div class="search_label"> <span class="required-span">* </span>ä¸éè¿åå ï¼ </div> <div class="search_input"> <el-input v-model="tell" size="small" placeholder="请è¾å ¥ä¸éè¿åå " ></el-input> </div> <el-col :span="8" style="text-align: right"> <div><span class="required-span">* </span>ä¸éè¿åå ï¼</div> </el-col> <el-col :span="16"> <el-input v-model="tell" size="small" placeholder="请è¾å ¥ä¸éè¿åå " ></el-input> </el-col> </el-row> </div> @@ -1055,7 +1049,7 @@ :active="active" :inspectionItemST="inspectionItemST" /> <fiberOpticConfigTwo <fiberOpticConfigReadOnly :currentId="currentId" v-if="configShow && examine == 1" :active="active" @@ -1065,7 +1059,6 @@ v-if="equipConfigShow" :active="active" /> <cableConfig v-if="cableConfigShow" :active="active" /> <!-- åéç¹æ®å¼å¤çæ¡--> <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" @@ -1572,7 +1565,6 @@ import fiberOpticConfig from "./fiberoptic-config.vue"; import fiberOpticConfigReadOnly from "./fiberoptic-config-readonly.vue"; import equipConfig from "./equip-config.vue"; import cableConfig from "./cable-config.vue"; import getLodop from "@/utils/lodop"; import { bigEval } from "@/utils/bigEval"; import { getDicts } from "@/api/system/dict/data"; @@ -1581,7 +1573,6 @@ fiberOpticConfig, fiberOpticConfigReadOnly, equipConfig, cableConfig, }, computed: { ...mapGetters(["nickName", "loginUserInfo"]), @@ -1593,14 +1584,6 @@ examine: 0, active: 0, currentId: 0, pickerOptions: { disabledDate(time) { // å½åæ¶é´å ä¸ä¸å¤©çæ¶é´æ³ const threeDaysLater = Date.now() + 24 * 60 * 60 * 1000; // ç¦ç¨ä¸å¤©åä¹åçæææ¥æ return time.getTime() < threeDaysLater; }, }, fiberLoss: [], qrDataList: [], isFocus: false, @@ -1769,7 +1752,6 @@ bsm1Dia: false, bsm1DiaAll: false, equipConfigShow: false, cableConfigShow: false, bsm2: false, bsm2Val: null, bsm2Dia: false, @@ -1887,7 +1869,7 @@ }, }, created() { this.active = this.$route.query.active; this.active = Number(this.$route.query.active); this.currentId = this.$route.query.currentId; this.examine = this.$route.query.examine; this.isReview = this.$route.query.isReview; @@ -1934,6 +1916,15 @@ } }, methods: { //䏿¬¡æ ¸æ¥æ¥æ:ç¦ç¨å¨æ ¸æ¥æ¥æåçæ¥æ disabledDate(time) { if (time) { let now = new Date(); now.setHours(0, 0, 0, 0); return time < now.getTime(); } return false; }, changeType(type) { this.hasSendUrgentOrder(type) .then((res) => { @@ -3324,6 +3315,20 @@ b.id = null; delete b.bsmRow; }); if (a.bushing && a.bushing.length > 0) { a.bushing.forEach((b) => { b.fiber.forEach((c) => { c.productList.forEach((d) => { d.id = null; }); }); b.fibers.forEach((c) => { c.productList.forEach((d) => { d.id = null; }); }); }); } }); this.editTable.forEach((item) => { sampleList.forEach((a) => { @@ -3358,7 +3363,7 @@ if (res.code === 200) { this.$message.success("å·²æäº¤"); this.bsm3Dia = false; this.$router.go(-1); this.$router.push("/business/inspectionOrder"); } this.saveLoad = false; }) @@ -3369,7 +3374,6 @@ }, upInsOrderOfState(state) { if (state == 1) { //this.saveLoad = true this.issuedDialogVisible = true; selectOrderManDay({ id: this.currentId, @@ -3378,7 +3382,6 @@ if (res.code === 200) { this.distributeData.orderId = this.currentId; this.distributeData.appointed = res.data; console.log("çº¦å®æ¶é´", this.distributeData.appointed); } }) .catch((error) => { @@ -3530,7 +3533,7 @@ this.$message.success("æäº¤æå"); this.issuedDialogVisible = false; this.upLoad = false; this.$router.go(-1); this.$router.replace("/business/inspectionOrder"); //å®¡æ ¸éè¿åï¼èªå¨æå°äºç»´ç //TODO: çµåè¯éªå®¤ææ¶ä¸ç¨æ ç¾æå° if ( @@ -3808,7 +3811,6 @@ val.forEach((a) => { this.productIds.push(a.id); }); console.log("selectChange", this.sampleList); }, rowClick(row, column, event) { this.currentMethod = row; @@ -4622,7 +4624,7 @@ this.tell = ""; this.$message.success("æäº¤æå"); this.issuedDialogVisible = false; this.$router.go(-1); this.$router.push("/business/inspectionOrder"); } }) .catch((error) => { @@ -4695,20 +4697,6 @@ return; } this.equipConfigShow = true; } else { if (this.sampleId === null) { this.$message.error("æªé䏿 ·å"); return; } } }, openCableConfig() { if (this.active === 1) { if (this.sampleIds.length === 0) { this.$message.error("æªéæ©æ ·å"); return; } this.cableConfigShow = true; } else { if (this.sampleId === null) { this.$message.error("æªé䏿 ·å"); src/views/business/inspectionOrder/cable-config.vue
ÎļþÒÑɾ³ý src/views/business/inspectionOrder/equip-config.vue
@@ -2,54 +2,152 @@ <div class="ins_order_config"> <div> <el-row class="title"> <el-col :span="6" style="padding-left: 20px;text-align: left;">åæ ·åé ç½®</el-col> <el-col :span="18" style="text-align: right;"> <el-button size="medium" type="primary" @click="addChild" v-if="active==1">æ·»å åæ ·å</el-button> <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">ä¿ å</el-button> <el-col :span="6" style="padding-left: 20px; text-align: left" >åæ ·åé ç½®</el-col > <el-col :span="18" style="text-align: right"> <el-button size="medium" type="primary" @click="addChild" v-if="active == 1" >æ·»å åæ ·å</el-button > <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active == 1" >ä¿ å</el-button > <el-button size="medium" @click="outConfig"> <span style="color: #3A7BFA;">è¿ å</span> <span style="color: #3a7bfa">è¿ å</span> </el-button> </el-col> </el-row> </div> <div class="center"> <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="50%" tooltip-effect="dark" border highlight-current-row @row-click="rowClick" @current-change="selectSample"> <!-- <el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column> --> <el-table-column type="index" label="åºå·" width="65" align="center"></el-table-column> <el-table-column prop="sample" label="æ ·ååç§°" align="center" min-width="100"> <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="50%" tooltip-effect="dark" border highlight-current-row @row-click="rowClick" @current-change="selectSample" > <el-table-column type="index" label="åºå·" width="65" align="center" ></el-table-column> <el-table-column prop="sample" label="æ ·ååç§°" align="center" min-width="100" > <template slot-scope="scope"> <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input> <el-input size="small" v-model="scope.row.sample" clearable :readonly="active > 1" ></el-input> </template> </el-table-column> <el-table-column prop="sampleCode" label="æ ·åç¼å·" min-width="140" align="center"> <el-table-column prop="sampleCode" label="æ ·åç¼å·" min-width="140" align="center" > <template slot-scope="scope"> <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="ä¸å¡«ååç³»ç»èªå¨çæ" :readonly="active>1"></el-input> <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="ä¸å¡«ååç³»ç»èªå¨çæ" :readonly="active > 1" ></el-input> </template> </el-table-column> <el-table-column prop="model" label="æ ·ååå·" align="center" min-width="100"> <el-table-column prop="model" label="æ ·ååå·" align="center" min-width="100" > <template slot-scope="scope"> <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="æ ·ååå·" size="small" @change="handleChangeModel" :disabled="active>1" style="width: 100%;"> <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value"> <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="æ ·ååå·" size="small" @change="handleChangeModel" :disabled="active > 1" style="width: 100%" > <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </template> </el-table-column> <el-table-column prop="modelNum" label="åå·åæ°" width="130" align="center" v-if="!(active>1)"> <el-table-column prop="modelNum" label="åå·åæ°" width="130" align="center" v-if="!(active > 1)" > <template slot-scope="scope"> <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="éå¿ å¡«" @keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)" @clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input> <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="éå¿ å¡«" @keyup.enter.native=" methodChange(scope.row.standardMethodListId, scope.row) " @clear="methodChange(scope.row.standardMethodListId, scope.row)" ></el-input> </template> </el-table-column> <el-table-column prop="standardMethodListId" label="æ£éªæ å" align="center" min-width="100"> <el-table-column prop="standardMethodListId" label="æ£éªæ å" align="center" min-width="100" > <template slot-scope="scope"> <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1" placeholder="æ£éªæ å" size="small" :loading="methodLoad" @change="(value)=>methodChange(value, scope.row)" @focus="methodFocus" :readonly="active>1" style="width: 100%;"> <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model == null || active > 1" placeholder="æ£éªæ å" size="small" :loading="methodLoad" @change="(value) => methodChange(value, scope.row)" @focus="methodFocus" :readonly="active > 1" style="width: 100%" > <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id" > </el-option> </el-select> </template> @@ -58,59 +156,162 @@ </el-table-column> <el-table-column label="æä½" width="120"> <template slot-scope="scope"> <el-button @click.native.prevent="deleteRow(scope.$index, sampleList)" type="text" size="small">å é¤</el-button> <el-button @click.native.prevent="deleteRow(scope.$index, sampleList)" type="text" size="small" >å é¤</el-button > </template> </el-table-column> </el-table> <el-table class="el-table" ref="productTable" :data="productList" height="50%" tooltip-effect="dark" border @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll"> <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column> <el-table-column prop="inspectionItem" label="æ£éªé¡¹" min-width="140" show-overflow-tooltip></el-table-column> <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹å项" min-width="140" show-overflow-tooltip></el-table-column> <el-table-column prop="sonLaboratory" label="åå®éªå®¤" min-width="130" show-overflow-tooltip :filters="filters" :filter-method="filterHandler"></el-table-column> <el-table-column prop="methodS" label="è¯éªæ¹æ³" min-width="120" show-overflow-tooltip> <el-table class="el-table" ref="productTable" :data="productList" height="50%" tooltip-effect="dark" border @selection-change="selectProduct" style="margin-bottom: 10px" @select="upProductSelect" :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll" > <el-table-column type="selection" width="65" :selectable="selectable" v-if="active == 1" ></el-table-column> <el-table-column prop="inspectionItem" label="æ£éªé¡¹" min-width="140" show-overflow-tooltip ></el-table-column> <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹å项" min-width="140" show-overflow-tooltip ></el-table-column> <el-table-column prop="sonLaboratory" label="åå®éªå®¤" min-width="130" show-overflow-tooltip :filters="filters" :filter-method="filterHandler" ></el-table-column> <el-table-column prop="methodS" label="è¯éªæ¹æ³" min-width="120" show-overflow-tooltip > </el-table-column> <el-table-column prop="unit" label="计éåä½" width="100" show-overflow-tooltip></el-table-column> <el-table-column prop="price" label="åä»·" width="100" show-overflow-tooltip></el-table-column> <el-table-column prop="section" label="åºé´" min-width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="unit" label="计éåä½" width="100" show-overflow-tooltip ></el-table-column> <el-table-column prop="price" label="åä»·" width="100" show-overflow-tooltip ></el-table-column> <el-table-column prop="section" label="åºé´" min-width="120" show-overflow-tooltip ></el-table-column> <el-table-column prop="ask" label="è¦æ±å¼" min-width="220px"> <template slot-scope="scope"> <el-input size="small" placeholder="è¦æ±å¼" v-model="scope.row.ask" clearable type="textarea" :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" v-if="active==1&&isAskOnlyRead"></el-input> <el-input size="small" placeholder="è¦æ±å¼" v-model="scope.row.ask" clearable type="textarea" :autosize="{ minRows: 1, maxRows: 3 }" @change="(e) => requestChange(e, scope.row)" v-if="active == 1 && isAskOnlyRead" ></el-input> <span v-else>{{ scope.row.ask }}</span> </template> </el-table-column> </el-table> </div> <el-dialog title="éæ©åæ ·å" :visible.sync="selectStandardTree" width="400px" @closed="addObj.sampleNum = 1"> <div class="body" style="height: 60vh;overflow-y: auto;user-select: none;" v-if="selectStandardTree"> <el-row style="margin-bottom: 10px;"> <el-dialog title="éæ©åæ ·å" :visible.sync="selectStandardTree" width="400px" @closed="addObj.sampleNum = 1" > <div class="body" style="height: 60vh; overflow-y: auto; user-select: none" v-if="selectStandardTree" > <el-row style="margin-bottom: 10px"> <el-col :span="24"> <label>æ ·åæ°éï¼</label> <el-input-number v-model="addObj.sampleNum" :min="1" label="请è¾å ¥æ°é" size="small"></el-input-number> <el-input-number v-model="addObj.sampleNum" :min="1" label="请è¾å ¥æ°é" size="small" ></el-input-number> </el-col> </el-row> <el-row> <el-col :span="24"> <el-input placeholder="è¾å ¥å ³é®åè¿è¡æç´¢" suffix-icon="el-icon-search" v-model="search" size="small" style="margin-bottom: 5px;" clearable @blur="searchFilter" @clear="searchFilter" @keyup.enter.native="searchFilter"></el-input> <el-input placeholder="è¾å ¥å ³é®åè¿è¡æç´¢" suffix-icon="el-icon-search" v-model="search" size="small" style="margin-bottom: 5px" clearable @blur="searchFilter" @clear="searchFilter" @keyup.enter.native="searchFilter" ></el-input> </el-col> </el-row> <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'label' }" node-key="label" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" @dblclick.native="activeStandardTree"> <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'label' }" node-key="label" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" @dblclick.native="activeStandardTree" > <div class="custom-tree-node" slot-scope="{ node, data }"> <el-row> <el-col :span="24"> <span><i :class="`node_i ${data.children != undefined ? (data.code==='[1]'?'el-icon-folder-opened':'el-icon-folder') : 'el-icon-tickets'}`"></i> {{ data.code }} {{ data.label }}</span> <span ><i :class="`node_i ${ data.children != undefined ? data.code === '[1]' ? 'el-icon-folder-opened' : 'el-icon-folder' : 'el-icon-tickets' }`" ></i> {{ data.code }} {{ data.label }}</span > </el-col> </el-row> </div> @@ -121,24 +322,42 @@ <el-button type="primary" @click="activeStandardTree">ç¡® å®</el-button> </span> </el-dialog> <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose"> <div class="body" style="max-height: 60vh;"> <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose" > <div class="body" style="max-height: 60vh"> <el-row v-if="bsm1"> <el-col class="search_thing" :span="22"> <div class="search_label"><span class="required-span">* </span>æ¤å¥å¯åº¦ï¼</div> <div class="search_label"> <span class="required-span">* </span>æ¤å¥å¯åº¦ï¼ </div> <div class="search_input"> <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a"></el-radio> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" ></el-radio> </el-radio-group> </div> </el-col> <el-col class="search_thing" :span="22"> <div class="search_label">è¦æ±å¼ï¼</div> <div class="search_input" v-show="bsm1Val!==null&&bsm1Val!==''"> <div class="search_input" v-show="bsm1Val !== null && bsm1Val !== ''" > <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a">{{JSON.parse(bsmRow.ask)[ai]}}</el-radio> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" >{{ JSON.parse(bsmRow.ask)[ai] }}</el-radio > </el-radio-group> </div> </el-col> @@ -149,443 +368,504 @@ </template> <script> export default { props: { active: { type: Number, default: () => 0 }, import { getStandTreeBySampleType, selectStandardTreeList2, selectStandardMethodEnum, selectsStandardMethodByFLSSM, selectStandardProductList, } from "@/api/standard/standardLibrary"; export default { props: { active: { type: Number, default: () => 0, }, data() { return { saveLoad: false, sampleList: [], productList: [], getProductLoad: false, filters: [], sampleIds: [], isAskOnlyRead: false, selectStandardTree: false, search: '', expandedKeys: [], addObj: { sampleNum: 1, }, selectTree: null, models: [], sample: { sampleCode: null, laboratory: null, factory: null, sampleType: null, sample: null, model: null, modelNum: null, sampleNum: 1, isLeave: 0, unit: null }, currentMethod: null, methods: [], methodLoad: false, sampleId: null, bsmRow: null, bsm1: false, bsm1Val: null, bsm1Dia: false, list: [], parentSample: [] }, data() { return { saveLoad: false, sampleList: [], productList: [], getProductLoad: false, filters: [], sampleIds: [], isAskOnlyRead: false, selectStandardTree: false, search: "", expandedKeys: [], addObj: { sampleNum: 1, }, selectTree: null, models: [], sample: { sampleCode: null, laboratory: null, factory: null, sampleType: null, sample: null, model: null, modelNum: null, sampleNum: 1, isLeave: 0, unit: null, }, currentMethod: null, methods: [], methodLoad: false, sampleId: null, bsmRow: null, bsm1: false, bsm1Val: null, bsm1Dia: false, list: [], parentSample: [], }; }, mounted() { this.selectStandardTreeList(); this.selectStandardMethods(); this.$parent.sampleIds.forEach((a) => { for (var i = 0; i < this.$parent.sampleList.length; i++) { if (this.$parent.sampleList[i].id == a) { this.sampleList = this.$parent.sampleList[i].childSampleList; this.parentSample.push(this.$parent.sampleList[i]); break; } } }); }, methods: { selectStandardTreeList() { selectStandardTreeList() .then((res) => { if (res.code === 200) { this.list = res.data; this.list.forEach((a) => { this.expandedKeys.push(a.label); }); } }) .catch((error) => { console.error(error); }); }, save() { if (this.sampleList.length === 0) { this.$message.error("缺å°é ç½®æ æ³ä¿å"); return; } this.parentSample.forEach((a) => { a.childSampleList = this.sampleList; }); this.$message.success("å·²ä¿å"); }, deleteRow(index, rows) { this.productList = []; rows.splice(index, 1); }, outConfig() { this.$parent.equipConfigShow = false; }, addChild() { this.selectStandardTree = true; }, selectSample(val) { if (val === null) return; this.sampleIds = [val.id]; }, rowClick(row, column, event) { this.currentMethod = row; let obj = this.methods.find( (a) => a.id == this.currentMethod.standardMethodListId ); if (obj && obj.code == "å§æè¦æ±") { this.isAskOnlyRead = true; } else { this.isAskOnlyRead = false; } this.sampleId = row.id; if (this.active !== 1) { this.sampleIds = []; this.sampleIds.push(row.id); } this.productList = row.insProduct; setTimeout(() => { this.productList.forEach((a) => { if (a.state == 1) this.toggleSelection(a); }); }, 200); }, toggleSelection(row) { this.$refs.productTable.toggleRowSelection(row, true); }, selectable() { if (this.active > 1) { return false; } else { return true; } }, mounted() { this.selectStandardTreeList() this.selectStandardMethods() this.$parent.sampleIds.forEach(a => { for (var i = 0; i < this.$parent.sampleList.length; i++) { if (this.$parent.sampleList[i].id == a) { this.sampleList = this.$parent.sampleList[i].childSampleList this.parentSample.push(this.$parent.sampleList[i]) break } } }) handleChangeModel(e) { let num = this.selectTree.split("-").length; if (num != 5) { this.selectTree = this.selectTree + " - " + e; } else { let arr = this.selectTree.split("-"); let arr0 = arr.slice(0, arr.length - 1); this.selectTree = arr0.join("-") + "- " + e; } }, methods: { selectStandardTreeList() { this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => { this.list = res.data this.list.forEach(a => { this.expandedKeys.push(a.label) }) }) }, save() { if (this.sampleList.length === 0) { this.$message.error('缺å°é ç½®æ æ³ä¿å') return } this.parentSample.forEach(a => { a.childSampleList = this.sampleList }) this.$message.success('å·²ä¿å') }, deleteRow(index, rows) { this.productList = [] rows.splice(index, 1); }, outConfig() { this.$parent.equipConfigShow = false }, addChild() { this.selectStandardTree = true }, selectSample(val) { if (val === null) return this.sampleIds = [val.id] }, rowClick(row, column, event) { this.currentMethod = row let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) if (obj && obj.code == 'å§æè¦æ±') { this.isAskOnlyRead = true } else { this.isAskOnlyRead = false } this.sampleId = row.id if (this.active !== 1) { this.sampleIds = [] this.sampleIds.push(row.id) } this.productList = row.insProduct setTimeout(() => { this.productList.forEach(a => { if (a.state == 1) this.toggleSelection(a) }) }, 200) }, toggleSelection(row) { this.$refs.productTable.toggleRowSelection(row, true); }, selectable() { if (this.active > 1) { return false } else { return true } }, handleChangeModel(e) { let num = this.selectTree.split('-').length; if (num != 5) { this.selectTree = this.selectTree + ' - ' + e } else { let arr = this.selectTree.split('-') let arr0 = arr.slice(0, arr.length - 1) this.selectTree = arr0.join('-') + '- ' + e } }, methodChange(val, row) { if (val === null || val === '') return this.currentMethod = row let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) if (obj && obj.code == 'å§æè¦æ±') { this.isAskOnlyRead = true } else { this.isAskOnlyRead = false } this.getProductLoad = true this.$axios.post(this.$api.standardTree.selectStandardProductList, { model: row.model + '-' + row.modelNum, standardMethodListId: val, factory: this.selectTree, }, { headers: { 'Content-Type': 'application/json' methodChange(val, row) { if (val === null || val === "") return; this.currentMethod = row; let obj = this.methods.find( (a) => a.id == this.currentMethod.standardMethodListId ); if (obj && obj.code == "å§æè¦æ±") { this.isAskOnlyRead = true; } else { this.isAskOnlyRead = false; } this.getProductLoad = true; selectStandardProductList({ model: row.model + "-" + row.modelNum, standardMethodListId: val, factory: this.selectTree, }) .then((res) => { if (res.code === 200) { res.data.forEach((a) => { a.state = 0; }); row.insProduct = this.HaveJson(res.data); this.getProductLoad = false; this.productList = row.insProduct; this.$refs.sampleTable.setCurrentRow(row); setTimeout(() => { this.productList.forEach((a) => { if (a.state == 1) this.toggleSelection(a); }); }, 200); } }).then(res => { res.data.forEach(a => { a.state = 0 }) row.insProduct = this.HaveJson(res.data) this.getProductLoad = false this.productList = row.insProduct this.$refs.sampleTable.setCurrentRow(row) setTimeout(() => { this.productList.forEach(a => { if (a.state == 1) this.toggleSelection(a) }) }, 200) }) }, methodFocus() { this.selectsStandardMethodByFLSSM() }, selectStandardMethods() { this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => { this.methods = res.data .catch((error) => { console.error(error); }); }, methodFocus() { this.selectsStandardMethodByFLSSM(); }, selectStandardMethods() { selectStandardMethodEnum() .then((res) => { if (res.code === 200) { this.methods = res.data; } }) }, selectsStandardMethodByFLSSM() { this.methodLoad = true this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { tree: this.selectTree }).then(res => { this.methodLoad = false try { if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) { let arr = this.selectTree.split('-') let arr0 = arr.slice(0, arr.length - 1) let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1) this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { tree: selectTree }).then(ress => { this.methods = ress.data.standardMethodList }) } else { this.methods = res.data.standardMethodList .catch((error) => { console.error(error); }); }, selectsStandardMethodByFLSSM() { this.methodLoad = true; selectsStandardMethodByFLSSM({ tree: this.selectTree, }) .then((res) => { if (res.code === 200) { this.methodLoad = false; try { if ( res.data.standardMethodList.length == 0 && this.selectTree.split("-").length == 5 ) { let arr = this.selectTree.split("-"); let arr0 = arr.slice(0, arr.length - 1); let selectTree = arr0 .join("-") .substring(0, arr0.join("-").length - 1); selectsStandardMethodByFLSSM({ tree: selectTree, }) .then((res) => { if (res.code === 200) { this.methods = res.data.standardMethodList; } }) .catch((error) => { console.error(error); }); } else { this.methods = res.data.standardMethodList; } } catch (e) {} } }) .catch((error) => { console.error(error); }); }, selectProduct(val) { this.productIds = []; val.forEach((a) => { this.productIds.push(a.id); }); }, upProductSelect(selection, row) { row.state = row.state == 1 ? 0 : 1; if ( row.bsm === "1" && row.section !== "" && row.section !== null && row.state === 1 ) { if (row.section.indexOf("[") > -1) { this.bsmRow = this.HaveJson(row); } this.bsm1 = true; this.bsm1Dia = true; } else if ( row.bsm === "1" && row.section !== "" && row.section !== null && row.state === 0 ) { this.bsm1 = false; } this.sampleList.map((item) => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map((m) => { if (m.id == row.id) { m.state = row.state; } } catch (e) {} }) }, selectProduct(val) { this.productIds = [] val.forEach(a => { this.productIds.push(a.id) }) }, upProductSelect(selection, row) { row.state = row.state == 1 ? 0 : 1 if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) { if (row.section.indexOf('[') > -1) { this.bsmRow = this.HaveJson(row) } this.bsm1 = true this.bsm1Dia = true } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) { this.bsm1 = false return m; }); } this.sampleList.map(item => { return item; }); }, tableRowClassName({ row, rowIndex }) { if (row.state === 0) { return "warning-row"; } return ""; }, handleAll(e) { if (e.length > 0) { this.productList.map((m) => { m.state = 1; return m; }); } else { this.productList.map((m) => { m.state = 0; return m; }); } this.productList.forEach((p) => { if ( p.bsm === "1" && p.section !== "" && p.section !== null && p.state === 1 ) { if (p.section.indexOf("[") > -1) { this.bsmRow = this.HaveJson(p); } this.bsm1 = true; this.bsm1Dia = true; } else if ( p.bsm === "1" && p.section !== "" && p.section !== null && p.state === 0 ) { this.bsm1 = false; } }); if (e.length > 0) { this.sampleList.map((item) => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map(m => { if (m.id == row.id) { m.state = row.state; } item.insProduct.map((m) => { m.state = 1; return m; }) }); } return item }) }, tableRowClassName({ row, rowIndex }) { if (row.state === 0) { return 'warning-row'; } return ''; }, handleAll(e) { if (e.length > 0) { this.productList.map(m => { m.state = 1 return m }) } else { this.productList.map(m => { m.state = 0 return m }) } this.productList.forEach(p => { if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 1) { if (p.section.indexOf('[') > -1) { this.bsmRow = this.HaveJson(p) } this.bsm1 = true this.bsm1Dia = true } else if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 0) { this.bsm1 = false } }) if (e.length > 0) { this.sampleList.map(item => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map(m => { m.state = 1 return m; }) } return item }) } else { this.sampleList.map(item => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map(m => { m.state = 0 return m; }) } return item }) } this.$nextTick(() => { this.$refs.productTable.doLayout() }) }, filterHandler(value, row, column) { const property = column['property']; return row[property] === value; }, requestChange(e, row) { this.sampleList.map(item => { return item; }); } else { this.sampleList.map((item) => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map(m => { if (m.id == row.id) { m.ask = e; } item.insProduct.map((m) => { m.state = 0; return m; }) }); } return item }) }, activeStandardTree() { let trees = this.selectTree.split(" - ") if (trees.length < 4) { this.$message.error('æªéæ©å产å') return return item; }); } this.$nextTick(() => { this.$refs.productTable.doLayout(); }); }, filterHandler(value, row, column) { const property = column["property"]; return row[property] === value; }, requestChange(e, row) { this.sampleList.map((item) => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map((m) => { if (m.id == row.id) { m.ask = e; } return m; }); } this.addObj.factory = trees[0] this.addObj.laboratory = trees[1] this.addObj.sampleType = trees[2] if(trees[3]===''){ this.addObj.sample = (trees[4] == undefined ? null : trees[4]) }else if(trees[3]===undefined){ this.addObj.sample = trees[2] }else{ this.addObj.sample = trees[3] return item; }); }, activeStandardTree() { let trees = this.selectTree.split(" - "); if (trees.length < 4) { this.$message.error("æªéæ©å产å"); return; } this.addObj.factory = trees[0]; this.addObj.laboratory = trees[1]; this.addObj.sampleType = trees[2]; if (trees[3] === "") { this.addObj.sample = trees[4] == undefined ? null : trees[4]; } else if (trees[3] === undefined) { this.addObj.sample = trees[2]; } else { this.addObj.sample = trees[3]; } this.addObj.model = trees[4] == undefined ? null : trees[4]; this.selectStandardTree = false; this.sample.joinName = null; this.sample.joinModel = null; this.sample.joinNum = 1; this.sample.sample = this.addObj.sample; this.sample.model = this.addObj.model; this.sample.unit = this.addObj.unit; this.sample.standardMethodListId = null; this.sample.insProduct = []; this.sample.id = this.count; this.sample.num = this.addObj.sampleNum; this.sampleList.push(this.HaveJson(this.sample)); this.count++; this.$refs.sampleTable.doLayout(); }, searchFilter() { this.$refs.tree.filter(this.search); }, filterNode(value, data) { if (!value) return true; return data.label.indexOf(value) !== -1; }, handleNodeClick(val, node, el) { this.selectTree = ""; this.models = val.children; this.getNodeParent(node); this.selectTree = this.selectTree.replace(" - ", ""); let data = this.selectTree.split(" - "); let data2 = ""; for (let index = data.length - 1; index >= 0; index--) { data2 += " - " + data[index]; } this.selectTree = data2.replace(" - ", ""); }, getNodeParent(val) { if (val.parent != null) { if (val.data.children === null) { this.selectTree += " - " + val.label + " - " + ""; } else { this.selectTree += " - " + val.label; } this.addObj.model = (trees[4] == undefined ? null : trees[4]) this.selectStandardTree = false this.sample.joinName = null this.sample.joinModel = null this.sample.joinNum = 1 this.sample.sample = this.addObj.sample this.sample.model = this.addObj.model this.sample.unit = this.addObj.unit this.sample.standardMethodListId = null this.sample.insProduct = [] this.sample.id = this.count this.sample.num = this.addObj.sampleNum this.sampleList.push(this.HaveJson(this.sample)) this.count++ this.$refs.sampleTable.doLayout() }, searchFilter() { this.$refs.tree.filter(this.search) }, filterNode(value, data) { if (!value) return true; return data.label.indexOf(value) !== -1; }, handleNodeClick(val, node, el) { this.selectTree = '' this.models = val.children this.getNodeParent(node) this.selectTree = this.selectTree.replace(' - ', '') let data = this.selectTree.split(' - ') let data2 = '' for (let index = data.length - 1; index >= 0; index--) { data2 += " - " + data[index] this.getNodeParent(val.parent); } }, nodeOpen(data, node, el) { $($(el.$el).find(".node_i")[0]).attr( "class", "node_i el-icon-folder-opened" ); }, nodeClose(data, node, el) { $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); }, beforeClose(done) { if (this.bsm1) { if (this.bsm1Val === null || this.bsm1Val === "") { this.$message.error("ç¹æ®é¡¹ç®å¿ é¡»å¤ç"); return; } this.selectTree = data2.replace(' - ', '') }, getNodeParent(val) { if (val.parent != null) { if (val.data.children === null) { this.selectTree += ' - ' + val.label + ' - ' + '' } else { this.selectTree += ' - ' + val.label } this.getNodeParent(val.parent) } done(); }, upBsm1(val) { let sections = JSON.parse(this.bsmRow.section); let asks = JSON.parse(this.bsmRow.ask); let tells = JSON.parse(this.bsmRow.tell); let manHours = JSON.parse(this.bsmRow.manHour); let prices = JSON.parse(this.bsmRow.price); for (var a in sections) { if (val === sections[a]) { this.productList.forEach((p) => { if (p.id === this.bsmRow.id) { p.section = sections[a]; p.ask = asks[a]; p.tell = tells[a]; p.manHour = manHours[a]; p.price = prices[a]; } }); break; } }, nodeOpen(data, node, el) { $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') }, nodeClose(data, node, el) { $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder') }, beforeClose(done) { if (this.bsm1) { if (this.bsm1Val === null || this.bsm1Val === '') { this.$message.error('ç¹æ®é¡¹ç®å¿ é¡»å¤ç') return } } done() }, upBsm1(val) { let sections = JSON.parse(this.bsmRow.section); let asks = JSON.parse(this.bsmRow.ask); let tells = JSON.parse(this.bsmRow.tell); let manHours = JSON.parse(this.bsmRow.manHour); let prices = JSON.parse(this.bsmRow.price); for (var a in sections) { if (val === sections[a]) { this.productList.forEach(p => { if (p.id === this.bsmRow.id) { p.section = sections[a] p.ask = asks[a] p.tell = tells[a] p.manHour = manHours[a] p.price = prices[a] } }) break } } }, } } } }, }, }; </script> <style scoped> .ins_order_config { width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; } .ins_order_config { width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; } .ins_order_config::-webkit-scrollbar { width: 0; } .ins_order_config::-webkit-scrollbar { width: 0; } .title { height: 60px; line-height: 60px; } .title { height: 60px; line-height: 60px; } .center { width: 100%; height: calc(100% - 60px); } .center { width: 100%; height: calc(100% - 60px); } >>> .all-disabled .el-checkbox__input .el-checkbox__inner { background-color: #edf2fc; border-color: #dcdfe6; cursor: not-allowed; } >>>.all-disabled .el-checkbox__input .el-checkbox__inner { background-color: #edf2fc; border-color: #dcdfe6; cursor: not-allowed; } .node_i { color: orange; font-size: 18px; } .node_i { color: orange; font-size: 18px; } .el-select-dropdown__item { display: flex; align-items: center; justify-content: space-between; } .el-select-dropdown__item { display: flex; align-items: center; justify-content: space-between; } </style> src/views/business/inspectionOrder/fiberoptic-config-readonly.vue
@@ -2,67 +2,128 @@ <div class="ins_order_config"> <div> <el-row class="title"> <el-col :span="6" style="padding-left: 20px;text-align: left;">å 纤é ç½®</el-col> <el-col :span="18" style="text-align: right;"> <!-- <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">ä¿ å</el-button> --> <el-col :span="6" style="padding-left: 20px; text-align: left" >å 纤é ç½®</el-col > <el-col :span="18" style="text-align: right"> <el-button size="medium" @click="outConfig"> <span style="color: #3A7BFA;">è¿ å</span> <span style="color: #3a7bfa">è¿ å</span> </el-button> </el-col> </el-row> </div> <div class="center"> <el-row :gutter="10" style="margin-bottom: 10px;"> <el-row :gutter="10" style="margin-bottom: 10px"> <el-col :span="9"> <div class="grid-content"> <h5>å¥ç®¡</h5> <div style="display: flex;align-items: center;justify-content: space-between;padding: 0 12px;box-sizing: border-box;"> style=" display: flex; align-items: center; justify-content: space-between; padding: 0 12px; box-sizing: border-box; " > <div class="search-item"> <label style="width: 70px;">æ ·ååå·</label> <span class="models" :title="models">{{models}}</span> <label style="width: 70px">æ ·ååå·</label> <span class="models" :title="models">{{ models }}</span> </div> <el-radio-group v-model="packageInfo.radio" size="small" @change="isInspection()" :disabled="active!=1"> <el-radio-group v-model="packageInfo.radio" size="small" @change="isInspection()" :disabled="active != 1" > <el-radio :label="0">å ¨æ£</el-radio> <el-radio :label="1">æ½æ£</el-radio> </el-radio-group> </div> <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 8px;padding: 0 12px;box-sizing: border-box;"> <div class="search-item" style="margin-right: 10px;"> style=" display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 12px; box-sizing: border-box; " > <div class="search-item" style="margin-right: 10px"> <label>å¥ç®¡æ°ç®</label> <el-input v-model="packageInfo.num1" placeholder="请è¾å ¥" size="small" @blur="addBushing" :disabled="active!=1"></el-input> <el-input v-model="packageInfo.num1" placeholder="请è¾å ¥" size="small" @blur="addBushing" :disabled="active != 1" ></el-input> </div> <div class="search-item" style="margin-right: 10px;"> <div class="search-item" style="margin-right: 10px"> <label style="width: 100px">æ¯æ ¹ç®¡æ½æ£æ åé</label> <el-input v-model="packageInfo.standNum" placeholder="请è¾å ¥" size="small" @blur="addStandNum" :disabled="active!=1" style="width:70px"></el-input> <el-input v-model="packageInfo.standNum" placeholder="请è¾å ¥" size="small" @blur="addStandNum" :disabled="active != 1" style="width: 70px" ></el-input> </div> <div class="search-item"> <label style="width: 100px">æ¯æ ¹ç®¡æ½æ£æ£æµé</label> <el-input v-model="packageInfo.testNum" placeholder="请è¾å ¥" size="small" @blur="addTestNum" style="width:70px" :disabled="packageInfo.radio===0||active!=1"></el-input> <el-input v-model="packageInfo.testNum" placeholder="请è¾å ¥" size="small" @blur="addTestNum" style="width: 70px" :disabled="packageInfo.radio === 0 || active != 1" ></el-input> </div> </div> <el-table ref="table0" :data="bushing" tooltip-effect="dark" style="width: 100%" height="203px" size="small" <el-table ref="table0" :data="bushing" tooltip-effect="dark" style="width: 100%" height="203px" size="small" @selection-change="handleSelectionChange1" :header-cell-class-name="setClassName0"> <!-- <el-table-column type="selection" width="45" :selectable="()=>(active==1)"> </el-table-column> --> :header-cell-class-name="setClassName0" > <el-table-column label="ç®¡è²æ " show-overflow-tooltip> <template slot-scope="scope"> <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable > <el-option v-for="(color,i) in colors" :key="i" :label="color.lable" :value="color.value"></el-option> <el-select v-model="scope.row.color" size="mini" :disabled="active != 1" allow-create filterable > <el-option v-for="(color, i) in colors" :key="i" :label="color.dictLable" :value="color.dictValue" ></el-option> </el-select> </template> </el-table-column> <el-table-column prop="standNum" label="æ é" show-overflow-tooltip align="center"> <el-table-column prop="standNum" label="æ é" show-overflow-tooltip align="center" > </el-table-column> <el-table-column prop="testNum" label="æµè¯é" show-overflow-tooltip align="center"> <el-table-column prop="testNum" label="æµè¯é" show-overflow-tooltip align="center" > </el-table-column> </el-table> </div> @@ -70,37 +131,83 @@ <el-col :span="15"> <div class="grid-content"> <h5>æ£æµé¡¹ä¿¡æ¯</h5> <el-table ref="productTable" :data="detectionItems" tooltip-effect="dark" style="width: 100%" :row-class-name="tableRowClassName" :header-cell-class-name="setClassName" height="283px" size="small" @selection-change="handleSelectionChange2" <el-table ref="productTable" :data="detectionItems" tooltip-effect="dark" style="width: 100%" :row-class-name="tableRowClassName" :header-cell-class-name="setClassName" height="283px" size="small" @selection-change="handleSelectionChange2" @select-all="handleAll" @select="upProductSelect" > <el-table-column label="å®éªå®¤" show-overflow-tooltip prop="sonLaboratory" ></el-table-column> <el-table-column prop="inspectionItem" label="æ£éªé¡¹" show-overflow-tooltip > <!-- <el-table-column type="selection" width="55" :selectable="()=>((currentDetectionItems||this.selectFiberList.length > 0 || this.multiFiberList.length > 0)&&active==1)"> </el-table-column> --> <el-table-column label="å®éªå®¤" show-overflow-tooltip prop="sonLaboratory" ></el-table-column> <el-table-column prop="inspectionItem" label="æ£éªé¡¹" show-overflow-tooltip> </el-table-column> <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹å项" show-overflow-tooltip width="100px"> <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹å项" show-overflow-tooltip width="100px" > </el-table-column> <el-table-column prop="methodS" label="è¯éªæ¹æ³" min-width="90" show-overflow-tooltip> <el-table-column prop="methodS" label="è¯éªæ¹æ³" min-width="90" show-overflow-tooltip > </el-table-column> <el-table-column prop="price" label="åä»·" width="70" show-overflow-tooltip> <el-table-column prop="price" label="åä»·" width="70" show-overflow-tooltip > </el-table-column> <el-table-column prop="unit" label="åä½" width="70" show-overflow-tooltip> <el-table-column prop="unit" label="åä½" width="70" show-overflow-tooltip > </el-table-column> <!-- <el-table-column prop="manDay" label="é¢è®¡æ¶é´" width="90" show-overflow-tooltip> </el-table-column> --> <el-table-column prop="ask" label="æ£æµè¦æ±" show-overflow-tooltip width="200px"> <el-table-column prop="ask" label="æ£æµè¦æ±" show-overflow-tooltip width="200px" > <template slot-scope="scope"> <el-input v-model="scope.row.ask" placeholder="请è¾å ¥" size="small" :disabled="active!=1" v-if="!isAskOnlyRead"></el-input> <el-input v-model="scope.row.ask" placeholder="请è¾å ¥" size="small" :disabled="active != 1" v-if="!isAskOnlyRead" ></el-input> <span v-else>{{ scope.row.ask }}</span> </template> </el-table-column> <el-table-column prop="tell" label="è¦æ±æè¿°" show-overflow-tooltip width="150"> <el-table-column prop="tell" label="è¦æ±æè¿°" show-overflow-tooltip width="150" > </el-table-column> </el-table> </div> @@ -109,240 +216,365 @@ <el-row :gutter="10"> <el-col :span="12" v-if="packageInfo.ismiers"> <div class="grid-content"> <h5>å 纤带 <el-button size="mini" type="primary" class="btns" @click="addFibers" v-if="active==1">çæå 纤带</el-button> <!-- <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0" v-if="active==1">æ¸ é¤</el-button> --> <h5> å 纤带 <el-button size="mini" type="primary" class="btns" @click="addFibers" v-if="active == 1" >çæå 纤带</el-button > </h5> <div style="display: flex;align-items: center;justify-content: space-between;margin:4px 0 6px 0;padding: 0 12px;box-sizing: border-box;"> <!-- <div class="search-item" style="width: 50%;margin-right: 16px;"> <label style="width: 80px;">纤带类å</label> <el-select v-model="miresModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="selectBushing.length===0||active!=1" style=" display: flex; align-items: center; justify-content: space-between; margin: 4px 0 6px 0; padding: 0 12px; box-sizing: border-box; " > <div class="search-item" style="width: 50%; margin-right: 16px"> <label style="width: 80px">纤带类å</label> <el-select v-model="miresModel" placeholder="è¯·éæ©" size="small" style="width: 100%" :disabled="selectBushing.length === 0 || active != 1" > <el-option v-for="(item, a) in miresModels" :key="a" :label="item.label" :value="item.value" > <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value"> </el-option> </el-select> </div> --> <!-- <div class="search-item" style="width: 50%;"> <label style="width: 80px;">åèæ å</label> <el-select v-model="miresStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="miresModel===null||active!=1" @focus="selectsStandardMethodByFLSSM2()" @change="(value)=>methodChange2(value)"> <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id"> </el-option> </el-select> </div> --> <div class="search-item" style="width: 50%;margin-right: 16px;"> <label style="width: 80px;">纤带类å</label> <el-select v-model="miresModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="selectBushing.length===0||active!=1" > <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value"> </el-option> </el-select> </div> <div class="search-item" style="width: 50%;"> <label style="width: 80px;">åèæ å</label> <el-select v-model="miresStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="miresModel===null||active!=1" @focus="selectsStandardMethodByFLSSM2()" @change="(value)=>methodChange2(value)"> <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id"> <div class="search-item" style="width: 50%"> <label style="width: 80px">åèæ å</label> <el-select v-model="miresStandard" placeholder="è¯·éæ©" size="small" style="width: 100%" :disabled="miresModel === null || active != 1" @focus="selectsStandardMethodByFLSSM2()" @change="(value) => methodChange2(value)" > <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id" > </el-option> </el-select> </div> </div> <el-table ref="table2" :data="fibersList" tooltip-effect="dark" style="width: 100%" height="270px" size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="(row, column, event)=>rowClickFiber(row, column, event,1)" :header-cell-class-name="setClassName0"> <!-- <el-table-column type="selection" width="55" :selectable="()=>(active==1)"> </el-table-column> --> <el-table-column prop="color" label="管å¥è²æ " width="90" align="center"> <el-table ref="table2" :data="fibersList" tooltip-effect="dark" style="width: 100%" height="270px" size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click=" (row, column, event) => rowClickFiber(row, column, event, 1) " :header-cell-class-name="setClassName0" > <el-table-column prop="color" label="管å¥è²æ " width="90" align="center" > </el-table-column> <el-table-column prop="code" label="å 纤带ç¼å·" show-overflow-tooltip align="center"> <!-- <template slot-scope="scope"> <el-input v-model="scope.row.code" placeholder="请è¾å ¥" size="mini" ></el-input> </template> --> <el-table-column prop="code" label="å 纤带ç¼å·" show-overflow-tooltip align="center" > </el-table-column> <el-table-column prop="model" label="å çº¤å¸¦è§æ ¼" show-overflow-tooltip align="center"> <!-- <template slot-scope="scope"> <el-input v-model="scope.row.model" placeholder="请è¾å ¥" size="mini" ></el-input> </template> --> <el-table-column prop="model" label="å çº¤å¸¦è§æ ¼" show-overflow-tooltip align="center" > </el-table-column> <el-table-column prop="standard" label="åèæ å" show-overflow-tooltip align="center"> <!-- <template slot-scope="scope"> <el-input v-model="scope.row.standard" placeholder="请è¾å ¥" size="mini" ></el-input> </template> --> <el-table-column prop="standard" label="åèæ å" show-overflow-tooltip align="center" > </el-table-column> <el-table-column prop="num" label="å çº¤æ£æµé" show-overflow-tooltip align="center"> <!-- <template slot-scope="scope"> <el-input v-model="scope.row.num" placeholder="请è¾å ¥" size="mini" ></el-input> </template> --> <el-table-column prop="num" label="å çº¤æ£æµé" show-overflow-tooltip align="center" > </el-table-column> </el-table> </div> </el-col> <el-col :span="!packageInfo.ismiers?24:12"> <el-col :span="!packageInfo.ismiers ? 24 : 12"> <div class="grid-content"> <h5>å 纤 <el-button size="mini" type="primary" class="btns" @click="addFiber" v-if="active==1">å 纤é è²</el-button> </h5> <h5> å 纤 <el-button size="mini" type="primary" class="btns" @click="addFiber" v-if="active == 1" >å 纤é è²</el-button > </h5> <div style="display: flex;align-items: center;justify-content: space-between;margin: 4px 0 6px 0;padding: 0 12px;box-sizing: border-box;"> <!-- <div class="search-item" style="width: 50%;margin-right: 16px;"> <label style="width: 80px;">å 纤类å</label> <el-select v-model="mireModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="selectBushing.length===0||active!=1"> <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value"> style=" display: flex; align-items: center; justify-content: space-between; margin: 4px 0 6px 0; padding: 0 12px; box-sizing: border-box; " > <div class="search-item" style="width: 50%; margin-right: 16px"> <label style="width: 80px">å 纤类å</label> <el-select v-model="mireModel" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="(item, a) in mireModels" :key="a" :label="item.label" :value="item.value" > </el-option> </el-select> </div> <div class="search-item" style="width: 50%;"> <label style="width: 80px;">åèæ å</label> <el-select v-model="mireStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="mireModel===null||active!=1" @focus="selectsStandardMethodByFLSSM()" @change="(value)=>methodChange(value)" :loading="mireStandardLoading"> <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id"> </el-option> </el-select> </div> --> <div class="search-item" style="width: 50%;margin-right: 16px;"> <label style="width: 80px;">å 纤类å</label> <el-select v-model="mireModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" > <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value"> </el-option> </el-select> </div> <div class="search-item" style="width: 50%;"> <label style="width: 80px;">åèæ å</label> <el-select v-model="mireStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="mireModel===null||active!=1" @focus="selectsStandardMethodByFLSSM()" @change="(value)=>methodChange(value)" :loading="mireStandardLoading"> <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id"> <div class="search-item" style="width: 50%"> <label style="width: 80px">åèæ å</label> <el-select v-model="mireStandard" placeholder="è¯·éæ©" size="small" style="width: 100%" :disabled="mireModel === null || active != 1" @focus="selectsStandardMethodByFLSSM()" @change="(value) => methodChange(value)" :loading="mireStandardLoading" > <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id" > </el-option> </el-select> </div> </div> <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px" size="small" highlight-current-row @selection-change="handleSelectionChange4" @row-click="(row, column, event)=>rowClickFiber(row, column, event,0)" :header-cell-class-name="setClassName0"> <!-- <el-table-column type="selection" width="55" :selectable="()=>(active==1)"> </el-table-column> --> <el-table-column prop="bushColor" label="管å¥è²æ " width="90" align="center"> <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px" size="small" highlight-current-row @selection-change="handleSelectionChange4" @row-click=" (row, column, event) => rowClickFiber(row, column, event, 0) " :header-cell-class-name="setClassName0" > <el-table-column prop="bushColor" label="管å¥è²æ " width="90" align="center" > </el-table-column> <el-table-column prop="color" label="å çº¤è²æ " width="120"> <!-- <template slot-scope="scope"> <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable > <el-option v-for="(color,i) in colors" :key="i" :label="color.lable" :value="color.value"></el-option> </el-select> </template> --> </el-table-column> <el-table-column prop="model" label="å çº¤è§æ ¼" show-overflow-tooltip align="center"> <el-table-column prop="model" label="å çº¤è§æ ¼" show-overflow-tooltip align="center" > </el-table-column> <el-table-column prop="standard" label="åèæ å" show-overflow-tooltip align="center"> <el-table-column prop="standard" label="åèæ å" show-overflow-tooltip align="center" > </el-table-column> </el-table> </div> </el-col> </el-row> </div> <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose"> <div class="body" style="max-height: 60vh;"> <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose" > <div class="body" style="max-height: 60vh"> <el-row v-if="bsm1"> <el-col class="search_thing" :span="22"> <div class="search_label"><span class="required-span">* </span>æ¤å¥å¯åº¦ï¼</div> <div class="search_label"> <span class="required-span">* </span>æ¤å¥å¯åº¦ï¼ </div> <div class="search_input"> <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a"></el-radio> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" ></el-radio> </el-radio-group> </div> </el-col> <el-col class="search_thing" :span="22"> <div class="search_label">è¦æ±å¼ï¼</div> <div class="search_input" v-show="bsm1Val!==null&&bsm1Val!==''"> <div class="search_input" v-show="bsm1Val !== null && bsm1Val !== ''" > <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a">{{JSON.parse(bsmRow.ask)[ai]}}</el-radio> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" >{{ JSON.parse(bsmRow.ask)[ai] }}</el-radio > </el-radio-group> </div> </el-col> <el-col class="search_thing" :span="22"> <div class="search_label">åä»·ï¼</div> <div class="search_input" v-show="bsm1Val!==null&&bsm1Val!==''"> <div class="search_input" v-show="bsm1Val !== null && bsm1Val !== ''" > <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a">{{JSON.parse(bsmRow.price)[ai]}}</el-radio> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" >{{ JSON.parse(bsmRow.price)[ai] }}</el-radio > </el-radio-group> </div> </el-col> </el-row> <el-row v-if="bsm2"> <el-col class="search_thing" :span="22"> <div class="search_label" style="width: 220px;"><span class="required-span">* </span>æ ·åçæ¥é 对æ°éï¼</div> <div class="search_label" style="width: 220px"> <span class="required-span">* </span>æ ·åçæ¥é 对æ°éï¼ </div> <div class="search_input"> <el-input-number size="medium" v-model="bsm2Val" :min="1" :max="bsm2Val3.length" :precision="0" style="width: 70%;" :controls="false" @change="bsm2Up"></el-input-number> <span>MAXï¼{{bsm2Val3.length}}</span> <el-input-number size="medium" v-model="bsm2Val" :min="1" :max="bsm2Val3.length" :precision="0" style="width: 70%" :controls="false" @change="bsm2Up" ></el-input-number> <span>MAXï¼{{ bsm2Val3.length }}</span> </div> </el-col> <el-col style="margin-top: 6px;"> <el-col v-for="(a,ai) in bsm2Val2" :key="ai"> <el-col style="margin-top: 6px"> <el-col v-for="(a, ai) in bsm2Val2" :key="ai"> <el-col :span="10"> <el-select v-model="a[0]" placeholder="è¯·éæ©" size="small" style="width: 100%;"> <el-select v-model="a[0]" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="(item,index) in sampleList" v-for="(item, index) in sampleList" :key="index" :label="index+1" :value="index+1"> :label="index + 1" :value="index + 1" > </el-option> </el-select> </el-col> <!-- <el-col :span="10" class="pairing">{{a[0]}}</el-col> --> <el-col :span="4" class="pairing" style="border: 0;color: rgba(0, 0, 0, 0.2);">ââ</el-col> <el-col :span="4" class="pairing" style="border: 0; color: rgba(0, 0, 0, 0.2)" >ââ</el-col > <el-col :span="10"> <el-select v-model="a[1]" placeholder="è¯·éæ©" size="small" style="width: 100%;"> <el-select v-model="a[1]" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="(item,index) in sampleList" v-for="(item, index) in sampleList" :key="index" :label="index+1" :value="index+1"> :label="index + 1" :value="index + 1" > </el-option> </el-select> </el-col> <!-- <el-col :span="10" class="pairing">{{a[1]}}</el-col> --> </el-col> </el-col> </el-row> <!-- <el-row v-if="bsm3"> <el-col class="search_thing" :span="22" style="display: flex;align-items: center;"> <div class="search_label"><span class="required-span">* </span>RTSï¼</div> <div class="search_input"> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="bsm3Val"></el-input> </div> </el-col> </el-row> --> </div> </el-dialog> <el-dialog title="RTSå¡«å" :visible.sync="bsm3Dia" width="500px" :show-close="false" :before-close="beforeClose0"> <el-dialog title="RTSå¡«å" :visible.sync="bsm3Dia" width="500px" :show-close="false" :before-close="beforeClose0" > <el-row> <el-col class="search_thing" :span="22" style="display: flex;align-items: center;"> <div class="search_label"><span class="required-span">* </span>RTSï¼</div> <el-col class="search_thing" :span="22" style="display: flex; align-items: center" > <div class="search_label"> <span class="required-span">* </span>RTSï¼ </div> <div class="search_input"> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="bsm3Val"></el-input> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="bsm3Val" ></el-input> </div> </el-col> </el-row> @@ -351,744 +583,644 @@ </template> <script> import { set } from 'vue' export default { props: { active: { type: Number, default: () => 0 }, import { getDicts } from "@/api/system/dict/data"; import { getStandTreeBySampleType, selectStandardTreeList2, selectStandardMethodEnum, selectsStandardMethodByFLSSM, selectStandardProductList, } from "@/api/standard/standardLibrary"; export default { props: { active: { type: Number, default: () => 0, }, data() { return { detectionType: null, detectionSelect: [], selectFiberList: [], type:1, saveLoad: false, packageInfo: { radio: 1, num1: null, }, data() { return { detectionType: null, detectionSelect: [], selectFiberList: [], type: 1, saveLoad: false, packageInfo: { radio: 1, num1: null, standNum: null, testNum: null, ismiers: false, }, tableData: [], tape: { value: "", }, options: [], sample: [], models: "", colors: [], wires: [], bushing: [], mireModels: [], mireModel: null, mireStandard: [], mireStandards: null, miresModels: [], miresModel: null, miresStandard: [], miresStandards: null, selectBushing: [], productList: [], productList2: [], fiberList: [], fibersList: [], selectFibers: [], detectionItems: [], currentDetectionItems: null, mireStandardLoading: false, multiFiberList: [], isAskOnlyRead: true, bsm1Dia: false, bsmRow: null, bsm1: false, bsm1Val: null, bsm2: false, bsm2Val: null, bsm2Dia: false, bsm2Val2: [], bsm2Val3: [], sampleIds: [], bsm3Val: null, bsmRow3: null, bsm3Dia: false, sorted: false, }; }, computed: { isAllDisabled() { return ( this.multiFiberList.length > 0 || this.currentDetectionItems || this.active != 1 ); }, }, watch: {}, mounted() { this.$parent.sampleIds.forEach((a) => { for (var i = 0; i < this.$parent.sampleList.length; i++) { if (this.$parent.sampleList[i].id == a) { this.sample.push(this.$parent.sampleList[i]); this.models += "," + this.$parent.sampleList[i].model; break; } } }); console.log(111, this.sample); this.models = this.models.replace(",", ""); this.packageInfo.ismiers = this.models .split(",") .every( (e) => (e.indexOf("d") > -1 || e.indexOf("D") > -1) && !e.includes("ADSS") ); if ( this.sample[0].bushing === undefined || this.sample[0].bushing === null ) { this.bushing = []; } else { this.bushing = this.HaveJson(this.sample[0].bushing); this.packageInfo.num1 = this.sample[0].bushing.length; this.packageInfo.standNum = this.sample[0].bushing[0].standNum; this.packageInfo.testNum = this.sample[0].bushing[0].testNum; this.bushing.forEach((a) => { if (a.fibers == null || a.fibers.length == 0) a.fibers = []; if (a.fiber == null || a.fiber.length == 0) a.fiber = []; // 夿æ¯å¦å«æå 纤带 if (this.packageInfo.ismiers) { // this.fibersList = [] // æ°å¢ // this.fiberList = [] // æ°å¢ if (a.fibers.length > 0) { a.fibers.sort((a, b) => a.id - b.id); a.fibers.forEach((b) => { this.$set(b, "color", a.color); // å 纤带 this.fibersList.push(b); // å 纤 b.fiber.forEach((c) => { this.fiberList.push(c); }); }); } else { a.fiber.forEach((b) => { this.fiberList.push(b); }); } } else { // this.fiberList = [] a.fiber.forEach((b) => { this.fiberList.push(b); }); } }); } this.getTypeDicts1(); this.getStandTreeBySampleType(); this.getStandTreeBySampleType2(); this.selectsStandardMethodByFLSSM2(); }, methods: { handleSelectionChange(val) { // this.selectFibers = val this.multiFiberList = val; }, handleSelectionChange1(val) { this.selectBushing = val; }, handleSelectionChange2(val) { this.detectionSelect = val; // èµå¼æ£æµé¡¹ä¿¡æ¯ å 纤带 if (this.detectionItems.type == 1) { this.multiFiberList.forEach((item) => { this.fibersList.forEach((a) => { if (a.ident == item.ident) { a.productList = []; this.fibersList.find((a) => a.ident == item.ident).productList = this.detectionSelect; } }); }); } if (this.detectionItems.type == 0) { // èµå¼æ£æµé¡¹ä¿¡æ¯ å 纤 console.log("000", this.selectFiberList); this.selectFiberList.forEach((item) => { this.fiberList.forEach((a) => { if (a.ident == item.ident) { a.productList = []; this.fiberList.find((a) => a.ident == item.ident).productList = this.detectionSelect; } }); }); } }, handleSelectionChange4(val) { this.selectFiberList = val; }, outConfig() { this.$parent.configShow = false; }, getTypeDicts1() { getDicts("fiber_color_type") .then((res) => { if (res.code === 200) { this.colors = res.data; } }) .catch((error) => { console.error(error); }); }, // å¥ç®¡æ°ç®çæè¡¨æ ¼æ°æ® addBushing() { this.bushing = []; for (let i = 0; i < this.packageInfo.num1; i++) { let bushing = { ident: this.bushing.length + 1, color: this.colors[i].dictLabel, standNum: null, testNum: null, ismiers: false }, tableData: [], tape: { value: '' }, options: [], sample: [], models: '', colors: [], wires: [], bushing: [], mireModels: [], mireModel: null, mireStandard: [], mireStandards: null, miresModels: [], miresModel: null, miresStandard: [], miresStandards: null, selectBushing: [], productList: [], productList2: [], fiberList: [], fibersList: [], selectFibers: [], detectionItems: [], currentDetectionItems:null, mireStandardLoading:false, multiFiberList:[], isAskOnlyRead:true, bsm1Dia: false, bsmRow: null, bsm1: false, bsm1Val: null, bsm2: false, bsm2Val: null, bsm2Dia: false, bsm2Val2: [], bsm2Val3: [], sampleIds:[], bsm3Val: null, bsmRow3: null, bsm3Dia: false, sorted: false fibers: [], fiber: [], }; this.bushing.push(bushing); } }, computed: { isAllDisabled() { return this.multiFiberList.length > 0||this.currentDetectionItems||this.active!=1 }, }, watch: { // mireModel(val1,val0) { // if(val1!=val0){ // this.mireStandards = [] // this.fiberList = [] // this.multiFiberList = [] // this.detectionItems = [] // this.currentDetectionItems = null; // } // }, // mireStandard(val1,val0) { // if(val1!=val0){ // this.fiberList = [] // this.multiFiberList = [] // this.detectionItems = [] // this.currentDetectionItems = null; // } // } }, mounted() { this.$parent.sampleIds.forEach(a => { for (var i = 0; i < this.$parent.sampleList.length; i++) { if (this.$parent.sampleList[i].id == a) { this.sample.push(this.$parent.sampleList[i]) this.models += (',' + this.$parent.sampleList[i].model) break } } }) console.log(111, this.sample); this.models = this.models.replace(',', '') this.packageInfo.ismiers = this.models.split(',').every(e=>(e.indexOf('d')>-1||e.indexOf('D')>-1)&&!e.includes('ADSS')) if(this.sample[0].bushing === undefined || this.sample[0].bushing === null){ this.bushing = [] }else{ this.bushing = this.HaveJson(this.sample[0].bushing) this.packageInfo.num1 = this.sample[0].bushing.length this.packageInfo.standNum = this.sample[0].bushing[0].standNum this.packageInfo.testNum = this.sample[0].bushing[0].testNum this.bushing.forEach(a=>{ if(a.fibers==null || a.fibers.length ==0)a.fibers=[] if(a.fiber==null || a.fiber.length == 0)a.fiber=[] // 夿æ¯å¦å«æå 纤带 if(this.packageInfo.ismiers){ // this.fibersList = [] // æ°å¢ // this.fiberList = [] // æ°å¢ if(a.fibers.length>0){ a.fibers.sort((a,b)=>a.id-b.id) a.fibers.forEach(b=>{ this.$set(b,'color',a.color) // å 纤带 this.fibersList.push(b) // å 纤 b.fiber.forEach(c=>{ this.fiberList.push(c) }) }) } else { a.fiber.forEach(b=>{ this.fiberList.push(b) }) // å¥ç®¡æ åéèµå¼ addStandNum() { if (this.selectBushing.length > 0) { this.bushing.forEach((item) => { this.selectBushing.forEach((a) => { if (item.ident == a.ident) { item.standNum = this.packageInfo.standNum; } }else{ // this.fiberList = [] a.fiber.forEach(b=>{ this.fiberList.push(b) }) } }) }); }); } this.getTypeDicts1() this.getStandTreeBySampleType() this.getStandTreeBySampleType2() this.selectsStandardMethodByFLSSM2() }, methods: { handleSelectionChange(val) { // this.selectFibers = val this.multiFiberList = val }, handleSelectionChange1(val) { this.selectBushing = val }, handleSelectionChange2(val){ this.detectionSelect = val // èµå¼æ£æµé¡¹ä¿¡æ¯ å 纤带 if(this.detectionItems.type == 1) { this.multiFiberList.forEach(item => { this.fibersList.forEach(a => { if(a.ident == item.ident){ a.productList = [] this.fibersList.find(a => a.ident == item.ident).productList = this.detectionSelect } }) }) // å¥ç®¡æ£æµéèµå¼ addTestNum() { if (this.selectBushing.length > 0) { this.bushing.forEach((item) => { this.selectBushing.forEach((a) => { if (item.ident == a.ident) { item.testNum = this.packageInfo.testNum; } }); }); } if(this.detectionItems.type == 0) { // èµå¼æ£æµé¡¹ä¿¡æ¯ å 纤 console.log('000',this.selectFiberList); this.selectFiberList.forEach(item => { this.fiberList.forEach(a => { if(a.ident == item.ident){ a.productList = [] this.fiberList.find(a => a.ident == item.ident).productList = this.detectionSelect } }) }) } }, handleSelectionChange4(val){ this.selectFiberList = val }, outConfig() { this.$parent.configShow = false }, getTypeDicts1() { this.$axios.post(this.$api.enums.selectEnumByCategory, { category: "è²æ " }).then(res => { this.colors = res.data }) }, // å¥ç®¡æ°ç®çæè¡¨æ ¼æ°æ® addBushing() { this.bushing = [] for(let i = 0; i < this.packageInfo.num1; i++){ let bushing = { ident: this.bushing.length + 1, color: this.colors[i].label, standNum: null, testNum: null, fibers: [], fiber: [] } this.bushing.push(bushing) } }, // å¥ç®¡æ åéèµå¼ addStandNum() { if(this.selectBushing.length > 0) { this.bushing.forEach(item => { this.selectBushing.forEach(a => { if(item.ident == a.ident) { item.standNum = this.packageInfo.standNum } }) }) } }, // å¥ç®¡æ£æµéèµå¼ addTestNum() { if(this.selectBushing.length > 0) { this.bushing.forEach(item => { this.selectBushing.forEach(a => { if(item.ident == a.ident) { item.testNum = this.packageInfo.testNum } }) }) } }, isInspection() { this.fiberList = [] this.fibersList = [] this.detectionItems = [] }, isInspection() { this.fiberList = []; this.fibersList = []; this.detectionItems = []; // 页颿¯å¦å«æå 纤带 if(this.packageInfo.ismiers) { // å ¨æ£ if (this.packageInfo.radio == 0) { // 页颿¯å¦å«æå 纤带 if (this.packageInfo.ismiers) { // å ¨æ£ if (this.packageInfo.radio == 0) { // æ ¹æ®æ åéèµå¼æ£æµé if(parseInt(this.packageInfo.standNum) > 0 ) { if (parseInt(this.packageInfo.standNum) > 0) { // ç»å 纤带èµå¼ this.packageInfo.testNum = this.packageInfo.standNum this.selectBushing = this.bushing this.addFibers() this.multiFiberList = this.fibersList this.packageInfo.testNum = this.packageInfo.standNum; this.selectBushing = this.bushing; this.addFibers(); this.multiFiberList = this.fibersList; // é»è®¤å¾é setTimeout(() => { this.selectBushing.forEach(item =>{ let rowToSelect = this.bushing.find(a => a.ident == item.ident) this.$refs.table0.toggleRowSelection(rowToSelect, true) }) this.selectBushing.forEach((item) => { let rowToSelect = this.bushing.find( (a) => a.ident == item.ident ); this.$refs.table0.toggleRowSelection(rowToSelect, true); }); this.multiFiberList.forEach(item =>{ let rowToSelect = this.fibersList.find(a => a.ident == item.ident) this.$refs.table2.toggleRowSelection(rowToSelect, true) }) }, 200) this.multiFiberList.forEach((item) => { let rowToSelect = this.fibersList.find( (a) => a.ident == item.ident ); this.$refs.table2.toggleRowSelection(rowToSelect, true); }); }, 200); } } } else { if (this.packageInfo.radio == 0) { if (parseInt(this.packageInfo.standNum) > 0) { this.packageInfo.testNum = this.packageInfo.standNum; this.selectBushing = this.bushing; this.addFiber(); // é»è®¤å¾é setTimeout(() => { this.selectBushing.forEach((item) => { let rowToSelect = this.bushing.find( (a) => a.ident == item.ident ); this.$refs.table0.toggleRowSelection(rowToSelect, true); }); }, 200); } } } }else { if(this.packageInfo.radio == 0) { if(parseInt(this.packageInfo.standNum) > 0 ) { this.packageInfo.testNum = this.packageInfo.standNum this.selectBushing = this.bushing this.addFiber() // é»è®¤å¾é setTimeout(() => { this.selectBushing.forEach(item =>{ let rowToSelect = this.bushing.find(a => a.ident == item.ident) this.$refs.table0.toggleRowSelection(rowToSelect, true) }) }, 200) } }, upNum() { this.fiberList = []; this.fibersList = []; this.detectionItems = []; if (this.packageInfo.radio === 0) { this.packageInfo.testNum = this.packageInfo.standNum; } if ( parseInt(this.packageInfo.standNum) < parseInt(this.packageInfo.testNum) ) { this.packageInfo.testNum = this.packageInfo.standNum; } if ( this.packageInfo.num1 !== null && this.packageInfo.num1 !== "" && this.packageInfo.standNum !== null && this.packageInfo.standNum !== "" && this.packageInfo.testNum != null && this.packageInfo.testNum !== "" ) { let colors2 = []; if (this.packageInfo.num1 / this.colors.length > 1) { let num = this.packageInfo.num1 / this.colors.length; if (this.packageInfo.num1 % this.colors.length > 0) num += 1; for (var i = 0; i < num; i++) { colors2 = colors2.concat(this.colors); } } else { colors2 = colors2.concat(this.colors); } }, upNum() { this.fiberList = [] this.fibersList = [] this.detectionItems = [] if (this.packageInfo.radio === 0) { this.packageInfo.testNum = this.packageInfo.standNum this.bushing = []; for (var i = 0; i < this.packageInfo.num1; i++) { let bushing = { color: colors2[i].dictLabel, standNum: this.packageInfo.standNum, testNum: this.packageInfo.testNum, fibers: [], fiber: [], }; this.bushing.push(bushing); } if (parseInt(this.packageInfo.standNum) < parseInt(this.packageInfo.testNum)) { this.packageInfo.testNum = this.packageInfo.standNum } if (this.packageInfo.num1 !== null && this.packageInfo.num1 !== '' && this.packageInfo.standNum !== null && this.packageInfo.standNum !== '' && this.packageInfo.testNum != null && this.packageInfo.testNum !== '') { let colors2 = [] if (this.packageInfo.num1 / this.colors.length > 1) { let num = this.packageInfo.num1 / this.colors.length if (this.packageInfo.num1 % this.colors.length > 0) num += 1 for (var i = 0; i < num; i++) { colors2 = colors2.concat(this.colors) } } else { colors2 = colors2.concat(this.colors) } this.bushing = [] for (var i = 0; i < this.packageInfo.num1; i++) { let bushing = { color: colors2[i].label, standNum: this.packageInfo.standNum, testNum: this.packageInfo.testNum, fibers: [], fiber: [] } this.bushing.push(bushing) } // ç»å 纤带èµå¼ if(this.selectBushing.length===0){ this.selectBushing = this.bushing // ç»å 纤带èµå¼ if (this.selectBushing.length === 0) { this.selectBushing = this.bushing; } // this.miresModels 纤带类å // this.miresStandards åèæ å this.fibersList = [] this.packageInfo.ismiers = true this.fiberList = [] this.selectBushing.forEach(a => { a.fiber = [] a.fibers = [] for(let j = 0; j < parseInt(a.testNum); j++){ let fibers = { id: this.fibersList.length + 1, code: null, color: a.color, model: null, standard: null, num: a.testNum, productList: this.HaveJson(this.productList2), fiber: [] } a.fibers.push(fibers) this.fibersList.push(fibers) } }) this.fibersList = []; this.packageInfo.ismiers = true; this.fiberList = []; this.selectBushing.forEach((a) => { a.fiber = []; a.fibers = []; for (let j = 0; j < parseInt(a.testNum); j++) { let fibers = { id: this.fibersList.length + 1, code: null, color: a.color, model: null, standard: null, num: a.testNum, productList: this.HaveJson(this.productList2), fiber: [], }; a.fibers.push(fibers); this.fibersList.push(fibers); } }); } else { this.bushing = [] } }, getStandTreeBySampleType() { this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, { laboratory: 'é信产åå®éªå®¤', sampleType: 'å 纤' }).then(res => { this.mireModels = [] res.data.forEach(a => { this.mireModels.push({ label: a.model, value: a.sample + ' - ' + a.model }) }) }) }, getStandTreeBySampleType2() { this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, { laboratory: 'é信产åå®éªå®¤', sampleType: 'å 纤带' }).then(res => { this.miresModels = [] res.data.forEach(a => { this.miresModels.push({ label: a.model, value: a.model }) }) }) }, selectsStandardMethodByFLSSM() { this.mireStandards = [] this.mireStandardLoading = true this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { tree: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤 - ' + this.mireModel }).then(res => { this.mireStandardLoading = false this.mireStandards = res.data.standardMethodList }) }, selectsStandardMethodByFLSSM2() { this.miresStandards = [] this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { tree: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - ' + this.miresModel }).then(res => { this.miresStandards = res.data.standardMethodList }) }, methodChange(val) { // if (val === null || val === '') return // this.$axios.post(this.$api.standardTree.selectStandardProductList, { // model: this.mireModel.split(' - ')[1], // standardMethodListId: val, // factory: '' // }, { // headers: { // 'Content-Type': 'application/json' // } // }).then(res => { // res.data.forEach(a => { // a.state = 0 // }) // this.productList = res.data // setTimeout(() => { // this.productList.forEach(a => { // if (a.state == 1) this.toggleSelection(a) // }) // this.addFiber() // }, 200) // }) // å°ä¸ææ¡å¼èµå¼ç»å 纤 çå¬å»é¤ if(this.selectFiberList.length == 0) { this.$message.error('è¯·éæ©æ°æ®') return } this.selectFiberList.forEach(item => { this.fiberList.forEach(a => { if(a.ident == item.ident){ a.model = this.mireModel.split(' - ')[1] // å çº¤è§æ ¼ a.noSplitModel = this.mireModel // å çº¤è§æ ¼ if(this.mireStandards != null) { a.standard = this.mireStandards.find(a => a.id == this.mireStandard).code // åèæ å } } }) }) if (val === null || val === '') return if(this.mireStandards == null ) return this.$axios.post(this.$api.standardTree.selectStandardProductList, { model: this.mireModel.split(' - ')[1], standardMethodListId: val, factory: '' }, { headers: { 'Content-Type': 'application/json' } }).then(res => { this.detectionItems = [] if(res.data != null && res.data.length != 0){ res.data.forEach(a => { a.state = 0 }) this.detectionItems = res.data this.detectionType = 0 this.$set(this.detectionItems,'type',0) } }) }, methodChange2(val) { // if (val === null || val === '') return // this.$axios.post(this.$api.standardTree.selectStandardProductList, { // model: '', // standardMethodListId: val, // factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - ' + this.miresModel + ' - ', // }, { // headers: { // 'Content-Type': 'application/json' // } // }).then(res => { // res.data.forEach(a => { // a.state = 0 // }) // this.productList2 = res.data // setTimeout(() => { // this.productList2.forEach(a => { // if (a.state == 1) this.toggleSelection(a) // }) // this.addFibers() // }, 200) // }) if(this.multiFiberList.length == 0) { this.$message.error('è¯·éæ©éè¦æ´æ¹çæ°æ®') return } if (val === null || val === '') return this.$axios.post(this.$api.standardTree.selectStandardProductList, { model: '', standardMethodListId: val, factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - ' + this.miresModel + ' - ', }, { headers: { 'Content-Type': 'application/json' } }).then(res => { // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ this.detectionItems = [] if(res.data != null && res.data.length != 0){ res.data.forEach(a => { a.state = 0 }) this.detectionItems = res.data this.detectionType = 1 this.$set(this.detectionItems,'type',1) } // ç»éä¸çå 纤带èµå¼ for(let i= 0; i < this.fibersList.length; i++){ this.multiFiberList.forEach(item => { if(this.fibersList[i].ident == item.ident){ this.fibersList[i].model = this.miresModel // çº¤å¸¦è§æ ¼ this.fibersList[i].num = this.miresModel.replace('è¯','') // å çº¤æ£æµé this.fibersList[i].productList = this.detectionItems // æ£æµé¡¹ this.miresStandards.forEach(a => { if(a.id == this.miresStandard) { this.fibersList[i].standard = a.code // åèæ å } }) } }) } this.bushing = []; } }, getStandTreeBySampleType() { getStandTreeBySampleType({ laboratory: "é信产åå®éªå®¤", sampleType: "å 纤", }) }, addFiber() { // ææ° let colors2 = [] if (this.packageInfo.num1 / this.colors.length > 1) { let num = this.packageInfo.num1 / this.colors.length if (this.packageInfo.num1 % this.colors.length > 0) num += 1 for (var i = 0; i < num; i++) { colors2 = colors2.concat(this.colors) .then((res) => { if (res.code === 200) { this.mireModels = []; res.data.forEach((a) => { this.mireModels.push({ label: a.model, value: a.sample + " - " + a.model, }); }); } } else { colors2 = colors2.concat(this.colors) }) .catch((error) => { console.error(error); }); }, getStandTreeBySampleType2() { getStandTreeBySampleType({ laboratory: "é信产åå®éªå®¤", sampleType: "å 纤带", }) .then((res) => { if (res.code === 200) { this.miresModels = []; res.data.forEach((a) => { this.miresModels.push({ label: a.model, value: a.model, }); }); } }) .catch((error) => { console.error(error); }); }, selectsStandardMethodByFLSSM() { this.mireStandards = []; this.mireStandardLoading = true; selectsStandardMethodByFLSSM({ tree: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤 - " + this.mireModel, }) .then((res) => { if (res.code === 200) { this.mireStandardLoading = false; this.mireStandards = res.data.standardMethodList; } }) .catch((error) => { console.error(error); }); }, selectsStandardMethodByFLSSM2() { this.miresStandards = []; selectsStandardMethodByFLSSM({ tree: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel, }) .then((res) => { if (res.code === 200) { this.miresStandards = res.data.standardMethodList; } }) .catch((error) => { console.error(error); }); }, methodChange(val) { // å°ä¸ææ¡å¼èµå¼ç»å 纤 çå¬å»é¤ if (this.selectFiberList.length == 0) { this.$message.error("è¯·éæ©æ°æ®"); return; } this.selectFiberList.forEach((item) => { this.fiberList.forEach((a) => { if (a.ident == item.ident) { a.model = this.mireModel.split(" - ")[1]; // å çº¤è§æ ¼ a.noSplitModel = this.mireModel; // å çº¤è§æ ¼ if (this.mireStandards != null) { a.standard = this.mireStandards.find( (a) => a.id == this.mireStandard ).code; // åèæ å } } }); }); if (val === null || val === "") return; if (this.mireStandards == null) return; selectStandardProductList({ model: this.mireModel.split(" - ")[1], standardMethodListId: val, factory: "", }) .then((res) => { if (res.code === 200) { this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; }); this.detectionItems = res.data; this.detectionType = 0; this.$set(this.detectionItems, "type", 0); } } }) .catch((error) => { console.error(error); }); }, methodChange2(val) { if (this.multiFiberList.length == 0) { this.$message.error("è¯·éæ©éè¦æ´æ¹çæ°æ®"); return; } if (val === null || val === "") return; selectStandardProductList({ model: "", standardMethodListId: val, factory: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel + " - ", }) .then((res) => { if (res.code === 200) { // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; }); this.detectionItems = res.data; this.detectionType = 1; this.$set(this.detectionItems, "type", 1); } // ç»éä¸çå 纤带èµå¼ for (let i = 0; i < this.fibersList.length; i++) { this.multiFiberList.forEach((item) => { if (this.fibersList[i].ident == item.ident) { this.fibersList[i].model = this.miresModel; // çº¤å¸¦è§æ ¼ this.fibersList[i].num = this.miresModel.replace("è¯", ""); // å çº¤æ£æµé this.fibersList[i].productList = this.detectionItems; // æ£æµé¡¹ this.miresStandards.forEach((a) => { if (a.id == this.miresStandard) { this.fibersList[i].standard = a.code; // åèæ å } }); } }); } } }) .catch((error) => { console.error(error); }); }, addFiber() { // ææ° let colors2 = []; if (this.packageInfo.num1 / this.colors.length > 1) { let num = this.packageInfo.num1 / this.colors.length; if (this.packageInfo.num1 % this.colors.length > 0) num += 1; for (var i = 0; i < num; i++) { colors2 = colors2.concat(this.colors); } this.fiberList = [] // éæ©äºå 纤带 if (this.packageInfo.ismiers) { if(this.multiFiberList.length != 0){ this.multiFiberList.forEach((a,index) => { a.fiber = [] } else { colors2 = colors2.concat(this.colors); } this.fiberList = []; // éæ©äºå 纤带 if (this.packageInfo.ismiers) { if (this.multiFiberList.length != 0) { this.multiFiberList.forEach((a, index) => { a.fiber = []; for (var i = 0; i < parseInt(a.num); i++) { let fiber = { ident: this.fiberList.length + 1, bushColor: a.color, color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, color: colors2[ i + parseInt(a.num) * index > colors2.length ? 0 : i + parseInt(a.num) * index * index ].dictLabel, model: null, noSplitModel: null, standard: null, fibersIdent: a.ident, productList: [] } this.fiberList.push(fiber) productList: [], }; this.fiberList.push(fiber); } }) }); } else { this.selectBushing.forEach((a,index) => { a.fiber = [] this.selectBushing.forEach((a, index) => { a.fiber = []; for (var i = 0; i < parseInt(a.testNum); i++) { let fiber = { ident: this.fiberList.length + 1, bushColor: a.color, color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label, color: colors2[ i + parseInt(a.testNum) * index > colors2.length ? 0 : i + parseInt(a.testNum) * index ].dictLabel, model: null, noSplitModel: null, standard: null, productList: [] } this.fiberList.push(fiber) productList: [], }; this.fiberList.push(fiber); } }) }); } }else { this.fiberList = [] let flag = true } else { this.fiberList = []; let flag = true; // æç §é¡ºåºçæå çº¤è²æ let colors2 = [] let colors2 = []; if (this.packageInfo.num1 / this.colors.length > 1) { let num = this.packageInfo.num1 / this.colors.length if (this.packageInfo.num1 % this.colors.length > 0) num += 1 let num = this.packageInfo.num1 / this.colors.length; if (this.packageInfo.num1 % this.colors.length > 0) num += 1; for (var i = 0; i < num; i++) { colors2 = colors2.concat(this.colors) colors2 = colors2.concat(this.colors); } } else { colors2 = colors2.concat(this.colors) colors2 = colors2.concat(this.colors); } // æ ¹æ®å¥ç®¡çæµè¯éçæå¯¹åºçæ°éçå çº¤æ°æ® this.selectBushing.forEach((item,index) =>{ if(item.testNum != null && item.testNum != ''){ for(let i =0; i < parseInt(item.testNum); i++){ this.selectBushing.forEach((item, index) => { if (item.testNum != null && item.testNum != "") { for (let i = 0; i < parseInt(item.testNum); i++) { let fiber = { ident: this.fiberList.length + 1, bushColor: item.color, color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label, model: null, color: colors2[ i + parseInt(item.testNum) * index > colors2.length ? 0 : i + parseInt(item.testNum) * index * index ].dictLabel, model: null, standard: null, productList: [] } this.fiberList.push(fiber) productList: [], }; this.fiberList.push(fiber); } }else { flag = false } else { flag = false; } }) if(!flag){ this.$message.error('请填åå çº¤æ£æµé') return }); if (!flag) { this.$message.error("请填åå çº¤æ£æµé"); return; } } // äºä»£ // // æ¯å¦éæ©å¥ç®¡ // if(this.selectBushing.length == 0) { // this.$message.error('æªéæ©å¥ç®¡') // return // } // this.fiberList = [] // let flag = true // // æç §é¡ºåºçæå çº¤è²æ // let colors2 = [] // if (this.packageInfo.num1 / this.colors.length > 1) { // let num = this.packageInfo.num1 / this.colors.length // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 // for (var i = 0; i < num; i++) { // colors2 = colors2.concat(this.colors) // } // } else { // colors2 = colors2.concat(this.colors) // } // // æ ¹æ®å¥ç®¡çæµè¯éçæå¯¹åºçæ°éçå çº¤æ°æ® // this.selectBushing.forEach((item,index) =>{ // if(item.testNum != null && item.testNum != ''){ // for(let i =0; i < parseInt(item.testNum); i++){ // let fiber = { // ident: this.fiberList.length + 1, // bushColor: item.color, // color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label, // model: null, // standard: null, // productList: [] // } // this.fiberList.push(fiber) // } // }else { // flag = false // } // }) // if(!flag){ // this.$message.error('请填åå çº¤æ£æµé') // return // } // æå // let colors2 = [] // if (this.packageInfo.num1 / this.colors.length > 1) { // let num = this.packageInfo.num1 / this.colors.length // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 // for (var i = 0; i < num; i++) { // colors2 = colors2.concat(this.colors) // } // } else { // colors2 = colors2.concat(this.colors) // } // this.fiberList = [] // let model = this.mireModel.split(' - ')[1] // let standard = this.mireStandards.find(a => a.id == this.mireStandard).code // if (this.packageInfo.ismiers) { // if(this.selectFibers.length === 0){ // this.$message.error('æªéæ©å 纤带') // return // } // this.selectFibers.forEach((a,index) => { // a.fiber = [] // for (var i = 0; i < parseInt(a.num); i++) { // let fiber = { // bushColor: a.color, // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, // model: model, // standard: standard, // productList: this.HaveJson(this.productList) // } // a.fiber.push(fiber) // this.fiberList.push(fiber) // } // }) // } else { // this.selectBushing.forEach((a,index) => { // a.fiber = [] // for (var i = 0; i < parseInt(a.testNum); i++) { // let fiber = { // bushColor: a.color, // color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label, // model: model, // standard: standard, // productList: this.HaveJson(this.productList) // } // a.fiber.push(fiber) // this.fiberList.push(fiber) // } // }) // } }, addFibers() { // if(this.selectBushing.length===0){ // this.$message.error('æªéæ©å¥ç®¡') // return // } // this.fibersList = [] // let standard = this.miresStandards.find(a => a.id == this.miresStandard).code // this.packageInfo.ismiers = true // this.fiberList = [] // this.selectBushing.forEach(a => { // a.fiber = [] // a.fibers = [] // for (var i = 0; i < parseInt(a.testNum); i++) { // let fibers = { // code: null, // color: a.color, // model: this.miresModel, // standard: standard, // num: a.testNum, // productList: this.HaveJson(this.productList2), // fiber: [] // } // a.fibers.push(fibers) // this.fibersList.push(fibers) // } // }) if(this.selectBushing.length == 0) { this.$message.error('æªéæ©å¥ç®¡') return } // å¥ç®¡çæµè¯é * éæ©çå 纤带æ°é this.fibersList = [] this.selectBushing.forEach(item => { for(let i = 0; i < parseInt(this.packageInfo.testNum); i++){ }, addFibers() { if (this.selectBushing.length == 0) { this.$message.error("æªéæ©å¥ç®¡"); return; } // å¥ç®¡çæµè¯é * éæ©çå 纤带æ°é this.fibersList = []; this.selectBushing.forEach((item) => { for (let i = 0; i < parseInt(this.packageInfo.testNum); i++) { let fibers = { ident: this.fibersList.length + 1, color: item.color, @@ -1097,503 +1229,428 @@ standard: null, num: null, fiber: [], productList: [] } this.fibersList.push(fibers) productList: [], }; this.fibersList.push(fibers); } }) }, rowClickFiber(row, column, event,type){ console.log('row',row); if(type == 1) { this.fiberList = row.fiber if(row.productList != null && row.productList.length > 0) { this.detectionItems = [] this.detectionItems = row.productList } if(row.fiber != null && row.fiber.length > 0) { this.fiberList = [] this.fiberList = row.fiber } }else if (type == 0){ this.detectionItems = [] this.detectionItems = row.productList } // if(type == 1) { // if((row.model == null || row.model == '') && (row.standard == null || row.standard == '')){ // this.detectionItems = [] // return // } // if(row.model != null && row.model != ''){ // this.miresModel = row.model // this.selectsStandardMethodByFLSSM2() // } // setTimeout(() => { // if(row.standard !=null && row.standard != ''){ // this.miresStandard = this.miresStandards.find(a => a.code == row.standard).id // } // this.$axios.post(this.$api.standardTree.selectStandardProductList, { // model: '', // standardMethodListId: this.miresStandard, // factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - ' + this.miresModel + ' - ', // }, { // headers: { // 'Content-Type': 'application/json' // } // }).then(res => { // // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ // this.detectionItems = [] // if(res.data != null && res.data.length != 0){ // this.detectionItems = res.data // this.detectionType = 1 // this.$set(this.detectionItems,'type',1) // if (row.productList != null && row.productList.length > 0) { // let product = JSON.parse(JSON.stringify(row.productList)) // setTimeout(() => { // product.forEach(p => { // let rowToSelect = this.detectionItems.find(item => item.id === p.id); // if (rowToSelect) { // this.toggleSelection(rowToSelect); // } // }); // },200) // } // } // }) // },1000) // }else if(type == 0) { // if((row.noSplitModel == null || row.noSplitModel == '') && (row.standard == null || row.standard == '')){ // this.detectionItems = [] // return // } // if(row.model != null && row.model != ''){ // this.mireModel = row.noSplitModel // this.selectsStandardMethodByFLSSM() // } // setTimeout(() => { // if(row.standard !=null && row.standard != ''){ // this.mireStandard = this.mireStandards.find(a => a.code == row.standard).id // } // this.$axios.post(this.$api.standardTree.selectStandardProductList, { // model: this.mireModel.split(' - ')[1], // standardMethodListId: this.mireStandard, // factory: '' // }, { // headers: { // 'Content-Type': 'application/json' // } // }).then(res => { // this.detectionItems = [] // if(res.data != null && res.data.length != 0){ // res.data.forEach(a => { // a.state = 0 // }) // this.detectionItems = res.data // this.detectionType = 0 // this.$set(this.detectionItems,'type',0) // if (row.productList != null && row.productList.length > 0) { // let product = JSON.parse(JSON.stringify(row.productList)) // setTimeout(() => { // product.forEach(p => { // let rowToSelect = this.detectionItems.find(item => item.id === p.id); // if (rowToSelect) { // this.toggleSelection(rowToSelect); // } // }); // },200) // } // } // }) // },1000); // } }); }, toggleSelection(row) { this.$refs.productTable.toggleRowSelection(row, true); }, tableRowClassName({ row, rowIndex }) { if (row.state === 0) { return 'warning-row'; rowClickFiber(row, column, event, type) { console.log("row", row); if (type == 1) { this.fiberList = row.fiber; if (row.productList != null && row.productList.length > 0) { this.detectionItems = []; this.detectionItems = row.productList; } return ''; }, handleAll(e) { if (e.length > 0) { console.log(this.detectionItems); this.detectionItems.map(m => { m.state = 1 return m }) } else { this.detectionItems.map(m => { m.state = 0 return m }) if (row.fiber != null && row.fiber.length > 0) { this.fiberList = []; this.fiberList = row.fiber; } if (e.length > 0) { if(this.multiFiberList.length > 0){ this.multiFiberList.map(item => { item.productList.map(m=>{ m.state = 1; return m; }) return item }) }else{ this.currentDetectionItems.productList.map(m=>{ } else if (type == 0) { this.detectionItems = []; this.detectionItems = row.productList; } }, toggleSelection(row) { this.$refs.productTable.toggleRowSelection(row, true); }, tableRowClassName({ row, rowIndex }) { if (row.state === 0) { return "warning-row"; } return ""; }, handleAll(e) { if (e.length > 0) { console.log(this.detectionItems); this.detectionItems.map((m) => { m.state = 1; return m; }); } else { this.detectionItems.map((m) => { m.state = 0; return m; }); } if (e.length > 0) { if (this.multiFiberList.length > 0) { this.multiFiberList.map((item) => { item.productList.map((m) => { m.state = 1; return m; }) } }); return item; }); } else { if(this.multiFiberList.length > 0){ this.multiFiberList.map(item => { item.productList.map(m=>{ m.state = 0; return m; }) return item }) }else{ this.currentDetectionItems.productList.map(m=>{ this.currentDetectionItems.productList.map((m) => { m.state = 1; return m; }); } } else { if (this.multiFiberList.length > 0) { this.multiFiberList.map((item) => { item.productList.map((m) => { m.state = 0; return m; }); return item; }); } else { this.currentDetectionItems.productList.map((m) => { m.state = 0; return m; }); } } this.bsmRow3 = []; this.detectionItems.forEach((p) => { if (this.type == 1) { if ( p.bsm === "1" && p.section !== "" && p.section !== null && p.state === 1 ) { if (p.section.indexOf("[") > -1) { this.bsmRow = this.HaveJson(p); } this.bsm1 = true; this.bsm1Dia = true; } else if ( p.bsm === "1" && p.section !== "" && p.section !== null && p.state === 0 ) { this.bsm1 = false; } if ( p.bsm === "1" && p.inspectionItem === "å 纤æ¥å¤´æè" && this.sampleList.length > 1 && p.state === 1 ) { this.bsm2 = true; this.bsm1Dia = true; if (this.bsm2Val2.length === 0) { this.bsm2Val = ((this.sampleList.length - 1) * this.sampleList.length) / 2; this.computationalPairing(this.sampleList.length); this.bsm2Val2 = this.HaveJson(this.bsm2Val3); } } else if ( p.bsm === "1" && p.inspectionItem === "å 纤æ¥å¤´æè" && p.state === 1 ) { this.bsm2 = false; } } // if (p.ask.includes('RTS')&&p.state === 1) { // p.rts = '' // this.bsm3Val = '' // this.bsm3Dia = true // this.bsmRow3.push(p) // } }); if (e.length > 0) { this.sampleList.map((item) => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map((m) => { m.state = 1; return m; }); } return item; }); } else { this.sampleList.map((item) => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map((m) => { m.state = 0; return m; }); } } this.bsmRow3 = [] this.detectionItems.forEach(p => { if(this.type==1){ if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 1) { if (p.section.indexOf('[') > -1) { this.bsmRow = this.HaveJson(p) } this.bsm1 = true this.bsm1Dia = true } else if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 0) { this.bsm1 = false return item; }); } this.$nextTick(() => { this.$refs.productTable.doLayout(); }); }, upProductSelect(selection, row) { row.state = row.state == 1 ? 0 : 1; if (this.selectFiberList.length > 0) { this.selectFiberList.map((item) => { item.productList.map((m) => { if (m.id == row.id) { m.state = row.state; } if (p.bsm === '1' && p.inspectionItem === 'å 纤æ¥å¤´æè' && this.sampleList.length > 1 && p.state === 1) { this.bsm2 = true this.bsm1Dia = true if(this.bsm2Val2.length === 0){ this.bsm2Val = (this.sampleList.length - 1) * this.sampleList.length / 2 this.computationalPairing(this.sampleList.length) this.bsm2Val2 = this.HaveJson(this.bsm2Val3) } } else if (p.bsm === '1' && p.inspectionItem === 'å 纤æ¥å¤´æè' && p.state === 1) { this.bsm2 = false } return m; }); return item; }); } else { this.currentDetectionItems.productList.map((m) => { if (m.id == row.id) { m.state = row.state; } // if (p.ask.includes('RTS')&&p.state === 1) { // p.rts = '' // this.bsm3Val = '' // this.bsm3Dia = true // this.bsmRow3.push(p) // } }) if (e.length > 0) { this.sampleList.map(item => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map(m => { m.state = 1 return m; }) } return item }) } else { this.sampleList.map(item => { if (this.sampleIds.indexOf(item.id) > -1) { item.insProduct.map(m => { m.state = 0 return m; }) } return item }) } this.$nextTick(() => { this.$refs.productTable.doLayout() }) }, upProductSelect(selection, row) { row.state = row.state == 1 ? 0 : 1 if(this.selectFiberList.length > 0){ this.selectFiberList.map(item => { item.productList.map(m=>{ if(m.id == row.id){ m.state = row.state; } return m }) return item }) }else{ this.currentDetectionItems.productList.map(m=>{ if(m.id == row.id){ m.state = row.state; } return m; }); } if(this.type==1){ if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) { if (row.section.indexOf('[') > -1) { this.bsmRow = this.HaveJson(row) } this.bsm1 = true this.bsm1Dia = true } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) { this.bsm1 = false return m; }); } if (this.type == 1) { if ( row.bsm === "1" && row.section !== "" && row.section !== null && row.state === 1 ) { if (row.section.indexOf("[") > -1) { this.bsmRow = this.HaveJson(row); } if (row.bsm === '1' && row.inspectionItem === 'å 纤æ¥å¤´æè' && this.sampleList.length > 1 && row.state === 1) { this.bsm2 = true this.bsm1Dia = true if(this.bsm2Val2.length === 0){ this.bsm2Val = (this.sampleList.length - 1) * this.sampleList.length / 2 this.computationalPairing(this.sampleList.length) this.bsm2Val2 = this.HaveJson(this.bsm2Val3) } } else if (row.bsm === '1' && row.inspectionItem === 'å 纤æ¥å¤´æè' && row.state === 1) { this.bsm2 = false } }else{ this.bsm1Dia = false this.bsm1 = true; this.bsm1Dia = true; } else if ( row.bsm === "1" && row.section !== "" && row.section !== null && row.state === 0 ) { this.bsm1 = false; } // if (row.ask.includes('RTS')&&row.state === 1) { // this.bsmRow3 = null; // row.rts = '' // this.bsm3Val = '' // this.bsm3Dia = true // this.bsmRow3 = row // }else{ // this.bsm3Dia = false // } }, computationalPairing(n){ const nums = []; for (let i = 1; i <= n; i++) { nums.push(i); } this.bsm2Val3 = this.HaveJson(this.permute(nums)) }, setClassName({ column }) { if (column.type == 'selection' && !this.isAllDisabled) { return 'all-disabled' } }, setClassName0({ column }){ if (column.type == 'selection' && this.active!=1) { return 'all-disabled' } }, clearFibers(){ this.packageInfo.ismiers = false this.fibersList = [] this.bushing.forEach(a=>{ a.fibers = [] }) }, save(){ // if(this.bushing.length === 0){ // this.$message.error('缺å°é ç½®æ æ³ä¿å') // return // } // for(let a in this.bushing){ // if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){ // this.$message.error(this.bushing[a].color+'ç®¡è²æ å¥ç®¡ç¼ºå°é ç½®æ æ³ä¿å') // return // } // } // this.sample.forEach(a=>{ // a.bushing = this.bushing // }) // this.$message.success('å·²ä¿å') // this.$emit('saveFiberopticConfig') if(this.bushing.length === 0){ this.$message.error('缺å°å¥ç®¡æ æ³ä¿å') return } this.bushing.forEach(item=>{ // 妿å 纤带æå¼ if(this.fibersList.length != 0) { this.fibersList.forEach(a=>{ a.fiber = this.fiberList.filter(b=>b.fibersIdent == a.ident) }) item.fibers = this.fibersList // å 纤带 item.fiber = [] // å 纤 }else { // 妿å 纤带没æå¼ item.fibers = [] // å 纤带 item.fiber = this.fiberList // å 纤 } }) this.sample.forEach(a=>{ a.bushing = this.bushing }) this.$message.success('å·²ä¿å') this.$emit("saveFiberopticConfig"); }, beforeClose(done){ if (this.bsm1) { if (this.bsm1Val === null || this.bsm1Val === '') { this.$message.error('ç¹æ®é¡¹ç®å¿ é¡»å¤ç') return } } if (this.bsm2) { if ( row.bsm === "1" && row.inspectionItem === "å 纤æ¥å¤´æè" && this.sampleList.length > 1 && row.state === 1 ) { this.bsm2 = true; this.bsm1Dia = true; if (this.bsm2Val2.length === 0) { this.$message.error('ç¹æ®é¡¹ç®å¿ é¡»å¤ç') return this.bsm2Val = ((this.sampleList.length - 1) * this.sampleList.length) / 2; this.computationalPairing(this.sampleList.length); this.bsm2Val2 = this.HaveJson(this.bsm2Val3); } let set = new Set() for (let i=0;i<this.bsm2Val2.length;i++){ let num0 = set.size set.add(JSON.stringify(this.bsm2Val2[i])) let num1 = set.size if(num1==num0){ this.$message.error('å ³è项ç®ä¸è½éå¤') return } set.add(JSON.stringify(this.bsm2Val2[i].reverse())) let num2 = set.size if(num1==num2){ this.$message.error('å ³è项ç®ä¸è½éå¤') return } } } else if ( row.bsm === "1" && row.inspectionItem === "å 纤æ¥å¤´æè" && row.state === 1 ) { this.bsm2 = false; } done() }, beforeClose0(done){ if(!this.bsm3Val){ this.$message.error('RSTå¿ é¡»å¡«å') return }else{ if(Array.isArray(this.bsmRow3)){ this.bsmRow3.forEach(item=>{ item.rts = this.bsm3Val }) }else{ this.bsmRow3.rts = this.bsm3Val } } else { this.bsm1Dia = false; } }, computationalPairing(n) { const nums = []; for (let i = 1; i <= n; i++) { nums.push(i); } this.bsm2Val3 = this.HaveJson(this.permute(nums)); }, setClassName({ column }) { if (column.type == "selection" && !this.isAllDisabled) { return "all-disabled"; } }, setClassName0({ column }) { if (column.type == "selection" && this.active != 1) { return "all-disabled"; } }, clearFibers() { this.packageInfo.ismiers = false; this.fibersList = []; this.bushing.forEach((a) => { a.fibers = []; }); }, save() { if (this.bushing.length === 0) { this.$message.error("缺å°å¥ç®¡æ æ³ä¿å"); return; } this.bushing.forEach((item) => { // 妿å 纤带æå¼ if (this.fibersList.length != 0) { this.fibersList.forEach((a) => { a.fiber = this.fiberList.filter((b) => b.fibersIdent == a.ident); }); item.fibers = this.fibersList; // å 纤带 item.fiber = []; // å 纤 } else { // 妿å 纤带没æå¼ item.fibers = []; // å 纤带 item.fiber = this.fiberList; // å 纤 } done() }, upBsm1(val) { let sections = JSON.parse(this.bsmRow.section); let asks = JSON.parse(this.bsmRow.ask); let tells = JSON.parse(this.bsmRow.tell); let manHours = JSON.parse(this.bsmRow.manHour); let prices = JSON.parse(this.bsmRow.price); for (var a in sections) { if (val === sections[a]) { this.productList.forEach(p => { if (p.id === this.bsmRow.id) { p.section = sections[a] p.ask = asks[a] p.tell = tells[a] p.manHour = manHours[a] p.price = prices[a] } }) break } } }, bsm2Up(val){ let list = [] for(let a=1;a < this.bsm2Val3.length + 1;a++){ list.push(a) } let set = new Set() let size1 = set.length while(set.size < val){ set.add(Math.ceil(Math.random() * this.bsm2Val3.length)) } this.bsm2Val2 = [] for(let a of set){ this.bsm2Val2.push(this.HaveJson(this.bsm2Val3[a-1])) }); this.sample.forEach((a) => { a.bushing = this.bushing; }); this.$message.success("å·²ä¿å"); this.$emit("saveFiberopticConfig"); }, beforeClose(done) { if (this.bsm1) { if (this.bsm1Val === null || this.bsm1Val === "") { this.$message.error("ç¹æ®é¡¹ç®å¿ é¡»å¤ç"); return; } } } } if (this.bsm2) { if (this.bsm2Val2.length === 0) { this.$message.error("ç¹æ®é¡¹ç®å¿ é¡»å¤ç"); return; } let set = new Set(); for (let i = 0; i < this.bsm2Val2.length; i++) { let num0 = set.size; set.add(JSON.stringify(this.bsm2Val2[i])); let num1 = set.size; if (num1 == num0) { this.$message.error("å ³è项ç®ä¸è½éå¤"); return; } set.add(JSON.stringify(this.bsm2Val2[i].reverse())); let num2 = set.size; if (num1 == num2) { this.$message.error("å ³è项ç®ä¸è½éå¤"); return; } } } done(); }, beforeClose0(done) { if (!this.bsm3Val) { this.$message.error("RSTå¿ é¡»å¡«å"); return; } else { if (Array.isArray(this.bsmRow3)) { this.bsmRow3.forEach((item) => { item.rts = this.bsm3Val; }); } else { this.bsmRow3.rts = this.bsm3Val; } } done(); }, upBsm1(val) { let sections = JSON.parse(this.bsmRow.section); let asks = JSON.parse(this.bsmRow.ask); let tells = JSON.parse(this.bsmRow.tell); let manHours = JSON.parse(this.bsmRow.manHour); let prices = JSON.parse(this.bsmRow.price); for (var a in sections) { if (val === sections[a]) { this.productList.forEach((p) => { if (p.id === this.bsmRow.id) { p.section = sections[a]; p.ask = asks[a]; p.tell = tells[a]; p.manHour = manHours[a]; p.price = prices[a]; } }); break; } } }, bsm2Up(val) { let list = []; for (let a = 1; a < this.bsm2Val3.length + 1; a++) { list.push(a); } let set = new Set(); let size1 = set.length; while (set.size < val) { set.add(Math.ceil(Math.random() * this.bsm2Val3.length)); } this.bsm2Val2 = []; for (let a of set) { this.bsm2Val2.push(this.HaveJson(this.bsm2Val3[a - 1])); } }, }, }; </script> <style scoped> .ins_order_config { width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; } .ins_order_config { width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; padding: 10px 15px; } .ins_order_config::-webkit-scrollbar { width: 0; } .ins_order_config::-webkit-scrollbar { width: 0; } .title { height: 60px; line-height: 60px; } .title { height: 60px; line-height: 60px; } .center { width: 100%; height: calc(100% - 60px); } .center { width: 100%; height: calc(100% - 60px); } .grid-content { background: #fff; border-radius: 4px; box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.05); } .grid-content { background: #fff; border-radius: 4px; box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.05); } .grid-content h5 { color: #3A7BFA; font-weight: 400; line-height: 32px; padding-left: 16px; box-sizing: border-box; border-bottom: 1px solid #eee; } .grid-content h5 { color: #3a7bfa; font-weight: 400; line-height: 32px; padding-left: 16px; box-sizing: border-box; border-bottom: 1px solid #eee; } .search-item { display: flex; align-items: center; line-height: 36px; } .search-item { display: flex; align-items: center; line-height: 36px; } .search-item label { width: 90px; font-size: 12px; color: #606266; /* text-align: right; */ } .search-item label { width: 90px; font-size: 12px; color: #606266; /* text-align: right; */ } .btns { margin: 8px 0 8px 10px; } .btns { margin: 8px 0 8px 10px; } >>>.el-table th.el-table__cell>.cell { padding-top: 2px !important; padding-bottom: 2px !important; } >>>.all-disabled .el-checkbox__input .el-checkbox__inner { background-color: #edf2fc; border-color: #dcdfe6; cursor: not-allowed; } .models{ font-size:14px; width:320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } >>> .el-table th.el-table__cell > .cell { padding-top: 2px !important; padding-bottom: 2px !important; } >>> .all-disabled .el-checkbox__input .el-checkbox__inner { background-color: #edf2fc; border-color: #dcdfe6; cursor: not-allowed; } .models { font-size: 14px; width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } </style> src/views/business/inspectionOrder/fiberoptic-config.vue
@@ -119,8 +119,8 @@ <el-option v-for="(color, i) in colors" :key="i" :label="color.lable" :value="color.value" :label="color.dictLable" :value="color.dictValue" ></el-option> </el-select> </template> @@ -551,8 +551,8 @@ <el-option v-for="(color, i) in colors" :key="i" :label="color.lable" :value="color.value" :label="color.dictLable" :value="color.dictValue" ></el-option> </el-select> </template> @@ -796,6 +796,15 @@ </template> <script> import { getDicts } from "@/api/system/dict/data"; import { getStandTreeBySampleType, selectStandardTreeList2, selectStandardMethodEnum, selectsStandardMethodByFLSSM, selectStandardProductList, } from "@/api/standard/standardLibrary"; import { permute } from "@/api/business/inspectionOrder"; export default { props: { active: { @@ -999,8 +1008,8 @@ let color = this.colors[i]; for (let j = 0; j < newFiberList.length; j++) { let newColor = newFiberList[j]; if (color.value == newColor[0]) { newFiberList[j].push(color.orderNum); if (color.dictValue == newColor[0]) { newFiberList[j].push(color.dictSort); } } } @@ -1279,12 +1288,14 @@ this.$parent.configShow = false; }, getTypeDicts1() { this.$axios .post(this.$api.enums.selectEnumByCategory, { category: "è²æ ", }) getDicts("fiber_color_type") .then((res) => { this.colors = res.data; if (res.code === 200) { this.colors = res.data; } }) .catch((error) => { console.error(error); }); }, // å¥ç®¡æ°ç®çæè¡¨æ ¼æ°æ® @@ -1293,7 +1304,7 @@ for (let i = 0; i < this.packageInfo.num1; i++) { let bushing = { ident: this.bushing.length + 1, color: this.colors[i].label, color: this.colors[i].dictLabel, standNum: null, testNum: null, fibers: [], @@ -1366,11 +1377,6 @@ this.multiFiberList = this.fibersList; // é»è®¤å¾é setTimeout(() => { // this.selectBushing.forEach(item =>{ // let rowToSelect = this.bushing.find(a => a.ident == item.ident) // this.$refs.table0.toggleRowSelection(rowToSelect, true) // }) this.multiFiberList.forEach((item) => { let rowToSelect = this.fibersList.find( (a) => a.ident == item.ident @@ -1401,10 +1407,6 @@ this.addFiber(1); // é»è®¤å¾é setTimeout(() => { // this.selectBushing.forEach(item =>{ // let rowToSelect = this.bushing.find(a => a.ident == item.ident) // this.$refs.table0.toggleRowSelection(rowToSelect, true) // }) this.fiberList.forEach((item) => { this.$refs.table3.toggleRowSelection(item, true); }); @@ -1446,7 +1448,7 @@ this.bushing = []; for (var i = 0; i < this.packageInfo.num1; i++) { let bushing = { color: colors2[i].label, color: colors2[i].dictLabel, standNum: this.packageInfo.standNum, testNum: this.packageInfo.testNum, fibers: [], @@ -1486,83 +1488,76 @@ } }, getStandTreeBySampleType() { this.$axios .post(this.$api.standardTree.getStandTreeBySampleType, { laboratory: "é信产åå®éªå®¤", sampleType: "å 纤", }) getStandTreeBySampleType({ laboratory: "é信产åå®éªå®¤", sampleType: "å 纤", }) .then((res) => { this.mireModels = []; res.data.forEach((a) => { this.mireModels.push({ label: a.model, value: a.sample + " - " + a.model, if (res.code === 200) { this.mireModels = []; res.data.forEach((a) => { this.mireModels.push({ label: a.model, value: a.sample + " - " + a.model, }); }); }); } }) .catch((error) => { console.error(error); }); }, getStandTreeBySampleType2() { this.$axios .post(this.$api.standardTree.getStandTreeBySampleType, { laboratory: "é信产åå®éªå®¤", sampleType: "å 纤带", }) getStandTreeBySampleType({ laboratory: "é信产åå®éªå®¤", sampleType: "å 纤带", }) .then((res) => { this.miresModels = []; res.data.forEach((a) => { this.miresModels.push({ label: a.model, value: a.model, if (res.code === 200) { this.miresModels = []; res.data.forEach((a) => { this.miresModels.push({ label: a.model, value: a.model, }); }); }); } }) .catch((error) => { console.error(error); }); }, selectsStandardMethodByFLSSM() { this.mireStandards = []; this.mireStandardLoading = true; this.$axios .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { tree: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤 - " + this.mireModel, }) selectsStandardMethodByFLSSM({ tree: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤 - " + this.mireModel, }) .then((res) => { this.mireStandardLoading = false; this.mireStandards = res.data.standardMethodList; if (res.code === 200) { this.mireStandardLoading = false; this.mireStandards = res.data.standardMethodList; } }) .catch((error) => { console.error(error); }); }, selectsStandardMethodByFLSSM2() { this.miresStandards = []; this.$axios .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { tree: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel, }) selectsStandardMethodByFLSSM({ tree: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel, }) .then((res) => { this.miresStandards = res.data.standardMethodList; if (res.code === 200) { this.miresStandards = res.data.standardMethodList; } }) .catch((error) => { console.error(error); }); }, methodChange(val) { // if (val === null || val === '') return // this.$axios.post(this.$api.standardTree.selectStandardProductList, { // model: this.mireModel.split(' - ')[1], // standardMethodListId: val, // factory: '' // }, { // headers: { // 'Content-Type': 'application/json' // } // }).then(res => { // res.data.forEach(a => { // a.state = 0 // }) // this.productList = res.data // setTimeout(() => { // this.productList.forEach(a => { // if (a.state == 1) this.toggleSelection(a) // }) // this.addFiber() // }, 200) // }) // å°ä¸ææ¡å¼èµå¼ç»å 纤 çå¬å»é¤ if (this.selectFiberList.length == 0) { this.$message.error("è¯·éæ©æ°æ®"); @@ -1571,135 +1566,91 @@ if (val === null || val === "") return; if (this.mireStandards == null) return; this.$axios .post( this.$api.standardTree.selectStandardProductList, { model: this.mireModel.split(" - ")[1], standardMethodListId: val, factory: "", }, { headers: { "Content-Type": "application/json", }, } ) selectStandardProductList({ model: this.mireModel.split(" - ")[1], standardMethodListId: val, factory: "", }) .then((res) => { this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; }); this.detectionItems = res.data; this.detectionType = 0; this.$set(this.detectionItems, "type", 0); } this.mireStandards.find((a) => a.id == val).code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); this.selectFiberList.forEach((item) => { this.fiberList.forEach((a) => { if (a.ident == item.ident) { a.model = this.mireModel.split(" - ")[1]; // å çº¤è§æ ¼ a.noSplitModel = this.mireModel; // å çº¤è§æ ¼ if (this.mireStandards != null) { a.standard = this.mireStandards.find( (a) => a.id == this.mireStandard ).code; // åèæ å if (res.code === 200) { this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; }); this.detectionItems = res.data; this.detectionType = 0; this.$set(this.detectionItems, "type", 0); } this.mireStandards.find((a) => a.id == val).code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); this.selectFiberList.forEach((item) => { this.fiberList.forEach((a) => { if (a.ident == item.ident) { a.model = this.mireModel.split(" - ")[1]; // å çº¤è§æ ¼ a.noSplitModel = this.mireModel; // å çº¤è§æ ¼ if (this.mireStandards != null) { a.standard = this.mireStandards.find( (a) => a.id == this.mireStandard ).code; // åèæ å } } } }); }); }); } }) .catch((error) => { console.error(error); }); }, methodChange2(val) { // if (val === null || val === '') return // this.$axios.post(this.$api.standardTree.selectStandardProductList, { // model: '', // standardMethodListId: val, // factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - ' + this.miresModel + ' - ', // }, { // headers: { // 'Content-Type': 'application/json' // } // }).then(res => { // res.data.forEach(a => { // a.state = 0 // }) // this.productList2 = res.data // setTimeout(() => { // this.productList2.forEach(a => { // if (a.state == 1) this.toggleSelection(a) // }) // this.addFibers() // }, 200) // }) if (this.multiFiberList.length == 0) { this.$message.error("è¯·éæ©éè¦æ´æ¹çæ°æ®"); return; } if (val === null || val === "") return; this.$axios .post( this.$api.standardTree.selectStandardProductList, { model: "", standardMethodListId: val, factory: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel + " - ", }, { headers: { "Content-Type": "application/json", }, } ) selectStandardProductList({ model: "", standardMethodListId: val, factory: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel + " - ", }) .then((res) => { // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; }); this.detectionItems = res.data; this.detectionType = 1; this.$set(this.detectionItems, "type", 1); // 夿æ¯å¦ä¸ºå§æè¦æ± this.miresStandards.find((a) => a.id == val).code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); } // ç»éä¸çå 纤带èµå¼ // for(let i= 0; i < this.fibersList.length; i++){ // this.multiFiberList.forEach(item => { // if(this.fibersList[i].ident == item.ident){ // this.fibersList[i].model = this.miresModel // çº¤å¸¦è§æ ¼ // this.fibersList[i].num = this.miresModel.replace('è¯','') // å çº¤æ£æµé // this.fibersList[i].productList = this.detectionItems // æ£æµé¡¹ // this.miresStandards.forEach(a => { // if(a.id == this.miresStandard) { // this.fibersList[i].standard = a.code // åèæ å // } // }) // } // }) // } for (let i = 0; i < this.multiFiberList.length; i++) { for (let j = 0; j < this.fibersList.length; j++) { if (this.multiFiberList[i].ident == this.fibersList[j].ident) { this.fibersList[j].model = this.miresModel; // çº¤å¸¦è§æ ¼ this.fibersList[j].num = this.miresModel.replace("è¯", ""); // å çº¤æ£æµé this.miresStandards.forEach((a) => { if (a.id == this.miresStandard) { this.fibersList[j].standard = a.code; // åèæ å } }); if (res.code === 200) { // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; }); this.detectionItems = res.data; this.detectionType = 1; this.$set(this.detectionItems, "type", 1); // 夿æ¯å¦ä¸ºå§æè¦æ± this.miresStandards.find((a) => a.id == val).code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); } for (let i = 0; i < this.multiFiberList.length; i++) { for (let j = 0; j < this.fibersList.length; j++) { if (this.multiFiberList[i].ident == this.fibersList[j].ident) { this.fibersList[j].model = this.miresModel; // çº¤å¸¦è§æ ¼ this.fibersList[j].num = this.miresModel.replace("è¯", ""); // å çº¤æ£æµé this.miresStandards.forEach((a) => { if (a.id == this.miresStandard) { this.fibersList[j].standard = a.code; // åèæ å } }); } } } } }) .catch((error) => { console.error(error); }); }, addFiber(isInspection) { @@ -1762,7 +1713,7 @@ let fiber = { ident: this.fiberList.length + 1, bushColor: item.color, color: colors3[count].label, color: colors3[count].dictLabel, model: null, noSplitModel: null, standard: null, @@ -1775,65 +1726,6 @@ } } }); // this.multiFiberList.forEach((a, index) => { // a.fiber = []; // if (index > 0 && index < this.multiFiberList.length) { // if ( // this.multiFiberList[index].color == // this.multiFiberList[index - 1].color // ) { // // æ ¹æ®æ¯æ ¹ç®¡æ½æ£æ åé ç¡®å® é¢è²å¾ªç¯ // //let colors3 = colors2.slice(0,this.packageInfo.standNum) // for (var i = 0; i < parseInt(a.num); i++) { // let fiber = { // ident: this.fiberList.length + 1, // bushColor: a.color, // // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, // color: colors2[count].label, // model: null, // noSplitModel: null, // standard: null, // fibersIdent: a.ident, // productList: [], // }; // this.fiberList.push(fiber); // count++; // } // } else { // // æ ¹æ®æ¯æ ¹ç®¡æ½æ£æ åé ç¡®å® é¢è²å¾ªç¯ // let colors3 = colors2.slice(0, this.packageInfo.standNum); // for (var i = 0; i < parseInt(a.num); i++) { // let fiber = { // ident: this.fiberList.length + 1, // bushColor: a.color, // // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, // color: colors3[i].label, // model: null, // noSplitModel: null, // standard: null, // fibersIdent: a.ident, // productList: [], // }; // this.fiberList.push(fiber); // } // } // } else { // for (var i = 0; i < parseInt(a.num); i++) { // let fiber = { // ident: this.fiberList.length + 1, // bushColor: a.color, // // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, // color: colors2[i].label, // model: null, // noSplitModel: null, // standard: null, // fibersIdent: a.ident, // productList: [], // }; // this.fiberList.push(fiber); // } // } // }); } else { let count = 0; let colors3 = colors2.slice(0, this.packageInfo.standNum); @@ -1844,7 +1736,7 @@ let fiber = { ident: this.fiberList.length + 1, bushColor: item.color, color: colors3[count].label, color: colors3[count].dictLabel, model: null, standard: null, productList: [], @@ -1880,7 +1772,7 @@ let fiber = { ident: this.fiberList.length + 1, bushColor: item.color, color: colors3[count].label, color: colors3[count].dictLabel, model: null, standard: null, productList: [], @@ -1889,24 +1781,6 @@ count++; count = count % item.standNum; } // else { // for (let i = 0; i < parseInt(item.testNum); i++) { // let fiber = { // ident: this.fiberList.length + 1, // bushColor: item.color, // color: // colors2[ // i + parseInt(item.testNum) * index > colors2.length // ? 0 // : i + parseInt(item.testNum) * index * index // ].label, // model: null, // standard: null, // productList: [], // }; // this.fiberList.push(fiber); // } // } } else { flag = false; } @@ -1917,125 +1791,8 @@ return; } } // äºä»£ // // æ¯å¦éæ©å¥ç®¡ // if(this.selectBushing.length == 0) { // this.$message.error('æªéæ©å¥ç®¡') // return // } // this.fiberList = [] // let flag = true // // æç §é¡ºåºçæå çº¤è²æ // let colors2 = [] // if (this.packageInfo.num1 / this.colors.length > 1) { // let num = this.packageInfo.num1 / this.colors.length // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 // for (var i = 0; i < num; i++) { // colors2 = colors2.concat(this.colors) // } // } else { // colors2 = colors2.concat(this.colors) // } // // æ ¹æ®å¥ç®¡çæµè¯éçæå¯¹åºçæ°éçå çº¤æ°æ® // this.selectBushing.forEach((item,index) =>{ // if(item.testNum != null && item.testNum != ''){ // for(let i =0; i < parseInt(item.testNum); i++){ // let fiber = { // ident: this.fiberList.length + 1, // bushColor: item.color, // color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label, // model: null, // standard: null, // productList: [] // } // this.fiberList.push(fiber) // } // }else { // flag = false // } // }) // if(!flag){ // this.$message.error('请填åå çº¤æ£æµé') // return // } // æå // let colors2 = [] // if (this.packageInfo.num1 / this.colors.length > 1) { // let num = this.packageInfo.num1 / this.colors.length // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 // for (var i = 0; i < num; i++) { // colors2 = colors2.concat(this.colors) // } // } else { // colors2 = colors2.concat(this.colors) // } // this.fiberList = [] // let model = this.mireModel.split(' - ')[1] // let standard = this.mireStandards.find(a => a.id == this.mireStandard).code // if (this.packageInfo.ismiers) { // if(this.selectFibers.length === 0){ // this.$message.error('æªéæ©å 纤带') // return // } // this.selectFibers.forEach((a,index) => { // a.fiber = [] // for (var i = 0; i < parseInt(a.num); i++) { // let fiber = { // bushColor: a.color, // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, // model: model, // standard: standard, // productList: this.HaveJson(this.productList) // } // a.fiber.push(fiber) // this.fiberList.push(fiber) // } // }) // } else { // this.selectBushing.forEach((a,index) => { // a.fiber = [] // for (var i = 0; i < parseInt(a.testNum); i++) { // let fiber = { // bushColor: a.color, // color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label, // model: model, // standard: standard, // productList: this.HaveJson(this.productList) // } // a.fiber.push(fiber) // this.fiberList.push(fiber) // } // }) // } }, addFibers() { // if(this.selectBushing.length===0){ // this.$message.error('æªéæ©å¥ç®¡') // return // } // this.fibersList = [] // let standard = this.miresStandards.find(a => a.id == this.miresStandard).code // this.packageInfo.ismiers = true // this.fiberList = [] // this.selectBushing.forEach(a => { // a.fiber = [] // a.fibers = [] // for (var i = 0; i < parseInt(a.testNum); i++) { // let fibers = { // code: null, // color: a.color, // model: this.miresModel, // standard: standard, // num: a.testNum, // productList: this.HaveJson(this.productList2), // fiber: [] // } // a.fibers.push(fibers) // this.fibersList.push(fibers) // } // }) if (this.selectBushing.length == 0) { this.$message.error("æªéæ©å¥ç®¡"); return; @@ -2058,7 +1815,7 @@ let fibers = { ident: this.fibersList.length + 1, color: item.color, colorShow: item.color + "-" + colors2[i].label, colorShow: item.color + "-" + colors2[i].dictLabel, code: null, model: null, standard: null, @@ -2071,45 +1828,6 @@ }); }, rowClickFiber(row, column, event, type) { // console.log("row", row); // this.type = type // if(this.active===1){ // if(type==0){ // let standard = null; // try{ // standard = this.miresStandards.find(a => a.id == this.miresStandards) // }catch(e){} // if(standard&&standard.code=='å§æè¦æ±'){ // this.isAskOnlyRead = false; // }else{ // this.isAskOnlyRead = true; // } // }else{ // let standard = null; // try{ // standard = this.mireStandards.find(a => a.id == this.mireStandard) // }catch(e){} // if(standard&&standard.code=='å§æè¦æ±'){ // this.isAskOnlyRead = false; // }else{ // this.isAskOnlyRead = true; // } // } // } // if(this.type==1){ // if (this.active !== 1) { // this.sampleIds = [] // this.sampleIds.push(row.id) // } // } // this.currentDetectionItems = row // this.detectionItems = row.productList // if(this.detectionItems === null) return // setTimeout(() => { // this.detectionItems.forEach(a => { // if (a.state == 1) this.toggleSelection(a) // }) // }, 200) if (type == 1) { this.fiberList = row.fiber; if ( @@ -2129,64 +1847,60 @@ (a) => a.code == row.standard ).id; } this.$axios .post( this.$api.standardTree.selectStandardProductList, { model: "", standardMethodListId: this.miresStandard, factory: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel + " - ", }, { headers: { "Content-Type": "application/json", }, } ) selectStandardProductList({ model: "", standardMethodListId: this.miresStandard, factory: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å 纤带 - " + this.miresModel + " - ", }) .then((res) => { // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; this.$set(a, "isFibers", 1); }); // 夿æ¯å¦ä¸ºå§æè¦æ± this.miresStandards.find((a) => a.id == this.miresStandard) .code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); if (!this.isAskOnlyRead) { row.productList.forEach((a) => { res.data.forEach((b) => { if (a.id == b.id) { b.ask = a.ask; b.tell = a.tell; } }); if (res.code === 200) { // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; this.$set(a, "isFibers", 1); }); } this.detectionItems = res.data; this.detectionType = 1; this.$set(this.detectionItems, "type", 1); if (row.productList != null && row.productList.length > 0) { let product = JSON.parse(JSON.stringify(row.productList)); setTimeout(() => { product.forEach((p) => { let rowToSelect = this.detectionItems.find( (item) => item.id === p.id ); if (rowToSelect) { this.toggleSelection(rowToSelect); } // 夿æ¯å¦ä¸ºå§æè¦æ± this.miresStandards.find((a) => a.id == this.miresStandard) .code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); if (!this.isAskOnlyRead) { row.productList.forEach((a) => { res.data.forEach((b) => { if (a.id == b.id) { b.ask = a.ask; b.tell = a.tell; } }); }); }, 200); } this.detectionItems = res.data; this.detectionType = 1; this.$set(this.detectionItems, "type", 1); if (row.productList != null && row.productList.length > 0) { let product = JSON.parse(JSON.stringify(row.productList)); setTimeout(() => { product.forEach((p) => { let rowToSelect = this.detectionItems.find( (item) => item.id === p.id ); if (rowToSelect) { this.toggleSelection(rowToSelect); } }); }, 200); } } } }) .catch((error) => { console.error(error); }); }, 500); } else if (type == 0) { @@ -2207,60 +1921,56 @@ (a) => a.code == row.standard ).id; } this.$axios .post( this.$api.standardTree.selectStandardProductList, { model: this.mireModel.split(" - ")[1], standardMethodListId: this.mireStandard, factory: "", }, { headers: { "Content-Type": "application/json", }, } ) selectStandardProductList({ model: this.mireModel.split(" - ")[1], standardMethodListId: this.mireStandard, factory: "", }) .then((res) => { this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; this.$set(a, "isFibers", 0); }); // 夿æ¯å¦ä¸ºå§æè¦æ± this.mireStandards.find((a) => a.id == this.mireStandard) .code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); if (!this.isAskOnlyRead) { row.productList.forEach((a) => { res.data.forEach((b) => { if (a.id == b.id) { b.ask = a.ask; b.tell = a.tell; } }); if (res.code === 200) { this.detectionItems = []; if (res.data != null && res.data.length != 0) { res.data.forEach((a) => { a.state = 0; this.$set(a, "isFibers", 0); }); } this.detectionItems = res.data; this.detectionType = 0; this.$set(this.detectionItems, "type", 0); if (row.productList != null && row.productList.length > 0) { let product = JSON.parse(JSON.stringify(row.productList)); setTimeout(() => { product.forEach((p) => { let rowToSelect = this.detectionItems.find( (item) => item.id === p.id ); if (rowToSelect) { this.toggleSelection(rowToSelect); } // 夿æ¯å¦ä¸ºå§æè¦æ± this.mireStandards.find((a) => a.id == this.mireStandard) .code == "å§æè¦æ±" ? (this.isAskOnlyRead = false) : (this.isAskOnlyRead = true); if (!this.isAskOnlyRead) { row.productList.forEach((a) => { res.data.forEach((b) => { if (a.id == b.id) { b.ask = a.ask; b.tell = a.tell; } }); }); }, 200); } this.detectionItems = res.data; this.detectionType = 0; this.$set(this.detectionItems, "type", 0); if (row.productList != null && row.productList.length > 0) { let product = JSON.parse(JSON.stringify(row.productList)); setTimeout(() => { product.forEach((p) => { let rowToSelect = this.detectionItems.find( (item) => item.id === p.id ); if (rowToSelect) { this.toggleSelection(rowToSelect); } }); }, 200); } } } }) .catch((error) => { console.error(error); }); }, 500); } @@ -2298,12 +2008,6 @@ return item; }); } // else { // this.currentDetectionItems.productList.map((m) => { // m.state = 1; // return m; // }); // } } else { if (this.multiFiberList.length > 0) { this.multiFiberList.map((item) => { @@ -2314,12 +2018,6 @@ return item; }); } // else { // this.currentDetectionItems.productList.map((m) => { // m.state = 0; // return m; // }); // } } this.bsmRow3 = []; this.detectionItems.forEach((p) => { @@ -2372,12 +2070,6 @@ this.bsm2 = false; } } // if (p.ask.includes('RTS')&&p.state === 1) { // p.rts = '' // this.bsm3Val = '' // this.bsm3Dia = true // this.bsmRow3.push(p) // } }); if (e.length > 0) { @@ -2423,28 +2115,8 @@ this.$message.error("å ³è项ç®ä¸è½éå¤"); return; } // set.add(JSON.stringify(tempList[i].reverse())) // let num2 = set.size // if (num1 == num2) { // console.log(111,set); // console.log(111,tempList); // this.$message.error('å ³è项ç®ä¸è½éå¤') // return // } } //转æ¢çæ¥é 对çç¼å· // let transformList = [] // for(let i=0;i<this.bsm2Val2.length;i++){ // let colorIndex1 = Number(this.bsm2Val2[i][0]-1) // let colorIndex2 = Number(this.bsm2Val2[i][1]-1) // let code1 = this.sampleList[0].sampleCode + '-' + this.fiberList[colorIndex1].bushColor + '-' + this.fiberList[colorIndex1].color // let code2 = this.sampleList[1].sampleCode + '-' + this.fiberList[colorIndex2].bushColor + '-' + this.fiberList[colorIndex2].color // transformList.push([code1,code2]) // } this.isBsm2Val2 = true; // console.log(this.bsm2Val2); // console.log(transformList); // this.$parent.fiberPairing = JSON.stringify(this.bsm2Val2) } this.bsm1Dia = false; this.isBsm2Val2 = false; @@ -2465,9 +2137,6 @@ ); } let arr = [...new Set(this.fiberLoss)]; console.log("list", list); console.log("this.fiberLoss", this.fiberLoss); console.log("arr", arr); row.state = row.state == 1 ? 0 : 1; if (this.selectFiberList.length > 0) { this.selectFiberList.map((item) => { @@ -2527,23 +2196,6 @@ console.log("arr", arr); if (this.bsm2) { this.computationalPairing(this.selectFiberList.length); // é»è®¤å±ç¤ºä¸å¯¹ä¸ // this.bsm2Up(this.selectFiberList.length); // if (this.bsm2Val2.length === 0) { // this.bsm2Val = this.selectFiberList.length; // this.bsm2Val2 = this.HaveJson(this.bsm2Val3); // console.log(222, this.bsm2Val2); // } else { // this.bsm2Val = this.selectFiberList.length; // } // if (this.bsm2Val2.length === 0) { // this.bsm2Val = // ((this.fiberList.length + 1) * this.fiberList.length) / 2; // this.bsm2Val2 = this.HaveJson(this.bsm2Val3); // console.log(222, this.bsm2Val2); // } else { // this.bsm2Val = this.fiberPairing.length; // } } } } else if ( @@ -2556,15 +2208,6 @@ } else { this.bsm1Dia = false; } // if (row.ask.includes('RTS')&&row.state === 1) { // this.bsmRow3 = null; // row.rts = '' // this.bsm3Val = '' // this.bsm3Dia = true // this.bsmRow3 = row // }else{ // this.bsm3Dia = false // } }, checkSampleCodeHasNull() { const emptyCodeArr = this.sampleList.filter( @@ -2575,25 +2218,26 @@ computationalPairing(n, isValue = false) { this.bsm1Dia = true; this.isLoading = true; this.$axios .get(this.$api.insOrder.permute + "?num=" + n + "&isValue=" + isValue) permute({ num: n, isValue: isValue, }) .then((res) => { this.bsm2Val3Length = this.HaveJson(res.data.resultData); if (this.bsm2Val2.length === 0) { this.bsm2Val = this.selectFiberList.length; this.bsm2Val2 = this.HaveJson(this.bsm2Val3); console.log(222, this.bsm2Val2); } else { this.bsm2Val = this.selectFiberList.length; if (res.code === 200) { this.bsm2Val3Length = this.HaveJson(res.data.resultData); if (this.bsm2Val2.length === 0) { this.bsm2Val = this.selectFiberList.length; this.bsm2Val2 = this.HaveJson(this.bsm2Val3); } else { this.bsm2Val = this.selectFiberList.length; } this.bsm2Up(this.selectFiberList.length); this.isLoading = false; } this.bsm2Up(this.selectFiberList.length); this.isLoading = false; }) .catch((error) => { console.error(error); }); // const nums = []; // for (let i = 1; i <= n; i++) { // nums.push(i); // } // this.bsm2Val3 = this.HaveJson(this.permute(nums)); }, permute(nums) { const result = []; @@ -2632,30 +2276,6 @@ }); }, save() { // if(this.bushing.length === 0){ // this.$message.error('缺å°é ç½®æ æ³ä¿å') // return // } // for(let a in this.bushing){ // if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){ // this.$message.error(this.bushing[a].color+'ç®¡è²æ å¥ç®¡ç¼ºå°é ç½®æ æ³ä¿å') // return // } // } // this.sample.forEach(a=>{ // a.bushing = this.bushing // }) // this.$message.success('å·²ä¿å') // this.$emit('saveFiberopticConfig') // if(this.inspectionItemST == 1) { // this.$message.success('å·²ä¿å') // this.sample.forEach(a=>{ // a.bushing = this.bushing // }) // this.$emit('saveFiberopticConfig') // return // } let flag = true; let flags = true; @@ -3268,8 +2888,8 @@ let color = this.colors[i]; for (let j = 0; j < newFiberList.length; j++) { let newColor = newFiberList[j]; if (color.value == newColor[0]) { newFiberList[j].push(color.orderNum); if (color.dictValue == newColor[0]) { newFiberList[j].push(color.dictSort); } } } @@ -3297,19 +2917,6 @@ this.bsm2Val2 = resultList; console.log("this.bsm2Val2", this.bsm2Val2); } else { // if (val == this.bsm2Val3.length) { // this.bsm2Val2 = []; // this.computationalPairing(this.selectFiberList.length,true); // if (this.bsm2Val2.length === 0) { // this.bsm2Val = // ((this.selectFiberList.length + 1) * this.selectFiberList.length) / 2; // this.bsm2Val2 = this.HaveJson(this.bsm2Val3); // } else { // this.bsm2Val = this.selectFiberList.length; // } // this.bsm1DiaLoading = false; // console.log('loading',this,this.bsm1DiaLoading); // } else { // ä¸å¯¹ä¸ this.bsm1DiaLoading = true; let list = []; @@ -3352,6 +2959,7 @@ height: 100%; overflow-y: auto; overflow-x: hidden; padding: 10px 15px; } .models { font-size: 14px; src/views/business/inspectionOrder/index.vue
@@ -238,7 +238,7 @@ > <p style="font-size: 16px; color: #333333" v-if="!isQuash"> å§æç¼å·<span style="color: #34bd66">{{ this.insOrderRow.entrustCode this.insOrderRow.outEntrustCode }}</span >çä¿¡æ¯æ¯å¦æ¤é </p> @@ -258,14 +258,10 @@ </el-form-item> </el-form> <span slot="footer" class="dialog-footer"> <el-row v-if="!isQuash"> <el-button @click="handleClose">å æ¶</el-button> <el-button type="primary" @click="submitForm" :loading="upLoad" >ç¡® å®</el-button > </el-row> <el-row v-else> <el-button @click="handleClose">è¿ å</el-button> <el-row> <el-button @click="handleClose">{{ isQuash ? "è¿ å" : "å æ¶" }}</el-button> <el-button type="primary" @click="submitForm" :loading="upLoad" >ç¡® å®</el-button > @@ -390,18 +386,6 @@ width="80%" > <div class="table-container" v-if="deleteDialogVisible"> <!-- <ValueTable ref="ValueTableDataDelete" :url=" $api.insOrder.selectNoProducts + '?orderId=' + orderId + '&ids=' + this.revocationInsProductIds " :componentData="componentDataDelete" :isColumnWidth="true" /> --> <el-table height="500px" ref="revokeTable" @@ -822,28 +806,39 @@ </template> <script> import limsTable from "@/components/Table/lims-table.vue"; import { selectInsOrderParameter, labelPrinting, exportChecked, selectSampleAndProductByOrderId, hasSendUrgentOrder, delCustomById, upCustom, selectSampleByOrderId, selectProductsBySampleId, revoke, viewDetails, downReport, selectTemperatureByProductId, selectTemperatureNumberByProductId, revokeReviewTemperatureByProductId, revokeReviewConsistentByProductId, revokeReviewProduct, revokeReviewSample, upPlanUser2, updateStatus, updateInspected, revocationPassed, revocationCancel, } from "@/api/business/inspectionOrder"; import { getDicts } from "@/api/system/dict/data"; import vueQr from "vue-qr"; import getLodop from "@/utils/lodop"; import Add from "./add.vue"; import { mapGetters } from "vuex"; import LimsTable from "@/components/Table/lims-table.vue"; import limsTable from "@/components/Table/lims-table.vue"; export default { components: { limsTable, Add, vueQr, LimsTable, }, computed: { ...mapGetters(["permissions"]), @@ -1026,7 +1021,9 @@ { name: "å®¡æ ¸", type: "text", clickFun: (row) => {}, clickFun: (row) => { this.handleVerify(row); }, disabled: (row, index) => { return row.state != 0; }, @@ -1034,7 +1031,9 @@ { name: "æ¤é", type: "text", clickFun: (row) => {}, clickFun: (row) => { this.handlEquash(row); }, disabled: (row, index) => { return row.state != 1 && row.state != 0; }, @@ -1042,7 +1041,9 @@ { name: "æ¤éå®¡æ ¸", type: "text", clickFun: (row) => {}, clickFun: (row) => { this.handlEquashCheck(row); }, disabled: (row, index) => { return ( (row.state != 1 && row.state != 0) || @@ -1429,23 +1430,23 @@ entrustCode: row.entrustCode, sampleCode: row.sampleCode, }; this.$axios .post(this.$api.insOrder.viewDetails, data, { headers: { "Content-Type": "application/json", }, }) viewDetails(data) .then((res) => { this.viewDetailsList = res.data; if (res.data[0].tableHeader) { this.tableHeader = res.data[0].tableHeader; } else { this.tableHeader = [ { testValue0: "", }, ]; if (res.code === 200) { this.viewDetailsList = res.data; if (res.data[0].tableHeader) { this.tableHeader = res.data[0].tableHeader; } else { this.tableHeader = [ { testValue0: "", }, ]; } } }) .catch((error) => { console.error(error); }); }, getLabelPrinting(selection) { @@ -1663,16 +1664,7 @@ // document.body.appendChild(link); // link.click(); // } this.$axios .get( this.$api.insReport.downReport + "?id=" + row.reportId + "&type=1", { headers: { "Content-Type": "application/json", }, responseType: "blob", } ) downReport({ id: row.reportId }) .then((res) => { let fileName = row.tempUrlPdf; if (fileName.includes("_")) { @@ -1685,14 +1677,21 @@ link.download = fileName; document.body.appendChild(link); link.click(); }) .catch((error) => { console.error(error); }); }, // å®¡æ ¸ handleVerify(row) { // this.verifyDialogVisible = true; this.active = 3; this.currentId = row.id; this.examine = 1; this.$router.push({ name: "showDetails", query: { active: 3, currentId: row.id, examine: 1, }, }); }, // å ¨é handleSelectionAll(val) { @@ -1909,108 +1908,108 @@ if (this.deleteTilte == "æ¤é") { // æ¯å¦æ¯æ¸©åº¦å¾ªç¯ if (tree.temperature) { this.$axios .get( this.$api.insOrder.selectTemperatureByProductId + "?productId=" + tree.id ) selectTemperatureByProductId({ productId: tree.id }) .then((res) => { this.loadRecursion(this.treeTableData, tree.id, res.data); resolve(res.data); this.recursionTreeTableData(this.revokeData, this.treeTableData); treeNode.loading = false; if (res.code === 200) { this.loadRecursion(this.treeTableData, tree.id, res.data); resolve(res.data); this.recursionTreeTableData( this.revokeData, this.treeTableData ); treeNode.loading = false; } }) .catch((error) => { console.error(error); }); } // æ¯å¦æ¯æ£éªæ¬¡æ° else if (tree.temperatureNumber) { this.$axios .get( this.$api.insOrder.selectTemperatureNumberByProductId + "?parentId=" + tree.parentId + "&inspectionItem=" + tree.inspectionItemTwo ) selectTemperatureNumberByProductId({ parentId: tree.parentId, inspectionItem: tree.inspectionItemTwo, }) .then((res) => { this.loadRecursion(this.treeTableData, tree.id, res.data); resolve(res.data); this.recursionTreeTableData(this.revokeData, this.treeTableData); treeNode.loading = false; if (res.code === 200) { this.loadRecursion(this.treeTableData, tree.id, res.data); resolve(res.data); this.recursionTreeTableData( this.revokeData, this.treeTableData ); treeNode.loading = false; } }) .catch((error) => { console.error(error); }); } else { this.$axios .get( this.$api.insOrder.selectProductsBySampleId + "?sampleId=" + tree.id + "&orderId=" + this.orderId ) selectProductsBySampleId({ sampleId: tree.id, orderId: this.orderId, }) .then((res) => { this.treeTableData.forEach((m, index) => { if (m.sampleId == tree.id) { m.children = res.data; } }); resolve(res.data); this.recursionTreeTableData(this.revokeData, this.treeTableData); // // å¦æè¯¥æ ·åå·²ç»è¢«å¾é é£ä¹æå¾å°çæ£éªé¡¹ä¹è¦è¿è¡å¾é // let data = this.revokeData.map((item) => item.id); // if (data.includes(tree.id)) { // this.treeTableData.forEach((m, index) => { // if (m.children) { // m.children.forEach((n, i) => { // if (tree.id == n.sampleId) { // this.$refs.revokeTable.toggleRowSelection(n, true); // } // }); // } // }); // } treeNode.loading = false; if (res.code === 200) { this.treeTableData.forEach((m, index) => { if (m.sampleId == tree.id) { m.children = res.data; } }); resolve(res.data); this.recursionTreeTableData( this.revokeData, this.treeTableData ); treeNode.loading = false; } }) .catch((error) => { console.error(error); }); } } else if (this.deleteTilte == "æ¤éå®¡æ ¸") { // æ¯å¦æ¯æ¸©åº¦å¾ªç¯ if (tree.temperature) { this.$axios .get( this.$api.insOrder.revokeReviewTemperatureByProductId + "?productId=" + tree.id ) revokeReviewTemperatureByProductId({ productId: tree.id }) .then((res) => { resolve(res.data); treeNode.loading = false; if (res.code === 200) { resolve(res.data); treeNode.loading = false; } }) .catch((error) => { console.error(error); }); } // æ¯å¦æ¯å¾ªç¯æ¬¡æ° else if (tree.temperatureNumber) { this.$axios .get( this.$api.insOrder.revokeReviewConsistentByProductId + "?parentId=" + tree.parentId + "&inspectionItem=" + tree.inspectionItemTwo ) revokeReviewConsistentByProductId({ parentId: tree.parentId, inspectionItem: tree.inspectionItemTwo, }) .then((res) => { resolve(res.data); treeNode.loading = false; if (res.code === 200) { resolve(res.data); treeNode.loading = false; } }) .catch((error) => { console.error(error); }); } else { this.$axios .get( this.$api.insOrder.revokeReviewProduct + "?sampleId=" + tree.id + "&orderId=" + this.orderId ) revokeReviewProduct({ sampleId: tree.id, orderId: this.orderId, }) .then((res) => { resolve(res.data); treeNode.loading = false; if (res.code === 200) { resolve(res.data); treeNode.loading = false; } }) .catch((error) => { console.error(error); }); } } @@ -2021,18 +2020,20 @@ this.quashDialogVisible = true; this.insOrderRow = row; } else { // this.componentDataDelete.entity.orderId = row.id this.orderId = row.id; this.$axios .get(this.$api.insOrder.selectSampleByOrderId + "?orderId=" + row.id) selectSampleByOrderId({ orderId: row.id, }) .then((res) => { console.log("res", res); this.treeTableData = res.data; this.treeTableData2 = JSON.parse(JSON.stringify(res.data)); if (res.code === 200) { this.treeTableData = res.data; this.treeTableData2 = JSON.parse(JSON.stringify(res.data)); } }) .catch((error) => { console.error(error); }); this.revocationInsProductIds = ""; this.componentDataDelete.showSelect = true; this.componentDataDelete.select = true; this.deleteTilte = "æ¤é"; this.deleteDialogVisible = true; } @@ -2082,25 +2083,13 @@ } }); productIds = [...new Set(productIds)]; console.log("data", data); console.log("data1", data1); } // console.log("sampleId", sampleIds); console.log("productIds", productIds); let data = { orderId: this.orderId, sampleIds: sampleIds, productIds: productIds, }; this.$axios .post(this.$api.insOrder.revoke, data, { headers: { "Content-Type": "application/json", }, noQs: true, }) revoke(data) .then((res) => { if (res.code === 200) { this.deleteDialogVisible = false; @@ -2109,47 +2098,14 @@ this.refreshTable(); this.$message.success("æ¤éæå"); } }) .catch((error) => { console.error(error); }); console.log("revokeData", this.revokeData); console.log("data", data); // let ids = this.deleteList.map((m) => m.id).join(","); // this.printLoading = true; // this.axios // .put( // this.$api.insOrder.updateInspected + // "?ids=" + // ids + // "&orderId=" + // this.orderId // ) // .then((res) => { // if (res.code === 200) { // this.printLoading = false; // this.deleteDialogVisible = false; // this.refreshTable("page"); // this.$message.success("æ´æ°æå"); // } // }); } else { // this.axios // .post( // this.$api.insOrder.checkUpdate + // "?orderId=" + // this.orderId + // "&state=" + // 1 // ) // .then((res) => { // if (res.code === 200) { // this.printLoading = false; // this.deleteDialogVisible = false; // this.refreshTable("page"); // this.$message.success("æ´æ°æå"); // } // }); this.axios .get(this.$api.insOrder.revocationPassed + "?orderId=" + this.orderId) revocationPassed({ orderId: this.orderId, }) .then((res) => { if (res.code === 200) { this.printLoading = false; @@ -2157,28 +2113,26 @@ this.refreshTable(); this.$message.success("æ´æ°æå"); } }) .catch((error) => { console.error(error); }); } }, handlEquashCheck(row) { // // this.componentDataDelete.entity.orderId = row.id // this.orderId = row.id; // this.revocationInsProductIds = row.revocationInsProductIds; // this.componentDataDelete.showSelect = false; // this.componentDataDelete.select = false; // this.deleteTilte = "æ¤éå®¡æ ¸"; // this.deleteDialogVisible = true; this.orderId = row.id; this.revocationInsProductIds = row.revocationInsProductIds; this.componentDataDelete.showSelect = false; this.componentDataDelete.select = false; this.deleteTilte = "æ¤éå®¡æ ¸"; this.$axios .get(this.$api.insOrder.revokeReviewSample + "?orderId=" + row.id) revokeReviewSample({ orderId: row.id, }) .then((res) => { console.log("æ¤éå®¡æ ¸æ ·åæ¥è¯¢", res); this.treeTableData = res.data; if (res.code === 200) { this.treeTableData = res.data; } }) .catch((error) => { console.error(error); }); this.deleteDialogVisible = true; }, @@ -2187,24 +2141,9 @@ this.deleteDialogVisible = false; this.revokeData = []; } else { // this.axios // .post( // this.$api.insOrder.checkUpdate + // "?orderId=" + // this.orderId + // "&state=" + // 0 // ) // .then((res) => { // if (res.code === 200) { // this.printLoading = false; // this.deleteDialogVisible = false; // this.refreshTable("page"); // this.$message.success("æ´æ°æå"); // } // }); this.axios .get(this.$api.insOrder.revocationCancel + "?orderId=" + this.orderId) revocationCancel({ orderId: this.orderId, }) .then((res) => { if (res.code === 200) { this.printLoading = false; @@ -2212,26 +2151,32 @@ this.refreshTable(); this.$message.success("æ´æ°æå"); } }) .catch((error) => { console.error(error); }); } }, // ä¸å handleIssued(row) { this.issuedDialogVisible = true; this.$axios .post(this.$api.insOrder.selectOrderManDay, { id: row.id, }) selectOrderManDay({ id: row.id, }) .then((res) => { this.distributeData.orderId = row.id; this.distributeData.sampleId = row.sampleId; this.distributeData.appointed = res.data; this.distributeData.type = row.type; }); this.$axios .post(this.$api.insOrderPlan.upPlanUser2, { orderId: row.id, if (res.code === 200) { this.distributeData.orderId = row.id; this.distributeData.sampleId = row.sampleId; this.distributeData.appointed = res.data; this.distributeData.type = row.type; } }) .catch((error) => { console.error(error); }); upPlanUser2({ orderId: row.id, }) .then((res) => { if (res.code === 200 && res.data.length > 0) { this.sonLaboratoryList = []; @@ -2242,6 +2187,9 @@ }); }); } }) .catch((error) => { console.error(error); }); }, submitForm2() { @@ -2269,22 +2217,13 @@ return; } this.upLoad = true; this.$axios .post( this.$api.insOrder.upInsOrder, { orderId: this.distributeData.orderId, sampleId: this.distributeData.sampleId, appointed: this.distributeData.appointed, userIdList: [this.distributeData.userId], sonLaboratory: this.distributeData.sonLaboratory, }, { headers: { "Content-Type": "application/json", }, } ) upInsOrder({ orderId: this.distributeData.orderId, sampleId: this.distributeData.sampleId, appointed: this.distributeData.appointed, userIdList: [this.distributeData.userId], sonLaboratory: this.distributeData.sonLaboratory, }) .then((res) => { if (res.code === 201) { this.upLoad = false; @@ -2295,7 +2234,8 @@ this.issuedDialogVisible = false; this.refreshTable(); }) .catch((e) => { .catch((error) => { console.error(error); this.$message.error("ä¿®æ¹å¤±è´¥"); this.upLoad = false; }); @@ -2303,10 +2243,9 @@ submitForm() { this.upLoad = true; if (this.tabIndex == 1) { this.axios .put( this.$api.insOrder.updateInspected + "?id=" + this.insOrderRow.id ) updateInspected({ id: this.insOrderRow.id, }) .then((res) => { if (res.code === 200) { this.upLoad = false; @@ -2314,10 +2253,14 @@ this.refreshTable(); this.$message.success("æ´æ°æå"); } }) .catch((error) => { console.error(error); }); } else { this.axios .put(this.$api.insOrder.updateStatus + "?id=" + this.insOrderRow.id) updateStatus({ id: this.insOrderRow.id, }) .then((res) => { if (res.code === 200) { this.upLoad = false; @@ -2325,17 +2268,11 @@ this.refreshTable(); this.$message.success("æ´æ°æå"); } }) .catch((error) => { console.error(error); }); } let authorizedPerson = this.formData.authorizedPerson.length > 0 ? this.formData.authorizedPerson.join(",") : ""; delete this.formData.createTime; delete this.formData.updateTime; delete this.formData.createUser; delete this.formData.updateUser; this.formData.authorizedPerson = authorizedPerson; }, // ä¸å playOrder(num) { @@ -2353,49 +2290,6 @@ this.tabIndex = i; this.queryParams.state = m.value; this.getList(); }, getUserMenu() { this.$axios.get(this.$api.user.getUserMenu).then((res) => { let data = []; res.data.forEach((a) => { data.push({ label: a.name, value: a.id, }); }); this.componentData.tagField.createUser.select = data; }); }, getInsStateDicts() { this.$axios .post(this.$api.enums.selectEnumByCategory, { category: "æ£éªä»»å¡ç¶æ", }) .then((res) => { let data = res.data; this.insStateList = data; data.forEach((ele) => { //0:å¾ æ£éª 1:æ£éªä¸ 2:å·²æ£éª 3:å¾ å¤æ ¸ 4:夿 ¸æªéè¿ 5:夿 ¸éè¿ if (["2", "5"].includes(ele.value)) { ele.type = "success"; } else if (["1", "3"].includes(ele.value)) { ele.type = "warning"; } else if (["0", "4"].includes(ele.value)) { ele.type = "danger"; } }); this.componentDataDataLook.tagField.insState.select = data; this.componentDataDelete.tagField.insState.select = data; }); }, selectEnumByCategoryForOrderType() { this.$axios .post(this.$api.enums.selectEnumByCategory, { category: "æ£éªç±»å«", }) .then((res) => { this.componentData.tagField.orderType.select = res.data; }); }, changeUser() { if (this.sonLaboratoryList.length > 0) { src/views/business/reportPreparation/index.vue
@@ -857,6 +857,7 @@ examineReport, downLoad, getReportInfo, getURL } from "../../../api/business/reportPreparation"; export default { @@ -1798,11 +1799,17 @@ }, handleApprove(row) { this.currentInfo = row; getURL().then(res => { }) let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS; fileName = fileName.replace("/word/", ""); const userName = JSON.parse(localStorage.getItem("user")).name; const userName = this.$store.state.user.name; this.option = { url: this.javaApi + "/word/" + fileName, url: javaApi + "/word/" + fileName, isEdit: false, fileType: "docx", title: fileName,