BUG 26095

This commit is contained in:
aixianling
2021-12-27 17:07:37 +08:00
parent c424f19415
commit 8e06b52305
2 changed files with 13 additions and 9 deletions

View File

@@ -194,7 +194,8 @@ export default {
methods: { methods: {
toSetting() { toSetting() {
let {formConfig} = this let {formConfig} = this
uni.navigateTo({url: `./FormSetting?${qs.stringify({formConfig})}`}) localStorage.setItem("toFormSetting", JSON.stringify(formConfig))
uni.navigateTo({url: `./FormSetting`})
}, },
back() { back() {
uni.navigateBack({}) uni.navigateBack({})

View File

@@ -77,8 +77,8 @@
</template> </template>
<script> <script>
export default { export default {
props: ['formConfig'],
computed: { computed: {
isEdit() { isEdit() {
return this.$route.query.type == 'edit' return this.$route.query.type == 'edit'
@@ -104,24 +104,27 @@ export default {
wechatId: '0', wechatId: '0',
periodValidityEndTime: '', periodValidityEndTime: '',
isShowTime: false, isShowTime: false,
periodValidityType: '0' periodValidityType: '0',
} }
}, },
created() { created() {
if (this.id) { if (this.id) {
this.getInfo(this.id) this.getInfo(this.id)
} else if (this.formConfig) { } else this.getFormSetting()
const res = this.formConfig },
methods: {
getFormSetting() {
let params = localStorage.getItem("toFormSetting"), res = {}
params && (res = JSON.parse(params))
localStorage.removeItem("toFormSetting")
this.periodValidityType = res.periodValidityType || '0' this.periodValidityType = res.periodValidityType || '0'
this.commitType = res.commitType || '1' this.commitType = res.commitType || "1"
this.actionNotice = res.actionNotice === '1' this.actionNotice = res.actionNotice === '1'
this.dynamicNotice = res.dynamicNotice === '1' this.dynamicNotice = res.dynamicNotice === '1'
if (res.periodValidityType === '1') { if (res.periodValidityType === '1') {
this.periodValidityEndTime = res.periodValidityEndTime this.periodValidityEndTime = res.periodValidityEndTime
} }
} },
},
methods: {
onTimeChange(e) { onTimeChange(e) {
this.periodValidityEndTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}` this.periodValidityEndTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`
}, },