|
@@ -5,23 +5,23 @@
|
|
|
left-arrow
|
|
|
@click-left="onClickLeft"
|
|
|
/>
|
|
|
- <div class="main">
|
|
|
+ <van-loading size="16px" v-if="isLoading">加载中...</van-loading>
|
|
|
+ <div class="main" v-if="!isLoading">
|
|
|
<p class="title">信教异常群众上报</p>
|
|
|
<div class="formArea">
|
|
|
<p class="miniTitle">基础信息</p>
|
|
|
<van-cell-group>
|
|
|
<van-field
|
|
|
- v-model="inputForm.count"
|
|
|
+ v-model="inputForm.abnormalName"
|
|
|
center
|
|
|
label="异常人员:"
|
|
|
placeholder="请填写异常人员姓名"
|
|
|
input-align="right"
|
|
|
- type="digit"
|
|
|
/>
|
|
|
</van-cell-group>
|
|
|
<van-cell-group>
|
|
|
<van-field
|
|
|
- v-model="inputForm.count"
|
|
|
+ v-model="inputForm.abnormalIdcar"
|
|
|
center
|
|
|
label="身份证号:"
|
|
|
placeholder="请填写身份证号"
|
|
@@ -31,7 +31,7 @@
|
|
|
</van-cell-group>
|
|
|
<van-cell-group>
|
|
|
<van-field
|
|
|
- v-model="inputForm.count"
|
|
|
+ v-model="inputForm.abnormalPhone"
|
|
|
center
|
|
|
label="手机号:"
|
|
|
placeholder="请填写手机号"
|
|
@@ -42,7 +42,7 @@
|
|
|
<van-cell-group>
|
|
|
<van-cell title="性别:">
|
|
|
<template #right-icon>
|
|
|
- <van-radio-group v-model="checked" direction="horizontal">
|
|
|
+ <van-radio-group v-model="inputForm.sex" direction="horizontal">
|
|
|
<van-radio name="1">男</van-radio>
|
|
|
<van-radio name="2">女</van-radio>
|
|
|
</van-radio-group>
|
|
@@ -51,7 +51,7 @@
|
|
|
</van-cell-group>
|
|
|
<van-cell-group>
|
|
|
<van-field
|
|
|
- v-model="inputForm.place"
|
|
|
+ v-model="inputForm.nativePlace"
|
|
|
center
|
|
|
readonly
|
|
|
label="籍贯:"
|
|
@@ -72,7 +72,7 @@
|
|
|
</van-cell-group>
|
|
|
<van-cell-group>
|
|
|
<van-field
|
|
|
- v-model="inputForm.place"
|
|
|
+ v-model="inputForm.currentResidence"
|
|
|
center
|
|
|
readonly
|
|
|
label="现居地:"
|
|
@@ -93,10 +93,10 @@
|
|
|
</van-cell-group>
|
|
|
<van-cell-group>
|
|
|
<van-field
|
|
|
- v-model="inputForm.address"
|
|
|
+ v-model="inputForm.currentResidenceDetail"
|
|
|
center
|
|
|
- label="详细地址:"
|
|
|
- placeholder="请填写具体地址"
|
|
|
+ label="现居地详情:"
|
|
|
+ placeholder="请填写现居地详情"
|
|
|
input-align="right"
|
|
|
right-icon="location"
|
|
|
/>
|
|
@@ -104,7 +104,7 @@
|
|
|
<van-cell-group>
|
|
|
<div class="rowTextArea">
|
|
|
<van-field
|
|
|
- v-model="inputForm.into"
|
|
|
+ v-model="inputForm.abnormalBehavior"
|
|
|
placeholder="请填写异常行为"
|
|
|
center
|
|
|
rows="2"
|
|
@@ -123,45 +123,53 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { reactive, ref } from "vue";
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
import { useCascaderAreaData } from "@vant/area-data";
|
|
|
-import personList from "../personList.vue";
|
|
|
+import ReligiousPeopleReportService from "@/api/differentbelievers/ReligiousPeopleReportService";
|
|
|
+import { useRoute } from "vue-router";
|
|
|
export default {
|
|
|
- components: { personList },
|
|
|
setup() {
|
|
|
// 返回
|
|
|
const onClickLeft = () => {
|
|
|
history.back();
|
|
|
};
|
|
|
- // 活动信息
|
|
|
- const inputForm = reactive({
|
|
|
- place: "",
|
|
|
- count: "",
|
|
|
- time: "",
|
|
|
- person: "",
|
|
|
- place: "",
|
|
|
- address: "",
|
|
|
- into: "",
|
|
|
+ // 加载
|
|
|
+ let isLoading = ref(true);
|
|
|
+ // 异常人员信息
|
|
|
+ const inputForm = ref({
|
|
|
+ id: "",
|
|
|
+ abnormalName: "",
|
|
|
+ abnormalIdcar: "",
|
|
|
+ sex: "",
|
|
|
+ abnormalPhone: "",
|
|
|
+ nativePlace: "",
|
|
|
+ currentResidence: "",
|
|
|
+ currentResidenceDetail: "",
|
|
|
+ abnormalBehavior: "",
|
|
|
+ state: "0",
|
|
|
+ assessment: "0",
|
|
|
+ currentResidenceId: "",
|
|
|
+ currentResidenceLevel1: "",
|
|
|
+ currentResidenceLevel2: "",
|
|
|
+ currentResidenceLevel3: "",
|
|
|
+ currentResidenceLevel4: "",
|
|
|
+ currentResidenceLevel5: "",
|
|
|
+ currentResidenceLevel6: "",
|
|
|
+ });
|
|
|
+ // 根据路由初始化
|
|
|
+ let route = useRoute();
|
|
|
+ onMounted(() => {
|
|
|
+ if (route.query.id) {
|
|
|
+ new ReligiousPeopleReportService()
|
|
|
+ .queryById(route.query.id)
|
|
|
+ .then((data) => {
|
|
|
+ inputForm.value = data;
|
|
|
+ isLoading.value = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ isLoading.value = false;
|
|
|
+ }
|
|
|
});
|
|
|
- // 获取活动时间
|
|
|
- let showAct = ref(false);
|
|
|
- let currentDate = ref(["" + new Date().getFullYear(), "01", "01"]);
|
|
|
- let currentTime = ref(["00", "00"]);
|
|
|
- const getTime = () => {
|
|
|
- showAct.value = false;
|
|
|
- inputForm.time = `${currentDate.value.join("-")} ${currentTime.value.join(
|
|
|
- ":"
|
|
|
- )}`;
|
|
|
- };
|
|
|
- // 相关人
|
|
|
- let showPerson = ref(false);
|
|
|
- let list = "";
|
|
|
- const selected = (val) => {
|
|
|
- list = val;
|
|
|
- };
|
|
|
- const reselected = () => {
|
|
|
- inputForm.person = list;
|
|
|
- };
|
|
|
// 地区选择
|
|
|
let showArea = ref(false);
|
|
|
const cascaderValue = ref("");
|
|
@@ -170,29 +178,22 @@ export default {
|
|
|
// 全部选项选择完毕后,会触发 finish 事件
|
|
|
const onFinish = ({ selectedOptions }) => {
|
|
|
showArea.value = false;
|
|
|
- inputForm.place = selectedOptions.map((option) => option.text).join("/");
|
|
|
+ inputForm.value.currentResidence = selectedOptions
|
|
|
+ .map((option) => option.text)
|
|
|
+ .join("/");
|
|
|
};
|
|
|
// 性别
|
|
|
let checked = ref("1");
|
|
|
return {
|
|
|
inputForm,
|
|
|
- // 活动时间
|
|
|
- showAct,
|
|
|
- currentDate,
|
|
|
- currentTime,
|
|
|
- getTime,
|
|
|
// 返回
|
|
|
onClickLeft,
|
|
|
- // 人员选择
|
|
|
- showPerson,
|
|
|
- selected,
|
|
|
- reselected,
|
|
|
// 地区选择
|
|
|
showArea,
|
|
|
options,
|
|
|
onFinish,
|
|
|
cascaderValue,
|
|
|
- checked,
|
|
|
+ isLoading,
|
|
|
};
|
|
|
},
|
|
|
};
|
|
@@ -256,4 +257,8 @@ export default {
|
|
|
.van-radio {
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
+.van-loading {
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
</style>
|