From aa05304d221b1883d746e686f390d6f3fba598a7 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 24 五月 2024 09:36:09 +0800
Subject: [PATCH] feat:动态数据中心

---
 src/views/system/unit/index.vue |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/views/system/unit/index.vue b/src/views/system/unit/index.vue
index 4409bfa..1ec0f28 100644
--- a/src/views/system/unit/index.vue
+++ b/src/views/system/unit/index.vue
@@ -44,6 +44,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
+          v-hasPermi="['unit:add']"
         >鏂板</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -54,6 +55,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
+          v-hasPermi="['unit:edit']"
         >淇敼</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -64,6 +66,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
+          v-hasPermi="['unit:remove']"
         >鍒犻櫎</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -73,6 +76,7 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
+          v-hasPermi="['unit:export']"
         >瀵煎嚭</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -94,12 +98,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
+            v-hasPermi="['unit:edit']"
           >淇敼</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
+            v-hasPermi="['unit:remove']"
           >鍒犻櫎</el-button>
         </template>
       </el-table-column>
@@ -123,7 +129,7 @@
           <el-input v-model="form.unitName" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�" />
         </el-form-item>
         <el-form-item label="鍗曚綅璐﹀彿" prop="unitAdminAccount">
-          <el-input v-model="form.unitAdminAccount" placeholder="璇疯緭鍏ュ崟浣嶇鐞嗗憳璐﹀彿" />
+          <el-input v-model="form.unitAdminAccount" placeholder="璇疯緭鍏ュ崟浣嶇鐞嗗憳璐﹀彿" :disabled="account" />
         </el-form-item>
         <el-form-item label="鍗曚綅鑱旂郴浜�" prop="unitContact">
           <el-input v-model="form.unitContact" placeholder="璇疯緭鍏ュ崟浣嶈仈绯讳汉" />
@@ -150,6 +156,8 @@
   name: "Unit",
   data() {
     return {
+      // 璐﹀彿涓嶅彲淇敼
+      account: true,
       // 閬僵灞�
       loading: true,
       // 閫変腑鏁扮粍
@@ -274,12 +282,14 @@
     },
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
+      this.account = false;
       this.reset();
       this.open = true;
       this.title = "娣诲姞杩愮淮鍗曚綅";
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
+      this.account = true;
       this.reset();
       const id = row.id || this.ids
       getUnit(id).then(response => {

--
Gitblit v1.8.0