Переглянути джерело

fix:复刻金源信通代码

zjy 3 роки тому
батько
коміт
ed044b12bc

BIN
public/images/shiyanshijiankong/shiyanshi.png


+ 636 - 264
src/views/huanjingjiankong/huanjingjiankong.vue

@@ -1,316 +1,623 @@
 <template>
   <div class="test-content">
-    <div class="title">环境监控</div>
+    <div class="title">
+      <div class="title-center" style="font-size: 26px; color: #c12530">
+        明鉴检测实验室温湿度负压动态监控系统
+      </div>
+      <div class="info-right">
+        <span style="color: #c12530; margin-right: 5px">采集时间:</span
+        ><span style="color: #276bcc; margin-right: 15px">{{ newTiMe }}</span>
+        <button @click="returnBlack" class="black">返回</button>
+      </div>
+    </div>
     <div class="body-content">
-      <div class="infoShow">
-        <div class="title">监控数据</div>
-        <div class="control-data">
-          <div class="dmo">
-            <div class="left-icon">
-              <div>
-                <i
-                  class="el-icon-school"
-                  style="font-size: 30px; color: #70cae5"
-                ></i>
-              </div>
-              <div class="room-name">试剂库1</div>
-            </div>
-            <div class="right-target">
-              <div class="wendu item">
-                温度:
-                <span
-                  >25℃
-                  <i
-                    class="el-icon-minus"
-                    style="color: #3399ff; font-size: 18px; padding-left: 4px"
-                  ></i
-                ></span>
-              </div>
-              <div class="shidu item">
-                湿度:
-                <span
-                  >91%
-                  <i
-                    class="el-icon-minus"
-                    style="color: #3399ff; font-size: 18px; padding-left: 4px"
-                  ></i
-                ></span>
-              </div>
-              <div class="qiya item">
-                气压:
-                <span
-                  >15pa
-                  <i
-                    class="el-icon-minus"
-                    style="color: #3399ff; font-size: 18px"
-                  ></i
-                ></span>
-              </div>
-            </div>
-          </div>
-          <div class="dmo">
-            <div class="left-icon">
-              <div>
-                <i
-                  class="el-icon-school"
-                  style="font-size: 30px; color: #70cae5"
-                ></i>
-              </div>
-              <div class="room-name">试剂库2</div>
-            </div>
-            <div class="right-target">
-              <div class="wendu item">
-                温度:
-                <span
-                  >25℃
-                  <i
-                    class="el-icon-minus"
-                    style="color: #3399ff; font-size: 18px; padding-left: 4px"
-                  ></i
-                ></span>
-              </div>
-              <div class="shidu item">
-                湿度:
-                <span
-                  >91%
-                  <i
-                    class="el-icon-minus"
-                    style="color: #3399ff; font-size: 18px; padding-left: 4px"
-                  ></i
-                ></span>
-              </div>
-              <div class="qiya item">
-                气压:
-                <span
-                  >15pa
-                  <i
-                    class="el-icon-minus"
-                    style="color: #3399ff; font-size: 18px; padding-left: 4px"
-                  ></i
-                ></span>
-              </div>
-            </div>
+      <div class="marquee-wrap" v-if="false">
+        <div>
+          <ul
+            class="marquee-list"
+            :class="{ 'animate-up': animateUp }"
+            :style="{ width: btnShow ? '360px' : '0px' }"
+          >
+            <li v-for="(item, index) in envirListData" :key="index">
+              <span>{{ item.deviceName }}</span> &nbsp;
+              <span>{{ item.t1 | numToFixed }}</span
+              >&nbsp; <span>{{ item.h1 | numToFixed }}</span
+              >&nbsp; <span>{{ item.p1 | numToFixed }}</span
+              >&nbsp;
+            </li>
+          </ul>
+          <div class="button">
+            <i class="el-icon-caret-right" @click="btnextendRight"></i>
+            <i class="el-icon-caret-left" @click="btnextendLeft"></i>
           </div>
-          <div class="dmo active">
-            <div class="left-icon">
-              <div>
-                <i
-                  class="el-icon-school"
-                  style="font-size: 30px; color: #70cae5"
-                ></i>
-              </div>
-              <div class="room-name">培养室2</div>
-            </div>
-            <div class="right-target">
-              <div class="wendu item item_active">
-                温度:
-                <span
-                  >25℃
-                  <i
-                    class="el-icon-top"
-                    style="color: red; font-size: 18px; padding-left: 4px"
-                  ></i
-                ></span>
-              </div>
-              <div class="shidu item">
-                湿度:
-                <span
-                  >91%
-                  <i
-                    class="el-icon-top"
-                    style="color: red; font-size: 18px; padding-left: 4px"
-                  ></i
-                ></span>
-              </div>
-              <div class="qiya item">
-                气压:
-                <span
-                  >15pa
-                  <i
-                    class="el-icon-bottom"
-                    style="color: #67c23a; font-size: 18px"
-                  ></i
-                ></span>
-              </div>
-            </div>
-          </div>
-          <!-- <span class="room">试剂库1:</span
-          ><span class="room-data">温度:25℃,湿度:71.6%</span>
-        </div>
-        <div class="control-data">
-          <span class="room">细胞培养室:</span
-          ><span class="room-data">温度:25℃,湿度:51.6%</span>
-        </div>
-        <div class="control-data active">
-          <span class="room">产物分析室:</span
-          ><span class="room-data">温度:29℃,湿度:71.6%</span>
-          <i
-            class="el-icon-warning-outline active-icon"
-  
-          ></i> -->
         </div>
       </div>
       <div class="mapShow">
         <div class="mapurl"></div>
         <div class="img-box">
-          <img src="images/shiyanshijiankong/shiyanshi.png" class="img" alt="" @click="mapEvent" />
+          <img
+            src="images/shiyanshijiankong/shiyanshi.png"
+            class="img"
+            alt=""
+            ref="wrap"
+          />
           <div
             ref="shijiku1"
             v-for="(item, index) in newweizhi"
             :key="index"
             :style="{ top: `${item.y}px`, left: `${item.x}px` }"
-            :class="[index == 1 ? 'shiyanshi_false' : 'shiyanshi_success']"
-          ></div>
-          <!-- <div  :style="{ top: `${item.y + 10}px`, left: `${item.x}px` }"><i class="el-icon-bell" style="background:red;font-size:20px;   position: absolute;"></i></div> -->
+            :class="[
+              item.run == '1'
+                ? item.ifshow == 'false'
+                  ? 'shiyanshi_false'
+                  : 'shiyanshi_success'
+                : 'bggray',
+            ]"
+          >
+            <div
+              :class="[item.ifshow == 'false' ? 'contentshow' : 'content']"
+              v-show="item.run == 1"
+            >
+              <div class="envir-conditoin">温度:{{ item.temp }}</div>
+              <div class="envir-conditoin">湿度:{{ item.humidness }}</div>
+              <div class="envir-conditoin">气压:{{ item.airPressure }}</div>
+            </div>
+          </div>
         </div>
       </div>
