|
|
|
@ -244,6 +244,7 @@ |
|
|
|
ref="ref_policy_form1" |
|
|
|
v-if="newFormData" |
|
|
|
> |
|
|
|
<!-- 使用v-if后动态显示隐藏方法失效 --> |
|
|
|
<el-form-item |
|
|
|
v-if="formData.assignFlag" |
|
|
|
label="服务方" |
|
|
|
@ -519,8 +520,8 @@ export default { |
|
|
|
this.$refs.ref_form.resetFields(); |
|
|
|
} else { |
|
|
|
await this.loadFormInfo(); |
|
|
|
await this.handleChangeServiceTypeLevel1(); |
|
|
|
await this.handleServiceChange(); |
|
|
|
await this.getCommonServiceTypeSelectList(); |
|
|
|
await this.getServiceuserList(); |
|
|
|
} |
|
|
|
|
|
|
|
this.endLoading(); |
|
|
|
@ -643,10 +644,11 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
async handleServiceChange() { |
|
|
|
this.newFormData.serverOrgId = '' |
|
|
|
await this.getServiceuserList(); |
|
|
|
}, |
|
|
|
async getServiceuserList() { |
|
|
|
if (!this.formData.assignInfo) return; |
|
|
|
if (!this.formData.assignFlag) return; |
|
|
|
if (this.formData.commonServiceTypeId == "") { |
|
|
|
this.$message.error("请先选择需求类别!"); |
|
|
|
return; |
|
|
|
@ -764,15 +766,31 @@ export default { |
|
|
|
// setTimeout(() => { |
|
|
|
// this.btnDisable = false; |
|
|
|
// }, 5000); |
|
|
|
// this.$refs["ref_form"].validate((valid, messageObj) => { |
|
|
|
// if (!valid) { |
|
|
|
// // app.util.validateRule(messageObj) |
|
|
|
// this.btnDisable = false; |
|
|
|
// } else { |
|
|
|
// this.addFuwu(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
await this.addFuwu(); |
|
|
|
const form = new Promise((resolve, reject) => { |
|
|
|
this.$refs["ref_form"].validate((valid) => { |
|
|
|
if (valid) resolve(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
const form1 = new Promise((resolve, reject) => { |
|
|
|
this.$refs["ref_policy_form1"].validate((valid) => { |
|
|
|
if (valid) resolve(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
Promise.all([form1, form]) |
|
|
|
.then(() => { |
|
|
|
var oDate1 = new Date(this.formData.serviceTimeStart); |
|
|
|
var oDate2 = new Date(this.formData.serviceTimeEnd); |
|
|
|
if (oDate1.getTime() > oDate2.getTime()) { |
|
|
|
this.$message.error("服务截止时间必须大于服务开始时间"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.addFuwu(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
app.util.validateRule(messageObj); |
|
|
|
this.btnDisable = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
getLastItem(list, vals, key) { |
|
|
|
let LIST = list || []; |
|
|
|
@ -822,17 +840,17 @@ export default { |
|
|
|
async addFuwu() { |
|
|
|
// 处理服务范围数据 |
|
|
|
await this.operationOption(); |
|
|
|
// 文件上传新增没问题,编辑执行这一步会多多一个文件对象 |
|
|
|
// this.formData.attachmentList = [...this.fileList]; |
|
|
|
// this.fileList.forEach(item=>{ |
|
|
|
// this.formData.attachmentList.push({ |
|
|
|
// name:item.attachmentName, |
|
|
|
// type:item.attachmentType, |
|
|
|
// url:item.attachmentUrl, |
|
|
|
// format:item.attachmentFormat, |
|
|
|
// duration:0, |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
this.formData.attachmentList = [...this.fileList] |
|
|
|
let arr = [] |
|
|
|
this.formData.attachmentList.map(item=>{ |
|
|
|
arr.push({ name:item.attachmentName|| item.name, |
|
|
|
type:item.attachmentType || item.type, |
|
|
|
url:item.attachmentUrl || item.url, |
|
|
|
format:item.attachmentFormat|| item.format, |
|
|
|
duration:0,}) |
|
|
|
return arr |
|
|
|
}) |
|
|
|
this.formData.attachmentList = arr |
|
|
|
this.formData.assignInfo = this.newFormData; |
|
|
|
let url = ""; |
|
|
|
|
|
|
|
@ -1021,8 +1039,11 @@ export default { |
|
|
|
|
|
|
|
// 服务类型下拉框选中事件 |
|
|
|
handleChangeServiceTypeLevel1() { |
|
|
|
// this.formData.policyCategoryL2 = ""; |
|
|
|
this.$http |
|
|
|
this.formData.policyCategoryL2 = ""; |
|
|
|
this.getCommonServiceTypeSelectList() |
|
|
|
}, |
|
|
|
getCommonServiceTypeSelectList(){ |
|
|
|
this.$http |
|
|
|
.get( |
|
|
|
"/governance/commonServiceType/selectList/" + |
|
|
|
this.formData.policyCategoryL1 |
|
|
|
|