浏览代码

事件上报处置对接

13127578837 10 月之前
父节点
当前提交
fba140b0de

+ 8 - 1
src/pages.json

@@ -405,7 +405,14 @@
         {
           "path": "xunJian/error/errorListDetail",
           "style": {
-            "navigationBarTitleText": "处置详情",
+            "navigationBarTitleText": "事件详情",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "xunJian/error/errorDisposition",
+          "style": {
+            "navigationBarTitleText": "处置内容",
             "enablePullDownRefresh": false
           }
         },

+ 108 - 0
src/pages/business/zhaf/xunJian/error/errorDisposition.vue

@@ -0,0 +1,108 @@
+<template>
+  <scroll-view id="exception" class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
+    <u--form ref="uForm" :model="form" :rules="rules" labelWidth="90">
+      <view style="padding: 10px 10px 20px 20px; background: #ffffff">
+        <u-form-item label="事件名称" prop="eventName" required :borderBottom="true">
+          <view style="color: #666666">{{ form.eventName }}</view>
+        </u-form-item>
+        <u-form-item label="处置图片"  :borderBottom="true">
+          <oa-upload :uploadCount="5" :uploadList="form.imageList" :uploadListSrc="'url'" @uploadSuccessChange="uploadSuccessChange" @uploadDeleteChange="uploadDeleteChange"></oa-upload>
+        </u-form-item>
+        <u-form-item label="备注" prop="remark" :borderBottom="true">
+          <u--textarea v-model="form.handleContent" placeholder="备注信息,最多可输入50个字" :count="true" border="none" maxlength="50"></u--textarea>
+        </u-form-item>
+      </view>
+    </u--form>
+
+    <view class="app-button">
+      <view class="app-button-padding"></view>
+      <view class="app-button-fixed">
+        <u-button class="app-buttom" type="primary" @click="handleSubmit()" shape="circle"> 提交 </u-button>
+      </view>
+    </view>
+  </scroll-view>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow } from "@dcloudio/uni-app";
+import {  reactive, toRefs, getCurrentInstance } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { errorApi } from "@/api/business/zhaf/xunJian/index.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  form: {
+    eventName: "", //事件名称
+    imageList: [],
+    handleImage:"",
+    handleContent: "",
+    id:undefined
+  },
+});
+
+const { form } = toRefs(state);
+
+/**
+ * @按钮点击事件
+ */
+function handleSubmit() {
+  var param = {
+    eventName: state.form.id, //事件名称
+    handleImage: JSON.stringify(state.form.imageList),
+    handleContent: state.form.handleContent,
+    id:state.form.id
+  };
+  errorApi()
+    .Update(param)
+    .then(() => {
+      uni.showToast({
+        title: "提交成功",
+      });
+      uni.navigateTo({
+        url: "/pages/business/zhaf/xunJian/error/errorList",
+      });
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
+}
+
+/**
+ * @图片上传成功回调
+ */
+function uploadSuccessChange(e) {
+  state.form.imageList.push({
+    name: e.name,
+    url: e.url,
+  });
+}
+
+/**
+ * @图片删除回调
+ */
+function uploadDeleteChange(e) {
+  state.form.imageList = e;
+}
+
+onLoad((options) => {
+  state.form.id = options.id;
+  state.form.eventName = options.eventName;
+});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+</script>
+
+<style lang="scss">
+#exception {
+  :deep(.u-picker__view__column__item) {
+    font-size: 13px;
+  }
+}
+</style>

+ 143 - 163
src/pages/business/zhaf/xunJian/error/errorList.vue

@@ -1,178 +1,158 @@
 <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="fastMail-container scroll-height"
-      :pageSize="pageSize"
-      :total="total"
-      :refresherLoad="true"
-      :refresherEnabled="true"
-      :refresherDefaultStyle="'none'"
-      :refresherThreshold="44"
-      :refresherBackground="'#f5f6f7'"
-      @load="load"
-      @refresh="refresh"
-      :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
-    >
-      <view v-show="tabsCurrent == 1">
-        <view class="content-area menu-list mlr0" v-for="data in dataList" :key="data">
-          <view class="list-cell" style="color: #666666; line-height: 30px" @click="toDetail(data)">
-            <view class="content-area-row_wrap menu-item">
-              <view class="content-area-row_wrap-view " style="margin-right: auto">
-                {{ data.eventName }}
-              </view>
-              <view class="content-area-row_wrap-view flexend">{{ data.createTime ? data.createTime.replace("T", " ") : "" }}</view>
-              <view class="content-area-row_wrap-view ">{{ proxy.$common.mapping("label", "value", data.eventType, patrol_event_type) }} </view>
+  <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="fastMail-container scroll-height"
+    :pageSize="pageSize"
+    :total="total"
+    :refresherLoad="true"
+    :refresherEnabled="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @load="load"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <view v-show="tabsCurrent == 1 || tabsCurrent == 0">
+      <view class="content-area menu-list mlr0" v-for="data in dataList" :key="data">
+        <view class="list-cell" style="color: #666666; line-height: 30px" @click="toDetail(data)">
+          <view class="content-area-row_wrap menu-item">
+            <view class="content-area-row_wrap-view " style="margin-right: auto">
+              {{ data.eventName }}
             </view>
+            <view class="content-area-row_wrap-view flexend">{{ data.createTime ? data.createTime.replace("T", " ") : "" }}</view>
+            <view class="content-area-row_wrap-view ">{{ proxy.$common.mapping("label", "value", data.eventType, patrol_event_type) }} </view>
           </view>
         </view>
       </view>
-  
-      <view v-show="tabsCurrent == 0">
-        <view class="content-area menu-list mlr0" v-for="data in dataList" :key="data">
-          <view class="list-cell" style="color: #666666; line-height: 30px" @click="toDetail(data)">
-            <view class="content-area-row_wrap menu-item">
-              <view class="content-area-row_wrap-view " style="margin-right: auto">
-                {{ data.eventName }}
-              </view>
-              <view class="content-area-row_wrap-view flexend">{{ data.createTime ? data.createTime.replace("T", " ") : "" }}</view>
-              <view class="content-area-row_wrap-view ">{{ proxy.$common.mapping("label", "value", data.eventType, patrol_event_type) }} </view>
-            </view>
-          </view>
-        </view>
-      </view>
-    </oa-scroll>
-  </template>
-  
-  <script setup>
-  import config from "@/config";
-  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 { pageQuery } from "@/api/business/fastMail.js";
-  import { errorApi } from "@/api/business/zhaf/xunJian";
-  const { proxy } = getCurrentInstance();
-  const { patrol_event_classify, patrol_event_grade, patrol_event_type } = proxy.useDict("patrol_event_classify", "patrol_event_grade", "patrol_event_type");
-  const dataList = ref([]);
-  const pageSize = ref(20);
-  const current = ref(1);
-  const total = ref(0);
-  
-  const data = reactive({
-    tabsList: [{ name: "已完成事件" }, { name: "未完成事件" }],
-    tabsCurrent: 1,
-  });
-  
-  const { tabsList, tabsCurrent } = toRefs(data);
-  
-  /**
-   * @页面初始化
-   */
-  function init() {
-    pageQueryApi();
-  }
-  
-  function pageQueryApi() {
-    errorApi().Select({
-      pageNum: current.value,
-      pageSize: pageSize.value,
-      handleStatus:tabsCurrent.value,
-    }).then((res) => {
-      if (res.data.records.length > 0) {
-        dataList.value = res.data.records;
-        total.value = res.data.total;
-      }
-    });
-  }
-  
-  /**
-   * @复制粘贴板
-   */
-  function toDetail(row) {
-    uni.navigateTo({
-      url: "/pages/business/zhaf/xunJian/error/errorListDetail?id=" + row.id,
-    });
-  }
-  
-  /**
-   * @tabs点击事件
-   */
-  function tabsClick(e) {
-    tabsCurrent.value = e.index;
-    pageQueryApi();
-  }
-  
-  /**
-   * @scrollView加载数据
-   */
-  function load() {
-    pageSize.value += 10;
-    init();
-  }
-  
-  /**
-   * @scrollView刷新数据
-   */
-  function refresh() {
-    pageSize.value = 20;
-    init();
-  }
-  
-  onLoad((options) => {
-    init();
-  });
-  
-  onReady(() => {});
-  
-  onShow(() => {
-    //调用系统主题颜色
-    proxy.$settingStore.systemThemeColor([1]);
+    </view>
+  </oa-scroll>
+</template>
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive,  getCurrentInstance, toRefs } from "vue";
+import { errorApi } from "@/api/business/zhaf/xunJian";
+const { proxy } = getCurrentInstance();
+const { patrol_event_classify, patrol_event_grade, patrol_event_type } = proxy.useDict("patrol_event_classify", "patrol_event_grade", "patrol_event_type");
+const dataList = ref([]);
+const pageSize = ref(20);
+const current = ref(1);
+const total = ref(0);
+
+const data = reactive({
+  tabsList: [{ name: "未完成事件" }, { name: "已完成事件" }],
+  tabsCurrent: 0,
+});
+
+const { tabsList, tabsCurrent } = toRefs(data);
+
+/**
+  * @页面初始化
+  */
+function init() {
+  pageQueryApi();
+}
+
+function pageQueryApi() {
+  errorApi().Select({
+    pageNum: current.value,
+    pageSize: pageSize.value,
+    handleStatus:tabsCurrent.value,
+  }).then((res) => {
+      dataList.value = res.data.records;
+      total.value = res.data.total;
   });
-  
-  // 自定义导航事件
-  onNavigationBarButtonTap((e) => {
-    if (e.float == "right") {
-    }
+}
+
+/**
+  * @复制粘贴板
+  */
+function toDetail(row) {
+  uni.navigateTo({
+    url: "/pages/business/zhaf/xunJian/error/errorListDetail?id=" + row.id,
   });
-  </script>
-  
-  <style lang="scss" scoped>
-  :deep(.uni-page-head__title) {
-    opacity: 1 !important;
+}
+
+/**
+  * @tabs点击事件
+  */
+function tabsClick(e) {
+  tabsCurrent.value = e.index;
+  pageQueryApi();
+}
+
+/**
+  * @scrollView加载数据
+  */
+function load() {
+  pageSize.value += 10;
+  init();
+}
+
+/**
+  * @scrollView刷新数据
+  */
+function refresh() {
+  pageSize.value = 20;
+  init();
+}
+
+onLoad((options) => {
+  init();
+});
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  if (e.float == "right") {
   }
-  
-  .fastMail-container {
-    .content-area {
-      &-top {
-        font-size: 16px;
-        font-weight: 600;
-        color: #000000;
-      }
-  
-      &-row_wrap {
-        font-size: 13px;
-        flex-flow: row wrap;
-  
-        &-view {
-          min-width: 50%;
-          white-space: nowrap;
-          overflow: hidden;
-          text-overflow: ellipsis;
-          > .iconfont {
-            font-size: 14px;
-            color: #909399;
-            margin-left: 5px;
-          }
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.uni-page-head__title) {
+  opacity: 1 !important;
+}
+
+.fastMail-container {
+  .content-area {
+    &-top {
+      font-size: 16px;
+      font-weight: 600;
+      color: #000000;
+    }
+
+    &-row_wrap {
+      font-size: 13px;
+      flex-flow: row wrap;
+
+      &-view {
+        min-width: 50%;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        > .iconfont {
+          font-size: 14px;
+          color: #909399;
+          margin-left: 5px;
         }
       }
     }
   }
+}
 .flexend{
-  flex: 1;
-  display: block;
-  text-align: right;
+flex: 1;
+display: block;
+text-align: right;
 }
-  </style>
+</style>
   

+ 92 - 90
src/pages/business/zhaf/xunJian/error/errorListDetail.vue

@@ -1,127 +1,129 @@
 <template>
-    <oa-scroll
-      customClass="invoicing-container scroll-height"
-      :customStyle="{}"
-      :refresherLoad="false"
-      :refresherEnabled="false"
-      :refresherDefaultStyle="'none'"
-      :refresherThreshold="44"
-      :refresherBackground="'#f5f6f7'"
-      :scrollIntoView="scrollIntoView"
-      :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
-    >
-      <view>
-        <view class="menu-list mt0 mlr0" style="padding: 0.625rem">
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">事件名称</view>
-              <view style="color: #666666">{{ dataList.eventName }}</view>
-            </view>
+  <oa-scroll
+    customClass="invoicing-container scroll-height"
+    :customStyle="{}"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :scrollIntoView="scrollIntoView"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <view>
+      <view class="menu-list mt0 mlr0" style="padding: 0.625rem">
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件名称</view>
+            <view style="color: #666666">{{ dataList.eventName }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">上报人</view>
-              <view style="color: #666666">{{ dataList.personnelName }}</view>
-            </view>
-          </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">事件类型</view>
-              <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventType, patrol_event_type) }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件上传图片</view>
+            <image style="width: 20px; height: 20px; margin: auto 15px auto 0"  v-if="dataList.eventImage && JSON.parse(dataList.eventImage)[0].url"
+            :src="JSON.parse(dataList.eventImage)[0].url ? JSON.parse(dataList.eventImage)[0].url : '/static/images/404.png'" mode="aspectFill"
+            @click="proxy.$common.imgEnlarge(2,JSON.parse(dataList.eventImage))"
+            ></image>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">事件等级</view>
-              <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventLevel, patrol_event_grade) }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">上报人</view>
+            <view style="color: #666666">{{ dataList.personnelName }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">事件分类</view>
-              <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.classify, patrol_event_classify) }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件类型</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventType, patrol_event_type) }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">事件类型</view>
-              <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventType, patrol_event_type) }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件等级</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventLevel, patrol_event_grade) }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">处置状态</view>
-              <view style="color: #666666">{{ dataList.handleStatus == 0 ? '未处置' : dataList.handleStatus == 1 ? '已处置' :  '' }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件分类</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventCategory, patrol_event_classify) }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">事件分类</view>
-              <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.classify, patrol_event_classify) }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件类型</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventType, patrol_event_type) }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">设备Id</view>
-              <view style="color: #666666">{{ dataList.deviceId }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">处置状态</view>
+            <view :style="{color: dataList.handleStatus == 0 ? 'red' : '#666666'}">{{ dataList.handleStatus == 0 ? '未处置' : dataList.handleStatus == 1 ? '已处置' :  '' }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">处置人</view>
-              <view style="color: #666666">{{ dataList.handleName }}</view>
-            </view>
+        </view>
+        <view class="list-cell" v-if="dataList.handleStatus == 1">
+          <view class="menu-item">
+            <view style="width: 90px">处置人</view>
+            <view style="color: #666666">{{ dataList.handleName }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">处置时间</view>
-              <view style="color: #666666"> {{ dataList.handleTime ? dataList.handleTime.replace("T", " ") : "" }}</view>
-            </view>
+        </view>
+        <view class="list-cell" v-if="dataList.handleStatus == 1">
+          <view class="menu-item">
+            <view style="width: 90px">处置时间</view>
+            <view style="color: #666666"> {{ dataList.handleTime ? dataList.handleTime.replace("T", " ") : "" }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">创建人</view>
-              <view style="color: #666666">{{ dataList.createBy }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">创建人</view>
+            <view style="color: #666666">{{ dataList.createBy }}</view>
           </view>
-          <view class="list-cell">
-            <view class="menu-item">
-              <view style="width: 90px">创建时间</view>
-              <view style="color: #666666">{{ dataList.createTime }}</view>
-            </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">创建时间</view>
+            <view style="color: #666666">{{ dataList.createTime }}</view>
           </view>
         </view>
       </view>
-    </oa-scroll>
-  </template>
-  
+      <view class="app-button" v-if="dataList.handleStatus == 0">
+        <view class="app-button-padding"></view>
+        <view class="app-button-fixed">
+          <u-button class="app-buttom" type="primary" @click="handleSubmit(dataList)" shape="circle"> 处置填报 </u-button>
+        </view>
+      </view>
+    </view>
+  </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 { errorApi } from "@/api/business/zhaf/xunJian";
 const { proxy } = getCurrentInstance();
 const { patrol_event_classify, patrol_event_grade, patrol_event_type } = proxy.useDict("patrol_event_classify", "patrol_event_grade", "patrol_event_type");
-const uForm = ref(null);
 const data = reactive({
-  tableData: {},
+  dataList: {},
   id:undefined,
   scrollIntoView: "",
 });
 
-const { tableData, id, scrollIntoView } = toRefs(data);
+const { dataList, id, scrollIntoView } = toRefs(data);
 function pageQueryApi() {
   errorApi().Select({
     pageNum: 1,
     pageSize: 1,
     id:id.value,
   }).then((res) => {
-    if (res.data.records.length > 0) {
-      dataList.value = res.data.records;
-      total.value = res.data.total;
-    }
+      dataList.value = res.data.records[0];
+  });
+}
+function handleSubmit(row){ 
+  uni.navigateTo({
+    url: "/pages/business/zhaf/xunJian/error/errorDisposition?id=" + row.id + "&eventName=" + row.eventName,
   });
 }
-
 onLoad((options) => {
   id.value = options.id
   pageQueryApi();

+ 0 - 184
src/pages/common/appMessage/index copy.vue

@@ -1,184 +0,0 @@
-<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="true"></u-tabs>
-  </u-sticky>
-
-  <scroll-view class="scroll-height" :scroll-y="true" :scroll-into-view="scrollIntoView" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
-    <view class="appMessage-container">
-      <view class="content-area" v-show="tabsCurrent == 0">
-        <u-empty v-show="allInfoList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-        <view :id="index == allInfoList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in allInfoList" :key="index" v-show="allInfoList.length > 0" @click="goContentDetails(all)">
-          <view class="content-area-time font12">{{ all.listTime }}</view>
-          <view class="content-area-center radius bg-white">
-            <view class="content-area-center-title">{{ all.typeTitle }}</view>
-            <view class="content-area-center-cont">{{ all.listTitle }}</view>
-            <view class="content-area-center-buttom font12">查看详情 </view>
-          </view>
-        </view>
-      </view>
-      <view class="content-area" v-show="tabsCurrent == 1">
-        <u-empty v-show="noticeList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-        <view :id="index == noticeList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in noticeList" :key="index" v-show="noticeList.length > 0" @click="goContentDetails(all)">
-          <view class="content-area-time font12">{{ all.listTime }}</view>
-          <view class="content-area-center radius bg-white">
-            <view class="content-area-center-title">{{ all.typeTitle }}</view>
-            <view class="content-area-center-cont">{{ all.listTitle }}</view>
-            <view class="content-area-center-buttom font12">查看详情 </view>
-          </view>
-        </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 { infoList } from "@/api/common/message.js";
-
-const useStore = useStores();
-const { proxy } = getCurrentInstance();
-
-const data = reactive({
-  scrollIntoView: "",
-
-  tabsList: [
-    {
-      name: "全部",
-    },
-    {
-      name: "通知公告",
-    },
-  ],
-  tabsCurrent: 0,
-
-  allInfoList: [],
-  noticeList: [],
-});
-
-const { scrollIntoView, scrollIntoViewBool, tabsList, tabsCurrent, allInfoList, noticeList } = toRefs(data);
-
-/**
- * @初始化
- */
-function init() {
-  infoListApi();
-}
-
-/**
- * @tabs点击事件
- */
-function tabsClick(e) {
-  tabsCurrent.value = e.index;
-}
-
-/**
- * @跳转
- */
-function goContentDetails(e) {
-  if (e.type == "通知公告") {
-    proxy.$tab.navigateTo(`/pages/common/textview/index1?title=${e.typeTitle}&content=${e.listContent}&contentTitle=${e.listTitle}`);
-  }
-}
-
-/**
- * @通知公告列表
- * @api接口调用
- */
-function infoListApi() {
-  proxy.$modal.loading("加载中");
-  infoList({
-    pageNum: 1,
-    pageSize: 20000,
-  }).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      requset.data.rows.forEach((el) => {
-        allInfoList.value.push({
-          type: "通知公告",
-          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
-          listTime: proxy.$common.jktTimes(el.createTime),
-          listCreateTime: el.createTime,
-          listTitle: el.noticeTitle,
-          listContent: el.noticeContent,
-        });
-
-        noticeList.value.push({
-          type: "通知公告",
-          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
-          listTime: proxy.$common.jktTimes(el.createTime),
-          listCreateTime: proxy.$common.jktTimes(el.createTime),
-          listTitle: el.noticeTitle,
-          listContent: el.noticeContent,
-        });
-      });
-
-      setTimeout(() => {
-        scrollIntoView.value = "bottomInfo";
-      }, 0);
-
-      setTimeout(() => {
-        proxy.$modal.closeLoading();
-      }, 100);
-    }
-  });
-}
-
-onLoad((options) => {
-  init();
-});
-
-onReady(() => {});
-
-onShow(() => {
-  //调用系统主题颜色
-  proxy.$settingStore.systemThemeColor([1]);
-});
-
-// 自定义导航事件
-onNavigationBarButtonTap((e) => {
-  if (e.float == "right") {
-    proxy.$tab.navigateTo("/pages/mine/setting/index");
-  }
-});
-</script>
-
-<style lang="scss" scoped>
-:deep(.uni-page-head__title) {
-  opacity: 1 !important;
-}
-
-.appMessage-container {
-  padding-bottom: 1px;
-
-  .content-area {
-    &-time {
-      padding: 10px 0;
-      text-align: center;
-      color: #909399;
-    }
-
-    &-center {
-      margin: 0 10px 20px 10px;
-      padding: 15px;
-      overflow: hidden;
-
-      &-title {
-        margin: 0 0 15px 0;
-        color: #909399;
-      }
-
-      &-cont {
-        font-weight: 600;
-        color: #000000;
-      }
-
-      &-buttom {
-        float: right;
-        color: #2a98ff;
-      }
-    }
-  }
-}
-</style>

+ 0 - 51
src/pages/common/textview/index1.vue

@@ -1,51 +0,0 @@
-<template>
-  <view class="view-text">
-    <!-- <u-parse class="uni-body view-content" :content="content"></u-parse> -->
-    <h3 style="text-align: center; line-height: 45px">{{ contentTitle }}</h3>
-    <view>{{ content }}</view>
-  </view>
-</template>
-
-<script setup>
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
-const useStore = useStores();
-
-const { proxy } = getCurrentInstance();
-
-const data = reactive({
-  title: "",
-  content: "",
-  contentTitle: "",
-});
-
-const { title, content, contentTitle } = toRefs(data);
-
-onLoad((options) => {
-  title.value = options.title;
-  content.value = options.content;
-  contentTitle.value = options.contentTitle;
-  uni.setNavigationBarTitle({
-    title: options.title,
-  });
-});
-
-onShow(() => {
-  //调用系统主题颜色
-  proxy.$settingStore.systemThemeColor([1]);
-});
-</script>
-
-<style lang="scss" scoped>
-.view-text {
-  padding: 5px;
-  .view-content {
-    font-size: 26rpx;
-    color: #333;
-    line-height: 24px;
-    word-wrap: break-word;
-  }
-}
-</style>

+ 0 - 161
src/pages/info copy.vue

@@ -1,161 +0,0 @@
-<template>
-  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
-    <template #left>
-      <view class="u-navbar__content__left__item">
-        <view class="u-navbar__content__left__item__title" style="color: #fff">消息</view>
-      </view>
-    </template>
-    <template #right>
-      <view class="u-navbar__content__right__item">
-        <text class="iconfont oaIcon-qingchu" @click="handleIconClick('清除')"></text>
-      </view>
-      <view class="u-navbar__content__right__item">
-        <text class="iconfont oaIcon-sousuo" @click="handleIconClick('搜索')"></text>
-      </view>
-      <view class="u-navbar__content__right__item">
-        <text class="iconfont oaIcon-jiahao" @click="handleIconClick('加号')"></text>
-      </view>
-    </template>
-  </u-navbar>
-
-  <scroll-view class="info-container bg-white" scroll-y :style="`height: calc(100vh - (50px + ${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))`">
-    <view class="content-area" v-for="item in infoList" :key="item" @tap="goAppMessage(item.path)">
-      <view class="content-area-avatar">
-        <image class="image-bg" :src="item.img" />
-      </view>
-      <view class="content-area-child">
-        <view class="uni-item mb5">
-          <view class="uni-item-text font14" style="color: #000000">{{ item.label }}</view>
-          <view class="uni-item-right font12" style="color: #909399">{{ item.time }}</view>
-        </view>
-        <view class="uni-item">
-          <view class="uni-item-text font12" style="color: #909399">{{ item.cont }}</view>
-          <view class="uni-item-right font12" style="margin: auto 0">
-            <u-badge numberType="overflow" max="99" :value="item.badge"></u-badge>
-          </view>
-        </view>
-      </view>
-    </view>
-  </scroll-view>
-
-  <oa-tabbar :tabbarValue="1"></oa-tabbar>
-</template>
-
-<script setup>
-/*----------------------------------依赖引入-----------------------------------*/
-import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-/*----------------------------------接口引入-----------------------------------*/
-import { getMceReceiveStatic, getDictList } from "@/api/mine/info.js";
-/*----------------------------------组件引入-----------------------------------*/
-/*----------------------------------store引入-----------------------------------*/
-import { stystemStores } from "@/store/modules/index";
-/*----------------------------------公共方法引入-----------------------------------*/
-/*----------------------------------公共变量-----------------------------------*/
-const { proxy } = getCurrentInstance();
-const stystemStore = stystemStores();
-/*----------------------------------变量声明-----------------------------------*/
-
-const data = reactive({
-  infoList: [
-    {
-      id: 1,
-      label: "应用消息",
-      img: "/static/images/common/appMessage.png",
-      time: "5月15日",
-      cont: "您收到一条最新消息,请及时查看",
-      badge: 1,
-      path: "/pages/common/appMessage/index",
-    },
-    // {
-    //   id: 2,
-    //   label: "消防知识库",
-    //   time: "5月15日",
-    //   cont: "您收到一条最新消息,请及时查看",
-    //   badge: 0,
-    // },
-    {
-      id: 3,
-      label: "告警通知",
-      img: "/static/images/common/alarmMessage.png",
-      time: "5月15日",
-      cont: "您收到一条最新消息,请及时查看",
-      badge: 0,
-      path: "/pages/common/alarmMessage/index",
-    },
-  ],
-});
-
-const { infoList } = toRefs(data);
-
-function init() {
-  getMceReceiveStatic().then((res) => {
-    stystemStore.infoList.messageCountData = res.data;
-    getDictList({
-      dictType: "sys_message_type",
-    }).then((res1) => {
-      stystemStore.infoList.messageTypeData = res1.data.rows;
-      res.data.infoTypeStatic.forEach((e) => {});
-    });
-  });
-}
-
-function goAppMessage(path) {
-  proxy.$tab.navigateTo(path);
-}
-
-function handleIconClick(type) {
-  if (type === "清除") {
-  } else if (type === "搜索") {
-    proxy.$tab.navigateTo("/pages/common/searchSelect/index");
-  } else if (type === "加号") {
-  }
-}
-
-onShow(() => {
-  init();
-});
-
-onLoad((options) => {
-  uni.hideTabBar(); //隐藏自带tabbar
-});
-</script>
-
-<style lang="scss" scoped>
-.info-container {
-  .content-area {
-    display: flex;
-    padding: 13px 13px 0 13px;
-
-    &-avatar {
-      display: flex;
-      margin: auto 20upx auto 0;
-      .image-bg {
-        width: 40px;
-        height: 40px;
-      }
-    }
-
-    &-child {
-      width: calc(100% - (32px + 0.625rem));
-      justify-content: center;
-      margin: auto;
-      .uni-item {
-        display: flex;
-        white-space: nowrap;
-
-        .uni-item-text {
-          margin-right: auto;
-          overflow: hidden;
-          text-overflow: ellipsis;
-        }
-
-        .uni-item-right {
-          width: auto;
-          text-align: right;
-        }
-      }
-    }
-  }
-}
-</style>

+ 1 - 1
src/pages/info.vue

@@ -75,7 +75,7 @@ const { infoList } = toRefs(data);
 function init() {
   getMceReceiveStatic().then((res) => {
     getDictList({
-      dictType: "sys_message_type",
+      dictType: "message_type",
     }).then((res1) => {
       let receiveStatic = { infoTypeStatic:res.data.infoTypeStatic ,total:res.data.notReadCount }
       let dictList = res1.data.rows

+ 2 - 2
src/pages/login.vue

@@ -143,8 +143,8 @@ function init() {
   useStore.GetWxOpenId(1); //调用获取微信公众号openId
 
   if (window.location.host) {
-    linkUrl.value = window.location.host;
-    // linkUrl.value = "172.16.120.165:13200";
+    // linkUrl.value = window.location.host;
+    linkUrl.value = "172.16.120.165:13200";
     // linkUrl.value = "localhost:81";
     useStore.GetMobileTenantConfig({ url: linkUrl.value });
   }

+ 0 - 72
src/pages/mine/msg/index copy.vue

@@ -1,72 +0,0 @@
-<template>
-  <view class="msg-container">
-    <view class="oa-header-section">
-      <view class="menu-list mt0 mlr0">
-        <view class="list-cell">
-          <view class="menu-item">
-            <view class="title" style="width: 100%">通知公告</view>
-            <u-switch v-model="state.switchList.noticeBulletin" size="20"></u-switch>
-          </view>
-        </view>
-        <view class="list-cell">
-          <view class="menu-item">
-            <view class="title" style="width: 100%">设备告警</view>
-            <u-switch v-model="state.switchList.deviceAlarm" size="20"></u-switch>
-          </view>
-        </view>
-        <view class="list-cell">
-          <view class="menu-item">
-            <view class="title" style="width: 100%">巡检系统</view>
-            <u-switch v-model="state.switchList.inspectionSystem" size="20"></u-switch>
-          </view>
-        </view>
-        <view class="list-cell">
-          <view class="menu-item">
-            <view class="title" style="width: 100%">会议系统</view>
-            <u-switch v-model="state.switchList.meetingNotice" size="20"></u-switch>
-          </view>
-        </view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import config from "@/config";
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-import { msgApi } from "@/api/mine";
-
-const useStore = useStores();
-const { proxy } = getCurrentInstance();
-
-const state = reactive({
-  switchList: {},
-});
-
-/**
- * @初始化
- */
-function init() {
-  msgApi()
-    .Select()
-    .then((res) => {
-      state.switchList = res.data.appMode;
-    });
-}
-
-onLoad(() => {
-  init();
-});
-
-onShow(() => {
-  //调用系统主题颜色
-  proxy.$settingStore.systemThemeColor([1]);
-});
-</script>
-
-<style lang="scss" scoped>
-.msg-container {
-}
-</style>

+ 1 - 1
src/pages/mine/msg/index.vue

@@ -31,7 +31,7 @@ const { id, modeList, modeType, dictList } = toRefs(state);
 function init() {
   getMceSettingInfo().then((res) => {
     getDictList({
-      dictType: "sys_message_type",
+      dictType: "message_type",
     }).then((res1) => {
       //#ifdef APP-PLUS
         modeList.value = res.data.appMode

+ 27 - 1
src/plugins/common.plugins.js

@@ -316,6 +316,32 @@ export default {
     visible = true;
     //#endif
     return visible;
+  },
+  /**
+   * 图片点击放大
+   * @param {*类型} type (1:string:图片地址  2:array(数组对象))
+   * @param {*数据} data
+   */
+  imgEnlarge(type,data){
+    let param = {}
+    if(type == 1){
+      param = {
+        urls:[data],
+        current: data
+      }
+    }
+    if(type == 2){
+      let arr = []
+      for(let i=0;i<data.length;i++){
+        arr.push(data[i].url)
+      }
+      param = {
+        urls:arr,
+        current: arr[0]
+      }
+    }
+    if(data && data.length > 0){
+      uni.previewImage(param)
+    }
   }
-
 };