Jelajahi Sumber

1、 新增非宗教类信息报送

yin_yu820 6 bulan lalu
induk
melakukan
96820cdb18

+ 37 - 0
src/api/secularMessage/secularMessageService.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+export default class siteInspectionService {
+    // 保存
+    save(inputForm) {
+        return request.post(
+            '/religiousinformation/religiousInformation/save',
+            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(
+            '/religiousinformation/religiousInformation/queryById', { id: id }
+        )
+    };
+    list(params) {
+        return request.get(
+            `/religiousinformation/religiousInformation/list`,
+            params
+        )
+    }
+    delete(ids) {
+        return request.delete(
+            '/religiousinformation/religiousInformation/delete', { ids: ids }
+        )
+    }
+}

+ 1 - 4
src/config/index.js

@@ -2,10 +2,7 @@ var defaultConfig = {
 
     baseUrl : 'http://2.142.215.98:8010/hs',//政务网环境地址
 
-    //baseUrl : 'http://192.168.1.102:3000',
-
-    // baseUrl: 'http://localhost:3000',
-    // baseUrl: '/api',
+    //baseUrl: '/api',//开发环境
 
     timeout: '50000',
 

+ 24 - 0
src/router/index.js

@@ -57,6 +57,30 @@ const routes = [{
             isShowTarbar: true,
         }
     }, {
+        path: '/secularMessageList',
+        name: 'secularMessageList',
+        component: () =>
+            import ('../views/activityMan/secularMessage/secularMessageList.vue'),
+        meta: {
+            isShowTarbar: true,
+        }
+    }, {
+        path: '/secularMessageInfo',
+        name: 'secularMessageInfo',
+        component: () =>
+            import ('../views/activityMan/secularMessage/secularMessageInfo.vue'),
+        meta: {
+            isShowTarbar: true,
+        }
+    },{
+        path: '/secularMessageView',
+        name: 'secularMessageView',
+        component: () =>
+            import ('../views/activityMan/secularMessage/secularMessageView.vue'),
+        meta: {
+            isShowTarbar: true,
+        }
+    },{
         path: '/siteInspectionInfo',
         name: 'siteInspectionInfo',
         component: () =>

+ 259 - 0
src/views/activityMan/secularMessage/secularMessageInfo.vue

@@ -0,0 +1,259 @@
+<template>
+  <van-nav-bar
+    fixed
+    title="非宗教类信息报送情况"
+    left-text=""
+    left-arrow
+    @click-left="onClickLeft"
+    :style="{ 'background-color': selectColor }"
+  />
+  <van-loading size="16px" v-show="isLoading">加载中...</van-loading>
+
+  <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.religiousCategoriesname"
+          readonly
+          label="宗教类别:"
+          input-align="right"
+        />
+      </van-cell-group>
+      <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.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
+          clearable
+          label="详细地址:"
+          input-align="right"
+        />
+        <template #right-icon>
+          <van-icon name="location" />
+        </template>
+      </van-cell-group>
+      <van-cell-group>
+          <van-field
+            v-model="info.eventOverview"
+            center
+            readonly
+            label="事件概述:"
+            input-align="right"
+          />
+        </van-cell-group>   
+      
+        <van-cell-group>
+        <van-field label="内容:" input-align="right">
+          <template #input>
+            <span v-show="info.eventContent == ''">无</span>
+            <span v-show="info.eventContent != ''" style="color: #36a7f3" @click="open">查看内容</span>
+          </template>
+        </van-field>
+      </van-cell-group>
+    </div>
+    <!-- <van-button
+      v-if="info.assessment == 1"
+      type="primary"
+      class="btn-sub"
+      @click="update(2)"
+      >排查合格</van-button
+    >
+    <van-button
+      v-if="info.assessment == 1"
+      type="primary"
+      class="btn-sub"
+      @click="update(3)"
+      >排查不合格</van-button
+    > -->
+  </div>    
+<!-- 富文本编辑器 -->
+<van-popup v-model:show="showReport">
+    <!-- <wang-editor ref="contentEditor" v-model="inputForm.content" /> -->
+    <div v-html="info.eventContent" class="showhtml"></div>
+  </van-popup>
+
+  </template>
+    
+    <script>
+  import { ref, onMounted } from "vue";
+  import secularMessageService from "@/api/secularMessage/secularMessageService";
+  import UserManage from "@/api/user/UserManage";
+  import { useRoute } from "vue-router";
+  import $base from "@/utils/config";
+  export default {
+    setup() {
+      // 导航栏颜色
+      const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
+      const onClickLeft = () => {
+        history.back();
+      };
+      // 加载
+      let isLoading = ref(true);
+      // 活动信息
+      const info = ref({     
+        siteName:{id:'',name:""}
+      });
+      // 富文本
+      let contentEditor = ref(null);
+      const showReport = ref(false);
+      // 文件
+      let fileList = ref([]);
+      let route = useRoute();
+      onMounted(() => {
+        new secularMessageService().queryById(route.query.id).then((data) => {
+
+          data.religiousCategoriesname = getreligiousT(data.religiousCategories);
+          info.value = data;
+
+          
+
+          
+          isLoading.value = false;
+        });
+
+        const getreligiousT = (type) => {
+          const typeObject = {
+            1: "伊斯兰教",
+            2: "基督教",
+            3: "天主教",
+            4: "佛教",
+            5: "道教",
+          };
+          return typeObject[type];
+        };
+      });
+
+      /**
+     * 下载文件 网页端可用
+     */
+    const downHandle = (fileObj) => {
+      if(!(fileObj.file.name.includes(".jpg")||fileObj.file.name.includes(".jpeg")||fileObj.file.name.includes(".png"))){
+        // 声明a标签
+        const aEle = document.createElement("a");
+        // 设置下载文件名
+        aEle.download = fileObj.file.name;
+        // 下载地址
+        aEle.href = fileObj.url;
+        // 调用下载
+        aEle.click();
+      }
+      
+    };
+
+    
+      
+    // 打开富文本
+    const open = () => {
+      showReport.value = true;
+      nextTick(() => {
+        if (contentEditor.value != null) {
+          contentEditor.value.init(info.value.eventContent);
+        }
+      });
+    };
+
+      // 审核通过
+      const update = (state) => {
+        isLoading.value = true;
+        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 secularMessageService().keepOnRecord(info.value.id).then((res) => {
+
+            isLoading.value = false;
+            window.xm.showToast({
+              message:"排查成功!"
+            })
+            history.back();
+          });
+        }else{
+          new secularMessageService().keepOnRecordNO(info.value.id).then((res) => {
+
+            isLoading.value = false;
+            window.xm.showToast({
+              message:"排查成功!"
+            })
+            history.back();
+            });
+        }
+
+        
+
+
+      };
+      return {
+        // 导航栏颜色
+        selectColor,
+        onClickLeft,
+        info,
+        fileList,
+        downHandle,
+        isLoading,
+        contentEditor,
+        showReport,
+        update,
+        open,
+      };
+    },
+  };
+  </script>
+    
+  <style lang="less">
+  .van-cell__value .van-field__right-icon .van-icon-location {
+    color: #36a7f3 !important;
+  }
+  .btn-sub {
+    width: 42%;
+    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>

+ 402 - 0
src/views/activityMan/secularMessage/secularMessageList.vue

@@ -0,0 +1,402 @@
+<template>
+    <van-nav-bar
+      fixed
+      title="非宗教类信息报送"
+      left-text=""
+      left-arrow
+      @click-left="onClickLeft"
+      @click-right="onClickRight"
+      :style="{ 'background-color': selectColor }"
+    >
+      <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="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.reportingTime}})
+                  <!-- <van-text-ellipsis
+                    rows="2"
+                    :content="`${item.siteName.name}(${ item.placeDel})`"
+                  /> -->
+                </template>
+                <template #label>
+                  {{ item.eventOverview }}
+                </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="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.reportingTime}})
+                    <!-- <van-text-ellipsis
+                      rows="2"
+                      :content="`${item.siteName.name}(${ item.placeDel})`"
+                    /> -->
+                </template>
+                <template #label>
+                  {{ item.eventOverview }}
+                </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="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}})
+                </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"
+    >
+      <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.reportingTime}})
+              <!-- <van-text-ellipsis
+                rows="2"
+                :content="`${item.siteName.name}(${ item.placeDel})`"
+              /> -->
+            </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 secularMessageService from "@/api/secularMessage/secularMessageService";
+import tools from "@/api/sys/tools";
+export default {
+  name: "secularMessageList",
+  setup() {
+    // 导航栏颜色
+    const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
+    const onClickLeft = () => {
+      history.back();
+    };
+    const onClickRight = () => {
+      router.push("/secularMessageView");
+    };
+    let active = ref(0);
+    let list = ref([]);
+    const loading = ref(false);
+    const finished = ref(false);
+    let index = 0;
+    //tab切换
+    const onClickTab= ({name}) => {
+
+      // 清空列表数据
+      finished.value = false;
+      list.value = [];
+      loading.value = true;
+
+      index = 0;
+      onLoad();
+    };
+    const onLoad = () => {
+      loading.value = true;
+      finished.value = false;
+      // 异步更新数据active绑定的是标签中的name值
+
+      new secularMessageService()
+        .list({
+          current: index + 1,
+          size: 10,
+          religiousCategories:"",
+          place:"",
+          state:"",
+          assessment:active.value,
+          siteName:{id:searchValId.value}
+        })
+        .then((res) => {
+          list.value.push(...res.records) ;
+          // 加载状态结束
+          loading.value = false;
+          // 数据全部加载完成
+          if (res.pages <= index + 1) {
+            finished.value = true;
+          }
+          index++;
+        });
+    };
+    // 搜索
+    let searchShow = ref(false);
+    let searchList = ref([]);
+    const searchVal = ref("");
+    const searchValId = ref("");    
+    const onSearch = () => {
+      searchShow.value = true;
+      searchList.value = [];
+      new secularMessageService()
+        .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 secularMessageService().delete(ids.value).then((res) => {
+        index = 0;
+        loading.value = true;
+        list.value = [];
+        onLoad();
+      });
+    };
+    // 修改跳转
+    const updateItem = (val) => {
+      router.push({
+        path: "/secularMessageView",
+        query: { id: val.id },
+      });
+    };
+    // 详情跳转
+    const goInfo = (val) => {
+      router.push({
+        path: "/secularMessageInfo",
+        query: { id: val },
+      });
+    };
+    return {
+      // 导航栏颜色
+      selectColor,
+      active,
+      onClickTab,
+      onClickLeft,
+      onClickRight,
+      //列表
+      list,
+      onLoad,
+      loading,
+      finished,
+      //搜索
+      searchShow,
+      searchVal,
+      searchValId,
+      searchList,
+      onSearch,
+      onCancel,   
+      // 场所
+      customFieldName,
+      showPlace,
+      places,
+      getPlace,
+
+      deleteItem,
+      updateItem,
+      goInfo,
+      showDel,
+      Itemdel,      
+    };
+  },
+};
+</script>
+
+<style scoped>
+</style>

