Browse Source

ios图片上传闪退测试

LuChongMei 9 months ago
parent
commit
5e1cc587b1

File diff suppressed because it is too large
+ 1 - 10605
package-lock.json


+ 340 - 297
src/views/activityMan/differentbelievers/ReligiousPeopleReportView.vue

@@ -1,307 +1,350 @@
 <template>
-  <van-nav-bar fixed title="信教异常群众信息上报" left-text="" left-arrow @click-left="onClickLeft" />
-  <van-loading size="16px" v-if="isLoading">加载中...</van-loading>
-  <div class="main" v-if="!isLoading">
-    <!-- <p class="title">信教异常群众上报</p> -->
-    <van-form class="formArea" @submit="submit" show-error :show-error-message="false" validate-trigger="onChange">
-      <!-- <p class="miniTitle">基础信息</p> -->
-      <van-cell-group>
-        <van-field v-model="religiousType" center readonly label="宗教类型:" placeholder="请选择宗教类型" input-align="right"
-          right-icon="arrow-down" @click="showPlace = true" />
-        <van-popup v-model:show="showPlace" round position="bottom">
-          <van-picker title="宗教类型" :columns="$dictUtils.getDictList('hs_religion_type')" :columns-field-names="{
-            text: 'label',
-            value: 'value'
-          }" @cancel="showPlace = false" @confirm="getType" />
-        </van-popup>
-      </van-cell-group>
-      <van-cell-group>
-        <van-field v-model="inputForm.abnormalName" center label="异常人员:" placeholder="请填写异常人员姓名" input-align="right" />
-      </van-cell-group>
-      <van-cell-group>
-        <van-field v-model="inputForm.abnormalIdcar" center label="身份证号:" placeholder="请填写身份证号" input-align="right"
-          type="digit" />
-      </van-cell-group>
-      <van-cell-group>
-        <van-field v-model="inputForm.abnormalPhone" center label="手机号:" placeholder="请填写手机号" input-align="right"
-          type="tel" />
-      </van-cell-group>
-      <van-cell-group>
-        <van-field name="radio" label="性别:" input-align="right">
-          <template #input>
-            <van-radio-group v-model="inputForm.sex" direction="horizontal">
-              <van-radio name="1">男</van-radio>
-              <van-radio name="2">女</van-radio>
-            </van-radio-group>
-          </template>
-        </van-field>
-      </van-cell-group>
-      <van-cell-group>
-        <van-field v-model="inputForm.nativePlace" center readonly label="籍贯:" placeholder="请选择籍贯" input-align="right"
-          right-icon="arrow-down" @click="showArea = true" />
-        <van-popup v-model:show="showArea" round position="bottom">
-          <van-picker title="籍贯选择" :columns="options" :columns-field-names="customFieldName" @cancel="showArea = false"
-            @confirm="onFinish2" />
-        </van-popup>
-      </van-cell-group>
-      <van-cell-group>
-        <van-field v-model="inputForm.currentResidence" center readonly label="现居地:" placeholder="请选择现居地"
-          input-align="right" right-icon="arrow-down" @click="showCurrentArea = true" />
-        <van-popup v-model:show="showCurrentArea" round position="bottom">
-          <van-picker title="现居地选择" :columns="options" :columns-field-names="customFieldName"
-            @cancel="showCurrentArea = false" @confirm="onFinish" />
-        </van-popup>
-      </van-cell-group>
-      <van-cell-group>
-        <van-field v-model="inputForm.currentResidenceDetail" 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="inputForm.abnormalBehavior" required :rules="[{ required: true }]" placeholder="请填写异常行为"
-            center rows="2" type="textarea" label="异常行为:" label-align="top" />
-        </div>
-      </van-cell-group>
-      <van-cell-group>
-        <van-field name="uploader" required :rules="[{ required: true }]" label="证据上传:">
-          <template #input>
-            <van-uploader readonly v-model="fileList" :max-count="5" accept="" :preview-full-image="false"
-              :before-delete="deleteRead" @click-upload="chooseImg">
-              <van-button>上传文件(可添加图片、音、视频和文本等)</van-button>
-            </van-uploader>
-          </template>
-        </van-field>
-      </van-cell-group>
-      <div class="subbtn">
-        <van-button type="primary" native-type="submit">提交</van-button>
-        <van-button type="default" hairline @click="onClickLeft">取消</van-button>
-      </div>
-    </van-form>
-  </div>
+	<van-nav-bar fixed title="信教异常群众信息上报" left-text="" left-arrow @click-left="onClickLeft" />
+	<van-loading size="16px" v-if="isLoading">加载中...</van-loading>
+	<div class="main" v-if="!isLoading">
+		<!-- <p class="title">信教异常群众上报</p> -->
+		<van-form class="formArea" @submit="submit" show-error :show-error-message="false" validate-trigger="onChange">
+			<!-- <p class="miniTitle">基础信息</p> -->
+			<van-cell-group>
+				<van-field v-model="religiousType" center readonly label="宗教类型:" placeholder="请选择宗教类型"
+					input-align="right" right-icon="arrow-down" @click="showPlace = true" />
+				<van-popup v-model:show="showPlace" round position="bottom">
+					<van-picker title="宗教类型" :columns="$dictUtils.getDictList('hs_religion_type')" :columns-field-names="{
+              text: 'label',
+              value: 'value',
+            }" @cancel="showPlace = false" @confirm="getType" />
+				</van-popup>
+			</van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.abnormalName" center label="异常人员:" placeholder="请填写异常人员姓名"
+					input-align="right" />
+			</van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.abnormalIdcar" center label="身份证号:" placeholder="请填写身份证号"
+					input-align="right" type="digit" />
+			</van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.abnormalPhone" center label="手机号:" placeholder="请填写手机号"
+					input-align="right" type="tel" />
+			</van-cell-group>
+			<van-cell-group>
+				<van-field name="radio" label="性别:" input-align="right">
+					<template #input>
+						<van-radio-group v-model="inputForm.sex" direction="horizontal">
+							<van-radio name="1">男</van-radio>
+							<van-radio name="2">女</van-radio>
+						</van-radio-group>
+					</template>
+				</van-field>
+			</van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.nativePlace" center readonly label="籍贯:" placeholder="请选择籍贯"
+					input-align="right" right-icon="arrow-down" @click="showArea = true" />
+				<van-popup v-model:show="showArea" round position="bottom">
+					<van-picker title="籍贯选择" :columns="options" :columns-field-names="customFieldName"
+						@cancel="showArea = false" @confirm="onFinish2" />
+				</van-popup>
+			</van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.currentResidence" center readonly label="现居地:" placeholder="请选择现居地"
+					input-align="right" right-icon="arrow-down" @click="showCurrentArea = true" />
+				<van-popup v-model:show="showCurrentArea" round position="bottom">
+					<van-picker title="现居地选择" :columns="options" :columns-field-names="customFieldName"
+						@cancel="showCurrentArea = false" @confirm="onFinish" />
+				</van-popup>
+			</van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.currentResidenceDetail" 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="inputForm.abnormalBehavior" required :rules="[{ required: true }]"
+						placeholder="请填写异常行为" center rows="2" type="textarea" label="异常行为:" label-align="top" />
+				</div>
+			</van-cell-group>
+			<van-cell-group>
+				<van-field name="uploader" required :rules="[{ required: true }]" label="证据上传:">
+					<template #input>
+						<van-uploader readonly v-model="fileList" :max-count="5" accept="" :preview-full-image="false"
+							:before-delete="deleteRead" @click-upload="chooseImg">
+							<van-button>上传文件(可添加图片、音、视频和文本等)</van-button>
+						</van-uploader>
+					</template>
+				</van-field>
+			</van-cell-group>
+			<div class="subbtn">
+				<van-button type="primary" native-type="submit">提交</van-button>
+				<van-button type="default" hairline @click="onClickLeft">取消</van-button>
+			</div>
+		</van-form>
+	</div>
 </template>
-    
+
 <script>
