Преглед на файлове

Squashed commit of the following:

commit ccae30f337f8cb33a59aae870d9a25a77617ca68
Author: guoqing <1624870927@qq.com>
Date:   Mon Apr 10 14:09:54 2023 +0800

    牌位管理详情页显示图片

commit 7dafbacc2f4d756444c7fc95b0fa2bbe9358ccb5
Merge: 158e8be 0a83750
Author: guoqing <1624870927@qq.com>
Date:   Mon Apr 10 13:50:38 2023 +0800

    Merge branch 'master' of http://123.57.226.179:8080/yin_yu820/HS_MZAP

commit 158e8be80f094fdb0a2742c70b552beac49e4e7c
Author: guoqing <1624870927@qq.com>
Date:   Mon Apr 10 13:50:27 2023 +0800

    图片显示更新

commit 0a83750eb4e699bf498bfcd2733ffc401b15e512
Merge: 8adf891 353710a
Author: yin_yu820 <895937358@qq.com>
Date:   Mon Apr 10 13:45:22 2023 +0800

    Merge remote-tracking branch 'HS_MZAP/master'

commit 8adf891d307c041104dfa3b0b3628c2a9799b102
Author: yin_yu820 <895937358@qq.com>
Date:   Mon Apr 10 13:45:17 2023 +0800

    上传附件功能

commit 353710a4334a9f717b95925293ec7f86e8179876
Merge: 8a2c32b 46f5c59
Author: guoqing <1624870927@qq.com>
Date:   Mon Apr 10 10:31:03 2023 +0800

    Merge branch 'master' of http://123.57.226.179:8080/yin_yu820/HS_MZAP

commit 8a2c32b4d3e9f3709610ae7c9f651046a0757bd7
Author: guoqing <1624870927@qq.com>
Date:   Mon Apr 10 10:30:55 2023 +0800

    更新

commit 46f5c5996a91c99173b70f1d44d02063fba1d984
Author: yin_yu820 <895937358@qq.com>
Date:   Mon Apr 10 10:29:29 2023 +0800

    待办接口有问题后切换其他方法

commit 33b680906cf776975e7445945e87d1e5f3319aa7
Author: yin_yu820 <895937358@qq.com>
Date:   Mon Apr 10 10:29:02 2023 +0800

    待办接口有问题后切换其他方法
LuChongMei преди 2 години
родител
ревизия
113ef831db

+ 7 - 0
src/api/sys/tools.js

@@ -37,6 +37,13 @@ export default class Tools {
             formData
         )
     };