+      <div class="controlStatus">
+        <div class="noControl"><span class="gray"></span><span style="margin-left: 30px;">未控</span> </div>
+        <div class="yesControl"><span class="green"></span> <span style="margin-left: 30px;">在控</span> </div>
+        <div class="runWild"><span class="red"></span> <span><span style="margin-left: 30px;">失控</span> </span></div>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
+import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
 export default {
+  name: "DataView",
   data() {
     return {
+      btnShow: true,
+      animateUp: false,
+      envirListData: [],
+      fullHeight: "",
+      fullWidth: "",
+      list: [
+        {
+          room: "*HAU01",
+          time: "2020-07-08 18:27:23",
+          temp: "20",
+        },
+        {
+          room: "*HAU01",
+          time: "2020-07-08 18:27:23",
+          temp: "20",
+        },
+        {
+          room: "*HAU01",
+          time: "2020-07-08 18:27:23",
+          temp: "20",
+        },
+        {
+          room: "*HAU01",
+          time: "2020-07-08 18:27:23",
+          temp: "20",
+        },
+        {
+          room: "*HAU01",
+          time: "2020-07-08 18:27:23",
+          temp: "20",
+        },
+      ],
       screen: [],
       x: 396,
       y: 453,
       newposition: [],
       newweizhi: [],
+      newTiMe: "",
       weizhi: [
         {
-          x: 280,
-          y: 619,
+          x: 463,
+          y: 653,
         },
         {
-          x: 353,
-          y: 619,
+          x: 584,
+          y: 653,
         },
         {
-          x: 436,
-          y: 619,
+          x: 719,
+          y: 653,
         },
         {
-          x: 42,
-          y: 241,
+          x: 847,
+          y: 653,
         },
         {
-          x: 106,
-          y: 241,
+          x: 1460,
+          y: 655,
         },
         {
-          x: 48,
-          y: 97,
+          x: 1460,
+          y: 450,
         },
         {
-          x: 437,
-          y: 234,
+          x: 713,
+          y: 260,
         },
         {
-          x: 437,
-          y: 165,
+          x: 724,
+          y: 89,
         },
-      ],
-      domsize: [
         {
-          width: 949,
-          height: 757,
+          x: 950,
+          y: 127,
         },
         {
-          width: 949,
-          height: 757,
+          x: 1062,
+          y: 127,
         },
         {
-          width: 949,
-          height: 757,
+          x: 1205,
+          y: 127,
         },
         {
-          width: 949,
-          height: 757,
+          x: 1353,
+          y: 127,
         },
+        ,
         {
-          width: 949,
-          height: 757,
+          x: 321,
+          y: 99,
         },
         {
-          width: 949,
-          height: 757,
-        },
-        {
-          width: 949,
-          height: 757,
+          x: 357,
+          y: 200,
         },
+      ],
+      domsize: [
         {
-          width: 949,
-          height: 757,
+          width: 1560,
+          height: 857,
         },
       ],
+      timelistData: [],
+      ifshow: true,
     };
   },
+  filters: {
+    numToFixed: function (value) {
+      return value.toFixed(2);
+    },
+  },
   methods: {
-    mapEvent(e) {
-      console.log(e.offsetX, e.target.width, "  x   ");
-      console.log(e.offsetY, e.target.height, "y");
-      var dom = document.getElementsByClassName("img-box");
-      var doms = document.getElementsByClassName("shijiku2");
-      doms.style.top = "300px";
-      doms.style.left = "600px";
-      console.log(dom[0].clientHeight);
+    envirData() {
+      let sqlString =
+        "select * FROM DATA WHERE deviceName IN ('HAU01','HAU02','HAU03','HAU04','PAU01','PAU02')  ORDER BY saveTime DESC LIMIT 12";
+      var this_ = this;
+      curdPost("sql", sqlString).then((response) => {
+        this_.envirListData = response.variables.data;
+      });
+    },
+    returnBlack() {
+      this.$router.back(-1);
+    },
+    fmtDate(obj) {
+      var date = new Date(obj);
+      var y = 1900 + date.getYear();
+      var m = "0" + (date.getMonth() + 1);
+      var d = "0" + date.getDate();
+      var h = date.getHours();
+      var min = date.getMinutes();
+      var s = date.getMinutes();
+      return (
+        y +
+        "-" +
+        m.substring(m.length - 2, m.length) +
+        "-" +
+        d.substring(d.length - 2, d.length) +
+        "  " +
+        h +
+        ":" +
+        min +
+        ":" +
+        s
+      );
+    },
+    scrollAnimate() {
+      // this.animateUp = true;
+      let this_ = this;
+      let sqlString =
+        "select * FROM DATA WHERE deviceName IN ('HAU01','HAU02','HAU03','HAU04','PAU01','PAU02')  ORDER BY saveTime DESC LIMIT 6";
+      let newdata = [];
+      curdPost("sql", sqlString).then((response) => {
+        newdata = response.variables.data;
+        this_.newTiMe = this_.fmtDate(newdata[0].saveTime);
+        for (let i = 0; i < newdata.length; i++) {
+          setTimeout(() => {
+            this_.envirListData.push(newdata[i]);
+            this_.envirListData.shift();
+            this_.animateUp = true;
+          }, 3000 * (i + 1));
+        }
+        // clearTimeout(timer)
+      });
+    },
+    btnextendRight() {
+      this.btnShow = !this.btnShow;
+      this.screenChange();
+      this.mapChange();
+    },
+    btnextendLeft() {
+      this.btnShow = !this.btnShow;
+      this.screenChange();
+      this.mapChange();
+    },
+    // mapEvent(e) {
+    //   console.log(e.offsetX, e.offsetY, "  x   ");
+    //   console.log(e.target.height, e.target.width, "y");
+    // },
+    screenChange() {
+      this.fullHeight = `${document.documentElement.clientHeight}`;
+      // this.fullWidth = `${document.documentElement.clientWidth}`; //默认值
+      const that = this;
+      // that.domsize = [];
+      // that.domsize.push({
+      //   width: that.$refs.wrap.offsetWidth,
+      //   height: that.$refs.wrap.offsetHeight,
+      // });
+      // console.log(that.domsize, "domsizethat");
+      window.onresize = () => {
+        return (() => {
+          window.fullHeight = document.documentElement.clientHeight;
+          that.fullHeight = window.fullHeight;
+          // window.clientWidth = document.documentElement.clientWidth;
+          // that.fullWidth = window.fullWidth;
+        })();
+      };
+    },
+    mapChange() {
+      let this_ = this;
+      setTimeout(() => {
+        var dom = document.getElementsByClassName("img");
+        this_.screen = [];
+        this_.screen.push(dom[0].clientWidth);
+        this_.screen.push(dom[0].clientHeight);
+        this_.newweizhi = [];
+        this_.weizhi.forEach((item, index) => {
+          this_.x = parseInt(
+            (item.x * this_.screen[0]) / this_.domsize[0].width
+          );
+          this_.y = parseInt(
+            (item.y * this_.screen[1]) / this_.domsize[0].height
+          );
+          var newobj = {
+            x: "",
+            y: "",
+            temp: "",
+            humidness: "",
+            airPressure: "",
+            ifshow: "",
+            run: "",
+          };
+          newobj.x = this_.x;
+          newobj.y = this_.y;
+          newobj.temp = "";
+          newobj.humidness = "";
+          newobj.airPressure = "";
+          newobj.ifshow = "";
+          this_.newweizhi.push(newobj);
+        });
+      }, 10);
+    },
+    setIntervalData() {
+      let this_ = this;
+      setInterval(() => {
+        this.screenChange();
+        this_.mapChange();
+        this_.timeData();
+      }, 300000);
+    },
+    returnifShow(t, h, p) {
+      let temp = t.toFixed(2);
+      let humidness = h.toFixed(2);
+      let airPressure = p.toFixed(2);
+      let ifshow = "";
+      if (temp > 999 || temp <= 0) {
+        //不给予赋值
+      } else if (temp >= 18 && temp <= 26) {
+        ifshow = "true";
+      } else {
+        ifshow = "false";
+      }
+      if (humidness > 999 || humidness <= 0) {
+      } else if (humidness >= 35 && humidness <= 75) {
+        ifshow = "true";
+      } else {
+        ifshow = "false";
+      }
+      if (airPressure > 999) {
+        //不给予赋值
+      } else if (airPressure >= 5) {
+        ifshow = "true";
+      } else {
+        ifshow = "false";
+      }
+      return ifshow;
+    },
+    // 大屏数据列表赋值
+    timeData() {
+      let this_ = this;
+      let sql =
+        "select * FROM DATA WHERE deviceName = 'HAU01'  ORDER BY saveTime DESC LIMIT 1";
+      curdPost("sql", sql).then((res) => {
+        let data = res.variables.data;
+        this_.newweizhi[0].temp = data[0].t1;
+        this_.newweizhi[0].humidness = data[0].h1;
+        this_.newweizhi[0].airPressure = data[0].p1;
+        this_.newweizhi[0].run = data[0].run;
+        this_.newTiMe = this_.fmtDate(data[0].saveTime);
+        this_.newweizhi[0].ifshow = this_.returnifShow(
+          data[0].t1,
+          data[0].h1,
+          data[0].p1
+        );
+
+        this_.newweizhi[1].temp = data[0].t2;
+        this_.newweizhi[1].humidness = data[0].h2;
+        this_.newweizhi[1].airPressure = data[0].p2;
+        this_.newweizhi[1].run = data[0].run;
+        this_.newweizhi[1].ifshow = this_.returnifShow(
+          data[0].t2,
+          data[0].h2,
+          data[0].p2
+        );
+
+        this_.newweizhi[2].temp = data[0].t3;
+        this_.newweizhi[2].humidness = data[0].h3;
+        this_.newweizhi[2].airPressure = data[0].p3;
+        this_.newweizhi[2].run = data[0].run;
+        this_.newweizhi[2].ifshow = this_.returnifShow(
+          data[0].t3,
+          data[0].h3,
+          data[0].p3
+        );
+        this_.newweizhi[3].temp = data[0].t4;
+        this_.newweizhi[3].humidness = data[0].h4;
+        this_.newweizhi[3].airPressure = data[0].p4;
+        this_.newweizhi[3].run = data[0].run;
+        this_.newweizhi[3].ifshow = this_.returnifShow(
+          data[0].t4,
+          data[0].h4,
+          data[0].p4
+        );
+      });
+      let sql1 =
+        "select * FROM DATA WHERE deviceName ='HAU02'  ORDER BY saveTime ASC LIMIT 1";
+      curdPost("sql", sql1).then((res) => {
+        let data = res.variables.data;
+        this_.newweizhi[4].temp = data[0].t1;
+        this_.newweizhi[4].humidness = data[0].h1;
+        this_.newweizhi[4].airPressure = data[0].p1;
+        this_.newweizhi[4].run = data[0].run;
+        this_.newweizhi[4].ifshow = this_.returnifShow(
+          data[0].t1,
+          data[0].h1,
+          data[0].p1
+        );
+        this_.newweizhi[5].temp = data[0].t2;
+        this_.newweizhi[5].humidness = data[0].h2;
+        this_.newweizhi[5].airPressure = data[0].p2;
+        this_.newweizhi[5].run = data[0].run;
+        this_.newweizhi[5].ifshow = this_.returnifShow(
+          data[0].t2,
+          data[0].h2,
+          data[0].p2
+        );
+      });
+      let sql2 =
+        "select * FROM DATA WHERE deviceName ='HAU03' ORDER BY saveTime ASC LIMIT 1";
+      curdPost("sql", sql2).then((res) => {
+        let data = res.variables.data;
+        this_.newweizhi[6].temp = data[0].t1;
+        this_.newweizhi[6].humidness = data[0].h1;
+        this_.newweizhi[6].airPressure = data[0].p1;
+        this_.newweizhi[6].run = data[0].run;
+        this_.newweizhi[6].ifshow = this_.returnifShow(
+          data[0].t1,
+          data[0].h1,
+          data[0].p1
+        );
+      });
+      let sql3 =
+        "select * FROM DATA WHERE deviceName ='HAU04'  ORDER BY saveTime ASC LIMIT 1";
+      curdPost("sql", sql3).then((res) => {
+        let data = res.variables.data;
+        this_.newweizhi[7].temp = data[0].t1;
+        this_.newweizhi[7].humidness = data[0].h1;
+        this_.newweizhi[7].airPressure = data[0].p1;
+        this_.newweizhi[7].run = data[0].run;
+        this_.newweizhi[7].ifshow = this_.returnifShow(
+          data[0].t1,
+          data[0].h1,
+          data[0].p1
+        );
+      });
+      let sql4 =
+        "select * FROM DATA WHERE deviceName ='PAU01'  ORDER BY saveTime ASC LIMIT 1";
+      curdPost("sql", sql4).then((res) => {
+        let data = res.variables.data;
+        this_.newweizhi[8].temp = data[0].t1;
+        this_.newweizhi[8].humidness = data[0].h1;
+        this_.newweizhi[8].airPressure = data[0].p1;
+        this_.newweizhi[8].run = data[0].run;
+        this_.newweizhi[8].ifshow = this_.returnifShow(
+          data[0].t1,
+          data[0].h1,
+          data[0].p1
+        );
+        this_.newweizhi[9].temp = data[0].t2;
+        this_.newweizhi[9].humidness = data[0].h2;
+        this_.newweizhi[9].airPressure = data[0].p2;
+        this_.newweizhi[9].run = data[0].run;
+        this_.newweizhi[9].ifshow = this_.returnifShow(
+          data[0].t2,
+          data[0].h2,
+          data[0].p2
+        );
+        this_.newweizhi[10].temp = data[0].t3;
+        this_.newweizhi[10].humidness = data[0].h3;
+        this_.newweizhi[10].airPressure = data[0].p3;
+        this_.newweizhi[10].run = data[0].run;
+        this_.newweizhi[10].ifshow = this_.returnifShow(
+          data[0].t3,
+          data[0].h3,
+          data[0].p3
+        );
+        this_.newweizhi[11].temp = data[0].t4;
+        this_.newweizhi[11].humidness = data[0].h4;
+        this_.newweizhi[11].airPressure = data[0].p4;
+        this_.newweizhi[11].run = data[0].run;
+        this_.newweizhi[11].ifshow = this_.returnifShow(
+          data[0].t4,
+          data[0].h4,
+          data[0].p4
+        );
+      });
+      let sql5 =
+        "select * FROM DATA WHERE deviceName ='PAU02'  ORDER BY saveTime ASC LIMIT 1";
+      curdPost("sql", sql5).then((res) => {
+        let data = res.variables.data;
+        this_.newweizhi[12].temp = data[0].t1;
+        this_.newweizhi[12].humidness = data[0].h1;
+        this_.newweizhi[12].airPressure = data[0].p1;
+        this_.newweizhi[12].run = data[0].run;
+        this_.newweizhi[12].ifshow = this_.returnifShow(
+          data[0].t1,
+          data[0].h1,
+          data[0].p1
+        );
+        this_.newweizhi[13].temp = data[0].t2;
+        this_.newweizhi[13].humidness = data[0].h2;
+        this_.newweizhi[13].airPressure = data[0].p2;
+        this_.newweizhi[13].run = data[0].run;
+        this_.newweizhi[13].ifshow = this_.returnifShow(
+          data[0].t2,
+          data[0].h2,
+          data[0].p2
+        );
+      });
     },
   },
   mounted() {
-    var dom = document.getElementsByClassName("img");
-    this.screen = [];
-    this.screen.push(dom[0].clientWidth);
-    this.screen.push(dom[0].clientHeight);
-    this.weizhi.forEach((item, index) => {
-      this.x = parseInt((item.x * this.screen[0]) / this.domsize[index].width);
-      this.y = parseInt((item.y * this.screen[1]) / this.domsize[index].height);
-      var newobj = { x: "", y: "" };
-      newobj.x = this.x;
-      newobj.y = this.y;
-      this.newweizhi.push(newobj);
-    });
-
-    // window.onresize = () => {
-    //   console.log(122222);
-    //   var dom = document.getElementsByClassName("img");
-    //   this.screen = [];
-    //   this.screen.push(dom[0].clientWidth);
-    //   this.screen.push(dom[0].clientHeight);
-    //   //[34,237]
-    // };
+    this.envirData();
+    // this.scrollAnimate()
+    // setInterval(this.scrollAnimate, 10000);
+    this.screenChange();
+    this.mapChange();
+    this.timeData();
+    this.setIntervalData();
+  },
+  watch: {
+    // 如果 `fullHeight ` 发生改变,这个函数就会运行
+    fullHeight: function (val) {
+      this.screenChange();
+      this.mapChange();
+      this.timeData();
+    },
   },
-  // watch: {
-  //   screen: function (newdata, olddata) {
-  //     if (olddata.length == 0) {
-  //       return;
-  //     }
-  //     console.log(newdata, olddata, this.x, this.y, "2222222222222");
-  //     var newx, newy;
-  //     newx = parseInt((this.x * newdata[0]) / olddata[0]);
-  //     newy = parseInt((this.y * newdata[1]) / olddata[1]);
-  //     this.$refs.shijiku.style.left = newx + "px";
-  //     this.$refs.shijiku.style.top = newy + "px";
-  //     console.log(newx, newy, "xyssss");
-  //   },
-  // },
 };
 </script>
 
- <style lang="scss" scoped>
+ <style lang="less" scoped>
+ul,
+li {
+  margin: 0;
+  padding: 0;
+}
+
 .test-content {
+  width: 100%;
+  height: 100%;
+  color: #fff;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  overflow: hidden;
+  -webkit-transform-origin: left top;
+  transform-origin: left top;
+  z-index: 999;
+  background: #f5f5f5;
   .title {
     text-align: center;
+    margin: 0 auto;
     height: 40px;
     line-height: 40px;
     font-size: 18px;
     font-weight: bold;
+    .title-center {
+      color: #1d1f22;
+      display: inline-block;
+    }
+    .info-right {
+      position: absolute;
+      top: 0px;
+      right: 0px;
+    }
+    .black {
+      opacity: 0;
+    }
+    .black:hover {
+      opacity: 1;
+      color: black;
+    }
   }
   .body-content {
     display: flex;
-
     border: 1px solid bisque;
+    .marquee-wrap {
+      position: relative;
+      flex-grow: 0;
+      background-color: #f5f5f5;
+      overflow: hidden;
+      .button {
+        position: absolute;
+        top: 50%;
+        right: -8px;
+        color: black;
+        opacity: 0;
+        i {
+          font-size: 30px;
+          width: 30px;
+          height: 30px;
+        }
+        .button:hover {
+          opacity: 1;
+        }
+      }
+    }
+    .marquee-list li {
+      text-overflow: ellipsis;
+      width: 100%;
+      height: 100%;
+      overflow: hidden;
+      white-space: nowrap;
+      // padding: 0 20px;
+      list-style: none;
+      line-height: 40px;
+      text-align: center;
+      color: #1d1f22;
+      font-size: 18px;
+      font-weight: 400;
+      text-align: left;
+      padding-left: 10px;
+    }
+    .animate-up {
+      transition: all 0.5s ease-in-out;
+      transform: translateY(-40px);
+    }
 
     .infoShow {
       flex-grow: 0;
@@ -355,7 +662,7 @@ export default {
               height: 20px;
               line-height: 20px;
             }
-            .item_active{
+            .item_active {
               color: rgb(171, 252, 10);
             }
           }
@@ -363,19 +670,10 @@ export default {
             color: #338de6;
           }
         }
-        //   .room {
-        //     margin-right: 10px;
-        //   }
-        //   .active-icon {
-        //     text-align: center;
-        //     color: wheat;
-        //     background: #fd4343;
-        //     border-radius: 50%;
-        //     font-size: 18px;
-        //   }
       }
     }
     .mapShow {
+      margin-right: 10px;
       flex-grow: 1;
       .mapurl {
         // background-image: url("images/shiyanshijiankong/shiyanshi.png");
@@ -388,49 +686,48 @@ export default {
     .img-box {
       width: 100%;
       padding-right: 100px;
-
       position: relative;
       .img {
         background-size: contain;
-        width: 95%;
-        height: calc(100vh - 180px);
+        width: 100%;
+        height: calc(100vh - 80px);
       }
       .shiyanshi_success {
         width: 20px;
         height: 20px;
         position: absolute;
-
         border-radius: 50%;
         z-index: 99;
         animation: traffic-light 2s linear 4s infinite;
         text-align: center;
-        @keyframes traffic-light {
-          from {
-            background: transparent; /* 黄灯 */
+        background: green;
+        // @keyframes traffic-light {
+        //   from {
+        //     background: transparent; /* 黄灯 */
 
-            box-shadow: 0px 0 15px 0 transparent; /* 黄灯光影 */
-          }
-          50% {
-            background: #a7f09e; /* 黄灯 */
+        //     box-shadow: 0px 0 15px 0 transparent; /* 黄灯光影 */
+        //   }
+        //   50% {
+        //     background: #a7f09e; /* 黄灯 */
 
-            box-shadow: 0px 0 15px 0 #82d277; /* 黄灯光影 */
-          }
-          to {
-            background: transparent; /* 黄灯 */
+        //     box-shadow: 0px 0 15px 0 #82d277; /* 黄灯光影 */
+        //   }
+        //   to {
+        //     background: transparent; /* 黄灯 */
 
-            box-shadow: 0px 0 15px 0 transparent; /* 黄灯光影 */
-          }
-        }
+        //     box-shadow: 0px 0 15px 0 transparent; /* 黄灯光影 */
+        //   }
+        // }
       }
       .shiyanshi_false {
         width: 20px;
         height: 20px;
         position: absolute;
-
         border-radius: 50%;
         z-index: 99;
-        animation: waring-false 2s linear 4s infinite;
+        animation: waring-false 1s linear 0s infinite;
         text-align: center;
+        background: #fa0404;
         @keyframes waring-false {
           from {
             background: transparent; /* 黄灯 */
@@ -438,9 +735,9 @@ export default {
             box-shadow: 0px 0 15px 0 transparent; /* 黄灯光影 */
           }
           50% {
-            background: #f56c6c; /* 黄灯 */
+            background: #fa0404; /* 黄灯 */
 
-            box-shadow: 0px 0 15px 0 #f82d2d; /* 黄灯光影 */
+            box-shadow: 0px 0 15px 0 #fa0404; /* 黄灯光影 */
           }
 
           to {
@@ -450,6 +747,81 @@ export default {
           }
         }
       }
+      .bggray {
+        width: 20px;
+        height: 20px;
+        position: absolute;
+        border-radius: 50%;
+        z-index: 99;
+        animation: traffic-light 2s linear 4s infinite;
+        text-align: center;
+        background: #828282 !important;
+      }
+      .contentshow {
+        position: absolute;
+        z-index: 99;
+        width: 90px;
+        left: 30px;
+        top: 0px;
+        color: black;
+      }
+      .envir-conditoin {
+        text-align: left;
+        width: 76px;
+        white-space: nowrap;
+        height: 20px;
+        line-height: 20px;
+        overflow: hidden;
+      }
+      .content {
+        position: absolute;
+        z-index: 99;
+        width: 90px;
+        left: 30px;
+        top: 0px;
+        color: black;
+        opacity: 0;
+      }
+      .content:hover {
+        opacity: 1;
+      }
+    }
+  }
+  .controlStatus {
+    position: fixed;
+    right: 5px;
+    bottom: 10px;
+    z-index: 99;
+    color: black;
+    font-size: 18px;
+    div {
+      display: inline-block;
+      margin-right: 30px;
+    }
+    .gray,
+    .green,
+    .red {
+      width: 20px;
+      height: 20px;
+      position: absolute;
+      border-radius: 50%;
+      text-align: center;
+      padding-right: 5px;
+    }
+    .noControl {
+      .gray {
+        background: #828282;
+      }
+    }
+    .yesControl {
+      .green {
+        background: green;
+      }
+    }
+    .runWild {
+      .red {
+        background: red;
+      }
     }
   }
 }

+ 337 - 0
src/views/huanjingjiankong/shiyanshiyuanshijilu.vue

@@ -0,0 +1,337 @@
+<template>
+  <div>
+    <div class="heads">实验室温湿度压差原始记录</div>
+    <div class="top-box">
+      <span class="t-span">区域名称:</span>
+        <el-select v-model="quyu" placeholder="请选择"  clearable>
+          <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label" 
+          :value="item.value"        
+          >
+          </el-option>
+       </el-select>  
+      <span class="t-span" style="margin-left:50px;">日期:</span>
+      <el-date-picker type="date" placeholder="选择日期" v-model="riqi">
+      </el-date-picker>
+      <el-button class="btn" type="primary" @click="query">
+        <i class="ibps-icon-search"></i>查询
+      </el-button>
+    </div>
+    <el-table
+      :data="tableData"
+      :stripe="true"
+      style="width: 100%"
+      height="70vh"
+      :header-cell-style="{
+        color: '#000',
+        'font-size': '14px',
+        padding: '6px 6px',
+        background: '#a7d6f8 !important',
+      }"
+    >
+      <el-table-column
+        prop="deviceName"
+        label="区域"
+        width="80"
+      ></el-table-column>
+      <el-table-column prop="saveTime" label="日期" width="150">
+        <template slot-scope="scope">
+          {{ scope.row.saveTime | fmtDate }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="t1" label="t1" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.t1 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="t2" label="t2" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.t2 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="t3" label="t3" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.t3 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="t4" label="t4" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.t4 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="t5" label="t5" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.t5 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="h1" label="h1" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.h1 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="h2" label="h2" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.h2 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="h3" label="h3" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.h3 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="h4" label="h4" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.h4 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="h5" label="h5" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.h5 | numToFixed }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p1" label="p1" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p1 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p2" label="p2" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p2 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p3" label="p3" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p3 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p4" label="p4" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p4 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p5" label="p5" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p5 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p6" label="p6" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p6 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p7" label="p7" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p7 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p8" label="p8" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p8 | numToFixedP }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="p9" label="p9" width="65">
+        <template slot-scope="scope">
+          {{ scope.row.p9 | numToFixedP }}
+        </template>
+      </el-table-column>
+    </el-table>
+      <div class="block">
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage4"
+      :page-sizes="[10, 15, 25, 50]"
+      :page-size="20"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="numtotal">
+    </el-pagination>
+  </div>
+    <div>
+      注: 一、各点压差、温湿度合格标准及对应房间序号名称见监控面板;
+      二、温湿度:AHU01的1、2、3、4对应细胞培养室1、2、3、4;
+      AHU02的1、2对应分拣室1、2;
+      AHU03、04的1分别对应支原体、无菌检查室;PAU02的1、2对应无菌阳性、支原体阳性室
+      异常情况登记及处理:
+    </div>
+  </div>
+</template>
+
+<script>
+import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
+import data from '@/components/ibps-icon-select/data';
+export default {
+  data() {
+    return {
+      tableData: [],
+      quyu: "",
+      riqi: "",
+      currentPage4:'',
+      currentPage:'1',
+      limit:'15',
+      numtotal:'',
+      currentSql :'',
+      countSql:'',
+      options: [{
+          value: 'HAU01',
+          label: 'HAU01'
+        }, {
+          value: 'HAU02',
+          label: 'HAU02'
+        }, {
+          value: 'HAU03',
+          label: 'HAU03'
+        }, {
+          value: 'HAU04',
+          label: 'HAU04'
+        }, {
+          value: 'PAU01',
+          label: 'PAU01'
+       }, {
+          value: 'PAU02',
+          label: 'PAU02'
+       }],
+    };
+  },
+  created() {
+    let this_= this;
+    let sql =
+      "select * FROM DATA WHERE deviceName IN ('HAU01','HAU02','HAU03','HAU04','PAU01','PAU02')  ORDER BY saveTime DESC LIMIT "+this.limit;
+    this.currentSql = sql;
+    this.loadData(sql);
+    let sql1 = "select COUNT(*) as COUNT FROM DATA "
+    curdPost("sql", sql1).then((res) => {
+      let data = res.variables.data;
+      this_.numtotal= data[0].COUNT;
+    });
+  },
+  filters: {
+    numToFixed: function (value) {
+      if (value > 9999) {
+        return "??";
+      }
+      return value.toFixed(1);
+    },
+    numToFixedP: function (value) {
+      if (value > 9999) {
+        return "??";
+      }
+      return value.toFixed(2);
+    },
+    fmtDate: function (obj) {
+      var date = new Date(obj);
+      var y = 1900 + date.getYear();
+      var m = "0" + (date.getMonth() + 1);
+      var d = "0" + date.getDate();
+      var h = date.getHours();
+      var min = date.getMinutes();
+      var s = date.getMinutes();
+      return (
+        y +
+        "-" +
+        m.substring(m.length - 2, m.length) +
+        "-" +
+        d.substring(d.length - 2, d.length) +
+        "  " +
+        h +
+        ":" +
+        min +
+        ":" +
+        s
+      );
+    },
+  },
+  methods: {
+    // 请求表格数据函数
+    loadData(sql) {
+      let this_ = this;
+      this.listData = [];
+      curdPost("sql", sql).then((res) => {
+        this_.tableData = res.variables.data;
+      });
+    },
+    countLength(sql){
+      let this_=this;
+      curdPost("sql", sql).then((res) => {
+      let data = res.variables.data;
+      this_.numtotal= data[0].COUNT;
+    });
+    },
+    filter() {
+      let quyu =this.quyu;
+      if(this.riqi){
+        var riqi =  this.riqi.getFullYear() + "-" + (this.riqi.getMonth() + 1) + "-" + this.riqi.getDate();
+      }
+      let sql = "";
+      if (quyu && riqi) {
+         sql = "select * FROM DATA WHERE deviceName = '" + quyu +"' and saveTime like '%" +riqi +"%'  ORDER BY saveTime DESC LIMIT "+this.limit;
+         this.countSql ="select COUNT(*) as COUNT FROM DATA WHERE deviceName = '" + quyu +"' and saveTime like '%" +riqi +"%'  ORDER BY saveTime DESC LIMIT "+this.limit;
+         this.countLength(this.countSql);
+      } else if (quyu && !riqi) {
+        sql ="select * FROM DATA WHERE deviceName = '" +quyu +"' ORDER BY saveTime DESC LIMIT "+this.limit;
+        this.countSql ="select COUNT(*) as COUNT FROM DATA WHERE deviceName = '" + quyu +"' ORDER BY saveTime DESC LIMIT "+this.limit;
+        this.countLength(this.countSql);
+      } else if (!quyu && riqi) {
+       sql = "select * FROM DATA WHERE  saveTime like '%" +riqi +"%'  ORDER BY saveTime DESC LIMIT "+this.limit;
+       this.countSql ="select COUNT(*) as COUNT FROM DATA WHERE  saveTime like '%" +riqi +"%'  ORDER BY saveTime DESC LIMIT "+this.limit;
+       this.countLength(this.countSql);
+      }else if (!quyu && !riqi) {
+       sql =  "select * FROM DATA WHERE deviceName IN ('HAU01','HAU02','HAU03','HAU04','PAU01','PAU02')  ORDER BY saveTime DESC LIMIT "+this.limit;
+       this.countSql = "select COUNT(*) as COUNT FROM DATA ";
+       this.countLength(this.countSql);
+      }
+      return sql;
+    },
+    query() {
+     let sql =  this.filter();
+     this.currentSql = sql;
+     this.loadData(sql);
+    },
+    handleSizeChange(val){
+      this.limit = val;
+      let splitone = this.currentSql.split("LIMIT");
+      let sql = splitone[0] +"LIMIT " + this.currentPage +","+val;
+      this.currentSql = splitone[0] +"LIMIT "+val;
+      this.loadData(sql);
+    },
+    handleCurrentChange(val){
+      this.currentPage = val;
+      let splitone = this.currentSql.split("LIMIT");
+      let sql = splitone[0] +"LIMIT " + val +","+splitone[1]
+      this.loadData(sql);
+    }
+  },
+};
+</script>
+<style lang="scss">
+.tableRowClassName {
+  backface-visibility: #d9eefd;
+}
+.heads {
+  margin-top: 5px;
+  width: 100%;
+  text-align: center;
+  font-weight: 700;
+  background-color: #f9ffff;
+  width: 100%;
+  font-size: 18px;
+}
+.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
+  background: #d9eefd;
+}
+.more,
+.item {
+  cursor: pointer;
+}
+.more {
+  color: #409eff;
+}
+.el-dropdown-link {
+  cursor: pointer;
+  color: #409eff;
+}
+.el-icon-arrow-down {
+  font-size: 12px;
+}
+</style>

+ 28 - 26
src/views/platform/bpmn/bpmInstHis/listType/CMAjiancedangan.vue

@@ -49,9 +49,9 @@
       }"
     >
       <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
