From 1a95b0bb8d0f7a9f2a1d18c719f3a8b68f58fc2d Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 20 三月 2024 10:36:36 +0800
Subject: [PATCH] 工单、考核结果发布按钮权限

---
 src/views/system/check-result/city/index.vue |    4 +-
 src/views/system/check-result/index.vue      |    4 +-
 src/views/system/check-template/index.vue    |   60 ++++++++++++++++++++++++++----
 src/views/system/work-order/index.vue        |   13 +++---
 4 files changed, 63 insertions(+), 18 deletions(-)

diff --git a/src/views/system/check-result/city/index.vue b/src/views/system/check-result/city/index.vue
index 20982a9..781a138 100644
--- a/src/views/system/check-result/city/index.vue
+++ b/src/views/system/check-result/city/index.vue
@@ -94,8 +94,8 @@
       <div class="text item">鑰冩牳棰戠巼<span class="time">{{ "瀛e害" }}</span></div>
       <div class="text item">鑰冩牳鏃堕棿
         <span class="time">{{ item.checkTime }}</span>
-        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1">纭鍙戝竷</el-button>
-        <el-button size="small" round style="float: right;" v-show="item.publish == 1" disabled="true">宸插彂甯�</el-button>
+        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1"  v-hasPermi="['result:city:publish']">纭鍙戝竷</el-button>
+        <el-button size="small" round style="float: right;" v-show="item.publish == 1" disabled="true"  v-hasPermi="['result:city:publish']">宸插彂甯�</el-button>
       </div>
     </el-card>
 
diff --git a/src/views/system/check-result/index.vue b/src/views/system/check-result/index.vue
index 0817e2b..536bd3a 100644
--- a/src/views/system/check-result/index.vue
+++ b/src/views/system/check-result/index.vue
@@ -94,8 +94,8 @@
       <div class="text item">鑰冩牳鍒嗘暟<span class="time">{{ item.checkScore }}</span></div>
       <div class="text item">鑰冩牳鏃堕棿
         <span class="time">{{ item.checkTime }}</span>
-        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1">纭鍙戝竷</el-button>
-        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish == 1">宸插彂甯�</el-button>
+        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1"  v-hasPermi="['result:contract:publish']">纭鍙戝竷</el-button>
+        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish == 1"  v-hasPermi="['result:contract:publish']">宸插彂甯�</el-button>
       </div>
     </el-card>
 
diff --git a/src/views/system/check-template/index.vue b/src/views/system/check-template/index.vue
index 70c8f5c..52dc255 100644
--- a/src/views/system/check-template/index.vue
+++ b/src/views/system/check-template/index.vue
@@ -116,14 +116,15 @@
           <el-input v-model="form.templateName" placeholder="璇疯緭鍏ユā鏉垮悕绉�" />
         </el-form-item>
         <el-form-item label="鑰冩牳瀵硅薄" prop="unitName">
-          <el-select v-model="form.unitName" placeholder="璇烽�夋嫨">
-            <el-option
-              v-for="item in unitList"
-              :key="item.id"
-              :label="item.value"
-              :value="item.id">
-            </el-option>
-          </el-select>
+          <div class="block">
+            <span class="demonstration"></span>
+            <el-cascader
+              v-model="value"
+              :options="options"
+              :props = "props"
+              @change="handleChange"></el-cascader>
+          </div>
+
         </el-form-item>
         <el-form-item label="鑰冩牳瑙勫垯" prop="tempRuleFormList">
           <div class="row-warp">
@@ -193,6 +194,46 @@
   name: "CheckTemplate",
   data() {
     return {
+      props: { multiple: true },
+      value: [],
+      options: [{
+        value: 'city',
+        label: '鍖哄幙',
+        children: [{
+          value: 'fushun',
+          label: '瀵岄『鍘�',
+        }, {
+          value: 'rong',
+          label: '鑽e幙',
+        },{
+          value: 'gaoxin',
+          label: '楂樻柊鍖�',
+        },{
+          value: 'ziliujing',
+          label: '鑷祦浜曞尯',
+        },{
+          value: 'gongjing',
+          label: '璐′簳鍖�',
+        },{
+          value: 'daan',
+          label: '澶у畨鍖�',
+        },{
+          value: 'yantan',
+          label: '娌挎哗鍖�',
+        },
+        ]
+      }, {
+        value: 'company',
+        label: '鍏徃',
+        children: [{
+          value: 'yunwei',
+          label: '鎴愰兘x杩愮淮',
+        }, {
+          value: 'yunwei2',
+          label: '鑷础x杩愮淮',
+        }, ]
+      },
+      ],
       ruleList: [],
       unitList: [],
       // 涓存椂瑙勫垯琛ㄥ崟
@@ -250,6 +291,9 @@
     this.selectUnit();
   },
   methods: {
+    handleChange(value) {
+      console.log(value);
+    },
     removeRule(form) {
       console.log(form)
       this.ruleFormList = this.ruleFormList.filter(item => item !== form);
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index f27f236..0ebfc45 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -109,15 +109,16 @@
             type="text"
             @click="handleYwCondition(scope.row)"
           >杩愮淮鎯呭喌</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            @click="handleYwResult(scope.row)"
-          >杩愮淮缁撴灉</el-button>
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            @click="handleYwResult(scope.row)"-->
+<!--          >杩愮淮缁撴灉</el-button>-->
           <el-button
             size="mini"
             type="text"
             @click="handleCheckResult(scope.row)"
+            v-hasPermi="['work:order:result']"
           >妫�娴嬬粨鏋�</el-button>
           <el-button
             size="mini"
@@ -249,7 +250,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitYwResult">纭� 瀹�</el-button>
-        <el-button @click="cancelYwResult">鍙� 娑�</el-button>
+        <el-button @click="cancelCheckResult">鍙� 娑�</el-button>
       </div>
     </el-dialog>
 

--
Gitblit v1.8.0