From 64e66a21a9111bbd21c442f3657f098f96f7b4df Mon Sep 17 00:00:00 2001 From: wente <329538422@qq.com> Date: 星期二, 19 三月 2024 09:01:20 +0800 Subject: [PATCH] 线条拖动 --- web/src/views/modules/basicInfo/ParamData.vue | 140 +++++++++++++++++++++------------------------- 1 files changed, 65 insertions(+), 75 deletions(-) diff --git a/web/src/views/modules/basicInfo/ParamData.vue b/web/src/views/modules/basicInfo/ParamData.vue index 0f5bdd5..56d6f3a 100644 --- a/web/src/views/modules/basicInfo/ParamData.vue +++ b/web/src/views/modules/basicInfo/ParamData.vue @@ -7,9 +7,9 @@ </div> </el-col> <el-col :span="19"> - <div class="mod-basicInfo-paramDataExpect}"> - <zt-table-wraper ref="tableObj" :query-url=queryUrl - :delete-url=deleteUrl + <div class="mod-basicInfo-paramData}"> + <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/basicInfo/ParamData/page" + delete-url="/basicInfo/ParamData" @dataLoaded="dataLoaded" v-slot="{ table }" :paging='false'> @@ -51,9 +51,9 @@ </el-table-column> <el-table-column v-if="dataForm.nodeType==='2'" :key="5" label="鍩烘湰鍙潬鎬ц绠�"> <!-- <zt-table-column-dict prop="joinCompute" :keys="6" label="鍙傚姞璁$畻" width="100" dict="is_or_not"/>--> - <el-table-column prop="joinCompute" label="鍙傚姞璁$畻" :key="6" width="100"> + <el-table-column prop="basicJoinCompute" label="鍙傚姞璁$畻" :key="6" width="100"> <template v-slot="{ row }"> - <el-select v-if="row.isEdit" v-model="row.joinCompute" + <el-select v-if="row.isEdit" v-model="row.basicJoinCompute" placeholder="鍙傚姞璁$畻"> <el-option v-for="item in isOrNot" :key="item.value" @@ -61,96 +61,96 @@ :value="item.value"> </el-option> </el-select> - <zt-dict-tag v-else dict="is_or_not" :value="row.joinCompute" :typeS="typeS" :typeI="typeI" + <zt-dict-tag v-else dict="is_or_not" :value="row.basicJoinCompute" :typeS="typeS" :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> </template> </el-table-column> - <el-table-column prop="regulateMtbf" :key="7" label="瑙勫畾MTBF" width="120"> + <el-table-column prop="basicMtbfRegulate" :key="7" label="瑙勫畾MTBF" width="120"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.regulateMtbf"></el-input> - <span v-else v-text="scope.row.regulateMtbf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulate"></el-input> + <span v-else v-text="scope.row.basicMtbfRegulate"></span> </template> </el-table-column> - <el-table-column prop="acceptMtbf" :key="8" label="鍙帴鍙楃殑MTBF" width="160"> + <el-table-column prop="basicMtbfAccept" :key="8" label="鍙帴鍙楃殑MTBF" width="160"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.acceptMtbf"></el-input> - <span v-else v-text="scope.row.acceptMtbf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAccept"></el-input> + <span v-else v-text="scope.row.basicMtbfAccept"></span> </template> </el-table-column> - <el-table-column prop="regulSuccRateMtbf" :key="9" label="MTBF瑙勫畾鎴愬姛鐜�" width="180"> + <el-table-column prop="basicMtbfRegulSuccRate" :key="9" label="MTBF瑙勫畾鎴愬姛鐜�" width="180"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.regulSuccRateMtbf"></el-input> - <span v-else v-text="scope.row.regulSuccRateMtbf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulSuccRate"></el-input> + <span v-else v-text="scope.row.basicMtbfRegulSuccRate"></span> </template> </el-table-column> - <el-table-column prop="acceptSuccRateMtbf" :key="10" label="MTBF鍙帴鍙楁垚鍔熺巼" width="180"> + <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF鍙帴鍙楁垚鍔熺巼" width="180"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.acceptSuccRateMtbf"></el-input> - <span v-else v-text="scope.row.acceptSuccRateMtbf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAcceptSuccRate"></el-input> + <span v-else v-text="scope.row.basicMtbfAcceptSuccRate"></span> </template> </el-table-column> - <el-table-column prop="unitNum" label="鍗曞厓鏁伴噺" :key="11" width="100"> + <el-table-column prop="basicUnitNum" label="鍗曞厓鏁伴噺" :key="11" width="100"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.unitNum"></el-input> - <span v-else v-text="scope.row.unitNum"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicUnitNum"></el-input> + <span v-else v-text="scope.row.basicUnitNum"></span> </template> </el-table-column> - <el-table-column prop="runsNum" label="杩愯娆℃暟" :key="12" width="100"> + <el-table-column prop="basicRunsNum" label="杩愯娆℃暟" :key="12" width="100"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.runsNum"></el-input> - <span v-else v-text="scope.row.runsNum"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicRunsNum"></el-input> + <span v-else v-text="scope.row.basicRunsNum"></span> </template> </el-table-column> - <el-table-column prop="operatingRatioMtbf" :key="13" label="MTBF杩愯姣�" width="140"> + <el-table-column prop="basicMtbfOperatingRatio" :key="13" label="MTBF杩愯姣�" width="140"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.operatingRatioMtbf"></el-input> - <span v-else v-text="scope.row.operatingRatioMtbf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfOperatingRatio"></el-input> + <span v-else v-text="scope.row.basicMtbfOperatingRatio"></span> </template> </el-table-column> - <el-table-column prop="singleRunTime" :key="14" label="鍗曟杩愯鏃堕棿" width="140"> + <el-table-column prop="basicSingleRunTime" :key="14" label="鍗曟杩愯鏃堕棿" width="140"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.singleRunTime"></el-input> - <span v-else v-text="scope.row.singleRunTime"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.basicSingleRunTime"></el-input> + <span v-else v-text="scope.row.basicSingleRunTime"></span> </template> </el-table-column> </el-table-column> <el-table-column v-if="dataForm.nodeType==='2'" :key="15" label="浠诲姟鍙潬鎬ц绠�"> - <el-table-column prop="regulateMtbcf" :key="16" label="瑙勫畾MTBCF" width="120"> + <el-table-column prop="taskMtbcfRegulate" :key="16" label="瑙勫畾MTBCF" width="120"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.regulateMtbcf"></el-input> - <span v-else v-text="scope.row.regulateMtbcf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulate"></el-input> + <span v-else v-text="scope.row.taskMtbcfRegulate"></span> </template> </el-table-column> - <el-table-column prop="acceptMtbcf" :key="17" label="鍙帴鍙楃殑MTBCF" width="160"> + <el-table-column prop="taskMtbcfAccept" :key="17" label="鍙帴鍙楃殑MTBCF" width="160"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.acceptMtbcf"></el-input> - <span v-else v-text="scope.row.acceptMtbcf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAccept"></el-input> + <span v-else v-text="scope.row.taskMtbcfAccept"></span> </template> </el-table-column> - <el-table-column prop="regulSuccRateMtbcf" :key="18" label="MTBCF瑙勫畾鎴愬姛鐜�" width="180"> + <el-table-column prop="taskMtbcfRegulSuccRate" :key="18" label="MTBCF瑙勫畾鎴愬姛鐜�" width="180"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.regulSuccRateMtbcf"></el-input> - <span v-else v-text="scope.row.regulSuccRateMtbcf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulSuccRate"></el-input> + <span v-else v-text="scope.row.taskMtbcfRegulSuccRate"></span> </template> </el-table-column> - <el-table-column prop="acceptSuccRateMtbcf" :key="19" label="MTBCF鍙帴鍙楁垚鍔熺巼" width="200"> + <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF鍙帴鍙楁垚鍔熺巼" width="200"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.acceptSuccRateMtbcf"></el-input> - <span v-else v-text="scope.row.acceptSuccRateMtbcf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAcceptSuccRate"></el-input> + <span v-else v-text="scope.row.taskMtbcfAcceptSuccRate"></span> </template> </el-table-column> - <el-table-column prop="operatingRatioMtbcf" :key="20" label="MTBCF杩愯姣�" width="140"> + <el-table-column prop="taskMtbcfOperatingRatio" :key="20" label="MTBCF杩愯姣�" width="140"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.operatingRatioMtbcf"></el-input> - <span v-else v-text="scope.row.operatingRatioMtbcf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOperatingRatio"></el-input> + <span v-else v-text="scope.row.taskMtbcfOperatingRatio"></span> </template> </el-table-column> - <el-table-column prop="otherParamsMtbcf" :key="21" label="MTBCF鍏朵粬鍙傛暟" width="160"> + <el-table-column prop="taskMtbcfOtherParams" :key="21" label="MTBCF鍏朵粬鍙傛暟" width="160"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.otherParamsMtbcf"></el-input> - <span v-else v-text="scope.row.otherParamsMtbcf"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOtherParams"></el-input> + <span v-else v-text="scope.row.taskMtbcfOtherParams"></span> </template> </el-table-column> </el-table-column> @@ -160,7 +160,7 @@ <el-table-column prop="repairable" label="鍙淮淇�" :key="23"> <template v-slot="{ row }"> <el-select v-if="row.isEdit" v-model="row.repairable" - placeholder="褰撳墠鐘舵��"> + placeholder="璇烽�夋嫨"> <el-option v-for="item in isOrNot" :key="item.value" :label="item.label" @@ -176,7 +176,7 @@ <el-table-column prop="repairDistribType" label="缁翠慨鍒嗗竷绫诲瀷" :key="24" width="140"> <template v-slot="{ row }"> <el-select v-if="row.isEdit" v-model="row.repairDistribType" - placeholder="褰撳墠鐘舵��"> + placeholder="璇烽�夋嫨"> <el-option v-for="item in repairDistribType" :key="item.value" :label="item.label" @@ -188,16 +188,16 @@ :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> </template> </el-table-column> - <el-table-column prop="mttcr" label="MTTCR" :key="25" width="100"> + <el-table-column prop="repairMttcr" label="MTTCR" :key="25" width="100"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.mttcr"></el-input> - <span v-else v-text="scope.row.mttcr"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcr"></el-input> + <span v-else v-text="scope.row.repairMttcr"></span> </template> </el-table-column> - <el-table-column prop="otherParamsMttcr" :key="26" label="MTTCR鍏朵粬鍙傛暟" width="180"> + <el-table-column prop="repairMttcrOtherParams" :key="26" label="MTTCR鍏朵粬鍙傛暟" width="180"> <template slot-scope="scope"> - <el-input v-if="scope.row.isEdit" v-model="scope.row.mttcr"></el-input> - <span v-else v-text="scope.row.mttcr"></span> + <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcrOtherParams"></el-input> + <span v-else v-text="scope.row.repairMttcrOtherParams"></span> </template> </el-table-column> </el-table-column> @@ -208,14 +208,14 @@ width="160"> <template v-slot="{ row }"> <el-select v-if="row.isEdit" v-model="row.reliabDistribType" - placeholder="褰撳墠鐘舵��"> + placeholder="璇烽�夋嫨"> <el-option v-for="item in reliabDistribType" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> - <zt-dict-tag v-else dict="ReliabDistribType" :value="row.repairDistribType" :typeS="typeS" + <zt-dict-tag v-else dict="ReliabDistribType" :value="row.reliabDistribType" :typeS="typeS" :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/> </template> @@ -252,8 +252,6 @@ export default { data() { return { - queryUrl: '/basicInfo/ParamDataExpect/page', - deleteUrl: '/basicInfo/ParamDataExpect', pageCode: '', key: '', typeS: '', @@ -289,14 +287,14 @@ reliabDistribType: [ { value: 1, - label: '浜岄」鍒嗗竷' + label: '鎸囨暟鍒嗗竷' }, { value: 2, - label: '濞佸竷灏斿垎甯�' + label: '浜岄」鍒嗗竷' }, { value: 3, - label: '鎸囨暟鍒嗗竷' + label: '濞佸竷灏斿垎甯�' }, ], // editingCell:null, @@ -311,30 +309,22 @@ mounted() { this.pageCode = this.$route.query.pageCode this.dataForm.pageCode = this.$route.query.pageCode - if (this.pageCode === 'assign') { - this.queryUrl = '/basicInfo/ParamDataAssign/page' - this.deleteUrl = '/basicInfo/ParamDataAssign' - } console.log(this.pageCode, 'this.pageCode this.pageCode') }, methods: { add() { this.$refs.SelectTyModel.$refs.dialog.init(null, { type: this.dataForm.nodeType - 1, - id: this.dataForm.id, + id: this.dataForm.srcId, pageCode: this.pageCode }) + console.log(this.dataForm.srcId, 'add') }, //鎵归噺淇濆瓨 async handleSaveRows() { this.dataForm.dataThreeList = this.$refs.tableObj.dataList console.log(this.dataForm, 'this.dataForm this.dataForm') - let res - if (this.pageCode === 'Expect') { - res = await this.$http.post('/basicInfo/ParamDataExpect/save', this.dataForm) - } else { - res = await this.$http.post('/basicInfo/ParamDataAssign/save', this.dataForm) - } + let res = await this.$http.post('/basicInfo/ParamData/save', this.dataForm) if (res.success) { console.log(res.data) await this.$tip.success() @@ -373,7 +363,7 @@ // }, onProductSelected(data) { this.dataForm.srcId = data.id - this.dataForm.nodeType = data.nodeType + this.dataForm.nodeType = data.productType console.log(data, 'onProductSelected(data)') this.$refs.tableObj.query() }, -- Gitblit v1.9.1