diff --git a/src/apps/AppAskForm/FormSetting.vue b/src/apps/AppAskForm/FormSetting.vue index c19832aa..05f6a51c 100644 --- a/src/apps/AppAskForm/FormSetting.vue +++ b/src/apps/AppAskForm/FormSetting.vue @@ -68,7 +68,7 @@
取消
-
{{ type === 'edit' ? '发布' : '确定' }}
+
{{ isEdit ? '发布' : '确定' }}
export default { - props: ['id', 'formConfig', 'type'], - + props: ['formConfig'], + computed: { + isEdit() { + return this.$route.query.type == 'edit' + } + }, data() { + let {id} = this.$route.query return { + id, params: { year: true, month: true, @@ -101,8 +107,7 @@ export default { periodValidityType: '0' } }, - - mounted() { + created() { if (this.id) { this.getInfo(this.id) } else if (this.formConfig) { @@ -111,25 +116,23 @@ export default { this.commitType = res.commitType || '1' this.actionNotice = res.actionNotice === '1' this.dynamicNotice = res.dynamicNotice === '1' - if (res.periodValidityType === '1') { this.periodValidityEndTime = res.periodValidityEndTime } } }, - methods: { onTimeChange(e) { this.periodValidityEndTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}` }, back() { - this.$emit('back') + uni.navigateBack({}) }, getInfo(id) { this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => { - if (res.code == 0) { + if (res?.data) { this.periodValidityType = res.data.periodValidityType this.commitType = res.data.commitType this.actionNotice = res.data.actionNotice === '1' @@ -158,9 +161,7 @@ export default { } }).then(res => { if (res.code == 0) { - uni.$emit('reload') this.$u.toast('发布成功') - this.back() } }).catch(e => { @@ -169,12 +170,10 @@ export default { }, confirm() { - if (this.type === 'edit') { + if (this.isEdit) { this.publish() - return false } - uni.$emit('setting', { periodValidityType: this.periodValidityType, commitType: this.commitType, @@ -182,7 +181,6 @@ export default { dynamicNotice: this.dynamicNotice ? '1' : '0', periodValidityEndTime: this.periodValidityEndTime ? this.periodValidityEndTime : '' }) - this.back() } } diff --git a/src/apps/AppAskForm/components/List.vue b/src/apps/AppAskForm/components/List.vue index 75dd4726..416818c9 100644 --- a/src/apps/AppAskForm/components/List.vue +++ b/src/apps/AppAskForm/components/List.vue @@ -124,13 +124,13 @@ export default { }, showPopup(item) { - if (item.status === '2') { - this.$confirm('表单已停止发布,请在后台管理系统中查看调查结果', '', { - showCancel: false - }) - - return false - } + // if (item.status === '2') { + // this.$confirm('表单已停止发布,请在后台管理系统中查看调查结果', '', { + // showCancel: false + // }) + // + // return false + // } this.info = item this.id = item.id @@ -205,11 +205,9 @@ export default { if (this.info.status === '1') { return this.$u.toast('该表单已发布') } - - this.linkTo(`./formSetting?id=${this.info.id}&type=edit`) + this.linkTo(`./FormSetting?id=${this.info.id}&type=edit`) this.isShow = false }, - toEdit() { if (this.info.dataCount !== 0) { return this.$u.toast('该表单已有数据,无法编辑!') diff --git a/src/apps/AppGoodDeeds/Add.vue b/src/apps/AppGoodDeeds/Add.vue deleted file mode 100644 index 0e7da7e1..00000000 --- a/src/apps/AppGoodDeeds/Add.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/src/apps/AppGoodDeeds/AppGoodDeeds.vue b/src/apps/AppGoodDeeds/AppGoodDeeds.vue deleted file mode 100644 index 8b81e645..00000000 --- a/src/apps/AppGoodDeeds/AppGoodDeeds.vue +++ /dev/null @@ -1,228 +0,0 @@ - - - - - diff --git a/src/apps/AppGoodDeeds/Detail.vue b/src/apps/AppGoodDeeds/Detail.vue deleted file mode 100644 index 1f998662..00000000 --- a/src/apps/AppGoodDeeds/Detail.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - - - diff --git a/src/apps/AppGoodDeeds/yan.jpg b/src/apps/AppGoodDeeds/yan.jpg deleted file mode 100644 index bf6a5a2c..00000000 Binary files a/src/apps/AppGoodDeeds/yan.jpg and /dev/null differ