Преглед на файлове

文件中心 预警分析页面开发

bobo04052021@163.com преди 6 месеца
родител
ревизия
975d6b62e6

+ 4 - 0
.hbuilderx/launch.json

@@ -10,6 +10,10 @@
                 "launchtype" : "local"
             },
             "type" : "uniCloud"
+        },
+        {
+            "openVueDevtools" : false,
+            "type" : "uni-app:h5"
         }
     ]
 }

+ 14 - 0
api/api.js

@@ -83,6 +83,20 @@ const apiService = {
 	const url = buildURL("/ventanaly-device/safety/ventanalyDevicesetLog/list", params)
     return http.get(url);
   },
+  //获取文件数据  
+  getFileInfo(params){
+	  return http.post(
+	    "/ventanaly-sharefile/fileServer/list",
+	    params
+	  );
+  },
+  //获取预警信息
+  getWarnInfo(params){
+	  return http.get(
+	    "/safety/ventanalyAlarmLog/total",
+	    params
+	  );
+  },
   /**
    * 获取文件访问路径
    * @param avatar

+ 2 - 0
main.js

@@ -34,6 +34,8 @@ import history from "./pages/history/history.vue";
 Vue.component("history", history);
 import warndata from "./pages/warndata/warndata.vue";
 Vue.component("warndata", warndata);
+import filecenter from "./pages/filecenter/filecenter.vue";
+Vue.component("filecenter", filecenter);
 // 自定义组件
 import mySelect from "./components/my-componets/my-select.vue";
 Vue.component("mySelect", mySelect);

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "智能通风",
-    "appid" : "__UNI__2000523",
+    "appid" : "__UNI__8193760",
     "description" : "",
     "versionName" : "2.2.22",
     "versionCode" : 1,

+ 20 - 17
pages.json

@@ -162,6 +162,10 @@
       "style": {}
     },
     {
+      "path": "pages/filecenter/filecenter",
+      "style": {}
+    },
+    {
       "path": "pages/operation/operation",
       "style": {}
     },
@@ -179,23 +183,22 @@
     {
       "path": "pages/home/detail/autodoor/autodoor"
     },
-      {
-      	"path" : "pages/home/detail/doorAnimate/doorAnimate"
-      },
-	  {
-	  	"path" : "pages/home/detail/windowAnimate/windowAnimate"
-	  },
-	  {
-	  	"path" : "pages/home/detail/windrectAnimate/windrectAnimate"
-	  },
-	  {
-	  	"path" : "pages/home/detail/fanlocalAnimate/fanlocalAnimate"
-	  },
-	  {
-	  	"path" : "pages/home/detail/fanlocalAnimate/fanlocalAnimate2"
-	  }
-	    
-    ],
+    {
+      "path": "pages/home/detail/doorAnimate/doorAnimate"
+    },
+    {
+      "path": "pages/home/detail/windowAnimate/windowAnimate"
+    },
+    {
+      "path": "pages/home/detail/windrectAnimate/windrectAnimate"
+    },
+    {
+      "path": "pages/home/detail/fanlocalAnimate/fanlocalAnimate"
+    },
+    {
+      "path": "pages/home/detail/fanlocalAnimate/fanlocalAnimate2"
+    }
+  ],
   "globalStyle": {
     "mp-alipay": {
       /* 支付宝小程序特有相关 */

+ 218 - 0
pages/filecenter/filecenter.vue

