From 02bd5982028af6e791dd0857f535a41aaf74679e Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期一, 10 二月 2025 13:14:32 +0800
Subject: [PATCH] 修改

---
 src/views/specialOperationsPay/notCoalWorkType/index.vue |   62 +++++++++++++++++-------------
 1 files changed, 35 insertions(+), 27 deletions(-)

diff --git a/src/views/specialOperationsPay/notCoalWorkType/index.vue b/src/views/specialOperationsPay/notCoalWorkType/index.vue
index 466a0d1..7ae7413 100644
--- a/src/views/specialOperationsPay/notCoalWorkType/index.vue
+++ b/src/views/specialOperationsPay/notCoalWorkType/index.vue
@@ -1,19 +1,26 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="10" class="mb8">
+    <el-button
+      type="primary"
+      plain
+      style="margin-right: 10px"
+      icon="el-icon-plus"
+      @click="handleView('add',{})"
+    >新增
+    </el-button>
       <el-radio-group v-model="queryParams.categoryType" @change="changeTimeStatus">
         <el-radio-button>全部</el-radio-button>
         <el-radio-button :label="1">理论</el-radio-button>
         <el-radio-button :label="2">实操</el-radio-button>
       </el-radio-group>
-      <el-select v-model="queryParams.districtCode" style="margin-left: 15px" placeholder="行政区划">
-        <el-option
-          v-for="item in areaList"
-          :key="item.id"
-          :label="item.name"
-          :value="item.code">
-        </el-option>
-      </el-select>
+<!--      <el-select v-model="queryParams.districtCode" style="margin-left: 10px" placeholder="行政区划">-->
+<!--        <el-option-->
+<!--          v-for="item in areaList"-->
+<!--          :key="item.id"-->
+<!--          :label="item.name"-->
+<!--          :value="item.code">-->
+<!--        </el-option>-->
+<!--      </el-select>-->
       <el-button
         size="small"
         type="primary"
@@ -28,25 +35,12 @@
         @click="resetQuery()"
       >重置
       </el-button>
-    </el-row>
-    <el-row :gutter="10" class="mb8">
-      <el-button
-        type="primary"
-        plain
-        icon="el-icon-plus"
-        size="mini"
-        @click="handleView('add',{})"
-        v-hasPermi="['system:experts:add']"
-      >新增
-      </el-button>
-    </el-row>
-
     <el-table
       :data="cateGoryList"
       style="width: 100%;margin-bottom: 20px;"
       row-key="id"
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
-      <el-table-column label="地州" align="center" prop="districtName"/>
+      <el-table-column label="地州" align="center" prop="districtName" width="260"/>
       <el-table-column label="类别" align="center" prop="categoryType">
         <template #default="scope">
           {{scope.row.categoryType == 1?'理论':scope.row.categoryType == 2?'实操':''}}
@@ -61,7 +55,7 @@
       <el-table-column label="复核人" align="center" prop="reviewer"/>
       <el-table-column label="开票单位社会信用代码" align="center" prop="invoicingCompanyCode"/>
       <el-table-column label="描述" align="center" prop="describe"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
         <template #default="scope">
           <el-button
             v-if="scope.row.subjectName"
@@ -101,6 +95,7 @@
 import Cookies from 'js-cookie'
 import {getAreaList} from "@/api/coalMine/placeManage/train";
 import {delTeacher} from "@/api/coalMine/teacher";
+import store from "@/store";
 
 export default {
   name: "coalWorkType",
@@ -121,9 +116,17 @@
         categoryType: null,
         districtCode: ''
       },
+      districtCode: ''
     };
   },
   created() {
+    const userInfo = store.getters && store.getters.userInfo
+    this.districtCode = userInfo.district.districtCode
+    if(userInfo.district.districtCode !== '65'){
+      this.queryParams.districtCode = this.districtCode
+    }else{
+      this.queryParams.districtCode = ''
+    }
     this.getList()
     this.getArea()
   },
@@ -156,11 +159,15 @@
                 }
                 delete i.children
               }
+              if(i.children){
+                for(let j of i.children){
+                  j.districtName = ''
+                }
+              }
               return i
             })
           }
           this.cateGoryList = JSON.parse(JSON.stringify(totalList))
-          console.log(this.cateGoryList,'666')
           this.total = res.total
           this.loading = false;
         }
@@ -169,7 +176,8 @@
     async getArea() {
       const res = await getAreaList();
       if (res.code == 200) {
-        this.areaList = res.data;
+        this.areaList = res.data.filter(i=>i.code !== '65')
+        console.log(this.areaList,'list')
       }
     },
     changeTimeStatus(val) {
@@ -190,7 +198,7 @@
       this.getList()
     },
     handleView(type,data) {
-      this.$refs.detailDialogRef.openDialog(type,data);
+      this.$refs.detailDialogRef.openDialog(type,data,this.areaList,this.districtCode);
     },
     handleDelete(row){
       this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', {

--
Gitblit v1.9.2