Sfoglia il codice sorgente

Merge branch 'master' of http://119.23.210.103:3000/wy/mj_firm_former

cfort 3 anni fa
parent
commit
0aaf418b50

+ 5 - 1
.vscode/settings.json

@@ -1,3 +1,7 @@
 {
-    "workbench.colorCustomizations": {}
+    "workbench.colorCustomizations": {
+        "activityBar.background": "#272D3D",
+        "titleBar.activeBackground": "#373F55",
+        "titleBar.activeForeground": "#FAFAFC"
+    }
 }

+ 17 - 1
src/views/demo/yangPin/yangPinShuJu/headerContent.vue

@@ -25,6 +25,10 @@
         <div>留样样品数量</div>
         <div class="number">{{RetentionNumber}}个</div>
       </div>
+      <div class="retention">
+        <div>样品完成检测数量</div>
+        <div class="number">{{SuccessNumber}}个</div>
+      </div>
       <!-- <button @click="getTime">时间</button> -->
     
   </div>
@@ -43,7 +47,8 @@ export default {
       ReceiveNumber:0,
       StagingNumber:0,
       UnqualifiedNumber:0,
-      RetentionNumber:0
+      RetentionNumber:0,
+      SuccessNumber:0
     }
   },
   created(){
@@ -52,6 +57,7 @@ export default {
     this.getNotReceivedData()
     this.getReceivedData()
     this.getUnqualifiedData()
+    this.getSuccessData()
     this.getStayData()
     this.getStagingNumberData()
     //拿到数据后先获取当前时间,把时间传给父组件
@@ -63,6 +69,7 @@ export default {
     this.timer = setInterval(() =>{
       this.getEntrustedTotalData()
       this.getNotReceivedData()
+      this.getSuccessData()
       this.getReceivedData()
       this.getUnqualifiedData()
       this.getStayData()
@@ -147,6 +154,15 @@ export default {
       let data = response.variables.data
       this.RetentionNumber = data.length 
 
+    })
+     },
+     //样品完成检测数量
+     getSuccessData(){
+      let sql6= "select COUNT(t_mjypdjb.id_) as num from t_mjypdjb LEFT JOIN t_mjjcbg on t_mjypdjb.yang_pin_bian_hao = t_mjjcbg.yang_pin_bian_hao where t_mjjcbg.zhuang_tai_ = '报告待发放'" 
+      curdPost('sql',sql6).then(response => { 
+      let data = response.variables.data
+      this.SuccessNumber = data[0].num
+
     })
      }
 

+ 2 - 2
src/views/demo/yangPin/yangPinShuJu/index.vue

@@ -46,7 +46,7 @@
         <div class="mainContent">
           <div class="entrust">
             <div class="Number" ref="Number_refs"><entrustNumber/> </div>
-            <div class="Type" ><entrustType/></div>
+            <!-- <div class="Type" ><entrustType/></div> -->
           </div>
           <div class="detection">
             <div class="monthlyS" ref="MonthlyStatus_refs"><monthlyStatus/></div>
@@ -169,7 +169,7 @@ export default {
         justify-content:space-between;
         // border: 1px solid rgb(17, 110, 197);
           .Number{
-            width: 62%;
+            width: 100%;
             height: 100%;
             display: flex;
             justify-content: center;

+ 92 - 3
src/views/sample/goodsSelect.vue

@@ -12,6 +12,17 @@
         >
         </el-option>
       </el-select>
+      <el-date-picker
+      v-model="value2"
+      type="daterange"
+      align="right"
+      unlink-panels
+      range-separator="至"
+      start-placeholder="开始日期"
+      end-placeholder="结束日期"
+      format="yyyy-MM-dd"
+      :picker-options="pickerOptions">
+    </el-date-picker>
       <el-button class="btn" type="primary" @click="query">
         <i class="ibps-icon-search"></i>查询
       </el-button>
@@ -110,6 +121,35 @@ export default {
       gysList: [],
       loading: true,
       inkuList: [],
+      pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近三个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        },
+        value1: '',
+        value2: ''
     };
   },
   //yszb
@@ -193,7 +233,6 @@ export default {
         obj = {};
         obj1={};
         if (data[i].gong_ying_shang_m) {
-          // this_.jsgys(data[i].gong_ying_shang_m);
           let sql1 = `select  gong_ying_shang_m FROM t_gysml where id_= '${data[i].gong_ying_shang_m}'`;
           await curdPost("sql", sql1).then((res) => {
             let data1 = res.variables.data;
@@ -204,7 +243,6 @@ export default {
             }
           });
         } else {
-          // this_.cggys(data[i].wai_jian_);
           let sql = `select gong_ying_shang_m FROM t_gysml where id_=(SELECT gong_ying_shang_ FROM t_yszb WHERE id_ = '${data[i].wai_jian_}')`;
           await curdPost("sql", sql).then((res) => {
             let data2 = res.variables.data;
@@ -241,7 +279,7 @@ export default {
       let sql = "";
       let this_ = this;
       let sql1 = `select wu_liao_ming_chen,wu_liao_bian_ma_,gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_xing_hao_,shu_liang_,wai_jian_,create_time_ FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ asgong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_ FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' ORDER BY create_time_ DESC`;
-      let sql2 = `select COUNT(*) AS COUNT FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select COUNT(*) AS COUNT FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}'`;
+      let sql2 = `select COUNT(*) AS COUNT FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select COUNT(*) AS COUNT FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' and bian_zhi_shi_jian`;
       if (quyu) {
         sql = sql1;
         curdPost("sql", sql2).then((res) => {
@@ -254,8 +292,59 @@ export default {
       }
       return sql;
     },
+
+    // filter() {
+    //   debugger
+    //   let time1,time2;
+    //   if(this.value2){
+    //     time1=this.time(this.value2[0]);
+    //     time2=this.time(this.value2[1]);
+    //   }else{
+    //     time1 = '1998-01-01';
+    //     time2 = '2023-12-29';
+    //   }
+    //   let quyu = this.quyu;
+    //   let sql = "";
+    //   let this_ = this;
+    //   let sql1 = `select wu_liao_ming_chen,wu_liao_bian_ma_,gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_xing_hao_,shu_liang_,wai_jian_,create_time_ FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ as gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_ FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' and DATE_FORMAT(gong_ying_shang_A,"%Y-%m-%d") BETWEEN '${time1}' AND '${time2}' ORDER BY create_time_ DESC`;
+    //   let sql2 = `select COUNT(*) AS COUNT FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select COUNT(*) AS COUNT FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' and bian_zhi_shi_jian`;
+    //   if (quyu && !this.value2) { //供应商有
+    //     sql = sql1;
+    //     curdPost("sql", sql2).then((res) => {
+    //       let data = res.variables.data;
+    //       this_.numtotal = data[0].COUNT + data[1].COUNT;
+    //     });
+    //   } else if(!this.value2&&!quyu) { //两个没有
+    //     this_.allLength();
+    //     sql = cgSql + jsSql + this.limit;
+    //   }else if(quyu&&!this.value2){//供应商有
+    //     let sql1 = `select wu_liao_ming_chen,wu_liao_bian_ma_,gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_xing_hao_,shu_liang_,wai_jian_,create_time_ FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ as gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_ FROM t_wljsysjlb WHERE DATE_FORMAT(gong_ying_shang_A,"%Y-%m-%d") BETWEEN '${time1}' AND '${time2}' ORDER BY create_time_ DESC`;
+    //     sql = sql1;
+    //   }else if(this.value2&&!quyu){//时间有供应商没有
+    //     let sql1 = `select wu_liao_ming_chen,wu_liao_bian_ma_,gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_xing_hao_,shu_liang_,wai_jian_,create_time_ FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ as gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_ FROM t_wljsysjlb WHERE DATE_FORMAT(gong_ying_shang_A,"%Y-%m-%d") BETWEEN '${time1}' AND '${time2}' ORDER BY create_time_ DESC`;
+    //     sql = sql1;
+    //   }
+    //   return sql;
+    // },
+
+
+    time(date) {
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? '0' + m : m
+      var d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      var h = date.getHours()
+      h = h < 10 ? '0' + h : h
+      var minute = date.getMinutes()
+      minute = minute < 10 ? '0' + minute : minute
+      var second = date.getSeconds()
+      second = second < 10 ? '0' + second : second
+      return y + '-' + m + '-' + d
+    },
     query() {
       let sql = this.filter();
+      console.log(sql)
       //   this.currentSql = sql;
       this.loadData(sql);
     },

+ 1 - 1
src/views/sample/reservedSample.vue

@@ -306,7 +306,6 @@ export default {
           }else{
             yangpingSql ="select * from t_mjypdjb WHERE liu_yang_wei_zhi_ = '" +item.id_ +"'";
           }
-          
           curdPost("sql", yangpingSql).then((res) => {
             var resData = res.variables.data;
             if (resData.length > 0) {
@@ -320,6 +319,7 @@ export default {
           });
         });
         this_.listData = labelsMap;
+        console.log(this_.listData)
       });
     },
     qu_yu_Event(e) {

+ 41 - 0
src/views/system/jbdHome/board/component/CarouselTabl.vue

@@ -0,0 +1,41 @@
+<template>
+  <div class="pieView">
+    <div class="title">{{title}}</div>
+    <div style="width:100%;display: inline-block;background-color: #06163f;">
+      <dv-scroll-board :config="info" style="width:100%;height:320px" />
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {};
+  },
+  props: {
+    info: {
+      type: Object,
+      default: {},
+    },
+    title: {
+      type: String,
+      default: "",
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.pieView {
+  display: flex;
+  width: 100%;
+  // .title {
+  //   height: 30px;
+  //   line-height: 30px;
+  //   text-align: left;
+  //   padding-left: 10px;
+  //   width: calc(100% - 10px);
+  //   background-color: #06163f;
+  //   opacity: 0.5;
+  // }
+}
+</style>

+ 202 - 0
src/views/system/jbdHome/board/component/equipmentBoardTopcard.vue

@@ -0,0 +1,202 @@
+<template>
+  <div id="top-bar">
+    <div class="content">
+      <!-- <div class="title">设备信息情况</div> -->
+      <div class="bar">
+        <div v-for="(item, index) in topBarData" :key="index" class="item">
+          <!-- <div class="title">{{ item.title }}</div> -->
+          <div v-for="(v, i) in item.children" :key="i" class="box">
+            <div class="label">{{ v.label }}</div>
+            <div class="count">
+              <dv-digital-flop :config="v.data" class="flop"   v-if="v.unit !='元'"/>
+              <dv-digital-flop :config="v.data" class="flops"   v-else/>
+              <div class="unit">{{ v.unit }}</div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <dv-decoration-10 />
+  </div>
+</template>
+<script>
+export default {
+  name: "topBar",
+  props: {
+    info: {
+      type: Array,
+      default: [],
+    },
+  },
+  components: {},
+  watch: {
+    info(v) {
+      this.update();
+    },
+  },
+  data() {
+    return {
+      topBarData: [],
+      fontColor: [
+        "#d20962",
+        "#f47721",
+        "#7ac143",
+        "#00a78e",
+        "#00bce4",
+        "#7d3f98",
+        "#037ef3",
+        "#f85a40",
+        "#00c16e",
+        "#ffd900",
+        "#0cb9c1",
+        "#7552cc",
+      ],
+    };
+  },
+  created() {
+    this.update();
+  },
+  methods: {
+    //随机颜色
+    getRandom(minNum, maxNum) {
+      if (arguments.length === 1) {
+        return parseInt(Math.random() * minNum + 1, 10);
+      } else {
+        return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
+      }
+    },
+    // 数据更新
+    update() {
+      this.info.forEach((item) => {
+        item.children.forEach((i) => {
+          i.data = {
+            number: [i.value],
+            content: "{nt}",
+            textAlign: "center",
+            style: {
+              fill: this.fontColor[this.getRandom(0, 11)],
+              fontWeight: "bold",
+            },
+          };
+          i.unit = i.danwei;
+        });
+      });
+      this.topBarData = JSON.parse(JSON.stringify(this.info));
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.content{
+  height: 90%;
+  // background-color: rgba(6, 30, 93, 0.5);
+  // .title{
+  //   // width: 100%;
+  //   margin: 20px 2%;
+    
+  // }
+}
+.bar {
+  position: relative;
+  margin: 20px 2%;
+  height: 150px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background-color: rgba(6, 30, 93, 0.5);
+  .item {
+    width: 20%;
+    // width: calc(100% / 13);
+    height: 60%;
+    padding: 12px 20px;
+    border-left: 5px solid rgb(6, 30, 93);
+    &:first-child {
+      width: 35%;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      .box {
+        width: 180px;
+      }
+    }
+    &:nth-child(2) {
+      width: 11%;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      .box {
+        width: 33%;
+      }
+    }
+    &:nth-child(3) {
+      width: 16%;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      .box {
+        width: 50%;
+      }
+    }
+    &:nth-child(4) {
+      width: 16%;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      .box {
+        width: 33%;
+      }
+    }
+    &:last-child {
+      width: 10%;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      .box {
+        width: 50%;
+      }
+    }
+    .title {
+      text-align: center;
+      font-size: 18px;
+      font-weight: bold;
+      margin-bottom: 20px;
+    }
+    .box {
+      display: inline-block;
+      width: 33%;
+      .label {
+        text-align: center;
+        font-size: 14px;
+      }
+      .count {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        .flop {
+          width: 60px;
+          height: 40px;
+          font-size: 18px;
+        }
+        .flops{
+          width: 180px;
+          height: 40px;
+          font-size: 10px;
+        }
+        .unit {
+          margin-left: 10px;
+          box-sizing: border-box;
+        }
+      }
+    }
+  }
+}
+
+#top-bar {
+  height: 180px;
+}
+.dv-decoration-10 {
+  width: 96%;
+  margin: 7px 2% 0;
+  height: 5px;
+}
+</style>

+ 86 - 0
src/views/system/jbdHome/board/component/getPieView.vue

@@ -0,0 +1,86 @@
+<template>
+  <div class="pieView">
+    <div style="height: 30px;line-height: 30px;text-align: left;padding-left: 10px;">{{info.config.title||""}}</div>   
+    <div style="width:100%;height:320px;display: inline-block;">
+      <div :id="info.config.idSelector" style="width:100%;height:320px;"> </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from "echarts";
+export default {
+  data(){
+    return{
+    }
+  },
+  props:{
+    info:{
+      type:Object,
+      default:{}
+    }
+  },
+  mounted() {
+    let this_ = this;
+    this.$nextTick(()=>{
+      this_.getMiddleLeft();
+    })
+    
+  },
+  methods:{
+    getMiddleLeft(){ 
+      let chartDom = document.getElementById(this.info.config.idSelector);
+      const setEchartWH = {
+        //设置控制图表大小变量
+        width: 350,
+        height: 320,
+      };
+      var myChart = echarts.init(chartDom, null, setEchartWH);
+      var option;
+      option = {
+        title: {
+          subtext: '',
+          left: 'center',
+         
+          textStyle:{
+            color:"#fff"
+          }
+        },
+        color:this.info.color,
+        tooltip: {
+          trigger: 'item'
+        },
+        legend: {
+          orient: 'vertical',
+          left: 'right',
+          textStyle:{
+            color: '#fff'
+          }
+        },
+        series: [{
+          type: 'pie',
+          radius: '50%',
+          
+          data:this.info.data,
+          emphasis: {
+            itemStyle: {
+              shadowBlur: 10,
+              shadowOffsetX: 0,
+              shadowColor: 'rgba(0, 0, 0, 0.5)'
+            }
+          }
+        }]
+      };
+      option && myChart.setOption(option);
+    },
+
+  }
+};
+</script>
+<style lang="scss" scoped>
+.pieView{
+  display: flex;
+  width: 100%;
+  background-color: rgba(6,30,93,.5);
+}
+</style>

+ 132 - 0
src/views/system/jbdHome/board/component/zhuzhuangtu.vue

@@ -0,0 +1,132 @@
+<template>
+  <div class="pieView">
+    <div style="height: 30px;line-height: 30px;text-align: left;padding-left: 10px;width: 100%;">{{info.config.title}}</div>   
+    <div style="width:100%;height:320px;display: inline-block;">
+      <div :id="info.config.idSelector" style="width:100%;height:320px;"> </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {};
+  },
+  props: {
+    info: {
+      type: Object,
+      default: {},
+    },
+  },
+  methods: {
+    getMiddleLeft() {
+      var chartDom = document.getElementById(this.info.config.idSelector);
+      var myChart = echarts.init(chartDom);
+      const setEchartWH = {
+        //设置控制图表大小变量
+        width: 250,
+        height: 300,
+      };
+      var myChart = echarts.init(chartDom, null, setEchartWH);
+      var option;
+      option = {
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        xAxis: [
+          {
+            type: "category",
+            data: this.info.xData,
+            interval: 2,
+            axisTick: {
+              alignWithLabel: false,
+            },
+            axisLabel: {
+              // rotate: -1,
+              // margin: 0,
+              fontSize: 12,
+              formatter:function(value){  
+                var str = ""; 
+                var num = 6; //每行显示字数 
+                var valLength = value.length; //该项x轴字数  
+                var rowNum = Math.ceil(valLength / num); // 行数  
+                if(rowNum > 1) {
+                    for(var i = 0; i < rowNum; i++) {
+                        var temp = "";
+                        var start = i * num;
+                        var end = start + num;
+                        
+                        temp = value.substring(start, end) + "\n";
+                        str += temp; 
+                    }
+                    return str;
+                } else {
+                    return value;
+                } 
+            
+            },
+            },
+            axisLine: {
+            lineStyle: {
+              color: "#fff",
+              width:1
+            }
+          }
+          },
+        ],
+        yAxis: [
+          {
+            type: "value",
+          
+          axisLine: {
+            lineStyle: {
+              color: "#fff"
+            }
+          },
+          interval:1
+        },
+        ],
+        series: [
+          {
+            type: "bar",
+            data: this.info.data,
+            barWidth: 30,
+            label:{
+              show: true,
+              position: 'top',
+              color:"#fff"
+            },
+            itemStyle: {
+            normal: {
+                color: function(params) {
+                    var colorList = ['#5c7bd9', '#9fe080', '#ffdc60', '#ff7070','#7ed3f4', '#ff915a'];
+                    return colorList[params.dataIndex]
+                }
+            }
+        }
+          },
+          
+        ],
+      };
+      option && myChart.setOption(option);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.pieView {
+  display: flex;
+  width: 100%;
+  background-color: rgba(6,30,93,.5);
+}
+</style>

+ 617 - 0
src/views/system/jbdHome/board/equipmentBoard.vue

@@ -0,0 +1,617 @@
+<template>
+  <div class="content">
+    <dv-full-screen-container>
+      <!-- 头部内容 -->
+      <div class="header">
+        <dv-decoration-8 class="left" />
+        <dv-decoration-5 class="center" />
+        <dv-decoration-8 class="right" :reverse="true" />
+        <div class="title">{{ titleName }}</div>
+        <div class="time">
+          <span>月份:</span>
+          <el-date-picker v-model="month" type="month" value-format="yyyy-MM" format="yyyy-MM" placeholder="日期选择" style="width: 120px" :readonly="false" :editable="true" :clearable="false" @change="updateAll" />
+        </div>
+        <div class="back" @click.prevent="goBack()">
+          <dv-border-box-8>返回</dv-border-box-8>
+        </div>
+      </div>
+      <dv-border-box-1>
+        <!-- 顶部数据 -->
+        <div class="topCard">
+          <top-bar v-if="topBarData.length" :info="topBarData" />
+        </div>
+        <div class="middleCard" >
+          <div style="width:100%">
+          <div class="middleCardLeft" >
+            <middleCard v-if="MiddleLeftPieViewList.data.length" :info="MiddleLeftPieViewList" ref="middleCardLeft"/>
+          </div>
+          <dv-decoration-2 :reverse="true" style="width:5px;height:350px;margin:0 15px;" />
+          <div class="middleCardCenter">
+            <middleCard v-if="eBgRateData.data.length" :info="eBgRateData" ref="middleCardCenter"/>
+          </div>
+          <dv-decoration-2 :reverse="true" style="width:5px;height:350px;margin:0 15px;" />
+          <div class="middleCardRight">
+            <CarouselTabl v-if="config.data.length" :info="config"/>
+          </div>
+          <dv-decoration-2 :reverse="true" style="width:5px;height:350px;margin:0 15px;" />
+          <div class="middleCardRight1">
+            <CarouselTabl v-if="shiyonglvConfig.data.length" :info="shiyonglvConfig"/>
+          </div>
+        </div>
+        </div>
+        <dv-decoration-10 />
+        <div class="bottomCard">
+          <div style="width:31%;display:flex;">
+            <div class="bottomCardLeft0">
+              <middleCard v-if="weiHuSheBeiData.data.length" :info="weiHuSheBeiData" ref="sheBeiWeiHuRef"/>
+            </div>
+            <dv-decoration-2 :reverse="true" style="width:3%;height:330px;margin: 0 10px;" />
+            <div style="width:37%">
+              <zhuzhuangtu v-if="sheBeiweiHuData.data.length" :info="sheBeiweiHuData"  ref="sheBeiWeiHuDataref"/>          
+            </div>
+          </div>
+          <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin: 0 10px;" />
+          <div style="width:31%;display:flex;">
+            <div class="bottomCardLeft">
+              <middleCard v-if="sheBeiHeChaData.data.length" :info="sheBeiHeChaData" ref="sheBeiHeChaRef"/>
+            </div>
+            <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin: 0 10px;" />
+            <div style="width:37%">
+              <zhuzhuangtu v-if="bottomData.data.length" :info="bottomData"  ref="bottomCardLeft"/>          
+            </div>
+          </div>
+          <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin: 0 10px;" />
+          <div style="width:31%;display:flex;">
+            <div class="bottomCardright">
+              <middleCard v-if="jianDingjiaoZhunSheBeiData.data.length" :info="jianDingjiaoZhunSheBeiData" ref="jiandingRef"/>
+            </div>
+            <dv-decoration-2 :reverse="true" style="width:3%;height:330px;margin: 0 10px;" />
+            <div style="width:40%">
+              <zhuzhuangtu v-if="zhuantaiEData.data.length" :info="zhuantaiEData"  ref="zhuantaiEDataref"/>
+            </div>
+          </div>
+        </div>
+      </dv-border-box-1>
+    </dv-full-screen-container>
+  </div>
+</template>
+<script>
+import screenfull from "screenfull";
+import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
+import { color } from 'echarts/lib/export';
+// import { config } from 'public/lib/UEditor/third-party/zeroclipboard/ZeroClipboard';
+// import { acceptList } from "./data.js";
+// import { number } from 'echarts/lib/export';
+export default {
+  name: "checkBoard",
+  components: {
+    topBar: () => import('./component/equipmentBoardTopcard'),
+    middleCard: () => import('./component/getPieView'),
+    zhuzhuangtu: () => import('./component/zhuzhuangtu'),
+    CarouselTabl: () => import('./component/CarouselTabl')
+  },
+  data() {
+    const d = new Date();
+    return {
+      titleName: "设备管理看板",
+      year: d.toJSON().slice(0, 4),
+      month: d.toJSON().slice(0, 7),
+      today: d.toJSON().slice(0, 10),
+      topBarData: [],
+      timer: null,
+      MiddleLeftPieViewList:{
+        data:[],
+        config:{idSelector:"main"}, //{name:,value}
+        color:[]
+      },
+      eBgRateData:{
+        data:[],
+        config:{}
+      },
+      sheBeiHeChaData:{
+        data:[],
+        config:{}
+      },
+      jianDingjiaoZhunSheBeiData:{
+        data:[],
+        config:{}
+      },
+      weiHuSheBeiData:{
+        data:[],
+        config:{}
+      },
+      bottomData:{xData:[],data:[],config:{idSelector:""}},
+      zhuantaiEData:{xData:[],data:[],config:{idSelector:""}},
+      sheBeiweiHuData:{xData:[],data:[],config:{idSelector:""}},
+      config:{ header:['设备名称','设备编号','规格型号','设备状态'],data:[]},
+      shiyonglvConfig:{ header:['设备名称','设备编号','设备状态','频率'],data:[]},
+      zichan:0,
+    };
+  },
+  created() {
+    if (screenfull.isEnabled && !screenfull.isFullscreen) {
+      this.allView();
+    }
+    this.updateAll();
+  },
+  beforeDestroy() {
+    if (screenfull.isFullscreen) {
+      screenfull.toggle();
+    }
+  },
+  methods: {
+    allView() { // 默认显示全屏 
+      screenfull.request();
+    },
+    goBack() {
+      this.$router.back(-1);
+    },
+    updateAll(e) {
+      // this.getSheBeiMony();
+      this.getTopBarData();
+      this.getMiddleLeftPieView();
+      this.getCarouselTable();
+      this.getCarouselShiYonglvTable();
+      // this.getbottomData();
+    },
+    async getTopBarData(){
+      let this_ = this;
+      let sql1 = `select fei_yong_ as feiyong from t_mjsbxzqrb where shi_fou_guo_shen_ ='1'`
+      let zichan
+      await curdPost("sql",sql1).then(res=>{
+        const data = res.variables.data
+        zichan = this_.getAllMonyInt(data);
+      })
+      let sql2 = `select yu_suan_ as feiyong from t_mjyqsbwxsqb where shi_fou_guo_shen_ ='1'`
+      let shenqinngfeiyong
+      await curdPost("sql",sql1).then(res=>{
+        const data = res.variables.data
+        shenqinngfeiyong = this_.getAllMonyInt(data);
+      })
+      let sql3 = `select shi_ji_zhi_chu_ as feiyong from t_mjsbwxqrb where shi_fou_guo_shen_ ='1'`
+      let querennfeiyong
+      await curdPost("sql",sql1).then(res=>{
+        const data = res.variables.data
+        querennfeiyong = this_.getAllMonyInt(data);
+      })
+      let weixiufeiyongbi = shenqinngfeiyong / querennfeiyong;
+      let sql =`select a.Equipments,a1.mony,b.addEquipments,c.testEquipments,c1.testNoEquipments,d.checkEquipments,
+      d1.checkNoEquipments,e.goodEquipments,f.scrapEquipments,g.limitedEquipments,h.weiHuNoEquipments,h1.weiHuEquipments
+      from  
+      (select count(*) as Equipments from t_sbdj) as a,
+      (select bei_zhu_ as mony FROM t_sbdj) as a1,
+      (select count(*) as addEquipments  from t_sbdj where gou_jin_ri_qi_ LIKE '${this_.month}') as b,
+      (select count(*) as testEquipments from t_mjsbxzqrb where shi_fou_guo_shen_ ='1') as c,
+      (select count(*) as testNoEquipments from t_mjsbjdxzjhzb) as c1,
+      (select count(*) as checkEquipments from t_mjyqsbwxsqb where create_time_ LIKE '${this_.month}' ) as d,
+      (select count(*) as checkNoEquipments from t_mjsbwxqrb where create_time_ LIKE '${this_.month}' and shi_fou_guo_shen_ ='1') as d1,
+      (select count(*) as goodEquipments  from t_sbdj where she_bei_zhuang_ta ='正常使用') as e,
+      (select count(*) as scrapEquipments  from t_sbdj where she_bei_zhuang_ta ='禁止使用' or she_bei_zhuang_ta ='报废/停用') as f,
+      (select count(*) as limitedEquipments  from t_sbdj where she_bei_zhuang_ta ='限制使用') as g,
+      (select count(*) as weiHuNoEquipments  from t_mjsbwhjhzb where create_time_ LIKE '${this_.month}') as h,
+      (select count(*) as weiHuEquipments  from t_mjsbwhbyjlby where create_time_ LIKE '${this_.month}' and shi_fou_guo_shen_ ='1') as h1`;
+
+     await curdPost("sql",sql).then(res=>{
+        const data = res.variables.data
+        // let zichan = '待确认';
+        let eIntactnessRate = Number(((data[0].goodEquipments/data[0].Equipments).toFixed(3)+"").slice(2,4));
+        let eBadRate = 100 - parseInt(eIntactnessRate);
+        let obj ={};
+        obj.value = data[0].goodEquipments;
+        obj.name = "正常设备";
+        this_.MiddleLeftPieViewList.data.push(obj);
+        obj ={};
+        obj.value = data[0].limitedEquipments;
+        obj.name = "备用设备";
+        this_.MiddleLeftPieViewList.data.push(obj);
+        obj ={};
+        obj.value = data[0].scrapEquipments;
+        obj.name = "停用/报废";
+        this_.MiddleLeftPieViewList.data.push(obj);
+        this_.MiddleLeftPieViewList.color = ['#339933','#FFFF66','#FF0033'];
+        this_.MiddleLeftPieViewList.config.title = "设备状态工作分布";
+        this_.MiddleLeftPieViewList.config.idSelector = "main2";
+        this_.$nextTick(()=>{
+        setTimeout(() => {
+					this_.$refs.middleCardLeft.getMiddleLeft()// hhhh xxxx
+				}, 1000)
+        })
+        obj ={};
+        let result =[
+        {
+          title: '',
+          children: [
+            {
+              label: '设备总数',
+              value: data[0].Equipments,
+              danwei:'台'
+            },
+            {
+              label: '本月新增设备',
+              value: data[0].addEquipments,
+              danwei:'台'
+            },
+            {
+              label: '正常设备',
+              value: data[0].goodEquipments,
+              danwei:'台'
+            },            
+            {
+              label: '报废/停用设备',
+              value: data[0].scrapEquipments,
+              danwei:'台'
+            },
+            {
+              label: '受限设备',
+              value: data[0].limitedEquipments,
+              danwei:'台'
+            }
+          ]
+        },
+        {
+          title: '',
+          children: [
+            {
+              label: '本月计划维护设备',
+              value: data[0].weiHuNoEquipments,
+              danwei:'台'
+            },
+            {
+              label: '本月已维护设备',
+              value: data[0].weiHuEquipments,
+              danwei:'台'
+            }
+          ]
+        },
+        {
+          title: '',
+          children: [
+            {
+              label: '本月计划检定/校准设备',
+              value: data[0].testNoEquipments,
+              danwei:'台'
+            },
+            {
+              label: '本月已检定/校准设备',
+              value: data[0].testEquipments,
+              danwei:'台'
+            },
+            {
+              label: `检定校准费用`,
+              value: zichan,
+              danwei:'元'
+            }
+          ]
+        },
+        {
+          title: '',
+          children: [
+            {
+              label: '本月申请维修设备',
+              value: data[0].checkNoEquipments,
+              danwei:'台'
+            },
+            {
+              label: '本月完成维修设备',
+              value: data[0].checkEquipments,
+              danwei:'台'
+            },
+            {
+              label: '费用比',
+              value: weixiufeiyongbi||0,
+              danwei:'%'
+            }
+          ]
+        },
+        {
+          title: '',
+          children: [
+            {
+              label: '设备完好率',
+              value: eIntactnessRate,
+              danwei:'%'
+            },
+            {
+              label: '设备故障率',
+              value: eBadRate,
+              danwei:'%'
+            },
+            // {
+            //   label: '设备总值',
+            //   value:zichan,
+            //   danwei:'元'
+            // },
+          ]
+        }
+       ];
+       //
+      this_.bottomData.xData =["计划核查设备","已核查设备"];
+      this_.bottomData.data.push(data[0].checkNoEquipments);
+      this_.bottomData.data.push(data[0].checkEquipments);
+      this_.bottomData.config.title ="核查设备柱状图";
+      this_.bottomData.config.idSelector ="main4";
+      this_.zhuantaiEData.xData =["计划检定/校准设备","已完成检定/校准设备",];
+      this_.zhuantaiEData.data.push(data[0].testNoEquipments);
+      this_.zhuantaiEData.data.push(data[0].testEquipments);
+      this_.zhuantaiEData.config.title ="设备检定/校准设备柱状图";
+      this_.zhuantaiEData.config.idSelector ="main3"; 
+      //维护设备柱状图
+      this_.sheBeiweiHuData.xData =["计划维护设备","已完成设备",];
+      this_.sheBeiweiHuData.data.push(data[0].weiHuNoEquipments);
+      this_.sheBeiweiHuData.data.push(data[0].weiHuEquipments);
+      this_.sheBeiweiHuData.config.title ="设备维护柱状图";
+      this_.sheBeiweiHuData.config.idSelector ="mainWeiHuZ";
+      this_.$nextTick(()=>{
+        setTimeout(() => {
+          this_.$refs.zhuantaiEDataref.getMiddleLeft()// hhhh xxxx
+					this_.$refs.bottomCardLeft.getMiddleLeft()// hhhh xxxx
+          this_.$refs.sheBeiWeiHuDataref.getMiddleLeft();
+				}, 1000)
+      })
+      
+      let objRate = {};
+      objRate.name ="设备完好率";
+      objRate.value = eIntactnessRate;
+      this_.eBgRateData.data.push(objRate);
+      objRate ={};
+      objRate.value = eBadRate;
+      objRate.name = "设备故障率";
+      this_.eBgRateData.data.push(objRate);
+      this_.eBgRateData.color = ['#339933','#FF0033'];
+      this_.eBgRateData.config.title = "设备完好率分布";
+      this_.eBgRateData.config.idSelector = "main1";
+      //设备维护
+      let objweihu ={};
+      objweihu.name ="计划维护设备";
+      objweihu.value = data[0].weiHuNoEquipments;
+      this_.weiHuSheBeiData.data.push(objweihu);
+      objweihu ={};
+      objweihu.value =  data[0].weiHuEquipments;
+      objweihu.name = "已维护设备";
+      this_.weiHuSheBeiData.data.push(objweihu);
+      this_.weiHuSheBeiData.color = ['#5470c6','#38a838'];
+      this_.weiHuSheBeiData.config.title = "设备维护分布";
+      this_.weiHuSheBeiData.config.idSelector = "mainWeiHu";
+      //设备核查
+      let objHeCha ={}; //核查改维修
+      objHeCha.name ="维修设备申请";
+      objHeCha.value = data[0].checkNoEquipments;
+      this_.sheBeiHeChaData.data.push(objHeCha);
+      objHeCha ={};
+      objHeCha.value =  data[0].checkEquipments;
+      objHeCha.name = "已完成维修设备";
+      this_.sheBeiHeChaData.data.push(objHeCha);
+      this_.sheBeiHeChaData.color = ['#5470c6','#38a838'];
+      this_.sheBeiHeChaData.config.title = "设备维修分布";
+      this_.sheBeiHeChaData.config.idSelector = "mainHeCha";
+      //设备检定校准
+      let objJianding ={};
+      objJianding.name ="计划检定/校准设备";
+      objJianding.value = data[0].testNoEquipments;
+      this_.jianDingjiaoZhunSheBeiData.data.push(objJianding);
+      objJianding ={};
+      objJianding.value =  data[0].testEquipments;
+      objJianding.name = "已完成设备";
+      this_.jianDingjiaoZhunSheBeiData.data.push(objJianding);
+      this_.jianDingjiaoZhunSheBeiData.color = ['#5470c6','#38a838'];
+      this_.jianDingjiaoZhunSheBeiData.config.title = "设备检定校准分布";
+      this_.jianDingjiaoZhunSheBeiData.config.idSelector = "mainJianDing";
+      this_.$nextTick(()=>{
+        setTimeout(() => {
+					this_.$refs.middleCardCenter.getMiddleLeft();// hhhh xxxx
+          this_.$refs.sheBeiHeChaRef.getMiddleLeft();//
+          this_.$refs.jiandingRef.getMiddleLeft();
+				}, 1000)
+      })
+      objRate = {};
+      this_.topBarData = result;
+      }).catch(err=>{
+        console.log(err)
+      })
+    },
+    getMiddleLeftPieView(){
+      // [ { value: 1048, name: 'Search Engine' },]
+      console.log(1)
+    },
+    async getCarouselTable() {
+      let this_ = this;
+      const sql = "select * from t_sbdj where she_bei_zhuang_ta ='禁止使用' or she_bei_zhuang_ta ='报废/停用'";
+      let data1 = [];
+      await curdPost("sql", sql)
+        .then((res) => {
+          const result = res.variables.data;
+          result.forEach((item) => {
+            data1 = [];
+            data1.push(item.she_bei_ming_cheng_);
+            data1.push(item.she_bei_shi_bie_h);
+            data1.push(item.gui_ge_xing_hao_);
+            data1.push(item.she_bei_zhuang_ta);
+            this_.config.data.push(data1);
+          });
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    async getCarouselShiYonglvTable() {
+      let this_ = this;
+      const sql = `select she_bei_ming_chen,she_bei_bian_hao_ ,she_bei_zhuang_ku,COUNT(*) AS pinlv FROM t_mjsbsy GROUP BY she_bei_bian_hao_  AND create_time_ LIKE '%${this.month}%' ORDER BY pinlv DESC`;
+      let data1 = [];
+      let res1 =[]
+      await curdPost("sql", sql)
+        .then((res) => {
+          const result = res.variables.data;
+          result.forEach((item) => {
+            data1 = [];
+            data1.push(item.she_bei_ming_chen);
+            data1.push(item.she_bei_bian_hao_);
+            data1.push(item.she_bei_zhuang_ku);
+            data1.push(item.pinlv);
+            this_.shiyonglvConfig.data.push(data1);
+          });
+          console.log(this_.shiyonglvConfig.data)
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    getAllMonyInt (monyArr){
+      debugger
+      let mony = 0;
+      let filterMony = 0
+      monyArr.forEach(item=>{      
+           filterMony = item.feiyong*1;
+           mony +=filterMony    
+
+      })
+      return mony;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.content {
+  width: 100%;
+  height: 100%;
+  background-color: #030409;
+  position: absolute;
+  color: #fff;
+  z-index: 999;
+    #dv-full-screen-container {
+      background-image: url("./img/bg.png");
+      background-size: 100% 100%;
+      box-shadow: 0 0 3px blue;
+      display: flex;
+      flex-direction: column;
+    }
+    .main-content {
+      flex: 1;
+      display: flex;
+      flex-direction: column;
+    }
+
+    .block-left-right-content {
+      flex: 1;
+      display: flex;
+      margin-top: 0.8%;
+    }
+    .block-top-bottom-content {
+      flex: 1;
+      display: flex;
+      flex-direction: column;
+      box-sizing: border-box;
+      padding-left: 0.8%;
+    }
+    .block-top-content {
+      height: 55%;
+      display: flex;
+      flex-grow: 0;
+      box-sizing: border-box;
+      padding-bottom: 0.8%;
+    }
+  
+  .header {
+    position: relative;
+    width: 100%;
+    height: 100px;
+    display: flex;
+    justify-content: space-between;
+    flex-shrink: 0;
+    .left,
+    .right {
+      width: 25%;
+      height: 60px;
+    }
+    .center {
+      width: 40%;
+      height: 60px;
+      margin-top: 30px;
+    }
+    .title {
+      position: absolute;
+      font-size: 30px;
+      font-weight: bold;
+      left: 50%;
+      top: 15px;
+      transform: translateX(-50%);
+    }
+    .time,
+    .back {
+      width: 8%;
+      cursor: pointer;
+      height: 2.825rem;
+      line-height: 2.825rem;
+      text-align: center;
+      margin-top: 2.5%;
+      flex: 1;
+      position: absolute;
+      color: #ffffff;
+    }
+    .time {
+      display: flex;
+      justify-content: flex-end;
+      width: 20%;
+      right: 75%;
+    }
+    .back {
+      left: 75%;
+    }
+  }  
+  .topCard{
+    width: 100%;
+  }
+  .middleCard,.bottomCard{
+    width: 100%;
+    margin-left: 30px;
+    // margin-top: 30px;
+    div{
+      display: inline-block;                                                        
+    }
+    .middleCardLeft{
+      width: 19%;
+    }
+    .middleCardCenter{
+      width: 19%;
+    }
+    .middleCardRight{
+      width: 28%;
+    }
+    .middleCardRight1{
+      width: 25%;
+    }
+    padding: 10px;
+  }
+  .bottomCard{
+    display: flex;
+    div{
+      display: inline-block;
+    }
+    .bottomCardLeft0,.bottomCardLeft,.bottomCardright{
+      width: 70%;
+    }
+    // .bottomCardCenter0{
+
+    // }
+    // .bottomCardLeft{
+
+    //   margin-left: 30px;
+    // }
+    // .bottomCardCenter{
+    //   margin-left: 15px;
+    // }
+    // .bottomCardright{
+
+    //   margin-left: 15px;
+    // }
+    // .bottomCardright2{
+
+    //   margin-left: 15px;
+    // }
+  }
+}
+.dv-decoration-10 {
+  width: 96%;
+  margin: 7px 2% 0;
+  height: 5px;
+}
+</style>

+ 30 - 26
src/views/system/jbdScan/goods/lingliaodan.vue

@@ -23,33 +23,19 @@
                 <div class="tagBox">
                   <div>
                     <div style="font-size: 10px">
-                      领料部门:<span style="margin-left: 10px">{{
-                        item1[0].bu_men_ming_cheng
-                      }}</span>
+                      领料部门:
+                      <span style="margin-left: 10px">
+                      {{item1.bu_men_ming_cheng}}</span>
                     </div>
                   </div>
                   <div>
-                    <div
-                      style="
-                        margin-left: 20px;
-                        margin-right: 5px;
-                        font-size: 10px;
-                      "
-                    >
-                      领料单编号:<span style="margin-left: 10px">{{
-                        item1.ling_liao_chu_ku_
-                      }}</span>
+                    <div style=" margin-left: 20px;  margin-right: 5px; font-size: 10px;" >
+                      领料单编号:
+                      <span style="margin-left: 10px">{{  item1.ling_liao_chu_ku_ }}</span>
                     </div>
-                    <div
-                      style="
-                        margin-left: 20px;
-                        margin-right: 5px;
-                        font-size: 10px;
-                      "
-                    >
-                      领 料 日 期:<span style="margin-left: 10px">{{
-                        item1.ling_liao_ri_qi_
-                      }}</span>
+                    <div style="margin-left: 20px;  margin-right: 5px; font-size: 10px; ">
+                      领 料 日 期:
+                      <span style="margin-left: 10px">{{ item1.ling_liao_ri_qi_}}</span>
                     </div>
                   </div>
                 </div>
@@ -93,8 +79,7 @@
                         <td style="width: 120px">{{ item.bei_zhu_ }}</td>
                       </tr>
                     </tbody>
-                    <tfoot
-                      align="right"
+                    <tfoot :align="right"
                       valign="bottom"
                       style="text-align: right !important; height: 30px"
                     >
@@ -175,10 +160,12 @@ export default {
       id: "",
       list: [],
       visible: true,
+      bumenList:[],
     };
   },
   created() {
     this.getInit();
+    this.bumenListRequest();
   },
   filters: {
     name4: function (value) {
@@ -187,6 +174,15 @@ export default {
         return res.variables.data[0].NAME_;
       });
     },
+    bumenfilters: function (value, list) {
+      for (let i = 0; i < list.length; i++) {
+        if (value == list[i].ID_) {
+          return list[i].NAME_;
+        } else if (i == list.length - 1) {
+          return value;
+        }
+      }
+    },
   },
   watch: {
     obj() {
@@ -198,6 +194,13 @@ export default {
       this.$refs.easyPrint.print();
       // this.$refs.easyPrint.window.print()
     },
+    bumenListRequest(){ //部门列表
+      let sql = "select ID_,NAME_ FROM  ibps_party_org ";
+      let this_ = this;
+      repostCurd("sql", sql).then((res) => {
+       this_.bumenList = res.variables.data;
+      });
+    },
     getInit() {
       var idStr = "";
       this.obj.forEach((item) => {
@@ -246,6 +249,7 @@ export default {
       let time1, time2, time3;
       repostCurd("sql", sql).then((res) => {
         zhubiao = res.variables.data;
+        console.log(zhubiao)
         zhubiao.forEach((item) => {
           let sql1 = `select * FROM t_crkjlx  WHERE FIND_IN_SET(parent_id_,'${item.id_}')`;
           let chushi = 0;
@@ -272,7 +276,7 @@ export default {
                 data["time3"] = time3;
                 data["ling_liao_chu_ku_"] = item.ling_liao_chu_ku_;
                 data["id_"] = item.id_;
-                data["ling_liao_bu_men_"] = item.ling_liao_bu_men_;
+                data["bu_men_ming_cheng"] = item.bu_men_ming_cheng;
                 data["ling_liao_ri_qi_"] = item.ling_liao_ri_qi_;
                 data["gong_ying_shang_"] = item.gong_ying_shang_ || 0;
                 data.forEach((it) => {