From 195bb5267a6ece13363303e177fee7d1fa3941aa Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期二, 19 十一月 2024 15:25:25 +0800 Subject: [PATCH] 修改 --- web/src/views/modules/basicInfo/SelectTyModel.vue | 42 +++++++++++++++++------------------------- 1 files changed, 17 insertions(+), 25 deletions(-) diff --git a/web/src/views/modules/basicInfo/SelectTyModel.vue b/web/src/views/modules/basicInfo/SelectTyModel.vue index 2b5c2d8..4b1da4a 100644 --- a/web/src/views/modules/basicInfo/SelectTyModel.vue +++ b/web/src/views/modules/basicInfo/SelectTyModel.vue @@ -1,5 +1,5 @@ <template> - <zt-dialog ref="dialog" column="2" title="閫夋嫨閫氱敤妯″瀷" append-to-body :editAble="false" :hasConfirm="true" + <zt-dialog ref="dialog" column="2" title="閫夋嫨閫氱敤浜у搧鑺傜偣" append-to-body :editAble="false" :hasConfirm="true" @confirm="formSubmit"> <el-card shadow="never" class="aui-card--fill"> <div class="mod-tyProductModel-tyProductModel}"> @@ -13,7 +13,9 @@ @selection-change="changeRow"> <el-table-column type="selection" width="40" align="center"/> <el-table-column prop="name" label="鍚嶇О"/> - <zt-table-column-dict prop="nodeType" label="鑺傜偣绫诲瀷" dict="product"/> + <zt-table-column-dict v-if="!pageCode" prop="nodeType" label="鑺傜偣绫诲瀷" dict="product"/> + <zt-table-column-dict v-else prop="productType" label="鑺傜偣绫诲瀷" dict="product"/> + <el-table-column prop="sort" label="鎺掑簭"/> </el-table> </zt-table-wraper> </div> @@ -26,16 +28,17 @@ name: 'SelectTyModel', data() { return { - url: '/basicInfo/XhProductModel/page', + url: '/basicInfo/TyProductModel/page', selectList: [], data: '', - pageCode:'', dataForm: { type: 'noTree', nodeType: '', + shipId:'', id: '', pid: '', name: '', + namePath: '', operationalStatus: '', standbyState: '', faultState: '', @@ -48,39 +51,28 @@ init(id, params) { this.dataForm.nodeType = params.type this.dataForm.pid = params.id - this.pageCode = params.pageCode - if (!this.pageCode) { - this.url = '/basicInfo/TyProductModel/page' - } + this.dataForm.shipId =params.shipId + this.dataForm.namePath =params.namePath console.log(params, 'init()') }, changeRow(selection) { console.log(selection, ' changeRow(selection)') let item = {} for (item of selection) { - console.log(item) item.pid = this.dataForm.pid + item.namePath = this.dataForm.namePath + item.shipId = this.dataForm.shipId } this.selectList = selection - this.selectList.forEach( item => { - item.pageCode = this.pageCode - }) }, async formSubmit() { - let res - if (this.pageCode) { - if (this.pageCode === 'expect' || this.pageCode === 'assign') { - res = await this.$http.post('/basicInfo/ParamData/get', this.selectList) - } - } else { - res = await this.$http.post('/basicInfo/XhProductModel/get', this.selectList) - } - if (res.success) { - await this.$tip.success() - this.$refs.dialog.close() - this.$emit('refreshDataList') - } + let res = await this.$http.post('/basicInfo/XhProductModel/get', this.selectList) + if (res.success) { + await this.$tip.success() + this.$refs.dialog.close() + this.$emit('refreshDataList') } } } + } </script> -- Gitblit v1.9.1