|
|
@@ -30,6 +30,7 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="planType" label="计划类型:">
|
|
|
<el-select
|
|
|
+ @change="changeData"
|
|
|
label="计划类型"
|
|
|
v-model="formData.planType"
|
|
|
placeholder="请选择计划类型"
|
|
|
@@ -67,6 +68,7 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="planStatus" label="计划状态:">
|
|
|
<el-select
|
|
|
+ :disabled="getDistributePlanStatus()"
|
|
|
prop="planStatus"
|
|
|
label="计划状态"
|
|
|
v-model="formData.planStatus"
|
|
|
@@ -107,6 +109,7 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="roleList" label="履职角色:">
|
|
|
<el-select
|
|
|
+ :disabled="isSubmitting"
|
|
|
label="履职角色"
|
|
|
v-model="formData.roleList"
|
|
|
placeholder="请选择履职角色"
|
|
|
@@ -144,7 +147,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="count" label="履职次数:">
|
|
|
- <el-input-number
|
|
|
+ <el-input-number :disabled="getPlanExec()"
|
|
|
style="margin-left: 10px"
|
|
|
v-model="formData.count"
|
|
|
controls-position="right"
|
|
|
@@ -190,7 +193,7 @@
|
|
|
<el-table-column prop="areaName" label="履职区域"> </el-table-column>
|
|
|
<el-table-column prop="areaName" label="操作">
|
|
|
<template v-slot="{ row }">
|
|
|
- <el-button type="text" @click="removeRow(row)">删除</el-button>
|
|
|
+ <el-button v-if="getshenglianshe()" type="text" @click="removeRow(row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -230,6 +233,7 @@ export default {
|
|
|
// let o=statusOptions;
|
|
|
// debugger
|
|
|
return {
|
|
|
+ isSubmitting:false,
|
|
|
defaultSelect: [],
|
|
|
selectedValues: [],
|
|
|
resumptionRoles: [],
|
|
|
@@ -309,6 +313,36 @@ export default {
|
|
|
...mapGetters(["orgId", "orgName"]),
|
|
|
},
|
|
|
methods: {
|
|
|
+ //省联社履职内容不能删除
|
|
|
+ getshenglianshe(){
|
|
|
+ if(this.formData.planCreateOrgType!=null&&this.formData.planCreateOrgType==1&&this.formData.distributePlanStatus!=null){
|
|
|
+ return false;
|
|
|
+ }else
|
|
|
+ return true;
|
|
|
+
|
|
|
+ },
|
|
|
+ //选择计划类型修改联动框
|
|
|
+ changeData(){
|
|
|
+ this.formData.planCycle=null;
|
|
|
+ this.formData.execOrgType=null;
|
|
|
+ this.formData.roleList=null;
|
|
|
+ this.formData.planExec=null;
|
|
|
+ this.formData.count=null;
|
|
|
+ this.tableData=null;
|
|
|
+ },
|
|
|
+ //当时间为全天或者营业中才显示
|
|
|
+ getPlanExec(){
|
|
|
+ if(this.formData.planExec==null||this.formData.planExec==2||this.formData.planExec==4){
|
|
|
+ return true;
|
|
|
+ }else
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ getDistributePlanStatus() {
|
|
|
+ // console.log(this.formData.distributePlanStatus, "distributePlanStatus");
|
|
|
+ if (this.formData.distributePlanStatus==1) {
|
|
|
+ return true;
|
|
|
+ } else return false;
|
|
|
+ },
|
|
|
reset() {
|
|
|
return {
|
|
|
planName: null,
|
|
|
@@ -327,6 +361,8 @@ export default {
|
|
|
planCreateOrgId: null,
|
|
|
planCreateOrgName: null,
|
|
|
roleList: null,
|
|
|
+ distributePlanStatus: null,
|
|
|
+ planCreateOrgType:null,
|
|
|
};
|
|
|
},
|
|
|
getRolesByOrg() {
|
|
|
@@ -373,6 +409,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onOrgTypeChanged() {
|
|
|
+ this.formData.roleList=null;
|
|
|
this.getRolesByOrg();
|
|
|
},
|
|
|
async show(id, other = {}) {
|
|
|
@@ -383,9 +420,8 @@ export default {
|
|
|
console.log(id);
|
|
|
if (id !== undefined) {
|
|
|
await api.get(id).then((res) => {
|
|
|
- console.log(res);
|
|
|
+ console.log(res, "res");
|
|
|
this.tableData = res.data.itemList;
|
|
|
-
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -410,7 +446,7 @@ export default {
|
|
|
if (!this.tableData) {
|
|
|
return [];
|
|
|
} else {
|
|
|
- console.log()
|
|
|
+ console.log();
|
|
|
return this.tableData.map((d) => d.id);
|
|
|
}
|
|
|
},
|
|
|
@@ -419,6 +455,7 @@ export default {
|
|
|
},
|
|
|
onSubmit() {
|
|
|
this.$refs.form.validate(async (isValidate) => {
|
|
|
+ this.isSubmitting=true;
|
|
|
// this.formData.note = this.formData.description;
|
|
|
this.formData.planCreateOrgId = this.orgId;
|
|
|
this.formData.planCreateOrgName = this.orgName;
|
|
|
@@ -427,6 +464,7 @@ export default {
|
|
|
this.formData.roleList =
|
|
|
this.selectedValues.length == 0 ? null : this.selectedValues;
|
|
|
await api.update(this.formData);
|
|
|
+ this.isSubmitting=false;
|
|
|
this.$emit("success");
|
|
|
this.onHide();
|
|
|
});
|