fixed some bugs
This commit is contained in:
BIN
jiace-admin(414).zip
Normal file
BIN
jiace-admin(414).zip
Normal file
Binary file not shown.
@ -235,9 +235,7 @@ export default {
|
||||
},
|
||||
],
|
||||
source: [{ required: true, message: '请填写来源', trigger: 'blur' }],
|
||||
text: [
|
||||
{ required: true, message: '请填写正文内容', trigger: 'blur' },
|
||||
],
|
||||
text: [{ required: true, message: '请填写正文内容', trigger: 'blur' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -267,10 +265,10 @@ export default {
|
||||
// this.$refs[formName].resetFields();
|
||||
// }
|
||||
beforeUpload(file) {
|
||||
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
|
||||
const whiteList = ["pdf", "doc", "docx", "xls", "xlsx"];
|
||||
const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1);
|
||||
const whiteList = ['pdf', 'doc', 'docx', 'xls', 'xlsx'];
|
||||
if (whiteList.indexOf(fileSuffix.toLowerCase()) === -1) {
|
||||
this.msgError("上传文件只能是 pdf、doc、docx、xls、xlsx格式。");
|
||||
this.msgError('上传文件只能是 pdf、doc、docx、xls、xlsx格式。');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
@ -297,7 +295,20 @@ export default {
|
||||
ruleForm: {
|
||||
handler: function () {
|
||||
this.$nextTick(() => {
|
||||
this.formatRichText(this.ruleForm.downloadUrl, this.ruleForm.id,this.ruleForm.url);
|
||||
this.formatRichText(
|
||||
this.ruleForm.downloadUrl,
|
||||
this.ruleForm.id,
|
||||
this.ruleForm.url
|
||||
);
|
||||
if (this.ruleForm.captureSource === 'TL_FGW') {
|
||||
document
|
||||
.getElementById('text')
|
||||
.querySelectorAll('img')
|
||||
.forEach((item) => {
|
||||
console.log(item.src);
|
||||
item.src = item.src.replace('./', '/');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
@ -308,11 +319,12 @@ export default {
|
||||
if (id) {
|
||||
this.editPage = true;
|
||||
getPolicyInfo({ policyId: id }).then(({ data }) => {
|
||||
console.log(data);
|
||||
this.ruleForm = data;
|
||||
if (data.method == 1) {
|
||||
this.editPage = true;
|
||||
} else {
|
||||
this.editSatus = true
|
||||
this.editSatus = true;
|
||||
this.editPage = false;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user