浏览代码

BUG修复/代码优化

fanghuisheng 1 年之前
父节点
当前提交
f823b2bc77

+ 0 - 7
src/pages.json

@@ -406,13 +406,6 @@
             "enablePullDownRefresh": false
           }
         },
-        {
-          "path": "informationSelect-test/index",
-          "style": {
-            "navigationBarTitleText": "信息查询",
-            "enablePullDownRefresh": false
-          }
-        },
         //信息查询 结束
         //设备管理 开始
         {

+ 2 - 0
src/pages/business/fireIot/facilitiesGather/index.vue

@@ -357,6 +357,7 @@ function handleSubmit(type) {
       .validate()
       .then((res) => {
         uni.$u.toast("校验通过");
+        proxy.$modal.loading("加载中");
 
         param = {
           facilityType: form.value.facilityType,
@@ -382,6 +383,7 @@ function handleSubmit(type) {
 
         add(param).then((requset) => {
           if (requset.status === "SUCCESS") {
+            proxy.$modal.closeLoading();
             proxy.$tab.reLaunch(`/pages/common/success/index?codeName=提交成功&showNow=${false}`);
           }
         });

+ 17 - 11
src/pages/business/fireIot/repairManage/repairDetails.vue

@@ -113,14 +113,6 @@ const dataList = ref([
     title: "报修地址",
     value: "",
   },
-  {
-    title: "评分",
-    value: 0,
-  },
-  {
-    title: "评分内容",
-    value: "",
-  },
 ]);
 
 const repairCode = ref("");
@@ -150,14 +142,28 @@ function selectListApi() {
       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;
+      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;
-      dataList.value[6].value = requset.data.records[0].score ? requset.data.records[0].score : 0;
-      dataList.value[7].value = requset.data.records[0].appraiseContent;
+
+      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;
     }
   });

+ 0 - 681
src/pages/business/mhxf/informationSelect-test/index.vue

@@ -1,681 +0,0 @@
-<template>
-  <u-sticky class="shadow-default" bgColor="#fff">
-    <u-tabs :list="list" :current="current" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }"></u-tabs>
-  </u-sticky>
-
-  <oa-touch class="bg-white informationSelect" @change="touchChange">
-    <template #content>
-      <uni-swipe-action>
-        <uni-swipe-action-item>
-          <!-- 各类查询 start -->
-          <view class="tableType3">
-            <u-input style="margin-bottom: 10px" v-model="dataInput" :placeholder="placeholderText" @blur="blur" shape="circle" prefixIcon="search" prefixIconStyle="color: #0c7bf9"> </u-input>
-            <u-empty v-if="!dataRes" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-            <view v-if="current == 8">
-              <view class="con">
-                <view class="time">{{ newTime }}</view>
-                <video src="https://mbsvod.oss-cn-beijing.aliyuncs.com/cy-video.mp4" autoplay :controls="false" :show-center-play-btn="false" :loop="true" style="width: 100%"></video>
-              </view>
-            </view>
-            <view v-else>
-              <u-row v-for="po in classifyData" :key="po">
-                <u-col span="4">
-                  <view style="text-align: right; padding: 0px 5px 0px 5px">{{ po.title }}</view>
-                </u-col>
-                <u-col span="8">
-                  <view style="text-align: left; padding: 0px 5px 0px 5px">{{ po.value }}</view>
-                </u-col>
-              </u-row>
-            </view>
-          </view>
-          <!-- 各类查询 end -->
-        </uni-swipe-action-item>
-      </uni-swipe-action>
-    </template>
-  </oa-touch>
-</template>
-
-<script setup>
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance } from "vue";
-import { publicStores, useStores } from "@/store/modules/index";
-
-import { dataList } from "@/api/business/mhxf/informationSelect";
-
-const publicStore = publicStores(); //全局公共Stores
-
-const { proxy } = getCurrentInstance();
-
-const dataInput = ref("");
-const current = ref(0);
-const classifyUrl = ref("");
-const classifyCode = ref("");
-const placeholderText = ref("");
-const dataRes = ref(1);
-
-const list = ref([
-  {
-    id: 1,
-    name: "警情查询",
-  },
-  {
-    id: 2,
-    name: "火灾查询",
-  },
-  {
-    id: 3,
-    name: "人员查询",
-    badge: {
-      // isDot: true,
-      // value: 5,
-    },
-  },
-  {
-    id: 4,
-    name: "车辆查询",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 5,
-    name: "站点查询",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 6,
-    name: "消火栓",
-    badge: {
-      // value: 5,
-    },
-  },
-
-  {
-    id: 7,
-    name: "重点单位",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 8,
-    name: "消防检查信息",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 9,
-    name: "视频监控",
-    badge: {
-      // value: 5,
-    },
-  },
-]);
-
-/**
- * @滑动change事件
- */
-function touchChange(e) {
-  if (e == "右滑") {
-    if (current.value >= 1) {
-      current.value--;
-    } else {
-      current.value = list.value.length - 1;
-    }
-  } else if (e == "左滑") {
-    if (current.value < list.value.length - 1) {
-      current.value++;
-    } else {
-      current.value = 0;
-    }
-  }
-}
-
-function blur(e) {
-  if (dataInput.value) {
-    goSearch();
-  }
-}
-
-/**
- * @tabs点击事件
- */
-function tabsClick(e) {
-  current.value = e.index;
-  console.log(current.value);
-  dataInput.value = "";
-  dataRes.value = 1;
-}
-
-function goSearch() {
-  if (current.value == 0) {
-    //警情查询
-    classifyUrl.value = "/service-fire/demPoliceInfo/page";
-    placeholderText.value = "请输入案件编号";
-    classifySearch(classifyUrl.value, {
-      caseCode: dataInput.value,
-    });
-  } else if (current.value == 1) {
-    //火灾查询
-    placeholderText.value = "请输入火灾地址";
-    classifyUrl.value = "/service-fire/demFireStatisticsAttach/page";
-    classifySearch(classifyUrl.value, {
-      address: dataInput.value,
-    });
-  } else if (current.value == 2) {
-    //人员查询
-    placeholderText.value = "请输入值班人员名称";
-    classifyUrl.value = "/service-fire/unitBeOnDuty/list";
-    classifySearch(classifyUrl.value, {
-      name: dataInput.value,
-    });
-  } else if (current.value == 3) {
-    //车辆信息
-    placeholderText.value = "请输入车牌号";
-    classifyUrl.value = "/service-fire/unitBeOnDuty/vehiclelist";
-    classifySearch(classifyUrl.value, {
-      licensePlate: dataInput.value,
-    });
-  } else if (current.value == 4) {
-    //站点查询
-    placeholderText.value = "请输入站点名称";
-    classifyUrl.value = "/service-fire/unitBeOnDuty/page";
-    classifySearch(classifyUrl.value, {
-      stationName: dataInput.value,
-    });
-  } else if (current.value == 5) {
-    //消火栓
-    placeholderText.value = "请输入水源名称";
-    classifyUrl.value = "/service-fire/demWaterSource/waterSourceList";
-    classifySearch(classifyUrl.value, {
-      waterName: dataInput.value,
-    });
-  } else if (current.value == 6) {
-    //重点单位
-    placeholderText.value = "请输入单位名称";
-    classifyUrl.value = "/service-fire/baseCompany/companyList";
-    classifySearch(classifyUrl.value, {
-      companyName: dataInput.value,
-    });
-  } else if (current.value == 7) {
-    //消防检查信息
-    placeholderText.value = "请输入单位ID";
-    classifyUrl.value = "/service-fire/demFireInspect/fireInspectList";
-    classifySearch(classifyUrl.value, {
-      companyId: dataInput.value,
-    });
-  } else if (current.value == 8) {
-    //消防检查信息
-    placeholderText.value = "";
-    // classifyUrl.value = "/service-fire/demFireInspect/fireInspectList";
-    // classifySearch(classifyUrl.value, {
-    //   companyId: dataInput.value,
-    // });
-  }
-}
-
-//分类信息查询 start
-async function classifySearch(URL, params) {
-  proxy.$modal.loading("加载中");
-  classifyData.value = [];
-  dataList(URL, params).then((res) => {
-    proxy.$modal.closeLoading();
-    if (res.status == "SUCCESS") {
-      if (current.value == 2) {
-        if (res.data.length) {
-          dataRes.value = 1;
-        } else {
-          dataRes.value = 0;
-        }
-        var records = res.data[0][0];
-      } else if (current.value == 3) {
-        if (res.data.length) {
-          dataRes.value = 1;
-        } else {
-          dataRes.value = 0;
-        }
-
-        var records = res.data[0];
-      } else {
-        //  console.log('111111111')
-        // console.log(res.data.records.length)
-        //  console.log('111222')
-        if (res.data.total) {
-          dataRes.value = 1;
-        } else {
-          dataRes.value = 0;
-        }
-        var records = res.data.records[0];
-      }
-
-      console.log(dataRes.value + "------1");
-
-      switch (current.value) {
-        case 0: //警情查询
-          var classifyTitle = [
-            "案件编号",
-            "主管支队",
-            "案件时间段",
-            "通知到场时间",
-            "通知出水时间",
-            "通知控制时间",
-            "通知熄火时间",
-            "通知返队时间",
-            "区域",
-            "案件类型",
-            "案发地址",
-            "立案时间",
-            "立案日期",
-            "处置对象",
-            "案件等级",
-            "主管中队",
-            "区县",
-            "案件状态",
-            "案件性质",
-            "填表时间",
-            "街镇",
-            "创建时间",
-          ];
-          var classifyValue = [
-            records.caseCode,
-            records.branch,
-            records.timeSlot,
-            records.noticeArrivalTime,
-            records.noticeEffluentTime,
-            records.controlTime,
-            records.quenchTime,
-            records.returnTime,
-            records.caseArea,
-            records.caseTypeCode,
-            records.address,
-            records.filingTime,
-            records.filingDate,
-            records.handleObject,
-            records.caseLevel,
-            records.squadron,
-            records.district,
-            records.caseStatus,
-            records.caseNature,
-            records.bdpAudit,
-            records.streetTown,
-            records.createTime,
-          ];
-          break;
-        case 1: //火灾查询
-          var classifyTitle = [
-            "地区",
-            "街镇",
-            "经度",
-            "维度",
-            "平台ID",
-            "火灾地址",
-            "过火面积",
-            "直接财产损失",
-            "死亡人数",
-            "受伤人数",
-            "受灾户数",
-            "火灾原因",
-            "火灾等级",
-            "场所一级",
-            "场所二级",
-            "起火物一级",
-            "起火物二级",
-            "性质",
-          ];
-          var classifyValue = [
-            records.district,
-            records.street,
-            records.longitude,
-            records.latitude,
-            records.id,
-            records.address,
-            records.burnedArea,
-            records.propertyLoss,
-            records.deathToll,
-            records.nonFatal,
-            records.disasterHome,
-            records.fireCause,
-            records.fireLevel,
-            records.placeOne,
-            records.placeTwo,
-            records.fireGoodsOne,
-            records.fireGoodsTwo,
-            records.nature,
-          ];
-          break;
-        case 2: //人员查询
-          var classifyTitle = ["值班人员信息", "岗位名称", "机构名称", "机构简称", "机构地址", "值班日期"];
-          var classifyValue = [records.name, records.postName, records.organizationName, records.organizationShort, records.organizationAddress, records.time];
-          break;
-        case 3: //车辆查询
-          var classifyTitle = [
-            "车辆信息",
-            "单件装备编码",
-            "装备名称",
-            "装备编码",
-            "上级装备编码",
-            "所属消防机构",
-            "车牌号码",
-            "资产编号",
-            "商标",
-            "颜色",
-            "生产厂家名称",
-            "有效期至",
-            "车架号",
-            "发动机编号",
-            "批次号",
-            "电台呼号",
-            "车辆简称",
-            "电台频道",
-            "指挥员姓名",
-            "驾驶员",
-          ];
-          var classifyValue = [
-            records.vehicleId,
-            records.singleEquipCode,
-            records.equipName,
-            records.equipCode,
-            records.superiorEquipCode,
-            records.fireOrga,
-            records.licensePlate,
-            records.assetCode,
-            records.assetCode,
-            records.colour,
-            records.productName,
-            records.validityTime,
-            records.frameCode,
-            records.engineCode,
-            records.batchCode,
-            records.radioCallSign,
-            records.vehicleAbbreviat,
-            records.radioChannel,
-            records.commanderName,
-            records.driver,
-          ];
-          break;
-        case 4: //站点查询
-          var classifyTitle = [
-            "平台ID",
-            "支队名称",
-            "所属辖区中队",
-            "消防站名称",
-            "单位性质",
-            "地址",
-            "所在位置",
-            "联动固定电话",
-            "负责人姓名",
-            "负责人手机号码",
-            "备注",
-            "消防站类型",
-            "经度",
-            "维度",
-            "创建时间",
-            "更新时间",
-            "支队id",
-            "中队id",
-            "编号",
-            "原单位性质",
-          ];
-          var classifyValue = [
-            records.id,
-            records.branchName,
-            records.squadron,
-            records.stationName,
-            records.companyNature,
-            records.address,
-            records.location,
-            records.fixedPhone,
-            records.chargeName,
-            records.chargePhone,
-            records.remark,
-            records.stationType,
-            records.longitude,
-            records.dimension,
-            records.createTime,
-            records.updateTime,
-            records.branchId,
-            records.squadronId,
-            records.number,
-            records.primaryCompanyNature,
-          ];
-          break;
-        case 5: //消火栓
-          var classifyTitle = [
-            "可用状态名称",
-            "消防站简介",
-            "水源地址",
-            "建造时间",
-            "消火栓接口形式",
-            "水源类型",
-            "管辖机构名称",
-            "取水形式",
-            "联系方式",
-            "可用状态",
-            "水源性质",
-            "水源名称",
-            "管网单位",
-            "管网压力",
-          ];
-          var classifyValue = [
-            records.availableStatusName,
-            records.fireAbbreviat,
-            records.waterAddress,
-            records.buildTime,
-            records.hydrantInterface,
-            records.waterType,
-            records.organizateName,
-            records.waterForm,
-            records.contactMode,
-            records.availableStatus,
-            records.waterNature,
-            records.waterName,
-            records.pipeCompany,
-            records.pipePressure,
-          ];
-          break;
-        case 6: //重点单位
-          var classifyTitle = [
-            "单位联系电话",
-            "单位详细地址",
-            "职工人数",
-            "单位类型",
-            "消防安全责任人姓名",
-            "法人代表姓名",
-            "单位名称",
-            "消防安全管理人姓名",
-            "单位主属性",
-            "建筑面积",
-            "行政区域",
-            "单位成立时间",
-            "占地面积",
-            "火灾危险性",
-            "创建时间",
-            "单位性质",
-            "固定资产(单位:万元)",
-          ];
-          var classifyValue = [
-            records.linkPhone,
-            records.address,
-            records.employeeNum,
-            records.companyType,
-            records.fireDutyName,
-            records.delegateName,
-            records.companyName,
-            records.fireManageName,
-            records.mainAttribute,
-            records.buildArea,
-            records.administrativeDivision,
-            records.foundTimecoverArea,
-            records.coverArea,
-            records.fireHazard,
-            records.createTime,
-            records.companyNature,
-            records.fixedAssets,
-          ];
-          break;
-        case 7: //消防检查信息
-          var classifyTitle = ["单位ID", "检查人员ID", "计划生成时间", "检查结果", "创建人", "创建时间", "检查员名称", "检查员职位", "单位电话"];
-          var classifyValue = [
-            records.companyId,
-            records.personId,
-            records.planTime,
-            records.inspectResult,
-            records.creator,
-            records.createTime,
-            records.personName,
-            records.personPosition,
-            records.linkPhone,
-          ];
-          break;
-        // default:
-        //    默认代码块
-      }
-
-      for (var i = 0; i < classifyTitle.length; i++) {
-        var obj = {};
-        obj.title = classifyTitle[i];
-        obj.value = classifyValue[i];
-        classifyData.value.push(obj);
-
-        // console.log(classifyData.value);
-      }
-    } else {
-    }
-  });
-}
-// end
-
-watchEffect(() => {
-  goSearch();
-});
-
-// start
-
-const newTime = ref("");
-function getNowTime() {
-  var date = new Date();
-  var time =
-    addZero(date.getFullYear()) +
-    "-" +
-    addZero(date.getMonth() + 1) +
-    "-" +
-    addZero(date.getDate()) +
-    " " +
-    addZero(date.getHours()) +
-    ":" +
-    addZero(date.getMinutes()) +
-    ":" +
-    addZero(date.getSeconds());
-  newTime.value = time;
-}
-//根据自己的需求,看要不要在时间不大于10的时候在前面补0,如果需要直接addZero(date.getMinutes()),其它与之相同,如果不需要删掉addZero()方法即可。
-//小于10的拼接上0字符串
-function addZero(s) {
-  return s < 10 ? "0" + s : s;
-}
-
-// end
-
-// 自定义导航事件
-onNavigationBarButtonTap((e) => {
-  if (e.float == "right") {
-    uni.navigateTo({
-      url: "/pages/business/mhxf/xunJian/collect/components/collectRecord",
-    });
-  } else {
-  }
-});
-
-onLoad((options) => {
-  getNowTime(); //进入页面调用该方法获取当前时间
-  clearInterval(myTimeDisplay); //销毁之前定时器
-  var myTimeDisplay = setInterval(() => {
-    getNowTime(); //每秒更新一次时间
-  }, 1000);
-});
-
-onReady(() => {});
-
-onMounted(() => {});
-</script>
-
-<style lang="scss">
-.uni-swipe {
-  overflow: visible;
-}
-body {
-  background: #fff;
-}
-.is-selected {
-  color: #1989fa;
-}
-
-.informationSelect {
-  height: calc(100vh - 88px);
-  background-color: #ffffff;
-  .content {
-    padding: 10px;
-    .u-row {
-      height: 36px;
-      line-height: 36px;
-      .u-col {
-        border: 1px #e4e3e3 solid;
-        border-right: 0px;
-        border-bottom: 0px;
-        text-align: center;
-
-        view {
-          padding: 0 10px;
-          min-height: 36px;
-          overflow: hidden; //超出的文本隐藏
-          // text-overflow: ellipsis; //溢出用省略号显示
-          overflow: auto;
-          white-space: nowrap; // 默认不换行;
-          font-size: 14px;
-        }
-      }
-
-      .u-col:last-child {
-        border-right: 1px #e4e3e3 solid;
-      }
-    }
-
-    .u-row:last-child {
-      .u-col {
-        border-bottom: 1px #e4e3e3 solid;
-      }
-    }
-  }
-}
-</style>
-
-<style scoped>
-body,
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
-
-.time {
-  position: absolute;
-  z-index: 99999;
-  top: 3px;
-  left: 3px;
-  display: inline-block;
-  color: #fff;
-}
-.con {
-  text-align: center;
-  position: relative;
-}
-.bg-white {
-  background-color: #ffffff;
-}
-body {
-  background: #fff;
-}
-</style>

+ 11 - 22
src/pages/business/mhxf/informationSelect/index.vue

@@ -12,22 +12,18 @@
             <view class="tableType3">
               <u-input class="block mb10" v-model="dataInput" :placeholder="placeholderText" @blur="blur" shape="circle" prefixIcon="search" prefixIconStyle="color: #0c7bf9"> </u-input>
               <u-empty v-if="!dataRes" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-              <view v-if="current == 8">
-                <view class="con">
-                  <view class="time">{{ newTime }}</view>
-                  <video src="http://file.usky.cn/statics/video/20230203.mp4" autoplay :controls="false" :show-center-play-btn="false" :loop="true" style="width: 100%"></video>
-                </view>
-              </view>
-              <view v-else>
-                <u-row v-for="po in classifyData" :key="po">
-                  <u-col span="4">
-                    <view style="text-align: right; padding: 0px 5px 0px 5px">{{ po.title }}</view>
-                  </u-col>
-                  <u-col span="8">
-                    <view style="text-align: left; padding: 0px 5px 0px 5px">{{ po.value }}</view>
-                  </u-col>
-                </u-row>
+              <view class="con" v-if="current == 8">
+                <view class="time">{{ newTime }}</view>
+                <video src="http://file.usky.cn/statics/video/20230203.mp4" autoplay :controls="false" :show-center-play-btn="false" :loop="true" style="width: 100%"></video>
               </view>
+              <u-row v-for="po in classifyData" :key="po" v-else>
+                <u-col span="4">
+                  <view style="text-align: right; padding: 0px 5px 0px 5px">{{ po.title }}</view>
+                </u-col>
+                <u-col span="8">
+                  <view style="text-align: left; padding: 0px 5px 0px 5px">{{ po.value }}</view>
+                </u-col>
+              </u-row>
             </view>
             <!-- 各类查询 end -->
           </uni-swipe-action-item>
@@ -242,9 +238,6 @@ async function classifySearch(URL, params) {
 
         var records = res.data[0];
       } else {
-        //  console.log('111111111')
-        // console.log(res.data.records.length)
-        //  console.log('111222')
         if (res.data.total) {
           dataRes.value = 1;
         } else {
@@ -253,8 +246,6 @@ async function classifySearch(URL, params) {
         var records = res.data.records[0];
       }
 
-      console.log(dataRes.value + "------1");
-
       switch (current.value) {
         case 0: //警情查询
           var classifyTitle = [
@@ -541,8 +532,6 @@ async function classifySearch(URL, params) {
         obj.title = classifyTitle[i];
         obj.value = classifyValue[i];
         classifyData.value.push(obj);
-
-        // console.log(classifyData.value);
       }
     } else {
     }

+ 1 - 1
src/pages/business/mhxf/xunJian/collect/components/collectDetail.vue

@@ -31,7 +31,7 @@ import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRef
 import { publicStores, xunJianStores } from "@/store/modules/index";
 
 const publicStore = publicStores(); //全局公共Store
-const xunJianStore = xunJianStore(); //全局变量值Store
+const xunJianStore = xunJianStores(); //全局变量值Store
 
 const { proxy } = getCurrentInstance();
 

+ 1 - 0
src/pages/business/mhxf/xunJian/collect/index.vue

@@ -73,6 +73,7 @@ const scanArray = ref([]);
 const scanBool = ref(false);
 function scanClick() {
   uni.scanCode({
+    autoZoom: false,
     success: (e) => {
       uni.showToast({
         title: "扫码成功",

+ 1 - 0
src/pages/business/mhxf/xunJian/plan/components/report.vue

@@ -120,6 +120,7 @@ const scanArray = ref([]);
 const scanBool = ref(false);
 async function scanClick() {
   uni.scanCode({
+    autoZoom: false,
     success: async (e) => {
       uni.showToast({
         title: "扫码成功",

+ 1 - 0
src/pages/business/mhxf/xunJian/plan/index.vue

@@ -189,6 +189,7 @@ const scanArray = ref([]);
 const scanBool = ref(false);
 function scanClick() {
   uni.scanCode({
+    autoZoom: false,
     success: async (e) => {
       uni.showToast({
         title: "扫码成功",

+ 3 - 1
src/pages/common/invoicing/index.vue

@@ -308,7 +308,7 @@ function handleSubmit(value) {
     .validate()
     .then((res) => {
       uni.$u.toast("校验通过");
-
+      proxy.$modal.loading("加载中");
       page({
         current: 1,
         size: 10,
@@ -317,6 +317,8 @@ function handleSubmit(value) {
         endTime: publicStore.formatterDateTime(new Date()),
       }).then((requset) => {
         if (requset.status === "SUCCESS") {
+          proxy.$modal.closeLoading();
+
           if (requset.data.records.length > 0) {
             promptStatus.value = true;
             scrollIntoView.value = "noticeBar";

+ 2 - 0
src/pages/common/repairReport/index.vue

@@ -180,8 +180,10 @@ function handleSubmit(value) {
     .validate()
     .then((res) => {
       uni.$u.toast("校验通过");
+      proxy.$modal.loading("加载中");
       add(form.value).then((requset) => {
         if (requset.status === "SUCCESS") {
+          proxy.$modal.closeLoading();
           proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
           form.value = {
             projectName: "", //项目名称

+ 1 - 0
src/pages/index.vue

@@ -224,6 +224,7 @@ function scanCode() {
 
   //#ifdef APP-PLUS
   uni.scanCode({
+    autoZoom: false,
     scanType: ["qrCode"],
     success: (res) => {
       let list = JSON.parse(res.result);

+ 1 - 0
src/pages/serveConfig.vue

@@ -60,6 +60,7 @@ const { linkUrl, port, content, index } = toRefs(dataList);
  */
 function scanClick() {
   uni.scanCode({
+    autoZoom: false,
     success: async (e) => {
       uni.showToast({
         title: "扫码成功",

+ 1 - 0
src/pages/serveConfigSelect.vue

@@ -110,6 +110,7 @@ function editRadio(index) {
 function serveClick(type) {
   if (type == 1) {
     uni.scanCode({
+      autoZoom: false,
       success: async (e) => {
         uni.showToast({
           title: "扫码成功",

+ 10 - 15
src/store/modules/public.js

@@ -1,6 +1,6 @@
 import { defineStore } from "pinia";
 
-const publicStore = defineStore("public", {
+const publicStore = defineStore("common", {
   state: () => ({
     mapBool: 1, //1.高德 2.测绘院
     streetTownList: [
@@ -150,18 +150,13 @@ const publicStore = defineStore("public", {
     },//设施采集页面-数据存储
   }),
   persist: {
-    // 自定义数据持久化方式
-    enabled: true,
-    // key: 'public-key', //指定key进行存储,此时非key的值不会持久化,刷新就会丢失
-    strategies: [
-      // 指定存储的位置以及存储的变量都有哪些,该属性可以不写,
-      //在不写的情况下,默认存储到 sessionStorage 里面,默认存储 state 里面的所有数据。
-      {
-        storage: window ? window.localStorage : uni.setStorageSync(),
-        // paths: ["count"]
-      },
-      // paths 是一个数组,如果写了 就会只存储 count 变量,当然也可以写多个。
-    ],
+    storage: window ? window.localStorage : uni.setStorageSync(), // 指定换成地址
+    beforeRestore: (context) => {
+      // console.log("Before" + context);
+    },
+    afterRestore: (context) => {
+      // console.log("After" + context);
+    },
   },
   actions: {
     getDate() {
@@ -210,8 +205,8 @@ const publicStore = defineStore("public", {
     },
 
     /**
-   * @获取当前日期前一年的日期
-   */
+     * @获取当前日期前一年的日期
+     */
     getYearLast(dateStr) {
       // 假设要获取的日期为dateStr,格式为"YYYY-MM-DD"
       let date = new Date(dateStr);

+ 2 - 2
src/store/modules/setting.js

@@ -23,10 +23,10 @@ const settingStore = defineStore("setting", {
     persist: {
         storage: window ? window.localStorage : uni.setStorageSync(), // 指定换成地址
         beforeRestore: (context) => {
-            console.log("Before" + context);
+            // console.log("Before" + context);
         },
         afterRestore: (context) => {
-            console.log("After" + context);
+            // console.log("After" + context);
         },
     },
     actions: {

+ 2 - 2
src/store/modules/user.js

@@ -38,10 +38,10 @@ const useStores = defineStore("useStores", {
     storage: window ? window.localStorage : uni.setStorageSync(), // 指定换成地址
     // paths: ['nested.data'],// 指定需要持久化的state的路径名称
     beforeRestore: (context) => {
-      console.log("Before" + context);
+      // console.log("Before" + context);
     },
     afterRestore: (context) => {
-      console.log("After" + context);
+      // console.log("After" + context);
     },
   },
   actions: {

+ 2 - 2
src/store/modules/xunJian.js

@@ -18,10 +18,10 @@ const xunJianStore = defineStore("xunJian", {
     storage: window ? window.localStorage : uni.setStorageSync(), // 指定换成地址
     // paths: ['nested.data'],// 指定需要持久化的state的路径名称
     beforeRestore: (context) => {
-      console.log("Before" + context);
+      // console.log("Before" + context);
     },
     afterRestore: (context) => {
-      console.log("After" + context);
+      // console.log("After" + context);
     },
   },
   actions: {},