|
|
|
@ -429,6 +429,34 @@ export default {
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// 勾选的话则是全部企业,值为1
|
|
|
|
|
let ad = this.allDeptList == true ? 1:0;
|
|
|
|
|
this.form.allDept = ad;
|
|
|
|
|
if (this.form.allDept == 0)
|
|
|
|
|
this.form.deptList = this.form.deptList.join();
|
|
|
|
|
else
|
|
|
|
|
this.form.deptList = "";
|
|
|
|
|
// 文件
|
|
|
|
|
if (this.taskShow == 1) {
|
|
|
|
|
if (this.form.fileTempName == null || this.form.fileTempName == '') {
|
|
|
|
|
this.$modal.alert("请选择模板文件");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let fileTemp = this.form.fileTempName.split(",");
|
|
|
|
|
let oFile = [];
|
|
|
|
|
for (let i = 0; i < fileTemp.length; i++) {
|
|
|
|
|
let f = fileTemp[i].split("/");
|
|
|
|
|
let f1 = f[f.length-1].split("_");
|
|
|
|
|
let fName = [];
|
|
|
|
|
for (let j = 0; j < f1.length-1; j++) {
|
|
|
|
|
fName.push(f1[j]);
|
|
|
|
|
}
|
|
|
|
|
let fLast = f1[f1.length-1].split(".");
|
|
|
|
|
let f2 = fName.join("_") + "." + fLast[fLast.length-1];
|
|
|
|
|
oFile.push(f2);
|
|
|
|
|
}
|
|
|
|
|
this.form.fileTempOriginalName = oFile.join(",");
|
|
|
|
|
}
|
|
|
|
|
if (this.form.noticeMessageId != null) {
|
|
|
|
|
updateEhsNoticeMessage(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|