-      <el-table-column prop="chu_ju_bao_gao_sh" label="年份" width="80" >
+      <el-table-column prop="chu_ju_bao_gao_sh" label="年份" width="80">
         <template slot-scope="scope">
-              {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
+          {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
         </template>
       </el-table-column>
       <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="100">
@@ -85,7 +85,7 @@
         </template>
       </el-table-column> -->
       <!-- <el-table-column width="180"> </el-table-column> -->
-      <el-table-column label="操作" align="left" >
+      <el-table-column label="操作" align="left">
         <template slot-scope="scope">
           <el-popover placement="left" width="200" trigger="click">
             <div slot="reference" class="more">
@@ -153,9 +153,9 @@
                     style="color: #85ce61; cursor: pointer"
                     v-for="it in yubaogaoitem"
                     :key="it.id_"
-                    @click="yuReports(reports.yubaogao,it.id)"
+                    @click="yuReports(reports.yubaogao, it.id)"
                   >
-                  {{ it.jian_ce_xiang_mu_ }}预报告记录
+                    {{ it.jian_ce_xiang_mu_ }}预报告记录
                   </div>
                 </div>
               </el-popover>
@@ -232,14 +232,14 @@ export default {
         jiancebaogao: "42明鉴/吴/明鉴细胞专业技术检测报告.rpx",
       },
       shenqingdanid: "",
-      nianfen:'',
+      nianfen: "",
       danwei: "",
       bianhao: "",
       tableData: [],
       itemInfo: [], // 列表内容
-      yubaogaoitem:[],
+      yubaogaoitem: [],
       hetong: [],
-      triggerType:'click'
+      triggerType: "click",
     };
   },
   filters: {
@@ -250,15 +250,18 @@ export default {
         }
       }
     },