-import { ref, onMounted, getCurrentInstance } from "vue";
-import { useCascaderAreaData } from "@vant/area-data";
-import ReligiousPeopleReportService from "@/api/differentbelievers/ReligiousPeopleReportService";
-import { useRoute } from "vue-router";
-import tools from "@/api/sys/tools";
-// 图片路径
-import $base from "@/utils/config";
-export default {
-  setup() {
-    // 返回
-    const onClickLeft = () => {
-      history.back();
-    };
-    // 加载
-    let isLoading = ref(true);
-    // 异常人员信息
-    const inputForm = ref({
-      id: '',
-      abnormalName: '',
-      religiousType: '',
-      information: '',
-      abnormalIdcar: '',
-      sex: '',
-      abnormalPhone: '',
-      nativePlace: '',
-      currentResidence: '',
-      currentResidenceDetail: '',
-      abnormalBehavior: '',
-      state: '0',
-      assessment: '0',
-      currentResidenceId: '',
-      currentResidenceLevel1: '',
-      currentResidenceLevel2: '',
-      currentResidenceLevel3: '',
-      currentResidenceLevel4: '',
-      currentResidenceLevel5: '',
-      currentResidenceLevel6: ''
-    });
-    const current = getCurrentInstance()
-    // 根据路由初始化
-    let route = useRoute();
-    onMounted(() => {
-      //籍贯接口
-      new tools().nativePlace().then((res) => {
-        options.value.push(...res);
-      });
-      if (route.query.id) {
-        new ReligiousPeopleReportService()
-          .queryById(route.query.id)
-          .then((data) => {
-            inputForm.value = data;
-            religiousType.value = current.appContext.config.globalProperties.$dictUtils.getDictLabel('hs_religion_type', inputForm.value.religiousType)
-            inputForm.value.information.split("|").forEach((item) => {
-              if (item.trim().length > 0) {
-                fileupList.value.push({
-                  name: decodeURIComponent(
-                    item.substring(item.lastIndexOf("/") + 1)
-                  ),
-                  url: $base + item.replace("程序附件//", "程序附件/"),
-                  id: item.replace("程序附件//", "程序附件/")
-                });
-                fileList.value.push({
-                  name: decodeURIComponent(
-                    item.substring(item.lastIndexOf("/") + 1)
-                  ),
-                  url: $base + item.replace("程序附件//", "程序附件/"),
-                  id: item.replace("程序附件//", "程序附件/")
-                });
-              }
-            });
-            isLoading.value = false;
-          });
-      } else {
-        isLoading.value = false;
-      }
-    });
-    // 现居地选择
-    const showCurrentArea = ref(false);
-    const customFieldName = {
-      text: "name",
-      value: "id",
-    };
-    // 选项列表,children 代表子选项,支持多级嵌套
-    const options = ref([]);
-    // 全部选项选择完毕后,会触发 finish 事件
-    const onFinish = ({ selectedOptions }) => {
-      showCurrentArea.value = false;
-      console.log(selectedOptions);
-      inputForm.value.currentResidence = selectedOptions
-        .map((option) => option.name)
-        .join("/");
-      inputForm.value.currentResidenceId = selectedOptions
-        .map((option) => option.id)
-        .join("/");
+	import {
+		ref,
+		onMounted,
+		getCurrentInstance
+	} from "vue";
+	import {
+		useStore
+	} from "vuex";
+	import {
+		useCascaderAreaData
+	} from "@vant/area-data";
+	import ReligiousPeopleReportService from "@/api/differentbelievers/ReligiousPeopleReportService";
+	import {
+		useRoute
+	} from "vue-router";
+	import tools from "@/api/sys/tools";
+	// 图片路径
+	import $base from "@/utils/config";
+	export default {
+		setup() {
+			const store = useStore();
+			// 返回
+			const onClickLeft = () => {
+				history.back();
+			};
+			// 加载
+			let isLoading = ref(true);
+			// 异常人员信息
+			const inputForm = ref({
+				id: "",
+				abnormalName: "",
+				religiousType: "",
+				information: "",
+				abnormalIdcar: "",
+				sex: "",
+				abnormalPhone: "",
+				nativePlace: "",
+				currentResidence: "",
+				currentResidenceDetail: "",
+				abnormalBehavior: "",
+				state: "0",
+				assessment: "0",
+				currentResidenceId: "",
+				currentResidenceLevel1: "",
+				currentResidenceLevel2: "",
+				currentResidenceLevel3: "",
+				currentResidenceLevel4: "",
+				currentResidenceLevel5: "",
+				currentResidenceLevel6: "",
+			});
+			const current = getCurrentInstance();
+			// 根据路由初始化
+			let route = useRoute();
+			onMounted(() => {
+				//籍贯接口
+				new tools().nativePlace().then((res) => {
+					options.value.push(...res);
+				});
+				if (route.query.id) {
+					new ReligiousPeopleReportService()
+						.queryById(route.query.id)
+						.then((data) => {
+							inputForm.value = data;
+							religiousType.value =
+								current.appContext.config.globalProperties.$dictUtils.getDictLabel(
+									"hs_religion_type",
+									inputForm.value.religiousType
+								);
+							inputForm.value.information.split("|").forEach((item) => {
+								if (item.trim().length > 0) {
+									fileupList.value.push({
+										name: decodeURIComponent(
+											item.substring(item.lastIndexOf("/") + 1)
+										),
+										url: $base + item.replace("程序附件//", "程序附件/"),
+										id: item.replace("程序附件//", "程序附件/"),
+									});
+									fileList.value.push({
+										name: decodeURIComponent(
+											item.substring(item.lastIndexOf("/") + 1)
+										),
+										url: $base + item.replace("程序附件//", "程序附件/"),
+										id: item.replace("程序附件//", "程序附件/"),
+									});
+								}
+							});
+							isLoading.value = false;
+						});
+				} else {
+					isLoading.value = false;
+				}
+			});
+			// 现居地选择
+			const showCurrentArea = ref(false);
+			const customFieldName = {
+				text: "name",
+				value: "id",
+			};
+			// 选项列表,children 代表子选项,支持多级嵌套
+			const options = ref([]);
+			// 全部选项选择完毕后,会触发 finish 事件
+			const onFinish = ({
+				selectedOptions
+			}) => {
+				showCurrentArea.value = false;
+				console.log(selectedOptions);
+				inputForm.value.currentResidence = selectedOptions
+					.map((option) => option.name)
+					.join("/");
+				inputForm.value.currentResidenceId = selectedOptions
+					.map((option) => option.id)
+					.join("/");
 
-      inputForm.value.currentResidenceLevel1 = selectedOptions[0] ? selectedOptions[0].id : ''
-      inputForm.value.currentResidenceLevel2 = selectedOptions[1] ? selectedOptions[1].id : ''
-      inputForm.value.currentResidenceLevel3 = selectedOptions[2] ? selectedOptions[2].id : ''
-      inputForm.value.currentResidenceLevel4 = selectedOptions[3] ? selectedOptions[3].id : ''
-      inputForm.value.currentResidenceLevel5 = selectedOptions[4] ? selectedOptions[4].id : ''
-      inputForm.value.currentResidenceLevel6 = selectedOptions[5] ? selectedOptions[5].id : ''
-    }
-    const getLocation = () => {
-      xm.getLocation().then(data => {
-        inputForm.value.currentResidenceDetail = data.POIName;
-      })
-    }
-    // 籍贯选择
-    let showArea = ref(false);
-    // 全部选项选择完毕后,会触发 finish 事件
-    const onFinish2 = ({ selectedOptions }) => {
-      showArea.value = false;
-      inputForm.value.nativePlace = selectedOptions
-        .map((option) => option.name)
-        .join("/");
-    };
-    const getType = ({ selectedOptions }) => {
-      showPlace.value = false;
-      inputForm.value.religiousType = selectedOptions[0].value;
-      religiousType.value = selectedOptions[0].label
-    };
-    // 文件上传
-    let fileList = ref([]);
-    let fileupList = ref([]);
-    const chooseImg = () => {
-      xm.chooseFile({
-        count: 1,
-        name: "file",
-        url: $base + `/sys/file/webupload/upload?uploadPath=differentbelievers/religiousPeopleReport`,
-        headers: { 'Content-Type': 'multipart/form-data', "token": window.localStorage.getItem('MZ_TOKEN') },
-      }).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)
-      })
-    }
-    // 删除文件
-    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 submit = () => {
-      isLoading.value = true;
-      //保存前附件处理
-      inputForm.value.information = fileupList.value
-        .map((option) => option.id)
-        .join("|");
-      new ReligiousPeopleReportService().save(inputForm.value).then((res) => {
-        if (res.status == 200 || res.statusText == "OK") {
-          xm.showToast({
-            message: res.data,
-          });
-        }
-        onClickLeft();
-      });
-    };
-    let showPlace = ref(false);
-    let religiousType = ref('');
-    return {
-      inputForm,
-      religiousType,
-      // 返回
-      onClickLeft,
-      // 地区选择
-      showArea,
-      options,
-      onFinish,
-      onFinish2,
-      customFieldName,
-      isLoading,
-      getType,
-      // 文件上传
-      chooseImg,
-      deleteRead,
-      fileList,
-      submit,
-      showCurrentArea,
-      showPlace,
-      getLocation
-    };
-  },
-};
+				inputForm.value.currentResidenceLevel1 = selectedOptions[0] ?
+					selectedOptions[0].id :
+					"";
+				inputForm.value.currentResidenceLevel2 = selectedOptions[1] ?
+					selectedOptions[1].id :
+					"";
+				inputForm.value.currentResidenceLevel3 = selectedOptions[2] ?
+					selectedOptions[2].id :
+					"";
+				inputForm.value.currentResidenceLevel4 = selectedOptions[3] ?
+					selectedOptions[3].id :
+					"";
+				inputForm.value.currentResidenceLevel5 = selectedOptions[4] ?
+					selectedOptions[4].id :
+					"";
+				inputForm.value.currentResidenceLevel6 = selectedOptions[5] ?
+					selectedOptions[5].id :
+					"";
+			};
+			const getLocation = () => {
+				xm.getLocation().then((data) => {
+					inputForm.value.currentResidenceDetail = data.POIName;
+				});
+			};
+			// 籍贯选择
+			let showArea = ref(false);
+			// 全部选项选择完毕后,会触发 finish 事件
+			const onFinish2 = ({
+				selectedOptions
+			}) => {
+				showArea.value = false;
+				inputForm.value.nativePlace = selectedOptions
+					.map((option) => option.name)
+					.join("/");
+			};
+			const getType = ({
+				selectedOptions
+			}) => {
+				showPlace.value = false;
+				inputForm.value.religiousType = selectedOptions[0].value;
+				religiousType.value = selectedOptions[0].label;
+			};
+			// 文件上传
+			let fileList = ref([]);
+			let fileupList = ref([]);
+			const chooseImg = () => {
+				if (store.state.pctoken != "") {
+					xm.chooseFile({
+						count: 1,
+						name: "file",
+						url: $base +
+							`/sys/file/webupload/upload?uploadPath=differentbelievers/religiousPeopleReport`,
+						headers: {
+							"Content-Type": "multipart/form-data",
+							"token": store.state.pctoken,
+						},
+					}).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);
+					});
+				}
+			};
+			// 删除文件
+			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 submit = () => {
+				isLoading.value = true;
+				//保存前附件处理
+				inputForm.value.information = fileupList.value
+					.map((option) => option.id)
+					.join("|");
+				new ReligiousPeopleReportService().save(inputForm.value).then((res) => {
+					if (res.status == 200 || res.statusText == "OK") {
+						xm.showToast({
+							message: res.data,
+						});
+					}
+					onClickLeft();
+				});
+			};
+			let showPlace = ref(false);
+			let religiousType = ref("");
+			return {
+				inputForm,
+				religiousType,
+				// 返回
+				onClickLeft,
+				// 地区选择
+				showArea,
+				options,
+				onFinish,
+				onFinish2,
+				customFieldName,
+				isLoading,
+				getType,
+				// 文件上传
+				chooseImg,
+				deleteRead,
+				fileList,
+				submit,
+				showCurrentArea,
+				showPlace,
+				getLocation,
+			};
+		},
+	};
 </script>