@@ -0,0 +1,218 @@
+<template name="filecenter">
+  <view class="container">
+    <u-navbar
+      title="文件中心"
+      style="margin-top: 30px"
+      :safeAreaInsetTop="true"
+      leftIcon=""
+    >
+    </u-navbar>
+    <view class="main">
+      <u-subsection
+        :list="list"
+        mode="subsection"
+        :current="curNow"
+        @change="sectionChange"
+      ></u-subsection>
+      <u-list>
+        <u-list-item
+          class="itemback"
+          v-for="(item, index) in fileData"
+          :key="index"
+        >
+          <view class="">
+            <view class="content flcard">
+              <view
+                class="demo-layout bg-purple-light"
+                style="margin-bottom: 20rpx"
+              >
+                <view style="margin-top: 10rpx">
+                  <text class="text-style1">{{ item.fileName }}</text>
+                </view>
+              </view>
+              <view class="datacard laiyuan">
+                <view style="margin: 20rpx 20rpx">
+                  <text class="text-style">{{ item.fileSource }}</text>
+                </view>
+                <view style="margin: 20rpx 20rpx; font-size: small"
+                  >文件来源</view
+                >
+              </view>
+              <view class="datacard zhuangtai">
+                <view style="margin: 20rpx 20rpx">
+                  <text class="text-style">{{ item.bpmStatus_dictText }}</text>
+                </view>
+                <view style="margin: 20rpx 20rpx; font-size: small"
+                  >审批状态</view
+                >
+              </view>
+              <view class="datacard user">
+                <view style="margin: 20rpx 20rpx">
+                  <text class="text-style">{{ item.createBy }}</text>
+                </view>
+                <view style="margin: 20rpx 20rpx; font-size: small"
+                  >创建人</view
+                >
+              </view>
+              <view class="datacard time">
+                <view style="margin: 20rpx 20rpx">
+                  <text class="text-style">{{ item.createTime }}</text>
+                </view>
+                <view style="margin: 20rpx 20rpx; font-size: small"
+                  >上传时间</view
+                >
+              </view>
+            </view>
+          </view>
+        </u-list-item>
+      </u-list>
+    </view>
+  </view>
+</template>
+
+<script>
+import api from "@/api/api";
+export default {
+  components: {},
+  name: "filecenter",
+  watch: {},
+  data() {
+    return {
+      list: [{ name: "全部" }, { name: "待审批" }, { name: "已审批" }],
+      curNow: 0,
+      fileData: [],
+    };
+  },
+  mounted() {
+    this.getFileInfo();
+  },
+  methods: {
+    sectionChange(index) {
+      this.curNow = index;
+    },
+    getFileInfo() {
+      var params = {
+        bpmStatus: "",
+        column: "createTime",
+        fileSuffix: "",
+        likeFileName: "",
+        pageNo: 1,
+        pageSize: 10000,
+        parentId: "",
+        selectFlag: true,
+        sysOrgCode: "",
+      };
+      new Promise((resolve, reject) => {
+        api
+          .getFileInfo(params)
+          .then((response) => {
+            if (response.data.code == 200) {
+              this.fileData = response.data.result.records;
+            } else {
+              reject(response);
+            }
+          })
+          .catch((error) => {
+            console.log("catch===>response", response);
+            reject(error);
+          });
+      });
+    },
+  },
+};
+</script>
+
+<style scoped>
+>>> .u-navbar--fixed {
+  margin-top: 20px;
+}
+.main {
+  margin-top: 100rpx;
+  display: flex;
+  flex-direction: column;
+}
+
+.itemback {
+  padding: 20rpx;
+  background-color: #ffffff;
+  margin-bottom: 5rpx;
+}
+.text-style {
+  color: #3787fe;
+  font-weight: bold;
+}
+.text-style1 {
+  color: #000000;
+  font-size: large;
+  font-weight: bold;
+}
+.datacard {
+  width: 48%;
+  margin: 1%;
+  float: left;
+  height: 120rpx;
+  border-radius: 10px;
+}
+.time {
+  background: url(/static/filecenter/time.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
+.laiyuan {
+  background: url(/static/filecenter/laiyuan.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
+.user {
+  background: url(/static/filecenter/user.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
+.zhuangtai {
+  background: url(/static/filecenter/zhuangtai.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
+.datacard1 {
+  width: 100%;
+  margin: 1%;
+  float: left;
+  height: 100rpx;
+  text-align: center;
+  border-radius: 10px;
+  background: linear-gradient(
+    to right,
+    rgba(55, 135, 254, 0.08),
+    rgba(4, 184, 255, 0.08),
+    rgba(60, 161, 237, 0.08)
+  );
+}
+</style>

+ 162 - 94
pages/home/detail/fanlocalAnimate/fanlocalAnimate.vue

@@ -1,64 +1,134 @@
 <template>
   <view style="width: 100%; height: 100%">
     <div class="pageback">
-    <div class="ventilate" id="topPic">
-      <!-- 进风箭头 -->
-      <div :class="nowfengji == '2'?'arrow1':nowfengji == '1'?'arrow1-fan1':''" id="arrow1"></div>
-      <div :class="nowfengji == '2'?'arrow2':nowfengji == '1'?'arrow2-fan1':''" id="arrow2"></div>
-      <div :class="nowfengji == '2'?'arrow3':nowfengji == '1'?'arrow3-fan1':''" id="arrow3"></div>
-      <div :class="nowfengji == '2'?'arrow4':nowfengji == '1'?'arrow4-fan1':''" id="arrow4"></div>
-      <div :class="nowfengji == '2'?'arrow5':nowfengji == '1'?'arrow5-fan1':''" id="arrow5"></div>
-      <div :class="nowfengji == '2'?'arrow6':nowfengji == '1'?'arrow6-fan1':''" id="arrow6"></div>
-      <div :class="nowfengji == '2'?'arrow7':nowfengji == '1'?'arrow7-fan1':''" id="arrow7"></div>
-      <div :class="nowfengji == '2'?'arrow8':nowfengji == '1'?'arrow8-fan1':''" id="arrow8"></div>
-      <div :class="nowfengji == '2'?'arrow9':nowfengji == '1'?'arrow9-fan1':''" id="arrow9"></div>
-      <div :class="nowfengji == '2'?'arrow10':nowfengji == '1'?'arrow10-fan1':''" id="arrow10"></div>
-      <!-- 回风箭头 -->
-      <div class="arrow101" id="arrow101" v-show="nowfengji != ''"></div>
-      <div class="arrow102" id="arrow102" v-show="nowfengji != ''"></div>
-      <div class="arrow103" id="arrow103" v-show="nowfengji != ''"></div>
-      <div class="arrow104" id="arrow104" v-show="nowfengji != ''"></div>
-      <div class="arrow105" id="arrow105" v-show="nowfengji != ''"></div>
-      <div class="arrow106" id="arrow106" v-show="nowfengji != ''"></div>
-      <!-- <div class="arrow107" id="arrow107"></div>
+      <div class="ventilate" id="topPic">
+        <!-- 进风箭头 -->
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow1' : nowfengji == '1' ? 'arrow1-fan1' : ''
+          "
+          id="arrow1"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow2' : nowfengji == '1' ? 'arrow2-fan1' : ''
+          "
+          id="arrow2"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow3' : nowfengji == '1' ? 'arrow3-fan1' : ''
+          "
+          id="arrow3"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow4' : nowfengji == '1' ? 'arrow4-fan1' : ''
+          "
+          id="arrow4"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow5' : nowfengji == '1' ? 'arrow5-fan1' : ''
+          "
+          id="arrow5"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow6' : nowfengji == '1' ? 'arrow6-fan1' : ''
+          "
+          id="arrow6"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow7' : nowfengji == '1' ? 'arrow7-fan1' : ''
+          "
+          id="arrow7"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow8' : nowfengji == '1' ? 'arrow8-fan1' : ''
+          "
+          id="arrow8"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2' ? 'arrow9' : nowfengji == '1' ? 'arrow9-fan1' : ''
+          "
+          id="arrow9"
+        ></div>
+        <div
+          :class="
+            nowfengji == '2'
+              ? 'arrow10'
+              : nowfengji == '1'
+              ? 'arrow10-fan1'
+              : ''
+          "
+          id="arrow10"
+        ></div>
+        <!-- 回风箭头 -->
+        <div class="arrow101" id="arrow101" v-show="nowfengji != ''"></div>
+        <div class="arrow102" id="arrow102" v-show="nowfengji != ''"></div>
+        <div class="arrow103" id="arrow103" v-show="nowfengji != ''"></div>
+        <div class="arrow104" id="arrow104" v-show="nowfengji != ''"></div>
+        <div class="arrow105" id="arrow105" v-show="nowfengji != ''"></div>
+        <div class="arrow106" id="arrow106" v-show="nowfengji != ''"></div>
+        <!-- <div class="arrow107" id="arrow107"></div>
       <div class="arrow108" id="arrow108"></div>-->
-      <!-- 回风 -->
-      <div class="arrow201" id="arrow201"></div>
-      <div class="arrow202" id="arrow202"></div>
-      <div class="arrow203" id="arrow203"></div>
-      <div class="arrow204" id="arrow204"></div>
-      <div class="arrow205" id="arrow205"></div>
-      <div
-        style="color:#fff;font-size:14px;position:absolute;top:12%;left:80%;width:auto;height:60px"
-        @click="fanclick(1)"
-      >
-        <span>主风机</span>
-      </div>
-      <div
-        style="color:#fff;font-size:14px;position:absolute;top:16%;left:80%;width:auto;height:60px"
-        @click="fanclick(2)"
-      >
-        <span>备用风机</span>
-      </div>
-      <!-- 风扇动画展示 -->
-      <div class="box2" style="top: 12.8%;right: 29%;" @click="fanclick(1)">
-        <div id="box2">
-          <span></span>
-          <span></span>
-          <span></span>
-          <span></span>
+        <!-- 回风 -->
+        <div class="arrow201" id="arrow201"></div>
+        <div class="arrow202" id="arrow202"></div>
+        <div class="arrow203" id="arrow203"></div>
+        <div class="arrow204" id="arrow204"></div>
+        <div class="arrow205" id="arrow205"></div>
+        <div
+          style="
+            color: #fff;
+            font-size: 14px;
+            position: absolute;
+            top: 12%;
+            left: 80%;
+            width: auto;
+            height: 60px;
+          "
+          @click="fanclick(1)"
+        >
+          <span>主风机</span>
         </div>
-      </div>
-      <div class="box" style="top: 15.5%;right: 29%;" @click="fanclick(2)">
-        <div id="box1">
-          <span></span>
-          <span></span>
-          <span></span>
-          <span></span>
+        <div
+          style="
+            color: #fff;
+            font-size: 14px;
+            position: absolute;
+            top: 16%;
+            left: 80%;
+            width: auto;
+            height: 60px;
+          "
+          @click="fanclick(2)"
+        >
+          <span>备用风机</span>
+        </div>
+        <!-- 风扇动画展示 -->
+        <div class="box2" style="top: 12.8%; right: 29%" @click="fanclick(1)">
+          <div id="box2">
+            <span></span>
+            <span></span>
+            <span></span>
+            <span></span>
+          </div>
+        </div>
+        <div class="box" style="top: 15.5%; right: 29%" @click="fanclick(2)">
+          <div id="box1">
+            <span></span>
+            <span></span>
+            <span></span>
+            <span></span>
+          </div>
         </div>
       </div>
     </div>
-  </div>
   </view>
 </template>
 
@@ -80,7 +150,7 @@ export default {
       textColor: "#000",
       option1: {},
       readData: {},
-      nowfengji: "1"
+      nowfengji: "1",
     };
   },
   props: {
@@ -94,53 +164,51 @@ export default {
     },
   },
   methods: {
-	  
-	      setnowfengji(val) {
-	        if (this.nowfengji != val) {
-	          this.nowfengji = val;
-	          this.setFengjiDonghua();
-	        }
-	      },
-	      fanclick(val) {
-	        this.$emit("fanclick", val);
-	      },
-	      setFengjiDonghua() {
-	        if (this.nowfengji == "2") {
-	          document.getElementById("box1").style.animationPlayState = "running";
-	          document.getElementById("box1").style.WebkitAnimationPlayState =
-	            "running";
-	  
-	          document.getElementById("box2").style.animationPlayState = "paused";
-	          document.getElementById("box2").style.WebkitAnimationPlayState =
-	            "paused";
-	        } else if (this.nowfengji == "1") {
-	          document.getElementById("box2").style.animationPlayState = "running";
-	          document.getElementById("box2").style.WebkitAnimationPlayState =
-	            "running";
-	          document.getElementById("box1").style.animationPlayState = "paused";
-	          document.getElementById("box1").style.WebkitAnimationPlayState =
-	            "paused";
-	        } else {
-	          document.getElementById("box2").style.animationPlayState = "paused";
-	          document.getElementById("box2").style.WebkitAnimationPlayState =
-	            "paused";
-	          document.getElementById("box1").style.animationPlayState = "paused";
-	          document.getElementById("box1").style.WebkitAnimationPlayState =
-	            "paused";
-	        }
-	      }
-  },
-  watch: {
+    setnowfengji(val) {
+      if (this.nowfengji != val) {
+        this.nowfengji = val;
+        this.setFengjiDonghua();
+      }
+    },
+    fanclick(val) {
+      this.$emit("fanclick", val);
+    },
+    setFengjiDonghua() {
+      if (this.nowfengji == "2") {
+        document.getElementById("box1").style.animationPlayState = "running";
+        document.getElementById("box1").style.WebkitAnimationPlayState =
+          "running";
+
+        document.getElementById("box2").style.animationPlayState = "paused";
+        document.getElementById("box2").style.WebkitAnimationPlayState =
+          "paused";
+      } else if (this.nowfengji == "1") {
+        document.getElementById("box2").style.animationPlayState = "running";
+        document.getElementById("box2").style.WebkitAnimationPlayState =
+          "running";
+        document.getElementById("box1").style.animationPlayState = "paused";
+        document.getElementById("box1").style.WebkitAnimationPlayState =
+          "paused";
+      } else {
+        document.getElementById("box2").style.animationPlayState = "paused";
+        document.getElementById("box2").style.WebkitAnimationPlayState =
+          "paused";
+        document.getElementById("box1").style.animationPlayState = "paused";
+        document.getElementById("box1").style.WebkitAnimationPlayState =
+          "paused";
+      }
+    },
   },
+  watch: {},
   onLoad(query) {
     this.setFengjiDonghua();
-	},
+  },
 };
 </script>
 
 <style scoped>
 div.pageback {
-  padding-top:10px;
+  padding-top: 10px;
   margin-top: 12px;
   width: 100%;
   height: calc(80% - 50px);
@@ -151,7 +219,7 @@ div.pageback {
 div.ventilate {
   min-width: 300px;
   width: 60%;
-  margin-left:10%;
+  margin-left: 10%;
   height: 80%;
   height: calc(80% - 120px);
   min-height: 330px;

+ 97 - 92
pages/home/detail/windrectAnimate/windrectAnimate.vue

@@ -1,56 +1,67 @@
 <template>
   <view style="width: 100%; height: 100%">
-            <div class="checkwind-echarts-div" v-if="type == 'windrect_rect'">
-                <div class="checkwind">
-                  <div class="sub_line" v-bind:class="state == '0'? 'top_state' : state == '1' ?  'middle_state' : state == '2' ?  'bottom_state' : 'bottom_state' " id="subline">
-                  </div>
-                </div>
-                <span>{{title}}</span>
-              </div>
-		<div class="checkwind-echarts-div" v-if="type == 'windrect_ds'">
-		      <div class="checkwind_ds">
-		        <div
-		          class="sub_line"
-		          v-bind:class="
-		            state == '0'
-		              ? 'top_state'
-		              : state == '1'
-		              ? 'middle_state'
-		              : state == '2'
-		              ? 'bottom_state'
-		              : 'bottom_state'
-		          "
-		          id="subline"
-		        ></div>
-		        <div
-		          class="sub_line1"
-		          v-bind:class="
-		            state == '0'
-		              ? 'top_state1'
-		              : state == '1'
-		              ? 'middle_state1'
-		              : state == '2'
-		              ? 'bottom_state1'
-		              : 'bottom_state1'
-		          "
-		          id="subline1"
-		        ></div>
-		        <div
-		          class="sub_line2"
-		          v-bind:class="
-		            state == '0'
-		              ? 'top_state2'
-		              : state == '1'
-		              ? 'middle_state2'
-		              : state == '2'
-		              ? 'bottom_state2'
-		              : 'bottom_state2'
-		          "
-		          id="subline2"
-		        ></div>
-		      </div>
-		      <span>{{ title }}</span>
-		    </div>
+    <div class="checkwind-echarts-div" v-if="type == 'windrect_rect'">
+      <div class="checkwind">
+        <div
+          class="sub_line"
+          v-bind:class="
+            state == '0'
+              ? 'top_state'
+              : state == '1'
+              ? 'middle_state'
+              : state == '2'
+              ? 'bottom_state'
+              : 'bottom_state'
+          "
+          id="subline"
+        ></div>
+      </div>
+      <span>{{ title }}</span>
+    </div>
+    <div class="checkwind-echarts-div" v-if="type == 'windrect_ds'">
+      <div class="checkwind_ds">
+        <div
+          class="sub_line"
+          v-bind:class="
+            state == '0'
+              ? 'top_state'
+              : state == '1'
+              ? 'middle_state'
+              : state == '2'
+              ? 'bottom_state'
+              : 'bottom_state'
+          "
+          id="subline"
+        ></div>
+        <div
+          class="sub_line1"
+          v-bind:class="
+            state == '0'
+              ? 'top_state1'
+              : state == '1'
+              ? 'middle_state1'
+              : state == '2'
+              ? 'bottom_state1'
+              : 'bottom_state1'
+          "
+          id="subline1"
+        ></div>
+        <div
+          class="sub_line2"
+          v-bind:class="
+            state == '0'
+              ? 'top_state2'
+              : state == '1'
+              ? 'middle_state2'
+              : state == '2'
+              ? 'bottom_state2'
+              : 'bottom_state2'
+          "
+          id="subline2"
+        ></div>
+      </div>
+      <span>{{ title }}</span>
+    </div>
   </view>
 </template>
 
@@ -61,54 +72,48 @@ export default {
       height: "200px",
     };
   },
-  props: [
-    "state",
-    "title",
-    "height",
-    "type",
-  ],
+  props: ["state", "title", "height", "type"],
   methods: {},
   onLoad(query) {},
 };
 </script>
 
 <style scoped>
+/*门里面*/
+div.checkwind {
+  width: 160px;
+  height: 160px;
+  background-image: url(/static/wind.png);
+  background-size: 100% 100%;
+  perspective: 800px;
+}
+/*左门/右门*/
 
-    /*门里面*/
-    div.checkwind{
-        width: 160px;
-        height: 160px;
-        background-image: url(/static/wind.png);
-        background-size:100% 100%;
-        perspective: 800px;
-    }
-    /*左门/右门*/
-
-    div.checkwind .sub_line{
-        margin-top: 10px;
-        margin-left: 10px;
-        width:142px;
-        height:30px;
-        box-sizing:border-box;
-        float:left;
-        z-index: 1;
-        transition:all 2s ease;
-        background-image: url(/static/line.png) ;
-        background-size:100% 100%;
-    }
-    div.checkwind .sub_line{
-        transform-origin:left center;
-        border-right:1px solid rgb(8, 8, 8);
-    }
-    .checkwind .top_state{
-      transform: translateY(5px);
-    }
-    .checkwind .middle_state{
-      transform: translateY(45px);
-    }
-    .checkwind .bottom_state{
-      transform: translateY(90px);
-    }
+div.checkwind .sub_line {
+  margin-top: 10px;
+  margin-left: 10px;
+  width: 142px;
+  height: 30px;
+  box-sizing: border-box;
+  float: left;
+  z-index: 1;
+  transition: all 2s ease;
+  background-image: url(/static/line.png);
+  background-size: 100% 100%;
+}
+div.checkwind .sub_line {
+  transform-origin: left center;
+  border-right: 1px solid rgb(8, 8, 8);
+}
+.checkwind .top_state {
+  transform: translateY(5px);
+}
+.checkwind .middle_state {
+  transform: translateY(45px);
+}
+.checkwind .bottom_state {
+  transform: translateY(90px);
+}
 </style>
 
 <style scoped>

+ 1 - 1
pages/login/login.vue

@@ -56,7 +56,7 @@
 				shape:'',//round 圆形
 				loading: false,
 				userName: 'admin',
-				password: 'BETjcjk2019@)!(',
+				password: 'admin123admin',
 				phoneNo: '',
 				smsCode: '',
 				showPassword: false, //是否显示明文

+ 98 - 21
pages/operation/operationModel.vue

@@ -59,28 +59,40 @@
             v-for="(item, index) in historyData"
             :key="index"
           >
-            <view class="datacard">
+            <view>
               <view class="content flcard">
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="margin-top: 10rpx; color: #3787fe"
-                  >用户:{{ item.realname }}</view
-                >
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="margin-top: 10rpx; color: #3787fe"
-                  >操作设备:{{ item.devicename }}</view
-                >
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="margin-top: 10rpx; color: #3787fe"
-                  >操作记录:{{ item.strremark }}</view
-                >
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="margin-top: 10rpx; color: #3787fe"
-                  >操作时间:{{ item.createTime }}</view
-                >
+                <view class="datacard user">
+                  <view style="margin: 20rpx 20rpx">
+                    <text class="text-style">{{ item.realname }}</text>
+                  </view>
+                  <view style="margin: 20rpx 20rpx; font-size: small"
+                    >用户</view
+                  >
+                </view>
+                <view class="datacard device">
+                  <view style="margin: 20rpx 20rpx">
+                    <text class="text-style">{{ item.devicename }}</text>
+                  </view>
+                  <view style="margin: 20rpx 20rpx; font-size: small"
+                    >操作设备</view
+                  >
+                </view>
+                <view class="datacard record">
+                  <view style="margin: 20rpx 20rpx">
+                    <text class="text-style">{{ item.strremark }}</text>
+                  </view>
+                  <view style="margin: 20rpx 20rpx; font-size: small"
+                    >操作记录</view
+                  >
+                </view>
+                <view class="datacard time">
+                  <view style="margin: 20rpx 20rpx">
+                    <text class="text-style">{{ item.createTime }}</text>
+                  </view>
+                  <view style="margin: 20rpx 20rpx; font-size: small"
+                    >操作时间</view
+                  >
+                </view>
               </view>
             </view>
           </u-list-item>
@@ -198,4 +210,69 @@ export default {
   background-color: #ffffff;
   margin-bottom: 5rpx;
 }
+.text-style {
+  color: #3787fe;
+  font-weight: bold;
+}
+
+.itemback {
+  padding: 20rpx;
+  background-color: #ffffff;
+  margin-bottom: 5rpx;
+}
+.datacard {
+  width: 48%;
+  margin: 1%;
+  float: left;
+  height: 120rpx;
+  border-radius: 10px;
+}
+.time {
+  background: url(/static/operation/operationTime.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
+.record {
+  background: url(/static/operation/operationRecord.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
+.user {
+  background: url(/static/operation/user.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
+.device {
+  background: url(/static/operation/operationDevice.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+  background-size: auto 100%;
+  background-position: right;
+  background-repeat: no-repeat;
+}
 </style>

+ 252 - 152
pages/warndata/warndata.vue

@@ -1,161 +1,261 @@
 <template name="warndata">
-	<view>
-		<scroll-view>
-			<!-- 轮播 -->
-			<swiper class="screen-swiper square-dot"  :indicator-dots="true" :circular="true"
-			 :autoplay="true" interval="5000" duration="500" :style="[{animation: 'show 0.2s 1'}]">
-				<swiper-item v-for="(item,index) in swiperList" :key="index">
-					<image :src="item.url" mode="aspectFill" v-if="item.type=='image'"></image>
-					<video :src="item.url" autoplay loop muted :show-play-btn="false" :controls="false" objectFit="cover" v-if="item.type=='video'"></video>
-				</swiper-item>
-			</swiper>
-			
-			<!-- 常用服务 -->
-			<view class="cu-bar bg-white solid-bottom" :style="[{animation: 'show 0.5s 1'}]">
-				<view class="action">
-					<text class='cuIcon-title text-blue'></text>常用服务
+  <view class="container">
+    <u-navbar
+      title="预警分析"
+      :safeAreaInsetTop="false"
+      style="margin-top: 30px"
+      leftIcon=""
+    >
+    </u-navbar>
+    <view class="main">
+      <u-collapse @change="change" @close="close" @open="open">
+        <u-collapse-item
+          title="通风监测预警"
+          name="wind"
+          class="text-style flcard"
+        >
+          <view class="">
+            <view class="datacard demo-layout bg-purple-light">
+              <view style="margin-top: 10rpx">
+                <text class="text-style">{{ windData.zongjinfeng }}</text>
+              </view>
+              <view style="margin-top: 10rpx">总进风量(m³/min):</view>
+            </view>
+            <view class="datacard demo-layout bg-purple-light">
+              <view style="margin-top: 10rpx">
+                <text class="text-style">{{ windData.zonghuifeng }}</text>
+              </view>
+              <view style="margin-top: 10rpx">总回风量(m³/min):</view>
+            </view>
+            <view class="datacard demo-layout bg-purple-light">
+              <view style="margin-top: 10rpx">
+                <text class="text-style">{{
+                  windData.sysdata.xufengliang
+                }}</text>
+              </view>
+              <view style="margin-top: 10rpx">总需风量(m³/min):</view>
+            </view>
+            <!-- <view class="datacard1 demo-layout bg-purple-light">
+				<view style="margin-top: 10rpx">
+				  <text class="text-style">aaaaaaaaaaaaa</text>
 				</view>
-			</view>
-				
-			<view class="cu-list grid col-4 text-sm">
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.05 + 's'}]" v-for="(item,index) in usList" :key="index" @tap="goPage(item.page)">
-					<view class="padding text-center">
-						<image :src="item.icon" style="width:28px;height:28px;">
-							<view class="cu-tag badge margin-top-sm" style="margin-left:1.2em" v-if="getTtemDotInfo(item)">
-							   <block v-if="getTtemDotInfo(item)">{{getTtemDotInfo(item)}}</block>
-							</view>
-						</image>
-						<view class="margin-top-xs">{{item.title}}</view>
-					</view>
-				</view>
-			</view>
-				
-			<!-- 其他服务 -->
-			<view class="cu-bar bg-white solid-bottom margin-top"  :style="[{animation: 'show 0.6s 1'}]">
-				<view class="action">
-					 <text class='cuIcon-title text-yellow'></text>其他服务
-				</view>
-			</view>
-			<view class="cu-list grid col-4 text-sm">
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.1 + 's'}]" v-for="(item,index) in osList" :key="index" @tap="goPage(item.page)">
-					<view class="padding text-center">
-						<image :src="item.icon" style="width:28px;height:28px;"/>
-						<view class="margin-top-xs">{{item.title}}</view>
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-		<view class="cu-tabbar-height margin-top"></view>
-	</view>
+				<view style="margin-top: 10rpx">测试:</view>
+			</view> -->
+          </view>
+        </u-collapse-item>
+        <u-collapse-item
+          title="设备监测预警"
+          name="device"
+          class="text-style flcard"
+        >
+          <view class="demo-layout bg-purple-light">
+            <view style="margin-top: 10rpx">
+              <view class="deviceCard">
+                <view
+                  class="item-container"
+                  v-for="(item, index) in devicekindData"
+                  :key="index"
+                >
+                  <view class="item">
+                    <text style="margin-right: 10px">{{ item.name }}</text>
+                    <text>{{ item.status }}</text>
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+        </u-collapse-item>
+        <u-collapse-item
+          title="火灾监测预警"
+          name="fire"
+          class="text-style flcard"
+        >
+          <view class="firecontainer">
+            <view class="title">
+              <span class="firetext">外因火灾</span>
+            </view>
+            <view class="firecard"> </view>
+          </view>
+          <view class="firecontainer">
+            <view class="title">
+              <span class="firetext">内因火灾</span>
+            </view>
+            <view class="firecard"> </view>
+          </view>
+        </u-collapse-item>
+        <u-collapse-item
+          title="粉尘监测预警"
+          name="dust"
+          class="text-style flcard"
+        >
+          <text class="u-collapse-content"
+            >众多的贴心小工具,是您开发过程中召之即来的利器,让您飞镖在手,百步穿杨</text
+          >
+        </u-collapse-item>
+        <u-collapse-item
+          title="瓦斯监测预警"
+          name="gas"
+          class="text-style flcard"
+        >
+          <view class="firecontainer">
+            <view class="title">
+              <span class="firetext">{{ gasData.devices[0].systemname }}</span>
+            </view>
+            <view class="firecard"> </view>
+          </view>
+          <view class="firecontainer">
+            <view class="title">
+              <span class="firetext">{{ gasData.devices[1].systemname }}</span>
+            </view>
+            <view class="firecard"> </view>
+          </view>
+        </u-collapse-item>
+      </u-collapse>
+    </view>
+  </view>
 </template>
 
 <script>
-	import { us,os } from '@/common/util/work.js'
-	import socket from '@/common/js-sdk/socket/socket.js'
-	export default {
-		name: 'home',
-		props:{
-			cur:String,
-		},
-		watch: {
-			cur: {
-				immediate: true,
-				handler:function(val,oldVal){
-					console.log('cur',val,oldVal)
-				    this.initMenu()
-				},
-			},
-		},
-		data() {
-			return {
-			 swiperList: [
-				  {id:1,type: 'image',url: '/static/banner/banner1.png', link: ''},
-				  {id:2,type: 'image',url: '/static/banner/banner2.jpg', link: ''},
-				  {id:3,type: 'image',url: '/static/banner/banner3.jpg', link: ''},
-				  {id:4,type: 'image',url: '/static/banner/banner4.jpg', link: ''},
-				],
-				middleApps: [
-				  {icon: 'line2_icon1.png', title: '审批', 'text': '个人审批'},
-				  {icon: 'line2_icon2.png', title: '审批稿', 'text': '审批草稿箱'},
-				],
-				usList:us.data,
-				osList:os.data,
-				msgCount:0,
-				dot:{
-				  mailHome:false
-				}
-			}
-		},
-		methods: {
-			initMenu(){
-				console.log("-----------home------------")
-			    this.onSocketOpen()
-			    this.onSocketReceive()
-			    this.loadCount(0);
-			},
-			goPage(page){
-				if(!page){
-					return false;
-				}
-				if(page==='annotationList'){
-				  this.msgCount = 0
-				}
-				this.dot[page]=false
-				this.$Router.push({name: page})
-			},
-			// 启动webSocket
-			onSocketOpen() {
-				socket.init('websocket');
-			},
-			onSocketReceive() {
-				var _this=this
-				socket.acceptMessage = function(res){
-					// console.log("页面收到的消息", res);
-					if(res.cmd == "topic"){
-					  //系统通知
-					  _this.loadCount('1')
-					}else if(res.cmd == "user"){
-					  //用户消息
-					  _this.loadCount('2')
-					} else if(res.cmd == 'email'){
-					 //邮件消息
-					  _this.loadEmailCount()
-					}
-				}
-			},
-			loadCount(flag){
-				console.log("loadCount::flag",flag)
-				let url = '/sys/annountCement/listByUser';
-				this.$http.get(url).then(res=>{
-					console.log("res::",res)
-				  if(res.data.success){
-					let msg1Count = res.data.result.anntMsgTotal;
-					let msg2Count = res.data.result.sysMsgTotal;
-					this.msgCount = msg1Count + msg2Count
-					console.log("this.msgCount",this.msgCount)
-				  }
-				})
-			},
-			loadEmailCount(){
-				this.dot.mailHome = true
-			},
-			getTtemDotInfo(item){
-				if(item.page==='annotationList' && this.msgCount>0){
-				  return this.msgCount
-				}
-				return '';
-			}
-		}
-	}
+import { log } from "../../plugin/uni-simple-router/helpers/warn";
+import api from "@/api/api";
+export default {
+  name: "warndata",
+  props: {
+    cur: String,
+  },
+  watch: {},
+  data() {
+    return {
+      windData: [],
+      devicekindData: [],
+      fireData: [],
+      gasData: [],
+    };
+  },
+  mounted() {
+    this.getWranInfo();
+  },
+  methods: {
+    //获取预警信息
+    getWranInfo() {
+      new Promise((resolve, reject) => {
+        api
+          .getWarnInfo()
+          .then((response) => {
+            if (response.data.code == 200) {
+              this.windData = response.data.result.ventInfo;
+              this.devicekindData = response.data.result.info.devicekindInfo;
+              this.fireData = response.data.result.info.sysInfo.fireS;
+              this.gasData = response.data.result.info.sysInfo.gasS;
+            } else {
+              reject(response);
+            }
+          })
+          .catch((error) => {
+            console.log("catch===>response", response);
+            reject(error);
+          });
+      });
+    },
+  },
+};
 </script>
 
 <style scoped>
-	.cu-list.grid>.cu-item {
-	  padding: 0px 0px; 
-	}
-    .line2-icon {
-	  width: 60px;
-	  height: 60px;
-    }
-	
+>>> .u-navbar--fixed {
+  margin-top: 20px;
+}
+.main {
+  margin-top: 100rpx;
+  display: flex;
+  flex-direction: column;
+}
+.text-style {
+  font-weight: bold;
+}
+.flcard {
+  margin-top: 20rpx;
+  padding: 20rpx;
+  background-color: #ffffff;
+  margin-bottom: 5rpx;
+}
+.datacard {
+  width: 32.5%;
+  margin: 1px;
+  float: left;
+  height: 100rpx;
+  text-align: center;
+  border-radius: 10px;
+  background: url(/static/model/windM3.png),
+    linear-gradient(
+      to right,
+      rgba(55, 135, 254, 0.08),
+      rgba(4, 184, 255, 0.08),
+      rgba(60, 161, 237, 0.08)
+    );
+}
+.datacard1 {
+  width: 100%;
+  margin: 2px;
+  float: left;
+  height: 200rpx;
+  text-align: center;
+  border-radius: 10px;
+  background: linear-gradient(
+    to right,
+    rgba(55, 135, 254, 0.08),
+    rgba(4, 184, 255, 0.08),
+    rgba(60, 161, 237, 0.08)
+  );
+}
+.title {
+  width: 100%;
+  height: 50rpx;
+  background: url(/static/warndata/title.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  display: flex; /* 将父级元素设置为 Flex 容器 */
+  align-items: center; /* 垂直居中子元素 */
+}
+.firecard {
+  width: 100%;
+  margin: 1px;
+  float: left;
+  height: 100rpx;
+  text-align: center;
+  border-radius: 10px;
+  margin-top: 10px;
+  background: linear-gradient(
+    to right,
+    rgba(55, 135, 254, 0.08),
+    rgba(4, 184, 255, 0.08),
+    rgba(60, 161, 237, 0.08)
+  );
+  background-repeat: repeat;
+}
+.deviceCard {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+}
+
+.item-container {
+  height: 100px;
+  background-image: url(/static/warndata/window.png);
+  background-size: 100% 60%;
+  background-repeat: no-repeat;
+}
+.item {
+  margin-left: 70px;
+  margin-top: 36px;
+}
+.firetext {
+  margin: 20px;
+}
+.text-style {
+  color: #3787fe;
+  font-size: large;
+}
+.firecontainer {
+  margin-top: 10px;
+}
 </style>

BIN
static/banner/banner1.png


BIN
static/banner/banner2.jpg


BIN
static/banner/banner3.jpg


BIN
static/banner/banner4.jpg


BIN
static/filecenter/laiyuan.png


BIN
static/filecenter/time.png


BIN
static/filecenter/user.png


BIN
static/filecenter/zhuangtai.png


BIN
static/operation/operationDevice.png


BIN
static/operation/operationRecord.png


BIN
static/operation/operationTime.png


BIN
static/operation/user.png


BIN
static/warndata/autodoor.png


BIN
static/warndata/title.png


+ 3 - 0
static/warndata/warnicon.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="22.046" height="20.278" viewBox="0 0 22.046 20.278">
+  <path id="路径_55536" data-name="路径 55536" d="M21.923,59.607,12.07,41.588a1.2,1.2,0,0,0-2.1,0L.124,59.607a1.132,1.132,0,0,0,1.058,1.631H20.876a1.13,1.13,0,0,0,1.047-1.631Zm-11.781-10.7a.882.882,0,0,1,1.763,0V54.2a.882.882,0,0,1-1.763,0v-5.29Zm.882,9.257a1.1,1.1,0,1,1,1.1-1.1A1.105,1.105,0,0,1,11.023,58.163Z" transform="translate(0 -40.96)" fill="#fff"/>
+</svg>

BIN
static/warndata/windV.png


BIN
static/warndata/window.png