Commit 32652dd7 authored by 耿迪迪's avatar 耿迪迪

任务下单修改 gengdidi

parent f37e0db7
......@@ -84,7 +84,7 @@ public class TWorkOrderController extends BaseController
List<Integer> postIds = iSysPostService.selectPostListByUserId(user.getUserId());
for(Integer postId : postIds){
SysPost postInfo = iSysPostService.selectPostById(postId.longValue());
if("se".equals(postInfo.getPostCode())){
if("se".equals(postInfo.getPostCode()) && postIds.size()==1){
tWorkOrder.setWorkAssignManId(user.getUserId());
}
}
......
......@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="licenseValidityTime != null and licenseValidityTime != ''"> and license_validity_time = #{licenseValidityTime}</if>
<if test="annualSupervisionInspection != null and annualSupervisionInspection != ''"> and annual_supervision_inspection = #{annualSupervisionInspection}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
</where>
group by enterprise_id desc
</select>
......
......@@ -10,7 +10,8 @@ const user = {
permissions: [],
systemSetting:{},
posts: [],
enterpriseId: ''
enterpriseId: '',
userId: ''
},
mutations: {
......@@ -37,6 +38,9 @@ const user = {
},
SET_ENTERPRISEID: (state,enterpriseId) =>{
state.enterpriseId = enterpriseId
},
SET_USERID:(state,userId) =>{
state.userId = userId
}
},
......@@ -76,10 +80,10 @@ const user = {
commit('SET_SYSTEMSETTING', res.systemSetting)
commit('SET_POSTS',res.posts)
commit('SET_ENTERPRISEID',user.deptId)
// 大屏公司获取
// 第一个参数是其他模块的 actions 路径,
// 第二个是传给 actions 的数据, 如果不需要传数据, 也必须预留,
commit('SET_USERID',user.userId);
// 大屏公司获取
// 第一个参数是其他模块的 actions 路径,
// 第二个是传给 actions 的数据, 如果不需要传数据, 也必须预留,
// 第三个参数是配置选项, 申明这个 acitons 不是当前模块的
dispatch("bigWindowCompany/GetCompany",{},{root:true})
console.log(res.systemSetting)
......
......@@ -41,6 +41,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:order:add']"
v-if="roleType != 'inpector'"
>新增</el-button>
</el-col>
<el-col :span="1.5">
......@@ -52,6 +53,7 @@
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['system:order:export']"
v-if="roleType != 'inpector'"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
......@@ -100,7 +102,7 @@
<el-table-column label="责任人员" align="center" prop="responsiblePerson" />
<el-table-column label="截止日期" align="center" prop="expiryDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="150%">
......@@ -113,7 +115,7 @@
v-hasPermi="['system:order:edit']"
key="detail"
>详情</el-button>
<el-button v-if="scope.row.workStatus == '0' || scope.row.workStatus == '1'" key="edit"
<el-button v-if="('zhengfu'== roleType || (('enterprise'== roleType || 'doubleRole' == roleType) && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId))&& scope.row.workStatus == '0'" key="edit"
size="mini"
type="text"
icon="el-icon-edit"
......@@ -126,9 +128,10 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:order:remove']"
v-if="('zhengfu'== roleType || (('enterprise'== roleType || 'doubleRole' == roleType) && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId))&& scope.row.workStatus == '0'"
key="detele"
>删除</el-button>
<el-button v-if=" (('enterprise'== roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null)) || ('zhengfu'== roleType && (scope.row.workAssignEnterproseId == '' || scope.row.workAssignEnterproseId == null))) && scope.row.workStatus == '0'"
<el-button v-if="'inpector'!= roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null) && scope.row.workStatus == '0'"
size="mini"
type="text"
icon="el-icon-edit"
......@@ -136,7 +139,7 @@
v-hasPermi="['system:order:edit']"
key="work"
>任务下发</el-button>
<el-button v-if=" 'inpector'== roleType && scope.row.workStatus == '0'"
<el-button v-if=" ('inpector'== roleType || 'doubleRole' == roleType) && (scope.row.workAssignManId == $store.state.user.userId) && scope.row.workStatus == '0'"
size="mini"
type="text"
icon="el-icon-edit"
......@@ -523,8 +526,10 @@ export default {
let enterpriseId = this.$store.state.user.enterpriseId;
let post = this.$store.state.user.posts.find(item => item.postCode === "se");
if(-2 != enterpriseId){
if(post){
if(post && this.$store.state.user.posts.length <=1){
this.roleType = "inpector";
}else if(post && this.$store.state.user.posts.length >1){
this.roleType = "doubleRole";
}else{
this.roleType = "enterprise";
}
......@@ -685,8 +690,12 @@ export default {
},
//指派单位
getEnterpriseLists(){
enterpriseLists().then(response => {
this.enterprises = response.rows;
const param = {};
if(this.roleType != "zhengfu"){
param.enterpriseId = this.$store.state.user.enterpriseId;
}
enterpriseLists(param).then(response => {
this.enterprises = response.rows;
});
},
//获取巡检员
......
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