tianq 3 years ago
parent
commit
b3c38f078e
  1. 3
      src/assets/scss/modules/management/list-main.scss
  2. 71
      src/views/modules/communityService/policy/addPolicy.vue

3
src/assets/scss/modules/management/list-main.scss

@ -57,6 +57,9 @@
.m-form-box-height-auto{
height: auto;
}
.u-item-width-service{
width: 218px;
}
}

71
src/views/modules/communityService/policy/addPolicy.vue

@ -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

Loading…
Cancel
Save