diff --git a/manager/src/views/sys/setting-manage/setting/BASE_SETTING.vue b/manager/src/views/sys/setting-manage/setting/BASE_SETTING.vue index f36647e9..41932c43 100644 --- a/manager/src/views/sys/setting-manage/setting/BASE_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/BASE_SETTING.vue @@ -87,7 +87,10 @@ import ossManage from "@/views/sys/oss-manage/ossManage"; export default { title: "基础设置", props: { - res:Object, + res:{ + type:null, + default:"" + }, type:'' }, components: { @@ -108,7 +111,8 @@ export default { staticPageWapAddress: "", }, selected: "", // 已选数据 - ruleValidate: {} // 验证规则 + ruleValidate: {}, // 验证规则 + result:"" }; }, created() { @@ -146,10 +150,9 @@ export default { }, /**添加必填项 */ init() { - this.res = JSON.parse(this.res); - - this.$set(this, "formValidate", { ...this.res }); - Object.keys(this.res).forEach((item) => { + this.result = JSON.parse(this.res); + this.$set(this, "formValidate", { ...this.result }); + Object.keys(this.result).forEach((item) => { this.ruleValidate[item] = [ { required: true, diff --git a/manager/src/views/sys/setting-manage/setting/GOODS_SETTING.vue b/manager/src/views/sys/setting-manage/setting/GOODS_SETTING.vue index 4e780525..d2a5ea9f 100644 --- a/manager/src/views/sys/setting-manage/setting/GOODS_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/GOODS_SETTING.vue @@ -85,6 +85,7 @@ export default { showProgress: false, intervalProgress: null, ruleValidate: {}, // 验证规则 + result:"" }; }, created() { @@ -152,12 +153,12 @@ export default { // 实例化数据 init() { - this.res = JSON.parse(this.res); + this.result = JSON.parse(this.res); - Object.keys(this.res).map((item) => { - this.res[item] += ""; + Object.keys(this.result).map((item) => { + this.result[item] += ""; }); - this.$set(this, "formValidate", { ...this.res }); + this.$set(this, "formValidate", { ...this.result }); Object.keys(this.formValidate).forEach((item) => { this.ruleValidate[item] = [ { diff --git a/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue b/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue index 3d4c374d..7bfc80eb 100644 --- a/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/IM_SETTING.vue @@ -23,6 +23,7 @@ export default { formValidate: { // 表单数据 httpUrl: "" }, + result:"", }; }, props: ["res", "type"], @@ -49,9 +50,9 @@ export default { }, // 实例化数据 init() { - this.res = JSON.parse(this.res); + this.result = JSON.parse(this.res); - this.$set(this, "formValidate", {...this.res}); + this.$set(this, "formValidate", {...this.result}); Object.keys(this.formValidate).forEach((item) => { this.ruleValidate[item] = [ { diff --git a/manager/src/views/sys/setting-manage/setting/LOGISTICS_SETTING.vue b/manager/src/views/sys/setting-manage/setting/LOGISTICS_SETTING.vue index 98a154a8..9b9a2629 100644 --- a/manager/src/views/sys/setting-manage/setting/LOGISTICS_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/LOGISTICS_SETTING.vue @@ -52,6 +52,7 @@ export default { data() { return { ruleValidate: {}, // 验证规则 + result:"", formValidate: { // 表单数据 type: "", kdniaoEbusinessID: "", @@ -85,8 +86,8 @@ export default { }, // 实例化数据 init() { - this.res = JSON.parse(this.res); - this.$set(this, "formValidate", { ...this.res }); + this.result = JSON.parse(this.res); + this.$set(this, "formValidate", { ...this.result }); Object.keys(this.formValidate).forEach((item) => { this.ruleValidate[item] = [ { diff --git a/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue b/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue index 4d051c51..d64e0808 100644 --- a/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue @@ -56,6 +56,7 @@ export default { closeAfterSale: "", closeComplaint:"" }, + result:"" }; }, props: ["res", "type"], @@ -82,11 +83,11 @@ export default { }, // 实例化数据 init() { - this.res = JSON.parse(this.res); - Object.keys(this.res).map((item) => { - this.res[item] += ""; + this.result = JSON.parse(this.res); + Object.keys(this.result).map((item) => { + this.result[item] += ""; }); - this.$set(this, "formValidate", { ...this.res }); + this.$set(this, "formValidate", { ...this.result }); Object.keys(this.formValidate).forEach((item) => { this.ruleValidate[item] = [ { diff --git a/manager/src/views/sys/setting-manage/setting/OSS_SETTING.vue b/manager/src/views/sys/setting-manage/setting/OSS_SETTING.vue index d956dc5d..5d618b86 100644 --- a/manager/src/views/sys/setting-manage/setting/OSS_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/OSS_SETTING.vue @@ -114,6 +114,7 @@ export default { tencentCOSBucket: "", tencentCOSEndPoint: "", }, + result:"" }; }, props: ["res", "type"], @@ -140,9 +141,9 @@ export default { }, // 实例化数据 init() { - this.res = JSON.parse(this.res); + this.result = JSON.parse(this.res); - this.$set(this, "formValidate", {...this.res}); + this.$set(this, "formValidate", {...this.result}); Object.keys(this.formValidate).forEach((item) => { this.ruleValidate[item] = [ { diff --git a/manager/src/views/sys/setting-manage/setting/POINT_SETTING.vue b/manager/src/views/sys/setting-manage/setting/POINT_SETTING.vue index 3e47c8b3..ef75c793 100644 --- a/manager/src/views/sys/setting-manage/setting/POINT_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/POINT_SETTING.vue @@ -74,6 +74,7 @@ export default { return { ruleValidate: {}, // 验证规则 formValidate: {}, // 表单数据 + result: "", }; }, props: ["res", "type"], @@ -115,15 +116,15 @@ export default { }, // 实例化数据 init() { - this.res = JSON.parse(this.res); - Object.keys(this.res).map((item) => { + this.result = JSON.parse(this.res); + Object.keys(this.result).map((item) => { if (item == "pointSettingItems") { return false; } - this.res[item] += ""; + this.result[item] += ""; }); - this.$set(this, "formValidate", {...this.res}); + this.$set(this, "formValidate", {...this.result}); Object.keys(this.formValidate).forEach((item) => { this.ruleValidate[item] = [ diff --git a/manager/src/views/sys/setting-manage/setting/SMS_SETTING.vue b/manager/src/views/sys/setting-manage/setting/SMS_SETTING.vue index 7781e35b..863d9310 100644 --- a/manager/src/views/sys/setting-manage/setting/SMS_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/SMS_SETTING.vue @@ -62,6 +62,7 @@ import {handleSubmit} from "./validate"; export default { data() { return { + result: "", ruleValidate: {}, // 验证规则 formValidate: { // 表单数据 accessKeyId: "", @@ -103,9 +104,9 @@ export default { }, // 实例化数据 init() { - this.res = JSON.parse(this.res); + this.result = JSON.parse(this.res); - this.$set(this, "formValidate", {...this.res}); + this.$set(this, "formValidate", {...this.result}); Object.keys(this.formValidate).forEach((item) => { this.ruleValidate[item] = [ { diff --git a/manager/src/views/sys/setting-manage/setting/WITHDRAWAL_SETTING.vue b/manager/src/views/sys/setting-manage/setting/WITHDRAWAL_SETTING.vue index 29ff0841..e7276589 100644 --- a/manager/src/views/sys/setting-manage/setting/WITHDRAWAL_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/WITHDRAWAL_SETTING.vue @@ -1,7 +1,7 @@