修复图片导出问题
This commit is contained in:
parent
34bc27681d
commit
5bbcc13821
@ -80,7 +80,7 @@ export default {
|
||||
nutritionistId: null,
|
||||
remark: null,
|
||||
keyWordArray: null,
|
||||
keyWord: null
|
||||
keyWord: null,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
@ -96,13 +96,13 @@ export default {
|
||||
keyOptions: [
|
||||
{
|
||||
dictLabel: "1-7",
|
||||
dictValue: "1-7"
|
||||
dictValue: "1-7",
|
||||
},
|
||||
{
|
||||
dictLabel: "高血压",
|
||||
dictValue: "高血压"
|
||||
}
|
||||
]
|
||||
dictValue: "高血压",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -120,7 +120,10 @@ export default {
|
||||
this.reset();
|
||||
if (data) {
|
||||
this.title = "修改模板";
|
||||
data.keyWordArray = (data.keyWord != null && data.keyWord != "") ? data.keyWord.split(",") : null;
|
||||
data.keyWordArray =
|
||||
data.keyWord != null && data.keyWord != ""
|
||||
? data.keyWord.split(",")
|
||||
: null;
|
||||
this.form = data;
|
||||
} else {
|
||||
this.title = "创建模板";
|
||||
@ -129,8 +132,11 @@ export default {
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid && this.checkFormat(this.form.keyWordArray)) {
|
||||
this.form.keyWord = (this.form.keyWordArray != null && this.form.keyWordArray.length > 0) ? this.form.keyWordArray.join(",") : null;
|
||||
this.form.keyWord = this.form.keyWord.replace(",",",");
|
||||
this.form.keyWord =
|
||||
this.form.keyWordArray != null && this.form.keyWordArray.length > 0
|
||||
? this.form.keyWordArray.join(",").replaceAll(",", ",")
|
||||
: null;
|
||||
// this.form.keyWord = (this.form.keyWord || "").replace(",", ",");
|
||||
this.$emit("onConfirm", this.form);
|
||||
this.visible = false;
|
||||
}
|
||||
@ -145,7 +151,7 @@ export default {
|
||||
nutritionistId: null,
|
||||
remark: null,
|
||||
keyWordArray: null,
|
||||
keyWord: null
|
||||
keyWord: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -157,7 +163,11 @@ export default {
|
||||
let msg = "";
|
||||
if (keyWordArray != null && keyWordArray.length > 0) {
|
||||
keyWordArray.forEach((item, index) => {
|
||||
if(item.indexOf(",") != -1 || item.indexOf(",") != -1 || item.indexOf(" ") != -1){
|
||||
if (
|
||||
item.indexOf(",") != -1 ||
|
||||
item.indexOf(",") != -1 ||
|
||||
item.indexOf(" ") != -1
|
||||
) {
|
||||
msg = "关键词中不能含有逗号和空格";
|
||||
flag = false;
|
||||
}
|
||||
@ -167,7 +177,7 @@ export default {
|
||||
this.msgError(msg);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -252,7 +252,7 @@ export default {
|
||||
}
|
||||
const tmpNum = document.getElementById(`day_num_${idx}`);
|
||||
if (tmpNum) {
|
||||
tmpNum.innerText = `第${startNum + idx}天`;
|
||||
tmpNum.innerText = `第${parseInt(startNum) + idx}天`;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user