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' }],
|
source: [{ required: true, message: '请填写来源', trigger: 'blur' }],
|
||||||
text: [
|
text: [{ required: true, message: '请填写正文内容', trigger: 'blur' }],
|
||||||
{ required: true, message: '请填写正文内容', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -266,11 +264,11 @@ export default {
|
|||||||
// resetForm(formName) {
|
// resetForm(formName) {
|
||||||
// this.$refs[formName].resetFields();
|
// this.$refs[formName].resetFields();
|
||||||
// }
|
// }
|
||||||
beforeUpload(file){
|
beforeUpload(file) {
|
||||||
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
|
const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1);
|
||||||
const whiteList = ["pdf", "doc", "docx", "xls", "xlsx"];
|
const whiteList = ['pdf', 'doc', 'docx', 'xls', 'xlsx'];
|
||||||
if (whiteList.indexOf(fileSuffix.toLowerCase()) === -1) {
|
if (whiteList.indexOf(fileSuffix.toLowerCase()) === -1) {
|
||||||
this.msgError("上传文件只能是 pdf、doc、docx、xls、xlsx格式。");
|
this.msgError('上传文件只能是 pdf、doc、docx、xls、xlsx格式。');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -297,7 +295,20 @@ export default {
|
|||||||
ruleForm: {
|
ruleForm: {
|
||||||
handler: function () {
|
handler: function () {
|
||||||
this.$nextTick(() => {
|
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) {
|
if (id) {
|
||||||
this.editPage = true;
|
this.editPage = true;
|
||||||
getPolicyInfo({ policyId: id }).then(({ data }) => {
|
getPolicyInfo({ policyId: id }).then(({ data }) => {
|
||||||
|
console.log(data);
|
||||||
this.ruleForm = data;
|
this.ruleForm = data;
|
||||||
if(data.method==1){
|
if (data.method == 1) {
|
||||||
this.editPage = true;
|
this.editPage = true;
|
||||||
}else{
|
} else {
|
||||||
this.editSatus = true
|
this.editSatus = true;
|
||||||
this.editPage = false;
|
this.editPage = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user