+    // 文件删除
+    uploadFiledelete(formData, uploadPath) {
+        return request.delete(
+            `/sys/file/webupload/deleteByUrl?url=${uploadPath}`,
+            formData
+        )
+    };
     // 用户查询
     queryById(id) {
         return request.get(

+ 2 - 1
src/utils/config.js

@@ -3,6 +3,7 @@ let APP_SERVER_URL = ""
 if (process.env.NODE_ENV === 'development') {
     // 开发环境
     //APP_SERVER_URL = 'http://192.168.139.110:8084'
+    //APP_SERVER_URL = 'http://192.168.139.74:8080'
     APP_SERVER_URL = 'http://localhost:8084'
 } else {
     // 生产环境
@@ -11,4 +12,4 @@ if (process.env.NODE_ENV === 'development') {
 
 // APP_SERVER_URL = APP_SERVER_URL + "/app"
 
-export default APP_SERVER_URL
+export default APP_SERVER_URL

+ 68 - 11
src/views/activityMan/securityFacilitiesErr/securityFacilitiesErrView.vue

@@ -111,17 +111,23 @@
         </van-popup>
       </van-cell-group>
 
-      
-
       <van-cell-group>
         <van-field name="uploader" label="附件:">
           <template #input>
-            <van-uploader>
+            <van-uploader
+              :after-read="afterRead"
+              v-model="fileList"
+              :max-count="6"
+              capture="camera"
+              accept=""
+              :before-delete="fjdelete"
+            >
               <van-button icon="plus">上传文件</van-button>
             </van-uploader>
           </template>
         </van-field>
       </van-cell-group>
+
       <van-cell-group>
         <div class="rowTextArea">
           <van-field
@@ -147,6 +153,7 @@ import { reactive, ref } from "vue";
 import personList from "../personList.vue";
 import securityFacilitiesErrService from "@/api/securityFacilitiesErr/securityFacilitiesErrService";
 import tools from "@/api/sys/tools";
+
 export default {
   components: { personList },
   setup() {
@@ -262,19 +269,63 @@ export default {
       }
     };
 
+    // 文件上传
+    let fileList = ref([]);
+    let fileupList = ref([]);
+    const afterRead = (file) => {
+      // 此时可以自行将文件上传至服务器
+      new tools()
+        .uploadFile(file, `afssyc/securityFacilitiesErr`)
+        .then(({ data }) => {
+        
+          data.name = decodeURIComponent(
+            data.url.substring(
+              data.url.lastIndexOf("/") + 1
+            )
+          );
+
+          //data.url = `${$base}` + data.url;    
+          fileupList.value.push(data);
+
+        });
+    };
+    const fjdelete = (file) => {
+      //删除文件操作
+      for (let index = 0; index < fileList.value.length; index++) {
+        if(file.file==fileList.value[index].file){
+          let delurl=fileupList.value[index].url;                   
+          new tools()
+            .uploadFiledelete("", delurl)
+            .then(({ data }) => {
+          });
+          fileupList.value.splice(index,1);
+          fileList.value.splice(index,1); 
+        }        
+      }      
+    };
+
     // 提交数据
     const submit = () => {
       //添加保存前判断
+      if(siteInspection.siteName.id==""){
+        window.xm.showToast({
+          message:"请先选择场所信息!"
+        })
+      }else{
 
-      new securityFacilitiesErrService().save(securityFacilitiesErr).then((res) => {
-        if(res.data=="保存安防设施异常成功"){
-          window.xm.showToast({
-             message:"保存成功!"
-          })
-          history.back();
-        }
+        //保存前附件处理
+        siteInspection.enclosure = fileupList.value.map((option) => option.url).join("|");
+        new securityFacilitiesErrService().save(securityFacilitiesErr).then((res) => {
+          if(res.data=="保存安防设施异常成功"){
+            window.xm.showToast({
+              message:"保存成功!"
+            })
+            history.back();
+          }
 
-      });
+        });
+        
+      }
     };
     return {
       securityFacilitiesErr,
@@ -299,6 +350,12 @@ export default {
       FireStations,
       setFireStations,
       
+      // 文件上传
+      afterRead,
+      fileList,
+      fileupList,
+      fjdelete,
+
       // 返回
       onClickLeft,
       submit,

+ 33 - 38
src/views/activityMan/siteInspection/siteInspectionView.vue

@@ -88,16 +88,6 @@
         </van-popup>
       </van-cell-group>
 
-      <!-- <van-cell-group>
-        <van-field name="uploader" label="附件:">
-          <template #input>
-            <van-uploader>
-              <van-button icon="plus">上传文件</van-button>
-            </van-uploader>
-          </template>
-        </van-field>
-      </van-cell-group> -->
-
       <van-cell-group>
         <van-field name="uploader" label="附件:">
           <template #input>
@@ -110,9 +100,6 @@
               :before-delete="fjdelete"
             >
               <van-button icon="plus">上传文件</van-button>
-              <!-- <template #preview-cover="file">
-                <div class="preview-cover van-ellipsis">{{ file.name }}</div>
-              </template> -->
             </van-uploader>
           </template>
         </van-field>
@@ -227,6 +214,7 @@ export default {
     };
     // 文件上传
     let fileList = ref([]);
+    let fileupList = ref([]);
     const afterRead = (file) => {
       // 此时可以自行将文件上传至服务器
       new tools()
@@ -239,42 +227,48 @@ export default {
             )
           );
 
-          data.url = `${$base}` + data.url;      
-          
-
-          //fileList.value[0].url = `${$base}` + fileList.value[0].url;
-          // fileList.value[0].name = decodeURIComponent(
-          //   fileList.value[0].url.substring(
-          //     fileList.value[0].url.lastIndexOf("/") + 1
-          //   )
-          // );
-
-
+          //data.url = `${$base}` + data.url;    
+          fileupList.value.push(data);
 
         });
     };
-
     const fjdelete = (file) => {
-      console.log(file);
+      //删除文件操作
+      for (let index = 0; index < fileList.value.length; index++) {
+        if(file.file==fileList.value[index].file){
+          let delurl=fileupList.value[index].url;                   
+          new tools()
+            .uploadFiledelete("", delurl)
+            .then(({ data }) => {
+          });
+          fileupList.value.splice(index,1);
+          fileList.value.splice(index,1); 
+        }        
+      }      
     };
     
     // 提交数据
     const submit = () => {
       //添加保存前判断
+      if(siteInspection.siteName.id==""){
+        window.xm.showToast({
+          message:"请先选择场所信息!"
+        })
+      }else{
 
-      //保存前附件处理
-      siteInspection.enclosure = data.url;
-
-
-      new siteInspectionService().save(siteInspection).then((res) => {
-        if(res.data=="保存场所检查情况成功"){
-          window.xm.showToast({
-             message:"保存成功!"
-          })
-          history.back();
-        }
+        //保存前附件处理
+        siteInspection.enclosure = fileupList.value.map((option) => option.url).join("|");
+        new siteInspectionService().save(siteInspection).then((res) => {
+          if(res.data=="保存场所检查情况成功"){
+            window.xm.showToast({
+              message:"保存成功!"
+            })
+            history.back();
+          }
+        });
 
-      });
+      }
+      
     };
     return {
       siteInspection,
@@ -300,6 +294,7 @@ export default {
       // 文件上传
       afterRead,
       fileList,
+      fileupList,
       fjdelete,
       submit,
     };

+ 15 - 2
src/views/placeManage/placePersoninfo.vue

@@ -29,7 +29,12 @@
             <van-col span="24">
               <van-row justify="space-between">
                 <van-col span="12"> 证件类型: </van-col>
-                <van-col span="6" style="text-align: right"> {{data.data.idType==1?'身份证':'其他'}} </van-col>
+                <van-col span="6" style="text-align: right">
+                   <span v-if="data.data.idType==1">身份证</span>
+                   <span v-if="data.data.idType==2">护照</span>
+                   <span v-if="data.data.idType==3">港澳通行证</span>
+                   <span v-if="data.data.idType==4">其他</span>
+                </van-col>
               </van-row>
             </van-col>
           </van-row>
@@ -201,7 +206,7 @@
           </van-row>
           <van-row>
             <van-col span="10">
-                <img class="personImg" :src="item.value" alt="" />
+                <img style="width: 100px;height: 100px;" :src="item.value" alt="" />
             </van-col>
           </van-row>
         </van-col>
@@ -214,6 +219,7 @@
 <script>
 import { useRouter } from 'vue-router'
 import {onMounted, reactive,ref} from "vue"
+import $base from "@/utils/config"
 export default {
   setup(){
     const data = reactive({
@@ -225,6 +231,13 @@ export default {
     onMounted(()=>{
       var item = JSON.parse(router.currentRoute.value.query.data)
       data.data = item;
+      data.data.workPicture = `${$base}` + data.data.workPicture
+      data.data.userManagenmetDetailsDTOList.forEach(item2 => {
+        if(item2.dataType === '4'){
+          item2.value = `${$base}` + item2.value
+        }
+      });
+
     })
     //返回
     const goback = () => {

+ 1 - 1
src/views/placeManage/placeRegister.vue

@@ -189,7 +189,7 @@
         <van-field
           v-model="placeActivity.placeData.peopleThreshold"
           center
-          label="场所活动人数:"
+          label="活动人数:"
           placeholder="请填写场所活动人数"
           input-align="right"
         />

+ 77 - 53
src/views/placeManage/placeTabletInfo.vue

@@ -6,44 +6,47 @@
   </div>
   <div class="content">
     <div class="itemInfo">
-    <h3 style="color: #40abf4">牌位信息-{{data.data.brandName}}</h3>
+      <h3 style="color: #40abf4">牌位信息-{{ dataitem.brandName }}</h3>
       <van-row justify="space-between">
-        <van-col span="14">
+        <van-col span="24">
           <van-row class="item">
             <van-col span="24">
               <van-row justify="space-between">
-                <van-col span="8"> 名称: </van-col>
-                <van-col span="8" style="text-align: right">{{data.data.brandName}}</van-col>
+                <van-col span="10"> 名称: </van-col>
+                <van-col span="14" style="text-align: right">{{
+                  dataitem.brandName
+                }}</van-col>
               </van-row>
             </van-col>
           </van-row>
           <van-row class="item">
             <van-col span="24">
               <van-row justify="space-between">
-                <van-col span="8"> 所属场所名称: </van-col>
-                <van-col span="8" style="text-align: right">{{data.siteName.name}}</van-col>
+                <van-col span="10"> 所属场所名称: </van-col>
+                <van-col span="14" style="text-align: right">{{
+                  data.siteName.name
+                }}</van-col>
               </van-row>
             </van-col>
           </van-row>
           <van-row class="item">
             <van-col span="24">
               <van-row justify="space-between">
-                <van-col span="12"> 场所联系人: </van-col>
-                <van-col span="6" style="text-align: right">{{data.data.memorialTabletHolder}}</van-col>
+                <van-col span="10"> 场所联系人: </van-col>
+                <van-col span="14" style="text-align: right">{{
+                  dataitem.memorialTabletHolder
+                }}</van-col>
               </van-row>
             </van-col>
           </van-row>
         </van-col>
-        <van-col span="8">
-          <img class="personImg" :src="data.pic[0]" alt="" />
-        </van-col>
       </van-row>
       <van-row class="item">
         <van-col span="24">
           <van-row justify="space-between">
             <van-col span="10"> 联系方式: </van-col>
             <van-col span="14" style="text-align: right">
-              {{data.data.memorialTabletHolderPhone}}
+              {{ dataitem.memorialTabletHolderPhone }}
             </van-col>
           </van-row>
         </van-col>
@@ -53,7 +56,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 供奉牌位人: </van-col>
             <van-col span="14" style="text-align: right">
-              {{data.data.contactInformation}}
+              {{ dataitem.contactInformation }}
             </van-col>
           </van-row>
         </van-col>
@@ -63,7 +66,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 供奉牌位人电话: </van-col>
             <van-col span="14" style="text-align: right">
-             {{data.data.siteContact}}
+              {{ dataitem.siteContact }}
             </van-col>
           </van-row>
         </van-col>
@@ -73,7 +76,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 身份证号: </van-col>
             <van-col span="14" style="text-align: right">
-              {{data.data.udCard}}
+              {{ dataitem.udCard }}
             </van-col>
           </van-row>
         </van-col>
@@ -83,7 +86,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 籍贯: </van-col>
             <van-col span="14" style="text-align: right">
-              {{data.data.currentResidence}}
+              {{ dataitem.currentResidence }}
             </van-col>
           </van-row>
         </van-col>
@@ -93,7 +96,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 现居地: </van-col>
             <van-col span="14" style="text-align: right">
-              {{data.data.nativePlace}}
+              {{ dataitem.nativePlace }}
             </van-col>
           </van-row>
         </van-col>
@@ -103,7 +106,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 现居地详情: </van-col>
             <van-col span="14" style="text-align: right">
-              {{data.data.currentResidenceDel}}
+              {{ dataitem.currentResidenceDel }}
             </van-col>
           </van-row>
         </van-col>
@@ -113,7 +116,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 与供奉牌位关系: </van-col>
             <van-col span="14" style="text-align: right">
-                {{data.data.relationship}}
+              {{ dataitem.relationship }}
             </van-col>
           </van-row>
         </van-col>
@@ -123,7 +126,7 @@
           <van-row justify="space-between">
             <van-col span="10"> 供奉费用(元/年): </van-col>
             <van-col span="14" style="text-align: right">
-              {{data.data.sacrificeExpenses}}
+              {{ dataitem.sacrificeExpenses }}
             </van-col>
           </van-row>
         </van-col>
@@ -132,7 +135,16 @@
         <van-col span="24">
           <van-row justify="space-between">
             <van-col span="10">被供奉者信息: </van-col>
-            <van-col span="14" style="text-align: right">
+            <van-col span="14" style="text-align: right">{{ dataitem.information}}</van-col>
+          </van-row>
+        </van-col>
+      </van-row>
+      <van-row class="item">
+        <van-col span="24">
+          <van-row>
+            <van-col span="24" style="margin-bottom:10px;">牌位照片: </van-col>
+            <van-col span="8" v-for="(item,index) in data.pic" :key="index">
+              <img class="personImg" :src="item" alt="" />
             </van-col>
           </van-row>
         </van-col>
@@ -142,33 +154,45 @@
 </template>
 
 <script>
-import { useRouter } from 'vue-router'
-import {onMounted, reactive} from "vue"
+import { useRouter } from "vue-router";
+import { onMounted, reactive ,ref} from "vue";
+import $base from "@/utils/config"
 export default {
-  setup(){
+  setup() {
     const data = reactive({
-      //牌位数据
-      data:{},
-      siteName:{},
+      siteName: {},
       pic:[]
-    })
+    });
+    //牌位数据
+    let dataitem = ref({});
     //数据接收
     const router = useRouter();
-    onMounted(()=>{
-      var item = JSON.parse(router.currentRoute.value.query.data)
-      data.data = item
-      data.siteName = data.data.siteName
-      data.pic.push(data.data.pic.split('|'))
-    })
+    onMounted(() => {
+      var item = JSON.parse(router.currentRoute.value.query.data);
+      dataitem.value = item;
+      data.siteName = dataitem.value.siteName; 
+      let pic = []
+      pic=dataitem.value.pic.split("|");
+      dataitem.value.pic = pic
+      data.pic = dataitem.value.pic
+      let picList = []
+      data.pic.forEach(item1=>{
+        // item1 = `${$base}`+item1
+        picList.push(`${$base}`+item1)
+      })
+      data.pic = picList
+      console.log(data.pic);
+    });
     //返回
     const goback = () => {
       history.back();
     };
-    return{
+    return {
       goback,
-      data
-    }
-  }
+      data,
+      dataitem
+    };
+  },
 };
 </script>
 
@@ -189,7 +213,7 @@ html {
   }
 }
 .banner {
-  background-color: #36A7F3;
+  background-color: #36a7f3;
   padding: 20px 50px 40px 50px;
   color: #fff;
   h2 {
@@ -226,24 +250,24 @@ html {
     margin: 0;
     padding: 0;
   }
-  .itemInfo{
+  .itemInfo {
     height: 100%;
-    .item{
-        padding: 15px 0;
-        border-bottom: 1px solid #f2f2f2;
-        .van-col{
-            .van-row{
-                .van-col{
-                    &:nth-child(2){
-                        color: #7f7f7f;
-                    }
-                }
+    .item {
+      padding: 15px 0;
+      border-bottom: 1px solid #f2f2f2;
+      .van-col {
+        .van-row {
+          .van-col {
+            &:nth-child(2) {
+              color: #7f7f7f;
             }
+          }
         }
+      }
     }
-    .personImg{
-        width: 100%;
-        height: 100%;
+    .personImg {
+      width: 100%;
+      height: 100%;
     }
   }
 }

+ 19 - 9
src/views/tab_a/tabAll.vue

@@ -32,12 +32,12 @@
 	<div class="flexll">
 		<div class="ffl2" id="0" @click="goToBeDone($event)">
 			<div class="textRegular" >待处理</div>
-			<div class="textRed">{{sum1}}</div>
+			<div class="textRed">{{sum1?sunm1:0}}</div>
 		</div>
 		<div class="verticalLine"></div>
 		<div class="ffl2" id="1" @click="goToBeDone($event)">
 			<div class="textRegular" >已处理</div>
-			<div class="textBlue">{{sum2}}</div>
+			<div class="textBlue">{{sum2?sunm2:0}}</div>
 		</div>
 	</div>
 	<div class="hLine"></div>
@@ -126,11 +126,15 @@ import toBeDone from '@/api/toBeDone/toBeDone';
 			//待办数据获取
 			dataNumber(){
 				new toBeDone().list().then((res)=>{
-					this.con1 = res.records.length;
+					this.sum1 = res.records.length;
+					this.sum=this.sum1+this.sum2;
 				})
 				new toBeDone().list2().then((res1)=>{
-					this.con2 = res1.records.length;
+					this.sum2 = res1.records.length;
+					this.sum=this.sum1+this.sum2;
+					
 				})
+
 			},
 			onClickLeft(){
 				history.back();
@@ -200,7 +204,7 @@ import toBeDone from '@/api/toBeDone/toBeDone';
 						that.$store.commit('setUser',res.account);
 						that.getBannerImg();//获取轮播图
 						that.getSelectColor();//获取主题颜色
-						that.getStatistics();//获取待办事项数
+						that.dataNumber();//获取待办事项数
 					});
 
 					//})//上线取消注释
@@ -208,7 +212,7 @@ import toBeDone from '@/api/toBeDone/toBeDone';
 				}else{
 					that.getBannerImg();//获取轮播图
 					that.getSelectColor();//获取主题颜色
-					that.getStatistics();//获取待办事项数
+					that.dataNumber();//获取待办事项数
 				}
 
 
@@ -219,9 +223,15 @@ import toBeDone from '@/api/toBeDone/toBeDone';
 				new userSets()
 				.Statistics()
 				.then((res) => {
-					that.sum=res[0].sum;
-					that.sum1=res[0].sum1;
-					that.sum2=res[0].sum2;
+					if(res[0].sum!=undefined&&res[0].sum!=null&&res[0].sum!=""){
+						that.sum=res[0].sum;
+					}
+					if(res[0].sum1!=undefined&&res[0].sum1!=null&&res[0].sum1!=""){
+						that.sum1=res[0].sum1;
+					}
+					if(res[0].sum2!=undefined&&res[0].sum2!=null&&res[0].sum2!=""){
+						that.sum2=res[0].sum2;
+					}
 				});
 			},