zjy 3 жил өмнө
parent
commit
349be2c3ba

+ 54 - 24
src/views/system/jbdScan/goods/neishenzhuangtai.vue

@@ -36,8 +36,8 @@
                       : ''
                   "
                 >
-                  <span class="step-num" >
-                    <i class="el-icon-caret-right icon" v-if="index!=0"></i>
+                  <span class="step-num">
+                    <i class="el-icon-caret-right icon" v-if="index != 0"></i>
                     <p cla>{{ i.title }}</p>
                     <!-- <span class="num">{{ i.stepIndex }}</span> -->
                   </span>
@@ -74,7 +74,7 @@
                 <el-table-column
                   prop="ping_shen_yi_ju_"
                   label="评审依据"
-                  width="250"
+                  width="200"
                 >
                 </el-table-column>
                 <el-table-column
@@ -88,11 +88,14 @@
                   label="内审员"
                   width="60"
                 >
-                  <template slot-scope="scope"
-                    >{{ scope.row.nei_shen_yuan_ | emfiltes(employeeList) }}
+                  <template slot-scope="scope">
+                    {{ scope.row.nei_shen_yuan_ | emfiltes(employeeList) }}
                   </template>
                 </el-table-column>
-                <el-table-column prop="ze_ren_shi_" label="责任室" width="60">
+                <el-table-column prop="ze_ren_shi_" label="责任室" width="100">
+                  <template slot-scope="scope">
+                    {{ scope.row.ze_ren_shi_ | partFilter(partList) }}
+                  </template>
                 </el-table-column>
                 <el-table-column prop="fu_ze_ren_" label="负责人" width="60">
                   <template slot-scope="scope"
@@ -137,7 +140,7 @@
                 <el-table-column
                   prop="ping_shen_yi_ju_"
                   label="评审依据"
-                  width="250"
+                  width="200"
                 >
                 </el-table-column>
                 <el-table-column
@@ -147,7 +150,7 @@
                 >
                 </el-table-column>
                 <el-table-column
-                  :prop="nei_shen_yuan_"
+                  prop="nei_shen_yuan_"
                   label="内审员"
                   width="60"
                 >
@@ -155,7 +158,10 @@
                     >{{ scope.row.nei_shen_yuan_ | emfiltes(employeeList) }}
                   </template>
                 </el-table-column>
-                <el-table-column prop="ze_ren_shi_" label="责任室" width="60">
+                <el-table-column prop="ze_ren_shi_" label="责任室" width="100">
+                  <template slot-scope="scope">
+                    {{ scope.row.ze_ren_shi_ | partFilter(partList) }}
+                  </template>
                 </el-table-column>
                 <el-table-column prop="fu_ze_ren_" label="负责人" width="60">
                   <template slot-scope="scope"
@@ -262,6 +268,7 @@ export default {
       cnasPieData: [], //cnas饼图
       cmaPieData: [], //cma饼图
       employeeList: [],
+      partList: [],
       loading: true,
       // scanVisible:false,
     };
@@ -274,6 +281,16 @@ export default {
         }
       }
     },
+    partFilter: function (value, arr) {
+      for (let i = 0; i < arr.length; i++) {
+        console.log(arr[i])
+        if (arr[i].ID_ == value) {
+          return arr[i].NAME_;
+        }else{
+          return value
+        }
+      }
+    },
   },
   watch: {
     obj() {
@@ -284,6 +301,7 @@ export default {
   created() {
     this.getInit();
     this.getEmployee();
+    this.getPart();
   },
   mounted() {
     let this_ = this;
@@ -348,9 +366,9 @@ export default {
               valueAnimation: true,
               formatter: "{value} %",
               color: "auto",
-              top:'100%'
+              top: "100%",
             },
-            data: [{ value: 100 ,top:'100%'}],
+            data: [{ value: 100, top: "100%" }],
           },
         ],
       };
@@ -492,7 +510,6 @@ export default {
         width: 400,
         height: 300,
       };
-
       var myChart = echarts.init(chartDom, null, setEchartWH);
       var option;
       option = {
@@ -507,7 +524,7 @@ export default {
           {
             type: "pie",
             radius: "50%",
-            data: this.cnasPieData, //[{1:2,3:4}]
+            data: this.cnasPieData,
             emphasis: {
               itemStyle: {
                 shadowBlur: 10,
@@ -566,6 +583,13 @@ export default {
         this_.employeeList = res.variables.data;
       });
     },
+    async getPart() {
+      let this_ = this;
+      let sql = "select ID_,NAME_,CREATE_TIME_ FROM ibps_party_org";
+      await repostCurd("sql", sql).then((res) => {
+        this_.partList = res.variables.data;
+      });
+    },
     jieduan(value) {
       if (value.includes("1")) {
         return 5;
@@ -662,14 +686,12 @@ export default {
         obj = {};
         this.loading = false;
       });
-      // this.cnasPieData =[];
       type == "CMA" ? (this.cmaPieData = newarr) : (this.cnasPieData = newarr);
-      // this.getLoadEchartsthree();
+      console.log(this.cnasPieData);
       callBlack();
     },
     getInit() {
       let data = this.obj[0];
-      console.log(data);
       let jieduanvalue;
       if (data.shi_fou_guo_shen_ == "已编制" && data.jie_dian_ren_wu_ == "") {
         jieduanvalue = "1";
@@ -701,14 +723,22 @@ export default {
           }
         });
         this_.$nextTick(() => {
-          this_.getNoData(this_.CNASTableData, "CNAS", this_.getLoadEchartsTwo);
-          this_.getNoData(this_.CMAtable, "CMA", this_.getLoadCmaEchartsX);
-          this_.getPieData(
-            this_.CNASTableData,
-            "CNAS",
-            this_.getLoadEchartsthree
-          );
-          this_.getPieData(this_.CMAtable, "CMA", this_.getLoadCmaEcharts);
+          if (this_.CNASTableData.length > 0) {
+            this_.getNoData(
+              this_.CNASTableData,
+              "CNAS",
+              this_.getLoadEchartsTwo
+            );
+            this_.getPieData(
+              this_.CNASTableData,
+              "CNAS",
+              this_.getLoadEchartsthree
+            );
+          }
+          if (this_.CMAtable.length > 0) {
+            this_.getNoData(this_.CMAtable, "CMA", this_.getLoadCmaEchartsX);
+            this_.getPieData(this_.CMAtable, "CMA", this_.getLoadCmaEcharts);
+          }
         });
       });
     },