yin_yu820 2 سال پیش
والد
کامیت
25f5f00947

+ 5 - 0
src/api/nonReligiousInformation/nonReligiousInformationService.js

@@ -18,4 +18,9 @@ export default class nonReligiousInformationService {
             params
         )
     }
+    delete(ids) {
+        return request.delete(
+            '/nonreligiousinformation/nonReligiousInformation/delete', { ids: ids }
+        )
+    }
 }

+ 5 - 0
src/api/religiousConference/religiousConferenceService.js

@@ -18,4 +18,9 @@ export default class religiousConferenceService {
             params
         )
     }
+    delete(ids) {
+        return request.delete(
+            '/zzcssb/religiousConference/delete', { ids: ids }
+        )
+    }
 }

+ 6 - 0
src/api/securityFacilitiesErr/securityFacilitiesErrService.js

@@ -18,4 +18,10 @@ export default class securityFacilitiesErrService {
             params
         )
     }
+    delete(ids) {
+        return request.delete(
+            '/afssyc/securityFacilitiesErr/delete', { ids: ids }
+        )
+    }
+
 }

+ 6 - 1
src/api/siteInspection/siteInspectionService.js

@@ -18,4 +18,9 @@ export default class siteInspectionService {
             params
         )
     }
-}
+    delete(ids) {
+        return request.delete(
+            '/csjcqk/siteInspection/delete', { ids: ids }
+        )
+    }
+}

+ 2 - 2
src/api/sys/userSets.js

