Browse Source

Merge branch '165' of uskycloud/usky-web-mobile into master

xf15575941817 2 years ago
parent
commit
ab5cf3988d

+ 0 - 9
src/api/business/mhxf/xunJian/plan.js

@@ -45,15 +45,6 @@ export function appPlanStatistics(param) {
   });
 }
 
-// 图片上传
-export function uploadAvatar(data) {
-  return uploads({
-    url: "/service-file/upload",
-    name: data.name,
-    filePath: data.filePath,
-  });
-}
-
 /**
  * @站点详情
  * @siteList站点详情信息存储

+ 0 - 0
src/api/setting/building.js → src/api/business/zhxf/building/index.js


+ 0 - 0
src/api/setting/funReport.js → src/api/business/zhxf/funReport/index.js


+ 0 - 0
src/api/setting/index.js → src/api/business/zhxf/messagePush/index.js


+ 19 - 0
src/api/common/invoicing/index.js

@@ -0,0 +1,19 @@
+import { request } from "@/utils/request";
+
+//客户发票信息表-新增
+export function crmInvoiceInfo(param) {
+    return request({
+        url: "/service-iot/crmInvoiceInfo",
+        method: "POST",
+        data: param,
+    });
+}
+
+//客户发票信息表-分页
+export function page(param) {
+    return request({
+        url: "/service-iot/crmInvoiceInfo/page",
+        method: "POST",
+        data: param,
+    });
+}

+ 189 - 0
src/components/oa-upload/index.vue

@@ -0,0 +1,189 @@
+<template>
+  <!-- 图片上传数量等于1显示 -->
+  <view class="oa-upload" v-if="uploadCount == 1">
+    <view v-if="uploadImage" class="uploadView" :style="uploadStyle">
+      <view class="uploadUimage">
+        <u-image width="100%" height="100%" :src="uploadImage"></u-image>
+      </view>
+
+      <view v-if="!uploadCloseStatus" class="uploadViewClose" @click="uploadViewClose()">
+        <u-icon name="close" color="#ffffff" size="12"></u-icon>
+      </view>
+    </view>
+    <view v-if="!uploadImage" :class="uploadCloseStatus ? 'uploadView upload-buttom uploadDisabled' : 'uploadView upload-buttom'" :style="uploadStyle" @click="uploadClick()">
+      <u-icon style="margin: auto" name="plus" color="#909399" :size="uploadIconSize"></u-icon>
+    </view>
+  </view>
+
+  <!-- 图片上传数量大于1显示 -->
+  <view class="oa-upload" v-if="uploadCount > 1">
+    <view class="uploadView" :style="uploadStyle" v-for="up in uploadList" :key="up">
+      <view class="uploadUimage">
+        <u-image width="100%" height="100%" :src="up.url"></u-image>
+      </view>
+
+      <view v-if="!uploadCloseStatus" class="uploadViewClose" @click="uploadViewClose(up)">
+        <u-icon name="close" color="#ffffff" size="12"></u-icon>
+      </view>
+    </view>
+    <view :class="uploadCloseStatus ? 'uploadView upload-buttom uploadDisabled' : 'uploadView upload-buttom'" :style="uploadStyle" @click="uploadClick()">
+      <u-icon style="margin: auto" name="plus" color="#909399" :size="uploadIconSize"></u-icon>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { uploadAvatar } from "@/api/system/user.js";
+import { ref, toRefs } from "vue";
+
+const emit = defineEmits(["uploadSuccessChange", "uploadDeleteChange"]);
+
+const props = defineProps({
+  //图片路径(uploadCount为1时使用)
+  uploadImage: {
+    type: String,
+    default: "",
+  },
+  //图片集合(uploadCount大于1时使用)
+  uploadList: {
+    type: Object,
+    default: [],
+  },
+  //样式
+  uploadStyle: {
+    type: Object,
+    default: {
+      width: "80px",
+      height: "80px",
+      marginBottom: "0px",
+    },
+  },
+  //icon大小
+  uploadIconSize: {
+    type: String,
+    default: "20px",
+  },
+  //是否禁用
+  uploadCloseStatus: {
+    type: Boolean,
+    default: false,
+  },
+  //上传图片数量
+  uploadCount: {
+    type: Number,
+    default: 1,
+  },
+});
+
+const { uploadImage, uploadList, uploadStyle, uploadIconSize, uploadCloseStatus, uploadCount } = toRefs(props);
+
+/**
+ * @upload图片上传
+ * @点击事件
+ */
+function uploadClick() {
+  uni.chooseImage({
+    count: uploadCount.value, //默认9
+    sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+    sourceType: ["album", "camera"], //从相册选择、摄像头
+    success: function (res) {
+      uploadApi(res);
+    },
+  });
+}
+
+/**
+ * @upload图片上传
+ * @api接口请求
+ */
+function uploadApi(res) {
+  let data = { name: "file", filePath: res.tempFilePaths[0] };
+
+  uploadAvatar(data).then((response) => {
+    emit("uploadSuccessChange", response.data);
+  });
+}
+
+/**
+ * @upload图片上传
+ * @点击事件
+ * @删除事件
+ */
+function uploadViewClose(el) {
+  if (uploadCount.value > 1) {
+    emit("uploadDeleteChange", uploadList.value.splice(uploadList.value.indexOf(el), 1));
+  } else {
+    emit("uploadDeleteChange", "");
+  }
+}
+</script>
+
+<style scoped>
+.oa-upload {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.uploadView {
+  position: relative;
+  overflow: hidden;
+  width: calc(33% - 10px);
+  height: 110px;
+  margin: 0 15px 15px 0;
+  border: 1px solid #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+}
+
+.uploadView .uploadUimage {
+  height: 100%;
+}
+
+.uploadView .uploadUimage > uni-view {
+  height: 100%;
+}
+
+.uploadView .uploadViewClose {
+  position: absolute;
+  background-color: #409eff;
+  transform: rotate(45deg);
+  width: 40px;
+  height: 24px;
+  text-align: center;
+  right: -15px;
+  top: -6px;
+  cursor: pointer;
+}
+
+.uploadView .uploadViewClose .u-icon {
+  font-size: 12px;
+  margin-top: 4px;
+  margin-left: 10px;
+  transform: rotate(-45deg);
+  color: #ffffff;
+}
+
+.uploadView img {
+  width: 100%;
+}
+
+.uploadView:nth-child(3n) {
+  margin: 0 !important;
+}
+
+.upload-buttom {
+  display: flex;
+  font-size: 28px;
+  color: #909399;
+  border: 1px dashed #d9d9d9;
+  background-color: #fafafa;
+}
+
+.upload-buttom:hover {
+  border: 1px dashed #409eff;
+}
+
+:deep(.uploadDisabled) {
+  display: none !important;
+}
+</style>

+ 2 - 2
src/main.js

@@ -17,8 +17,7 @@ import oaCalendar from "@/components/oa-calendar/uni-calendar";
 import oaTabbar from "@/components/oa-tabbar/index";
 import oaTimeLine from "@/components/oa-timeLine/index"
 import oaTimeLineItem from "@/components/oa-timeLine-item/index"
-
-
+import oaUpload from "@/components/oa-upload/index"
 
 export function createApp() {
   const app = createSSRApp(App);
@@ -28,6 +27,7 @@ export function createApp() {
   app.component('oa-tabbar', oaTabbar)
   app.component('oa-timeLine', oaTimeLine)
   app.component('oa-timeLine-item', oaTimeLineItem)
+  app.component('oa-upload', oaUpload)
 
   // 挂载全局json导出
   app.component("downloadExcel", JsonExcel);

+ 7 - 0
src/pages.json

@@ -118,6 +118,13 @@
             "navigationBarTitleText": "",
             "enablePullDownRefresh": false
           }
+        },
+        {
+          "path": "invoicing/index",
+          "style": {
+            "navigationBarTitleText": "续费提醒",
+            "enablePullDownRefresh": false
+          }
         }
       ]
     },

