From 664db98c9e8595ce4dd636a27f480e3a08b81ff5 Mon Sep 17 00:00:00 2001 From: xyc <jc_xiong@hotmail.com> Date: 星期五, 21 二月 2025 11:13:51 +0800 Subject: [PATCH] 新增可忽略的维修时间 --- web/src/views/modules/basicInfo/SelectTyModel.vue | 44 +++++++++++++++++++++++++++++++++----------- 1 files changed, 33 insertions(+), 11 deletions(-) diff --git a/web/src/views/modules/basicInfo/SelectTyModel.vue b/web/src/views/modules/basicInfo/SelectTyModel.vue index fba603c..4b1da4a 100644 --- a/web/src/views/modules/basicInfo/SelectTyModel.vue +++ b/web/src/views/modules/basicInfo/SelectTyModel.vue @@ -1,18 +1,21 @@ <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}"> - <zt-table-wraper query-url="/basicInfo/TyProductModel/page" + <zt-table-wraper :query-url=url + :paging='false' v-slot="{ table }"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> </el-form> <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" border - @selection-change="table.selectionChangeHandle" - @selected="onSelected"> + @selection-change="changeRow"> <el-table-column type="selection" width="40" align="center"/> <el-table-column prop="name" label="鍚嶇О"/> + <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> @@ -25,30 +28,49 @@ name: 'SelectTyModel', data() { return { + url: '/basicInfo/TyProductModel/page', + selectList: [], + data: '', dataForm: { - type:'noTree', + type: 'noTree', nodeType: '', + shipId:'', + id: '', pid: '', name: '', + namePath: '', operationalStatus: '', standbyState: '', faultState: '', + sort: '' } } }, components: {}, methods: { - init(type) { - this.dataForm.nodeType = type - console.log(this.dataForm.nodeType, 'init()') + init(id, params) { + this.dataForm.nodeType = params.type + this.dataForm.pid = params.id + this.dataForm.shipId =params.shipId + this.dataForm.namePath =params.namePath + console.log(params, 'init()') }, - async onSelected() { - let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm) + changeRow(selection) { + console.log(selection, ' changeRow(selection)') + let item = {} + for (item of selection) { + item.pid = this.dataForm.pid + item.namePath = this.dataForm.namePath + item.shipId = this.dataForm.shipId + } + this.selectList = selection + }, + async formSubmit() { + 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') - this.map.clear() } } } -- Gitblit v1.9.1