物业之前,新工作台
This commit is contained in:
@@ -94,7 +94,6 @@ const route = useRoute();
|
||||
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
import { listResident } from '@/api/system/resident';
|
||||
const houseStore = useHouseStore();
|
||||
|
||||
const form = ref({
|
||||
scope: '0',
|
||||
@@ -175,7 +174,6 @@ async function handleEdit(id: string | number) {
|
||||
async function handleSave(data: QuestionnaireForm) {
|
||||
try {
|
||||
// 父组件自己调用接口提交
|
||||
console.log(data);
|
||||
if (userid.value) {
|
||||
await updateQuestionnaire({
|
||||
...data,
|
||||
@@ -183,7 +181,8 @@ async function handleSave(data: QuestionnaireForm) {
|
||||
status: '0', // 草稿状态
|
||||
startTime: timedata.value[0],
|
||||
endTime: timedata.value[1],
|
||||
...form.value
|
||||
...form.value,
|
||||
villageId: Number(localStorage.getItem('villageid'))
|
||||
});
|
||||
} else {
|
||||
await addQuestionnaire({
|
||||
@@ -192,7 +191,8 @@ async function handleSave(data: QuestionnaireForm) {
|
||||
status: '0', // 草稿状态
|
||||
startTime: timedata.value[0],
|
||||
endTime: timedata.value[1],
|
||||
...form.value
|
||||
...form.value,
|
||||
villageId: Number(localStorage.getItem('villageid'))
|
||||
});
|
||||
}
|
||||
ElMessage.success('保存成功');
|
||||
@@ -212,7 +212,7 @@ async function handlePublish(data: QuestionnaireForm) {
|
||||
content: JSON.stringify(data.content),
|
||||
status: '1', // 发布状态
|
||||
startTime: timedata.value[0],
|
||||
villageId: houseStore.currentVilageInfo.villageId,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
endTime: timedata.value[1]
|
||||
});
|
||||
} else {
|
||||
@@ -221,7 +221,7 @@ async function handlePublish(data: QuestionnaireForm) {
|
||||
content: JSON.stringify(data.content),
|
||||
status: '1', // 发布状态
|
||||
startTime: timedata.value[0],
|
||||
villageId: houseStore.currentVilageInfo.villageId,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
endTime: timedata.value[1]
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user