-    
+
 <style scoped>
-.van-uploader .van-button {
-  border: none;
-  color: #36a7f3;
-  top: -4px;
-}
+	.van-uploader .van-button {
+		border: none;
+		color: #36a7f3;
+		top: -4px;
+	}
 
-.rowTextArea::v-deep .van-field__value {
-  width: 98%;
-  border: 2px solid #ccc;
-  border-radius: 10px;
-  padding-left: 10px;
-}
+	.rowTextArea::v-deep .van-field__value {
+		width: 98%;
+		border: 2px solid #ccc;
+		border-radius: 10px;
+		padding-left: 10px;
+	}
 
-.rowTextArea::v-deep .van-cell {
-  display: flow-root;
-}
+	.rowTextArea::v-deep .van-cell {
+		display: flow-root;
+	}
 
-.van-radio {
-  margin-right: 10px;
-}
+	.van-radio {
+		margin-right: 10px;
+	}
 </style>

+ 527 - 494
src/views/activityMan/nonReligiousInformation/nonReligiousInformationView.vue

@@ -1,44 +1,38 @@
 <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">
-    <!-- <p class="title">非宗教类信息上报</p> -->
-    <div class="formArea">
-      <!-- <p class="miniTitle">基础信息</p> -->
-
-      <van-cell-group>
-        <van-field v-model="inputForm.name" center label="人员姓名:" placeholder="请填写人员姓名" input-align="right">
-        </van-field>
-      </van-cell-group>
-
-      <van-cell-group>
-        <van-field name="radio" label="性别:" input-align="right">
-          <template #input>
-            <van-radio-group v-model="inputForm.sex" direction="horizontal">
-              <van-radio name="1">男</van-radio>
-              <van-radio name="2">女</van-radio>
-            </van-radio-group>
-          </template>
-        </van-field>
-      </van-cell-group>
-
-      <van-cell-group>
-        <van-field v-model="inputForm.idcard" center label="身份证号:" placeholder="请填写身份证号" input-align="right"
-          type="digit" />
-      </van-cell-group>
-      <van-cell-group>
-        <van-field v-model="inputForm.phone" center label="手机号:" placeholder="请填写手机号" input-align="right"
-          type="tel" />
-      </van-cell-group>
-
-      <!-- <van-cell-group>
+	<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">
+		<!-- <p class="title">非宗教类信息上报</p> -->
+		<div class="formArea">
+			<!-- <p class="miniTitle">基础信息</p> -->
+
+			<van-cell-group>
+				<van-field v-model="inputForm.name" center label="人员姓名:" placeholder="请填写人员姓名" input-align="right">
+				</van-field>
+			</van-cell-group>
+
+			<van-cell-group>
+				<van-field name="radio" label="性别:" input-align="right">
+					<template #input>
+						<van-radio-group v-model="inputForm.sex" direction="horizontal">
+							<van-radio name="1">男</van-radio>
+							<van-radio name="2">女</van-radio>
+						</van-radio-group>
+					</template>
+				</van-field>
+			</van-cell-group>
+
+			<van-cell-group>
+				<van-field v-model="inputForm.idcard" center label="身份证号:" placeholder="请填写身份证号" input-align="right"
+					type="digit" />
+			</van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.phone" center label="手机号:" placeholder="请填写手机号" input-align="right"
+					type="tel" />
+			</van-cell-group>
+
+			<!-- <van-cell-group>
         <van-field
           v-model="inputForm.nonReligiousCategoriesname"
           readonly
@@ -83,58 +77,28 @@
         </van-dialog>
       </van-cell-group> -->
 
-      <van-cell-group>
-        <van-field
-          v-model="inputForm.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
-            :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="inputForm.placeSelectName"
-          center
-          readonly
-          required
-          label="地点:"
-          placeholder="请选择"
-          input-align="right"
-          right-icon="arrow-down"
-          @click="showArea = true"
-        />
-        <van-popup v-model:show="showArea" round position="bottom">
-          <van-cascader
-            v-model="cascaderValue"
-            title="请选择所在地区"
-            :options="options"
-            @close="showArea = false"
-            @finish="onFinish"
-            :field-names="fieldNames"
-          />
-        </van-popup>
-      </van-cell-group>
-
-      <!-- <van-cell-group>
+			<van-cell-group>
+				<van-field v-model="inputForm.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 :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="inputForm.placeSelectName" center readonly required label="地点:" placeholder="请选择"
+					input-align="right" right-icon="arrow-down" @click="showArea = true" />
+				<van-popup v-model:show="showArea" round position="bottom">
+					<van-cascader v-model="cascaderValue" title="请选择所在地区" :options="options" @close="showArea = false"
+						@finish="onFinish" :field-names="fieldNames" />
+				</van-popup>
+			</van-cell-group>
+
+			<!-- <van-cell-group>
         <van-field
           v-model="inputForm.placeDetailed"
           center
@@ -144,33 +108,34 @@
           right-icon="location"
         />
       </van-cell-group> -->
-	  
-	  <van-cell-group>
-	    <van-field v-model="inputForm.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>
-        <van-field name="uploader" label="证据上传:">
-          <template #input>
 
-            <!-- <van-uploader :after-read="afterRead" v-model="fileList" :max-count="5" capture="camera" accept=""
+			<van-cell-group>
+				<van-field v-model="inputForm.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>
+				<van-field name="uploader" label="证据上传:">
+					<template #input>
+
+						<!-- <van-uploader :after-read="afterRead" v-model="fileList" :max-count="5" capture="camera" accept=""
               :preview-full-image="false" :before-delete="deleteRead">
               <van-button>上传文件</van-button>
             </van-uploader> -->
 
-            <van-uploader readonly v-model="fileList" :max-count="5" accept="" :preview-full-image="false"
-              :before-delete="deleteRead" @click-upload="chooseImg">
-              <van-button>上传文件</van-button>
-            </van-uploader>
+						<van-uploader readonly v-model="fileList" :max-count="5" accept="" :preview-full-image="false"
+							:before-delete="deleteRead" @click-upload="chooseImg">
+							<van-button>上传文件</van-button>
+						</van-uploader>
 
-          </template>
-        </van-field>
-      </van-cell-group>
-<!-- 
+					</template>
+				</van-field>
+			</van-cell-group>
+			<!-- 
       <van-cell-group>
         <van-field label="事件概述:" label-align="top">
           <template #input>
@@ -178,391 +143,459 @@
           </template>
         </van-field>
       </van-cell-group> -->
