浏览代码

创建视频监测文件夹

ming 1 年之前
父节点
当前提交
a9ca58a37e

+ 14 - 0
src/pages.json

@@ -628,6 +628,20 @@
             "navigationBarTitleText": "我的快递",
             "enablePullDownRefresh": false
           }
+        },
+        {
+          "path": "videoMonitor/videoList",
+          "style": {
+            "navigationBarTitleText": "视频监控列表",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "videoMonitor/videoDetail",
+          "style": {
+            "navigationBarTitleText": "视频详情",
+            "enablePullDownRefresh": false
+          }
         }
       ]
     }

+ 95 - 0
src/pages/business/videoMonitor/index.vue

@@ -0,0 +1,95 @@
+<template>
+  <oa-scroll
+    customClass="bg-white scroll-height"
+    :pageSize="pageSize"
+    :total="total"
+    :refresherLoad="true"
+    :refresherLoadTitle="false"
+    :refresherEnabled="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @load="load"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.type"
+  >
+    <template #default>
+      <view class="alarmManage">
+        <u-grid :border="true">
+          <u-grid-item v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base.productCode, base.productName)">
+            <u-badge type="primary" max="9999" :value="base.total" :showZero="true" :absolute="true" :offset="[10, 10, 0, 0]"></u-badge>
+            <image class="mb15" style="width: 40px; height: 40px; margin-top: 35px" :src="base.typeImg" mode="aspectFill"></image>
+            <text class="mb15 grid-text text-ellipsis">{{ base.productName }}</text>
+          </u-grid-item>
+        </u-grid>
+      </view>
+    </template>
+  </oa-scroll>
+</template>
+
+<script setup>
+import { onReady, onLoad, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
+import { useStores, commonStores } from "@/store/modules/index";
+
+import { dmpProductInfo, baseAlarmTypeList } from "@/api/business/fireIot/alarmManage.js";
+
+const { proxy } = getCurrentInstance();
+
+const dataList = ref([]);
+const pageSize = ref(20);
+const current = ref(1);
+const total = ref(0);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  baseAlarmTypeList({ productName: "", current: current.value, size: pageSize.value }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      dmpProductInfo({ current: current.value, size: 2000 }).then((requset1) => {
+        if (requset1.status === "SUCCESS") {
+          requset.data.records.forEach((e) => {
+            requset1.data.records.forEach((el) => {
+              if (e.productCode === el.productCode) {
+                e.typeImg = el.typeImg ? el.typeImg : "/static/images/404.png";
+              }
+            });
+          });
+
+          dataList.value = requset.data.records;
+          total.value = requset.data.total;
+        }
+      });
+    }
+  });
+}
+
+function handleToDetails(productCode, productName) {
+  proxy.$tab.navigateTo(`/pages/business/videoMonitor/videoList?productCode=${productCode}&productName=${productName}`);
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  pageSize.value += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  pageSize.value = 20;
+  total.value = 0;
+  init();
+}
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+
+  init();
+});
+</script>

+ 220 - 0
src/pages/business/videoMonitor/videoDetail.vue