+ 0 - 6
src/pages/business/fireIot/deviceSelect/components/deviceDetailsList.vue

@@ -98,12 +98,6 @@ onLoad((options) => {
   }
 });
 
-// 自定义导航事件
-onNavigationBarButtonTap((e) => {
-  if (e.float == "right") {
-  } else {
-  }
-});
 </script>
 
 <style lang="scss" scoped>

+ 212 - 194
src/pages/business/fireIot/facilitiesGather/index.vue

@@ -22,48 +22,35 @@
                     <u-radio v-for="se in sexList" :key="se" :activeColor="proxy.$settingStore.themeColor.color" :label="se.text" :name="se.value" style="margin-right: 15px"></u-radio>
                   </u-radio-group>
                 </u-form-item>
-                <u-form-item label="设施地址" prop="address" :borderBottom="true" @click="handleAction('设施地址')" required>
-                  <u-input v-model="form.address" placeholder="请选择设施地址" border="none" disabledColor="transparent" disabled>
+                <u-form-item label="设施地址" prop="address" :borderBottom="true" required>
+                  <u-input v-model="form.address" placeholder="请选择设施地址" border="none" disabledColor="transparent" disabled @click="handleAction('设施地址')">
                     <template #suffix>
                       <view class="iconfont ucicon-map menu-icon" style="font-size: 18px; color: #909399"> </view>
                     </template>
                   </u-input>
                 </u-form-item>
                 <u-form-item label="行政区划" prop="facilityAddress" :borderBottom="true" required>
-                  <view>
-                    <u-input v-model="form.address" placeholder="" border="none" disabledColor="transparent" disabled />
+                  <view style="width: 100%">
+                    <view style="font-size: 15px"> {{ form.address ? form.address.split(form.facilityAddress)[0] : "" }}</view>
                     <u-input v-model="form.facilityAddress" placeholder="请输入详细地址" border="none" />
                   </view>
                 </u-form-item>
-                <u-form-item v-if="!form.typeGuise == 1" label="类型" prop="gpsAreas" :borderBottom="true" @click="handleAction('类型')" required>
-                  <view>{{ form.typeGuise == 1 ? "点" : form.typeGuise == 2 ? "线" : form.typeGuise == 3 ? "面" : "" }}</view>
-                  <view v-if="!form.gpsAreas" style="margin: auto; color: #ff0000">未编辑</view>
-                  <view v-if="form.gpsAreas" style="margin: auto; color: #30bb00">已编辑</view>
+                <u-form-item v-if="form.typeGuise && form.typeGuise != 1" label="类型" prop="gpsAreas" :borderBottom="true" @click="handleAction('类型')" required>
+                  <view style="font-size: 15px">{{ form.typeGuise == 1 ? "点" : form.typeGuise == 2 ? "线" : form.typeGuise == 3 ? "面" : "" }}</view>
+                  <view v-if="form.gpsAreas.length <= 0" style="font-size: 15px; margin: auto; color: #ff0000">未编辑</view>
+                  <view v-if="form.gpsAreas.length > 0" style="font-size: 15px; margin: auto; color: #30bb00">已编辑</view>
                   <view class="iconfont ucicon-bianji1 menu-icon" style="font-size: 14px; color: #909399"> </view>
                 </u-form-item>
-                <u-form-item label="联系人" prop="contact" :borderBottom="true" required>
+                <u-form-item label="联系人" prop="contact" :borderBottom="true">
                   <u-input v-model="form.contact" placeholder="请输入联系人" border="none" />
                 </u-form-item>
-                <u-form-item label="联系电话" prop="contactPhone" required :borderBottom="true">
+                <u-form-item label="联系电话" prop="contactPhone" :borderBottom="true">
                   <u-input v-model="form.contactPhone" placeholder="请输入联系电话" border="none" maxlength="11" />
                 </u-form-item>
-                <u-form-item label="设备图片" prop="imagesUrl" required :borderBottom="true">
-                  <view class="flex flex-wrap">
-                    <view class="uploadView" style="width: 110px; margin-bottom: 0px" v-if="form.imagesUrl">
-                      <view class="uploadUimage">
-                        <u-image width="100%" height="100%" :src="form.imagesUrl"></u-image>
-                      </view>
-
-                      <view class="uploadViewClose" @click="uploadViewClose()">
-                        <u-icon name="close" color="#ffffff" size="12"></u-icon>
-                      </view>
-                    </view>
-                    <view :class="'uploadView upload-buttom'" style="width: 110px; margin-bottom: 0px" v-if="!form.imagesUrl" @click="uploadClick">
-                      <u-icon style="margin: auto" name="plus" color="#909399" size="28"></u-icon>
-                    </view>
-                  </view>
+                <u-form-item label="设备图片" prop="imagesUrl" :borderBottom="true">
+                  <oa-upload :uploadCount="1" :uploadImage="form.imagesUrl" @uploadSuccessChange="uploadSuccessChange" @uploadDeleteChange="uploadDeleteChange"></oa-upload>
                 </u-form-item>
-                <u-form-item label="备注" prop="facilityDesc" required :borderBottom="true">
+                <u-form-item label="备注" prop="facilityDesc" :borderBottom="true">
                   <u-textarea v-model="form.facilityDesc" placeholder="请输入" border="none" maxlength="30" style="padding: 0px"></u-textarea>
                 </u-form-item>
 