+ 443 - 0
src/views/activityMan/secularMessage/secularMessageView.vue

@@ -0,0 +1,443 @@
+<template>
+	<van-nav-bar fixed title="非宗教类信息报送" left-text="" left-arrow @click-left="onClickLeft"
+		:style="{ 'background-color': selectColor }" />
+	<van-loading size="16px" v-show="isLoading">加载中...</van-loading>
+	<div class="main" v-show="!isLoading">
+		<div class="formArea">
+			<!-- <p class="miniTitle">基础信息</p> -->
+			<van-cell-group>
+				<van-field v-model="religiousCategories" center readonly label="宗教类别:" placeholder="请选择宗教类别"
+					input-align="right" right-icon="arrow-down" @click="showPlace1 = true" />
+				<van-popup v-model:show="showPlace1" round position="bottom">
+					<van-picker title="宗教类别" :columns="$dictUtils.getDictList('hs_religion_type')" :columns-field-names="{
+              text: 'label',
+              value: 'value',
+            }" @cancel="showPlace1 = false" @confirm="getType" />
+				</van-popup>
+			</van-cell-group>
+
+			<van-cell-group>
+				<van-field v-model="siteInspection.siteName.name" readonly required center label="场所名称:"
+					placeholder="请选择" input-align="right" right-icon="arrow-down" @click="showPlace = true" />
+				<van-popup v-model:show="showPlace" round position="bottom">
+
+					<van-search placeholder="请输入场所名称" shape="round" input-align="center" v-model="interSearch"
+						@search="onSearch" @cancel="onCancel" />
+					<van-picker title="场所选择" :columns="places" :columns-field-names="customFieldName"
+						@cancel="showPlace = false" @confirm="getPlace" />
+
+				</van-popup>
+			</van-cell-group>
+
+			<van-cell-group>
+				<van-field v-model="siteInspection.reportingTime" center readonly label="时间:" placeholder="请选择时间"
+					input-align="right" right-icon="arrow-down" @click="showAct = true" />
+				<van-popup v-model:show="showAct" round position="bottom">
+					<van-picker-group title="时间" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTime"
+						@cancel="showAct = false">
+						<van-date-picker v-model="currentDate" />
+						<van-time-picker v-model="currentTime" :columns-type="columnsType" />
+					</van-picker-group>
+				</van-popup>
+			</van-cell-group>
+
+			<van-cell-group>
+				<van-field v-model="siteInspection.placeSelectName" center readonly label="地点:" placeholder="请填写地点"
+					input-align="right" right-icon="arrow-down" />
+				<van-popup v-model:show="showArea" round position="bottom">
+					<van-cascader v-model="cascaderValue" title="请选择所在地区" :options="options" @close="showArea = false"
+						@finish="onFinish" :field-names="fieldNames" />
+				</van-popup>
+			</van-cell-group>
+
+
+
+			<van-cell-group>
+				<van-field v-model="siteInspection.placeDetailed" center label="详细地址:" placeholder="请填写具体地址"
+					input-align="right">
+					<template #right-icon>
+						<van-icon name="location" @click="getLocation" />
+					</template>
+				</van-field>
+			</van-cell-group>
+
+			<van-cell-group>
+				<div class="rowTextArea">
+					<van-field v-model="siteInspection.eventOverview" center rows="1" type="textarea" label="事件概述:"
+						label-align="top" />
+				</div>
+			</van-cell-group>
+
+			<van-cell-group>
+				<van-field label="事件内容:" label-align="top">
+				<template #input>
+					<wang-editor ref="contentEditor" v-model="siteInspection.eventContent" style="height: auto;" />
+				</template>
+				</van-field>
+			</van-cell-group>
+
+			
+			
+			<!-- <van-cell-group>
+				<van-field label="内容:" label-align="top">
+				<template #input>
+					<wang-editor ref="contentEditor" v-model="inputForm.content" />
+				</template>
+				</van-field>
+			</van-cell-group> -->
+
+		</div>
+		<div class="subbtn">
+			<van-button type="primary" @click="submit">提交</van-button>
+			<van-button type="default" hairline>取消</van-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		reactive,
+		ref,
+		onMounted
+	} from "vue";
+	import personList from "../personList.vue";
+	import secularMessageService from "@/api/secularMessage/secularMessageService";
+	import {
+		useRoute
+	} from "vue-router";
+	import tools from "@/api/sys/tools";
+	import {
+		formatDate,
+		formatTime
+	} from "@/utils/datatime";
+	// 图片路径
+	import $base from "@/utils/config";
+	// 富文本编辑器
+	import WangEditor from "@/components/editor/WangEditor";
+
+	export default {
+		components: {
+			personList, WangEditor
+		},
+		setup() {
+			// 导航栏颜色
+			const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
+			const onClickLeft = () => {
+				history.back();
+			};
+			const siteInspection = ref({
+				id: "",
+				siteName: {
+					id: "",
+				},
+				place: "",
+				placeSelectName: "",
+				placeDetailed: "",
+				reportingTime: "",
+				eventContent: "",
+				eventOverview: "",
+				//附件
+				enclosure: "",
+				state: "0",
+				assessment: "0",
+				assessmentName: "",
+			});
+
+			// 根据路由初始化
+			let route = useRoute();
+			onMounted(() => {
+				if (route.query.id) {
+					new secularMessageService().queryById(route.query.id).then((data) => {
+						siteInspection.value = data;				
+
+					});
+				}
+			});
+
+			// 场所名称
+			let places = ref([]);
+			// 场所搜索
+			let interSearch = ref("");
+			const onCancel = () => {
+				interSearch.value = "";
+				places.value = [];
+				placelist();
+			};
+			const onSearch = () => {
+				places.value = [];
+				new tools()
+					.placeList({
+						current: 1,
+						size: 10000,
+						name: interSearch.value
+					})
+					.then(({
+						records
+					}) => {
+						places.value.push(...records);
+					});
+			};
+			const customFieldName = {
+				text: "name",
+				value: "id",
+			};
+			const placelist = () => {
+				new tools()
+					.placeList({
+						current: 1,
+						size: 10000,
+					})
+					.then(({
+						records
+					}) => {
+						places.value.push(...records);
+					});
+			}
+			placelist();
+			let showPlace = ref(false);
+			let showPlace1 = ref(false);
+			let religiousCategories = ref("");
+			const getType = ({
+				selectedOptions
+			}) => {
+				showPlace1.value = false;
+				siteInspection.value.religiousCategories = selectedOptions[0].value;
+				religiousCategories.value = selectedOptions[0].label;
+			};
+			const getPlace = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					showPlace.value = false;
+					siteInspection.value.siteName = selectedOptions[0];
+					siteInspection.value.placeSelectName = selectedOptions[0].placeSelectName;
+					siteInspection.value.place = selectedOptions[0].placeSelectId;
+					siteInspection.value.placeDetailed = selectedOptions[0].place;
+				}
+			};
+			// 获取督查时间
+			let showAct = ref(false);
+			let currentDate = ref(formatDate(new Date()));
+			let currentTime = ref(formatTime(new Date()));
+			const columnsType = ['hour', 'minute', 'second'];
+			const getTime = () => {
+				showAct.value = false;
+				siteInspection.value.reportingTime = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
+			};
+			let list = {
+				value: [],
+				type: "",
+			};
+
+			// 地区选择
+			let showArea = ref(false);
+			const cascaderValue = ref("");
+			const fieldNames = {
+				text: "name",
+				value: "code",
+				children: "children",
+			};
+			// 选项列表,children 代表子选项,支持多级嵌套
+			let options = ref([]);
+			new tools().treeData().then((res) => {
+				options.value.push(res[0]);
+			});
+			// 全部选项选择完毕后,会触发 finish 事件
+			const onFinish = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					showArea.value = false;
+					siteInspection.value.place = selectedOptions
+						.map((option) => option.name)
+						.join("/");
+				}
+			};
+
+			//选择排查结果
+			let showLx = ref(false);
+			const facilityTypes = [{
+				text: "正常",
+				value: "1"
+			}, {
+				text: "异常",
+				value: "2"
+			}];
+			const getfacilityType = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					siteInspection.value.assessment = selectedOptions[0].value;
+					siteInspection.value.assessmentName = selectedOptions[0].text;
+					// getVideoAudioList();
+					// getFireStationList();
+					showLx.value = false;
+				}
+			};
+
+			// 文件上传
+			let fileList = ref([]);
+			let fileupList = ref([]);
+			const chooseImg = () => {
+
+				xm.chooseFile({
+					count: 1,
+					name: "file",
+					url: $base + `/sys/file/webupload/upload?uploadPath=csjcqk/siteInspection`,
+					headers: {
+						'Content-Type': 'multipart/form-data'
+					},
+				}).then(res => {
+					let data = res[0].data
+					data.name = decodeURIComponent(
+						data.id.substring(data.url.lastIndexOf("/") + 1)
+					);
+					data.url = $base + data.url;
+					fileupList.value.push(data);
+					fileList.value.push(data)
+					xm.showToast({
+						message: "上传成功",
+					});
+				})
+			}
+			
+			// 删除文件
+			const deleteRead = (file) => {
+				//删除文件操作
+				for (let index = 0; index < fileList.value.length; index++) {
+					if (file.id == fileList.value[index].id) {
+						fileList.value.splice(index, 1);
+						if (fileupList.value[index]) {
+							let delurl = fileupList.value[index].url;
+							new tools().uploadFiledelete("", delurl).then(({
+								data
+							}) => {});
+							fileupList.value.splice(index, 1);
+						}
+					}
+				}
+			};
+
+			const getLocation = () => {
+				xm.getLocation().then(data => {
+					siteInspection.value.placeDetailed = data.POIName;
+				})
+			}
+
+			// 提交数据
+			const submit = () => {
+				//添加保存前判断
+				if (siteInspection.value.siteName.id == "") {
+					window.xm.showToast({
+						message: "请先选择场所信息!"
+					})
+				} else {
+
+					//保存前附件处理
+					siteInspection.value.enclosure = fileupList.value.map((option) => option.id).join("|");
+					new secularMessageService().save(siteInspection.value).then((res) => {
+						if (res.data == "保存宗教类信息上报成功") {
+							window.xm.showToast({
+								message: "保存成功!"
+							})
+							history.back();
+						}
+					});
+
+				}
+
+			};
+			return {
+				// 导航栏颜色
+				selectColor,
+				siteInspection,
+				// 场所
+				customFieldName,
+				showPlace,
+				showPlace1,
+				religiousCategories,
+				places,
+				interSearch,
+				onSearch,
+				onCancel,
+				getPlace,
+				// 时间
+				showAct,
+				currentDate,
+				currentTime,
+				columnsType,
+				getTime,
+				// 返回
+				onClickLeft,
+				// 地区选择
+				showArea,
+				fieldNames,
+				options,
+				onFinish,
+				cascaderValue,
+
+				//排查结果选择
+				showLx,
+				facilityTypes,
+				getfacilityType,
+
+				getLocation,
+				getType,
+				// 文件上传
+				chooseImg,
+				fileList,
+				fileupList,
+				deleteRead,
+				submit,
+			};
+		},
+	};
+</script>
+
+<style scoped>
+	.van-cell__value .van-field__right-icon .van-icon-location {
+		color: #36a7f3 !important;
+	}
+
+	.van-uploader .van-button {
+		border: none;
+		color: #36a7f3;
+		top: -4px;
+	}
+
+	.van-dialog {
+		width: 80%;
+		top: 50%;
+	}
+
+	.van-loading {
+		text-align: center;
+		margin-top: 80px;
+	}
+
+	.preview-cover {
+		position: absolute;
+		bottom: 0;
+		box-sizing: border-box;
+		width: 100%;
+		padding: 4px;
+		color: #fff;
+		font-size: 12px;
+		text-align: center;
+		background: rgba(0, 0, 0, 0.3);
+	}
+
+
+	.rowTextArea::v-deep .van-field__value {
+		width: 94%;
+		border: 2px solid #ccc;
+		border-radius: 10px;
+		padding: 10px;
+	}
+
+	.rowTextArea::v-deep .van-cell {
+		display: flow-root;
+	}
+</style>

