物业之前,新工作台
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]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -199,7 +199,6 @@ function handleCancel(): void {
|
||||
|
||||
/** 保存草稿 */
|
||||
function handleSave(): void {
|
||||
console.log(form.value, !validateForm());
|
||||
if (!validateForm()) return;
|
||||
emit('save', { ...form.value });
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
|
||||
const { com_questionnaire_status } = toRefs<any>(proxy?.useDict('com_questionnaire_status'));
|
||||
console.log(com_questionnaire_scope);
|
||||
|
||||
const questionnaireList = ref<QuestionnaireVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
@@ -130,6 +129,7 @@ const initFormData: QuestionnaireForm = {
|
||||
const data = reactive<PageData<QuestionnaireForm, QuestionnaireQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: undefined,
|
||||
|
||||
Reference in New Issue
Block a user