@@ -81,14 +68,24 @@
                     ></u-radio>
                   </u-radio-group>
 
-                  <uni-data-select v-if="fo.type === 'XLK'" v-model="fo.value" :placeholder="'请选择' + fo.name" :localdata="fo.list"></uni-data-select>
+                  <u-input
+                    v-if="fo.type === 'XLK'"
+                    v-model="fo.valueName"
+                    :placeholder="'请选择' + fo.name"
+                    suffixIcon="arrow-right"
+                    suffixIconStyle="color: #909399"
+                    border="none"
+                    disabledColor="transparent"
+                    disabled
+                    @click="handleAction('属性', fo)"
+                  />
                 </u-form-item>
               </view>
             </view>
           </view>
         </u--form>
 
-        <view style="padding-bottom: 140px"> </view>
+        <view style="padding-bottom: 100px"> </view>
 
         <view class="app-button-fixed">
           <view class="app-flex">
@@ -156,29 +153,7 @@ const dataList = reactive({
     },
   ],
 
-  form: {
-    department: "", //所属部门
-    facilityType: "", //设施类型
-    facilityTypeName: "", //设施类型名称
-    facilityName: "", //设施名称
-    status: "0", //设施状态
-    address: "", //设施地址
-    longitude: "", //经度
-    latitude: "", //纬度
-    province: "", //省
-    city: "", //市
-    area: "", //区(县)
-    facilityAddress: "", //详细地址
-    streetTown: null, //所属街镇
-    gpsAreas: "", //经纬度集合
-    contact: "", //联系人
-    contactPhone: "", //联系方式
-    imagesUrl: "", //图⽚地址URL
-    facilityDesc: "", //备注
-    extendData: [], //扩展属性
-    recordPictureList: [],
-    typeGuise: undefined, //点线面类型
-  },
+  form: publicStore.$state.facilitiesGatherArray,
 
   rules: {
     department: [
@@ -223,42 +198,42 @@ const dataList = reactive({
         trigger: ["blur", "change"],
       },
     ],
-    contact: [
-      {
-        required: true,
-        message: "请输入联系人",
-        trigger: ["blur", "change"],
-      },
-    ],
-    contactPhone: [
-      {
-        required: true,
-        message: "请输入联系人电话",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 11,
-        required: true,
-        message: "请输入正确11位联系人电话",
-        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-        trigger: ["blur", "change"],
-      },
-    ],
-    imagesUrl: [
-      {
-        required: true,
-        message: "请选择图片",
-        trigger: ["blur", "change"],
-      },
-    ],
-    facilityDesc: [
-      {
-        required: true,
-        message: "请输入备注",
-        trigger: ["blur", "change"],
-      },
-    ],
+    // contact: [
+    //   {
+    //     required: true,
+    //     message: "请输入联系人",
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
+    // contactPhone: [
+    //   {
+    //     required: true,
+    //     message: "请输入联系人电话",
+    //     trigger: ["blur", "change"],
+    //   },
+    //   {
+    //     type: "string",
+    //     min: 11,
+    //     required: true,
+    //     message: "请输入正确11位联系人电话",
+    //     pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
+    // imagesUrl: [
+    //   {
+    //     required: true,
+    //     message: "请选择图片",
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
+    // facilityDesc: [
+    //   {
+    //     required: true,
+    //     message: "请输入备注",
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
   },
 
   actionIndex: 0,
@@ -274,6 +249,110 @@ const { sexList, form, rules, actionIndex, actionIndex1, actionTitle, actionShow
 const uForm = ref(null);
 const successBool = ref(false);
 
+/**
+ * @初始化
+ */
+function init() {
+  typeSelect({ id: "" }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      requset.data.forEach((el) => {
+        typeSelectList.value[0].push({ name: el.typeName, value: el.id, typeGuise: el.typeGuise, dataField: el.dataField ? JSON.parse(el.dataField) : [] });
+      });
+    }
+  });
+
+  treeselect({}).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      requset.data.forEach((el) => {
+        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
+      });
+
+      var data = [
+        {
+          id: 124,
+          label: "公司",
+          children: [
+            {
+              id: 125,
+              label: "it",
+              children: [
+                {
+                  id: 126,
+                  label: "二组",
+                },
+              ],
+            },
+          ],
+        },
+        {
+          id: 124,
+          label: "公司",
+          children: [
+            {
+              id: 125,
+              label: "it1",
+              children: [
+                {
+                  id: 126,
+                  label: "1组",
+                },
+              ],
+            },
+          ],
+        },
+        {
+          id: 124,
+          label: "公司",
+          children: [
+            {
+              id: 125,
+              label: "it2",
+              children: [
+                {
+                  id: 126,
+                  label: "3组",
+                },
+              ],
+            },
+          ],
+        },
+      ];
+
+      data.forEach((el) => {
+        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
+      });
+    }
+  });
+}
+
+/**
+ * @清空数据
+ */
+function wipeData() {
+  form.value.department = ""; //所属部门
+  form.value.facilityType = ""; //设施类型
+  form.value.facilityTypeName = ""; //设施类型名称
+  form.value.facilityName = ""; //设施名称
+  form.value.status = "0"; //设施状态
+  form.value.address = ""; //设施地址
+  form.value.longitude = ""; //经度
+  form.value.latitude = ""; //纬度
+  form.value.province = ""; //省
+  form.value.city = ""; //市
+  form.value.area = ""; //区(县)
+  form.value.facilityAddress = ""; //详细地址
+  form.value.streetTown = null; //所属街镇
+  form.value.gpsAreas = []; //经纬度集合
+  form.value.contact = ""; //联系人
+  form.value.contactPhone = ""; //联系方式
+  form.value.imagesUrl = ""; //图⽚地址URL
+  form.value.facilityDesc = ""; //备注
+  form.value.extendData = []; //扩展属性
+  form.value.recordPictureList = [];
+  form.value.typeGuise = ""; //点线面类型
+  form.value.gpsAreas = [];
+}
+
 /**
  * @api提交
  */
@@ -315,13 +394,14 @@ function handleSubmit(type) {
       });
   } else {
     proxy.$tab.navigateBack();
+    wipeData();
   }
 }
 
 /**
  * @action弹出框点击事件
  */
