From 9da0675fa67f1f03f48881b2664da4c01356d1b5 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期三, 23 七月 2025 15:01:08 +0800 Subject: [PATCH] 插回损--功能修改 --- src/views/equipment/lossrecord/index.vue | 127 +++++++++++++++--------------------------- 1 files changed, 45 insertions(+), 82 deletions(-) diff --git a/src/views/equipment/lossrecord/index.vue b/src/views/equipment/lossrecord/index.vue index caa3d79..d2cc968 100644 --- a/src/views/equipment/lossrecord/index.vue +++ b/src/views/equipment/lossrecord/index.vue @@ -13,6 +13,25 @@ <template #toolbar></template> </ttable> </basic-container> + <el-dialog width="80%" title="瀹為獙鏁版嵁" :visible.sync="dialogShow"> + <el-table :data="tableData" style="width: 100%"> + <el-table-column prop="specification" label="瑙勬牸" width="180"> + </el-table-column> + <el-table-column prop="channel" label="棰戦亾" width="180"> + </el-table-column> + <el-table-column prop="insertionLoss" label="鎻掑叆鎹熻��"> + </el-table-column> + <el-table-column prop="returnLoss" label="鍥炴尝鎹熻��"> </el-table-column> + <el-table-column prop="testLength" label="闀垮害"> </el-table-column> + <!-- <el-table-column prop="specification2" label="瑙勬牸" width="180"> + </el-table-column> + <el-table-column prop="channel2" label="棰戦亾" width="180"> + </el-table-column> + <el-table-column prop="insertionLoss2" label="鎻掑叆鎹熻��"> + </el-table-column> + <el-table-column prop="returnLoss2" label="鍥炴尝鎹熻��"> </el-table-column> --> + </el-table> + </el-dialog> </div> </template> @@ -20,11 +39,12 @@ import { downloadLossWord, recordList, - syncLossRecordFile + syncLossRecordFile, + getLossRecords } from '@/api/equipment/lossRecord' import { mapGetters } from 'vuex' import ttable from '@/views/common/ztt-table.vue' -import { transformDoc} from '@/util/fileTransform' +import { transformDoc } from '@/util/fileTransform' export default { data() { return { @@ -60,7 +80,6 @@ column: [ { minWidth: '150', - width: '100', prop: 'sourceFile', label: '鏁版嵁鏉ユ簮', sort: false, @@ -69,7 +88,6 @@ }, { minWidth: '150', - width: '100', prop: 'productNum1', label: '浜у搧缂栧彿1', sort: false, @@ -78,7 +96,6 @@ }, { minWidth: '150', - width: '100', prop: 'productNum2', label: '浜у搧缂栧彿2', sort: false, @@ -87,7 +104,6 @@ }, { minWidth: '150', - width: '100', prop: 'batchNum1', label: '鎵规缂栧彿1', sort: false, @@ -96,7 +112,6 @@ }, { minWidth: '150', - width: '100', prop: 'batchNum2', label: '鎵规缂栧彿2', sort: false, @@ -105,79 +120,6 @@ }, { minWidth: '150', - width: '100', - prop: 'specification1', - label: '瑙勬牸', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', - prop: 'channel1', - label: '棰戦亾', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', - prop: 'insertionLoss1', - label: '鎻掑叆鎹熻��', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', - prop: 'returnLoss1', - label: '鍥炴尝鎹熻��', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', - prop: 'specification2', - label: '瑙勬牸', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', - prop: 'channel2', - label: '棰戦亾', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', - prop: 'insertionLoss2', - label: '鎻掑叆鎹熻��', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', - prop: 'returnLoss2', - label: '鍥炴尝鎹熻��', - sort: false, - isTrue: true, - isSearch: true - }, - { - minWidth: '150', - width: '100', prop: 'createTime', label: '鍒涘缓鏃堕棿', sort: true, @@ -197,7 +139,10 @@ } }, addOrUpdateVisible: false, - workshopList: [] + workshopList: [], + tableData: [ + ], + dialogShow: false } }, components: { @@ -215,8 +160,13 @@ }) const arr = [] arr.push({ + text: '璇︽儏', + type: 'text', + size: 'small', + fun: this.showExperimentalData + }) + arr.push({ text: '瀵煎嚭', - icon: 'el-icon-download', type: 'text', size: 'small', fun: this.downloadFile @@ -239,6 +189,19 @@ }) }, + // 灞曠ず瀹為獙鏁版嵁 + showExperimentalData(row) { + getLossRecords(row.id) + .then((res) => { + console.log('res', res) + this.tableData = res.data.data + this.dialogShow = true + }) + .error((err) => { + console.log('err', err) + }) + }, + handleSelectionChange(val) { this.multipleSelection = val } -- Gitblit v1.9.3