瀏覽代碼

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

guoqing 2 年之前
父節點
當前提交
d8b14458aa

+ 11 - 0
src/api/siteInspection/siteInspectionService.js

@@ -7,6 +7,17 @@ export default class siteInspectionService {
             inputForm
         )
     }
+    keepOnRecord(ids) {
+       
+        return request.post(
+            '/csjcqk/siteInspection/keepOnRecord',{},{ids: ids}
+        )
+    }
+    keepOnRecordNO(ids) {
+        return request.post(
+            '/csjcqk/siteInspection/keepOnRecordNO',{},{ids: ids}
+        )
+    }
     queryById(id) {
         return request.get(
             '/csjcqk/siteInspection/queryById', { id: id }

+ 12 - 5
src/api/sys/tools.js

@@ -3,6 +3,13 @@ export default class Tools {
     treeData() {
         return request.get(`/tools/area_yc/treeData`);
     };
+    //籍贯接口
+    nativePlace(params) {
+        return request.get(
+            `/sys/area/treeData`,
+            params
+        )
+    };
     placeList(params) {
         return request.get(
             `/religioussites/siteinfo/religiousSitesInfo/list`,
@@ -46,11 +53,11 @@ export default class Tools {
     };
     // 用户查询
     queryById(id) {
-            return request.get(
-                `/sys/user/queryById`, { id: id }
-            )
-        }
-        // 获取场所地点
+        return request.get(
+            `/sys/user/queryById`, { id: id }
+        )
+    }
+    // 获取场所地点
     areaQueryById(id) {
         return request.get(
             '/religioussites/siteinfo/religiousSitesInfo/queryById', { id: id })

+ 2 - 1
src/utils/request.js

@@ -116,7 +116,8 @@ var http = {
                 url: url,
                 method: 'post',
                 data: data,
-                params: qs.stringify(params),
+                params: params,
+                //params: qs.stringify(params),post请求时传String 时传不到后台就注销了
                 config: config
             }).then((response) => {
                 resolve(response);

+ 28 - 18
src/views/activityMan/differentbelievers/ReligiousPeopleReportView.vue

@@ -40,16 +40,16 @@
         <van-field v-model="inputForm.nativePlace" center readonly label="籍贯:" placeholder="请选择籍贯" input-align="right"
           right-icon="arrow-down" @click="showArea = true" />
         <van-popup v-model:show="showArea" round position="bottom">
-          <van-cascader v-model="cascaderValue" title="请选择籍贯" :options="options" @close="showArea = false"
-            @finish="onFinish2" />
+          <van-picker title="籍贯选择" :columns="options" :columns-field-names="customFieldName" @cancel="showArea = false"
+            @confirm="onFinish2" />
         </van-popup>
       </van-cell-group>
       <van-cell-group>
         <van-field v-model="inputForm.currentResidence" center readonly label="现居地:" placeholder="请选择现居地"
           input-align="right" right-icon="arrow-down" @click="showCurrentArea = true" />
         <van-popup v-model:show="showCurrentArea" round position="bottom">
-          <van-cascader v-model="cascaderValue" title="请选择现居地" :options="options" @close="showCurrentArea = false"
-            @finish="onFinish" />
+          <van-picker title="现居地选择" :columns="options" :columns-field-names="customFieldName"
+            @cancel="showCurrentArea = false" @confirm="onFinish" />
         </van-popup>
       </van-cell-group>
       <van-cell-group>
@@ -127,6 +127,10 @@ export default {
     // 根据路由初始化
     let route = useRoute();
     onMounted(() => {
+      //籍贯接口
+      new tools().nativePlace().then((res) => {
+        options.value.push(...res);
+      });
       if (route.query.id) {
         new ReligiousPeopleReportService()
           .queryById(route.query.id)
@@ -161,24 +165,30 @@ export default {
     });
     // 现居地选择
     const showCurrentArea = ref(false);
-    const cascaderValue = ref("");
+    const customFieldName = {
+      text: "name",
+      value: "id",
+    };
     // 选项列表,children 代表子选项,支持多级嵌套
-    const options = useCascaderAreaData();
+    const options = ref([]);
     // 全部选项选择完毕后,会触发 finish 事件
     const onFinish = ({ selectedOptions }) => {
       showCurrentArea.value = false;
       console.log(selectedOptions);
-      inputForm.value.currentResidence = '中国/' + selectedOptions
-        .map((option) => option.text)
+      inputForm.value.currentResidence = selectedOptions
+        .map((option) => option.name)
         .join("/");
-      inputForm.value.currentResidenceId = '100000/' + selectedOptions
-        .map((option) => option.value)
+      inputForm.value.currentResidenceId = selectedOptions
+        .map((option) => option.id)
         .join("/");
-      inputForm.value.currentResidenceLevel1 = '100000'
-      inputForm.value.currentResidenceLevel2 = selectedOptions[0].value ? selectedOptions[0].value : ''
-      inputForm.value.currentResidenceLevel3 = selectedOptions[1].value ? selectedOptions[1].value : ''
-      inputForm.value.currentResidenceLevel4 = selectedOptions[2].value ? selectedOptions[2].value : ''
-    };
+
+      inputForm.value.currentResidenceLevel1 = selectedOptions[0] ? selectedOptions[0].id : ''
+      inputForm.value.currentResidenceLevel2 = selectedOptions[1] ? selectedOptions[1].id : ''
+      inputForm.value.currentResidenceLevel3 = selectedOptions[2] ? selectedOptions[2].id : ''
+      inputForm.value.currentResidenceLevel4 = selectedOptions[3] ? selectedOptions[3].id : ''
+      inputForm.value.currentResidenceLevel5 = selectedOptions[4] ? selectedOptions[4].id : ''
+      inputForm.value.currentResidenceLevel6 = selectedOptions[5] ? selectedOptions[5].id : ''
+    }
     const getLocation = () => {
       xm.getLocation().then(data => {
         inputForm.value.currentResidenceDetail = data.POIName;
@@ -189,8 +199,8 @@ export default {
     // 全部选项选择完毕后,会触发 finish 事件
     const onFinish2 = ({ selectedOptions }) => {
       showArea.value = false;
-      inputForm.value.nativePlace = '中国/' + selectedOptions
-        .map((option) => option.text)
+      inputForm.value.nativePlace = selectedOptions
+        .map((option) => option.name)
         .join("/");
     };
     const getType = ({ selectedOptions }) => {
@@ -266,7 +276,7 @@ export default {
       options,
       onFinish,
       onFinish2,
-      cascaderValue,
+      customFieldName,
       isLoading,
       getType,
       // 文件上传

+ 0 - 1
src/views/activityMan/personList.vue

@@ -97,7 +97,6 @@ export default {
       (newValue, oldValue) => {
         if (oldValue != newValue) {
           index = 0;
-
         }
       },
       { deep: true }

+ 45 - 13
src/views/activityMan/siteInspection/siteInspectionInfo.vue

@@ -87,11 +87,18 @@
       </van-cell-group>  
     </div>
     <van-button
-      v-if="info.assessment == 0"
+      v-if="info.assessment == 1"
       type="primary"
       class="btn-sub"
-      @click="update"
-      >审核</van-button
+      @click="update(2)"
+      >排查合格</van-button
+    >
+    <van-button
+      v-if="info.assessment == 1"
+      type="primary"
+      class="btn-sub"
+      @click="update(3)"
+      >排查不合格</van-button
     >
   </div>    
   </template>
@@ -166,17 +173,42 @@
     };
       
       // 审核通过
-      const update = () => {
+      const update = (state) => {
         isLoading.value = true;
-        info.value.assessment = 1;
-        new siteInspectionService().save(info.value).then((res) => {
+        info.value.assessment = state;
+        // new siteInspectionService().save(info.value).then((res) => {
+
+        //   isLoading.value = false;
+        //   window.xm.showToast({
+        //      message:"排查成功!"+state
+        //   })
+        //   history.back();
+        // });
+
+
+        if(state==2){
+          new siteInspectionService().keepOnRecord(info.value.id).then((res) => {
+
+            isLoading.value = false;
+            window.xm.showToast({
+              message:"排查成功!"
+            })
+            history.back();
+          });
+        }else{
+          new siteInspectionService().keepOnRecordNO(info.value.id).then((res) => {
+
+            isLoading.value = false;
+            window.xm.showToast({
+              message:"排查成功!"
+            })
+            history.back();
+            });
+        }
+
+        
+
 
-          isLoading.value = false;
-          window.xm.showToast({
-             message:"审核成功!"
-          })
-          history.back();
-        });
       };
       return {
         // 导航栏颜色
@@ -197,7 +229,7 @@
     color: #36a7f3 !important;
   }
   .btn-sub {
-    width: 90%;
+    width: 42%;
     border-radius: 20px;
     margin-left: 5%;
     margin-bottom: 40px;

+ 39 - 4
src/views/activityMan/siteInspection/siteInspectionList.vue

@@ -43,7 +43,7 @@
       title-active-color="#36a7f3"
       @click-tab="onClickTab"
     >
-      <van-tab title="未审核" name="0">
+      <van-tab title="未排查" name="1">
         <van-list
           v-model:loading="loading"
           :finished="finished"
@@ -56,7 +56,7 @@
                 <p style="color: #c4c4c4">
                   {{ item.supervisionTime }}
                 </p>
-                <p style="color: red">待审核</p>
+                <p style="color: red">未排查</p>
               </div>
               <van-cell>
                 <template #title>
@@ -90,7 +90,7 @@
           </van-swipe-cell>
         </van-list>
       </van-tab>
-      <van-tab title="已审核" name="1">
+      <van-tab title="正常" name="2">
         <van-list
           v-model:loading="loading"
           :finished="finished"
@@ -103,7 +103,7 @@
                 <p  style="color: #c4c4c4">
                   {{ item.supervisionTime }}
                 </p>
-                <p style="color: gray">已审核</p>
+                <p style="color: gray">正常</p>
               </div>
               <van-cell>
                 <template #title>
@@ -121,6 +121,41 @@
           </van-swipe-cell>
         </van-list>
       </van-tab>
+
+      <!-- 不合格 -->
+      <van-tab title="不合格" name="3">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          finished-text="没有更多了"
+          @load="onLoad"
+        >
+          <van-swipe-cell v-for="item in list" :key="item">
+            <div class="list_item" @click="goInfo(item.id)">
+              <div class="item-left">
+                <p  style="color: #c4c4c4">
+                  {{ item.supervisionTime }}
+                </p>
+                <p style="color: orange">不合格</p>
+              </div>
+              <van-cell>
+                <template #title>
+                  {{item.siteName.name}}({{ item.placeDel}})
+                    <!-- <van-text-ellipsis
+                      rows="2"
+                      :content="`${item.siteName.name}(${ item.placeDel})`"
+                    /> -->
+                </template>
+                <template #label>
+                  {{ item.supervisionContent }}
+                </template>
+              </van-cell>
+            </div>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+      <!-- 不合格 -->
+
     </van-tabs>
     <!-- 搜索结果 -->
     <van-list