@@ -0,0 +1,220 @@
+<template>
+  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
+    <view class="alarmDetails-container">
+      <view class="flex bg-white p15 mb15">
+        <image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="dataArray.typeImg ? dataArray.typeImg : '/static/images/404.png'" mode="aspectFill"></image>
+
+        <view style="margin: auto auto auto 0">
+          <view style="font-size: 15px"> {{ dataArray.projectName }} </view>
+        </view>
+
+        <view style="margin: auto 0 auto 0">
+          <view style="font-size: 15px" :style="`color:${dataArray.repairStatus == 1 ? '#23dedc' : '#16bf00'}`">
+            {{ dataArray.repairStatus == 1 ? "受理中" : "处理完成" }}
+          </view>
+        </view>
+      </view>
+
+      <view class="bg-white p15 mb15">
+        <uni-section class="block mb10" title="基本信息" type="line"></uni-section>
+
+        <view class="tableType3 padding-0">
+          <u-row v-for="da in dataList" :key="da">
+            <u-col span="4">
+              <view style="text-align: right; padding: 0px 5px 0px 5px">{{ da.title }}</view>
+            </u-col>
+            <u-col span="8">
+              <view v-if="da.title !== '评分'" style="text-align: left; padding: 0px 5px 0px 5px">{{ da.value }}</view>
+              <u-rate v-else style="padding: 0" v-model="da.value" :minCount="0" :count="5" :allowHalf="true" activeColor="#ff9900" readonly></u-rate>
+            </u-col>
+          </u-row>
+        </view>
+      </view>
+
+      <view class="bg-white p15 mb15">
+        <uni-section class="block mb10" title="处理内容" type="line"></uni-section>
+
+        <view>
+          <u-input placeholder="报修人(必填)" border="surround" v-model="dataArray.handleName" style="margin: 0 0 15px 0" :disabled="dataArray.repairStatus == 2"> </u-input>
+
+          <u--textarea
+            v-model="dataArray.handleContent"
+            placeholder="填报内容,最多可输入50个字"
+            :count="true"
+            maxlength="50"
+            style="margin: 0 0 15px 0"
+            :disabled="dataArray.repairStatus == 2"
+          ></u--textarea>
+        </view>
+
+        <view class="flex" v-if="dataArray.repairStatus != 2">
+          <u-button
+            type="info"
+            text="取消"
+            :plain="true"
+            shape="circle"
+            :customStyle="{
+              width: '80px',
+              height: '30px',
+              marginRight: '15px',
+            }"
+            @click="handleSubmit(1)"
+          ></u-button>
+          <u-button
+            type="primary"
+            text="处理"
+            shape="circle"
+            :customStyle="{
+              width: '80px',
+              height: '30px',
+              marginLeft: '15px',
+            }"
+            @click="handleSubmit(2)"
+          ></u-button>
+        </view>
+      </view>
+    </view>
+  </scroll-view>
+</template>
+
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { useStores, commonStores } from "@/store/modules/index";
+
+import { page, fill } from "@/api/business/fireIot/repairManage.js";
+
+const { proxy } = getCurrentInstance();
+const useStore = useStores();
+
+const dataArray = ref({});
+const dataList = ref([
+  {
+    title: "报修日期",
+    value: "",
+  },
+  {
+    title: "项目名称",
+    value: "",
+  },
+  {
+    title: "报修人",
+    value: "",
+  },
+  {
+    title: "报修电话",
+    value: "",
+  },
+  {
+    title: "问题描述",
+    value: "",
+  },
+  {
+    title: "报修地址",
+    value: "",
+  },
+]);
+
+const repairCode = ref("");
+const pageSize = ref(20);
+const current = ref(1);
+const total = ref(0);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  selectListApi();
+}
+
+/**
+ * @列表查询
+ * @api接口查询
+ */
+function selectListApi() {
+  page({
+    repairCode: repairCode.value,
+    current: current.value,
+    size: pageSize.value,
+  }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      dataArray.value = requset.data.records[0];
+      dataArray.value.handleName = requset.data.records[0].handleName ? requset.data.records[0].handleName : useStore.nickName ? useStore.nickName : "";
+      dataArray.value.handleContent = requset.data.records[0].handleContent ? requset.data.records[0].handleContent : "";
+
+      dataList.value[0].value = requset.data.records[0].createTime ? requset.data.records[0].createTime.replace("T", " ") : requset.data[0].createTime;
+      dataList.value[1].value = requset.data.records[0].projectName;
+      dataList.value[2].value = requset.data.records[0].reflectName;
+      dataList.value[3].value = requset.data.records[0].reflectPhone;
+      dataList.value[4].value = requset.data.records[0].repairContent;
+      dataList.value[5].value = requset.data.records[0].projectAddress;
+
+      if (requset.data.records[0].repairStatus === 2) {
+        dataList.value.push(
+          {
+            title: "评分",
+            value: 0,
+          },
+          {
+            title: "评分内容",
+            value: "",
+          }
+        );
+        dataList.value[6].value = requset.data.records[0].score ? requset.data.records[0].score : 0;
+        dataList.value[7].value = requset.data.records[0].appraiseContent;
+      }
+
+      total.value = requset.data.total;
+    }
+  });
+}
+
+/**
+ * @提交
+ */
+function handleSubmit(type) {
+  if (type == 1) {
+    proxy.$tab.navigateBack(1);
+  } else {
+    if (!dataArray.value.handleName) {
+      proxy.$modal.msg("请输入报修人");
+      return;
+    }
+
+    fill({
+      id: dataArray.value.id,
+      handleName: dataArray.value.handleName,
+      handleContent: dataArray.value.handleContent,
+    }).then((res) => {
+      if (requset.status === "SUCCESS") {
+        proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
+      }
+    });
+  }
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  if ("repairCode" in options) {
+    repairCode.value = options.repairCode;
+  }
+
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.u-input__content__field-wrapper__field) {
+  font-size: 13px !important;
+}
+
+:deep(.u-textarea__field) {
+  font-size: 13px;
+}
+</style>

