From 49d2acb67b5fcf5ad7077057e940d7bbc02ced61 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 28 Nov 2022 17:24:50 +0800 Subject: [PATCH] 11 --- .../communityService/dqfwzx/cpts/edit.vue | 72 +++++++++++++++++-- 1 file changed, 67 insertions(+), 5 deletions(-) diff --git a/src/views/modules/communityService/dqfwzx/cpts/edit.vue b/src/views/modules/communityService/dqfwzx/cpts/edit.vue index 35da15bde..adfcf3fad 100644 --- a/src/views/modules/communityService/dqfwzx/cpts/edit.vue +++ b/src/views/modules/communityService/dqfwzx/cpts/edit.vue @@ -169,8 +169,23 @@ :value="item.value"> - - + + + + +
+ - 删除
+
@@ -261,6 +277,41 @@ export default { label: "周末", value: "weekend", }, + { + label: "自定义", + value: "custom", + }, + ], + customOption: [ + { + label: "周日", + value: "1", + }, + { + label: "周一", + value: "2", + }, + { + label: "周二", + value: "3", + }, + { + label: "周三", + value: "4", + }, + { + label: "周四", + value: "5", + }, + { + label: "周五", + value: "6", + }, + { + label: "周六", + value: "7", + }, + ], dataForm: { @@ -350,6 +401,8 @@ export default { matterImg: "", startTime: "", endTime: "", + customDay: "", + customList: [] }, ]; }, @@ -491,7 +544,7 @@ export default { this.btnDisable = true; setTimeout(() => { this.btnDisable = false; - }, 10000); + }, 5000); this.$refs["ref_form"].validate((valid, messageObj) => { if (!valid) { app.util.validateRule(messageObj); @@ -516,14 +569,17 @@ export default { const matterList = this.dataForm.matterList.filter( (item) => !item.matterId ); + if ( + matterList.some( (item) => + !item.matterImg || !item.matterName || !item.appointmentType || !item.startTime || - !item.endTime + !item.endTime || (item.appointmentType === 'custom' && item.customList.length === 0) ) ) { return this.$message({ @@ -532,6 +588,12 @@ export default { }); } + matterList.forEach(element => { + element.customDay = element.customList.join(',') + }); + + + const { data, code, msg } = await requestPost(url, { ...this.dataForm, matterList,