-      <van-cell-group>
-        <div class="rowTextArea">
-          <van-field
-            v-model="inputForm.eventOverview"
-            center
-            rows="1"
-            type="textarea"
-            label="事件概述:"
-            label-align="top"
-          />
-        </div>
-      </van-cell-group>
-    </div>
-    <div class="subbtn">
-      <van-button type="primary" @click="submit">提交</van-button>
-      <van-button type="default" hairline>取消</van-button>
-    </div>
-  </div>
+			<van-cell-group>
+				<div class="rowTextArea">
+					<van-field v-model="inputForm.eventOverview" center rows="1" type="textarea" label="事件概述:"
+						label-align="top" />
+				</div>
+			</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 { ref, onMounted } from "vue";
-import personList from "../personList.vue";
-import organizationsList from "../organizationsList.vue";
-import tools from "@/api/sys/tools";
-import nonReligiousInformationService from "@/api/nonReligiousInformation/nonReligiousInformationService";
-import UserManage from "@/api/user/UserManage";
-import { useRoute } from "vue-router";
-// 富文本编辑器
-import WangEditor from "@/components/editor/WangEditor";
-import { formatDate, formatTime } from "@/utils/datatime";
-// 图片路径
-import $base from "@/utils/config";
-export default {
-  components: { personList, WangEditor,organizationsList },
-  setup() {
-    // 导航栏颜色
-    const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
-    // 加载
-    let isLoading = ref(true);
-    // 返回
-    const onClickLeft = () => {
-      history.back();
-    };
-    //信息
-    let inputForm = ref({
-      id: "",
-      name: "",
-      sex:"1",
-      idcard:"",
-      phone:"",
-      place: "320900",
-      placeSelectName: "盐城市",
-      placeSelectType3: "320900",
-      placeSelectType4: "",
-      placeSelectType5: "",
-      placeSelectType6: "",
-      placeDetailed: "",
-      reportingTime: "",
-      eventContent: "",
-      state: "0",
-      assessment: "0",
-      eventOverview: "",
-    });
-    const contentEditor = ref(null);
-    // 获取组件
-    const organ = ref(null);
-    let route = useRoute();
-    onMounted(() => {
-      // 根据路由初始化
-      if (route.query.id) {
-        new nonReligiousInformationService()
-          .queryById(route.query.id)
-          .then((data) => {
-            inputForm.value = data;
-
-
-            //附件处理      
-            inputForm.value.annex.split("|").forEach((item) => {
-              if (item.trim().length > 0) {
-                fileList.value.push({
-                  name: decodeURIComponent(
-                    item.substring(item.lastIndexOf("/") + 1)
-                  ),
-                  url: $base +"/"+ item.replace('程序附件//','程序附件/'),
-                });
-                fileupList.value.push({
-                  name: decodeURIComponent(
-                    item.substring(item.lastIndexOf("/") + 1)
-                  ),
-                  url: item,
-                });
-              }
-            });
-
-
-            //inputForm.value.siteName.name=inputForm.value.siteName.organizationName;
-
-            // Categories.value.forEach((item) => {
-            //   if(item.id==inputForm.value.nonReligiousCategories){
-            //     inputForm.value.nonReligiousCategoriesname = item.name;   
-            //   }              
-            // });            
-            
-            //contentEditor.value.init(inputForm.value.eventContent);
-            
-            isLoading.value = false;
-          });
-      } else {
-        //contentEditor.value.init(inputForm.value.eventContent);
-        isLoading.value = false;
-      }
-    });
-
-
-    // 非宗教类别
-    let showCategories = ref(false);
-    let Categories = ref([{"name":"宗教组织","id":"1"},{"name":"邪教组织","id":"10"},{"name":"地下神学院","id":"11"},{"name":"地下教会","id":"2"},
-    {"name":"韩美境外渗透组织","id":"3"},{"name":"本地精神控制类有害培训机构","id":"4"},{"name":"“呼喊派”骨干组织","id":"5"},
-    {"name":"“改革宗”地下教会组织","id":"6"},{"name":"藏传佛教本地组织","id":"7"},{"name":"学生传教组织","id":"8"},
-    {"name":"“义诊医疗”地下教会组织","id":"9"},{"name":"“亚文化”传教组织","id":"91"},{"name":"重点公司组织","id":"92"},]);
-    const customFieldName = {
-      text: "name",
-      value: "id",
-    };
-    const getCategories = ({ selectedOptions }) => {
-      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
-        showCategories.value = false;
-        inputForm.value.nonReligiousCategories = selectedOptions[0].id;
-        inputForm.value.nonReligiousCategoriesname = selectedOptions[0].name;        
-        //组件显示出来的时候就可以调用了
-        if(organ.value!=null){
-          organ.value.flushByid(selectedOptions[0].id)
-          inputForm.value.siteName.id = "";
-          inputForm.value.siteName.name = "";
-          list2.value = [];
-          list2.type = "";
-        }
-      }
-    };
-
-
-
-
-    //组织名称
-    let showOrganizations = ref(false);
-    let list2 = {
-      value: [],
-      type: "",
-    };
-    const selected2 = (val, type) => {
-      list2.value = val;
-      list2.type = type;
-    };
-    const reselected2 = () => {
-      let ids = [];
-      let names = [];
-      if (list2.type == 1) {
-        list2.value.forEach((item) => {
-          ids.push(item.id);
-          names.push(item.organizationName);
-        });
-        inputForm.value.siteName.id = ids.join(",");
-        inputForm.value.siteName.name = names.join(",");
-      }
-    };
-
-
-    // 获取活动时间
-    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;
-      inputForm.value.reportingTime = `${currentDate.value.join(
+<script>
+	import {
+		ref,
+		onMounted
+	} from "vue";
+	import {
+		useStore
+	} from "vuex";
+	import personList from "../personList.vue";
+	import organizationsList from "../organizationsList.vue";
+	import tools from "@/api/sys/tools";
+	import nonReligiousInformationService from "@/api/nonReligiousInformation/nonReligiousInformationService";
+	import UserManage from "@/api/user/UserManage";
+	import {
+		useRoute
+	} from "vue-router";
+	// 富文本编辑器
+	import WangEditor from "@/components/editor/WangEditor";
+	import {
+		formatDate,
+		formatTime
+	} from "@/utils/datatime";
+	// 图片路径
+	import $base from "@/utils/config";
+	export default {
+		
+		components: {
+			personList,
+			WangEditor,
+			organizationsList
+		},
+		setup() {
+			const store = useStore();
+			// 导航栏颜色
+			const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
+			// 加载
+			let isLoading = ref(true);
+			// 返回
+			const onClickLeft = () => {
+				history.back();
+			};
+			//信息
+			let inputForm = ref({
+				id: "",
+				name: "",
+				sex: "1",
+				idcard: "",
+				phone: "",
+				place: "320900",
+				placeSelectName: "盐城市",
+				placeSelectType3: "320900",
+				placeSelectType4: "",
+				placeSelectType5: "",
+				placeSelectType6: "",
+				placeDetailed: "",
+				reportingTime: "",
+				eventContent: "",
+				state: "0",
+				assessment: "0",
+				eventOverview: "",
+			});
+			const contentEditor = ref(null);
+			// 获取组件
+			const organ = ref(null);
+			let route = useRoute();
+			onMounted(() => {
+				// 根据路由初始化
+				if (route.query.id) {
+					new nonReligiousInformationService()
+						.queryById(route.query.id)
+						.then((data) => {
+							inputForm.value = data;
+
+
+							//附件处理      
+							inputForm.value.annex.split("|").forEach((item) => {
+								if (item.trim().length > 0) {
+									fileList.value.push({
+										name: decodeURIComponent(
+											item.substring(item.lastIndexOf("/") + 1)
+										),
+										url: $base + "/" + item.replace('程序附件//', '程序附件/'),
+									});
+									fileupList.value.push({
+										name: decodeURIComponent(
+											item.substring(item.lastIndexOf("/") + 1)
+										),
+										url: item,
+									});
+								}
+							});
+
+
+							//inputForm.value.siteName.name=inputForm.value.siteName.organizationName;
+
+							// Categories.value.forEach((item) => {
+							//   if(item.id==inputForm.value.nonReligiousCategories){
+							//     inputForm.value.nonReligiousCategoriesname = item.name;   
+							//   }              
+							// });            
+
+							//contentEditor.value.init(inputForm.value.eventContent);
+
+							isLoading.value = false;
+						});
+				} else {
+					//contentEditor.value.init(inputForm.value.eventContent);
+					isLoading.value = false;
+				}
+			});
+
+
+			// 非宗教类别
+			let showCategories = ref(false);
+			let Categories = ref([{
+					"name": "宗教组织",
+					"id": "1"
+				}, {
+					"name": "邪教组织",
+					"id": "10"
+				}, {
+					"name": "地下神学院",
+					"id": "11"
+				}, {
+					"name": "地下教会",
+					"id": "2"
+				},
+				{
+					"name": "韩美境外渗透组织",
+					"id": "3"
+				}, {
+					"name": "本地精神控制类有害培训机构",
+					"id": "4"
+				}, {
+					"name": "“呼喊派”骨干组织",
+					"id": "5"
+				},
+				{
+					"name": "“改革宗”地下教会组织",
+					"id": "6"
+				}, {
+					"name": "藏传佛教本地组织",
+					"id": "7"
+				}, {
+					"name": "学生传教组织",
+					"id": "8"
+				},
+				{
+					"name": "“义诊医疗”地下教会组织",
+					"id": "9"
+				}, {
+					"name": "“亚文化”传教组织",
+					"id": "91"
+				}, {
+					"name": "重点公司组织",
+					"id": "92"
+				},
+			]);
+			const customFieldName = {
+				text: "name",
+				value: "id",
+			};
+			const getCategories = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					showCategories.value = false;
+					inputForm.value.nonReligiousCategories = selectedOptions[0].id;
+					inputForm.value.nonReligiousCategoriesname = selectedOptions[0].name;
+					//组件显示出来的时候就可以调用了
+					if (organ.value != null) {
+						organ.value.flushByid(selectedOptions[0].id)
+						inputForm.value.siteName.id = "";
+						inputForm.value.siteName.name = "";
+						list2.value = [];
+						list2.type = "";
+					}
+				}
+			};
+
+
+
+
+			//组织名称
+			let showOrganizations = ref(false);
+			let list2 = {
+				value: [],
+				type: "",
+			};
+			const selected2 = (val, type) => {
+				list2.value = val;
+				list2.type = type;
+			};
+			const reselected2 = () => {
+				let ids = [];
+				let names = [];
+				if (list2.type == 1) {
+					list2.value.forEach((item) => {
+						ids.push(item.id);
+						names.push(item.organizationName);
+					});
+					inputForm.value.siteName.id = ids.join(",");
+					inputForm.value.siteName.name = names.join(",");
+				}
+			};
+
+
+			// 获取活动时间
+			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;
+				inputForm.value.reportingTime = `${currentDate.value.join(
         "-"
       )} ${currentTime.value.join(":")}`;
-    };
-
-    // 地区选择
-    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;
-        inputForm.value.placeSelectName = selectedOptions
-          .map((option) => option.name)
-          .join("/");
-
-          inputForm.value.place = selectedOptions
-          .map((option) => option.id)
-          .join("/");
-
-          inputForm.value.placeSelectType3= selectedOptions[0].id;
-          inputForm.value.placeSelectType4= selectedOptions[1].id;
-          inputForm.value.placeSelectType5= selectedOptions[2].id;
-      }
-
-    };
-	
-	const getLocation = () => {
-	  xm.getLocation().then(data => {
-	    inputForm.value.placeDetailed = data.POIName;
-	  })
-	}
-    
-    // 文件上传
-    let fileList = ref([]);
-    let fileupList = ref([]);
-    const chooseImg = () => {
-      xm.chooseFile({
-        count: 1,
-        name: "file",
-        url: $base + `/sys/file/webupload/upload?uploadPath=nonReligiousInformation/nonReligiousInformation`,
-        headers: { 'Content-Type': 'multipart/form-data', "token": window.localStorage.getItem('MZ_TOKEN') },
-      }).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)
-      })
-    };
-
-    // const afterRead = (file) => {
-    //   // 此时可以自行将文件上传至服务器
-    //   new tools()
-    //     .uploadFile(file, `nonReligiousInformation/nonReligiousInformation`)
-    //     .then(({ data }) => {
-        
-    //       data.name = decodeURIComponent(
-    //         data.url.substring(
-    //           data.url.lastIndexOf("/") + 1
-    //         )
-    //       );
-
-    //       //data.url = `${$base}` + data.url;    
-    //       fileupList.value.push(data);
-    //       window.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 fjdelete = (file) => {
-    //   //删除文件操作
-    //   for (let index = 0; index < fileList.value.length; index++) {
-    //     if(file.file==fileList.value[index].file){
-    //       let delurl=fileupList.value[index].url;                   
-    //       new tools()
-    //         .uploadFiledelete("", delurl)
-    //         .then(({ data }) => {
-    //       });
-    //       fileupList.value.splice(index,1);
-    //       fileList.value.splice(index,1); 
-    //     }        
-    //   }      
-    // };
-
-    const submit = () => {
-      isLoading.value = true;
-      //保存前附件处理
-      inputForm.value.annex = fileupList.value.map((option) => option.id).join("|");
-      new nonReligiousInformationService().save(inputForm.value).then((res) => {
-        if(res.data=="保存其他有害信息上报成功"){
-          window.xm.showToast({
-             message:"保存成功!"
-          })
-          onClickLeft();
-        isLoading.value = false;
-        }
-      });
-    };
-    return {
-      // 导航栏颜色
-      selectColor,
-      isLoading,
-      inputForm,
-      //非宗教类别
-      showCategories,
-      Categories,
-      customFieldName,
-      getCategories,
-      //组织名称
-      showOrganizations,
-      selected2,
-      reselected2,
-      // 活动时间
-      showAct,
-      currentDate,
-      currentTime,
-      columnsType,
-      getTime,
-      // 返回
-      onClickLeft,
-
-      // 地区选择
-      showArea,
-      fieldNames,
-      options,
-      onFinish,
-	    getLocation,
-      cascaderValue,
-      contentEditor,
-
-      // 文件上传
-      chooseImg,
-      fileList,
-      fileupList,
-      deleteRead,
-      // change,
-      submit,
-      organ
-    };
-  },
-};
+			};
+
+			// 地区选择
+			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;
+					inputForm.value.placeSelectName = selectedOptions
+						.map((option) => option.name)
+						.join("/");
+
+					inputForm.value.place = selectedOptions
+						.map((option) => option.id)
+						.join("/");
+
+					inputForm.value.placeSelectType3 = selectedOptions[0].id;
+					inputForm.value.placeSelectType4 = selectedOptions[1].id;
+					inputForm.value.placeSelectType5 = selectedOptions[2].id;
+				}
+
+			};
+
+			const getLocation = () => {
+				xm.getLocation().then(data => {
+					inputForm.value.placeDetailed = data.POIName;
+				})
+			}
+
+			// 文件上传
+			let fileList = ref([]);
+			let fileupList = ref([]);
+			const chooseImg = () => {
+				if (store.state.pctoken != "") {
+					xm.chooseFile({
+						count: 1,
+						name: "file",
+						url: $base +
+							`/sys/file/webupload/upload?uploadPath=nonReligiousInformation/nonReligiousInformation`,
+						headers: {
+							'Content-Type': 'multipart/form-data',
+							"token": store.state.pctoken,
+						},
+					}).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)
+					})
+				}
+			};
+
+			// const afterRead = (file) => {
+			//   // 此时可以自行将文件上传至服务器
+			//   new tools()
+			//     .uploadFile(file, `nonReligiousInformation/nonReligiousInformation`)
+			//     .then(({ data }) => {
+
+			//       data.name = decodeURIComponent(
+			//         data.url.substring(
+			//           data.url.lastIndexOf("/") + 1
+			//         )
+			//       );
+
+			//       //data.url = `${$base}` + data.url;    
+			//       fileupList.value.push(data);
+			//       window.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 fjdelete = (file) => {
+			//   //删除文件操作
+			//   for (let index = 0; index < fileList.value.length; index++) {
+			//     if(file.file==fileList.value[index].file){
+			//       let delurl=fileupList.value[index].url;                   
+			//       new tools()
+			//         .uploadFiledelete("", delurl)
+			//         .then(({ data }) => {
+			//       });
+			//       fileupList.value.splice(index,1);
+			//       fileList.value.splice(index,1); 
+			//     }        
+			//   }      
+			// };
+
+			const submit = () => {
+				isLoading.value = true;
+				//保存前附件处理
+				inputForm.value.annex = fileupList.value.map((option) => option.id).join("|");
+				new nonReligiousInformationService().save(inputForm.value).then((res) => {
+					if (res.data == "保存其他有害信息上报成功") {
+						window.xm.showToast({
+							message: "保存成功!"
+						})
+						onClickLeft();
+						isLoading.value = false;
+					}
+				});
+			};
+			return {
+				// 导航栏颜色
+				selectColor,
+				isLoading,
+				inputForm,
+				//非宗教类别
+				showCategories,
+				Categories,
+				customFieldName,
+				getCategories,
+				//组织名称
+				showOrganizations,
+				selected2,
+				reselected2,
+				// 活动时间
+				showAct,
+				currentDate,
+				currentTime,
+				columnsType,
+				getTime,
+				// 返回
+				onClickLeft,
+
+				// 地区选择
+				showArea,
+				fieldNames,
+				options,
+				onFinish,
+				getLocation,
+				cascaderValue,
+				contentEditor,
+
+				// 文件上传
+				chooseImg,
+				fileList,
+				fileupList,
+				deleteRead,
+				// change,
+				submit,
+				organ
+			};
+		},
+	};
 </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>
+	.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>

+ 481 - 502
src/views/activityMan/securityFacilitiesErr/securityFacilitiesErrView.vue

@@ -1,123 +1,61 @@
 <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="info.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="info.facilityTypename"
-          center
-          readonly
-          required
-          label="设施类型:"
-          placeholder="请选择"
-          input-align="right"
-          right-icon="arrow-down"
-          @click="showLx = true"
-        />
-        <van-popup v-model:show="showLx" round position="bottom">
-          <van-picker
-            title="设施类型选择"
-            :columns="facilityTypes"
-            @cancel="showLx = false"
-            @confirm="getfacilityType"
-          />
-        </van-popup>
-      </van-cell-group>
-
-      <van-cell-group v-if="info.facilityType==''">        
-        <van-field
-          v-model="info.facilityTypename"
-          center
-          readonly
-          required
-          label="位置:"
-          placeholder="请选择"
-          input-align="right"
-          right-icon="arrow-down"
-        />
-      </van-cell-group>
-
-      <van-cell-group v-if="info.facilityType=='0'">
-        <van-field
-          v-model="info.videoAudioPoint.name"
-          readonly
-          required
-          label="音视频点位:"
-          placeholder="请选择"
-          input-align="right"
-          right-icon="arrow-down"
-          @click="showVideoAudio = true"
-        />
-        <van-popup v-model:show="showVideoAudio" round position="bottom">
-          <van-picker
-            title="音视频点位选择"
-            :columns="VideoAudios"
-            :columns-field-names="customFieldName"
-            @cancel="showVideoAudio = false"
-            @confirm="setVideoAudios"
-          />
-        </van-popup>
-      </van-cell-group>
-
-      <van-cell-group  v-if="info.facilityType=='1'">
-        <van-field
-          v-model="info.siteFireProtection.name"
-          readonly
-          required
-          label="消防点位:"
-          placeholder="请选择"
-          input-align="right"
-          right-icon="arrow-down"
-          @click="showFireStation = true"
-        />
-        <van-popup v-model:show="showFireStation" round position="bottom">
-          <van-picker
-            title="消防点位选择"
-            :columns="FireStations"
-            :columns-field-names="customFieldName"
-            @cancel="showFireStation = false"
-            @confirm="setFireStations"
-          />
-        </van-popup>
-      </van-cell-group>
-
-      <van-cell-group>
-        <van-field name="uploader" label="附件:">
-          <template #input>
-
-            <!-- <van-uploader
+	<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="info.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="info.facilityTypename" center readonly required label="设施类型:" placeholder="请选择"
+					input-align="right" right-icon="arrow-down" @click="showLx = true" />
+				<van-popup v-model:show="showLx" round position="bottom">
+					<van-picker title="设施类型选择" :columns="facilityTypes" @cancel="showLx = false"
+						@confirm="getfacilityType" />
+				</van-popup>
+			</van-cell-group>
+
+			<van-cell-group v-if="info.facilityType==''">
+				<van-field v-model="info.facilityTypename" center readonly required label="位置:" placeholder="请选择"
+					input-align="right" right-icon="arrow-down" />
+			</van-cell-group>
+
+			<van-cell-group v-if="info.facilityType=='0'">
+				<van-field v-model="info.videoAudioPoint.name" readonly required label="音视频点位:" placeholder="请选择"
+					input-align="right" right-icon="arrow-down" @click="showVideoAudio = true" />
+				<van-popup v-model:show="showVideoAudio" round position="bottom">
+					<van-picker title="音视频点位选择" :columns="VideoAudios" :columns-field-names="customFieldName"
+						@cancel="showVideoAudio = false" @confirm="setVideoAudios" />
+				</van-popup>
+			</van-cell-group>
+
+			<van-cell-group v-if="info.facilityType=='1'">
+				<van-field v-model="info.siteFireProtection.name" readonly required label="消防点位:" placeholder="请选择"
+					input-align="right" right-icon="arrow-down" @click="showFireStation = true" />
+				<van-popup v-model:show="showFireStation" round position="bottom">
+					<van-picker title="消防点位选择" :columns="FireStations" :columns-field-names="customFieldName"
+						@cancel="showFireStation = false" @confirm="setFireStations" />
+				</van-popup>
+			</van-cell-group>
+
+			<van-cell-group>
+				<van-field name="uploader" label="附件:">
+					<template #input>
+
+						<!-- <van-uploader
               :after-read="afterRead"
               v-model="fileList"
               :max-count="6"
@@ -128,392 +66,433 @@
               <van-button icon="plus">上传文件</van-button>
             </van-uploader> -->
 
-            <van-uploader readonly v-model="fileList" :max-count="5" accept="" :preview-full-image="false"
-              :before-delete="deleteRead" @click-upload="chooseImg">
-              <van-button>上传文件</van-button>
-            </van-uploader>
-
-          </template>
-        </van-field>
-      </van-cell-group>
-
-      <van-cell-group>
-        <div class="rowTextArea">
-          <van-field
-            v-model="info.abnormalContent"
-            center
-            rows="2"
-            type="textarea"
-            label="异常内容:"
-            label-align="top"
-          />
-        </div>
-      </van-cell-group>
-    </div>
-    <div class="subbtn">
-      <van-button type="primary" @click="submit">提交</van-button>
-      <van-button type="default" hairline>取消</van-button>
-    </div>
-  </div>
+						<van-uploader readonly v-model="fileList" :max-count="5" accept="" :preview-full-image="false"
+							:before-delete="deleteRead" @click-upload="chooseImg">
+							<van-button>上传文件</van-button>
+						</van-uploader>
+
+					</template>
+				</van-field>
+			</van-cell-group>
+
+			<van-cell-group>
+				<div class="rowTextArea">
+					<van-field v-model="info.abnormalContent" center rows="2" type="textarea" label="异常内容:"
+						label-align="top" />
+				</div>
+			</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 securityFacilitiesErrService from "@/api/securityFacilitiesErr/securityFacilitiesErrService";
-import tools from "@/api/sys/tools";
-import { useRoute } from "vue-router";
-// 图片路径
-import $base from "@/utils/config";
-
-export default {
-  components: { personList },
-  setup() {
-    // 导航栏颜色
-    const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
-    const onClickLeft = () => {
-      history.back();
-    };
-    const info = ref({
-      id: "",
-      siteName: {
-        id: "",
-      },
-      facilityType: "",
-      videoAudioPoint:{
-        id: "",
-      },
-      siteFireProtection:{
-        id: "",
-      },
-      position: "",
-      abnormalContent: "",
-      //附件
-      enclosure: "",
-      state: "0",
-      assessment: "0",
-    });
-
-    // 根据路由初始化
-    let route = useRoute();
-    onMounted(() => {
-      if (route.query.id) {
-        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('程序附件//','程序附件/'),
-              });
-              fileupList.value.push({
-                name: decodeURIComponent(
-                  item.substring(item.lastIndexOf("/") + 1)
-                ),
-                url: item,
-              });
-            }
-          });
-
-          console.log(info.value);
-
-        });
-      }
-    });
-
-    // 场所名称
-    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);
-    const getPlace = ({ selectedOptions }) => {
-      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
-        showPlace.value = false;
-        info.value.siteName = selectedOptions[0];
-        //场所选择完成后刷新
-        getVideoAudioList();
-        getFireStationList();
-      }
-    };
-    //选择设施类型
-    let showLx = ref(false);
-    const facilityTypes = [{text:"监控、音频",value:"0"},{text:"消防设备",value:"1"}];
-    const getfacilityType= ({ selectedOptions }) => {     
-      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){  
-        info.value.facilityType = selectedOptions[0].value;
-        info.value.facilityTypename = selectedOptions[0].text;
-        getVideoAudioList();
-        getFireStationList();
-        showLx.value = false;
-      }
-    };
-
-    //选择视频音频点位
-    let showVideoAudio = ref(false);
-    let VideoAudios = ref([]);
-    //同时选择好场所、设施类型后才获取视频列表
-    const getVideoAudioList= () => {    
-      if(info.value.siteName.id!=""&&info.value.facilityType=="0"){
-        new tools()
-        .videoPointList({
-          current: 1,
-          size: 10000,
-          siteId: info.value.siteName.id,
-        })
-        .then(({ records }) => {
-          VideoAudios.value=records;
-        });
-      }
-      
-    };
-    const setVideoAudios= ({ selectedOptions }) => {    
-      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){
-        info.value.videoAudioPoint = selectedOptions[0];
-        info.value.position=selectedOptions[0].position;
-        showVideoAudio.value = false;
-      }            
-    };
-    
-    
-    //选择消防点位
-    let showFireStation = ref(false);
-    let FireStations = ref([]);
-    //同时选择好场所、设施类型后才获取消防点位列表
-    const getFireStationList= () => {    
-      if(info.value.siteName.id!=""&&info.value.facilityType=="1"){
-        new tools()
-        .fireStationList({
-          current: 1,
-          size: 10000,
-          siteId: info.value.siteName.id,
-        })
-        .then(({ records }) => {
-          FireStations.value=records;
-        });
-      }
-      
-    };
-    const setFireStations= ({ selectedOptions }) => {     
-      if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
-        info.value.siteFireProtection = selectedOptions[0];
-        info.value.position=selectedOptions[0].position;
-        showFireStation.value = false;
-      }
-    };
-
-    // 文件上传
-    let fileList = ref([]);
-    let fileupList = ref([]);
-
-    const chooseImg = () => {
-      xm.chooseFile({
-        count: 1,
-        name: "file",
-        url: $base + `/sys/file/webupload/upload?uploadPath=afssyc/securityFacilitiesErr`,
-        headers: { 'Content-Type': 'multipart/form-data', "token": window.localStorage.getItem('MZ_TOKEN') },
-      }).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)
-      })
-    }
-
-
-    // const afterRead = (file) => {
-    //   // 此时可以自行将文件上传至服务器
-    //   new tools()
-    //     .uploadFile(file, `afssyc/securityFacilitiesErr`)
-    //     .then(({ data }) => {
-        
-    //       data.name = decodeURIComponent(
-    //         data.url.substring(
-    //           data.url.lastIndexOf("/") + 1
-    //         )
-    //       );
-
-    //       //data.url = `${$base}` + data.url;    
-    //       fileupList.value.push(data);
-
-    //     });
-    // };
-
-    // 删除文件
-    const 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 fjdelete = (file) => {
-    //   //删除文件操作
-    //   for (let index = 0; index < fileList.value.length; index++) {
-    //     if(file.file==fileList.value[index].file){
-    //       let delurl=fileupList.value[index].url;                   
-    //       new tools()
-    //         .uploadFiledelete("", delurl)
-    //         .then(({ data }) => {
-    //       });
-    //       fileupList.value.splice(index,1);
-    //       fileList.value.splice(index,1); 
-    //     }        
-    //   }      
-    // };
-
-    // 提交数据
-    const submit = () => {
-      //添加保存前判断
-      if(info.value.siteName.id==""){
-        window.xm.showToast({
-          message:"请先选择场所信息!"
-        })
-      }else{
-
-        //保存前附件处理
-        info.value.enclosure = fileupList.value.map((option) => option.id).join("|");
-        new securityFacilitiesErrService().save(info.value).then((res) => {
-          if(res.data=="保存安防设施异常成功"){
-            window.xm.showToast({
-              message:"保存成功!"
-            })
-            history.back();
-          }
-
-        });
-        
-      }
-    };
-    return {
-      // 导航栏颜色
-      selectColor,
-      info,
-      // 场所
-      customFieldName,
-      showPlace,
-      places,
-      interSearch,
-      onSearch,
-      onCancel,
-      getPlace,
-      //设施类型选择
-      showLx,
-      facilityTypes,
-      getfacilityType,
-      //选择视频音频点位
-      showVideoAudio,
-      getVideoAudioList,
-      VideoAudios,
-      setVideoAudios,
-
-      //选择消防点位
-      showFireStation,
-      getFireStationList,
-      FireStations,
-      setFireStations,
-      
-      // 文件上传
-      chooseImg,
-      fileList,
-      fileupList,
-      deleteRead,
-
-      // 返回
-      onClickLeft,
-      submit,
-    };
-  },
-};
+	import {
+		reactive,
+		ref,
+		onMounted
+	} from "vue";
+	import {
+		useStore
+	} from "vuex";
+	import personList from "../personList.vue";
+	import securityFacilitiesErrService from "@/api/securityFacilitiesErr/securityFacilitiesErrService";
+	import tools from "@/api/sys/tools";
+	import {
+		useRoute
+	} from "vue-router";
+	// 图片路径
+	import $base from "@/utils/config";
+
+	export default {
+		
+		components: {
+			personList
+		},
+		setup() {
+			const store = useStore();
+			// 导航栏颜色
+			const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
+			const onClickLeft = () => {
+				history.back();
+			};
+			const info = ref({
+				id: "",
+				siteName: {
+					id: "",
+				},
+				facilityType: "",
+				videoAudioPoint: {
+					id: "",
+				},
+				siteFireProtection: {
+					id: "",
+				},
+				position: "",
+				abnormalContent: "",
+				//附件
+				enclosure: "",
+				state: "0",
+				assessment: "0",
+			});
+
+			// 根据路由初始化
+			let route = useRoute();
+			onMounted(() => {
+				if (route.query.id) {
+					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('程序附件//', '程序附件/'),
+								});
+								fileupList.value.push({
+									name: decodeURIComponent(
+										item.substring(item.lastIndexOf("/") + 1)
+									),
+									url: item,
+								});
+							}
+						});
+
+						console.log(info.value);
+
+					});
+				}
+			});
+
+			// 场所名称
+			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);
+			const getPlace = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					showPlace.value = false;
+					info.value.siteName = selectedOptions[0];
+					//场所选择完成后刷新
+					getVideoAudioList();
+					getFireStationList();
+				}
+			};
+			//选择设施类型
+			let showLx = ref(false);
+			const facilityTypes = [{
+				text: "监控、音频",
+				value: "0"
+			}, {
+				text: "消防设备",
+				value: "1"
+			}];
+			const getfacilityType = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					info.value.facilityType = selectedOptions[0].value;
+					info.value.facilityTypename = selectedOptions[0].text;
+					getVideoAudioList();
+					getFireStationList();
+					showLx.value = false;
+				}
+			};
+
+			//选择视频音频点位
+			let showVideoAudio = ref(false);
+			let VideoAudios = ref([]);
+			//同时选择好场所、设施类型后才获取视频列表
+			const getVideoAudioList = () => {
+				if (info.value.siteName.id != "" && info.value.facilityType == "0") {
+					new tools()
+						.videoPointList({
+							current: 1,
+							size: 10000,
+							siteId: info.value.siteName.id,
+						})
+						.then(({
+							records
+						}) => {
+							VideoAudios.value = records;
+						});
+				}
+
+			};
+			const setVideoAudios = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					info.value.videoAudioPoint = selectedOptions[0];
+					info.value.position = selectedOptions[0].position;
+					showVideoAudio.value = false;
+				}
+			};
+
+
+			//选择消防点位
+			let showFireStation = ref(false);
+			let FireStations = ref([]);
+			//同时选择好场所、设施类型后才获取消防点位列表
+			const getFireStationList = () => {
+				if (info.value.siteName.id != "" && info.value.facilityType == "1") {
+					new tools()
+						.fireStationList({
+							current: 1,
+							size: 10000,
+							siteId: info.value.siteName.id,
+						})
+						.then(({
+							records
+						}) => {
+							FireStations.value = records;
+						});
+				}
+
+			};
+			const setFireStations = ({
+				selectedOptions
+			}) => {
+				if (selectedOptions[0] != undefined && selectedOptions[0] != null) {
+					info.value.siteFireProtection = selectedOptions[0];
+					info.value.position = selectedOptions[0].position;
+					showFireStation.value = false;
+				}
+			};
+
+			// 文件上传
+			let fileList = ref([]);
+			let fileupList = ref([]);
+
+			const chooseImg = () => {
+					if (store.state.pctoken != "") {
+						xm.chooseFile({
+							count: 1,
+							name: "file",
+							url: $base + `/sys/file/webupload/upload?uploadPath=afssyc/securityFacilitiesErr`,
+							headers: {
+								'Content-Type': 'multipart/form-data',
+								"token": store.state.pctoken,
+							},
+						}).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)
+						})
+						}
+					}
+
+
+					// const afterRead = (file) => {
+					//   // 此时可以自行将文件上传至服务器
+					//   new tools()
+					//     .uploadFile(file, `afssyc/securityFacilitiesErr`)
+					//     .then(({ data }) => {
+
+					//       data.name = decodeURIComponent(
+					//         data.url.substring(
+					//           data.url.lastIndexOf("/") + 1
+					//         )
+					//       );
+
+					//       //data.url = `${$base}` + data.url;    
+					//       fileupList.value.push(data);
+
+					//     });
+					// };
+
+					// 删除文件
+					const 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 fjdelete = (file) => {
+					//   //删除文件操作
+					//   for (let index = 0; index < fileList.value.length; index++) {
+					//     if(file.file==fileList.value[index].file){
+					//       let delurl=fileupList.value[index].url;                   
+					//       new tools()
+					//         .uploadFiledelete("", delurl)
+					//         .then(({ data }) => {
+					//       });
+					//       fileupList.value.splice(index,1);
+					//       fileList.value.splice(index,1); 
+					//     }        
+					//   }      
+					// };
+
+					// 提交数据
+					const submit = () => {
+						//添加保存前判断
+						if (info.value.siteName.id == "") {
+							window.xm.showToast({
+								message: "请先选择场所信息!"
+							})
+						} else {
+
+							//保存前附件处理
+							info.value.enclosure = fileupList.value.map((option) => option.id).join("|");
+							new securityFacilitiesErrService().save(info.value).then((res) => {
+								if (res.data == "保存安防设施异常成功") {
+									window.xm.showToast({
+										message: "保存成功!"
+									})
+									history.back();
+								}
+
+							});
+
+						}
+					};
+					return {
+						// 导航栏颜色
+						selectColor,
+						info,
+						// 场所
+						customFieldName,
+						showPlace,
+						places,
+						interSearch,
+						onSearch,
+						onCancel,
+						getPlace,
+						//设施类型选择
+						showLx,
+						facilityTypes,
+						getfacilityType,
+						//选择视频音频点位
+						showVideoAudio,
+						getVideoAudioList,
+						VideoAudios,
+						setVideoAudios,
+
+						//选择消防点位
+						showFireStation,
+						getFireStationList,
+						FireStations,
+						setFireStations,
+
+						// 文件上传
+						chooseImg,
+						fileList,
+						fileupList,
+						deleteRead,
+
+						// 返回
+						onClickLeft,
+						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>
+	.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>

+ 4 - 1
src/views/activityMan/siteInspection/siteInspectionView.vue

@@ -179,6 +179,7 @@ import $base from "@/utils/config";
 export default {
   components: { personList },
   setup() {
+	  const store = useStore();
     // 导航栏颜色
     const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
     const onClickLeft = () => {
@@ -336,11 +337,12 @@ export default {
     let fileList = ref([]);
     let fileupList = ref([]);
     const chooseImg = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
         url: $base + `/sys/file/webupload/upload?uploadPath=csjcqk/siteInspection`,
-        headers: { 'Content-Type': 'multipart/form-data', "token": window.localStorage.getItem('MZ_TOKEN') },
+        headers: { 'Content-Type': 'multipart/form-data', "token": store.state.pctoken, },
       }).then(res => {
         let data = res[0].data
         data.name = decodeURIComponent(
@@ -350,6 +352,7 @@ export default {
         fileupList.value.push(data);
         fileList.value.push(data)
       })
+	  }
     }
 
     // const afterRead = (file) => {

+ 4 - 1
src/views/placeManage/placeFirefighting/placeFirefightingInfo.vue

@@ -204,6 +204,7 @@ import $base from "@/utils/config";
 import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   setup() {
+	  const store = useStore();
     const inputForm = ref({
       id: "",
       name: "",
@@ -338,6 +339,7 @@ export default {
     let fileList = ref([]);
     let fileImg = ref([]);
     const chooseImg = () => {
+		 if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -346,7 +348,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/fire/fireEquipment`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -357,6 +359,7 @@ export default {
         fileImg.value.push(data);
         fileList.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead = (file) => {

+ 5 - 1
src/views/placeManage/placePerson/placePersonAdd.vue

@@ -260,6 +260,7 @@
 
 <script>
 import { onBeforeUpdate, onMounted, ref, getCurrentInstance } from "vue";
+import { useStore } from "vuex";
 import placePerson from "@/api/placePerson/placePerson";
 import PlaceRegister from "@/api/placeRegister/placeRegister";
 import { useRouter } from "vue-router";
@@ -268,6 +269,7 @@ import $base from "@/utils/config";
 import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   setup() {
+	   const store = useStore();
     const onClickLeft = () => {
       history.back();
     };
@@ -532,13 +534,14 @@ export default {
     let fileList = ref([]);
     let fileImg = ref([]);
     const chooseImg = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
         url: $base + `/sys/file/webupload/upload?uploadPath=logo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -549,6 +552,7 @@ export default {
         fileImg.value.push(data);
         fileList.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead = (file) => {

+ 5 - 1
src/views/placeManage/placePerson/placePersoninfo.vue

@@ -630,6 +630,7 @@
 <script>
 import { useRouter } from "vue-router";
 import { onBeforeUpdate, onMounted, ref, getCurrentInstance } from "vue";
+import { useStore } from "vuex";
 import $base from "@/utils/config";
 import placePerson from "@/api/placePerson/placePerson";
 import PlaceRegister from "@/api/placeRegister/placeRegister";
@@ -638,6 +639,7 @@ import tools from "@/api/sys/tools";
 import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   setup() {
+	  const store = useStore();
     const data = ref({});
     const expansion = ref([]);
     // 导航栏颜色
@@ -958,13 +960,14 @@ export default {
     let fileList = ref([]);
     let fileImg = ref([]);
     const chooseImg = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
         url: $base + `/sys/file/webupload/upload?uploadPath=logo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -975,6 +978,7 @@ export default {
         fileImg.value.push(data);
         fileList.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead = (file) => {

+ 14 - 4
src/views/placeManage/placeRegister/placeRegister.vue

@@ -799,6 +799,7 @@ import ManageList from "../ManageList.vue";
 import ManageList2 from "../ManageList2.vue";
 import { useRouter } from "vue-router";
 import { onMounted, ref } from "vue";
+import { useStore } from "vuex";
 import placeRegister from "@/api/placeRegister/placeRegister";
 import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
@@ -806,6 +807,7 @@ import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   components: { ManageList, ManageList2 },
   setup() {
+	   const store = useStore();
     const inputForm = ref({
       id: "",
       religiousType: "",
@@ -987,6 +989,7 @@ export default {
     let fileList = ref([]);
     let fileImg = ref([]);
     const chooseImg = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -995,7 +998,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1006,6 +1009,7 @@ export default {
         fileImg.value.push(data);
         fileList.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead = (file) => {
@@ -1024,6 +1028,7 @@ export default {
     let fileList2 = ref([]);
     let fileImg2 = ref([]);
     const chooseImg2 = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -1032,7 +1037,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1043,6 +1048,7 @@ export default {
         fileImg2.value.push(data);
         fileList2.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead2 = (file) => {
@@ -1061,6 +1067,7 @@ export default {
     let fileList3 = ref([]);
     let fileImg3 = ref([]);
     const chooseImg3 = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -1069,7 +1076,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1080,6 +1087,7 @@ export default {
         fileImg3.value.push(data);
         fileList3.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead3 = (file) => {
@@ -1098,6 +1106,7 @@ export default {
     let fileList4 = ref([]);
     let fileImg4 = ref([]);
     const chooseImg4 = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -1106,7 +1115,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1117,6 +1126,7 @@ export default {
         fileImg4.value.push(data);
         fileList4.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead4 = (file) => {

+ 14 - 4
src/views/placeManage/placeRegister/placeRegisterInfo.vue

@@ -802,6 +802,7 @@ import ManageList from "../ManageList.vue";
 import ManageList2 from "../ManageList2.vue";
 import { useRouter } from "vue-router";
 import { onMounted, ref, getCurrentInstance } from "vue";
+import { useStore } from "vuex";
 import placeRegister from "@/api/placeRegister/placeRegister";
 import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
@@ -809,6 +810,7 @@ import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   components: { ManageList, ManageList2 },
   setup() {
+	  const store = useStore();
     const active = ref(0);
     // 导航栏颜色
     const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
@@ -1078,6 +1080,7 @@ export default {
     let fileList = ref([]);
     let fileImg = ref([]);
     const chooseImg = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -1086,7 +1089,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1097,6 +1100,7 @@ export default {
         fileImg.value.push(data);
         fileList.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead = (file) => {
@@ -1115,6 +1119,7 @@ export default {
     let fileList2 = ref([]);
     let fileImg2 = ref([]);
     const chooseImg2 = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -1123,7 +1128,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1134,6 +1139,7 @@ export default {
         fileImg2.value.push(data);
         fileList2.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead2 = (file) => {
@@ -1152,6 +1158,7 @@ export default {
     let fileList3 = ref([]);
     let fileImg3 = ref([]);
     const chooseImg3 = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -1160,7 +1167,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1171,6 +1178,7 @@ export default {
         fileImg3.value.push(data);
         fileList3.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead3 = (file) => {
@@ -1189,6 +1197,7 @@ export default {
     let fileList4 = ref([]);
     let fileImg4 = ref([]);
     const chooseImg4 = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -1197,7 +1206,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=religioussites/siteinfo/religiousSitesInfo`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -1208,6 +1217,7 @@ export default {
         fileImg4.value.push(data);
         fileList4.value.push(data);
       });
+	  }
     };
     // 删除文件
     const deleteRead4 = (file) => {

+ 5 - 1
src/views/placeManage/placeTablet/placeTabletAdd.vue

@@ -220,6 +220,7 @@
 <script>
 import { useRouter } from "vue-router";
 import { onMounted, ref } from "vue";
+import { useStore } from "vuex";
 import TabletServer from "@/api/tabletManage/TabletServer";
 import placePerson from "@/api/placePerson/placePerson";
 import PlaceRegister from "@/api/placeRegister/placeRegister";
@@ -227,6 +228,7 @@ import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
 export default {
   setup() {
+	  const store = useStore();
     const onClickLeft = () => {
       history.back();
     };
@@ -339,11 +341,12 @@ export default {
     let fileList = ref([]);
     let fileImg = ref([]);
     const chooseImg = () => {
+		if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
         url: $base + `/sys/file/webupload/upload?uploadPath=placememorialtablets/placeMemorialTablets`,
-        headers: { 'Content-Type': 'multipart/form-data', "token": window.localStorage.getItem('MZ_TOKEN') },
+        headers: { 'Content-Type': 'multipart/form-data', "token": store.state.pctoken, },
       }).then(res => {
         let data = res[0].data
         data.name = decodeURIComponent(
@@ -353,6 +356,7 @@ export default {
         fileImg.value.push(data);
         fileList.value.push(data)
       })
+	  }
     }
 
     // 删除文件

+ 5 - 1
src/views/placeManage/placeTablet/placeTabletInfo.vue

@@ -235,6 +235,7 @@
 <script>
 import { useRouter } from "vue-router";
 import { onMounted, ref } from "vue";
+import { useStore } from "vuex";
 import $base from "@/utils/config";
 import tools from "@/api/sys/tools";
 import placePerson from "@/api/placePerson/placePerson";
@@ -242,6 +243,7 @@ import TabletServer from "@/api/tabletManage/TabletServer";
 import PlaceRegister from "@/api/placeRegister/placeRegister";
 export default {
   setup() {
+	  const store = useStore();
     // 导航栏颜色
     const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
     //牌位数据
@@ -362,6 +364,7 @@ export default {
     let fileList = ref([]);
     let fileImg = ref([]);
     const chooseImg = () => {
+		 if (store.state.pctoken != "") {
       xm.chooseFile({
         count: 1,
         name: "file",
@@ -370,7 +373,7 @@ export default {
           `/sys/file/webupload/upload?uploadPath=placememorialtablets/placeMemorialTablets`,
         headers: {
           "Content-Type": "multipart/form-data",
-          token: window.localStorage.getItem("MZ_TOKEN"),
+          "token": store.state.pctoken,
         },
       }).then((res) => {
         let data = res[0].data;
@@ -381,6 +384,7 @@ export default {
         fileImg.value.push(data);
         fileList.value.push(data);
       });
+	  }
     };
 
     // 删除文件

Some files were not shown because too many files changed in this diff