From 54b1233ba127cfde66bf04365097f53a071960d4 Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期四, 31 七月 2025 12:13:14 +0800
Subject: [PATCH] 1

---
 src/views/wel/index.vue |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index 03a1017..2250621 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -38,8 +38,8 @@
         <span>{{row.name}}</span>
         <el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="淇敼" @click="showEdit(row)" title="淇敼"></el-button>
         <el-button :size="size" text icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="鍒犻櫎" title="鍒犻櫎"></el-button>
-        <el-button :size="size" text v-if="row.nodeType < 60" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="鏂板瀛愮骇" title="鏂板瀛愮骇"></el-button>
-        <el-button :size="size" text v-if="row.nodeType == 60" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="鏂囦欢涓婁紶" title="鏂囦欢涓婁紶"></el-button>
+        <el-button :size="size" text v-if="row.nodeType != 60 && row.nodeType != 70" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="鏂板瀛愮骇" title="鏂板瀛愮骇"></el-button>
+        <el-button :size="size" text v-if="row.nodeType == 60 || row.nodeType == 50" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="鏂囦欢涓婁紶" title="鏂囦欢涓婁紶"></el-button>
         <!-- 娑夊瘑缃戞墠鏈� -->
         <el-button :size="size" text v-if="row.nodeType == 70 && isSM" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="鍗囩増" title="鍗囩増"></el-button>
         <!-- 宸ユ帶缃戞墠鏈� -->
@@ -64,7 +64,7 @@
     <avue-form v-if="tabsType == 'tab1'" :option="tabsFormOption" v-model="tabsForm"></avue-form>
     <span v-else-if="tabsType == 'tab2'">鐗堟湰淇℃伅</span>
     <template v-else-if="tabsType == 'tab3'">
-        {{fileContent}}
+        <div v-html="convertToHtml(fileContent)"></div>
     </template>
     <el-dialog title="鍗囩増" append-to-body v-model="upgradeModal" width="500">
       <avue-form :option="upgradeModalOption" v-model="upgradeModalForm" @submit="upgradeSubmit" @reset-change="upgradeCancel"></avue-form>
@@ -183,7 +183,7 @@
         menuPosition: "right",
         column: [
           {
-            label: '鑺傜偣绫诲瀷',
+            label: '鑺傜偣绫诲瀷1',
             prop: 'nodeType',
             labelWidth: "120",
             type: 'select',
@@ -468,6 +468,9 @@
     }
   },
   methods: {
+    convertToHtml(text) {
+        return text.replace(/\r\n/g, '<br>');
+    },
     removeHasChildren(treeData) {  //鏌ヨ鏃跺�欎娇鐢紝鍒犳帀hasChildren 
       return treeData.map(node => {
         if (node.children && node.children.length > 0) {
@@ -642,7 +645,7 @@
           this.tabsForm.nodeTypeName = item.dictValue;
         }
       })
-      if(this.tabsForm.nodeType < 70) {
+      if(this.tabsForm.nodeType != 70) {
         this.tabsOption = this.tabsOption1;
       }else {
         this.tabsOption = this.tabsOption2;
@@ -714,14 +717,20 @@
     showAdd (row) {  //鏂板瀛愯妭鐐�
       if(!row) {
         this.modalTitle = "鏂板鏍硅妭鐐�";
-        this.modalForm.nodeType = "10";
+        this.modalForm.nodeType = this.nodeTypeList[0].dictKey;
         this.modalForm.parentId = 0;
       }else {
-        if(row.nodeType == 60) {
+        if(row.nodeType == 60) { //绋嬪簭鍖�
           return;
         }
+        var defalutNodeType = "";  //涓嬩竴绾ц妭鐐圭被鍨�
+        for(var i=0;i<this.nodeTypeList.length;i++) {
+          if(row.nodeType == this.nodeTypeList[i].dictKey) {
+            defalutNodeType = this.nodeTypeList[i+1].dictKey;
+          }
+        }
         this.modalTitle = "鏂板瀛愯妭鐐�";
-        this.selectedColumn.nodeType = String(Number(row.nodeType) + 10);
+        this.selectedColumn.nodeType = defalutNodeType;
         this.selectedColumn.parentId = row.id;
         this.selectedColumn.name = "";
         this.selectedColumn.id = "";

--
Gitblit v1.9.3