-function handleAction(value, index, index1) {
+function handleAction(value, array) {
   actionsList.value = [[]];
 
   if (value == "所属部门") {
@@ -347,14 +427,33 @@ function handleAction(value, index, index1) {
   }
 
   if (value == "设施地址") {
+    publicStore.$state.facilitiesGatherType = "点";
     proxy.$tab.navigateTo("/pages/business/fireIot/facilitiesGather/mapGather");
     return;
   }
 
   if (value == "类型") {
+    if (form.value.typeGuise === 2) {
+      publicStore.$state.facilitiesGatherType = "线";
+    } else if (form.value.typeGuise === 3) {
+      publicStore.$state.facilitiesGatherType = "面";
+    }
+    proxy.$tab.navigateTo("/pages/business/fireIot/facilitiesGather/mapGather");
+
     return;
   }
 
+  if (value == "属性") {
+    actionTitle.value = array.name;
+    actionsList.value = [array.list];
+
+    array.list.forEach((el, ind) => {
+      if (el.value === array.value) {
+        actionDefaultIndex.value = ind;
+      }
+    });
+  }
+
   actionShow.value = true;
 }
 
@@ -365,6 +464,8 @@ function selectAction(e) {
   console.log(e);
 
   if (actionTitle.value == "设施类型") {
+    wipeData();
+
     form.value.facilityType = e.value[0].value;
     form.value.facilityTypeName = e.value[0].name;
     form.value.typeGuise = e.value[0].typeGuise;
@@ -373,11 +474,12 @@ function selectAction(e) {
       form.value.extendData = e.value[0].dataField;
 
       form.value.extendData.forEach((el) => {
+        el.valueName = "";
         if (el.type === "XLK") {
           if (el.list) {
             el.list.forEach((e) => {
+              e.name = e.attributeValue;
               e.value = e.attributeCode;
-              e.text = e.attributeValue;
             });
           }
         }
@@ -387,6 +489,15 @@ function selectAction(e) {
     }
   }
 
+  if (actionTitle.value.indexOf("属性") != -1) {
+    form.value.extendData.forEach((el) => {
+      if (el.type === "XLK") {
+        el.valueName = e.value[0].name;
+        el.value = e.value[0].value;
+      }
+    });
+  }
+
   // if (actionTitle.value == "灭火器") {
   //   form.value.baseBuildList[actionIndex.value].baseBuildExtinguishList[actionIndex1.value].extinguishType = e.value[0].name;
   //   form.value.baseBuildList[actionIndex.value].baseBuildExtinguishList[actionIndex1.value].extinguishTypeValue = e.value[0].value;
@@ -410,125 +521,32 @@ function changeHandler(e) {
   } = e;
   // 当第一列值发生变化时,变化第二列(后一列)对应的选项
 
-  console.log(columnIndex, index);
+  if (actionTitle.value == "所属部门") {
+    console.log(columnIndex, index);
 
-  if (columnIndex === 0) {
-    // picker为选择器this实例,变化第二列对应的选项
-    picker.setColumnValues(1, columnData[index]);
+    if (columnIndex === 0) {
+      // picker为选择器this实例,变化第二列对应的选项
+      picker.setColumnValues(1, columnData[index]);
+    }
   }
 }
 
 /**
- * @upload图片上传
- * @点击事件
- */
-function uploadClick() {
-  uni.chooseImage({
-    count: 1, //默认9
-    sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
-    sourceType: ["album", "camera"], //从相册选择、摄像头
-    success: function (res) {
-      uploadApi(res);
-    },
-  });
-}
-
-/**
- * @upload图片上传
- * @api接口请求
+ * @图片上传成功回调
  */
-function uploadApi(res) {
-  let data = { name: "file", filePath: res.tempFilePaths[0] };
-
-  uploadAvatar(data).then((response) => {
-    form.value.imagesUrl = response.data.url;
-  });
+function uploadSuccessChange(e) {
+  form.value.imagesUrl = e.url;
 }
 
 /**
- * @upload图片上传
- * @点击事件
- * @删除事件
+ * @图片删除回调
  */
-function uploadViewClose(el) {
+function uploadDeleteChange(e) {
   form.value.imagesUrl = "";
 }
 
 onLoad((options) => {
-  form.value.baseBuildList = [];
-  rules.value.baseBuildList = [];
-
-  typeSelect({ id: "" }).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      requset.data.forEach((el) => {
-        typeSelectList.value[0].push({ name: el.typeName, value: el.id, typeGuise: el.typeGuise, dataField: el.dataField ? JSON.parse(el.dataField) : [] });
-      });
-    }
-  });
-
-  treeselect({}).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      console.log(requset.data);
-      requset.data.forEach((el) => {
-        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
-      });
-
-      var data = [
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it",
-              children: [
-                {
-                  id: 126,
-                  label: "二组",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it1",
-              children: [
-                {
-                  id: 126,
-                  label: "1组",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it2",
-              children: [
-                {
-                  id: 126,
-                  label: "3组",
-                },
-              ],
-            },
-          ],
-        },
-      ];
-
-      data.forEach((el) => {
-        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
-      });
-    }
-  });
+  init();
 });
 
 onShow(() => {

+ 5 - 3
src/pages/business/fireIot/facilitiesView/index.vue

@@ -51,9 +51,11 @@ const dataList = ref([]);
 function init() {
   baseFacilityType().then((requset) => {
     if (requset.status === "SUCCESS") {
-      dataList.value = requset.data[0].baseGgpFacilityTypeNumVO;
-      typeNum.value = requset.data[0].typeNum;
-      facilityNum.value = requset.data[0].facilityNum;
+      if (requset.data.length > 0) {
+        dataList.value = requset.data[0].baseGgpFacilityTypeNumVO;
+        typeNum.value = requset.data[0].typeNum;
+        facilityNum.value = requset.data[0].facilityNum;
+      }
     }
   });
 }

+ 21 - 45
src/pages/business/mhxf/xunJian/plan/components/siteDetails.vue

@@ -20,20 +20,17 @@
       <view class="bg-white padding-15 margin-b-15">
         <uni-section class="block margin-b-10" title="上报现场" type="line"></uni-section>
 
-        <view class="flex flex-wrap">
-          <view class="uploadView" v-for="record in siteList.recordPictureList" :key="record">
-            <view class="uploadUimage">
-              <u-image width="100%" height="100%" :src="record.pictureUrl"></u-image>
-            </view>
-
-            <view v-if="siteList.inspectionStatus == 1" class="uploadViewClose" @click="uploadViewClose(record)">
-              <u-icon name="close" color="#ffffff" size="12"></u-icon>
-            </view>
-          </view>
-          <view :class="siteList.inspectionStatus == 2 ? 'uploadView upload-buttom uploadDisabled' : 'uploadView upload-buttom'" @click="uploadClick">
-            <u-icon style="margin: auto" name="plus" color="#909399" size="28"></u-icon>
-          </view>
-        </view>
+        <oa-upload
+          :uploadCount="9"
+          :uploadList="siteList.recordPictureList"
+          :uploadStyle="{
+            width: 'calc(33% - 10px)',
+            height: '110px',
+          }"
+          :uploadCloseStatus="siteList.inspectionStatus == 2"
+          @uploadSuccessChange="uploadSuccessChange"
+          @uploadDeleteChange="uploadDeleteChange"
+        ></oa-upload>
       </view>
 
       <view class="bg-white padding-15 margin-b-15" style="height: 170px; max-height: 170px">
@@ -67,7 +64,7 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
 import { publicStores, xunJianStores } from "@/store/modules/index";
 
-import { uploadAvatar, siteDetails } from "@/api/business/mhxf/xunJian/plan.js";
+import { siteDetails } from "@/api/business/mhxf/xunJian/plan.js";
 
 const xunJianStore = xunJianStores(); //全局变量值Store
 
@@ -118,42 +115,21 @@ function buttonClick() {
 }
 
 /**
- * @upload图片上传
- * @点击事件
- */
-function uploadClick() {
-  uni.chooseImage({
-    count: 1, //默认9
-    sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
-    sourceType: ["album", "camera"], //从相册选择、摄像头
-    success: function (res) {
-      uploadApi(res);
-    },
-  });
-}
-
-/**
- * @upload图片上传
- * @api接口请求
+ * @图片上传成功回调
  */
-function uploadApi(res) {
-  let data = { name: "file", filePath: res.tempFilePaths[0] };
-
-  uploadAvatar(data).then((response) => {
-    siteList.value.recordPictureList.push({
-      name: response.data.name,
-      pictureUrl: response.data.url,
-    });
+function uploadSuccessChange(e) {
+  siteList.value.recordPictureList.push({
+    name: e.name,
+    url: e.url,
+    pictureUrl: e.url,
   });
 }
 
 /**
- * @upload图片上传
- * @点击事件
- * @删除事件
+ * @图片删除回调
  */
-function uploadViewClose(el) {
-  siteList.value.recordPictureList.splice(siteList.value.recordPictureList.indexOf(el), 1);
+function uploadDeleteChange(e) {
+  siteList.value.recordPictureList = e;
 }
 
 onLoad((options) => {

+ 1 - 1
src/pages/business/zhxf/building/index.vue

@@ -100,7 +100,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
 import { publicStores, useStores } from "@/store/modules/index";
 
-import { getBuildingManagement } from "@/api/setting/building.js";
+import { getBuildingManagement } from "@/api/business/zhxf/building/index.js";
 
 const useStore = useStores();
 

+ 1 - 1
src/pages/business/zhxf/funReport/funcAdd/index.vue

@@ -51,7 +51,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onReachBottom, onNavigationB
 import { ref, onMounted, inject, shallowRef, reactive, toRefs, watchEffect, getCurrentInstance, watch } from "vue";
 import { publicStores, useStores } from "@/store/modules/index";
 
-import { del, index } from "@/api/setting/funReport.js";
+import { del, index } from "@/api/business/zhxf/funReport/index.js";
 
 const useStore = useStores();
 

+ 1 - 1
src/pages/business/zhxf/funReport/index.vue

@@ -70,7 +70,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onReachBottom, onNavigationB
 import { ref, onMounted, inject, shallowRef, reactive, toRefs, watchEffect, getCurrentInstance } from "vue";
 import { publicStores, useStores } from "@/store/modules/index";
 
-import { del, index } from "@/api/setting/funReport.js";
+import { del, index } from "@/api/business/zhxf/funReport/index.js";
 
 const useStore = useStores();
 

+ 1 - 1
src/pages/business/zhxf/messagePush/index.vue

@@ -22,7 +22,7 @@ import { onLoad, onShow, onHide, onLaunch, onReady } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
 import { publicStores, useStores } from "@/store/modules/index";
 
-import { setperm } from "@/api/setting/index.js";
+import { setperm } from "@/api/business/zhxf/messagePush/index.js";
 
 const useStore = useStores();
 

+ 405 - 0
src/pages/common/invoicing/index.vue

@@ -0,0 +1,405 @@
+<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>
+
+  <scroll-view class="invoicing-container scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
+    <view v-show="tabsCurrent == 0">
+      <u-notice-bar v-if="promptStatus" text="注:查询到您近期有开票记录,请勿重复开票" :duration="9000" color="#FF0000" bgColor="#FFFFFF"></u-notice-bar>
+
+      <view class="menu-list" style="font-size: 15px; line-height: 30px">
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view>
+              您的物联网服务
+              <span style="color: red">即将到期</span>
+              ,如需续费请联系您的专职销售顾问,如已付费可直接填写开票信息。
+            </view>
+          </view>
+        </view>
+        <view class="list-cell" style="color: #666666">
+          <view class="menu-item-box">
+            <view> 客户经理:李鹏 </view>
+          </view>
+          <view class="menu-item-box">
+            <view> 联系方式:18621761642(同微信) </view>
+            <view class="iconfont ucicon-a-copy menu-icon" style="font-size: 14px; color: #909399" @click="copy('18621761642')"> </view>
+          </view>
+          <view class="menu-item-box">
+            <view style="margin-right: 10px"> 邮箱:seven.li@chinausky.com </view>
+            <view class="iconfont ucicon-a-copy menu-icon" style="font-size: 14px; color: #909399" @click="copy('seven.li@chinausky.com')"> </view>
+          </view>
+          <view class="menu-item-box">
+            <view> 客服电话:021-65376655</view>
+          </view>
+          <view class="menu-item-box">
+            <view> 公司邮箱:admin@chinausky.com</view>
+          </view>
+        </view>
+      </view>
+
+      <view class="menu-list" style="font-size: 15px">
+        <view class="list-cell" style="color: #666666">
+          <view class="menu-item-box">
+            <view>开票信息</view>
+          </view>
+
+          <u--form :model="form" ref="uForm" :rules="rules" labelWidth="80">
+            <view style="padding: 10px 0 10px 0; background: #ffffff">
+              <view style="padding-left: 9px">
+                <u-form-item label="发票抬头" prop="invoiceTitle" :borderBottom="true" required>
+                  <u-input v-model="form.invoiceTitle" placeholder="请填写发票抬头" border="none" />
+                </u-form-item>
+                <u-form-item label="税号" prop="dutyId" :borderBottom="true" required>
+                  <u-input v-model="form.dutyId" placeholder="请填写税号" border="none" maxlength="18" />
+                </u-form-item>
+                <u-form-item label="电子邮箱" prop="email" :borderBottom="true" required>
+                  <u-input v-model="form.email" placeholder="请填写电子邮箱" border="none" />
+                </u-form-item>
+                <u-form-item label="申请人" prop="applicant" :borderBottom="true" required>
+                  <u-input v-model="form.applicant" placeholder="请填写申请人" border="none" maxlength="10" />
+                </u-form-item>
+                <u-form-item label="手机号" prop="phone" :borderBottom="true" required>
+                  <u-input v-model="form.phone" placeholder="请填写手机号" border="none" maxlength="11" />
+                </u-form-item>
+                <u-form-item label="金额" prop="amount" :borderBottom="true" required>
+                  <u-input type="number" v-model="form.amount" placeholder="请填写金额" border="none" />
+                </u-form-item>
+                <u-form-item label="发票类型" prop="invoiceType" :borderBottom="true" required>
+                  <u-radio-group v-model="form.invoiceType" placement="row">
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="1" label="普票" style="margin-right: 15px"></u-radio>
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="2" label="专票"></u-radio>
+                  </u-radio-group>
+                </u-form-item>
+                <u-form-item label="发票性质" prop="invoiceAttribute" :borderBottom="true" required>
+                  <u-radio-group v-model="form.invoiceAttribute" placement="row">
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="1" label="电子发票" style="margin-right: 15px"></u-radio>
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="2" label="纸质发票"></u-radio>
+                  </u-radio-group>
+                </u-form-item>
+                <u-form-item v-if="form.invoiceAttribute == 2" label="邮寄地址" prop="sendAddress" :borderBottom="true" required>
+                  <u-input v-model="form.sendAddress" placeholder="请填写邮寄地址" border="none" />
+                </u-form-item>
+                <u-form-item label="付款回执" prop="paymentReceipt" :borderBottom="true">
+                  <oa-upload :uploadCount="1" :uploadImage="form.paymentReceipt" @uploadSuccessChange="uploadSuccessChange" @uploadDeleteChange="uploadDeleteChange"></oa-upload>
+                  <view style="color: #666666">图片支持png、jpg</view>
+
+                  <!-- <view>
+                    <u-input placeholder="点击上传" border="none" maxlength="10" disabledColor="transparent" disabled>
+                      <template #prefix>
+                        <view
+                          class="iconfont ucicon-a-shangchuan menu-icon"
+                          :style="{
+                            fontSize: '14px',
+                            color: proxy.$settingStore.themeColor.color,
+                          }"
+                        >
+                        </view>
+                      </template>
+                    </u-input>
+
+                    <view style="color: #666666">请上传付款回执图片,支持png、jpg</view>
+                  </view> -->
+                </u-form-item>
+              </view>
+            </view>
+          </u--form>
+        </view>
+      </view>
+
+      <view style="padding-bottom: 105px"> </view>
+
+      <view class="app-button-fixed">
+        <u-button class="app-buttom" type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
+      </view>
+    </view>
+
+    <view v-show="tabsCurrent == 1">
+      <view class="menu-list margin-t-0 margin-lr-0" style="padding: 0.625rem">
+        <view class="list-cell">
+          <view class="menu-item-box" style="justify-content: center; margin-bottom: 15px; font-size: 15px">
+            <view>对公转账</view>
+          </view>
+          <view class="menu-item-box">
+            <view style="width: 90px">企业全称</view>
+            <view style="color: #666666">上海永天科技股份有限公司</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view style="width: 90px">银行账户</view>
+            <view style="color: #666666">16523652265865685</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view style="width: 90px">开户行</view>
+            <view style="color: #666666">上海银行徐家汇支行</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view style="width: 90px">转账备注</view>
+            <view style="color: #666666">打款时请备注付款公司名称等信息</view>
+          </view>
+        </view>
+
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <u-button style="width: auto" @click="copy(`上海永天科技股份有限公司\n16523652265865685\n上海银行徐家汇支行`)" shape="circle"> 复制汇款信息 </u-button>
+          </view>
+        </view>
+      </view>
+    </view>
+  </scroll-view>
+</template>
+
+<script setup>
+import config from "@/config";
+import storage from "@/utils/storage";
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { publicStores, useStores } from "@/store/modules/index";
+
+import { crmInvoiceInfo, page } from "@/api/common/invoicing/index";
+
+const { proxy } = getCurrentInstance();
+const publicStore = publicStores();
+
+const uForm = ref(null);
+const data = reactive({
+  tabsList: [
+    {
+      name: "开票申请",
+    },
+    {
+      name: "汇款信息",
+    },
+  ],
+  tabsCurrent: 0,
+
+  form: {
+    customId: "", //客户管理id
+    invoiceTitle: "", //发票抬头
+    dutyId: "", //税号
+    email: "", //电子邮箱
+    applicant: "", //申请人
+    phone: "", //手机号码
+    amount: "", //金额
+    invoiceType: "1", //发票类型;1:普票,2:专票
+    invoiceAttribute: "1", //发票性质;1:电子发票,2:纸质发票
+    sendAddress: "", //邮寄地址
+    paymentReceipt: "", //付款回执
+  },
+
+  rules: {
+    invoiceTitle: [
+      {
+        required: true,
+        message: "请填写发票抬头",
+        trigger: ["blur", "change"],
+      },
+    ],
+    dutyId: [
+      {
+        required: true,
+        message: "请填写税号",
+        trigger: ["blur", "change"],
+      },
+      {
+        type: "string",
+        min: 18,
+        required: true,
+        message: "请填写18位税号",
+        trigger: ["change"],
+      },
+    ],
+    email: [
+      {
+        required: true,
+        message: "请填写电子邮箱",
+        trigger: ["blur", "change"],
+      },
+      {
+        type: "string",
+        min: 11,
+        required: true,
+        message: "请填写正确的邮箱格式",
+        pattern: /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/,
+        trigger: ["blur", "change"],
+      },
+    ],
+    applicant: [
+      {
+        required: true,
+        message: "请填写申请人",
+        trigger: ["blur", "change"],
+      },
+    ],
+    phone: [
+      {
+        required: true,
+        message: "请填写手机号",
+        trigger: ["blur", "change"],
+      },
+      {
+        type: "string",
+        min: 11,
+        required: true,
+        message: "请填写正确11位手机号",
+        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+        trigger: ["blur", "change"],
+      },
+    ],
+    amount: [
+      {
+        required: true,
+        message: "请填写金额",
+        trigger: ["blur", "change"],
+      },
+    ],
+    invoiceType: [
+      {
+        required: true,
+        message: "请选择发票类型",
+        trigger: ["blur", "change"],
+      },
+    ],
+    invoiceAttribute: [
+      {
+        required: true,
+        message: "请选择发票性质",
+        trigger: ["blur", "change"],
+      },
+    ],
+    sendAddress: [
+      {
+        required: true,
+        message: "请填写邮寄地址",
+        trigger: ["blur", "change"],
+      },
+    ],
+  },
+
+  promptStatus: false,
+});
+
+const { tabsList, tabsCurrent, form, rules, promptStatus } = toRefs(data);
+
+/**
+ * @提交
+ */
+function handleSubmit(value) {
+  uForm.value
+    .validate()
+    .then((res) => {
+      uni.$u.toast("校验通过");
+
+      crmInvoiceInfo({
+        current: 1,
+        size: 10,
+        invoiceTitle: form.value.invoiceTitle,
+        startTime: publicStore.formatterDateTime(new Date()),
+        endTime: publicStore.getYearLast(new Date()),
+      }).then((requset) => {
+        if (requset.status === "SUCCESS") {
+          if (requset.data.records.length > 0) {
+            promptStatus.value = true;
+          } else {
+            var param = {
+              customId: parseInt(form.value.customId), //客户管理id
+              invoiceTitle: form.value.invoiceTitle, //发票抬头
+              dutyId: form.value.dutyId, //税号
+              email: form.value.email, //电子邮箱
+              applicant: form.value.applicant, //申请人
+              phone: form.value.phone, //手机号码
+              amount: parseFloat(form.value.amount), //金额
+              invoiceType: parseInt(form.value.invoiceType), //发票类型;1:普票,2:专票
+              invoiceAttribute: parseInt(form.value.invoiceAttribute), //发票性质;1:电子发票,2:纸质发票
+              sendAddress: form.value.sendAddress, //邮寄地址
+              paymentReceipt: form.value.paymentReceipt, //付款回执
+            };
+            crmInvoiceInfo(param).then((requset) => {});
+          }
+        }
+      });
+    })
+    .catch((errors) => {
+      uni.$u.toast("校验失败");
+    });
+}
+
+/**
+ * @图片上传成功回调
+ */
+function uploadSuccessChange(e) {
+  form.value.paymentReceipt = e.url;
+}
+
+/**
+ * @图片删除回调
+ */
+function uploadDeleteChange(e) {
+  form.value.paymentReceipt = e;
+}
+
+/**
+ * @复制粘贴板
+ */
+function copy(value) {
+  // 触发方法
+  proxy.$common.uniCopy({
+    content: value,
+    success: (res) => {
+      uni.showToast({
+        title: res,
+        icon: "none",
+      });
+    },
+    error: (e) => {
+      uni.showToast({
+        title: e,
+        icon: "none",
+        duration: 3000,
+      });
+    },
+  });
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  tabsCurrent.value = e.index;
+}
+
+onLoad((options) => {
+  if ("customId" in options) {
+    form.value.customId = options.customId;
+  }
+});
+
+onReady(() => {
+  //   form.value.setRules(rules.value);
+});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  if (e.float == "right") {
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.uni-page-head__title) {
+  opacity: 1 !important;
+}
+
+.invoicing-container {
+}
+</style>

+ 3 - 4
src/pages/login.vue

@@ -270,12 +270,11 @@ function handlePrivacy() {
   // proxy.$tab.navigateTo(`/pages/common/textview/index1?title=${site.title}&content=${site.content}`);
 }
 
-/**
- * @onLoad
- */
-onLoad(() => {
+onShow(() => {
   env();
 });
+
+onLoad((options) => {});
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/pages/mine.vue

@@ -185,7 +185,7 @@ import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue
 import { publicStores, useStores } from "@/store/modules/index";
 
 import { uploadAvatar, updateUserProfile } from "@/api/system/user";
-import { getAuthorization } from "@/api/setting/index.js";
+import { getAuthorization } from "@/api/business/zhxf/messagePush/index.js";
 
 const useStore = useStores();
 

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

@@ -185,7 +185,7 @@ import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue
 import { publicStores, useStores } from "@/store/modules/index";
 
 import { uploadAvatar, updateUserProfile } from "@/api/system/user";
-import { getAuthorization } from "@/api/setting/index.js";
+import { getAuthorization } from "@/api/business/zhxf/messagePush/index.js";
 
 const useStore = useStores();
 

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

@@ -1,6 +1,6 @@
 <template>
   <view :data-theme="'theme-' + proxy.$settingStore.themeColor.name" class="info-container">
-    <u-sticky class="shadow-default" bgColor="#fff">
+    <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>
 

+ 1 - 1
src/pages/serveConfig.vue

@@ -126,7 +126,7 @@ function handleSubmit() {
  * @跳转登录
  */
 function navigateTo() {
-  proxy.$tab.redirectTo("/pages/serveConfigSelect");
+  proxy.$tab.navigateBack(1);
 }
 
 onLoad((options) => {});

+ 7 - 9
src/pages/serveConfigSelect.vue

@@ -1,7 +1,7 @@
 <template>
   <view id="serveConfig">
     <view class="top">
-      <u-icon name="arrow-left" size="17px" color="#000" :bold="true" @click="navigateTo"></u-icon>
+      <u-icon name="arrow-left" size="17px" color="#000" :bold="true" @click="navigateTo()"></u-icon>
     </view>
 
     <view class="content">
@@ -52,10 +52,6 @@ const dataList = reactive({
 const uForm = ref(null);
 const { radiolist, radiovalue } = toRefs(dataList);
 
-/**
- * @获取serveList
- */
-
 /**
  * @切换单选
  * @按钮点击事件
@@ -116,7 +112,7 @@ function serveClick(type) {
       },
     });
   } else if (type == 2) {
-    proxy.$tab.redirectTo("/pages/serveConfig");
+    proxy.$tab.navigateTo("/pages/serveConfig");
   }
 }
 
@@ -141,7 +137,7 @@ function handleSubmit() {
  * @跳转登录
  */
 function navigateTo() {
-  proxy.$tab.reLaunch("/pages/login");
+  proxy.$tab.navigateBack(1);
 }
 
 /**
@@ -150,14 +146,16 @@ function navigateTo() {
 function init() {
   let serveList = uni.getStorageSync("serveList");
   if (serveList.length > 0) {
-    radiovalue.value = serveList[0].radiovalue;
     radiolist.value = serveList[0].radiolist;
+    radiovalue.value = serveList[0].radiovalue;
   }
 }
 
-onLoad((options) => {
+onShow(() => {
   init();
 });
+
+onLoad((options) => {});
 </script>
 
 <style lang="scss" scoped>

+ 9 - 1
src/permission.js

@@ -5,7 +5,15 @@ import setting from "@/plugins/setting.plugins";
 const loginPage = "/pages/login";
 
 // 页面白名单
-const whiteList = ["/pages/login", "/pages/serveConfig", "/pages/serveConfigSelect", "/pages/common/textview/index1", "/pages/common/webview/index", "/pages/business/mhxf/unitInfoCollection/index"];
+const whiteList = [
+  "/pages/login",
+  "/pages/serveConfig",
+  "/pages/serveConfigSelect",
+  "/pages/common/textview/index1",
+  "/pages/common/webview/index",
+  "/pages/business/mhxf/unitInfoCollection/index",
+  "/pages/common/invoicing/index"
+];
 
 // 检查地址白名单
 function checkWhite(url) {

+ 48 - 0
src/plugins/common.plugins.js

@@ -24,4 +24,52 @@ export default {
     }
     return result;
   },
+
+  /**
+   * @复制粘贴板
+   * @param {*} param0 
+   * @returns 
+   */
+  uniCopy({ content, success, error }) {
+    if (!content) return error('复制的内容不能为空 !')
+    content = typeof content === 'string' ? content : content.toString() // 复制内容,必须字符串,数字需要转换为字符串
+    /**
+     * 小程序端 和 app端的复制逻辑
+     */
+    //#ifndef H5 || APP-PLUS || MP-WEIXIN
+    uni.setClipboardData({
+      data: content,
+      success: function () {
+        success("复制成功~")
+        console.log('success');
+      },
+      fail: function () {
+        success("复制失败~")
+      }
+    });
+    //#endif
+
+    /**
+     * H5端的复制逻辑
+     */
+    // #ifdef H5
+    if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断
+      // 不支持
+      error('浏览器不支持')
+    }
+    let textarea = document.createElement("textarea")
+    textarea.value = content
+    textarea.readOnly = "readOnly"
+    document.body.appendChild(textarea)
+    textarea.select() // 选择对象
+    textarea.setSelectionRange(0, content.length) //核心
+    let result = document.execCommand("copy") // 执行浏览器复制命令
+    if (result) {
+      success("复制成功~")
+    } else {
+      error("复制失败,请检查h5中调用该方法的方式,是不是用户点击的方式调用的,如果不是请改为用户点击的方式触发该方法,因为h5中安全性,不能js直接调用!")
+    }
+    textarea.remove()
+    // #endif
+  }
 };

+ 4 - 2
src/plugins/tab.plugins.js

@@ -24,7 +24,9 @@ export default {
     })
   },
   // 关闭当前页面,返回上一页面或多级页面
-  navigateBack() {
-    return uni.navigateBack()
+  navigateBack(value) {
+    return uni.navigateBack({
+      delta: value, //返回到需要执行方法的页面
+    })
   }
 }

+ 18 - 9
src/static/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3620854 */
-  src: url('https://at.alicdn.com/t/c/font_3620854_kea20ky3fh.woff2?t=1686283411818') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_3620854_kea20ky3fh.woff?t=1686283411818') format('woff'),
-       url('https://at.alicdn.com/t/c/font_3620854_kea20ky3fh.ttf?t=1686283411818') format('truetype');
+  src: url('https://at.alicdn.com/t/c/font_3620854_wi2cj933ahr.woff2?t=1688110591021') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_3620854_wi2cj933ahr.woff?t=1688110591021') format('woff'),
+       url('https://at.alicdn.com/t/c/font_3620854_wi2cj933ahr.ttf?t=1688110591021') format('truetype');
 }
 
 .iconfont {
@@ -13,10 +13,22 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
-.ucicon-bianji1:before{
+.ucicon-a-shangchuan:before {
+  content: "\e605";
+}
+
+.ucicon-a-copy:before {
+  content: "\e604";
+}
+
+.ucicon-bianji1:before {
   content: "\e602";
 }
 
+.ucicon-user:before {
+  content: "\e632";
+}
+
 .ucicon-people:before {
   content: "\e736";
 }
@@ -29,10 +41,6 @@
   content: "\e6f7";
 }
 
-.ucicon-user:before {
-  content: "\e632";
-}
-
 .ucicon-password:before {
   content: "\e65d";
 }
@@ -175,4 +183,5 @@
 
 .ucicon-eye-close:before {
   content: "\e8ff";
-}
+}
+

BIN
src/static/iconfont/iconfont.ttf


+ 57 - 0
src/store/modules/public.js

@@ -124,6 +124,30 @@ const publicStore = defineStore("public", {
 
     deviceDetailsArray: {},//设备详情页面-数据存储
 
+    facilitiesGatherType: "",//设施采集类型-数据存储
+    facilitiesGatherArray: {
+      department: "", //所属部门
+      facilityType: "", //设施类型
+      facilityTypeName: "", //设施类型名称
+      facilityName: "", //设施名称
+      status: "0", //设施状态
+      address: "", //设施地址
+      longitude: "", //经度
+      latitude: "", //纬度
+      province: "", //省
+      city: "", //市
+      area: "", //区(县)
+      facilityAddress: "", //详细地址
+      streetTown: null, //所属街镇
+      gpsAreas: [], //经纬度集合
+      contact: "", //联系人
+      contactPhone: "", //联系方式
+      imagesUrl: "", //图⽚地址URL
+      facilityDesc: "", //备注
+      extendData: [], //扩展属性
+      recordPictureList: [],
+      typeGuise: "", //点线面类型
+    },//设施采集页面-数据存储
   }),
   persist: {
     // 自定义数据持久化方式
@@ -161,6 +185,7 @@ const publicStore = defineStore("public", {
         arr,
       };
     },
+
     /**
      * @处理公共日期格式
      */
@@ -183,6 +208,38 @@ const publicStore = defineStore("public", {
       }
       return fmt;
     },
+
+    /**
+   * @获取当前日期前一年的日期
+   */
+    getYearLast(dateStr) {
+      // 假设要获取的日期为dateStr,格式为"YYYY-MM-DD"
+      let date = new Date(dateStr);
+      let Y = date.getFullYear() - 1; // 获取前一年的年份
+      let M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; // 月
+      let D; // 日
+
+      var h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
+      var m = (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":";
+      var s = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
+
+      // 判断原日期的月份是否为2月份
+      if (date.getMonth() === 1) { // 2月份
+        // 判断前一年是否为闰年
+        if (Y % 4 === 0 && Y % 100 !== 0 || Y % 400 === 0) { // 闰年
+          D = Math.min(date.getDate(), 29); // 新日期的日期最大为29
+        } else { // 平年
+          D = Math.min(date.getDate(), 28); // 新日期的日期最大为28
+        }
+      } else { // 非2月份
+        D = date.getDate(); // 新日期的日期为原日期的日期
+      }
+
+      let newDateStr = Y + "-" + M + "-" + (D < 10 ? "0" + D : D) + " " + h + m + s; // 格式化日期字符串
+
+      return newDateStr
+    },
+
     /**
      * @获取年月日时分秒
      * @returns