From 9ac5f1a6b99e8a07ebc4c4be082ced3c219f4e2e Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 06 九月 2025 17:45:15 +0800
Subject: [PATCH] 文字修复

---
 src/views/wel/shemi.vue |   90 +++++++++++++++++++++++++++++++-------------
 1 files changed, 63 insertions(+), 27 deletions(-)

diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index 3a48b74..f5f0449 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -61,7 +61,7 @@
             icon="el-icon-lock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
           <el-button :size="size" text
             v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
-            icon="el-icon-unlock" type="primary" @click="startUnlock(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
+            icon="el-icon-unlock" type="primary" @click="showUnLockDlg(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
         </template>
       </avue-crud>
     </div>
@@ -118,7 +118,7 @@
             icon="el-icon-lock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
           <el-button :size="size" text
             v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
-            icon="el-icon-unlock" type="primary" @click="startUnlock(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
+            icon="el-icon-unlock" type="primary" @click="showUnLockDlg(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
         </template>
       </avue-crud>
     </div>
@@ -142,7 +142,9 @@
     <el-dialog title="绋嬪簭閿佸畾" append-to-body v-model="lockBox">
       <avue-form :option="lockOption" v-model="lockForm" @submit="lockSubmit" @reset-change="lockCancel" />
     </el-dialog>
-    
+    <el-dialog title="绋嬪簭瑙i攣" append-to-body v-model="unlockBox">
+      <avue-form :option="unlockOption" v-model="unlockForm" @submit="unlockSubmit" @reset-change="unlockCancel" />
+    </el-dialog>
     <avue-tabs :option="tabsOption" @change="tabsHandleChange" style="margin-top: 30px;" v-if="isShowTabs"></avue-tabs>
     <avue-form v-if="tabsType == 'tab1'" :option="tabsFormOption" v-model="tabsForm"></avue-form>
     <!--<span v-else-if="tabsType == 'tab2'">鐗堟湰淇℃伅</span>-->
@@ -191,6 +193,7 @@
 import { ElMessage } from 'element-plus';
 import TodolistLeft from './components/TodolistLeft.vue';
 import TodolistRightTop from './components/TodolistRightTop.vue';
+import qs from 'qs';
 export default {
   components: {
     TodolistLeft,
@@ -307,22 +310,16 @@
           icon: 'el-icon-info',
           label: '鑺傜偣淇℃伅',
           prop: 'tab1',
-        }/*, {
-          icon: 'el-icon-warning',
-          label: '鐗堟湰淇℃伅',
-          prop: 'tab2',
-        }*/]
+        }
+      ]
       },
       tabsOption2: {
         column: [{
           icon: 'el-icon-info',
           label: '鑺傜偣淇℃伅',
           prop: 'tab1',
-        },/* {
-          icon: 'el-icon-warning',
-          label: '鐗堟湰淇℃伅',
-          prop: 'tab2',
-        }, */{
+        },
+        {
           icon: 'el-icon-warning',
           label: '鏂囦欢鍐呭',
           prop: 'tab3'
@@ -464,6 +461,31 @@
       lockForm: {},
       lockBox: false,
 
+      unlockOption: {
+        submitText: "鍚姩瑙i攣娴佺▼",
+        emptyText: "鍙栨秷",
+        menuPosition: "right",
+        column: [
+          {
+            label: '绋嬪簭鍖呭悕',
+            prop: 'name',
+            disabled:true,
+            labelWidth: "120",
+          },
+          
+          {
+            label: '閿佸畾鍘熷洜',
+            prop: 'remark',
+            type: "textarea",
+            disabled:true,
+            labelWidth: "120",
+            span: 24,
+          }
+        ]
+      },
+      unlockForm: {},
+      unlockBox: false,
+
       id: "",
       parentId: 1,
       loading: true,
@@ -521,7 +543,7 @@
             width: '360'
           },
           {
-            label: '鐗堟湰',
+            label: '绋嬪簭鐗堟湰',
             prop: 'versionNumber',
             formatter: (val, value, label) => {
               if (val.nodeType == '60') {
@@ -780,9 +802,10 @@
         });
     },
     showLockDlg(row){
-      this.lockForm = row;
-     //this.lockForm.name = row.name;
-     // this.lockForm.id = row.id;
+      //this.lockForm = row;
+      this.lockForm.id = row.id;
+      this.lockForm.name = row.name
+      this.lockForm.parentId = row.parentId;
       this.lockForm.remark = '';
       this.lockBox = true;
     },
@@ -790,33 +813,42 @@
       this.lockBox = false;
       this.lockForm = {};
     },
-    lockSubmit() {  
+    showUnLockDlg(row){
+      this.unlockForm.id = row.id;
+      this.unlockForm.name = row.name
+      this.unlockForm.remark = row.remark;
+      this.unlockForm.parentId = row.parentId;
+      this.unlockBox = true;
+    },
+    lockSubmit(row,done) {  
+      //console.log(row,done)
       //閿佸畾鎻愪氦
       this.$confirm('鏄惁閿佸畾', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning',
       }).then(() => {
-        axios({
-          url: '/blade-mdm/program/node/lock',
-          method: 'post',
-          params: this.lockForm
-        }).then(res => {
+        axios.post('/blade-mdm/program/node/lock',qs.stringify(this.lockForm)).then(res=>{
+          console.log('res',res.data)
           if (res.data.code == 200) {
             this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛!' });
             this.addLocalTreeNode(this.lockForm.parentId);
-            this.lockBox = false;
+            
           } else {
-            this.$message({ type: 'success', message: res.data.msg });
+            this.$message({ type: 'error', message: res.data.msg });
           }
+          this.lockBox = false;
+        }).catch(error => {
+          this.$message({ type: 'error', message: res.data.msg });
         });
+        done();
       }).catch(action => {
         console.log('cancel')
       });
     },
-    startUnlock(row) {
+    unlockSubmit(row,done) {
       //鍚姩瑙i攣娴佺▼
-      this.$confirm(`鏄惁瑙i攣`, {
+      this.$confirm(`纭瑙i攣`, {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning',
@@ -833,10 +865,14 @@
             this.$message({ type: 'success', message: res.data.msg });
           }
         });
+        done();
       }).catch(action => {
         console.log('cancel')
       });
     },
+    unlockCancel() {
+      this.unlockBox = false;
+    },
     handleSubmit(form, done) {
       //鍙戣捣绋嬪簭鏇挎崲娴佺▼
       var obj = {

--
Gitblit v1.9.3