|
@@ -1,214 +1,83 @@
|
|
<template>
|
|
<template>
|
|
- <van-nav-bar
|
|
|
|
- fixed
|
|
|
|
- title="场所活动信息上报"
|
|
|
|
- left-text=""
|
|
|
|
- left-arrow
|
|
|
|
- @click-left="onClickLeft"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-nav-bar fixed title="场所活动信息上报" left-text="" left-arrow @click-left="onClickLeft" />
|
|
<van-loading size="16px" v-show="isLoading">加载中...</van-loading>
|
|
<van-loading size="16px" v-show="isLoading">加载中...</van-loading>
|
|
<div class="main" v-show="!isLoading">
|
|
<div class="main" v-show="!isLoading">
|
|
<!-- <p class="title">场所活动上报</p> -->
|
|
<!-- <p class="title">场所活动上报</p> -->
|
|
- <van-form
|
|
|
|
- class="formArea"
|
|
|
|
- @submit="submit"
|
|
|
|
- show-error
|
|
|
|
- :show-error-message="false"
|
|
|
|
- validate-trigger="onChange"
|
|
|
|
- >
|
|
|
|
|
|
+ <van-form class="formArea" @submit="submit" show-error :show-error-message="false" validate-trigger="onChange">
|
|
<!-- <p class="miniTitle">基础信息</p> -->
|
|
<!-- <p class="miniTitle">基础信息</p> -->
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.activityName"
|
|
|
|
- center
|
|
|
|
- clearable
|
|
|
|
- label="活动名称:"
|
|
|
|
- placeholder="请填写活动名称"
|
|
|
|
- input-align="right"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.activityName" center clearable label="活动名称:" placeholder="请填写活动名称"
|
|
|
|
+ input-align="right" />
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.siteName.name"
|
|
|
|
- readonly
|
|
|
|
- required
|
|
|
|
- :rules="[{ required: true }]"
|
|
|
|
- label="场所名称:"
|
|
|
|
- placeholder="请选择场所名称"
|
|
|
|
- input-align="right"
|
|
|
|
- right-icon="arrow-down"
|
|
|
|
- @click="showPlace = true"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.siteName.name" readonly required :rules="[{ required: true }]" label="场所名称:"
|
|
|
|
+ placeholder="请选择场所名称" input-align="right" right-icon="arrow-down" @click="showPlace = true" />
|
|
<van-popup v-model:show="showPlace" round position="bottom">
|
|
<van-popup v-model:show="showPlace" round position="bottom">
|
|
- <van-picker
|
|
|
|
- title="活动场所"
|
|
|
|
- :columns="places"
|
|
|
|
- :columns-field-names="customFieldName"
|
|
|
|
- @cancel="showPlace = false"
|
|
|
|
- @confirm="getPlace"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-picker title="活动场所" :columns="places" :columns-field-names="customFieldName" @cancel="showPlace = false"
|
|
|
|
+ @confirm="getPlace" />
|
|
</van-popup>
|
|
</van-popup>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.activityTime"
|
|
|
|
- center
|
|
|
|
- readonly
|
|
|
|
- label="活动时间:"
|
|
|
|
- placeholder="请选择时间"
|
|
|
|
- input-align="right"
|
|
|
|
- right-icon="arrow-down"
|
|
|
|
- @click="showAct = true"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.activityTime" center readonly label="活动时间:" placeholder="请选择时间"
|
|
|
|
+ input-align="right" right-icon="arrow-down" @click="showAct = true" />
|
|
<van-popup v-model:show="showAct" round position="bottom">
|
|
<van-popup v-model:show="showAct" round position="bottom">
|
|
- <van-picker-group
|
|
|
|
- title="活动时间"
|
|
|
|
- :tabs="['选择日期', '选择时间']"
|
|
|
|
- next-step-text="下一步"
|
|
|
|
- @confirm="getTime"
|
|
|
|
- @cancel="showAct = false"
|
|
|
|
- >
|
|
|
|
|
|
+ <van-picker-group title="活动时间" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTime"
|
|
|
|
+ @cancel="showAct = false">
|
|
<van-date-picker v-model="currentDate" />
|
|
<van-date-picker v-model="currentDate" />
|
|
- <van-time-picker
|
|
|
|
- v-model="currentTime"
|
|
|
|
- :columns-type="columnsType"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-time-picker v-model="currentTime" :columns-type="columnsType" />
|
|
</van-picker-group>
|
|
</van-picker-group>
|
|
</van-popup>
|
|
</van-popup>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.participantsNum"
|
|
|
|
- center
|
|
|
|
- clearable
|
|
|
|
- label="参会人数:"
|
|
|
|
- placeholder="请填写参会人数"
|
|
|
|
- input-align="right"
|
|
|
|
- type="digit"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.participantsNum" center clearable label="参会人数:" placeholder="请填写参会人数"
|
|
|
|
+ input-align="right" type="digit" />
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.knownList.name"
|
|
|
|
- center
|
|
|
|
- required
|
|
|
|
- :rules="[{ required: true }]"
|
|
|
|
- label="已知名单:"
|
|
|
|
- placeholder="请选择参会已知名单"
|
|
|
|
- input-align="right"
|
|
|
|
- right-icon="arrow-down"
|
|
|
|
- @click="showPerson = true"
|
|
|
|
- />
|
|
|
|
- <van-dialog
|
|
|
|
- v-model:show="showPerson"
|
|
|
|
- title="选择人员名单"
|
|
|
|
- show-cancel-button
|
|
|
|
- @confirm="reselected"
|
|
|
|
- >
|
|
|
|
|
|
+ <van-field v-model="placeActivity.knownList.name" center required :rules="[{ required: true }]" label="已知名单:"
|
|
|
|
+ placeholder="请选择参会已知名单" input-align="right" right-icon="arrow-down" @click="showPerson = true" />
|
|
|
|
+ <van-dialog v-model:show="showPerson" title="选择人员名单" show-cancel-button @confirm="reselected">
|
|
<person-list @selected="selected" :type="1"></person-list>
|
|
<person-list @selected="selected" :type="1"></person-list>
|
|
</van-dialog>
|
|
</van-dialog>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.reporter.name"
|
|
|
|
- center
|
|
|
|
- readonly
|
|
|
|
- label="报告人:"
|
|
|
|
- placeholder="请选择报告人"
|
|
|
|
- input-align="right"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.reporter.name" center readonly label="报告人:" placeholder="请选择报告人"
|
|
|
|
+ input-align="right" />
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.participation"
|
|
|
|
- center
|
|
|
|
- clearable
|
|
|
|
- label="参加范围:"
|
|
|
|
- placeholder="请填写参加范围"
|
|
|
|
- input-align="right"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.participation" center clearable label="参加范围:" placeholder="请填写参加范围"
|
|
|
|
+ input-align="right" />
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.place"
|
|
|
|
- center
|
|
|
|
- readonly
|
|
|
|
- label="活动地点:"
|
|
|
|
- placeholder="请选择场所"
|
|
|
|
- input-align="right"
|
|
|
|
- right-icon="arrow-down"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.place" center readonly label="活动地点:" placeholder="请选择场所" input-align="right"
|
|
|
|
+ right-icon="arrow-down" />
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.placeDel"
|
|
|
|
- center
|
|
|
|
- readonly
|
|
|
|
- label="详细地址:"
|
|
|
|
- placeholder="请选择场所"
|
|
|
|
- input-align="right"
|
|
|
|
- >
|
|
|
|
|
|
+ <van-field v-model="placeActivity.placeDel" center readonly label="详细地址:" placeholder="请选择场所" input-align="right">
|
|
<template #right-icon>
|
|
<template #right-icon>
|
|
- <van-icon name="location" />
|
|
|
|
|
|
+ <van-icon name="location" @click="getLocation" />
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.sourceFunds"
|
|
|
|
- center
|
|
|
|
- clearable
|
|
|
|
- label="经费来源:"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- input-align="right"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.sourceFunds" center clearable label="经费来源:" placeholder="请选择"
|
|
|
|
+ input-align="right" />
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.activityPerson.name"
|
|
|
|
- center
|
|
|
|
- label="活动负责人:"
|
|
|
|
- placeholder="请选择活动负责人"
|
|
|
|
- input-align="right"
|
|
|
|
- right-icon="arrow-down"
|
|
|
|
- @click="showReport = true"
|
|
|
|
- />
|
|
|
|
- <van-dialog
|
|
|
|
- v-model:show="showReport"
|
|
|
|
- title="选择活动负责人"
|
|
|
|
- show-cancel-button
|
|
|
|
- @confirm="reselected"
|
|
|
|
- >
|
|
|
|
- <person-list
|
|
|
|
- @selected="selected"
|
|
|
|
- :type="0"
|
|
|
|
- ref="person"
|
|
|
|
- ></person-list>
|
|
|
|
|
|
+ <van-field v-model="placeActivity.activityPerson.name" center label="活动负责人:" placeholder="请选择活动负责人"
|
|
|
|
+ input-align="right" right-icon="arrow-down" @click="showReport = true" />
|
|
|
|
+ <van-dialog v-model:show="showReport" title="选择活动负责人" show-cancel-button @confirm="reselected">
|
|
|
|
+ <person-list @selected="selected" :type="0" ref="person"></person-list>
|
|
</van-dialog>
|
|
</van-dialog>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
- <van-field
|
|
|
|
- v-model="placeActivity.phone"
|
|
|
|
- center
|
|
|
|
- readonly
|
|
|
|
- type="tel"
|
|
|
|
- label="联系方式:"
|
|
|
|
- placeholder="请填写联系方式"
|
|
|
|
- input-align="right"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-field v-model="placeActivity.phone" center readonly type="tel" label="联系方式:" placeholder="请填写联系方式"
|
|
|
|
+ input-align="right" />
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
<van-field name="uploader" label="安全预案:">
|
|
<van-field name="uploader" label="安全预案:">
|
|
<template #input>
|
|
<template #input>
|
|
- <van-uploader
|
|
|
|
- :after-read="afterRead"
|
|
|
|
- v-model="fileList"
|
|
|
|
- :max-count="5"
|
|
|
|
- capture="camera"
|
|
|
|
- accept=""
|
|
|
|
- :preview-full-image="false"
|
|
|
|
- :before-delete="deleteRead"
|
|
|
|
- >
|
|
|
|
|
|
+ <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-button>上传文件</van-button>
|
|
</van-uploader>
|
|
</van-uploader>
|
|
</template>
|
|
</template>
|
|
@@ -217,18 +86,13 @@
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
<van-field name="content" label="主题内容:" label-align="top">
|
|
<van-field name="content" label="主题内容:" label-align="top">
|
|
<template #input>
|
|
<template #input>
|
|
- <wang-editor
|
|
|
|
- ref="subjectContentEditor"
|
|
|
|
- v-model="placeActivity.subjectContent"
|
|
|
|
- />
|
|
|
|
|
|
+ <wang-editor ref="subjectContentEditor" v-model="placeActivity.subjectContent" />
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<div class="subbtn">
|
|
<div class="subbtn">
|
|
<van-button type="primary" native-type="submit">提交</van-button>
|
|
<van-button type="primary" native-type="submit">提交</van-button>
|
|
- <van-button type="default" hairline @click="onClickLeft"
|
|
|
|
- >暂存</van-button
|
|
|
|
- >
|
|
|
|
|
|
+ <van-button type="default" hairline @click="onClickLeft">暂存</van-button>
|
|
</div>
|
|
</div>
|
|
</van-form>
|
|
</van-form>
|
|
</div>
|
|
</div>
|
|
@@ -245,6 +109,7 @@ import { useRoute } from "vue-router";
|
|
import $base from "@/utils/config";
|
|
import $base from "@/utils/config";
|
|
// 富文本编辑器
|
|
// 富文本编辑器
|
|
import WangEditor from "@/components/editor/WangEditor";
|
|
import WangEditor from "@/components/editor/WangEditor";
|
|
|
|
+import { xmNavTo } from "@/utils/onlineXm";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: { personList, WangEditor },
|
|
components: { personList, WangEditor },
|
|
@@ -323,7 +188,6 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
subjectContentEditor.value.init(placeActivity.value.subjectContent);
|
|
subjectContentEditor.value.init(placeActivity.value.subjectContent);
|
|
- console.log("修改数据", placeActivity.value);
|
|
|
|
isLoading.value = false;
|
|
isLoading.value = false;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -358,6 +222,11 @@ export default {
|
|
placeActivity.value.place = selectedOptions[0].placeSelectName;
|
|
placeActivity.value.place = selectedOptions[0].placeSelectName;
|
|
placeActivity.value.placeDel = selectedOptions[0].place;
|
|
placeActivity.value.placeDel = selectedOptions[0].place;
|
|
};
|
|
};
|
|
|
|
+ const getLocation = () => {
|
|
|
|
+ xm.getLocation().then(data => {
|
|
|
|
+ placeActivity.value.placeDel = data.AOIName;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
// 获取活动时间
|
|
// 获取活动时间
|
|
let showAct = ref(false);
|
|
let showAct = ref(false);
|
|
let currentDate = ref(["" + new Date().getFullYear(), "01", "01"]);
|
|
let currentDate = ref(["" + new Date().getFullYear(), "01", "01"]);
|
|
@@ -429,7 +298,7 @@ export default {
|
|
for (let index = 0; index < fileList.value.length; index++) {
|
|
for (let index = 0; index < fileList.value.length; index++) {
|
|
if (file.file.name == fileList.value[index].file.name) {
|
|
if (file.file.name == fileList.value[index].file.name) {
|
|
let delurl = fileupList.value[index].url;
|
|
let delurl = fileupList.value[index].url;
|
|
- new tools().uploadFiledelete("", delurl).then(({ data }) => {});
|
|
|
|
|
|
+ new tools().uploadFiledelete("", delurl).then(({ data }) => { });
|
|
fileupList.value.splice(index, 1);
|
|
fileupList.value.splice(index, 1);
|
|
fileList.value.splice(index, 1);
|
|
fileList.value.splice(index, 1);
|
|
}
|
|
}
|
|
@@ -459,6 +328,7 @@ export default {
|
|
showPlace,
|
|
showPlace,
|
|
places,
|
|
places,
|
|
getPlace,
|
|
getPlace,
|
|
|
|
+ getLocation,
|
|
// 活动时间
|
|
// 活动时间
|
|
showAct,
|
|
showAct,
|
|
columnsType,
|
|
columnsType,
|
|
@@ -489,10 +359,12 @@ export default {
|
|
color: #36a7f3;
|
|
color: #36a7f3;
|
|
top: -4px;
|
|
top: -4px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.van-dialog {
|
|
.van-dialog {
|
|
width: 80%;
|
|
width: 80%;
|
|
top: 50%;
|
|
top: 50%;
|
|
}
|
|
}
|
|
|
|
+
|
|
.van-loading {
|
|
.van-loading {
|
|
text-align: center;
|
|
text-align: center;
|
|
margin-top: 80px;
|
|
margin-top: 80px;
|