Commit 4c530552 authored by “yiyousong”'s avatar “yiyousong”

fix:修复新增应用字段时的表格判断错误

parent bda9d36f
......@@ -328,7 +328,7 @@ export default {
this.$refs.form.validate(async (valid) => {
if (valid) {
let bol = this.templeteList.some((v) => v.fieldType == "table");
if (bol && !this.form.id) {
if (bol && !this.form.id && this.form.fieldType == "table") {
this.$message.warn("只能存在一个表格");
return;
}
......@@ -346,8 +346,12 @@ export default {
});
let res = await saveTemplete({
...this.form,
fieldTypeValue: fieldTypeObj ? JSON.stringify(fieldTypeObj) : "",
serviceApiParams: apiParamsObj ? JSON.stringify(apiParamsObj) : "",
fieldTypeValue: !this.$_.isEmpty(fieldTypeObj)
? JSON.stringify(fieldTypeObj)
: "",
serviceApiParams: !this.$_.isEmpty(apiParamsObj)
? JSON.stringify(apiParamsObj)
: "",
});
let { code, msg } = res.data;
if (code === 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment