|
@@ -116,6 +116,7 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
<!-- 合同段自定义表单 -->
|
|
<!-- 合同段自定义表单 -->
|
|
<template slot="contractIdForm">
|
|
<template slot="contractIdForm">
|
|
<el-select
|
|
<el-select
|
|
@@ -131,8 +132,8 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
- <!-- 用户类型自定义表单 -->
|
|
|
|
|
|
|
|
|
|
+ <!-- 用户类型自定义表单 -->
|
|
<template
|
|
<template
|
|
slot-scope="{type}"
|
|
slot-scope="{type}"
|
|
slot="roleIdsForm"
|
|
slot="roleIdsForm"
|
|
@@ -396,6 +397,10 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
return {
|
|
return {
|
|
|
|
+ addData: {
|
|
|
|
+ tenantId: '',
|
|
|
|
+ deptId: ''
|
|
|
|
+ },
|
|
form: {},
|
|
form: {},
|
|
search: {},
|
|
search: {},
|
|
roleBox: false,
|
|
roleBox: false,
|
|
@@ -569,23 +574,6 @@ export default {
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
}],
|
|
}],
|
|
},
|
|
},
|
|
- {
|
|
|
|
- label: "用户平台",
|
|
|
|
- type: "select",
|
|
|
|
- dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
|
|
|
|
- props: {
|
|
|
|
- label: "dictValue",
|
|
|
|
- value: "dictKey"
|
|
|
|
- },
|
|
|
|
- dataType: "number",
|
|
|
|
- slot: true,
|
|
|
|
- prop: "userType",
|
|
|
|
- rules: [{
|
|
|
|
- required: true,
|
|
|
|
- message: "请选择用户平台",
|
|
|
|
- trigger: "change"
|
|
|
|
- }]
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
label: '密码',
|
|
label: '密码',
|
|
prop: 'password',
|
|
prop: 'password',
|
|
@@ -625,58 +613,16 @@ export default {
|
|
{
|
|
{
|
|
label: "手机号码",
|
|
label: "手机号码",
|
|
prop: "phone",
|
|
prop: "phone",
|
|
- overHidden: true
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "电子邮箱",
|
|
|
|
- prop: "email",
|
|
|
|
- hide: true,
|
|
|
|
- overHidden: true
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "账号状态",
|
|
|
|
- prop: "status",
|
|
|
|
- type: "select",
|
|
|
|
- hide: true,
|
|
|
|
- dicData: [
|
|
|
|
- {
|
|
|
|
- label: "启用",
|
|
|
|
- value: 1
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "禁用",
|
|
|
|
- value: 0
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: '职责信息',
|
|
|
|
- prop: 'dutyInfo',
|
|
|
|
- icon: 'el-icon-s-custom',
|
|
|
|
- column: [
|
|
|
|
- {
|
|
|
|
- label: "用户编号",
|
|
|
|
- prop: "code",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "所属角色",
|
|
|
|
- prop: "roleId",
|
|
|
|
- multiple: true,
|
|
|
|
- type: "tree",
|
|
|
|
- dicData: [],
|
|
|
|
- props: {
|
|
|
|
- label: 'title',
|
|
|
|
- value: 'id',
|
|
|
|
- },
|
|
|
|
- checkStrictly: true,
|
|
|
|
- slot: true,
|
|
|
|
rules: [{
|
|
rules: [{
|
|
required: true,
|
|
required: true,
|
|
- message: "请选择所属角色",
|
|
|
|
- trigger: "change"
|
|
|
|
- }]
|
|
|
|
|
|
+ message: "请输入手机号",
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ }],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "身份证号",
|
|
|
|
+ prop: "idNumber",
|
|
|
|
+
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "所属部门",
|
|
label: "所属部门",
|
|
@@ -695,22 +641,6 @@ export default {
|
|
trigger: "change"
|
|
trigger: "change"
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
- {
|
|
|
|
- label: "所属岗位",
|
|
|
|
- prop: "postId",
|
|
|
|
- type: "tree",
|
|
|
|
- multiple: true,
|
|
|
|
- dicData: [],
|
|
|
|
- props: {
|
|
|
|
- label: "postName",
|
|
|
|
- value: "id"
|
|
|
|
- },
|
|
|
|
- rules: [{
|
|
|
|
- required: true,
|
|
|
|
- message: "请选择所属岗位",
|
|
|
|
- trigger: "change"
|
|
|
|
- }],
|
|
|
|
- },
|
|
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -722,6 +652,11 @@ export default {
|
|
label: "参建项目",
|
|
label: "参建项目",
|
|
prop: "projectAndUserList",
|
|
prop: "projectAndUserList",
|
|
span: 24,
|
|
span: 24,
|
|
|
|
+ // rules: [{
|
|
|
|
+ // required: true,
|
|
|
|
+ // message: "请先添加参加项目",
|
|
|
|
+ // trigger: "change"
|
|
|
|
+ // }],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "参与项目",
|
|
label: "参与项目",
|
|
@@ -740,20 +675,10 @@ export default {
|
|
label: "单位名称",
|
|
label: "单位名称",
|
|
prop: "companyName",
|
|
prop: "companyName",
|
|
span: 16,
|
|
span: 16,
|
|
- rules: [{
|
|
|
|
- required: true,
|
|
|
|
- message: "请输入单位名称",
|
|
|
|
- trigger: "change"
|
|
|
|
- }],
|
|
|
|
}, {
|
|
}, {
|
|
label: "职位",
|
|
label: "职位",
|
|
prop: "position",
|
|
prop: "position",
|
|
span: 16,
|
|
span: 16,
|
|
- rules: [{
|
|
|
|
- required: true,
|
|
|
|
- message: "请输入岗位信息",
|
|
|
|
- trigger: "change"
|
|
|
|
- }],
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "允许登录",
|
|
label: "允许登录",
|
|
@@ -912,6 +837,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
'fromss.projectId': function () {
|
|
'fromss.projectId': function () {
|
|
|
|
+ this.fromss.contractId = ''
|
|
if (this.fromss.projectId) {
|
|
if (this.fromss.projectId) {
|
|
this.findContractByProjectId(this.fromss.projectId)
|
|
this.findContractByProjectId(this.fromss.projectId)
|
|
} else {
|
|
} else {
|
|
@@ -956,13 +882,18 @@ export default {
|
|
addKJ () {
|
|
addKJ () {
|
|
this.getProjectList()
|
|
this.getProjectList()
|
|
this.treeUser()
|
|
this.treeUser()
|
|
- this.$refs.crud.rowAdd()
|
|
|
|
this.fromss.projectAndUserList = []
|
|
this.fromss.projectAndUserList = []
|
|
this.fromss.projectId = ''
|
|
this.fromss.projectId = ''
|
|
this.fromss.userId = ''
|
|
this.fromss.userId = ''
|
|
this.fromss.contractId = ''
|
|
this.fromss.contractId = ''
|
|
this.fromss.roleIds = '' //合同段Id
|
|
this.fromss.roleIds = '' //合同段Id
|
|
this.contractData = [] //合同段枚举
|
|
this.contractData = [] //合同段枚举
|
|
|
|
+ // this.addData
|
|
|
|
+ this.$refs.crud.rowAdd()
|
|
|
|
+ if (this.addData.tenantId) {
|
|
|
|
+ // this.form.push(...this.addData)
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
addProject (type) {//确定添加参建项目
|
|
addProject (type) {//确定添加参建项目
|
|
if (type == 'add') {
|
|
if (type == 'add') {
|
|
@@ -1026,6 +957,19 @@ export default {
|
|
tag = false
|
|
tag = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ this.fromss.projectAndUserList.forEach((val) => {
|
|
|
|
+ if (val.projectId == this.fromss.projectId && val.contractId == this.fromss.contractId) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: "参与项目的合同段不能相同!"
|
|
|
|
+ })
|
|
|
|
+ tag = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (tag == false) return
|
|
|
|
+ })
|
|
|
|
+ if (tag == false) return
|
|
|
|
+
|
|
let tas = {
|
|
let tas = {
|
|
projectName: '',
|
|
projectName: '',
|
|
contractName: '',
|
|
contractName: '',
|
|
@@ -1043,7 +987,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.roleIdsData.forEach(val => {
|
|
this.roleIdsData.forEach(val => {
|
|
- if (val.roleId === this.fromss.contractId) {
|
|
|
|
|
|
+ if (val.roleId === this.fromss.roleIds) {
|
|
tas.roleName = val.roleName
|
|
tas.roleName = val.roleName
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -1051,10 +995,13 @@ export default {
|
|
projectId: this.fromss.projectId,
|
|
projectId: this.fromss.projectId,
|
|
contractId: this.fromss.contractId,
|
|
contractId: this.fromss.contractId,
|
|
roleId: this.fromss.roleIds,
|
|
roleId: this.fromss.roleIds,
|
|
- projectName: '',
|
|
|
|
- contractName: '',
|
|
|
|
- roleName: ''
|
|
|
|
|
|
+ projectName: tas.projectName,
|
|
|
|
+ contractName: tas.contractName,
|
|
|
|
+ roleName: tas.roleName
|
|
})
|
|
})
|
|
|
|
+ this.fromss.projectId = ''
|
|
|
|
+ this.fromss.contractId = ''
|
|
|
|
+ this.fromss.roleIds = ''
|
|
},
|
|
},
|
|
editKJ (row, index) {//编辑用户
|
|
editKJ (row, index) {//编辑用户
|
|
console.log(row);
|
|
console.log(row);
|
|
@@ -1068,7 +1015,7 @@ export default {
|
|
},
|
|
},
|
|
deleteProject (key, type) {//删除参建项目按钮
|
|
deleteProject (key, type) {//删除参建项目按钮
|
|
if (type == 'add') {
|
|
if (type == 'add') {
|
|
- delete this.fromss.projectAndUserList[key]
|
|
|
|
|
|
+ this.fromss.projectAndUserList.splice(this.fromss.projectAndUserList[key], 1)
|
|
} else {
|
|
} else {
|
|
this.removeUsersByIds(this.fromss.projectAndUserList[key].id)
|
|
this.removeUsersByIds(this.fromss.projectAndUserList[key].id)
|
|
}
|
|
}
|
|
@@ -1117,14 +1064,13 @@ export default {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
res.data.forEach(val => {
|
|
res.data.forEach(val => {
|
|
if (val.roleType) {
|
|
if (val.roleType) {
|
|
- val.roleName = val.roleName + ' | ' + val.roleType
|
|
|
|
|
|
+ val.roleName = val.roleType + ' | ' + val.roleName
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.fromss.projectAndUserList = res.data
|
|
this.fromss.projectAndUserList = res.data
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async saveUserInfoByProjectTow (da) {//编辑添加参建项目
|
|
async saveUserInfoByProjectTow (da) {//编辑添加参建项目
|
|
- console.log('ss');
|
|
|
|
const { data: res } = await saveUserInfoByProjectTow(da)
|
|
const { data: res } = await saveUserInfoByProjectTow(da)
|
|
console.log(res);
|
|
console.log(res);
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -1138,23 +1084,31 @@ export default {
|
|
|
|
|
|
//#region 甘云杰
|
|
//#region 甘云杰
|
|
nodeClick (data) {
|
|
nodeClick (data) {
|
|
|
|
+ this.addData = {
|
|
|
|
+ tenantId: data.id,
|
|
|
|
+ deptId: data.tenantId
|
|
|
|
+ }
|
|
this.treeDeptId = data.id;
|
|
this.treeDeptId = data.id;
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
this.onLoad(this.page);
|
|
this.onLoad(this.page);
|
|
},
|
|
},
|
|
initData (tenantId) {
|
|
initData (tenantId) {
|
|
- roletree(tenantId).then(res => {
|
|
|
|
- const column = this.findObject(this.option.group, "roleId");
|
|
|
|
- column.dicData = res.data.data;
|
|
|
|
- });
|
|
|
|
|
|
+ // roletree(tenantId).then(res => {
|
|
|
|
+ // const column = this.findObject(this.option.group, "roleId");
|
|
|
|
+ // column.dicData = res.data.data;
|
|
|
|
+ // });
|
|
|
|
+
|
|
|
|
+ //所属部门
|
|
getDeptTree(tenantId).then(res => {
|
|
getDeptTree(tenantId).then(res => {
|
|
const column = this.findObject(this.option.group, "deptId");
|
|
const column = this.findObject(this.option.group, "deptId");
|
|
column.dicData = res.data.data;
|
|
column.dicData = res.data.data;
|
|
});
|
|
});
|
|
- getPostList(tenantId).then(res => {
|
|
|
|
- const column = this.findObject(this.option.group, "postId");
|
|
|
|
- column.dicData = res.data.data;
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
+ // 所属岗位
|
|
|
|
+ // getPostList(tenantId).then(res => {
|
|
|
|
+ // const column = this.findObject(this.option.group, "postId");
|
|
|
|
+ // column.dicData = res.data.data;
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
submitRole () {
|
|
submitRole () {
|
|
const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
|
|
const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
|