提交 be8fca58 authored 作者: 黄志强's avatar 黄志强

修改

上级 45e18bbb
let baseUrl = "http://192.168.1.59:8289"; // 120.55.57.35 localhost 8289
let baseUrl = "https://workbook.zjtys.com.cn:8289"; // 120.55.57.35 localhost 8289
let env = process.env.VUE_APP_TITLE === 'alpha' ? 'alpha' : 'production';
switch (env) {
case 'production':
// baseUrl = "http://192.168.1.248:8090"; // 测试环境
baseUrl = "http://192.168.1.59:8289"; // 测试环境
baseUrl = "https://workbook.zjtys.com.cn:8289"; // 测试环境
break;
case 'alpha':
// baseUrl = "https://workbook.zjtys.com.cn"; // 阿里云环境
baseUrl = "http://192.168.1.59:8289"; // 阿里云环境
baseUrl = "https://workbook.zjtys.com.cn:8289"; // 阿里云环境
break;
}
// https://workbook.zjtys.com.cn:8289
......
......@@ -11,12 +11,24 @@
<el-form-item label="角色名称" prop="name">
<el-input v-model="roleForm.name" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="角色职位" prop="isLeader">
<el-radio-group v-model="roleForm.isLeader">
<el-radio label="0">部门领导</el-radio>
<el-radio label="1">普通员工</el-radio>
</el-radio-group>
</el-form-item>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="角色职位" prop="isLeader">
<el-radio-group v-model="roleForm.isLeader">
<el-radio label="0">部门领导</el-radio>
<el-radio label="1">普通员工</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="roleForm.isLeader === '0'" label="正副级" prop="isPlus">
<el-radio-group v-model="roleForm.isPlus">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="角色权限" prop="authorities">
<el-checkbox-group v-model="roleForm.authorities">
<el-checkbox v-for="(item,index) in authorityList" :label="item.id" :key="index">{{item.name}}</el-checkbox>
......@@ -57,6 +69,7 @@
description: '',
authorities: [],
departmentId: '',
isPlus: '',
},
rules:{
name: [
......@@ -68,6 +81,9 @@
isLeader: [
{ required: true, message: '请选择角色职位', trigger: 'change' }
],
isPlus: [
{ required: true, message: '请选择正副级', trigger: 'change' }
],
description: [
{ required: true, message: '请填写角色描述', trigger: 'blur' }
]
......@@ -135,6 +151,7 @@
this.roleForm.isLeader = '';
this.roleForm.description = '';
this.roleForm.authorities = [];
this.roleForm.isPlus = '';
this.$refs[val].resetFields();
this.$emit('close', false);
},
......@@ -154,6 +171,9 @@
console.log(arr)
let data = JSON.parse(JSON.stringify(this.roleForm));
data.authorities = arr;
if (data.isPlus !== '0' && data.isPlus !== '1') {
data.isPlus = null;
}
console.log(data)
console.log(this.dialogName)
if (this.dialogName === '修改角色') {
......
......@@ -152,6 +152,8 @@
closeConsumerDialog(val) {
if (val === '修改用户') {
this.getUser();
} else if (val === '新增用户') {
this.getUser();
}
this.showConsumerDialog = false;
},
......
......@@ -302,6 +302,13 @@
}
this.taskForm.workload = count;
}
},
content: function (val) {
if (val === '') {
this.contentTip = true;
} else {
this.contentTip = false;
}
}
},
//方法集合
......
......@@ -502,14 +502,15 @@
callback();
}
} else {
if (this.evaForm.score1 === '') {
//this.evaForm.score1 === ''
if (this.saveEvaScore.score1 === undefined || this.saveEvaScore.score1 === null || this.saveEvaScore.score1 === '') {
callback();
}
// else if (this.evaForm.score1 !== '' && this.evaForm.groupLeaderScore2 !== '') {
// console.log(22222222222)
// callback();
// }
else if (this.evaStatus !== '1' && this.evaStatus !== '2') {
else if (this.evaStatus !== '1' && this.evaStatus !== '2') {
callback();
}
else {
......@@ -543,6 +544,8 @@
callback();
} else if (!value) {
return callback(new Error('评分不能为空'));
} else if (this.saveEvaScore.directorScore2 !== '') {
callback();
}
}
// if ((this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1) || this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '4' || this.evaStatus === '5' || this.evaStatus === '6') {
......@@ -1409,9 +1412,20 @@
return false;
}
} else {
if (this.isEditEva === true && this.isExecutor === true) {
this.dialogTaskEvaVisible = false;
return false;
if (this.isEditEva === true && this.isExecutor === true && this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 &&
this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1 &&
this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) === -1 &&
this.taskForm.generalManagers !== undefined && this.taskForm.generalManagers.length > 0 && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) === -1) {
// if (this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1) {
// this.dialogTaskEvaVisible = false;
// return false;
// } else if (this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) === -1) {
// this.dialogTaskEvaVisible = false;
// return false;
// } else if (this.taskForm.generalManagers !== undefined && this.taskForm.generalManagers.length > 0 && this.taskForm.generalManagers.findIndex(item => item.id === this.userDetail.id) === -1) {
this.dialogTaskEvaVisible = false;
return false;
// }
}
// else if (this.isAudit === true && this.evaForm.groupLeaderScore2 !== '' && this.evaStatus === '3') {
// this.dialogTaskEvaVisible = false;
......@@ -1439,7 +1453,10 @@
// this.showGenTip = true;
} else if (this.taskForm.assistantManagers !== undefined && this.taskForm.assistantManagers.length > 0 && this.taskForm.assistantManagers.findIndex(item => item.id === this.userDetail.id) > -1) {
if (this.isAudit === false) {
if (this.evaStatus === '1' || this.evaStatus === '2' || this.evaStatus === '3') {
if (this.evaStatus === '1') {
this.dialogTaskEvaVisible = false;
return false;
} else if (this.evaStatus === '2' && this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) === -1){
this.dialogTaskEvaVisible = false;
return false;
} else if (this.evaStatus === '5') {
......@@ -1484,7 +1501,17 @@
let msgs = '';
if (this.evaStatus === '2') {
if (this.taskForm.majordomos !== undefined && this.taskForm.majordomos.length > 0 && this.taskForm.majordomos.findIndex(item => item.id === this.userDetail.id) > -1) {
if (this.saveEvaScore.directorScore2 !== '' && this.saveEvaScore.directorScore2 !== null && this.saveEvaScore.directorScore2 !== undefined) {
if (this.saveEvaScore.groupLeaderScore2 !== '' && this.saveEvaScore.groupLeaderScore2 !== null && this.saveEvaScore.groupLeaderScore2 !== undefined && this.saveEvaScore.directorScore2 !== '' && this.saveEvaScore.directorScore2 !== null && this.saveEvaScore.directorScore2 !== undefined) {
objs.score1 = objs.score1 + '';
objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
objs.directorScore2 = objs.directorScore2 + '';
msgs = '总监考评';
} else if ((this.saveEvaScore.groupLeaderScore2 === '' || this.saveEvaScore.groupLeaderScore2 === null || this.saveEvaScore.groupLeaderScore2 === undefined) && this.saveEvaScore.directorScore2 !== '' && this.saveEvaScore.directorScore2 !== null && this.saveEvaScore.directorScore2 !== undefined) {
objs.score1 = objs.score1 + '';
objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
objs.directorScore2 = objs.directorScore2 + '';
msgs = '组长考评';
} else if (this.saveEvaScore.directorScore2 !== '' && this.saveEvaScore.directorScore2 !== null && this.saveEvaScore.directorScore2 !== undefined) {
objs.score1 = objs.score1 + '';
objs.groupLeaderScore2 = objs.groupLeaderScore2 + '';
objs.directorScore2 = objs.directorScore2 + '';
......@@ -1744,20 +1771,11 @@
re: re
}
console.log(this.attachmentsArr);
this.$axios.postAttachmentWorkId(this.taskListData.workId, this.attachmentsArr).then((res) => {
console.log(res);
if (res.status === 200) {
this.withdrawTaskTextarea = '';
this.submitTaskTextarea = '';
this.attachmentsArr = [];
this.fileList = [];
this.$refs.upload.clearFiles();
}
})
this.$axios.putTaskStatus(obj).then((res) => {
console.log(res)
if (res.request.status === 200) {
// if (res.data.id !== undefined) {
if (this.attachmentsArr.length === 0) {
this.$axios.putTaskStatus(obj).then((res) => {
console.log(res)
if (res.request.status === 200) {
// if (res.data.id !== undefined) {
this.$message({
message: tip + '任务成功!',
type: 'success'
......@@ -1767,9 +1785,39 @@
this.dialogTaskSubmitVisible = false;
this.dialogTaskWithdrawVisible = false;
this.getDetailsTask(this.taskListData.workId);
// }
}
})
// }
}
})
} else {
this.$axios.postAttachmentWorkId(this.taskListData.workId, this.attachmentsArr).then((res) => {
console.log(res);
if (res.status === 200) {
this.withdrawTaskTextarea = '';
this.submitTaskTextarea = '';
this.attachmentsArr = [];
this.fileList = [];
this.$refs.upload.clearFiles();
this.$axios.putTaskStatus(obj).then((res) => {
console.log(res)
if (res.request.status === 200) {
// if (res.data.id !== undefined) {
this.$message({
message: tip + '任务成功!',
type: 'success'
});
this.submitTaskTextarea = '';
this.withdrawTaskTextarea = '';
this.dialogTaskSubmitVisible = false;
this.dialogTaskWithdrawVisible = false;
this.getDetailsTask(this.taskListData.workId);
// }
}
})
}
})
}
},
submitDeleteDialog() {
console.log(this.deleteCheck)
......@@ -1850,6 +1898,7 @@
},
breakDownTask() {
console.log(this.taskForm)
console.log(this.leaderOptions)
let arr = [];
if (this.taskForm.crewList !== null && this.taskForm.crewList.length > 0) {
console.log(this.taskForm.crewList[0].username);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论