Pārlūkot izejas kodu

指标权限分配

gks 1 gadu atpakaļ
vecāks
revīzija
329135878e
1 mainītis faili ar 28 papildinājumiem un 14 dzēšanām
  1. 28 14
      src/views/RightDistribution/index.vue

+ 28 - 14
src/views/RightDistribution/index.vue

@@ -73,7 +73,7 @@
           >删除</el-button
         >
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -83,7 +83,7 @@
           v-hasPermi="['business:NORMROLE:export']"
           >导出</el-button
         >
-      </el-col>
+      </el-col> -->
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
@@ -93,7 +93,15 @@
     <el-table :data="NORMROLEList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
 
-      <el-table-column label="指标分类名称" align="center" prop="fname">
+      <el-table-column label="指标名称" align="center">
+        <template slot-scope="scope">
+          <!-- <el-link
+            @click="tableBdClick(scope.row)"
+            class="text-color"
+            type="primaty"> -->
+          {{ scope.row.fname }}
+          <!-- </el-link> -->
+        </template>
       </el-table-column>
       <el-table-column label="指标分类编号" align="center" prop="feeId">
       </el-table-column>
@@ -174,6 +182,7 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+    
   </div>
 </template>
 
@@ -278,29 +287,35 @@ export default {
     };
   },
   created() {
-    setNORMROLEStart;
     this.getList();
     this.getNormroleallList();
     this.getRoleList();
   },
   methods: {
     statusChange(val) {
-      // if (val.status == 0) {
+      if (val.status == 0) {
         setNORMROLEStart(val.id).then((res) => {
           if (res.code == 200) {
             this.$message.success("修改成功");
           }
         });
-      // } else {
-      //   setNORMROLEStop(val.id).then((res) => {
-      //     if (res.code == 200) {
-      //       this.$message.success("修改成功");
-      //     }
-      //   });
-      // }
+      } else {
+        setNORMROLEStop(val.id).then((res) => {
+          if (res.code == 200) {
+            this.$message.success("修改成功");
+          }
+        });
+      }
       this.getList();
     },
 
+    tableBdClick(data) {
+      this.queryParams.id = data.senId;
+      listNORMROLE(this.pageParams).then((res) => {
+        console.log(res);
+      });
+    },
+
     // 查询指标采集权限配置所有列表
     getNormroleallList() {
       getNORMROLEAllList().then((res) => {
@@ -322,7 +337,6 @@ export default {
           response.rows[index].status = item.status == 0 ? false : true;
         });
         this.NORMROLEList = response.rows;
-        console.log(this.NORMROLEList);
         this.total = response.total;
         this.loading = false;
       });
@@ -417,7 +431,7 @@ export default {
     /** 导出按钮操作 */
     handleExport() {
       this.download(
-        "business/NORMROLE/export",
+        "/NORMROLE/export",
         {
           ...this.queryParams,
         },