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

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

parent 376b35f2
...@@ -202,9 +202,9 @@ ...@@ -202,9 +202,9 @@
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseName"> <el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />--> <!--<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 <el-option
v-for="item in enterprises" v-for="item in enterprises"
:key="item.enterpriseId" :key="item.enterpriseId"
...@@ -320,9 +320,9 @@ ...@@ -320,9 +320,9 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseName"> <el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />--> <!--<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 <el-option
v-for="item in enterprises" v-for="item in enterprises"
:key="item.enterpriseId" :key="item.enterpriseId"
...@@ -445,6 +445,8 @@ export default { ...@@ -445,6 +445,8 @@ export default {
fileList: [], fileList: [],
//详情 //详情
isDetail: false, isDetail: false,
//是否为企业用户
isEnterproser: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -484,7 +486,7 @@ export default { ...@@ -484,7 +486,7 @@ export default {
workContent: [ workContent: [
{ required: true, message: "任务内容", trigger: "blur" } { required: true, message: "任务内容", trigger: "blur" }
], ],
workAssignEnterproseName: [ workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" } { required: true, message: "指派单位", trigger: "blur" }
], ],
expiryDate: [ expiryDate: [
...@@ -493,7 +495,7 @@ export default { ...@@ -493,7 +495,7 @@ export default {
}, },
//任务下发表单校验 //任务下发表单校验
workRules: { workRules: {
workAssignEnterproseName: [ workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" } { required: true, message: "指派单位", trigger: "blur" }
], ],
workAssignMan: [ workAssignMan: [
...@@ -691,13 +693,25 @@ export default { ...@@ -691,13 +693,25 @@ export default {
//指派单位 //指派单位
getEnterpriseLists(){ getEnterpriseLists(){
const param = {}; const param = {};
if(this.roleType != "zhengfu"){ this.judgeOperateType(param);
param.enterpriseId = this.$store.state.user.enterpriseId;
}
enterpriseLists(param).then(response => { enterpriseLists(param).then(response => {
this.enterprises = response.rows; 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){ getInspectionUserList(enterpriseId){
getInspectionUsers(enterpriseId,"se").then(response =>{ 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