Commit c2bcdf2f authored by 耿迪迪's avatar 耿迪迪

任务下发巡检企业问题修改 gengdidi

parent 376b35f2
......@@ -202,9 +202,9 @@
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseName">
<el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />-->
<el-select v-model="form.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isDetail">
<el-select v-model="form.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isDetail || isEnterproser">
<el-option
v-for="item in enterprises"
:key="item.enterpriseId"
......@@ -320,9 +320,9 @@
<el-row>
<el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseName">
<el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />-->
<el-select v-model="workForm.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)">
<el-select v-model="workForm.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isEnterproser">
<el-option
v-for="item in enterprises"
:key="item.enterpriseId"
......@@ -445,6 +445,8 @@ export default {
fileList: [],
//详情
isDetail: false,
//是否为企业用户
isEnterproser: false,
// 查询参数
queryParams: {
pageNum: 1,
......@@ -484,7 +486,7 @@ export default {
workContent: [
{ required: true, message: "任务内容", trigger: "blur" }
],
workAssignEnterproseName: [
workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" }
],
expiryDate: [
......@@ -493,7 +495,7 @@ export default {
},
//任务下发表单校验
workRules: {
workAssignEnterproseName: [
workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" }
],
workAssignMan: [
......@@ -691,13 +693,25 @@ export default {
//指派单位
getEnterpriseLists(){
const param = {};
if(this.roleType != "zhengfu"){
param.enterpriseId = this.$store.state.user.enterpriseId;
}
this.judgeOperateType(param);
enterpriseLists(param).then(response => {
this.enterprises = response.rows;
});
},
//根据用户角色和操作类型设置指派人是否可选
judgeOperateType(param){
if(this.roleType != "zhengfu"){
param.enterpriseId = this.$store.state.user.enterpriseId;
if(this.title == "添加巡检巡查任务"){
this.form.workAssignEnterproseId = this.$store.state.user.enterpriseId;
this.isEnterproser = true;
}
if(this.title == "任务下发"){
this.isEnterproser = true;
}
this.getInspectionUserList(this.$store.state.user.enterpriseId);
}
},
//获取巡检员
getInspectionUserList(enterpriseId){
getInspectionUsers(enterpriseId,"se").then(response =>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment