From baf335094eb69b68a70c5a1010a5fb08bc1222cf Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期一, 03 七月 2023 18:01:37 +0800
Subject: [PATCH] 1、主要对修改码段选择层级码段时加了一个值截取长度的框以及相关处理逻辑。 2、对模板属性批量保存保存进行了修改。

---
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 7649338..68cdd6c 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -247,6 +247,7 @@
       <el-table-column v-for="item in this.option.column" :key="item.id"
                        :label="item.label"
                        :prop="item.prop"
+                       :formatter="formAttr"
                        :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
                        :show-overflow-tooltip="true"
                        align="center"
@@ -254,6 +255,11 @@
         <template slot-scope="{ row }">
           <el-input v-if="editingRows === row && editShows== item.prop" v-model="row[item.prop]"
                     @blur="saveRows"></el-input>
+          <el-switch
+            v-if="item.label === 'true' || item.label === 'false'"
+            active-color="#13ce66"
+            inactive-color="#ff4949">
+          </el-switch>
           <span v-else>{{ row[item.prop] }}</span>
         </template>
       </el-table-column>
@@ -1161,9 +1167,23 @@
 
   },
   methods: {
-
+    formAttr(row, column) {
+      console.log(row,column)
+      // if (column.property === "keyAttrFlag"
+      //   ||column.property === "queryAttrFlag"
+      //   ||column.property === "seniorQueryAttrFlag"
+      //   ||column.property === "sameRepeatAttrFlag"
+      //   ||column.property === "requireFlag"
+      //   ||column.property === "formDisplayFlag"
+      //   ||column.property === "tableDisplayFlag"
+      //   ||column.property === "sortAttrFlag") {
+      //   return row[column.property] =='true'? "鏄�" : "鍚�";
+      // }
+      // return row[column.property];
+    },
     //灞炴�у垎缁勬寜閽�
     attrVisibleHandle() {
+      this.formatBoolean()
       if (this.CrudSelect.length > 1) {
         this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�')
       } else if (this.CrudSelect < 1) {
@@ -1244,7 +1264,7 @@
     },
     //淇濆瓨
     addsHandler() {
-      batchAddSave(this.ProData).then(res => {
+      batchAddSave(JSON.parse(JSON.stringify(this.ProData).replace(/classifyTemplateOid/g,"classifytemplateoid"))).then(res => {
         this.$message.success('淇濆瓨鎴愬姛')
       })
     },
@@ -1454,6 +1474,8 @@
 }
 </script>
 
-<style scoped>
-
+<style scoped lang="scss">
+/deep/ .el-button {
+  margin: 0 10px 10px 0;
+}
 </style>

--
Gitblit v1.9.3