-    yeare(value,dedal){
-      if(dedal=="年"){
-        return value.split("-")[0]
-      }else if(dedal=="月"){
-        return value.split("-")[0] + value.split("-")[1]
-      }else{
-        value
+    yeare(value, dedal) {
+      if (value == undefined || value == null || value == "") {
+        return ""
       }
-    }
+      if (dedal == "年") {
+        return value.split("-")[0];
+      } else if (dedal == "月") {
+        return value.split("-")[0] + value.split("-")[1];
+      } else {
+        value;
+      }
+    },
   },
   created() {
     let sql =
@@ -337,7 +340,7 @@ export default {
         curdPost("sql", itemSql).then((res) => {
           this_.itemInfo = res.variables.data;
           for (var i = 0; i++; i < this_itemInfo) {
-            if (this_itemInfo[i].shi_fou_yu_bao_ga =="是") {
+            if (this_itemInfo[i].shi_fou_yu_bao_ga == "是") {
               this_.yubaogaoitem.push(it);
             }
           }
@@ -349,11 +352,8 @@ export default {
         });
       });
     },
-    yuReports(url,id){
-      this.alertReport(
-         url,
-         id
-    );
+    yuReports(url, id) {
+      this.alertReport(url, id);
     },
     formEvent(itemName) {
       if (itemName.includes("pH检测")) {
@@ -469,7 +469,7 @@ export default {
     selectSplit() {
       var q1, q2, q3;
       if (this.nianfen) {
-        q1 = "chu_ju_bao_gao_sh like'" +"%" + this.nianfen +"%"  + "' ";
+        q1 = "chu_ju_bao_gao_sh like'" + "%" + this.nianfen + "%" + "' ";
       }
       if (this.danwei) {
         q2 = "wei_tuo_dan_wei_  = '" + this.danwei + "' ";
@@ -501,18 +501,20 @@ export default {
         "select * from t_mjjcbg " +
         moreSql +
         " shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu = 'cnas/CMA' ORDER BY create_time_ DESC limit 0,20";
-      console.log(sql, "moresql");
       this.loadData(sql);
     },
     handleSizeChange(value) {
       this.currentPage4 = 1;
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit 0," +value;
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit 0," +
+        value;
       this.loadData(sql);
     },
     handleCurrentChange(value) {
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit " +value +", 20";
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' ORDER BY create_time_ DESC limit " +
+        value +
+        ", 20";
       this.loadData(sql);
     },
   },

+ 4 - 4
src/views/platform/bpmn/bpmInstHis/listType/CNASjiancedangan.vue

@@ -253,6 +253,9 @@ export default {
       }
     },
     yeare(value,dedal){
+      if(value ==undefined || value ==null || undefined ==""){
+        return ""
+      }
       if(dedal=="年"){
         return value.split("-")[0]
       }else if(dedal=="月"){
@@ -282,7 +285,6 @@ export default {
       this.listData = [];
       curdPost("sql", sql).then((res) => {
         this_.tableData = res.variables.data;
-        console.log(this_.tableData, "12121");
         if (this_.tableData.length > 0) {
           this.hetongidFn(this_.tableData);
         } else {
@@ -469,7 +471,7 @@ export default {
       }
     },
     isYubaogao(value, row) {
-      console.log(value, row.jian_ce_xiang_mu_, "1222222222");
+      
     },
     // pin凑sql
     selectSplit() {
@@ -507,7 +509,6 @@ export default {
         "select * from t_mjjcbg " +
         moreSql +
         " shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu = 'cnas' ORDER BY create_time_ DESC limit 0,20";
-      console.log(sql, "moresql");
       this.loadData(sql);
     },
     handleSizeChange(value) {
@@ -517,7 +518,6 @@ export default {
       this.loadData(sql);
     },
     handleCurrentChange(value) {
-      console.log(value)
       let sql =
         "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas' ORDER BY create_time_ DESC limit " +
         value +", 20";

+ 118 - 85
src/views/platform/bpmn/bpmInstHis/listType/feijiancedangan.vue

@@ -30,7 +30,8 @@
         class="inp"
         v-model="bianhao"
         placeholder="请输入内容"
-        clearable>
+        clearable
+      >
       </el-input>
       <el-button class="btn" type="primary" @click="search">
         <i class="ibps-icon-search"></i>查询
@@ -52,19 +53,23 @@
       <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
       <el-table-column prop="chu_ju_bao_gao_sh" label="年份" width="80">
         <template slot-scope="scope">
-              {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
+          {{ scope.row.chu_ju_bao_gao_sh | yeare("年") }}
         </template>
       </el-table-column>
       <el-table-column prop="he_tong_bian_hao_" label="合同编号" width="100">
         <template slot-scope="scope">
-          {{scope.row.he_tong_bian_hao_|returnHetong(hetong)}}
+          {{ scope.row.he_tong_bian_hao_ | returnHetong(hetong) }}
         </template>
       </el-table-column>
-      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150"> 
+      <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150">
       </el-table-column>
       <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="150">
       </el-table-column>
-      <el-table-column prop="jian_ce_shen_qing" label="检测委托单号" width="150">
+      <el-table-column
+        prop="jian_ce_shen_qing"
+        label="检测委托单号"
+        width="150"
+      >
       </el-table-column>
       <!-- <el-table-column prop="wei_tuo_dan_wei_" label="委托单位">
       </el-table-column> -->
@@ -78,7 +83,7 @@
       </el-table-column>
       <el-table-column prop="lian_xi_dian_hua_" label="联系电话">
       </el-table-column> -->
-       <!-- <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
+      <!-- <el-table-column prop="lei_bie_qu_fen_yu" label="类别">
          <template slot-scope="scope">
            {{scope.row.lei_bie_qu_fen_yu}}CNAS/CMA
          </template>
@@ -87,31 +92,53 @@
         <template slot-scope="scope">
           <el-popover placement="left" width="200" trigger="click">
             <div slot="reference" class="more">
-              <i class="el-icon-caret-bottom"></i>查阅          
+              <i class="el-icon-caret-bottom"></i>查阅
             </div>
             <!-- <div class="item" style="color: #85ce61">
               <i class="el-icon-s-order"></i> 合同
             </div> -->
 
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.jianceshenqingdan, scope.row.id_)">
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="alertReport(reports.jianceshenqingdan, scope.row.id_)"
+            >
               <i class="el-icon-s-order"></i> 检测委托单
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.hetongpingshen, scope.row.id_)">
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="alertReport(reports.hetongpingshen, scope.row.id_)"
+            >
               <i class="el-icon-s-order"></i> 合同评审
             </div>
             <div>
               <el-popover placement="left" width="200" trigger="click">
-                <div class="div_test item" style="color: #85ce61" slot="reference" @click="juTiItem(scope.row)">
-                  <i class="el-icon-s-order"></i> 检测记录               
+                <div
+                  class="div_test item"
+                  style="color: #85ce61"
+                  slot="reference"
+                  @click="juTiItem(scope.row)"
+                >
+                  <i class="el-icon-s-order"></i> 检测记录
                 </div>
                 <div class="three-item">
-                  <div style="color: #85ce61; cursor: pointer" v-for="it in itemInfo" :key="it.id_" @click="formEvent(it.jian_ce_xiang_mu_)">
+                  <div
+                    style="color: #85ce61; cursor: pointer"
+                    v-for="it in itemInfo"
+                    :key="it.id_"
+                    @click="formEvent(it.jian_ce_xiang_mu_)"
+                  >
                     {{ it.jian_ce_xiang_mu_ }}记录
                   </div>
                 </div>
               </el-popover>
             </div>
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.baogaoshenpibiao, scope.row.id_)">
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="alertReport(reports.baogaoshenpibiao, scope.row.id_)"
+            >
               <i class="el-icon-s-order"></i> 检测报告审批表
             </div>
             <div v-if="false">
@@ -129,9 +156,9 @@
                     style="color: #85ce61; cursor: pointer"
                     v-for="it in yubaogaoitem"
                     :key="it.id_"
-                    @click="yuReports(reports.yubaogao,it.id)"
+                    @click="yuReports(reports.yubaogao, it.id)"
                   >
-                  {{ it.jian_ce_xiang_mu_ }}预报告记录
+                    {{ it.jian_ce_xiang_mu_ }}预报告记录
                   </div>
                 </div>
               </el-popover>
@@ -139,7 +166,11 @@
             <!-- <div class="item" style="color: #85ce61" @click="alertReport(reports.yubaogao, scope.row.id_)">
               <i class="el-icon-s-order"></i> 预报告
             </div> -->
-            <div class="item" style="color: #85ce61" @click="alertReport(reports.jiancebaogao, scope.row.id_)">
+            <div
+              class="item"
+              style="color: #85ce61"
+              @click="alertReport(reports.jiancebaogao, scope.row.id_)"
+            >
               <i class="el-icon-s-order"></i>检测报告
             </div>
           </el-popover>
@@ -183,7 +214,6 @@
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
 import GetReport from "../corresponding/getReport.js";
 export default {
-
   data() {
     return {
       runqianId: "",
@@ -199,44 +229,49 @@ export default {
         yubaogao: "42明鉴/吴/明鉴细胞专业技术检测预报告.rpx",
         jiancebaogao: "42明鉴/吴/明鉴细胞专业技术检测报告.rpx",
       },
-      shenqingdanid:"",
-      nianfen:'',
-      danwei:"",
-      bianhao:"",
+      shenqingdanid: "",
+      nianfen: "",
+      danwei: "",
+      bianhao: "",
       tableData: [],
       itemInfo: [], // 列表内容
-      yubaogaoitem:[],
-      hetong:[],
-      triggerType:"click"
+      yubaogaoitem: [],
+      hetong: [],
+      triggerType: "click",
     };
   },
   mixins: [GetReport],
-  filters:{
-    returnHetong(value,arr){
-      for(var i =0;i<arr.length;i++){
-        if(arr[i].id_ == value){
+  filters: {
+    returnHetong(value, arr) {
+      for (var i = 0; i < arr.length; i++) {
+        if (arr[i].id_ == value) {
           return arr[i].he_tong_bian_hao_;
         }
       }
     },
-    yeare(value,dedal){
-      if(dedal=="年"){
-        return value.split("-")[0]
-      }else if(dedal=="月"){
-        return value.split("-")[0] + value.split("-")[1]
-      }else{
-        value
+    yeare(value, dedal) {
+      if (value == undefined || value == null || value == "") {
+        return "";
+      }
+      if (dedal == "年") {
+        return value.split("-")[0];
+      } else if (dedal == "月") {
+        return value.split("-")[0] + value.split("-")[1];
+      } else {
+        value;
       }
-    }
+    },
   },
   created() {
     let this_ = this;
-    let sql = "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit 0,20";
+    let sql =
+      "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit 0,20";
     // curdPost("sql", sql).then((response) => {
     //   this_.tableData = response.variables.data;
     // });
-    this.loadData(sql)
-    let sumsql = "select COUNT(*) AS sum  FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非'";
+    this.loadData(sql);
+    let sumsql =
+      "select COUNT(*) AS sum  FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非'";
     curdPost("sql", sumsql).then((response) => {
       this.total = response.variables.data[0].sum;
     });
@@ -248,25 +283,26 @@ export default {
       this.listData = [];
       curdPost("sql", sql).then((res) => {
         this_.tableData = res.variables.data;
-        if(this_.tableData.length >0){
+        if (this_.tableData.length > 0) {
           this.hetongidFn(this_.tableData);
-        }else{
+        } else {
           this_.tableData = [];
         }
       });
     },
-    hetongidFn(bianhaoArr){
-      var sqlStr ="";
-      var this_ =this;
-      bianhaoArr.forEach(item=> {
-        sqlStr += "'"+item.he_tong_bian_hao_ + "',"
+    hetongidFn(bianhaoArr) {
+      var sqlStr = "";
+      var this_ = this;
+      bianhaoArr.forEach((item) => {
+        sqlStr += "'" + item.he_tong_bian_hao_ + "',";
       });
-      sqlStr=sqlStr.substring(0,sqlStr.length-1);
+      sqlStr = sqlStr.substring(0, sqlStr.length - 1);
       sqlStr = "(" + sqlStr + ")";
-      let sql = "select he_tong_bian_hao_,id_ from t_bjd WHERE id_ in "+sqlStr;
-      curdPost("sql",sql).then(res=>{
+      let sql =
+        "select he_tong_bian_hao_,id_ from t_bjd WHERE id_ in " + sqlStr;
+      curdPost("sql", sql).then((res) => {
         this_.hetong = res.variables.data;
-      })
+      });
     },
     juTiItem(info) {
       let itemId;
@@ -275,7 +311,6 @@ export default {
         "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
         info.id_ +
         "'";
-        console.log(sql,"sql11111111")
       curdPost("sql", sql).then((res) => {
         itemId = res.variables.data;
         this_.runqianId = itemId[0].id_;
@@ -283,7 +318,6 @@ export default {
           "select id_,jian_ce_xiang_mu_ FROM t_mjjcnlfw WHERE id_ IN(" +
           itemId[0].jian_ce_xiang_mu2 +
           ")";
-          console.log(itemSql,"111111111111")
         curdPost("sql", itemSql).then((res) => {
           this_.itemInfo = res.variables.data;
         });
@@ -416,7 +450,7 @@ export default {
         curdPost("sql", itemSql).then((res) => {
           this_.itemInfo = res.variables.data;
           for (var i = 0; i++; i < this_itemInfo) {
-            if (this_itemInfo[i].shi_fou_yu_bao_ga =="是") {
+            if (this_itemInfo[i].shi_fou_yu_bao_ga == "是") {
               this_.yubaogaoitem.push(it);
             }
           }
@@ -428,63 +462,62 @@ export default {
         });
       });
     },
-    yuReports(url,id){
-      this.alertReport(
-         url,
-         id
-    );
+    yuReports(url, id) {
+      this.alertReport(url, id);
     },
     // pin凑sql
     selectSplit() {
-      var q1,q2,q3;
+      var q1, q2, q3;
       if (this.nianfen) {
-        q1 = "chu_ju_bao_gao_sh like'" +"%" +this.nianfen +"%"+"' ";
+        q1 = "chu_ju_bao_gao_sh like'" + "%" + this.nianfen + "%" + "' ";
       }
-      if (this.danwei){
-        q2 = "wei_tuo_dan_wei_  = '"+this.danwei+"' ";
+      if (this.danwei) {
+        q2 = "wei_tuo_dan_wei_  = '" + this.danwei + "' ";
       }
-      if(this.bianhao){
-        q3 = "bao_gao_bian_hao_ = '"+this.bianhao+"'";
+      if (this.bianhao) {
+        q3 = "bao_gao_bian_hao_ = '" + this.bianhao + "'";
       }
-      if(this.nianfen&&this.danwei&&this.bianhao){
-        return "where " + '"+q1+"' +" and " + q2 + " and " + q3 + " and ";
-      }else if(this.nianfen&&this.danwei&&!this.bianhao){
-        return "where " + q1 +" and " + q2  + " and ";
-      }else if(!this.nianfen&&this.danwei&&this.bianhao){
+      if (this.nianfen && this.danwei && this.bianhao) {
+        return "where " + '"+q1+"' + " and " + q2 + " and " + q3 + " and ";
+      } else if (this.nianfen && this.danwei && !this.bianhao) {
+        return "where " + q1 + " and " + q2 + " and ";
+      } else if (!this.nianfen && this.danwei && this.bianhao) {
         return "where " + q2 + " and " + q3 + " and ";
-      }else if(this.nianfen&&!this.danwei&&this.bianhao){
-        return "where " + q1 +" and " + q3 + " and ";
-      }else if(this.nianfen&&!this.danwei&&!this.bianhao){
+      } else if (this.nianfen && !this.danwei && this.bianhao) {
+        return "where " + q1 + " and " + q3 + " and ";
+      } else if (this.nianfen && !this.danwei && !this.bianhao) {
         return "where " + q1 + " and ";
-      }else if(!this.nianfen&&this.danwei&&!this.bianhao){
+      } else if (!this.nianfen && this.danwei && !this.bianhao) {
         return "where " + q2 + " and ";
-      }else if(!this.nianfen&&!this.danwei&&this.bianhao){
+      } else if (!this.nianfen && !this.danwei && this.bianhao) {
         return "where " + q3 + " and ";
-      }else if(!this.nianfen&&!this.danwei&&!this.bianhao){
-        return "WHERE"
+      } else if (!this.nianfen && !this.danwei && !this.bianhao) {
+        return "WHERE";
       }
     },
     search() {
-      let moreSql = this.selectSplit()
-        var sql = "select * from t_mjjcbg " + moreSql+" shi_fou_yu_bao_ga ='否' and lei_bie_qu_fen_yu = '非' ORDER BY create_time_ DESC limit 0,20"
-     console.log(sql,"gengd")
-     this.loadData(sql);
+      let moreSql = this.selectSplit();
+      var sql =
+        "select * from t_mjjcbg " +
+        moreSql +
+        " shi_fou_yu_bao_ga ='否' and lei_bie_qu_fen_yu = '非' ORDER BY create_time_ DESC limit 0,20";
+      this.loadData(sql);
     },
     handleSizeChange(value) {
       this.currentPage4 = 1;
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit 0,"+value;
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit 0," +
+        value;
       this.loadData(sql);
     },
     handleCurrentChange(value) {
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit "+value+", 20";
-
-        console.log(sql,"sql")
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' ORDER BY create_time_ DESC limit " +
+        value +
+        ", 20";
       this.loadData(sql);
     },
   },
-
 };
 </script>
 

+ 673 - 0
src/views/sample/reservedSample.vue

@@ -0,0 +1,673 @@
+<template>
+  <div class="sample-content">
+    <!-- 表格組件 -->
+    <div class="top-content">
+      <div class="top-title">样品间可视化</div>
+      <div class="query-content">
+        <el-form :inline="true" :model="formInline" class="demo-form-inline">
+          <el-form-item label="房间号:">
+            <el-select
+              v-model="formInline.fang_jian_hao_value"
+              placeholder="请选择样品"
+            >
+              <el-option
+                v-for="(item, index) in sampleOption"
+                :key="index"
+                placeholder="区域"
+                :label="item.fang_jian_lei_xin"
+                :value="item.fang_jian_lei_xin"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            v-show="leixingcare"
+            style="margin-left: 50px"
+            prop="title"
+            label="区域名称:"
+          >
+            <el-select
+              v-model="formInline.qu_yu_value"
+              placeholder="请选择区域名称"
+            >
+              <el-option
+                v-for="(item, index) in quyu_arr"
+                :key="index"
+                placeholder="区域"
+                :label="item.qu_yu_"
+                :value="item.qu_yu_"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item style="margin-left: 50px" label="货架号:">
+            <el-select
+              v-model="formInline.huo_jia_value"
+              placeholder="请选择货架号"
+            >
+              <el-option
+                v-for="(item, index) in huo_jia_arr"
+                :key="index"
+                placeholder="区域"
+                :label="item.huo_jia_hao_ + '号' + item.huo_jia_lei_xing_"
+                :value="item.huo_jia_hao_ + '号' + item.huo_jia_lei_xing_"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            v-show="!leixingcare"
+            style="margin-left: 50px"
+            label="挂件号:"
+          >
+            <el-select
+              v-model="formInline.gua_jia_value"
+              placeholder="请选择挂件号"
+            >
+              <el-option
+                v-for="(item, index) in gua_jia_arr"
+                :key="index"
+                placeholder="区域"
+                :label="item.gua_jia_hao_ + '号' + '挂件'"
+                :value="item.gua_jia_hao_ + '号' + '挂件'"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <button
+              type="button"
+              class="el-button el-button--primary el-button--mini"
+              @click="onSubmits"
+            >
+              <i class="ibps-icon-search"></i><span>查询</span>
+            </button>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <div class="select_quyu">
+      <div class="test-quyu" v-if="leixingcare">
+        <div class="test-list">
+          <ul class="list-items">
+            <li
+              class="list-item quyu-item"
+              :style="{
+                background: quyuShow == item.qu_yu_ ? '#FF9900' : '#0099CC',
+              }"
+              @click="qu_yu_Event"
+              v-for="item in quyu_arr"
+              :key="item.qu_yu_"
+            >
+              {{ item.qu_yu_ }}
+            </li>
+          </ul>
+        </div>
+      </div>
+      <div class="huojia">
+        <div class="test-list">
+          <ul class="list-items">
+            <li
+              class="list-item huojia-item"
+              :style="{
+                background:
+                  huojiashow ==
+                  item.huo_jia_hao_ + '号' + item.huo_jia_lei_xing_
+                    ? '#ff9900'
+                    : '#0099cc',
+              }"
+              @click="huo_jia_hao_Event"
+              v-for="(item, index) in huo_jia_arr"
+              :key="index"
+            >
+              {{ item.huo_jia_hao_ }}号{{ item.huo_jia_lei_xing_ }}
+            </li>
+          </ul>
+        </div>
+      </div>
+      <div class="huojia">
+        <div class="test-list" v-show="!leixingcare">
+          <ul class="list-items">
+            <li
+              class="list-item huojia-item"
+              :style="{
+                background:
+                  guajiashow == item.gua_jia_hao_ + '号挂件'
+                    ? '#FF9900'
+                    : '#e5baba',
+              }"
+              @click="gua_jia_Event"
+              v-for="(item, index) in gua_jia_arr"
+              :key="index"
+            >
+              {{ item.gua_jia_hao_ }}号挂件
+            </li>
+          </ul>
+        </div>
+      </div>
+    </div>
+    <div class="body-content">
+      <div class="left-table" v-if="false"></div>
+      <div class="right-view">
+        <div class="goods-items">
+          <div class="show-demo" v-for="(item, index) in listData" :key="index">
+            <div>
+              <div class="goods-level">
+                <div class="level-dsc">第{{ index }}层</div>
+                <div class="goods-list">
+                  <div
+                    class="goods-dsc"
+                    v-for="(it, ind) in listData[index]"
+                    :key="ind"
+                    :style="{
+                      background:
+                        it.wei_zhi_zhuang_ta == '空余' ? '#E6A23C' : '',
+                    }"
+                  >
+                    <div class="top-dsc">
+                      <div class="position">
+                        <p>位置:{{ it.wei_zhi_bian_hao_ }}</p>
+                        <p>样品编号:{{ it.yang_pin_bian_hao }}</p>
+                        <p>
+                          存储条件:{{
+                            it.cun_chu_tiao_jian || it.cun_chu_yao_qiu_
+                          }}
+                        </p>
+                        <p>留样期限:{{ it.liu_yang_qi_xian_ }}</p>
+                        <!-- <p>编号:{{it.yang_pin_bian_hao}}</p> -->
+                        <!-- <p>批次:</p>
+                        <p>有效期:</p> -->
+                      </div>
+                      <div class="right-content" v-if="false">
+                        <p v-if="false">编号:{{ it.liu_yang_qi_xian_ }}</p>
+                        <p>
+                          {{ it.wei_zhi_zhuang_ta || it.yang_pin_ming_che }}
+                        </p>
+                        <p v-if="false">
+                          存储条件:{{
+                            it.cun_chu_tiao_jian || it.cun_chu_yao_qiu_
+                          }}
+                        </p>
+                        <p v-if="false">留样期限:{{ it.liu_yang_qi_xian_ }}</p>
+                        <!-- <p>类型:{{ it.cun_fang_lei_xing }}</p> -->
+                      </div>
+                      <div class="right-content">
+                        <p>
+                          {{ it.wei_zhi_zhuang_ta || it.yang_pin_ming_che }}
+                        </p>
+                      </div>
+                      <!-- <div class="condition">{{ it.cun_chu_tiao_jian }}</div> -->
+                    </div>
+                    <div class="bottom-dsc" v-if="false">
+                      {{ it.wei_zhi_zhuang_ta || it.yang_pin_ming_che }}
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="goodshelf-name" v-if="index == 1">
+              {{ desString }}
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import FixHeight from "@/mixins/height";
+import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
+export default {
+  mixins: [FixHeight],
+  data() {
+    return {
+      sampleOption: [],
+      formInline: {
+        fang_jian_hao_value: "",
+        qu_yu_value: "",
+        huo_jia_value: "",
+        gua_jia_value: "",
+      },
+      listData: [],
+      warehouseOptions: [],
+      quyu_arr: [],
+      huo_jia_arr: [],
+      gua_jia_arr: [],
+      firstLoadActive: true,
+      qu_yu_value: "",
+      quyuShow: "",
+      huojiashow: "",
+      guajiashow: "",
+      leixingcare: true,
+      cenghao: [],
+      warehouse: [],
+      loading: false,
+      // pagination: {},
+      // secondshow: false,
+      desString: "",
+    };
+  },
+  filters: {
+    specimenFilters: function (value) {
+      if (value == "空余") {
+        return "未占用";
+      } else {
+        return value;
+      }
+    },
+  },
+  created() {
+    this.loadQueryData();
+    this.firstLoadViewData();
+  },
+  methods: {
+    firstLoadViewData() {
+      var this_ = this;
+      var sqlString = `select * from t_mjypcfwz where fang_jian_lei_xin = '样品间' and qu_yu_ ='待检区' and huo_jia_hao_ = '1' and huo_jia_lei_xing_ = '冰箱'`;
+      this.huojiashow = "1号冰箱";
+      this.quyuShow = "待检区";
+      this.desString = "样品间" + "待检区1号冰箱";
+      this.queryLoad(sqlString);
+      this.formInline.fang_jian_hao_value = "样品间";
+      this.formInline.qu_yu_value = "待检区";
+      this.formInline.huo_jia_value = "1号冰箱";
+      let sql = `select distinct huo_jia_hao_,huo_jia_lei_xing_ from t_mjypcfwz where fang_jian_lei_xin = '样品间' and qu_yu_ ='待检区'  order by huo_jia_hao_ asc `;
+      curdPost("sql", sql).then((response) => {
+        this_.huo_jia_arr = response.variables.data;
+      });
+    },
+    loadQueryData() {
+      //查询选择数据查询
+      var sqlString = "select distinct fang_jian_lei_xin from t_mjypcfwz WHERE fang_jian_lei_xin !=''";
+      // var sqlString = "select * from t_mjypcfwz";
+      var this_ = this;
+      curdPost("sql", sqlString)
+        .then((response) => {
+          this_.sampleOption = response.variables.data;
+          
+          this_.sampleOption.pop();
+          console.log(this_.sampleOption,"11111111111122")
+        })
+        .catch((err) => {
+          console.log(err, "err------>");
+        });
+    },
+    onSubmits(sql) {
+      var fang_jian_ = this.formInline.fang_jian_hao_value;
+      var qu_yu = this.formInline.qu_yu_value;
+      var huo_jia_hao_ = this.formInline.huo_jia_value.substr(0, 1);
+      let huo_jia_lei_xing_ = this.formInline.huo_jia_value.substr(
+        2,
+        this.formInline.huo_jia_value.length
+      );
+      var gua_jia_hao = this.formInline.gua_jia_value.substr(0, 1);
+      var sql;
+      if (qu_yu != "") {;
+        sql = `select * from t_mjypcfwz where fang_jian_lei_xin = '${fang_jian_}' and qu_yu_ = '${qu_yu}' and huo_jia_lei_xing_ = '${huo_jia_lei_xing_}' and huo_jia_hao_ = '${huo_jia_hao_}'`;
+      } else {
+        if (huo_jia_lei_xing_.includes("冰箱")) {
+          sql = `select * from t_mjypcfwz where fang_jian_lei_xin = '${fang_jian_}' and huo_jia_lei_xing_ = '${huo_jia_lei_xing_}' and huo_jia_hao_ = '${huo_jia_hao_}'`;
+        } else if (huo_jia_lei_xing_.includes("液氮罐")) {
+          sql = `select * from t_mjypcfwz where fang_jian_lei_xin = '${fang_jian_}' and huo_jia_lei_xing_ = '${huo_jia_lei_xing_}'  and huo_jia_hao_ = '${huo_jia_hao_}' and gua_jia_hao_= '${gua_jia_hao}'`;
+        }
+      }
+      // this.desString = fang_jian_ + qu_yu + huo_jia_hao_;
+      this.queryLoad(sql);
+    },
+    queryLoad(sql) {
+      //根据样品信息货位查询相对应的样品登记表
+      var datas = [];
+      var labelsMap = {}; // map存储
+      var this_ = this;
+      this_.listData = [];
+      curdPost("sql", sql).then((res) => {
+        datas = res.variables.data;
+        console.log(datas,"2222222222 ")
+        datas.forEach((item) => {
+          if (!labelsMap[item.ceng_hao_]) {
+            //没有就创建
+            labelsMap[item.ceng_hao_] = [];
+          }
+          // 通过样品货位配置的id外键 查询样品登记表
+          let yangpingSql =
+            "select * from t_mjypdjb WHERE shou_yang_wei_zhi = '" +
+            item.id_ +
+            "'";
+          curdPost("sql", yangpingSql).then((res) => {
+            var resData = res.variables.data;
+            if (resData.length > 0) {
+              resData.forEach((it) => {
+                it.wei_zhi_bian_hao_ = item.wei_zhi_bian_hao_;
+                labelsMap[item.ceng_hao_].push(it);
+              });
+            } else {
+              labelsMap[item.ceng_hao_].push(item);
+            }
+          });
+            console.log(labelsMap,"3333333333")
+        });
+        // this.loading = true;
+        
+        this_.listData = labelsMap;
+      });
+    },
+    qu_yu_Event(e) {
+      //区间 留样 样品间 点击事件 查询相应的货架号->冰箱 赋值 huo_jia_hao_
+      this.huo_jia_arrEvent(e.target.innerText);
+      this.huojiashow = "";
+      this.guajiashow = "";
+      let sqlString = `select distinct huo_jia_hao_,huo_jia_lei_xing_ from t_mjypcfwz where fang_jian_lei_xin = '${this.formInline.fang_jian_hao_value}' and qu_yu_ = '${e.target.innerText}' order by huo_jia_hao_ asc`;
+      var this_ = this;
+      this.qu_yu_value = e.target.innerText;
+      this.quyuShow = e.target.innerText;
+      this.formInline.qu_yu_value = e.target.innerText;
+      curdPost("sql", sqlString).then((response) => {
+        this_.huo_jia_arr = response.variables.data;
+      });
+    },
+    huo_jia_hao_Event(e) {
+      //货架 冰箱 液氮罐点击事件
+      this.guajiashow = "";
+      let selectText = e.target.innerText;
+      this.guajiaarrEvent(selectText);
+      this.huojiashow = selectText;
+      let huojiaNum = selectText.substr(0, 1);
+      this.formInline.huo_jia_value = selectText;
+      let huojialeixing = this.formInline.huo_jia_value.substr(
+        2,
+        this.formInline.huo_jia_value.length
+      );
+      //区分是冰箱和液氮罐的点击事件
+      if (selectText.includes("冰箱")) {
+        //如果是冰箱 请求样品货位配置信息 ->查询登记表
+        var sql = `select * from t_mjypcfwz where fang_jian_lei_xin = '${this.formInline.fang_jian_hao_value}' and qu_yu_ = '${this.formInline.qu_yu_value}' and  huo_jia_lei_xing_ = '${huojialeixing}' and huo_jia_hao_ = '${huojiaNum}'`;
+        this.queryLoad(sql);
+        //  alert("冰箱");
+      } else if (selectText.includes("液氮罐")) {
+        //液氮罐 查询该液氮罐下所有的挂件
+        console.log(huojiaNum);
+        let sqlString = `select distinct gua_jia_hao_ from t_mjypcfwz where huo_jia_lei_xing_ = '液氮罐' and huo_jia_hao_ = '${huojiaNum}'  order by gua_jia_hao_ asc`;
+        var this_ = this;
+        curdPost("sql", sqlString).then((response) => {
+          this_.gua_jia_arr = response.variables.data;
+        });
+      }
+      this.formInline.huo_jia_value = selectText;
+    },
+    gua_jia_Event(e) {
+      //液氮罐挂件号点击事件 查询该液氮罐下该挂件的货位位置信息;
+      let selectText = e.target.innerText;
+      this.guajiashow = selectText;
+      let hguajiaNum = selectText.substr(0, 1);
+      var fang_jian_hao_value = this.formInline.fang_jian_hao_value;
+      var huo_jia_value = this.formInline.huo_jia_value;
+      var sql = `select * from t_mjypcfwz where fang_jian_lei_xin = '${fang_jian_hao_value}' and huo_jia_lei_xing_ = '液氮罐' and huo_jia_hao_ = '${huo_jia_value.substring(
+        0,
+        1
+      )}' and gua_jia_hao_= '${hguajiaNum}'`;
+      this.desString = fang_jian_hao_value + huo_jia_value + selectText;
+      this.queryLoad(sql);
+    },
+    huo_jia_arrEvent(quyu){
+      let sqlString = `select distinct huo_jia_hao_,huo_jia_lei_xing_ from t_mjypcfwz where fang_jian_lei_xin = '${this.formInline.fang_jian_hao_value}' and qu_yu_ = '${quyu}'   order by huo_jia_hao_ asc`;
+      var this_ = this;
+      curdPost("sql", sqlString).then((response) => {
+        this_.huo_jia_arr = response.variables.data;
+        if (!this_.firstLoadActive) {
+          this_.formInline.huo_jia_value = "";
+        }
+        this_.firstLoadActive = false;
+      });
+    },
+    guajiaarrEvent(huojiaweizhi) {
+      let huojiaNum = huojiaweizhi.substr(0, 1);
+      let huojialeixing = huojiaweizhi.substr(2, huojiaweizhi.length);
+      if(huojiaweizhi.includes("冰箱")){
+        this.gua_jia_arr =[];
+        return
+      }
+      let sqlString = `select distinct gua_jia_hao_ from t_mjypcfwz where fang_jian_lei_xin = '留样间' and huo_jia_lei_xing_ = '${huojialeixing}' and huo_jia_hao_ = '${huojiaNum}'   order by gua_jia_hao_`;
+      var this_ = this;
+      curdPost("sql", sqlString).then((response) => {
+        this_.gua_jia_arr = response.variables.data;
+      });
+    },
+  },
+  watch: {
+    "formInline.fang_jian_hao_value": function (newdata, olddata) {
+      //监控房间号 input 输入框数据变化 来改变区域和货架信息(input)
+      this.huo_jia_arr = [];
+      let sqlString = `select distinct qu_yu_ ,huo_jia_hao_ from t_mjypcfwz where fang_jian_lei_xin = '${newdata}' `;
+      var this_ = this;
+      curdPost("sql", sqlString).then((response) => {
+        this_.quyu_arr = response.variables.data;
+        this_.quyu_arr.forEach((item) => {
+          //待优化 事实上是一个用来判断
+          if (item.qu_yu_ == "") {
+            this_.leixingcare = false;
+            this_.formInline.qu_yu_value = "";
+            let sql = `select distinct huo_jia_hao_,huo_jia_lei_xing_ from t_mjypcfwz where fang_jian_lei_xin = '${newdata}'  order by huo_jia_hao_ asc`;
+            curdPost("sql", sql).then((res) => {
+              this_.huo_jia_arr = res.variables.data;
+            });
+            return;
+          } else {
+            this_.leixingcare = true;
+          }
+        });
+        if (!this.firstLoadActive) {
+          this_.formInline.qu_yu_value = "";
+        }
+      });
+    },
+    // "formInline.qu_yu_value": function (newdata, olddata) {
+    //   let sqlString = `select distinct huo_jia_hao_,huo_jia_lei_xing_ from t_mjypcfwz where fang_jian_lei_xin = '${this.formInline.fang_jian_hao_value}' and qu_yu_ = '${newdata}'   order by huo_jia_hao_ asc`;
+    //   var this_ = this;
+    //   curdPost("sql", sqlString).then((response) => {
+    //     this_.huo_jia_arr = response.variables.data;
+    //     if (!this_.firstLoadActive) {
+    //       this_.formInline.huo_jia_value = "";
+    //     }
+    //     this_.firstLoadActive = false;
+    //   });
+    // },
+    // "formInline.huo_jia_value": function (newdata, olddata) {
+    //   console.log(newdata.substr(0, 1), "货架监听");
+    //   let sqlString = `select distinct gua_jia_hao_ from t_mjypcfwz where fang_jian_lei_xin = '留样间' and huo_jia_lei_xing_ = '液氮罐' and huo_jia_hao_ = '${newdata.substr(
+    //     0,
+    //     1
+    //   )}'   order by gua_jia_hao_`;
+    //   var this_ = this;
+    //   console.log(sqlString, "件数");
+    //   curdPost("sql", sqlString).then((response) => {
+    //     this_.gua_jia_arr = response.variables.data;
+    //     console.log(this_.gua_jia_arr, "挂件数");
+    //   });
+    // },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.sample-content {
+  width: 100%;
+  .top-content {
+    width: 100%;
+    .top-title {
+      text-align: center;
+      font-weight: bold;
+      width: 100%;
+      font-size: 18px;
+      line-height: 40px;
+    }
+    .query-content {
+      display: flex;
+      margin-left: 25px;
+    }
+  }
+  .select_quyu {
+    .test-quyu,
+    .huojia {
+      width: 100%;
+      .list-items {
+        display: flex;
+        cursor: pointer;
+        .quyu-item {
+          background: #0099cc;
+        }
+        .huojia-item {
+          background: #99ccff;
+        }
+        .list-item {
+          padding: 0px 10px;
+          background-color: rgb(206, 198, 164);
+          text-align: center;
+          line-height: 35px;
+          margin-left: 20px;
+          border-radius: 10px;
+        }
+      }
+      .cangku-mingchen {
+        width: 100%;
+        text-align: left;
+        margin-left: 50px;
+      }
+    }
+  }
+  .body-content {
+    // margin-top: 70px;
+    display: flex;
+    box-sizing: border-box;
+    height: calc(100vh - 340px);
+    overflow-x: hidden;
+    overflow-y: scroll;
+    // .left-table {
+    //   // width: 40%;
+    //   ::v-deep .el-table {
+    //     width: 40%;
+    //   }
+    // }
+    .right-view {
+      z-index: 99;
+      width: 100%;
+      .goods-items {
+        width: 100%;
+        border: solid 2px rgb(202, 236, 247);
+        display: flex;
+        flex-direction: column-reverse;
+        .show-demo {
+          width: 100%;
+          border-bottom: 1px solid bisque;
+          //   margin: 0 auto;
+          text-align: center;
+
+          .goods-level {
+            display: flex;
+            position: relative;
+            margin-bottom: 6px;
+          }
+          .level-dsc {
+            margin-top: 12px;
+            position: absolute;
+            bottom: 0;
+            left: 10px;
+          }
+          .goods-list {
+            display: flex;
+            // justify-content: flex-start;
+            flex-wrap: wrap-reverse;
+            align-content: flex-start;
+            margin-left: 50px;
+            .goods-dsc {
+              cursor: pointer;
+              padding: 2px 6px;
+              border-radius: 5px;
+              background: #67c23a;
+              margin-left: 12px;
+              margin-top: 6px;
+              box-sizing: border-box;
+              .top-dsc {
+                display: flex;
+                justify-content: space-between;
+                font-size: 12px;
+                // height: 18px;
+                line-height: 18px;
+                .position > p {
+                  text-align: left;
+                  color: #fbe8ff;
+                }
+                .right-content {
+                  display: flex;
+                  align-items: center;
+                  p {
+                    height: 18px;
+                    line-height: 18px;
+                    margin-left: 5px;
+                    color: #fbe8ff;
+                    text-align: left;
+                  }
+                }
+              }
+              .bottom-dsc {
+                width: 100%;
+                text-align: center;
+                font-size: 18px;
+                height: 45px;
+                line-height: 45px;
+                margin-top: 9px;
+                color: #fbe8ff;
+              }
+              .goods-demo {
+                display: block;
+                width: 70px;
+                height: 90px;
+                border: 1px solid rgb(10, 9, 8);
+                text-align: center;
+                margin: 0;
+              }
+              .goods-code {
+                text-align: center;
+                width: 100%;
+                height: 20px;
+                line-height: 20px;
+              }
+            }
+          }
+          .goodshelf-name {
+            margin: 15px 0px;
+          }
+          .shelf {
+            width: 100%;
+            height: 40px;
+            line-height: 40px;
+            text-align: center;
+          }
+        }
+        // .shelf-pointer {
+        //   position: fixed;
+        //   right: 75px;
+        //   bottom: 35%;
+        //   cursor: pointer;
+        //   .pointer {
+        //     .pointer-item {
+        //       width: 45px;
+        //       height: 45px;
+        //       line-height: 45px;
+        //       border: 1px solid #fcfefd;
+        //       background-color: #fcb400;
+        //       border-radius: 50%;
+        //       text-align: center;
+        //       color: #fff0f3;
+        //       font-size: 18px;
+        //       margin-top: 10px;
+        //     }
+        //   }
+        // }
+      }
+    }
+  }
+}
+</style>
+
+

+ 6 - 6
src/views/sample/sampleView.vue

@@ -162,14 +162,16 @@
                   >
                     <div class="top-dsc">
                       <div class="position">
-                        <p>位置:{{ it.wei_zhi_bian_hao_ }}</p>
+                        <p>位置:{{ it.shi_fou_liu_yang_?	liu_yang_wei_zhi_:it.wei_zhi_bian_hao_}}</p>
                         <p>样品编号:{{ it.yang_pin_bian_hao }}</p>
                         <p>
                           存储条件:{{
                             it.cun_chu_tiao_jian || it.cun_chu_yao_qiu_
                           }}
                         </p>
-                        <p>留样期限:{{ it.liu_yang_qi_xian_ }}</p>
+                        <p >收样日期:{{ it.shou_yang_ri_qi_}}</p>
+                        <p v-if="it.shi_fou_liu_yang_ =='是'">留样期限:{{ it.liu_yang_qi_xian_}}</p>
+                        
                         <!-- <p>编号:{{it.yang_pin_bian_hao}}</p> -->
                         <!-- <p>批次:</p>
                         <p>有效期:</p> -->
@@ -184,8 +186,6 @@
                             it.cun_chu_tiao_jian || it.cun_chu_yao_qiu_
                           }}
                         </p>
-                        <p v-if="false">留样期限:{{ it.liu_yang_qi_xian_ }}</p>
-                        <!-- <p>类型:{{ it.cun_fang_lei_xing }}</p> -->
                       </div>
                       <div class="right-content">
                         <p>
@@ -205,9 +205,9 @@
         </div>
       </div>
     </div>
-    <div class="goodshelf-name">
+    <!-- <div class="goodshelf-name">
       {{ desString }}
-    </div>
+    </div> -->
   </div>
 </template>
 

+ 144 - 33
src/views/warehouse/cangku.vue

@@ -2,7 +2,7 @@
   <div class="sample-content">
     <!-- 表格組件 -->
     <div class="top-content">
-      <div class="top-title">库可视化</div>
+      <div class="top-title">库可视化</div>
       <div class="query-content">
         <el-form :inline="true" :model="formInline" class="demo-form-inline">
           <el-form-item label="仓库名称:">
@@ -74,31 +74,33 @@
           <div class="show-demo" v-for="(item, index) in listData" :key="index">
             <div>
               <div class="goods-level">
-                <div class="level-dsc">第{{ index }}层</div>
+                <div class="level-dsc">第{{ index | indexfilter(listData) }}层</div>
                 <div class="goods-list">
                   <div
                     v-for="(it, index) in listData[index]"
                     :key="index"
                     class="goods-dsc"
                     :style="{
-                      background: it.zhuang_tai_ == '空余' ? '' : '#67c23a',
+                      background: it.cun_fang_wei_zhi_ == '空' ? '' : '#67c23a',
                     }"
                   >
                     <div class="top-dsc">
                       <div class="position">
-                        <p>位置:{{ it.wei_zhi_ }}</p>
-                        <p>类型:{{ it.lei_xing_ }}</p>
-                        <p>编号:{{ it.wu_pin_bian_hao | bian_hao_Filters }}</p>
+                        <p>名称:{{ it.wu_liao_ming_chen }}</p>
+                        <p>编码:{{ it.wu_liao_bian_ma_ || "空" }}</p>
+                        <p>位置:{{ it.cun_fang_wei_zhi_ || "空" }}</p>
+                        <p>货号:{{ it.huo_hao_ || "空" }}</p>
                       </div>
                       <div class="right-content">
-                        <p>存储条件:{{ it.cun_chu_tiao_jian }}</p>
-                        <p>有效期:{{ it.you_xiao_qi_ }}</p>
-                        <p>批号:{{ it.pi_hao_ }}</p>
+                        <p>入库批号:{{ it.ru_ku_pi_hao_ || "空" }}</p>
+                        <p>存储条件:{{ it.cun_chu_yao_qiu_ || "空" }}</p>
+                        <p>有效期:{{ it.you_xiao_qi_ || "空" }}</p>
+                        <p>库存量:{{ it.ku_cun_liang_ || "空" }}</p>
                       </div>
                       <!-- <div class="condition">{{ it.cun_chu_tiao_jian }}</div> -->
                     </div>
                     <div class="bottom-dsc">
-                      {{ it.wu_pin_ming_cheng | specimenFilters }}
+                      <!-- {{ it.wu_pin_ming_cheng | specimenFilters }} -->
                     </div>
                   </div>
                 </div>
@@ -116,6 +118,19 @@
 
 <script>
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
+// import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
+/*
+[
+  1:{  //第一层
+  1: {[{item:1},{item2:2}]} //第一个区域
+  2:{[{item:1},{item2:2}]} //第二个区域
+  },
+  2:{  //第二层
+   1:{[{item:1},{item2:2}]} //第一个区域
+   2:{[{item:1},{item2:2}]} //第二个区域
+  }
+]
+*/
 export default {
   data() {
     return {
@@ -148,6 +163,17 @@ export default {
     };
   },
   filters: {
+    indexfilter: function (value,data) {
+      console.log(value,data)
+      if (data[0]) {
+        return value + 1;
+      } else {
+        return value;
+      }
+    },
+    laySlice: function (value) {
+      return value.split("-")[2];
+    },
     freezerFilters: function (value) {
       if (value.includes("冷藏柜")) {
         return value.replace("冷藏柜", "冰箱");
@@ -175,7 +201,7 @@ export default {
   mounted() {
     this.loadQueryData();
     this.firstLoadViewData();
-    this.firstLoadQuyu("耗材库");
+    this.firstLoadQuyu("试剂库1");
   },
   methods: {
     firstLoadQuyu(cang_ku) {
@@ -189,14 +215,32 @@ export default {
       });
     },
     firstLoadViewData() {
-      //首次加载视图数据 默认中心仓库 耗材区
-      this.formInline.cang_ku_ming_chen_value = "耗材库";
-      this.formInline.qu_yu_value = "1号 货架";
+      //首次加载视图数据 默认中心仓库 耗材区   
+      this.formInline.cang_ku_ming_chen_value = "试剂库1";
+      this.formInline.qu_yu_value = "1号试剂柜";
       this.selectActive = 1;
       this.firstLoadActive = true;
-      this.quyuShow = "1号 货架";
-      var sqlString = `select * from t_ck where cang_ku_ming_chen = '${this.formInline.cang_ku_ming_chen_value}' and qu_yu_ = '${this.formInline.qu_yu_value}'`;
-      this.queryLoad(sqlString);
+      this.quyuShow = "1号试剂柜";
+      var sqlString =
+        "select * from t_mjwlgl where cun_fang_wei_zhi_ like" +
+        "'%" +
+        "SJG1" +
+        "%'";
+      this.queryLoad(sqlString, "SJG1");
+    },
+    sqlSlice(value) {
+      // let py = value.split("号")[1];
+
+      switch (value) {
+        case "货架":
+          return "HJ";
+        case "试剂柜":
+          return "SJG";
+        case "冰箱":
+          return "BX";
+        default:
+          "";
+      }
     },
     loadQueryData() {
       //查询选择仓库数据查询
@@ -214,35 +258,101 @@ export default {
     onSubmits() {
       this.desShow = false;
       //头部按钮查询事
-      var sqlString = `select * from t_ck where cang_ku_ming_chen = '${this.formInline.cang_ku_ming_chen_value}' and qu_yu_ = '${this.formInline.qu_yu_value}'`;
-      this.queryLoad(sqlString);
+      // var sqlString = `select * from t_mjwlgl where cang_ku_ming_chen = '${this.formInline.cang_ku_ming_chen_value}' and qu_yu_ = '${this.formInline.qu_yu_value}'`;
+      let py = this.formInline.qu_yu_value.split("号")[1].replace(/^\s*/g, "");
+      let num = this.formInline.qu_yu_value.split("号")[0];
+      let quyu = this.sqlSlice(py);
+      let type = (quyu + num).replace(/^\s*/g, "");
+      var sqlString =
+        `select * from t_mjwlgl where cun_fang_wei_zhi_ like ` +
+        "'%" +
+        type +
+        "%'";
+      console.log(sqlString);
+      this.queryLoad(sqlString, type);
     },
-    queryLoad(sql) {
+    queryLoad(sql, py) {
       var datas = [];
       this.cenghao = [];
       const labelsMap = {}; // map存储
-      curdPost("sql", sql).then((res) => {
-        datas = res.variables.data;
-        datas.forEach((item) => { 
-          if (!labelsMap[item.ceng_hao_]) {
-            labelsMap[item.ceng_hao_] = [];
+      let typeData = [];
+      var sqltype =
+        `select DISTINCT SUBSTR(wei_zhi_,1,6) as wei_zhi_ from t_ck where wei_zhi_ like ` +
+        "'%" +
+        py +
+        "%'" +
+        "ORDER BY wei_zhi_ ASC ";
+      console.log(sqltype, sql);
+      curdPost("sql", sqltype).then((res) => {
+        typeData = res.variables.data;
+        console.log(sqltype, sql);
+        curdPost("sql", sql).then((res) => {
+          datas = res.variables.data;
+          typeData.forEach((item) => {
+            let num = item.wei_zhi_.split("-")[1];
+            labelsMap[num] = [];
+          });
+          if (datas.length == 0) {
+            for (var prop in labelsMap) {
+              labelsMap[prop].push({ cun_fang_wei_zhi_: "空" });
+            }
+
+            this.listData = labelsMap;
+            return;
+          }
+          datas.forEach((item) => {
+            let props1 = item.cun_fang_wei_zhi_.split("-")[1];
+            for (var prop in labelsMap) {
+              if (labelsMap.hasOwnProperty(prop)) {
+                if (prop == props1) {
+                  labelsMap[prop].push(item);
+                }
+                if (prop != props1 && labelsMap[prop].length == 0) {
+                  labelsMap[prop].push({ cun_fang_wei_zhi_: "空" });
+                }
+              }
+            }
+          });
+
+          let newarr = [];
+          for (var prop in labelsMap) {
+            if (labelsMap.hasOwnProperty(prop)) {
+              if (labelsMap[prop].length > 1) {
+                var item = labelsMap[prop].slice(1);
+                // delete labelsMap[0]
+                console.log(item);
+                newarr.push(item);
+              } else {
+                console.log(labelsMap[prop]);
+                newarr.push(labelsMap[prop]);
+              }
+            }
           }
-          this.desString = `${item.cang_ku_ming_chen} ${item.qu_yu_}`;
-          labelsMap[item.ceng_hao_].push(item);
+          this.listData = newarr;
+          console.log(this.listData, "listData");
         });
-        this.listData = labelsMap;
-        console.log(this.listData,"listData")
       });
     },
     qu_yu_Event(e) {
+      //点击区域事件,加载可视化视图
       let value = e.target.innerText;
       if (value.includes("(")) {
         let index = value.indexOf("(");
         value = value.slice(0, index);
       }
-      let sqlString = `select * from t_ck where cang_ku_ming_chen = '${this.formInline.cang_ku_ming_chen_value}' and qu_yu_ = '${value}' `;
-      this.queryLoad(sqlString);
-      // var this_ = this;
+      let num = value.slice(0, 1);
+      console.log(value, "类型");
+      let py = value.split("号")[1].replace(/^\s*/g, "");
+      // let num = this.formInline.qu_yu_value.split("号")[0];
+      let quyu = this.sqlSlice(py);
+      let type = (quyu + num).replace(/^\s*/g, "");
+      var sqlString =
+        `select * from t_mjwlgl where cun_fang_wei_zhi_ like ` +
+        "'%" +
+        type +
+        "%'";
+      console.log(sqlString);
+      this.queryLoad(sqlString, type);
       this.formInline.qu_yu_value = value;
       this.quyuShow = value;
     },
@@ -251,8 +361,9 @@ export default {
     },
   },
   watch: {
-    //监控仓库名称变化
+    //监控仓库名称变化 触发第一次加载数据
     "formInline.cang_ku_ming_chen_value": async function (newdata) {
+      console.log(newdata);
       this.firstLoadQuyu(newdata);
     },
     "formInline.qu_yu_value": function (newdata) {