+ 191 - 0
src/pages/business/videoMonitor/videoList.vue

@@ -0,0 +1,191 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }" :scrollable="false"></u-tabs>
+  </u-sticky>
+
+  <oa-scroll
+    customClass="repairManage-container scroll-height"
+    :pageSize="pageSize"
+    :total="total"
+    :refresherLoad="true"
+    :refresherEnabled="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :lowerThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @load="load"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="menu-list m0">
+        <view class="list-cell list-cell-arrow" style="color: #666666; line-height: 25px" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base)">
+          <view class="content-area-top menu-item">
+            <view class="content-area-top-time">
+              {{ base.repairStatus == 1 ? (base.createTime ? base.createTime.replace("T", " ") : "") : base.handleTime ? base.handleTime.replace("T", " ") : "" }}
+            </view>
+            <view class="content-area-top-status" v-if="base.repairStatus == 1" style="background-color: #23dedc"> 受理中 </view>
+            <view class="content-area-top-status" v-if="base.repairStatus == 2" style="background-color: #16bf00"> 处理完成 </view>
+          </view>
+          <view class="content-area-row_wrap menu-item">
+            <view class="content-area-row_wrap-view"> 项目名称:{{ base.projectName }} </view>
+            <view class="content-area-row_wrap-view"> 报修人:{{ base.reflectName }} </view>
+            <view class="content-area-row_wrap-view"> 报修人电话:{{ base.reflectPhone }} </view>
+            <view class="content-area-row_wrap-view"> 报修内容:{{ base.repairContent }} </view>
+            <view class="content-area-row_wrap-view"> 报修地址:{{ base.projectAddress }} </view>
+          </view>
+        </view>
+      </view>
+    </template>
+  </oa-scroll>
+</template>
+
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { useStores, commonStores } from "@/store/modules/index";
+
+import { page } from "@/api/business/fireIot/repairManage.js";
+
+const { proxy } = getCurrentInstance();
+const commonStore = commonStores();
+
+const tabsList = ref([
+  {
+    name: "全部",
+    value: "",
+  },
+  {
+    name: "受理中",
+    value: 1,
+  },
+  {
+    name: "处理完成",
+    value: 2,
+  },
+]);
+const tabsCurrent = ref(1);
+
+const dataList = ref([]);
+const pageSize = ref(20);
+const current = ref(1);
+const total = ref(0);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  selectListApi();
+}
+
+/**
+ * @列表查询
+ * @api接口查询
+ */
+function selectListApi() {
+  page({
+    repairStatus: tabsList.value[tabsCurrent.value].value,
+    current: current.value,
+    size: pageSize.value,
+  }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      dataList.value = requset.data.records;
+      total.value = requset.data.total;
+    }
+  });
+}
+
+/**
+ * @跳转详情事件
+ */
+function handleToDetails(e) {
+  proxy.$tab.navigateTo(`/pages/business/videoMonitor/videoDetail?repairCode=${e.repairCode}`);
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  pageSize.value += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  pageSize.value = 20;
+  total.value = 0;
+  init();
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  tabsCurrent.value = e.index;
+  init();
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+.repairManage-container {
+  .content-area {
+    &-top {
+      padding-right: 10px;
+      font-size: 16px;
+      font-weight: 600;
+      color: #000000;
+
+      &-time {
+        max-width: 70%;
+        margin: auto 0;
+        font-size: 14px;
+        color: rgb(102, 102, 102);
+      }
+
+      &-name {
+        max-width: 70%;
+        color: #000;
+      }
+
+      &-status {
+        max-width: 30%;
+        margin: auto 0 auto auto;
+        font-size: 12px;
+        color: #ffffff;
+        padding: 0 5px;
+        border-radius: 20px;
+        line-height: 20px;
+      }
+    }
+
+    &-row_wrap {
+      padding-right: 10px;
+      font-size: 13px;
+      flex-flow: row wrap;
+
+      &-view {
+        display: flex;
+        min-width: 50%;
+        > .iconfont {
+          font-size: 14px;
+          color: #909399;
+          margin-left: 5px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 1 - 0
src/permission.js

@@ -43,6 +43,7 @@ list.forEach((item) => {
         }
         return true;
       } else {
+
         if (checkWhite(to.url)) {
           return true;
         }