From dcf9c9e0410fe1186239e3f8d6f7bdc789c08010 Mon Sep 17 00:00:00 2001 From: lzhe <lzhe@example.com> Date: 星期三, 05 六月 2024 18:00:39 +0800 Subject: [PATCH] 1 --- src/views/configuration/custom/setField.vue | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/views/configuration/custom/setField.vue b/src/views/configuration/custom/setField.vue index 622a21e..3895381 100644 --- a/src/views/configuration/custom/setField.vue +++ b/src/views/configuration/custom/setField.vue @@ -2,13 +2,13 @@ * @Author: lzhe lzhe@example.com * @Date: 2024-03-26 10:28:33 * @LastEditors: lzhe lzhe@example.com - * @LastEditTime: 2024-05-13 11:39:54 + * @LastEditTime: 2024-05-29 15:24:20 * @FilePath: /smart-web/src/views/master/person/main/index.vue * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> <template> <div class="aposcope-main"> - <div class="title">璁″垝瀛楁</div> + <div class="title">{{$route.query.type == 1?"璁″垝":"浜у搧"}}瀛楁</div> <el-button type="primary" @click="addField" style="margin: 4px 0px 10px;">娣诲姞鑷畾涔夊瓧娈�</el-button> <div class="field-table"> <el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef"> @@ -19,7 +19,7 @@ <el-table-column fixed="right" label="鎿嶄綔"> <template #default="scope"> <el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">缂栬緫</el-button> - <el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)">鍒犻櫎</el-button> + <el-button text type="primary" :disabled="scope.row.systemFieldLabel == '鏄�'?true: false" size="small" @click="table_del(scope.row, scope.$index)">鍒犻櫎</el-button> </template> </el-table-column> </el-table> @@ -50,22 +50,30 @@ }, methods: { addFieldSuccess() { - + this.getTableData(); }, addField() { - this.dialog.save = true + this.dialog.save = true; this.$nextTick(() => { this.$refs.saveDialog.open() }) }, - table_edit() { - + table_edit(row) { + this.dialog.save = true; + this.$nextTick(() => { + this.$refs.saveDialog.open('edit').setData(row); + }) }, - table_del() { - + table_del(row) { + this.$HTTP.delete(`/api/blade-system/custom-template-field/remove`,[row.id]).then(res=> { + if(res.code == 200) { + this.$message.success("鎿嶄綔鎴愬姛"); + this.getTableData(); + } + }) }, getTableData() { - this.$HTTP.get(`/api/blade-system/custom-template-field/list?businessType=1`).then(res=> { + this.$HTTP.get(`/api/blade-system/custom-template-field/list?businessType=${this.$route.query.type}`).then(res=> { if(res.code == 200) { this.tableData = res.data; } -- Gitblit v1.9.3