@@ -2,12 +2,12 @@ import request from '@/utils/request'
 export default class userSets {
     //轮播图
     BannerImg() {
-        return request.get(`/banner/bannerImg/list`);
+        return request.get(`/banner/bannerImg/applist`);
     };
     // 主题颜色
     SelectColor(params) {
         return request.get(
-            `/selectapp/selectColor/list`,
+            `/selectapp/selectColor/getColor`,
             params
         )
     };

+ 4 - 3
src/utils/request.js

@@ -20,6 +20,7 @@ axios.defaults.headers = { 'Content-Type': 'application/json; charset=utf-8' };
 axios.interceptors.request.use(
     (config) => {
         config.headers.token = window.localStorage.getItem('MZ_TOKEN');
+      
         return config
     },
     (error) => {
@@ -85,11 +86,12 @@ var http = {
      * @returns
      */
     get: function(url, params = {}, config = {}) {
+        let par=qs.stringify(params,{allowDots: true, arrayFormat: 'indices'})
         return new Promise((resolve, reject) => {
             axios({
-                url: url,
+                url: url+"?"+par,
                 method: 'get',
-                params: params,
+                params: {},
                 config: config,
             }).then((response) => {
                 resolve(response.data)
@@ -97,7 +99,6 @@ var http = {
                 reject(error)
             })
         })
-
     },
 
     /**

+ 101 - 65
src/views/activityMan/nonReligiousInformation/nonReligiousInformationInfo.vue

@@ -1,56 +1,121 @@
 <template>
+<van-nav-bar
+      fixed
+      title="其他有害信息情况"
+      left-text=""
+      left-arrow
+      @click-left="onClickLeft"
+    />
+    <van-loading size="16px" v-show="isLoading">加载中...</van-loading>
 
-    <van-loading size="16px" v-if="isLoading">加载中...</van-loading>
-    <div class="main" v-if="!isLoading">
+    <div class="main" v-show="!isLoading">
       <div class="banner">
-        <h2>扎实提升“三力”</h2>
-        <h2>深入推进“三化”</h2>
-        <h2>坚持“三个思维”</h2>
+        <img src="../../../../public/loginbg/banner.jpg" alt="" />
       </div>
       <div class="info">
-        <p>非宗教类别:{{ getCategories(info.nonReligiousCategories) }}</p>
-        <p>组织名称:{{ info.siteName.organizationName }}</p>
-        <p>时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间:{{ info.reportingTime }}</p>
-        <p>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点:{{ info.placeSelectName }}</p>
-        <p>详细地址:{{ info.placeDetailed }}</p>
-        <p>事件概述:{{ info.eventOverview }}</p>
+        <p class="miniTitle">详细信息</p>
+        
+        <van-cell-group>
+          <van-field
+            v-model="info.nonReligiousCategoriesName"
+            readonly
+            label="非宗教类别:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.siteName.organizationName"
+            center
+            readonly
+            label="组织名称:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.reportingTime"
+            center
+            readonly
+            label="时间:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.placeSelectName"
+            center
+            readonly
+            label="地点:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.placeDetailed"
+            center
+            readonly
+            label="详细地址:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.eventOverview"
+            center
+            readonly
+            label="事件概述:"
+            input-align="right"
+          />
+        </van-cell-group>
+        
         <p>事件内容:</p>
-        <div v-html="info.eventContent" class="showhtml"> </div>
+          <div v-html="info.eventContent" class="showhtml"> </div>
       </div>
-      <van-button v-if="canAudit" type="primary" class="btn-sub" @click="update">审核</van-button>
+      <van-button
+        v-if="info.assessment == 0"
+        type="primary"
+        class="btn-sub"
+        @click="update"
+        >审核</van-button
+      >
     </div>
   </template>
     
     <script>
-  import { ref } from "vue";
+  import { ref, onMounted } from "vue";
   import nonReligiousInformationService from "@/api/nonReligiousInformation/nonReligiousInformationService";
   import UserManage from "@/api/user/UserManage";
   import { useRoute } from "vue-router";
+  import $base from "@/utils/config";
   export default {
     setup() {
+      const onClickLeft = () => {
+        history.back();
+      };
+      // 加载
       let isLoading = ref(true);
-      let canAudit = ref(false);
       // 活动信息
-      const info = ref({        
+      const info = ref({      
+        siteName:{id:"",organizationName:""},
       });
+      // 文件
+      let fileList = ref([]);
       let route = useRoute();
-      new nonReligiousInformationService().queryById(route.query.id).then((data) => {
-        info.value = data;
-        if(data.assessment=="0"){
-          canAudit.value = true;
-        }else{
-          canAudit.value = false;
-        }      
+      onMounted(() => {
+        new nonReligiousInformationService().queryById(route.query.id).then((data) => {
+          info.value = data;  
+          info.value.nonReligiousCategoriesName=getCategories(info.value.nonReligiousCategories)
 
-        isLoading.value = false;
+          isLoading.value = false;
+        });
       });
-
       // 审核通过
       const update = () => {
         isLoading.value = true;
         info.value.assessment = 1;
         new nonReligiousInformationService().save(info.value).then((res) => {
-          console.log(res);
+
           isLoading.value = false;
           window.xm.showToast({
              message:"审核成功!"
@@ -109,9 +174,10 @@
         
 
       return {
+        onClickLeft,
         info,
+        fileList,
         isLoading,
-        canAudit,
         update,
         getCategories,
       };
@@ -119,52 +185,22 @@
   };
   </script>
     
-  <style lang="less">
-  .main {
-    background: #fff;
-    position: relative;
-    top: 40px;
-  }
-  .banner {
-    background-color: #36a7f3;
-    padding: 20px 50px 40px 50px;
-    color: #fff;
-    h2 {
-      &:nth-child(1) {
-        margin-top: 0px;
-        text-align: left;
-      }
-      &:nth-child(2) {
-        text-align: center;
-      }
-      &:nth-child(3) {
-        text-align: right;
-      }
-    }
-  }
-  .info {
-    position: relative;
-    width: 86vw;
-    margin: 10px auto;
-    padding: 10px;
-    background: #fff;
-    border-radius: 20px;
-    top: -50px;
-    font-size: 14px;
+<style lang="less">
+    .van-cell__value .van-field__right-icon .van-icon-location {
+    color: #36a7f3 !important;
   }
   .btn-sub {
     width: 90%;
     border-radius: 20px;
     margin-left: 5%;
+    margin-bottom: 40px;
+    margin-top: -100px;
   }
   .van-loading {
     text-align: center;
     margin-top: 80px;
   }
-  .showhtml{
-      margin: 5px;
-      padding: 10px;
-      border: 1px solid #ccc;
-      border-radius: 12px;
-    }
+  .van-popup--center {
+    width: 98% !important;
+  }
   </style>

+ 264 - 149
src/views/activityMan/nonReligiousInformation/nonReligiousInformationList.vue

@@ -1,95 +1,165 @@
 <template>
   <van-nav-bar
+    fixed
     title="其他有害信息"
     left-text=""
-    right-text="上报"
     left-arrow
     @click-left="onClickLeft"
     @click-right="onClickRight"
-  />
-  <van-search v-model="value" shape="round" placeholder="请输入搜索关键词" />
-  <van-tabs
-    v-model:active="active"
-    title-inactive-color="#bdbdbd"
-    title-active-color="#36a7f3"
-    @click-tab="onClickTab"
   >
-    <van-tab title="未审核" name="0">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        finished-text="没有更多了"
-        @load="onLoad"
-      >
-        <van-swipe-cell
-          v-for="item in list"
-          :key="item"
-          :before-close="beforeClose"
+    <template #right>
+      <van-icon name="plus" size="18" />
+    </template>
+  </van-nav-bar>
+
+
+  <div class="main">
+    <van-search
+      v-model="searchVal"
+      readonly="true"
+      clearable
+      show-action
+      shape="round"
+      placeholder="请选择"
+      label="组织名称"
+      input-align="center"
+      @search="onSearch"
+      @cancel="onCancel"
+      @click-input="showPlace = true"
+    />
+    <van-popup v-model:show="showPlace" round position="bottom">
+      <van-picker
+        title="组织选择"
+        :columns="places"
+        :columns-field-names="customFieldName"
+        @cancel="showPlace = false"
+        @confirm="getPlace"
+      />
+    </van-popup>
+    <van-tabs
+      v-show="!searchShow"
+      v-model:active="active"
+      title-inactive-color="#bdbdbd"
+      title-active-color="#36a7f3"
+      @click-tab="onClickTab"
+    >
+      <van-tab title="未审核" name="0">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          finished-text="没有更多了"
+          @load="onLoad"
         >
-          <div class="list_item" @click="goInfo(item.id)">
-            <div class="item-left">
-              <p style="color: #c4c4c4">{{ item.updateDate }}</p>
-              <p style="color: red">待审核</p>
+          <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.updateDate }}
+                </p>
+                <p style="color: red">待审核</p>
+              </div>
+              <van-cell>
+                <template #title>
+                  {{ item.siteName.organizationName }}({{ getCategories(item.nonReligiousCategories) }})
+                </template>
+                <template #label>
+                  {{ item.eventOverview }}
+                </template>
+              </van-cell>
             </div>
-            <van-cell is-link >
-              <template #title >
-                {{ getCategories(item.nonReligiousCategories) }}({{ item.placeSelectName }})
-              </template>
-              <template #label>
-                {{ item.siteName.organizationName }}
-              </template>
-            </van-cell>
-            
-          </div>
-          <template #right>
-            <van-button square type="danger" text="删除" class="button" />
-            <van-button
-              square
-              type="primary"
-              text="修改"
-              class="button"
-              @click="updateItem(item)"
-            />
-          </template>
-        </van-swipe-cell>
-      </van-list>
-    </van-tab>
-    <van-tab title="已审核" name="1">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        finished-text="没有更多了"
-        @load="onLoad"
-      >
-        <van-swipe-cell
-          v-for="item in list"
-          :key="item"
-          :before-close="beforeClose"
+            <template #right>
+              <van-button
+                square
+                type="danger"
+                text="删除"
+                class="button"
+                @click="deleteItem(item.id)"
+              />
+              <van-button
+                square
+                type="primary"
+                text="修改"
+                class="button"
+                @click="updateItem(item)"
+              />
+            </template>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+      <van-tab title="已审核" name="1">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          finished-text="没有更多了"
+          @load="onLoad"
         >
-          <div class="list_item" @click="goInfo(item.id)">
-            <div class="item-left">
-              <p style="color: #c4c4c4">{{ item.updateDate }}</p>
-              <p style="color: gray">已审核</p>
+          <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.updateDate }}
+                </p>
+                <p style="color: gray">已审核</p>
+              </div>
+              <van-cell>
+                <template #title>
+                  {{ item.siteName.organizationName }}({{ getCategories(item.nonReligiousCategories) }})
+                </template>
+                <template #label>
+                  {{ item.eventOverview }}
+                </template>
+              </van-cell>
             </div>
-            <van-cell is-link >
-              <template #title >
-                {{ getCategories(item.nonReligiousCategories) }}({{ item.placeSelectName }})
-              </template>
-              <template #label>
-                {{ item.siteName.organizationName }}
-              </template>
-            </van-cell>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+    </van-tabs>
+    <!-- 搜索结果 -->
+    <van-list
+      v-show="searchShow"
+      v-model:loading="loading"
+      :finished="finished"
+      finished-text="没有更多了"
+      @load="onLoad"
+    >
+      <van-swipe-cell v-for="item in searchList" :key="item">
+        <div class="list_item" @click="goInfo(item.id)">
+          <div class="item-left">
+            <p style="color: #c4c4c4">
+              {{ item.updateDate }}
+            </p>
+            <p style="color: red">
+              <span v-if="item.assessment == 1">已审核</span>
+              <span v-else>待审核</span>
+            </p>
           </div>
-        </van-swipe-cell>
-      </van-list>
-    </van-tab>
-  </van-tabs>
+          <van-cell>
+            <template #title>
+              {{ item.siteName.organizationName }}({{ getCategories(item.nonReligiousCategories) }})
+            </template>
+            <template #label>
+              {{ item.eventOverview }}
+            </template>
+          </van-cell>
+        </div>
+      </van-swipe-cell>
+    </van-list>
+    <van-dialog
+      v-model:show="showDel"
+      show-cancel-button
+      confirmButtonText="删除"
+      message="请确认删除该记录"
+      @confirm="Itemdel"
+    >
+    </van-dialog>
+  </div>
 </template>
 
 <script>
 import { ref } from "vue";
 import router from "@/router";
 import nonReligiousInformationService from "@/api/nonReligiousInformation/nonReligiousInformationService";
+import tools from "@/api/sys/tools";
 export default {
 name: "nonReligiousInformationList",
 setup() {
@@ -99,43 +169,40 @@ setup() {
   const onClickRight = () => {
     router.push("/nonReligiousInformationView");
   };
-  let tabIndex = ref(0);
-  
-  //tab切换
   let active = ref(0);
-  const onClickTab = (val) => {
+  let list = ref([]);
+  const loading = ref(false);
+  const finished = ref(false);
+  let index = 0;
+  //tab切换
+  const onClickTab= ({name}) => {
+
     // 清空列表数据
     finished.value = false;
     list.value = [];
-    // 重新加载数据
-    // 将 loading 设置为 true,表示处于加载状态
     loading.value = true;
+
     index = 0;
-    if (val.name == 0) {
-      onLoad(0);
-    } else {
-      onLoad(1);
-    }
+    onLoad();
   };
-  // 列表
-  let list = ref([]);
-  const loading = ref(false);
-  const finished = ref(false);
-  let index = 0;
   const onLoad = (val) => {
-    // 异步更新数据
+    loading.value = true;
+    finished.value = false;
+    // 异步更新数据active绑定的是标签中的name值
+
     new nonReligiousInformationService()
       .list({
         current: index + 1,
         size: 10,
-        assessment:val ? val : 0,
+        assessment:active.value,
+        siteName:{id:searchValId.value}
       })
       .then((res) => {
         list.value.push(...res.records) ;
         // 加载状态结束
         loading.value = false;        
         // 数据全部加载完成
-        if (res.records.length < 10) {
+        if (res.pages <= index + 1) {
           finished.value = true;
         }
         index++;        
@@ -191,22 +258,90 @@ setup() {
   
   
   // 搜索
-  let value = ref("");
-  // 删除确认
-  const beforeClose = ({ position }) => {
-    switch (position) {
-      case "left":
-      case "cell":
-      case "outside":
-        return true;
-      case "right":
-        return new Promise((resolve) => {
-          showConfirmDialog({
-            title: "确定删除吗?",
-          }).then(resolve);
-        });
+  let searchShow = ref(false);
+  let searchList = ref([]);
+  const searchVal = ref("");
+  const searchValId = ref("");    
+  const onSearch = () => {
+    searchShow.value = true;
+    searchList.value = [];
+    new siteInspectionService()
+      .list({
+        current: 1,
+        size: 10000,
+        activityName: searchVal.value,
+      })
+      .then(({ records }) => {
+        searchList.value.push(...records);
+        // 加载状态结束
+        loading.value = false;
+      });
+  };
+  const onCancel = () => {
+    searchVal.value = "";
+    searchValId.value = "";
+    searchShow.value = false;
+
+    finished.value = false;
+    list.value = [];
+    loading.value = true;
+    index = 0;
+    onLoad();
+  };
+
+  // 组织名称
+  let places = ref([]);
+  const customFieldName = {
+    text: "organizationName",
+    value: "id",
+  };
+  new tools()
+    .NonReligiousInformationOrgList({
+      current: 1,
+      size: 10000,
+      organizationType:"",
+    })
+    .then(({ records }) => {
+      places.value.push(...records);
+    });
+  let showPlace = ref(false);
+  const getPlace = ({ selectedOptions }) => {
+    if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
+      showPlace.value = false;
+      searchVal.value=selectedOptions[0].organizationName;
+      searchValId.value=selectedOptions[0].id;
+
+      finished.value = false;
+      list.value = [];
+      loading.value = true;
+      index = 0;
+      onLoad();
     }
   };
+  
+  // 删除确认
+  let showDel = ref(false);
+  let ids = ref("");
+  const deleteItem = (val) => {
+    showDel.value = true;
+    ids.value = val;
+  };
+  // 删除
+  const Itemdel = () => {
+    new siteInspectionService().delete(ids.value).then((res) => {
+      index = 0;
+      loading.value = true;
+      list.value = [];
+      onLoad();
+    });
+  };
+  // 修改跳转
+  const updateItem = (val) => {
+    router.push({
+      path: "/nonReligiousInformationView",
+      query: { id: val.id },
+    });
+  };
   // 详情跳转
   const goInfo = (val) => {
       router.push({
@@ -215,58 +350,38 @@ setup() {
       });
     };
   return {
-    onClickLeft,
+    active,
     onClickTab,
+    onClickLeft,
+    onClickRight,
+    //列表
     list,
     onLoad,
-    getCategories,
     loading,
     finished,
-    value,    
-    onClickRight,
-    tabIndex,
+    //搜索
+    searchShow,
+    searchVal,
+    searchValId,
+    searchList,
+    onSearch,
+    onCancel,   
+    // 场所
+    customFieldName,
+    showPlace,
+    places,
+    getPlace,
+
+    deleteItem,
+    updateItem,
     goInfo,
-    beforeClose,
+    showDel,
+    Itemdel, 
+    getCategories,
   };
 },
 };
 </script>
 
-<style>
-body {
-background: #f5f5f5;
-}
-.nav_tab {
-width: 100vw;
-display: flex;
-text-align: center;
-background: #fff;
-margin: 10px 0;
-}
-.tab {
-flex: 1;
-line-height: 40px;
-font-size: 14px;
-}
-.active {
-background: #36a7f3;
-color: #fff;
-}
-.van-list {
-height: 80%;
-margin-top: 5px;
-}
-.list_item {
-display: flex;
-background: #fff;
-}
-.item-left {
-text-align: center;
-width: 30%;
-font-size: 12px;
-border-right: 1px solid #eee;
-}
-.button {
-height: 100%;
-}
+<style scoped>
 </style>

+ 115 - 81
src/views/activityMan/religiousConference/religiousConferenceInfo.vue

@@ -1,53 +1,122 @@
 <template>
-    <van-loading size="16px" v-if="isLoading" >加载中...</van-loading>
-    <div class="main" v-if="!isLoading">
+  <van-nav-bar
+      fixed
+      title="负责人会议上报情况"
+      left-text=""
+      left-arrow
+      @click-left="onClickLeft"
+    />
+    <van-loading size="16px" v-show="isLoading">加载中...</van-loading>
+
+    <div class="main" v-show="!isLoading">
       <div class="banner">
-        <h2>扎实提升“三力”</h2>
-        <h2>深入推进“三化”</h2>
-        <h2>坚持“三个思维”</h2>
+        <img src="../../../../public/loginbg/banner.jpg" alt="" />
       </div>
       <div class="info">
-        <p>会议地点:{{ info.placeSelectName }}</p>
-        <p>详细地址:{{ info.venueDetailed }}</p>
-        <p>会议时间:{{ info.meetingTime }}</p>
-        <p>会议场所:{{ info.siteName.name }}</p>
-        <p>参会人员:{{ info.participants.name }}</p>
+        <p class="miniTitle">详细信息</p>
+        
+        <van-cell-group>
+          <van-field
+            v-model="info.placeSelectName"
+            readonly
+            label="会议地点:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.venueDetailed"
+            center
+            readonly
+            label="详细地址:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.meetingTime"
+            center
+            readonly
+            label="会议时间:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.siteName.name"
+            center
+            readonly
+            label="会议场所:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.participants.name"
+            center
+            readonly
+            label="参会人员:"
+            input-align="right"
+          />
+        </van-cell-group>
+        
         <p>会议议题:</p>
           <div v-html="info.meetingTopics" class="showhtml"> </div>
       </div>
-      <van-button v-if="canAudit" type="primary" class="btn-sub" @click="update">审核</van-button>
-    </div>
+      <van-button
+        v-if="info.assessment == 0"
+        type="primary"
+        class="btn-sub"
+        @click="update"
+        >审核</van-button
+      >
+    </div> 
   </template>
     
     <script>
-  import { ref } from "vue";
-  import { useRoute } from "vue-router";
+  import { ref, onMounted } from "vue";
   import religiousConferenceService from "@/api/religiousConference/religiousConferenceService";  
+  import UserManage from "@/api/user/UserManage";
+  import { useRoute } from "vue-router";
+  import $base from "@/utils/config";
+  
   export default {
     setup() {
+      const onClickLeft = () => {
+        history.back();
+      };
+      // 加载
       let isLoading = ref(true);
-      let canAudit = ref(false);
       // 活动信息
-      const info = ref({     
+      const info = ref({    
+        siteName:{id:"",name:""},
+        participants:{id:"",name:""},
         meetingTopics:"",  
       });
+      // 文件
+      let fileList = ref([]);
       let route = useRoute();
-      new religiousConferenceService().queryById(route.query.id).then((data) => {
-        info.value = data;
-        if(data.assessment=="0"){
-          canAudit.value = true;
-        }else{
-          canAudit.value = false;
-        }      
-        console.log(info.value.meetingTopics);
-        isLoading.value = false;
+      onMounted(() => {
+        new religiousConferenceService().queryById(route.query.id).then((data) => {
+          info.value = data;
+     
+          let ids = data.participants.id.split(",");
+          info.value.participants.name = "";
+          ids.forEach((item) => {
+            new UserManage().queryById(item).then((data) => {
+              info.value.participants.name += data.name + ",";
+            });
+          });
+
+          isLoading.value = false;
+        });
       });
       // 审核通过
       const update = () => {
         isLoading.value = true;
         info.value.assessment = 1;
         new religiousConferenceService().save(info.value).then((res) => {
-          console.log(res);
+
           isLoading.value = false;
           window.xm.showToast({
              message:"审核成功!"
@@ -56,9 +125,10 @@
         });
       };
       return {
+        onClickLeft,
         info,
+        fileList,
         isLoading,
-        canAudit,
         update,
       };
     },
@@ -66,57 +136,21 @@
   </script>
     
     <style lang="less">
-    .main {
-      background: #fff;
-      position: relative;
-      top: 40px;
-    }
-    .banner {
-      background-color: #36a7f3;
-      padding: 20px 50px 40px 50px;
-      color: #fff;
-      h2 {
-        &:nth-child(1) {
-          margin-top: 0px;
-          text-align: left;
-        }
-        &:nth-child(2) {
-          text-align: center;
-        }
-        &:nth-child(3) {
-          text-align: right;
-        }
-      }
-    }
-    .info {
-      position: relative;
-      width: 86vw;
-      // height: 120px;
-      margin: 10px auto;
-      padding: 10px;
-      background: #fff;
-      border-radius: 20px;
-      top: -50px;
-      font-size: 14px;
-    }
-    .btn-sub {
-      width: 90%;
-      border-radius: 20px;
-      margin-left: 5%;
-    }
-    .van-loading {
-      text-align: center;
-      margin-top: 80px;
-    }
-    #editor {
-      width: 100%;
-      height: 150px;
-      overflow: hidden;
-    }
-    .showhtml{
-      margin: 5px;
-      padding: 10px;
-      border: 1px solid #ccc;
-      border-radius: 12px;
-    }
-    </style>
+    .van-cell__value .van-field__right-icon .van-icon-location {
+    color: #36a7f3 !important;
+  }
+  .btn-sub {
+    width: 90%;
+    border-radius: 20px;
+    margin-left: 5%;
+    margin-bottom: 40px;
+    margin-top: -100px;
+  }
+  .van-loading {
+    text-align: center;
+    margin-top: 80px;
+  }
+  .van-popup--center {
+    width: 98% !important;
+  }
+  </style>

+ 278 - 152
src/views/activityMan/religiousConference/religiousConferenceList.vue

@@ -1,95 +1,176 @@
 <template>
   <van-nav-bar
+    fixed
     title="负责人会议"
     left-text=""
-    right-text="上报"
     left-arrow
     @click-left="onClickLeft"
     @click-right="onClickRight"
-  />
-  <van-search v-model="value" shape="round" placeholder="请输入搜索关键词" />
-  <van-tabs
-    v-model:active="active"
-    title-inactive-color="#bdbdbd"
-    title-active-color="#36a7f3"
-    @click-tab="onClickTab"
   >
-    <van-tab title="未审核" name="0">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        finished-text="没有更多了"
-        @load="onLoad"
-      >
-        <van-swipe-cell
-          v-for="item in list"
-          :key="item"
-          :before-close="beforeClose"
+    <template #right>
+      <van-icon name="plus" size="18" />
+    </template>
+  </van-nav-bar>
+
+<div class="main">
+    <van-search
+      v-model="searchVal"
+      readonly="true"
+      clearable
+      show-action
+      shape="round"
+      placeholder="请选择"
+      label="场所名称"
+      input-align="center"
+      @search="onSearch"
+      @cancel="onCancel"
+      @click-input="showPlace = true"
+    />
+    <van-popup v-model:show="showPlace" round position="bottom">
+      <van-picker
+        title="场所选择"
+        :columns="places"
+        :columns-field-names="customFieldName"
+        @cancel="showPlace = false"
+        @confirm="getPlace"
+      />
+    </van-popup>
+    <van-tabs
+      v-show="!searchShow"
+      v-model:active="active"
+      title-inactive-color="#bdbdbd"
+      title-active-color="#36a7f3"
+      @click-tab="onClickTab"
+    >
+      <van-tab title="未审核" name="0">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          finished-text="没有更多了"
+          @load="onLoad"
         >
-          <div class="list_item" @click="goInfo(item.id)">
-            <div class="item-left">
-              <p style="color: #c4c4c4">{{ item.updateDate }}</p>
-              <p style="color: red">待审核</p>
+          <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.updateDate }}
+                </p>
+                <p style="color: red">待审核</p>
+              </div>
+              <van-cell>
+                <template #title>
+                  {{ item.siteName.name }}({{ item.meetingTime }})
+                  <!-- <van-text-ellipsis
+                    rows="2"
+                    :content="`${item.siteName.name}(${ item.placeDel})`"
+                  /> -->
+                </template>
+                <template #label>
+                  {{ item.participants.name }}
+                </template>
+              </van-cell>
             </div>
-            <van-cell is-link>
-              <template #title >
-                {{ item.siteName.name }}({{ item.meetingTime }})
-              </template>
-              <template #label>
-                {{ item.participants.name }}
-              </template>
-            </van-cell>
-            
-          </div>
-          <template #right>
-            <van-button square type="danger" text="删除" class="button" />
-            <van-button
-              square
-              type="primary"
-              text="修改"
-              class="button"
-              @click="updateItem(item)"
-            />
-          </template>
-        </van-swipe-cell>
-      </van-list>
-    </van-tab>
-    <van-tab title="已审核" name="1">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        finished-text="没有更多了"
-        @load="onLoad"
-      >
-        <van-swipe-cell
-          v-for="item in list"
-          :key="item"
-          :before-close="beforeClose"
+            <template #right>
+              <van-button
+                square
+                type="danger"
+                text="删除"
+                class="button"
+                @click="deleteItem(item.id)"
+              />
+              <van-button
+                square
+                type="primary"
+                text="修改"
+                class="button"
+                @click="updateItem(item)"
+              />
+            </template>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+      <van-tab title="已审核" name="1">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          finished-text="没有更多了"
+          @load="onLoad"
         >
-          <div class="list_item" @click="goInfo(item.id)">
-            <div class="item-left">
-              <p style="color: #c4c4c4">{{ item.updateDate }}</p>
-              <p style="color: gray">已审核</p>
-            </div>            
-            <van-cell is-link>
-              <template #title >
-                {{ item.siteName.name }}({{ item.meetingTime }})
-              </template>
-              <template #label>
-                {{ item.participants.name }}
-              </template>
-            </van-cell>
+          <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.updateDate }}
+                </p>
+                <p style="color: gray">已审核</p>
+              </div>
+              <van-cell>
+                <template #title>
+                  {{ item.siteName.name }}({{ item.meetingTime }})
+                    <!-- <van-text-ellipsis
+                      rows="2"
+                      :content="`${item.siteName.name}(${ item.placeDel})`"
+                    /> -->
+                </template>
+                <template #label>
+                  {{ item.participants.name }}
+                </template>
+              </van-cell>
+            </div>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+    </van-tabs>
+    <!-- 搜索结果 -->
+    <van-list
+      v-show="searchShow"
+      v-model:loading="loading"
+      :finished="finished"
+      finished-text="没有更多了"
+      @load="onLoad"
+    >
+      <van-swipe-cell v-for="item in searchList" :key="item">
+        <div class="list_item" @click="goInfo(item.id)">
+          <div class="item-left">
+            <p style="color: #c4c4c4">
+              {{ item.updateDate }}
+            </p>
+            <p style="color: red">
+              <span v-if="item.assessment == 1">已审核</span>
+              <span v-else>待审核</span>
+            </p>
           </div>
-        </van-swipe-cell>
-      </van-list>
-    </van-tab>
-  </van-tabs>
+          <van-cell>
+            <template #title>
+              {{ item.siteName.name }}({{ item.meetingTime }})
+              <!-- <van-text-ellipsis
+                rows="2"
+                :content="`${item.siteName.name}(${ item.placeDel})`"
+              /> -->
+            </template>
+            <template #label>
+              {{ item.participants.name }}
+            </template>
+          </van-cell>
+        </div>
+      </van-swipe-cell>
+    </van-list>
+    <van-dialog
+      v-model:show="showDel"
+      show-cancel-button
+      confirmButtonText="删除"
+      message="请确认删除该记录"
+      @confirm="Itemdel"
+    >
+    </van-dialog>
+  </div>
 </template>
 
 <script>
 import { ref } from "vue";
 import router from "@/router";
 import religiousConferenceService from "@/api/religiousConference/religiousConferenceService";
+import tools from "@/api/sys/tools";
 export default {
 name: "religiousConferenceList",
 setup() {
@@ -99,125 +180,170 @@ setup() {
   const onClickRight = () => {
     router.push("/religiousConferenceView");
   };
-  let tabIndex = ref(0);
+  let active = ref(0);
+  let list = ref([]);
+  const loading = ref(false);
+  const finished = ref(false);
+  let index = 0;
   
   //tab切换
-  let active = ref(0);
-  const onClickTab = (val) => {
+  const onClickTab= ({name}) => {
+
     // 清空列表数据
     finished.value = false;
     list.value = [];
-    // 重新加载数据
-    // 将 loading 设置为 true,表示处于加载状态
     loading.value = true;
+
     index = 0;
-    if (val.name == 0) {
-      onLoad(0);
-    } else {
-      onLoad(1);
-    }
+    onLoad();
   };
-  // 列表
-  let list = ref([]);
-  const loading = ref(false);
-  const finished = ref(false);
-  let index = 0;
+
   const onLoad = (val) => {
-    // 异步更新数据
-    console.log(val);
+    loading.value = true;
+    finished.value = false;
+    // 异步更新数据active绑定的是标签中的name值
+
     new religiousConferenceService()
       .list({
         current: index + 1,
         size: 10,
-        assessment:val ? val : 0,
+        assessment:active.value,
+        siteName:{id:searchValId.value}
       })
       .then((res) => {
         list.value.push(...res.records) ;
         // 加载状态结束
         loading.value = false;        
         // 数据全部加载完成
-        if (res.records.length < 10) {
+        if (res.pages <= index + 1) {
           finished.value = true;
         }
         index++;
       });
   };
   // 搜索
-  let value = ref("");
-  // 删除确认
-  const beforeClose = ({ position }) => {
-    switch (position) {
-      case "left":
-      case "cell":
-      case "outside":
-        return true;
-      case "right":
-        return new Promise((resolve) => {
-          showConfirmDialog({
-            title: "确定删除吗?",
-          }).then(resolve);
+    let searchShow = ref(false);
+    let searchList = ref([]);
+    const searchVal = ref("");
+    const searchValId = ref("");    
+    const onSearch = () => {
+      searchShow.value = true;
+      searchList.value = [];
+      new siteInspectionService()
+        .list({
+          current: 1,
+          size: 10000,
+          activityName: searchVal.value,
+        })
+        .then(({ records }) => {
+          searchList.value.push(...records);
+          // 加载状态结束
+          loading.value = false;
         });
-    }
-  };
-  // 详情跳转
-  const goInfo = (val) => {
+    };
+    const onCancel = () => {
+      searchVal.value = "";
+      searchValId.value = "";
+      searchShow.value = false;
+
+      finished.value = false;
+      list.value = [];
+      loading.value = true;
+      index = 0;
+      onLoad();
+    };
+
+    // 场所名称
+    let places = ref([]);
+    const customFieldName = {
+      text: "name",
+      value: "id",
+    };
+    new tools()
+      .placeList({
+        current: 1,
+        size: 10000,
+      })
+      .then(({ records }) => {
+        places.value.push(...records);
+      });
+    let showPlace = ref(false);
+    const getPlace = ({ selectedOptions }) => {
+      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
+        showPlace.value = false;
+        searchVal.value=selectedOptions[0].name;
+        searchValId.value=selectedOptions[0].id;
+
+        finished.value = false;
+        list.value = [];
+        loading.value = true;
+        index = 0;
+        onLoad();
+      }
+    };
+    
+    // 删除确认
+    let showDel = ref(false);
+    let ids = ref("");
+    const deleteItem = (val) => {
+      showDel.value = true;
+      ids.value = val;
+    };
+    // 删除
+    const Itemdel = () => {
+      new siteInspectionService().delete(ids.value).then((res) => {
+        index = 0;
+        loading.value = true;
+        list.value = [];
+        onLoad();
+      });
+    };
+    // 修改跳转
+    const updateItem = (val) => {
+      router.push({
+        path: "/religiousConferenceView",
+        query: { id: val.id },
+      });
+    };
+    // 详情跳转
+    const goInfo = (val) => {
       router.push({
         path: "/religiousConferenceInfo",
         query: { id: val },
       });
     };
   return {
-    onClickLeft,
+   active,
     onClickTab,
+    onClickLeft,
+    onClickRight,
+    //列表
     list,
     onLoad,
     loading,
     finished,
-    value,
-    onClickRight,
-    tabIndex,
+    //搜索
+    searchShow,
+    searchVal,
+    searchValId,
+    searchList,
+    onSearch,
+    onCancel,   
+    // 场所
+    customFieldName,
+    showPlace,
+    places,
+    getPlace,
+
+    deleteItem,
+    updateItem,
     goInfo,
-    beforeClose,
+    showDel,
+    Itemdel, 
   };
 },
 };
 </script>
 
-<style>
-body {
-background: #f5f5f5;
-}
-.nav_tab {
-width: 100vw;
-display: flex;
-text-align: center;
-background: #fff;
-margin: 10px 0;
-}
-.tab {
-flex: 1;
-line-height: 40px;
-font-size: 14px;
-}
-.active {
-background: #36a7f3;
-color: #fff;
-}
-.van-list {
-height: 80%;
-margin-top: 5px;
-}
-.list_item {
-display: flex;
-background: #fff;
-}
-.item-left {
-text-align: center;
-width: 30%;
-font-size: 12px;
-border-right: 1px solid #eee;
-}
-.button {
-height: 100%;
-}
+<style scoped>
 </style>

+ 137 - 73
src/views/activityMan/securityFacilitiesErr/securityFacilitiesErrInfo.vue

@@ -1,70 +1,158 @@
 <template>
+  <van-nav-bar
+      fixed
+      title="安防设施异常情况"
+      left-text=""
+      left-arrow
+      @click-left="onClickLeft"
+    />
+    <van-loading size="16px" v-show="isLoading">加载中...</van-loading>
 
-    <van-loading size="16px" v-if="isLoading">加载中...</van-loading>
-    <div class="main" v-if="!isLoading">
+    <div class="main" v-show="!isLoading">
       <div class="banner">
-        <h2>扎实提升“三力”</h2>
-        <h2>深入推进“三化”</h2>
-        <h2>坚持“三个思维”</h2>
+        <img src="../../../../public/loginbg/banner.jpg" alt="" />
       </div>
       <div class="info">
-        <p>场所名称:{{ info.siteName.name }}</p>
-        <p v-if="info.facilityType=='1'">设施类型:消防设备</p>
-        <p v-if="info.facilityType=='0'">设施类型:监控、音频</p>
-        <p v-if="info.facilityType=='1'">场所消防点位:{{ info.siteFireProtection.name }}</p>
-        <p v-if="info.facilityType=='0'">视频音频点位:{{ info.videoAudioPoint.name }}</p>
-        <p>位&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;置:{{ info.position }}</p>
-        <p>
-          附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件:
-          <span v-if="fileList.length != 0" style="color: #6892ff">{{
-            fileList[0].name
-          }}</span>
-          <span v-else style="color: red">无</span>
-        </p>
-        <p>异常内容:{{ info.abnormalContent }}</p>
+        <p class="miniTitle">详细信息</p>
+        
+        <van-cell-group>
+          <van-field
+            v-model="info.siteName.name"
+            readonly
+            label="场所名称:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.facilityTypeName"
+            center
+            readonly
+            label="设施类型:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group v-if="info.facilityType=='1'">
+          <van-field
+            v-model="info.siteFireProtection.name"
+            center
+            readonly
+            label="场所消防点位:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group v-else>
+          <van-field
+            v-model="info.videoAudioPoint.name"
+            center
+            readonly
+            label="视频音频点位:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.position"
+            center
+            readonly
+            clearable
+            label="位置:"
+            input-align="right"
+          />
+          <template #right-icon>
+            <van-icon name="location" />
+          </template>
+        </van-cell-group>
+        
+        <van-cell-group>
+          <van-field
+            name="uploader"
+            readonly
+            label="附件:"
+            input-align="right"
+          >
+            <template #input>
+              <span v-show="fileList.length == 0">无</span>
+              <van-uploader
+                v-show="fileList.length != 0"
+                v-model="fileList"
+                :max-count="fileList.length"
+                capture="camera"
+                accept=""
+              >
+              </van-uploader>
+            </template>
+          </van-field>
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.abnormalContent"
+            center
+            readonly
+            label="异常内容:"
+            input-align="right"
+          />
+        </van-cell-group>  
       </div>
-      <van-button v-if="canAudit" type="primary" class="btn-sub" @click="update">审核</van-button>
-    </div>
+      <van-button
+        v-if="info.assessment == 0"
+        type="primary"
+        class="btn-sub"
+        @click="update"
+        >审核</van-button
+      >
+    </div> 
   </template>
     
     <script>
-  import { ref } from "vue";
+  import { ref, onMounted } from "vue";
   import securityFacilitiesErrService from "@/api/securityFacilitiesErr/securityFacilitiesErrService";
   import UserManage from "@/api/user/UserManage";
   import { useRoute } from "vue-router";
+  import $base from "@/utils/config";
   export default {
     setup() {
+      const onClickLeft = () => {
+        history.back();
+      };
+      // 加载
       let isLoading = ref(true);
-      let canAudit = ref(false);
       // 活动信息
-      const info = ref({        
+      const info = ref({     
+        siteName:{id:'',name:""},
+        siteFireProtection:{id:'',name:""},
+        videoAudioPoint:{id:'',name:""}
       });
+      // 文件
       let fileList = ref([]);
       let route = useRoute();
-      new securityFacilitiesErrService().queryById(route.query.id).then((data) => {
-        info.value = data;
-        if(data.assessment=="0"){
-          canAudit.value = true;
-        }else{
-          canAudit.value = false;
-        }      
-
-        info.value.enclosure.split("|").forEach((item) => {
-          if (item.trim().length > 0) {
-            fileList.value.push({
-              name: decodeURIComponent(item.substring(item.lastIndexOf("/") + 1)),
-              url: item,
-            });
+      onMounted(() => {
+        new securityFacilitiesErrService().queryById(route.query.id).then((data) => {
+          info.value = data;  
+          if(info.value.facilityType=='1'){
+            info.value.facilityTypeName="消防设备";
+          }else{
+            info.value.facilityTypeName="监控、音频";
           }
+
+          info.value.enclosure.split("|").forEach((item) => {
+            if (item.trim().length > 0) {
+              fileList.value.push({
+                name: decodeURIComponent(item.substring(item.lastIndexOf("/") + 1)),
+                url: $base + item.replace('程序附件//','程序附件/'),
+              });
+            }
+          });
+          isLoading.value = false;
         });
-        isLoading.value = false;
       });
+
       // 审核通过
       const update = () => {
         isLoading.value = true;
         info.value.assessment = 1;
         new securityFacilitiesErrService().save(info.value).then((res) => {
-          console.log(res);
+
           isLoading.value = false;
           window.xm.showToast({
              message:"审核成功!"
@@ -73,56 +161,32 @@
         });
       };
       return {
+        onClickLeft,
         info,
+        fileList,
         isLoading,
         update,
-        fileList,
-        canAudit,
       };
     },
   };
   </script>
     
   <style lang="less">
-  .main {
-    background: #fff;
-    position: relative;
-    top: 40px;
-  }
-  .banner {
-    background-color: #36a7f3;
-    padding: 20px 50px 40px 50px;
-    color: #fff;
-    h2 {
-      &:nth-child(1) {
-        margin-top: 0px;
-        text-align: left;
-      }
-      &:nth-child(2) {
-        text-align: center;
-      }
-      &:nth-child(3) {
-        text-align: right;
-      }
-    }
-  }
-  .info {
-    position: relative;
-    width: 86vw;
-    margin: 10px auto;
-    padding: 10px;
-    background: #fff;
-    border-radius: 20px;
-    top: -50px;
-    font-size: 14px;
+    .van-cell__value .van-field__right-icon .van-icon-location {
+    color: #36a7f3 !important;
   }
   .btn-sub {
     width: 90%;
     border-radius: 20px;
     margin-left: 5%;
+    margin-bottom: 40px;
+    margin-top: -100px;
   }
   .van-loading {
     text-align: center;
     margin-top: 80px;
   }
+  .van-popup--center {
+    width: 98% !important;
+  }
   </style>

+ 307 - 166
src/views/activityMan/securityFacilitiesErr/securityFacilitiesErrList.vue

@@ -1,110 +1,192 @@
 <template>
   <van-nav-bar
+    fixed
     title="安防设施异常"
     left-text=""
-    right-text="上报"
     left-arrow
     @click-left="onClickLeft"
     @click-right="onClickRight"
-  />
-  <van-search v-model="value" shape="round" placeholder="请输入搜索关键词" />
-  <van-tabs
-    v-model:active="active"
-    title-inactive-color="#bdbdbd"
-    title-active-color="#36a7f3"
-    @click-tab="onClickTab"
   >
-    <van-tab title="未审核" name="0">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        finished-text="没有更多了"
-        @load="onLoad"
-      >
-        <van-swipe-cell
-          v-for="item in list"
-          :key="item"
-          :before-close="beforeClose"
+      <template #right>
+        <van-icon name="plus" size="18" />
+      </template>
+  </van-nav-bar>
+
+
+
+
+  <div class="main">
+    <van-search
+      v-model="searchVal"
+      readonly="true"
+      clearable
+      show-action
+      shape="round"
+      placeholder="请选择"
+      label="场所名称"
+      input-align="center"
+      @search="onSearch"
+      @cancel="onCancel"
+      @click-input="showPlace = true"
+    />
+    <van-popup v-model:show="showPlace" round position="bottom">
+      <van-picker
+        title="场所选择"
+        :columns="places"
+        :columns-field-names="customFieldName"
+        @cancel="showPlace = false"
+        @confirm="getPlace"
+      />
+    </van-popup>
+    <van-tabs
+      v-show="!searchShow"
+      v-model:active="active"
+      title-inactive-color="#bdbdbd"
+      title-active-color="#36a7f3"
+      @click-tab="onClickTab"
+    >
+      <van-tab title="未审核" name="0">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          finished-text="没有更多了"
+          @load="onLoad"
         >
-          <div class="list_item" @click="goInfo(item.id)">
-            <div class="item-left">
-              <p style="color: #c4c4c4">{{ item.updateDate }}</p>
-              <p style="color: red">待审核</p>
+          <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.updateDate }}
+                </p>
+                <p style="color: red">待审核</p>
+              </div>
+              <van-cell is-link v-if="item.facilityType==0">
+                <template #title >
+                  {{ item.siteName.name }}({{ item.videoAudioPoint.name }})
+                </template>
+                <template #label>
+                  {{ item.abnormalContent }}
+                </template>
+              </van-cell>
+              <van-cell is-link v-if="item.facilityType==1">
+                <template #title >
+                  {{ item.siteName.name }}({{ item.siteFireProtection.name }})
+                </template>
+                <template #label>
+                  {{ item.abnormalContent }}
+                </template>
+              </van-cell>
             </div>
-            <van-cell is-link v-if="item.facilityType==0">
-              <template #title >
-                {{ item.siteName.name }}({{ item.videoAudioPoint.name }})
-              </template>
-              <template #label>
-                {{ item.position }}
-              </template>
-            </van-cell>
-            <van-cell is-link v-if="item.facilityType==1">
-              <template #title >
-                {{ item.siteName.name }}({{ item.siteFireProtection.name }})
-              </template>
-              <template #label>
-                {{ item.position }}
-              </template>
-            </van-cell>
-          </div>
-          <template #right>
-            <van-button square type="danger" text="删除" class="button" />
-            <van-button
-              square
-              type="primary"
-              text="修改"
-              class="button"
-              @click="updateItem(item)"
-            />
-          </template>
-        </van-swipe-cell>
-      </van-list>
-    </van-tab>
-    <van-tab title="已审核" name="1">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        finished-text="没有更多了"
-        @load="onLoad"
-      >
-        <van-swipe-cell
-          v-for="item in list"
-          :key="item"
-          :before-close="beforeClose"
+            <template #right>
+              <van-button
+                square
+                type="danger"
+                text="删除"
+                class="button"
+                @click="deleteItem(item.id)"
+              />
+              <van-button
+                square
+                type="primary"
+                text="修改"
+                class="button"
+                @click="updateItem(item)"
+              />
+            </template>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+      <van-tab title="已审核" name="1">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          finished-text="没有更多了"
+          @load="onLoad"
         >
-          <div class="list_item" @click="goInfo(item.id)">
-            <div class="item-left">
-              <p style="color: #c4c4c4">{{ item.updateDate }}</p>
-              <p style="color: gray">已审核</p>
+          <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.updateDate }}
+                </p>
+                <p style="color: gray">已审核</p>
+              </div>
+              <van-cell is-link v-if="item.facilityType==0">
+                <template #title >
+                  {{ item.siteName.name }}({{ item.videoAudioPoint.name }})
+                </template>
+                <template #label>
+                  {{ item.abnormalContent }}
+                </template>
+              </van-cell>
+              <van-cell is-link v-if="item.facilityType==1">
+                <template #title >
+                  {{ item.siteName.name }}({{ item.siteFireProtection.name }})
+                </template>
+                <template #label>
+                  {{ item.abnormalContent }}
+                </template>
+              </van-cell>
             </div>
-            <van-cell is-link v-if="item.facilityType==0">
-              <template #title >
-                {{ item.siteName.name }}({{ item.videoAudioPoint.name }})
-              </template>
-              <template #label>
-                {{ item.position }}
-              </template>
-            </van-cell>
-            <van-cell is-link v-if="item.facilityType==1">
-              <template #title >
-                {{ item.siteName.name }}({{ item.siteFireProtection.name }})
-              </template>
-              <template #label>
-                {{ item.position }}
-              </template>
-            </van-cell>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+    </van-tabs>
+    <!-- 搜索结果 -->
+    <van-list
+      v-show="searchShow"
+      v-model:loading="loading"
+      :finished="finished"
+      finished-text="没有更多了"
+      @load="onLoad"
+    >
+      <van-swipe-cell v-for="item in searchList" :key="item">
+        <div class="list_item" @click="goInfo(item.id)">
+          <div class="item-left">
+            <p style="color: #c4c4c4">
+              {{ item.updateDate }}
+            </p>
+            <p style="color: red">
+              <span v-if="item.assessment == 1">已审核</span>
+              <span v-else>待审核</span>
+            </p>
           </div>
-        </van-swipe-cell>
-      </van-list>
-    </van-tab>
-  </van-tabs>
+          <van-cell is-link v-if="item.facilityType==0">
+            <template #title >
+              {{ item.siteName.name }}({{ item.videoAudioPoint.name }})
+            </template>
+            <template #label>
+              {{ item.abnormalContent }}
+            </template>
+          </van-cell>
+          <van-cell is-link v-if="item.facilityType==1">
+            <template #title >
+              {{ item.siteName.name }}({{ item.siteFireProtection.name }})
+            </template>
+            <template #label>
+              {{ item.abnormalContent }}
+            </template>
+          </van-cell>
+        </div>
+      </van-swipe-cell>
+    </van-list>
+    <van-dialog
+      v-model:show="showDel"
+      show-cancel-button
+      confirmButtonText="删除"
+      message="请确认删除该记录"
+      @confirm="Itemdel"
+    >
+    </van-dialog>
+  </div>
+ 
 </template>
 
 <script>
 import { ref } from "vue";
 import router from "@/router";
 import securityFacilitiesErrService from "@/api/securityFacilitiesErr/securityFacilitiesErrService";
+import tools from "@/api/sys/tools";
 export default {
 name: "securityFacilitiesErrList",
 setup() {
@@ -114,65 +196,143 @@ setup() {
   const onClickRight = () => {
     router.push("/securityFacilitiesErrView");
   };
-  let tabIndex = ref(0);
-  
-  //tab切换
   let active = ref(0);
-  const onClickTab = (val) => {
+  let list = ref([]);
+  const loading = ref(false);
+  const finished = ref(false);
+  let index = 0;  
+  //tab切换
+  const onClickTab = ({name}) => {
+
     // 清空列表数据
     finished.value = false;
-    list.value = [];
-    // 重新加载数据
-    // 将 loading 设置为 true,表示处于加载状态
+    list.value = [];    
     loading.value = true;
+
     index = 0;
-    if (val.name == 0) {
-      onLoad(0);
-    } else {
-      onLoad(1);
-    }
+    onLoad();
   };
-  // 列表
-  let list = ref([]);
-  const loading = ref(false);
-  const finished = ref(false);
-  let index = 0;
-  const onLoad = (val) => {
-    // 异步更新数据
-    console.log(val);
+  const onLoad = () => {
+    loading.value = true;
+    finished.value = false;
+    // 异步更新数据active绑定的是标签中的name值
     new securityFacilitiesErrService()
       .list({
         current: index + 1,
         size: 10,
-        assessment:val ? val : 0,
+        assessment:active.value,
+        siteName:{id:searchValId.value}
       })
       .then((res) => {
         list.value.push(...res.records) ;
         // 加载状态结束
         loading.value = false;        
         // 数据全部加载完成
-        if (res.records.length < 10) {
+        if (res.pages <= index + 1) {
           finished.value = true;
         }
         index++;
       });
   };
   // 搜索
-  let value = ref("");
-  // 删除确认
-  const beforeClose = ({ position }) => {
-    switch (position) {
-      case "left":
-      case "cell":
-      case "outside":
-        return true;
-      case "right":
-        return new Promise((resolve) => {
-          showConfirmDialog({
-            title: "确定删除吗?",
-          }).then(resolve);
+  const onSerchClick= () => {
+      searchShow.value = true;
+      searchList.value = [];
+      new siteInspectionService()
+        .list(qs.stringify({
+          current: 1,
+          size: 10000,
+          activityName: searchValId.value,
+        }))
+        .then(({ records }) => {
+          searchList.value.push(...records);
+          // 加载状态结束
+          loading.value = false;
         });
-    }
+    };
+
+    let searchShow = ref(false);
+    let searchList = ref([]);
+    const searchVal = ref("");
+    const searchValId = ref("");    
+    const onSearch = () => {
+      searchShow.value = true;
+      searchList.value = [];
+      new siteInspectionService()
+        .list({
+          current: 1,
+          size: 10000,
+          activityName: searchVal.value,
+        })
+        .then(({ records }) => {
+          searchList.value.push(...records);
+          // 加载状态结束
+          loading.value = false;
+        });
+    };
+    const onCancel = () => {
+      searchVal.value = "";
+      searchValId.value = "";
+      searchShow.value = false;
+
+      finished.value = false;
+      list.value = [];
+      loading.value = true;
+      index = 0;
+      onLoad();
+    };
+
+    // 场所名称
+    let places = ref([]);
+    const customFieldName = {
+      text: "name",
+      value: "id",
+    };
+    new tools()
+      .placeList({
+        current: 1,
+        size: 10000,
+      })
+      .then(({ records }) => {
+        places.value.push(...records);
+      });
+    let showPlace = ref(false);
+    const getPlace = ({ selectedOptions }) => {
+      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
+        showPlace.value = false;
+        searchVal.value=selectedOptions[0].name;
+        searchValId.value=selectedOptions[0].id;
+
+        finished.value = false;
+        list.value = [];
+        loading.value = true;
+        index = 0;
+        onLoad();
+      }
+    };
+
+  // 删除确认
+  let showDel = ref(false);
+  let ids = ref("");
+  const deleteItem = (val) => {
+    showDel.value = true;
+    ids.value = val;
+  };
+  // 删除
+  const Itemdel = () => {
+    new securityFacilitiesErrService().delete(ids.value).then((res) => {
+      index = 0;
+      loading.value = true;
+      list.value = [];
+      onLoad();
+    });
+  };
+  // 修改跳转
+  const updateItem = (val) => {
+    router.push({
+      path: "/securityFacilitiesErrView",
+      query: { id: val.id },
+    });
   };
   // 详情跳转
   const goInfo = (val) => {
@@ -182,57 +342,38 @@ setup() {
       });
     };
   return {
-    onClickLeft,
+    active,
     onClickTab,
+    onClickLeft,
+    onClickRight,
+    //列表
     list,
     onLoad,
     loading,
     finished,
-    value,
-    onClickRight,
-    tabIndex,
+    //搜索
+    onSerchClick,
+    searchShow,
+    searchVal,
+    searchValId,
+    searchList,
+    onSearch,
+    onCancel,   
+    // 场所
+    customFieldName,
+    showPlace,
+    places,
+    getPlace,
+
+    deleteItem,
+    updateItem,
     goInfo,
-    beforeClose,
+    showDel,
+    Itemdel,      
   };
 },
 };
 </script>
 
-<style>
-body {
-background: #f5f5f5;
-}
-.nav_tab {
-width: 100vw;
-display: flex;
-text-align: center;
-background: #fff;
-margin: 10px 0;
-}
-.tab {
-flex: 1;
-line-height: 40px;
-font-size: 14px;
-}
-.active {
-background: #36a7f3;
-color: #fff;
-}
-.van-list {
-height: 80%;
-margin-top: 5px;
-}
-.list_item {
-display: flex;
-background: #fff;
-}
-.item-left {
-text-align: center;
-width: 30%;
-font-size: 12px;
-border-right: 1px solid #eee;
-}
-.button {
-height: 100%;
-}
+<style scoped>
 </style>

+ 127 - 75
src/views/activityMan/siteInspection/siteInspectionInfo.vue

@@ -1,68 +1,144 @@
 <template>
+  <van-nav-bar
+    fixed
+    title="场所检查情况"
+    left-text=""
+    left-arrow
+    @click-left="onClickLeft"
+  />
+  <van-loading size="16px" v-show="isLoading">加载中...</van-loading>
 
-    <van-loading size="16px" v-if="isLoading">加载中...</van-loading>
-    <div class="main" v-if="!isLoading">
-      <div class="banner">
-        <h2>扎实提升“三力”</h2>
-        <h2>深入推进“三化”</h2>
-        <h2>坚持“三个思维”</h2>
-      </div>
-      <div class="info">
-        <p>场所名称:{{ info.siteName.name }}</p>
-        <p>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点:{{ info.place }}</p>
-        <p>详细地址:{{ info.placeDel }}</p>
-        <p>督查时间:{{ info.supervisionTime }}</p>
-        <p>
-          附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件:
-          <span v-if="fileList.length != 0" style="color: #6892ff">{{
-            fileList[0].name
-          }}</span>
-          <span v-else style="color: red">无</span>
-        </p>
-        <p>督查内容:{{ info.supervisionContent }}</p>
-      </div>
-      <van-button v-if="canAudit" type="primary" class="btn-sub" @click="update">审核</van-button>
+  <div class="main" v-show="!isLoading">
+    <div class="banner">
+      <img src="../../../../public/loginbg/banner.jpg" alt="" />
     </div>
+    <div class="info">
+      <p class="miniTitle">详细信息</p>
+      
+      <van-cell-group>
+        <van-field
+          v-model="info.siteName.name"
+          readonly
+          label="场所名称:"
+          input-align="right"
+        />
+      </van-cell-group>
+      <van-cell-group>
+        <van-field
+          v-model="info.place"
+          center
+          readonly
+          label="地点:"
+          input-align="right"
+        />
+      </van-cell-group>
+      <van-cell-group>
+        <van-field
+          v-model="info.placeDel"
+          center
+          readonly
+          clearable
+          label="详细地址:"
+          input-align="right"
+        />
+        <template #right-icon>
+          <van-icon name="location" />
+        </template>
+      </van-cell-group>
+      <van-cell-group>
+        <van-field
+          v-model="info.supervisionTime"
+          center
+          readonly
+          label="督查时间:"
+          input-align="right"
+        />
+      </van-cell-group>     
+      <van-cell-group>
+        <van-field
+          name="uploader"
+          readonly
+          label="附件:"
+          input-align="right"
+        >
+          <template #input>
+            <span v-show="fileList.length == 0">无</span>
+            <van-uploader
+              v-show="fileList.length != 0"
+              v-model="fileList"
+              :max-count="fileList.length"
+              capture="camera"
+              accept=""
+            >
+            </van-uploader>
+          </template>
+        </van-field>
+      </van-cell-group>
+      <van-cell-group>
+        <van-field
+          v-model="info.supervisionContent"
+          center
+          readonly
+          label="督查内容:"
+          input-align="right"
+        />
+      </van-cell-group>  
+    </div>
+    <van-button
+      v-if="info.assessment == 0"
+      type="primary"
+      class="btn-sub"
+      @click="update"
+      >审核</van-button
+    >
+  </div>    
   </template>
     
     <script>
-  import { ref } from "vue";
+  import { ref, onMounted } from "vue";
   import siteInspectionService from "@/api/siteInspection/siteInspectionService";
   import UserManage from "@/api/user/UserManage";
   import { useRoute } from "vue-router";
+  import $base from "@/utils/config";
   export default {
     setup() {
+      const onClickLeft = () => {
+        history.back();
+      };
+      // 加载
       let isLoading = ref(true);
-      let canAudit = ref(false);
       // 活动信息
-      const info = ref({        
+      const info = ref({     
+        siteName:{id:'',name:""}
       });
+      // 文件
       let fileList = ref([]);
       let route = useRoute();
-      new siteInspectionService().queryById(route.query.id).then((data) => {
-        info.value = data;
-        if(data.assessment=="0"){
-          canAudit.value = true;
-        }else{
-          canAudit.value = false;
-        }
-        
-        info.value.enclosure.split("|").forEach((item) => {
-          if (item.trim().length > 0) {
-            fileList.value.push({
-              name: decodeURIComponent(item.substring(item.lastIndexOf("/") + 1)),
-              url: item,
-            });
-          }
+      onMounted(() => {
+        new siteInspectionService().queryById(route.query.id).then((data) => {
+          info.value = data;
+
+          info.value.enclosure.split("|").forEach((item) => {
+            console.log(item);
+            if (item.trim().length > 0) {
+              fileList.value.push({
+                name: decodeURIComponent(
+                  item.substring(item.lastIndexOf("/") + 1)
+                ),
+                url: $base + item.replace('程序附件//','程序附件/'),
+              });
+            }
+          });
+          isLoading.value = false;
         });
-        isLoading.value = false;
       });
+      
       // 审核通过
       const update = () => {
         isLoading.value = true;
         info.value.assessment = 1;
         new siteInspectionService().save(info.value).then((res) => {
-          console.log(res);
+
           isLoading.value = false;
           window.xm.showToast({
              message:"审核成功!"
@@ -71,56 +147,32 @@
         });
       };
       return {
+        onClickLeft,
         info,
+        fileList,
         isLoading,
         update,
-        fileList,
-        canAudit,
       };
     },
   };
   </script>
     
   <style lang="less">
-  .main {
-    background: #fff;
-    position: relative;
-    top: 40px;
-  }
-  .banner {
-    background-color: #36a7f3;
-    padding: 20px 50px 40px 50px;
-    color: #fff;
-    h2 {
-      &:nth-child(1) {
-        margin-top: 0px;
-        text-align: left;
-      }
-      &:nth-child(2) {
-        text-align: center;
-      }
-      &:nth-child(3) {
-        text-align: right;
-      }
-    }
-  }
-  .info {
-    position: relative;
-    width: 86vw;
-    margin: 10px auto;
-    padding: 10px;
-    background: #fff;
-    border-radius: 20px;
-    top: -50px;
-    font-size: 14px;
+  .van-cell__value .van-field__right-icon .van-icon-location {
+    color: #36a7f3 !important;
   }
   .btn-sub {
     width: 90%;
     border-radius: 20px;
     margin-left: 5%;
+    margin-bottom: 40px;
+    margin-top: -100px;
   }
   .van-loading {
     text-align: center;
     margin-top: 80px;
   }
+  .van-popup--center {
+    width: 98% !important;
+  }
   </style>

+ 264 - 97
src/views/activityMan/siteInspection/siteInspectionList.vue

@@ -1,59 +1,176 @@
 <template>
     <van-nav-bar
+      fixed
       title="场所检查情况"
       left-text=""
-      right-text="上报"
       left-arrow
       @click-left="onClickLeft"
       @click-right="onClickRight"
+    >
+      <template #right>
+        <van-icon name="plus" size="18" />
+      </template>
+    </van-nav-bar>
+
+    <div class="main">
+    <van-search
+      v-model="searchVal"
+      readonly="true"
+      clearable
+      show-action
+      shape="round"
+      placeholder="请选择"
+      label="场所名称"
+      input-align="center"
+      @search="onSearch"
+      @cancel="onCancel"
+      @click-input="showPlace = true"
     />
-    <van-search v-model="value" shape="round" placeholder="请输入搜索关键词" />
+    <van-popup v-model:show="showPlace" round position="bottom">
+      <van-picker
+        title="场所选择"
+        :columns="places"
+        :columns-field-names="customFieldName"
+        @cancel="showPlace = false"
+        @confirm="getPlace"
+      />
+    </van-popup>
+    <van-tabs
+      v-show="!searchShow"
+      v-model:active="active"
+      title-inactive-color="#bdbdbd"
+      title-active-color="#36a7f3"
+      @click-tab="onClickTab"
+    >
+      <van-tab title="未审核" name="0">
+        <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: red">待审核</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>
+            <template #right>
+              <van-button
+                square
+                type="danger"
+                text="删除"
+                class="button"
+                @click="deleteItem(item.id)"
+              />
+              <van-button
+                square
+                type="primary"
+                text="修改"
+                class="button"
+                @click="updateItem(item)"
+              />
+            </template>
+          </van-swipe-cell>
+        </van-list>
+      </van-tab>
+      <van-tab title="已审核" name="1">
+        <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: gray">已审核</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
+      v-show="searchShow"
       v-model:loading="loading"
       :finished="finished"
       finished-text="没有更多了"
       @load="onLoad"
     >
-    <div class="nav_tab">
-      <div class="tab" :class="tabIndex ? '' : 'active'" @click="onClickTab(0)">
-        未审核
-      </div>
-      <div class="tab" :class="tabIndex ? 'active' : ''" @click="onClickTab(1)">
-        已审核
-      </div>
-    </div>
-    <van-swipe-cell
-      v-for="item in list"
-      :key="item.id"
-      :before-close="beforeClose"
-    >
-      <div class="list_item" @click="goInfo(item.id)">
-        <div class="item-left">
-          <p style="color: #c4c4c4">{{ item.supervisionTime }}</p>
-          <p v-if="item.assessment==0" style="color: red">待审核</p>
-          <p v-if="item.assessment==1" style="color: gray">已审核</p>
+      <van-swipe-cell v-for="item in searchList" :key="item">
+        <div class="list_item" @click="goInfo(item.id)">
+          <div class="item-left">
+            <p style="color: #c4c4c4">
+              {{ item.supervisionTime }}
+            </p>
+            <p style="color: red">
+              <span v-if="item.assessment == 1">已审核</span>
+              <span v-else>待审核</span>
+            </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-cell is-link >
-          <template #title>
-            {{ item.siteName.name }}({{ item.placeDel}})
-          </template>
-          <template #label>
-            {{ item.supervisionContent }}
-          </template>
-        </van-cell>
-      </div>
-      <template #right>
-        <van-button square type="danger" text="删除" class="button" />
-        <van-button square type="primary" text="修改" class="button" />
-      </template>
-    </van-swipe-cell>
-  </van-list>
+      </van-swipe-cell>
+    </van-list>
+    <van-dialog
+      v-model:show="showDel"
+      show-cancel-button
+      confirmButtonText="删除"
+      message="请确认删除该记录"
+      @confirm="Itemdel"
+    >
+    </van-dialog>
+  </div>
 </template>
 
   <script>
  import { ref } from "vue";
 import router from "@/router";
 import siteInspectionService from "@/api/siteInspection/siteInspectionService";
+import tools from "@/api/sys/tools";
 export default {
   name: "siteInspectionList",
   setup() {
@@ -63,14 +180,13 @@ export default {
     const onClickRight = () => {
       router.push("/siteInspectionView");
     };
-    let tabIndex = ref(0);
+    let active = ref(0);
     let list = ref([]);
     const loading = ref(false);
     const finished = ref(false);
     let index = 0;
     //tab切换
-    const onClickTab= (wh) => {
-      tabIndex.value = wh;
+    const onClickTab= ({name}) => {
 
       // 清空列表数据
       finished.value = false;
@@ -81,41 +197,112 @@ export default {
       onLoad();
     };
     const onLoad = () => {
-      // 异步更新数据
+      loading.value = true;
+      finished.value = false;
+      // 异步更新数据active绑定的是标签中的name值
+
       new siteInspectionService()
         .list({
           current: index + 1,
           size: 10,
-          assessment:tabIndex.value,
+          assessment:active.value,
+          siteName:{id:searchValId.value}
         })
         .then((res) => {
           list.value.push(...res.records) ;
           // 加载状态结束
           loading.value = false;
           // 数据全部加载完成
-          if (res.records.length < 10) {
+          if (res.pages <= index + 1) {
             finished.value = true;
           }
           index++;
         });
     };
     // 搜索
-    let value = ref("");
-    // 删除确认
-    const beforeClose = ({ position }) => {
-      switch (position) {
-        case "left":
-        case "cell":
-        case "outside":
-          return true;
-        case "right":
-          return new Promise((resolve) => {
-            showConfirmDialog({
-              title: "确定删除吗?",
-            }).then(resolve);
-          });
+    let searchShow = ref(false);
+    let searchList = ref([]);
+    const searchVal = ref("");
+    const searchValId = ref("");    
+    const onSearch = () => {
+      searchShow.value = true;
+      searchList.value = [];
+      new siteInspectionService()
+        .list({
+          current: 1,
+          size: 10000,
+          activityName: searchVal.value,
+        })
+        .then(({ records }) => {
+          searchList.value.push(...records);
+          // 加载状态结束
+          loading.value = false;
+        });
+    };
+    const onCancel = () => {
+      searchVal.value = "";
+      searchValId.value = "";
+      searchShow.value = false;
+
+      finished.value = false;
+      list.value = [];
+      loading.value = true;
+      index = 0;
+      onLoad();
+    };
+
+    // 场所名称
+    let places = ref([]);
+    const customFieldName = {
+      text: "name",
+      value: "id",
+    };
+    new tools()
+      .placeList({
+        current: 1,
+        size: 10000,
+      })
+      .then(({ records }) => {
+        places.value.push(...records);
+      });
+    let showPlace = ref(false);
+    const getPlace = ({ selectedOptions }) => {
+      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
+        showPlace.value = false;
+        searchVal.value=selectedOptions[0].name;
+        searchValId.value=selectedOptions[0].id;
+
+        finished.value = false;
+        list.value = [];
+        loading.value = true;
+        index = 0;
+        onLoad();
       }
     };
+    
+    // 删除确认
+    let showDel = ref(false);
+    let ids = ref("");
+    const deleteItem = (val) => {
+      showDel.value = true;
+      ids.value = val;
+    };
+    // 删除
+    const Itemdel = () => {
+      new siteInspectionService().delete(ids.value).then((res) => {
+        index = 0;
+        loading.value = true;
+        list.value = [];
+        onLoad();
+      });
+    };
+    // 修改跳转
+    const updateItem = (val) => {
+      router.push({
+        path: "/siteInspectionView",
+        query: { id: val.id },
+      });
+    };
     // 详情跳转
     const goInfo = (val) => {
       router.push({
@@ -124,57 +311,37 @@ export default {
       });
     };
     return {
-      onClickLeft,
+      active,
       onClickTab,
+      onClickLeft,
+      onClickRight,
+      //列表
       list,
       onLoad,
       loading,
       finished,
-      value,
-      onClickRight,
-      tabIndex,
+      //搜索
+      searchShow,
+      searchVal,
+      searchValId,
+      searchList,
+      onSearch,
+      onCancel,   
+      // 场所
+      customFieldName,
+      showPlace,
+      places,
+      getPlace,
+
+      deleteItem,
+      updateItem,
       goInfo,
-      beforeClose,
+      showDel,
+      Itemdel,      
     };
   },
 };
 </script>
 
-<style>
-body {
-  background: #f5f5f5;
-}
-.nav_tab {
-  width: 100vw;
-  display: flex;
-  text-align: center;
-  background: #fff;
-  margin: 10px 0;
-}
-.tab {
-  flex: 1;
-  line-height: 40px;
-  font-size: 14px;
-}
-.active {
-  background: #36a7f3;
-  color: #fff;
-}
-.van-list {
-  height: 80%;
-  margin-top: 5px;
-}
-.list_item {
-  display: flex;
-  background: #fff;
-}
-.item-left {
-  text-align: center;
-  width: 30%;
-  font-size: 12px;
-  border-right: 1px solid #eee;
-}
-.button {
-  height: 100%;
-}
+<style scoped>
 </style>

+ 2 - 8
src/views/tab_a/tabAll.vue

@@ -256,22 +256,16 @@ import toBeDone from '@/api/toBeDone/toBeDone';
 			getSelectColor(){
 				let that=this;
 				new userSets()
-				.SelectColor({
-					'current': 1,
-					'size': 5,
-					'orders':[],
-				})
+				.SelectColor()
 				.then((res) => {
 					//console.log(res.records[0].selectColor.substring(1, 7));
 					//存PCtoken
-					that.$store.commit('setSelectColor',res.records[0].selectColor.substring(1, 7));
+					that.$store.commit('setSelectColor',res.默认);
 				});
 			},
 
 
 
-
-
 			//测试接口,可删除
 			async gettest(){
 				let that=this;