diff --git a/src/renderer/components/workAdd/workAdd.vue b/src/renderer/components/workAdd/workAdd.vue index c1c4afc..79cbcbe 100644 --- a/src/renderer/components/workAdd/workAdd.vue +++ b/src/renderer/components/workAdd/workAdd.vue @@ -423,8 +423,8 @@ export default { mounted() { let workForm = localStorage.getItem('workForm') if (workForm) { - this.form.cd_type = workForm.cd_type - this.form.copy_type = workForm.copy_type + this.form.cd_type = JSON.parse(workForm).cd_type + this.form.copy_type = JSON.parse(workForm).copy_type } }, methods: { @@ -583,10 +583,10 @@ export default { if (!theForm.udf_file) delete theForm.udf_file that.testForm.req_info = theForm // 保存默认设置 - localStorage.setItem('workForm', { + localStorage.setItem('workForm', JSON.stringify({ cd_type: that.form.cd_type, copy_type: that.form.copy_type - }) + })) that.$store.dispatch('chat/websocketsend', that.testForm).then(() => { setTimeout(() => { that.$message({