修复图片导出问题
This commit is contained in:
parent
34bc27681d
commit
5bbcc13821
@ -38,7 +38,7 @@
|
|||||||
allow-create
|
allow-create
|
||||||
default-first-option
|
default-first-option
|
||||||
placeholder="请创建模板关键词,用于模板检索,按回车创建"
|
placeholder="请创建模板关键词,用于模板检索,按回车创建"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in keyOptions"
|
v-for="dict in keyOptions"
|
||||||
@ -80,7 +80,7 @@ export default {
|
|||||||
nutritionistId: null,
|
nutritionistId: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
keyWordArray: null,
|
keyWordArray: null,
|
||||||
keyWord: null
|
keyWord: null,
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
@ -93,16 +93,16 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
keyOptions:[
|
keyOptions: [
|
||||||
{
|
{
|
||||||
dictLabel: "1-7",
|
dictLabel: "1-7",
|
||||||
dictValue: "1-7"
|
dictValue: "1-7",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dictLabel: "高血压",
|
dictLabel: "高血压",
|
||||||
dictValue: "高血压"
|
dictValue: "高血压",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -120,7 +120,10 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
if (data) {
|
if (data) {
|
||||||
this.title = "修改模板";
|
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;
|
this.form = data;
|
||||||
} else {
|
} else {
|
||||||
this.title = "创建模板";
|
this.title = "创建模板";
|
||||||
@ -129,8 +132,11 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid && this.checkFormat(this.form.keyWordArray)) {
|
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 = this.form.keyWord.replace(",",",");
|
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.$emit("onConfirm", this.form);
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
}
|
}
|
||||||
@ -145,29 +151,33 @@ export default {
|
|||||||
nutritionistId: null,
|
nutritionistId: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
keyWordArray: null,
|
keyWordArray: null,
|
||||||
keyWord: null
|
keyWord: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
},
|
||||||
checkFormat(keyWordArray){
|
checkFormat(keyWordArray) {
|
||||||
let flag = true;
|
let flag = true;
|
||||||
let msg = "";
|
let msg = "";
|
||||||
if(keyWordArray != null && keyWordArray.length > 0){
|
if (keyWordArray != null && keyWordArray.length > 0) {
|
||||||
keyWordArray.forEach((item,index) => {
|
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 = "关键词中不能含有逗号和空格";
|
msg = "关键词中不能含有逗号和空格";
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(!flag){
|
if (!flag) {
|
||||||
this.msgError(msg);
|
this.msgError(msg);
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -252,7 +252,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const tmpNum = document.getElementById(`day_num_${idx}`);
|
const tmpNum = document.getElementById(`day_num_${idx}`);
|
||||||
if (tmpNum) {
|
if (tmpNum) {
|
||||||
tmpNum.innerText = `第${startNum + idx}天`;
|
tmpNum.innerText = `第${parseInt(startNum) + idx}天`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user