|  | @@ -1,5 +1,5 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | -  <view style="overflow: auto; height: 100%;">
 | 
	
		
			
				|  |  | +  <view style="overflow: auto; height: 100%">
 | 
	
		
			
				|  |  |      <!-- 建议放在外层 -->
 | 
	
		
			
				|  |  |      <u-navbar :title="name" @leftClick="backPage" :bgImage="backPic">
 | 
	
		
			
				|  |  |        <view class="u-nav-slot" slot="left">
 | 
	
	
		
			
				|  | @@ -46,106 +46,63 @@
 | 
	
		
			
				|  |  |              @click="showPasswordDialog('sameTimeClose')"
 | 
	
		
			
				|  |  |            ></u-button>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  | -        <div class="button-grid flcard" v-if="this.TabCur == 'window'">
 | 
	
		
			
				|  |  | -          <u-button type="primary" shape="circle" text="设定面积"></u-button>
 | 
	
		
			
				|  |  | +        <div
 | 
	
		
			
				|  |  | +          class="button-grid flcard"
 | 
	
		
			
				|  |  | +          v-if="this.TabCur == 'window' && this.nwindownum == 1"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <u-button
 | 
	
		
			
				|  |  | +            type="primary"
 | 
	
		
			
				|  |  | +            shape="circle"
 | 
	
		
			
				|  |  | +            text="设定面积"
 | 
	
		
			
				|  |  | +            @click="showPasswordDialog('frontSetValue')"
 | 
	
		
			
				|  |  | +          ></u-button>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +        <div
 | 
	
		
			
				|  |  | +          class="button-grid flcard"
 | 
	
		
			
				|  |  | +          v-if="this.TabCur == 'window' && this.nwindownum == 2"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <u-button
 | 
	
		
			
				|  |  | +            type="primary"
 | 
	
		
			
				|  |  | +            shape="circle"
 | 
	
		
			
				|  |  | +            text="设定前窗面积"
 | 
	
		
			
				|  |  | +            @click="showPasswordDialog('frontSetValue')"
 | 
	
		
			
				|  |  | +          ></u-button>
 | 
	
		
			
				|  |  | +          <u-button
 | 
	
		
			
				|  |  | +            type="primary"
 | 
	
		
			
				|  |  | +            shape="circle"
 | 
	
		
			
				|  |  | +            text="设定后窗面积"
 | 
	
		
			
				|  |  | +            @click="showPasswordDialog('rearSetValue')"
 | 
	
		
			
				|  |  | +          ></u-button>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div class="flcard" v-if="this.TabCur == 'gate'">
 | 
	
		
			
				|  |  | -			<doorAnimate :gatestate1="frontGateStatus" :gatestate2="rearGateStatus" :height="height" :doorcount="ndoorcount"></doorAnimate>
 | 
	
		
			
				|  |  | -		</div>
 | 
	
		
			
				|  |  | +          <doorAnimate
 | 
	
		
			
				|  |  | +            :gatestate1="frontGateStatus"
 | 
	
		
			
				|  |  | +            :gatestate2="rearGateStatus"
 | 
	
		
			
				|  |  | +            :videoURL="viedeoUrl"
 | 
	
		
			
				|  |  | +            :height="height"
 | 
	
		
			
				|  |  | +            :doorcount="ndoorcount"
 | 
	
		
			
				|  |  | +          ></doorAnimate>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  |          <div
 | 
	
		
			
				|  |  |            class="flcard"
 | 
	
		
			
				|  |  |            v-if="this.TabCur == 'window' && this.nwindownum == 1"
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  | -          <div class="window-container">
 | 
	
		
			
				|  |  | -            <div class="autowindow_new">
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_1"
 | 
	
		
			
				|  |  | -                id="subwindowpic11"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_2"
 | 
	
		
			
				|  |  | -                id="subwindowpic12"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_3"
 | 
	
		
			
				|  |  | -                id="subwindowpic13"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_4"
 | 
	
		
			
				|  |  | -                id="subwindowpic14"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_5"
 | 
	
		
			
				|  |  | -                id="subwindowpic15"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -          </div>
 | 
	
		
			
				|  |  | +          <windowAnimate
 | 
	
		
			
				|  |  | +            :windowAngle="windowAngle"
 | 
	
		
			
				|  |  | +            :height="height"
 | 
	
		
			
				|  |  | +            :windowcount="nwindownum"
 | 
	
		
			
				|  |  | +          ></windowAnimate>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div
 | 
	
		
			
				|  |  |            class="flcard"
 | 
	
		
			
				|  |  |            v-if="this.TabCur == 'window' && this.nwindownum == 2"
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  | -          <div class="window-container">
 | 
	
		
			
				|  |  | -            <div class="autowindow_new">
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_1"
 | 
	
		
			
				|  |  | -                id="subwindowpic11"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_2"
 | 
	
		
			
				|  |  | -                id="subwindowpic12"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_3"
 | 
	
		
			
				|  |  | -                id="subwindowpic13"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_4"
 | 
	
		
			
				|  |  | -                id="subwindowpic14"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_5"
 | 
	
		
			
				|  |  | -                id="subwindowpic15"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="autowindow_new" style="margin-top: 20px">
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_1"
 | 
	
		
			
				|  |  | -                id="subwindowpic11"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_2"
 | 
	
		
			
				|  |  | -                id="subwindowpic12"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_3"
 | 
	
		
			
				|  |  | -                id="subwindowpic13"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_4"
 | 
	
		
			
				|  |  | -                id="subwindowpic14"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -              <div
 | 
	
		
			
				|  |  | -                class="window_new_5"
 | 
	
		
			
				|  |  | -                id="subwindowpic15"
 | 
	
		
			
				|  |  | -                
 | 
	
		
			
				|  |  | -              ></div>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -          </div>
 | 
	
		
			
				|  |  | +          <windowAnimate
 | 
	
		
			
				|  |  | +            :windowAngle="windowAngle"
 | 
	
		
			
				|  |  | +            :windowAngle1="windowAngle1"
 | 
	
		
			
				|  |  | +            :height="height"
 | 
	
		
			
				|  |  | +            :windowcount="nwindownum"
 | 
	
		
			
				|  |  | +          ></windowAnimate>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div class="flcard">
 | 
	
		
			
				|  |  |            <div class="flex-container">
 | 
	
	
		
			
				|  | @@ -223,6 +180,14 @@
 | 
	
		
			
				|  |  |          :round="14"
 | 
	
		
			
				|  |  |          :safeAreaInsetBottom="false"
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  | +        <view style="margin-top: 15px" v-if="this.TabCur == 'window'"
 | 
	
		
			
				|  |  | +          >风窗面积:</view
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +        <u-input
 | 
	
		
			
				|  |  | +          style="margin-top: 15px"
 | 
	
		
			
				|  |  | +          v-model="windowArea"
 | 
	
		
			
				|  |  | +          v-if="this.TabCur == 'window'"
 | 
	
		
			
				|  |  | +        ></u-input>
 | 
	
		
			
				|  |  |          <view style="margin-top: 15px">请输入密码:</view>
 | 
	
		
			
				|  |  |          <u-input
 | 
	
		
			
				|  |  |            style="margin-top: 15px"
 | 
	
	
		
			
				|  | @@ -242,7 +207,8 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import api from "@/api/api";
 | 
	
		
			
				|  |  | -import doorAnimate from "../doorAnimate/doorAnimate.vue"
 | 
	
		
			
				|  |  | +import doorAnimate from "../doorAnimate/doorAnimate.vue";
 | 
	
		
			
				|  |  | +import windowAnimate from "../windowAnimate/windowAnimate.vue";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
	
		
			
				|  | @@ -250,17 +216,18 @@ export default {
 | 
	
		
			
				|  |  |        typeList: [], //展示字段
 | 
	
		
			
				|  |  |        itemId: "", // 初始化 itemId
 | 
	
		
			
				|  |  |        name: "", // 初始化 name
 | 
	
		
			
				|  |  | +      deviceid: "", //初始化设备id
 | 
	
		
			
				|  |  |        TabCur: "",
 | 
	
		
			
				|  |  |        checked: [],
 | 
	
		
			
				|  |  |        backPic: "url(../../../../static/topnavbar.png)",
 | 
	
		
			
				|  |  |        frontAngle: "", //风窗打开角度
 | 
	
		
			
				|  |  |        nwindownum: "", //风窗道数
 | 
	
		
			
				|  |  | -	  ndoorcount:'',//风门道数
 | 
	
		
			
				|  |  | +      ndoorcount: "", //风门道数
 | 
	
		
			
				|  |  |        deviceType: "", //设备类型
 | 
	
		
			
				|  |  |        show: false, //密码弹窗是否显示
 | 
	
		
			
				|  |  |        password: "", //控制设备密码
 | 
	
		
			
				|  |  |        paramcode: "", //控制字段
 | 
	
		
			
				|  |  | -	  height:"200px",
 | 
	
		
			
				|  |  | +      height: "200px",
 | 
	
		
			
				|  |  |        popupStyle: {
 | 
	
		
			
				|  |  |          // 弹窗样式
 | 
	
		
			
				|  |  |          "background-color": "#fff",
 | 
	
	
		
			
				|  | @@ -269,32 +236,24 @@ export default {
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        frontGateStatus: "", //前门状态
 | 
	
		
			
				|  |  |        rearGateStatus: "", //后门状态
 | 
	
		
			
				|  |  | -	  animationData:{},
 | 
	
		
			
				|  |  | -      animationDuration: 500, // 动画持续时间
 | 
	
		
			
				|  |  | +      windowAngle: 0, //前窗打开角度
 | 
	
		
			
				|  |  | +      windowAngle1: 0, //后窗打开角度
 | 
	
		
			
				|  |  | +      windowArea: "", //风窗面积设定值
 | 
	
		
			
				|  |  | +      viedeoUrl: "", //监控url
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    onLoad(query) {
 | 
	
		
			
				|  |  | -    // query 中包含传递过来的id
 | 
	
		
			
				|  |  | -    const id = query.id;
 | 
	
		
			
				|  |  | -    const name = query.name;
 | 
	
		
			
				|  |  | -    const type = query.type;
 | 
	
		
			
				|  |  |      //保存id到 data 中 可以在整个页面中使用
 | 
	
		
			
				|  |  | -    this.itemId = id;
 | 
	
		
			
				|  |  | -    this.name = name;
 | 
	
		
			
				|  |  | -    this.TabCur = type;
 | 
	
		
			
				|  |  | +    this.itemId = query.id;
 | 
	
		
			
				|  |  | +    this.name = query.name;
 | 
	
		
			
				|  |  | +    this.TabCur = query.type;
 | 
	
		
			
				|  |  |      this.getShowList();
 | 
	
		
			
				|  |  | -	ths.ndoorcount = 2
 | 
	
		
			
				|  |  | -  },
 | 
	
		
			
				|  |  | -  components: {doorAnimate},
 | 
	
		
			
				|  |  | -  onShow() {
 | 
	
		
			
				|  |  | -    var animation = uni.createAnimation({
 | 
	
		
			
				|  |  | -      duration: 1000,
 | 
	
		
			
				|  |  | -      timingFunction: "linear",
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  | -    this.animation = animation;
 | 
	
		
			
				|  |  | +    this.ndoorcount = 2;
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | +  components: { doorAnimate, windowAnimate },
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  |      this.getDeviceInfo(this.itemId);
 | 
	
		
			
				|  |  | +    this.getVideoUrlById(this.itemId);
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
		
			
				|  |  |      this.startTimer();
 | 
	
	
		
			
				|  | @@ -304,7 +263,6 @@ export default {
 | 
	
		
			
				|  |  |        this.timer = setInterval(() => {
 | 
	
		
			
				|  |  |          // 执行定时任务
 | 
	
		
			
				|  |  |          this.getDeviceInfo(this.itemId);
 | 
	
		
			
				|  |  | -        console.log("定时任务执行中...");
 | 
	
		
			
				|  |  |        }, 5000);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      stopTimer() {
 | 
	
	
		
			
				|  | @@ -363,15 +321,39 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |                this.nwindownum =
 | 
	
		
			
				|  |  |                  response.data.result.msgTxt[0].datalist[0].nwindownum;
 | 
	
		
			
				|  |  | -			  this.ndoorcount = 
 | 
	
		
			
				|  |  | -			    response.data.result.msgTxt[0].datalist[0].ndoorcount;
 | 
	
		
			
				|  |  | +              this.ndoorcount =
 | 
	
		
			
				|  |  | +                response.data.result.msgTxt[0].datalist[0].ndoorcount;
 | 
	
		
			
				|  |  |                this.deviceType =
 | 
	
		
			
				|  |  |                  response.data.result.msgTxt[0].datalist[0].deviceType;
 | 
	
		
			
				|  |  | -              // this.tableData.push(
 | 
	
		
			
				|  |  | -              //   response.data.result.msgTxt[0].datalist[0].readTime
 | 
	
		
			
				|  |  | -              // );
 | 
	
		
			
				|  |  |                this.frontGateStatus = this.tableData.frontGateOpen;
 | 
	
		
			
				|  |  |                this.rearGateStatus = this.tableData.rearGateOpen;
 | 
	
		
			
				|  |  | +              var maxarea = response.data.result.msgTxt[0].datalist[0].maxarea;
 | 
	
		
			
				|  |  | +              this.windowAngle =
 | 
	
		
			
				|  |  | +                (this.tableData.forntArea / maxarea) * 100 * 0.9;
 | 
	
		
			
				|  |  | +              this.windowAngle1 =
 | 
	
		
			
				|  |  | +                (this.tableData.rearArea / maxarea) * 100 * 0.9;
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +              resolve(response);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          .catch((error) => {
 | 
	
		
			
				|  |  | +            reject(error);
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //获取监控URL 通过ID获取
 | 
	
		
			
				|  |  | +    getVideoUrlById(ID) {
 | 
	
		
			
				|  |  | +      let IDString = String(ID); // 将 ID 转换为字符串
 | 
	
		
			
				|  |  | +      new Promise((resolve, reject) => {
 | 
	
		
			
				|  |  | +        api
 | 
	
		
			
				|  |  | +          .getCameraById({ deviceid: IDString })
 | 
	
		
			
				|  |  | +          .then((response) => {
 | 
	
		
			
				|  |  | +            if (response.data.code == 200) {
 | 
	
		
			
				|  |  | +              this.viedeoUrl = response.data.result.records[0].addr;
 | 
	
		
			
				|  |  | +              console.log(
 | 
	
		
			
				|  |  | +                response.data.result.records[0].addr,
 | 
	
		
			
				|  |  | +                "csssssssssssssss"
 | 
	
		
			
				|  |  | +              );
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                resolve(response);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -389,7 +371,7 @@ export default {
 | 
	
		
			
				|  |  |          devicetype: this.deviceType,
 | 
	
		
			
				|  |  |          paramcode: this.paramcode,
 | 
	
		
			
				|  |  |          password: pass,
 | 
	
		
			
				|  |  | -        value: true,
 | 
	
		
			
				|  |  | +        value: this.windowArea,
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |        new Promise((resolve, reject) => {
 | 
	
		
			
				|  |  |          api
 | 
	
	
		
			
				|  | @@ -421,37 +403,6 @@ export default {
 | 
	
		
			
				|  |  |        // 发起请求后关闭密码输入弹窗
 | 
	
		
			
				|  |  |        this.show = false;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    //风门打开
 | 
	
		
			
				|  |  | -    openDoor() {
 | 
	
		
			
				|  |  | -      if (!this.frontGateStatus) {
 | 
	
		
			
				|  |  | -		this.doorRotate()
 | 
	
		
			
				|  |  | -      }else if( !this.rearGateStatus){
 | 
	
		
			
				|  |  | -		this.doorRotate()
 | 
	
		
			
				|  |  | -	  };
 | 
	
		
			
				|  |  | -	  
 | 
	
		
			
				|  |  | -	    if (this.frontGateStatus) {
 | 
	
		
			
				|  |  | -	  	this.door1Rotate()
 | 
	
		
			
				|  |  | -	    }else if (this.rearGateStatus){
 | 
	
		
			
				|  |  | -	  	this.door1Rotate()
 | 
	
		
			
				|  |  | -	    };
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    //风门关闭
 | 
	
		
			
				|  |  | -    closeDoor() {
 | 
	
		
			
				|  |  | -      if (this.frontGateStatus) {
 | 
	
		
			
				|  |  | -		this.door1Rotate()
 | 
	
		
			
				|  |  | -      }else if (this.rearGateStatus){
 | 
	
		
			
				|  |  | -		this.door1Rotate()
 | 
	
		
			
				|  |  | -	  };
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -	doorRotate(){
 | 
	
		
			
				|  |  | -		this.animation.rotateY(100).step()
 | 
	
		
			
				|  |  | -		this.animationData = this.animation.export()
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	door1Rotate(){
 | 
	
		
			
				|  |  | -		this.animation.rotateY(-100).step()
 | 
	
		
			
				|  |  | -		this.animationData = this.animation.export()
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    destroyed() {
 | 
	
		
			
				|  |  |      // 停止定时器
 |