+ 43 - 33
src/views/tab_a/tabAll.vue

@@ -93,6 +93,11 @@
         text="负责人会议"
         @click="tohd_hy"
       />
+      <van-grid-item
+        icon="./loginbg/hd_qt.png"
+        text="非宗教类信息"
+        @click="tohd_fzj"
+      />
     </van-grid>
 
     <div class="tabtitlelay">
@@ -158,7 +163,8 @@ export default {
     window.xm.setNavigationBarTitle({
       title: "宗教和顺",
     });
-    this.TokenLogin2();
+    this.TokenLogin2();//生产环境
+    //this.TokenLogin();//测试环境
     this.$dictUtils.refreshDictList();
   },
 
@@ -213,6 +219,9 @@ export default {
     tohd_hy() {
       this.$router.push("/religiousConferenceList");
     },
+    tohd_fzj() {
+      this.$router.push("/secularMessageList");
+    },
     tohd_qt() {
       this.$router.push("/nonReligiousInformationList");
     },
@@ -226,39 +235,36 @@ export default {
     abnormalCrowd() {
       this.$router.push("/differentbelieversList");
     },
-    async TokenLogin() {
-      let that = this;
-      //添加PCtoken过期判断,(请求拦截到token过期,会设置PCtoken为空,为空的时候再调用免登功能)
-      if (
-        this.$store.state.pctoken == "" ||
-        this.$store.state.pctoken == undefined
-      ) {
-        //SDK中 getToken() 方法获取免登token
-        //window.xm.getToken().then(async function(token){//上线取消注释
-        let token = "test"; //上线注释
-
-        const inputForm = qs.stringify(
-          {
-            token: token,
-          },
-          {
-            allowDots: true,
-            arrayFormat: "indices",
-          }
-        );
-        var res = await this.$API.yin.TokenLogin.get(inputForm);
-        new userSets().getMenus().then(({ data }) => {
-          //存PCtoken
-          this.$store.commit("setPcToken", res.PcToken);
-          this.$store.commit("setUser", res.account);
-          that.$store.commit(
-            "setPermissions",
-            JSON.stringify(data.permissions || "[]")
-          );
+    TokenLogin() {
+        let that = this;
+
+
+
+        new userSets()
+        .TokenLogin({
+          token: "test",
+        })
+        .then((res) => {
+
+          that.$store.commit("setPcToken", res.PcToken);
+          that.$store.commit("setUser", res.account);
+          
+
+          new userSets().getMenus().then(( data ) => {
+                       
+            that.$store.commit(
+              "setPermissions",
+              JSON.stringify(data.permissions || "[]")
+            );
+
+              
+            
+            that.getBannerImg(); //获取轮播图
+            that.getSelectColor(); //获取主题颜色
+            that.dataNumber(); //获取待办事项数
+          });
         });
 
-        //})//上线取消注释
-      }
     },
 
     TokenLogin2() {
@@ -278,7 +284,7 @@ export default {
               token: token,
             })
             .then((res) => {
-              new userSets().getMenus().then(({ data }) => {
+              new userSets().getMenus().then(( data ) => {
                 that.$store.commit("setPcToken", res.PcToken);
                 that.$store.commit("setUser", res.account);
                 that.$store.commit(
@@ -322,6 +328,8 @@ export default {
     },
 
     getBannerImg() {
+
+      
       new userSets()
         .BannerImg({
           current: 1,
@@ -331,6 +339,8 @@ export default {
         .then((res) => {
           let bs = [];
 
+          
+
           res.records[0].bannerImg.split("|").forEach((item) => {
             if (item.trim().length > 0) {
               bs.push($base + item.replace("程序附件//", "程序附件/"));

+ 2 - 3
vue.config.js

@@ -8,9 +8,8 @@ module.exports = defineConfig({
         port: '8080',//
         proxy: {
             '/api': {
-                //target:'http://124.70.137.152:8095',// http://2.142.215.98:8010
-                // target: 'http://192.168.139.9:8084',
-                target: 'http://2.142.215.98:8010',
+                target: 'http://2.142.215.98:8010',//生产环境
+                //target: 'http://192.168.139.82:8084',//开发环境
                 changeOrigin: true,
                 pathRewrite: {
                     '^/api': '/'