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

修改

上级 6159e473
......@@ -495,3 +495,26 @@
border-bottom-color: #C0C4CC;
}
.el-tag {
background-color: #f3fdff;
border-color: #d9ecff;
font-size: 18px;
color: #5059D5;
}
.el-tooltip__popper.is-light {
font-size: 18px;
background: #FFF;
border: 1px solid #d1d1d1;/*no*/
box-shadow: 10px 10px 10px 1px #d1d1d1;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
color: #5059D5;
background-color: #FFF;
}
.el-tree-node__content>.el-tree-node__expand-icon {
padding: 6px;
margin-bottom:6px;
}
let baseUrl = "https://workbook.zjtys.com.cn:8289"; // 120.55.57.35 localhost 8289
let baseUrl = "http://192.168.1.12: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 = "https://workbook.zjtys.com.cn:8289"; // 测试环境
baseUrl = "http://192.168.1.12:8289"; // 测试环境
break;
case 'alpha':
// baseUrl = "https://workbook.zjtys.com.cn"; // 阿里云环境
baseUrl = "https://workbook.zjtys.com.cn:8289"; // 阿里云环境
baseUrl = "http://192.168.1.12:8289"; // 阿里云环境
break;
}
// https://workbook.zjtys.com.cn:8289
......
......@@ -291,8 +291,8 @@ const requests = {
method: 'get'
})
},
putPassword(data) { // 修改密码
return axios(ip + '/manage/user/password', {
putPassword(id, data) { // 修改密码
return axios(ip + '/manage/user/password/' + id, {
method: 'put',
data: data
})
......@@ -420,6 +420,12 @@ const requests = {
return axios(ip + '/attendance/approval/deleteWorkover/' + id, {
method: 'delete'
})
},
postLogData(data) {
return axios(ip + '/pas/log/findAllLogs', {
method: 'post',
data: data
})
}
};
......
......@@ -168,6 +168,7 @@
line-height: 40px;
position: relative;
font-size: 18px;
font-weight: bold;
margin-left: 0 !important;
color: #19152c;
}
......
......@@ -215,6 +215,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
}
......
......@@ -198,12 +198,16 @@
},
roleList: {
handler(val) {
console.log(val)
console.log(val);
val.forEach((v, i) => {
v.disabled = false;
})
this.roleLists = val;
}
},
editConsumer: {
handler(editConsumer) {
console.log(editConsumer)
if (JSON.stringify(editConsumer) !== '{}') {
let data = JSON.parse(JSON.stringify(editConsumer));
let roles = [];
......@@ -234,6 +238,9 @@
this.createForm.email = '';
this.createForm.entryTime = '';
this.createForm.roles = [];
this.roleLists.forEach((v, i) => {
v.disabled = false;
})
this.$emit('close', val);
},
// selectChange(e){
......
......@@ -37,7 +37,7 @@
export default {
name: "departmentAddDialog",
//import引入的组件需要注入到对象中才能使用
props: ['showDepartmentDialog', 'currrentId'],
props: ['showDepartmentDialog', 'currentId'],
components: {},
data () {
//这里存放数据
......@@ -65,7 +65,7 @@
immediate: true,
handler(showDepartmentDialog) {
this.dialogDepartmentAddVisible = showDepartmentDialog;
console.log(this.currrentId);
console.log(this.currentId);
}
},
},
......@@ -80,7 +80,7 @@
if (valid) {
console.log(this.departmentForm)
let data = JSON.parse(JSON.stringify(this.departmentForm));
data.parentId = this.currrentId;
data.parentId = this.currentId;
console.log(data)
this.$axios.postAddDepartment(data).then((res) => {
console.log(res);
......@@ -140,6 +140,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
}
......
......@@ -151,6 +151,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
}
......
......@@ -14,13 +14,13 @@
</span>
</div>
<div class="rightMenuDiv" style="">
<span>
<img class="menuImgs" v-show="!showSearch" src="../assets/images/nav-top-ss.png" title="搜索" style="cursor: pointer;" @click="showSearch = true"/>
<div v-show="showSearch" class="div-search">
<i class="search-icon" @click="openSearch()"></i>
<input type="text" v-model="searchHeader" id="searchVal" placeholder="请输入" class="in-search" @keyup.enter="openSearch()"/>
</div>
</span>
<!--<span>-->
<!--<img class="menuImgs" v-show="!showSearch" src="../assets/images/nav-top-ss.png" title="搜索" style="cursor: pointer;" @click="showSearch = true"/>-->
<!--<div v-show="showSearch" class="div-search">-->
<!--<i class="search-icon" @click="openSearch()"></i>-->
<!--<input type="text" v-model="searchHeader" id="searchVal" placeholder="请输入" class="in-search" @keyup.enter="openSearch()"/>-->
<!--</div>-->
<!--</span>-->
<span>
<img class="menuImgs" title="帮助" src="../assets/images/nav-top-wh.png" style="cursor: pointer">
</span>
......
......@@ -92,6 +92,10 @@
<img class="paramsImg" src="../assets/images/paramsIcon.png"/>
<span slot="title">参数配置</span>
</el-menu-item>
<el-menu-item class="rootMenuItem" v-if="authority.username === 'root'" index="logManage">
<img class="paramsImg" src="../assets/images/paramsIcon.png"/>
<span slot="title">日志管理</span>
</el-menu-item>
</div>
</el-menu>
</div>
......
......@@ -167,6 +167,7 @@
line-height: 40px;
position: relative;
font-size: 18px;
font-weight: bold;
margin-left: 0 !important;
color: #19152c;
}
......
......@@ -278,6 +278,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
}
......
......@@ -8,11 +8,14 @@
</div>
<div class="passDiv">
<el-form :hide-required-asterisk="true" :model="passwordForm" :rules="rules" ref="passwordForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="原密码" prop="old">
<el-input v-model="passwordForm.old" placeholder="请输入原密码"></el-input>
</el-form-item>
<el-form-item label="新密码" prop="new">
<el-input v-model="passwordForm.new" placeholder="请输入新密码"></el-input>
<el-input v-model="passwordForm.new" show-password placeholder="请输入新密码"></el-input>
</el-form-item>
<el-form-item label="确认密码" prop="confirm">
<el-input v-model="passwordForm.confirm" placeholder="请输入确认密码"></el-input>
<el-input v-model="passwordForm.confirm" show-password placeholder="请输入确认密码"></el-input>
</el-form-item>
</el-form>
</div>
......@@ -33,7 +36,9 @@
components: {},
data () {
// let validateOld=(rule, value, callback)=>{
// if (value !== this.userDetail.password) {
// if (value === '') {
// callback(new Error('请输入原密码'));
// } else if (value !== this.userDetail.password) {
// callback(new Error('密码错误,请重新输入!'));
// } else{
// callback();
......@@ -41,10 +46,12 @@
// };
let validateNew = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入密码'));
}else if (value === this.passwordForm.old){
callback(new Error('新密码不能和旧密码相同!'));
} else {
callback(new Error('请输入新密码'));
}
// else if (value === this.passwordForm.old){
// callback(new Error('新密码不能和旧密码相同!'));
// }
else {
if (this.passwordForm.confirm != '') {
this.$refs.passwordForm.validateField('confirm');
}
......@@ -53,9 +60,9 @@
};
let validateConfirm = (rule, value, callback) => {
if (value === "") {
callback(new Error("请再次输入密码"));
} else if (value !== this.passwordForm.confirm) {
callback(new Error("两次输入密码不一致!"));
callback(new Error("请输入确认密码"));
} else if (value !== this.passwordForm.new) {
callback(new Error("确认密码和新密码不一致!"));
} else {
callback();
}
......@@ -74,8 +81,8 @@
// { required: true, message: '请输入新密码', trigger: 'blur' },
],
old: [
// { validator: validateOld, trigger: 'blur' }
{ required: true, message: '请输入当前密码', trigger: 'blur' },
// { validator: validateOld, trigger: 'blur' },
{ required: true, message: '请输入密码', trigger: 'blur' },
],
confirm: [
{ validator: validateConfirm, trigger: 'blur' }
......@@ -105,24 +112,25 @@
this.$refs[val].validate((valid) => {
if (valid) {
let data = JSON.parse(this.$Base64.decode(localStorage.getItem('login')));
data.password = this.passwordForm.confirm;
this.$axios.putPassword(data).then((res) => {
data.password = this.passwordForm.confirm.trim();
let old = this.passwordForm.old.trim();
this.$axios.putPassword(old, data).then((res) => {
console.log(res)
if (res.status === 200) {
this.$message({
message: '修改密码成功!',
type: 'success'
});
this.$emit('close', false);
let that = this;
setTimeout(function () {
that.$axios.getLogout().then(res => { // 登出
if (res.data.code === 200) {
that.$router.push({name: 'login'});
localStorage.clear();
}
})
}, 500)
// this.$message({
// message: '修改密码成功!',
// type: 'success'
// });
// this.$emit('close', false);
// let that = this;
// setTimeout(function () {
// that.$axios.getLogout().then(res => { // 登出
// if (res.data.code === 200) {
// that.$router.push({name: 'login'});
// localStorage.clear();
// }
// })
// }, 500)
}
})
} else {
......@@ -178,7 +186,7 @@
.passDiv{
width: 50%;
margin: 200px auto;
margin: 150px auto;
}
.dialogBtns{
......@@ -209,6 +217,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
}
</style>
......@@ -16,8 +16,8 @@
<img v-show="listDetails.status === '1'" class="statusImg" src="../assets/images/statusNormal.png"/>
</div>
<div class="nameDiv">
<div class="nameStyle">{{listDetails.username}}</div>
<div class="jobStyle">{{listDetails.jobs}}</div>
<div class="nameStyle"><span class="personSpan">姓名</span>{{listDetails.username}}</div>
<div class="jobStyle"><span class="personSpan">岗位</span>{{listDetails.jobs}}</div>
</div>
</div>
<div class="elDiv">
......@@ -147,6 +147,7 @@
.detailTop{
height: 320px;
margin-top: 50px;
font-family: Alibaba;
/*line-height: 320px;*/
}
......@@ -162,8 +163,8 @@
background-image: url("../assets/images/personPhoto.png");
background-repeat: no-repeat;
background-size: 100% 100%;
margin-right: 160px;
margin-left: -180px;
margin-right: 140px;
margin-left: -20px;
position: relative;
}
......@@ -180,18 +181,35 @@
}
.nameDiv{
text-align: center;
text-align: left;
}
/*.nameStyle{*/
/*color: #5059D5;*/
/*font-size: 30px;*/
/*}*/
/*.jobStyle{*/
/*color: #19152C;*/
/*font-size: 20px;*/
/*margin-top: 30px;*/
/*}*/
.nameDiv .personSpan{
display: inline-block;
margin-right: 30px;
font-size: 30px;
color: #19152c;
}
.nameStyle{
color: #5059D5;
color: #5059d5;
font-size: 30px;
}
.jobStyle{
color: #19152C;
font-size: 20px;
color: #5059d5;
margin-top: 30px;
font-size: 30px;
}
.elDiv{
......
......@@ -280,6 +280,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
}
......
......@@ -173,6 +173,12 @@ const routes = [
name: 'departmentManage',
meta: ['root'],
component: () => import(/* webpackChunkName: "home" */ '../views/root/DepartmentManage.vue')
},
{
path: '/logManage',
name: 'logManage',
meta: ['root'],
component: () => import(/* webpackChunkName: "home" */ '../views/root/LogManage.vue')
}
]
},
......
......@@ -24,6 +24,7 @@
</el-table-column>
<el-table-column
prop="des"
show-overflow-tooltip
label="反馈内容">
</el-table-column>
</el-table>
......@@ -130,4 +131,8 @@
border-radius: 10px;
background: #FFF;
}
/deep/ .el-tooltip__popper {
padding: 10px 10px 10px 20px;
}
</style>
......@@ -30,8 +30,8 @@
let pwd = this.psd;
if (user !== '' && pwd !== '') {
let name = {
username: user,
password: pwd
username: user.trim(),
password: pwd.trim()
};
console.log(name)
// if (name.username === '1') {
......@@ -70,9 +70,10 @@
},
// 提示框
modal (msg) {
this.$alert(msg, '提示', {
confirmButtonText: '确定'
});
this.$message.error(msg);
// this.$alert(msg, '提示', {
// confirmButtonText: '确定',
// });
// this.$Modal.warning({
// title: '提示',
// content: '<p>' + msg + '</p>'
......
......@@ -45,8 +45,8 @@
</el-col>
<el-col :span="12">
<div class="nameDiv">
<div class="nameStyle">{{userForm.username}}</div>
<div class="jobStyle">{{userForm.jobs}}</div>
<div class="nameStyle ptp100"><span class="personSpan">姓名</span>{{userForm.username}}</div>
<div class="nameStyle jobStyle"><span class="personSpan">岗位</span>{{userForm.jobs}}</div>
</div>
<el-form-item class="first" prop="email" label="邮箱">
<el-input v-model="userForm.email"></el-input>
......@@ -188,6 +188,7 @@
console.log(val)
let name = '';
console.log(this.deOptions)
if (this.deOptions.length > 0) {
for ( let i = 0; i < this.deOptions.length; i++ ) {
for (let j = 0; j < val.length; j++) {
if (this.deOptions[i].id === val[j]) {
......@@ -196,6 +197,9 @@
}
}
name = name.substring(0, name.length - 1);
} else {
name = '无';
}
console.log(name);
return name;
},
......@@ -362,15 +366,23 @@
height: 242px;
}
.nameDiv .personSpan{
display: inline-block;
margin-right: 30px;
font-size: 30px;
color: #19152c;
}
.nameStyle{
color: #5059D5;
color: #5059d5;
font-size: 30px;
padding-top: 100px;
}
.ptp100{
padding-top: 100px;
}
.jobStyle{
color: #19152C;
font-size: 20px;
color: #5059d5;
margin-top: 30px;
}
......@@ -379,7 +391,7 @@
vertical-align: middle;
float: none;
font-size: 18px;
color: #606266;
color: #787682;
line-height: 40px;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
......@@ -391,6 +403,8 @@
position: relative;
font-size: 14px;
margin-left: 0 !important;
color: #19152c;
font-weight: bold;
}
.formDiv{
......@@ -411,7 +425,8 @@
border: 1px solid #DCDFE6;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #606266;
color: #19152c;
font-weight: bold;
display: inline-block;
font-size: 18px;
height: 40px;
......
......@@ -232,6 +232,7 @@
line-height: 40px;
position: relative;
font-size: 18px;
font-weight: bold;
margin-left: 0 !important;
}
......
......@@ -66,7 +66,10 @@
align="center">
<template slot-scope="scope">
<el-button @click="openDetails(scope.row)" type="text" size="small">编辑<i class="el-icon-edit-outline"></i></el-button>
<el-button style="background: #EE4B4C" @click="deleteUSer(scope.row)" type="text" size="small">删除<i class="el-icon-delete"></i></el-button>
<el-popconfirm title="确定删除吗?" @onConfirm="deleteUSer(scope.row)">
<el-button slot="reference" style="background: #EE4B4C" type="text" size="small">删除<i class="el-icon-delete"></i></el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
......@@ -113,6 +116,7 @@
console.log(this.searchHuman)
},
deleteUSer(val) {
console.log(val)
this.$axios.deleteUsers(val.id).then((res) => {
console.log(res);
if (res.request.status === 200) {
......@@ -160,15 +164,17 @@
openDetails(val) {
console.log(val)
this.doName = '修改用户';
let data = JSON.parse(JSON.stringify(val));
this.editConsumer = data;
this.showConsumerDialog = true;
this.editConsumer = val;
// localStorage.setItem('adminUser', this.$Base64.encode(JSON.stringify(val)));
// this.$router.push({name: 'consumerDetails'});
},
findDeparts(val) {
// console.log(val)
// console.log(this.departList)
let name
let name = '';
if (val !== null && val !== undefined) {
for (let i = 0; i <this.departList.length; i++) {
for (let j = 0; j < val.length; j++) {
if (val[j] === this.departList[i].id) {
......@@ -176,11 +182,12 @@
}
}
}
}
return name;
// let ret1 = this.departList.find((value, index, arr) => {
// return value.id === val;
// })
// console.log(ret1)
return name
},
getAllDepartmentList() {
this.$axios.getAllDepartment().then((res) => {
......
......@@ -101,7 +101,7 @@
<!--</el-col>-->
<!--</el-row>-->
<!--</div>-->
<add-dialog :showDepartmentDialog="showDepartmentDialog" :currrentId="currentDepartment.id" @close="closeDialog"></add-dialog>
<add-dialog :showDepartmentDialog="showDepartmentDialog" :currentId="currentDepartment.id" @close="closeDialog"></add-dialog>
</div>
</template>
......@@ -158,6 +158,7 @@
methods: {
openDialog() {
this.showDepartmentDialog = true;
this.currentDepartment = JSON.parse(JSON.stringify(this.companyData))
},
closeDialog() {
this.showDepartmentDialog = false;
......@@ -364,6 +365,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
}
......
<!-- 日志管理 -->
<template>
<div class='logManage'>
<div class="logHeader">
<el-date-picker
v-model="time"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
:editable="false"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
@change="timeChange"
end-placeholder="结束时间">
</el-date-picker>
</div>
<div>
<el-table
v-loading="loading"
:data="logList"
style="width: 100%">
<el-table-column
prop="userName"
align="center"
label="姓名">
</el-table-column>
<el-table-column
prop="logTime"
align="center"
label="时间">
</el-table-column>
<el-table-column
prop="description"
align="center"
show-overflow-tooltip
label="操作">
</el-table-column>
</el-table>
</div>
<div class="pageClass">
<el-pagination
hide-on-single-page
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</div>
</template>
<script>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
export default {
name: "logManage",
//import引入的组件需要注入到对象中才能使用
components: {},
data () {
//这里存放数据
return {
loading: false,
time: '',
logList: [],
currentPage: 1,
pageSize: 10,
total: 0
};
},
//监听属性 类似于data概念
computed: {},
//监控data中的数据变化
watch: {},
//方法集合
methods: {
getLog() {
let start = '';
let end = '';
if (this.time[0] !== undefined) {
start = this.time[0];
} else {
start = null;
}
if (this.time[1] !== undefined) {
end = this.time[1];
} else {
end = null;
}
let obj = {
currentPage: this.currentPage,
startTime: start,
endTime: end,
pageSize: 10,
totalCount: null
}
console.log(obj)
this.$axios.postLogData(obj).then((res) => {
console.log(res)
this.loading = false;
this.logList = res.data.rows;
this.total = res.data.totalCount;
})
},
timeChange(val) {
console.log(val)
this.currentPage = 1;
this.time = val;
this.getLog();
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
this.currentPage = val;
this.getLog();
// console.log(`当前页: ${val}`);
},
},
//生命周期 - 创建完成(可以访问当前this实例)
created () {
},
//生命周期 - 挂载完成(可以访问DOM元素)
mounted () {
let data = this.$common.timeYMDFilter(new Date());
this.time = [data + ' ' + '00:00:00', data + ' ' + '23:59:59'];
let that = this;
setTimeout(function () {
that.getLog();
}, 100)
},
beforeCreate () {
}, //生命周期 - 创建之前
beforeMount () {
}, //生命周期 - 挂载之前
beforeUpdate () {
}, //生命周期 - 更新之前
updated () {
}, //生命周期 - 更新之后
beforeDestroy () {
}, //生命周期 - 销毁之前
destroyed () {
}, //生命周期 - 销毁完成
activated () {
}, //如果页面有keep-alive缓存功能,这个函数会触发
}
</script>
<style scoped>
.logManage{
}
.logHeader{
margin: 15px 0px;
}
/deep/ .el-date-editor .el-range__icon {
font-size: 14px;
margin-left: -5px;
color: #C0C4CC;
float: left;
line-height: 32px;
margin-bottom: 0px;
}
/deep/ .el-date-editor .el-range-separator {
padding: 0 5px;
line-height: 32px;
width: 5%;
color: #303133;
margin-bottom: 1px;
}
/deep/ .el-date-editor .el-range__close-icon {
font-size: 14px;
color: #C0C4CC;
width: 25px;
display: inline-block;
float: right;
line-height: 30px;
}
.pageClass {
text-align: center;
position: fixed;
bottom:25px;
left:0;
right:0;
width: 500px;
margin-left: 44%;
}
</style>
......@@ -528,6 +528,7 @@
line-height: 40px;
position: relative;
font-size: 14px;
font-weight: bold;
margin-left: 0 !important;
color: #5059D5;
}
......
......@@ -3,18 +3,56 @@
<div class='addTask'>
<div class="addHeader">
<ul>
<li>发布者:{{announcer}}</li>
<li style="font-weight: bold;">发布者:{{announcer}}</li>
<li class="addRightBtn">
<!--<div >-->
<el-button type="primary" @click="submitForm('taskForm','unpublished')"><span><img class="addImgs" src="../../assets/images/saveIcon.png"/></span>保存</el-button>
<el-button style="margin-left: 50px;" type="primary" @click="submitForm('taskForm', 'ongoing')"><span><img class="addImgs" src="../../assets/images/pushIcon.png"/></span>发布</el-button>
<!--</div>-->
</li>
</ul>
</div>
<!--<div class="addRightBtn">-->
<!--<el-button type="primary" @click="submitForm('taskForm','unpublished')"><span><img class="addImgs" src="../../assets/images/saveIcon.png"/></span>保存</el-button>-->
<!--<el-button style="margin-left: 50px;" type="primary" @click="submitForm('taskForm', 'ongoing')"><span><img class="addImgs" src="../../assets/images/pushIcon.png"/></span>发布</el-button>-->
<!--</div>-->
<div>
<el-form :model="taskForm" :rules="rules" ref="taskForm" label-width="130px" class="demo-ruleForm">
<div style="margin-bottom: 20px;">
<div class="addTips">
<img src="../../assets/images/tipMust.png"/>为必填项
</div>
<div class="showMainTaskDetail" v-show="saveStoreTaskDetailValue !== '' && saveStoreTaskDetailValue !== undefined">
<el-form-item label="主任务名称">
<!--<div style="cursor: pointer;">-->
<el-tooltip placement="bottom" effect="light">
<div slot="content">
<ul class="mainTaskTip">
<li><span class="tipSpan">主任务名称:</span>{{saveStoreTaskDetailValue.title}}</li>
<li><span class="tipSpan">任务开始时间:</span>{{saveStoreTaskDetailValue.stateTime}}</li>
<li><span class="tipSpan">预计完成时间:</span>{{saveStoreTaskDetailValue.completeTime}}</li>
<li><span class="tipSpan">总任务量:</span>{{saveStoreTaskDetailValue.workloadCount}}</li>
</ul>
</div>
<span style="cursor:pointer;border-bottom: 1px solid #5059d5">{{saveStoreTaskDetailValue.title}}</span>
</el-tooltip>
<!--</div>-->
</el-form-item>
<!--<el-popover-->
<!--placement="bottom"-->
<!--width="400"-->
<!--trigger="click">-->
<!--<div>-->
<!--<ul>-->
<!--<li>主任务名称:{{saveStoreTaskDetailValue.title}}</li>-->
<!--<li>任务开始时间:{{saveStoreTaskDetailValue.stateTime}}</li>-->
<!--<li>预计完成时间:{{saveStoreTaskDetailValue.completeTime}}</li>-->
<!--<li>总任务量:{{saveStoreTaskDetailValue.workloadCount}}</li>-->
<!--</ul>-->
<!--</div>-->
<!--<el-button>主任务名称:</el-button>-->
<!--</el-popover>-->
</div>
<el-row :gutter="30">
<el-col :span="8">
<el-form-item label="任务名称" prop="title">
......@@ -30,7 +68,7 @@
<el-option
v-for="item in leaderOptions"
:key="item.id"
:label="item.username"
:label="item.username + '(' + $common.personStatusName(item.status) + ')'"
:value="item.id">
<span style="display: inline-block;width: 70px;">{{item.username}}</span>
<span :style="{color: $common.colorNum(item.status)}">({{$common.personStatusName(item.status)}})</span>
......@@ -53,8 +91,8 @@
<el-form-item label="预计完成时间" prop="completeTime">
<el-date-picker :clearable="false" :picker-options="pickerOptionsComplete" :editable="false" default-time="09:00:00" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择日期" v-model="taskForm.completeTime" style="width: 100%;"></el-date-picker>
</el-form-item>
<el-form-item label="审核者" prop="review">
<el-select v-if="showAuditName === false" style="width: 100%;" v-model="taskForm.audit" placeholder="请选择审核者">
<el-form-item v-if="showAuditName === false" label="审核者" prop="audit">
<el-select style="width: 100%;" v-model="taskForm.audit" placeholder="请选择审核者">
<el-option
v-for="item in auditOptions"
:key="item.id"
......@@ -66,6 +104,9 @@
</el-select>
<span v-if="showAuditName === true">{{userLoginData.username}}</span>
</el-form-item>
<el-form-item v-if="showAuditName === true" label="审核者" >
<span>{{userLoginData.username}}</span>
</el-form-item>
</el-col>
</el-row>
<div>
......@@ -283,13 +324,47 @@
this.taskForm.workload = count;
}
},
'taskForm.stateTime': function(val) {
console.log(val)
let count;
if (val !== '' && val !== null && this.taskForm.completeTime !== '' && this.taskForm.stateTime !== null) {
let a1 = Date.parse(val);
let a2 = Date.parse(this.taskForm.completeTime);
console.log(a1, a2)
console.log(a2-a1);
count = Math.ceil((a2-a1)/ (1000 * 60 * 60 * 24)) + 1;//核心:时间戳相减,然后除以天数
console.log(count)
if (this.taskForm.executor !== '') {
if (this.taskForm.crewList.length > 0) {
console.log(this.taskForm.executor,this.taskForm.crewList)
let crew = [...this.taskForm.crewList];
let index = crew.indexOf(this.taskForm.executor);
console.log(index)
if (index > -1) {
crew.splice(index, 1);
}
console.log(crew.length)
count = (1 + crew.length) * count;
console.log(count)
}
}
this.taskForm.workload = count;
}
},
'taskForm.crewList': function(val) {
console.log(val)
if (this.taskForm.completeTime !== '' && this.taskForm.completeTime !== null) {
let count = JSON.parse(JSON.stringify(this.taskForm.workload));
// let count = JSON.parse(JSON.stringify(this.taskForm.workload));
let a1 = Date.parse(this.taskForm.stateTime);
let a2 = Date.parse(this.taskForm.completeTime);
console.log(a1, a2)
console.log(a2-a1);
let count = Math.ceil((a2-a1)/ (1000 * 60 * 60 * 24)) + 1;//核心:时间戳相减,然后除以天数
console.log(count)
if (this.taskForm.executor !== '') {
if (val.length > 0) {
let crew = [...val];
console.log(crew)
let index = crew.indexOf(this.taskForm.executor);
console.log(index)
if (index > -1) {
......@@ -331,6 +406,7 @@
if (res.request.status === 200) {
this.showAuditName = false;
if (JSON.stringify(this.$store.getters.getSuperior.superior) !== '{}' && JSON.stringify(this.$store.getters.getSuperior.superior) !== undefined) {
console.log(this.$store.getters.getSuperior.superior)
this.saveStoreTaskDetailValue = this.$store.getters.getSuperior.superior;
this.taskForm.title = this.$store.getters.getSuperior.superior.title;
this.showAuditName = true;
......@@ -503,6 +579,23 @@
this.$store.commit('changeSuperior', {
superior: {}
})
let obj = {};
if (JSON.stringify(this.$store.getters.getSuperior.superior) !== '{}' && JSON.stringify(this.$store.getters.getSuperior.superior) !== undefined) {
obj = {
active: 'three',
page: 1,
url: 'addTask'
}
} else {
obj = {
active: 'four',
page: 1,
url: 'addTask'
}
}
this.$store.commit('changeSaveView', {
saveView: obj
})
let tip;
if(sta === 'ongoing') {
tip = '发布任务';
......@@ -619,7 +712,7 @@
},
//生命周期 - 挂载完成(可以访问DOM元素)
mounted () {
this.taskForm.stateTime = this.$common.timeYMDHMSFilter(new Date());
this.taskForm.stateTime = this.$common.timeYMDFilter(new Date()) + ' ' + '09:00:00';
console.log(this.$store.getters.getLoginData.loginData)
if (this.$store.getters.getLoginData.loginData !== undefined) {
this.userLoginData = this.$store.getters.getLoginData.loginData;
......@@ -663,13 +756,17 @@
}
.addRightBtn{
/*width: 76%;*/
position: fixed;
/*bottom: 25px;*/
right: 80px;
z-index: 1000;
/*margin: 0 auto;*/
/*text-align: center;*/
}
.addHeader{
line-height: 60px;
line-height: 40px;
border-bottom: 1px solid #5059D5;
margin-bottom: 20px;
}
......@@ -711,6 +808,7 @@
line-height: 40px;
position: relative;
font-size: 18px;
/*font-weight: bold;*/
margin-left: 0 !important;
}
......@@ -833,4 +931,21 @@
vertical-align: middle;
margin-right: 5px;
}
.mainTaskTip li{
line-height: 40px;
font-size: 18px;
color: #19152c;
}
.mainTaskTip .tipSpan{
display: inline-block;
width: 130px;
}
.addTips{
margin-bottom: 20px;
color: #F6302E;
font-size: 18px;
}
</style>
......@@ -87,7 +87,7 @@
</el-row>
<div>
<el-form-item label="任务时间轴:">
<el-steps :active="timelines" finish-status="success">
<el-steps :active="timelines" style="font-weight: normal;" finish-status="success">
<!--<el-step icon="el-icon-time" title="任务创建时间" :description="taskForm.createTime"></el-step>-->
<el-step v-for="(item,index) in timelineList" :key="index" :class="[{returnTimeLine: isTimeLineReturn === true && index === timelines && item.name === '任务提交时间'}, {returnTimeLineLeft: isTimeLineReturn === true && index === timelines - 1 && taskForm.status === 'ongoing'}]" :title="item.name" :description="item.des"></el-step>
<!--<el-step title="任务开始时间" :description="taskForm.stateTime"></el-step>-->
......@@ -141,7 +141,7 @@
</el-form-item>
</el-form>
</div>
<div style="text-align: center;width: 90%;height: 10%;margin: 15px auto;padding-bottom:30px;clear:both;">
<div class="detailBtns">
<el-button v-show="((isPublisher === true || isAudit === true) && (taskForm.status === 'audit' || taskForm.status === 'ongoing')) || (isFinishCanEdit === true && taskForm.status === 'finished')" type="primary" @click="openChangeTaskDialog('taskForm')">保存修改</el-button>
<el-button style="float: right;" v-show="isExecutor === true && taskForm.status === 'ongoing' && isCanSubmit === true" type="primary" @click="openSubmitTaskDialog()">完成任务</el-button>
<el-button style="clear: both;" v-show="isExecutor === true && isCanBreakDown && taskForm.status === 'ongoing' && isWorkLoadClear === false" type="primary" @click="breakDownTask()">分解任务</el-button>
......@@ -398,6 +398,7 @@
row-key="workId"
border
default-expand-all
@row-click="clickMainTaskItem"
:tree-props="{children: 'workMppings', hasChildren: 'hasChildren'}">
<el-table-column
prop="title"
......@@ -808,7 +809,8 @@
{name: '任务完结时间', des: ''}
],
isTimeLineReturn: false,
saveEvaScore: '' // 保存获取的考评信息
saveEvaScore: '', // 保存获取的考评信息
saveDetailTask: '',
};
},
//监听属性 类似于data概念
......@@ -874,7 +876,7 @@
} else {
if (this.$store.getters.getSaveView.saveView !== undefined) {
let data = this.$store.getters.getSaveView.saveView;
data.url = 'taskDetails'
data.url = 'taskDetails';
this.$store.commit('changeSaveView', {
saveView: data
})
......@@ -905,6 +907,7 @@
this.$axios.getWorkDetails(val).then((res) => {
console.log(res)
if (res.request.status === 200) {
this.saveDetailTask = JSON.parse(JSON.stringify(res.data));
let postData = JSON.parse(JSON.stringify(res.data));
if ((postData.workCoefficient.toString()).indexOf(".") > -1) {
postData.workCoefficient = (Math.round(postData.workCoefficient*100)/100) * 100;
......@@ -1179,6 +1182,15 @@
{name: '预计完成时间', des: this.taskForm.completeTime},
{name: '任务完结时间', des: this.taskForm.endTime}
];
if (Date.parse(this.taskForm.endTime) < Date.parse(this.taskForm.completeTime)) {
timeList = [
{name: '任务开始时间', des: this.taskForm.stateTime},
{name: '任务提交时间', des: this.taskForm.submitTime},
{name: '任务审核时间', des: this.taskForm.auditTime},
{name: '任务完结时间', des: this.taskForm.endTime},
{name: '预计完成时间', des: this.taskForm.completeTime},
];
}
}
}
} else if (this.taskForm.status === 'delete'){
......@@ -1305,7 +1317,7 @@
this.dialogTaskMainVisible = true;
},
openHistory() {
this.$axios.getTaskHistory(this.taskListData.workId).then((res) => {
this.$axios.getTaskHistory(this.taskForm.id).then((res) => {
console.log(res)
if (res.request.status === 200) {
this.historyDatas = res.data;
......@@ -1361,6 +1373,15 @@
} else {
newData.score2 = '';
}
if (newData.directorScore2 !== '' && newData.directorScore2 !== null) {
newData.score2 = parseInt(res.data.directorScore2);
}
if (newData.viceScore3 !== '' && newData.viceScore3 !== null) {
newData.score2 = parseInt(res.data.viceScore3);
}
if (newData.justScore4 !== '' && newData.justScore4 !== null) {
newData.score2 = parseInt(res.data.justScore4);
}
this.evaForm = newData;
// if (this.isExecutor === true) {
if (res.data.score1 !== '') {
......@@ -1391,7 +1412,7 @@
if (this.isExecutor === true) {
let obj = JSON.parse(JSON.stringify(this.evaForm));
obj.score1 = obj.score1 + '';
obj.workId = this.taskListData.workId;
obj.workId = this.taskForm.id;
obj.userId = this.userDetail.id;
obj.endWorkLoad = this.taskForm.workload;
console.log(obj)
......@@ -1404,7 +1425,7 @@
});
this.$refs[formName].resetFields();
this.dialogTaskEvaVisible = false;
this.getDetailsTask(this.taskListData.workId);
this.getDetailsTask(this.taskForm.id);
}
})
} else {
......@@ -1590,8 +1611,8 @@
});
// this.$refs['evaForm'].resetFields();
this.dialogTaskEvaVisible = false;
console.log(this.taskListData.workId)
this.getDetailsTask(this.taskListData.workId);
console.log(this.taskForm.id)
this.getDetailsTask(this.taskForm.id);
}
})
} else {
......@@ -1601,8 +1622,8 @@
});
// this.$refs['evaForm'].resetFields();
this.dialogTaskEvaVisible = false;
console.log(this.taskListData.workId)
this.getDetailsTask(this.taskListData.workId);
console.log(this.taskForm.id)
this.getDetailsTask(this.taskForm.id);
}
}
})
......@@ -1706,7 +1727,7 @@
"userid": this.userDetail.id,
"users": this.taskForm.crewList,
'workload': this.taskForm.workload,
"workId": this.taskListData.workId
"workId": this.taskForm.id
}
console.log(obj)
this.$axios.putTaskGroup(obj).then((res) => {
......@@ -1720,7 +1741,7 @@
// }
this.changeTaskTextarea = '';
this.dialogTaskChangeVisible = false;
this.getDetailsTask(this.taskListData.workId);
this.getDetailsTask(this.taskForm.id);
}
})
} else if (this.taskForm.status === 'audit' || this.taskForm.status === 'finished') {
......@@ -1729,7 +1750,7 @@
"userId": this.userDetail.id,
"workCoefficient": parseFloat(this.taskForm.workCoefficient),
"workload": this.taskForm.workload,
"workId": this.taskListData.workId
"workId": this.taskForm.id
}
this.$axios.putTaskWorkload(obj).then((res) => {
console.log(res)
......@@ -1742,7 +1763,7 @@
}
this.changeTaskTextarea = '';
this.dialogTaskChangeVisible = false;
this.getDetailsTask(this.taskListData.workId);
this.getDetailsTask(this.taskForm.id);
}
})
}
......@@ -1767,7 +1788,7 @@
msg: msg,
status: val,
userId: this.userDetail.id,
workId: this.taskListData.workId,
workId: this.taskForm.id,
re: re
}
console.log(this.attachmentsArr);
......@@ -1784,12 +1805,12 @@
this.withdrawTaskTextarea = '';
this.dialogTaskSubmitVisible = false;
this.dialogTaskWithdrawVisible = false;
this.getDetailsTask(this.taskListData.workId);
this.getDetailsTask(this.taskForm.id);
// }
}
})
} else {
this.$axios.postAttachmentWorkId(this.taskListData.workId, this.attachmentsArr).then((res) => {
this.$axios.postAttachmentWorkId(this.taskForm.id, this.attachmentsArr).then((res) => {
console.log(res);
if (res.status === 200) {
this.withdrawTaskTextarea = '';
......@@ -1810,7 +1831,7 @@
this.withdrawTaskTextarea = '';
this.dialogTaskSubmitVisible = false;
this.dialogTaskWithdrawVisible = false;
this.getDetailsTask(this.taskListData.workId);
this.getDetailsTask(this.taskForm.id);
// }
}
})
......@@ -1828,7 +1849,7 @@
msg: this.deleteTextarea,
personalWorkload: pw,
userId: this.userDetail.id,
workId: this.taskListData.workId,
workId: this.taskForm.id,
workloadCount: wc
}
console.log(obj)
......@@ -1853,7 +1874,7 @@
let obj = {
msg: this.failTaskTextarea,
status: val,
workId: this.taskListData.workId,
workId: this.taskForm.id,
userId: this.userDetail.id,
re: '2'
}
......@@ -1863,7 +1884,7 @@
message: '审核不通过!',
type: 'success'
});
this.getDetailsTask(this.taskListData.workId);
this.getDetailsTask(this.taskForm.id);
this.dialogTaskFailVisible = false;
this.failTaskTextarea = '';
})
......@@ -1877,7 +1898,7 @@
let obj = {
msg: '',
status: val,
workId: this.taskListData.workId,
workId: this.taskForm.id,
userId: this.userDetail.id,
re: ''
}
......@@ -1887,7 +1908,7 @@
message: '审核通过!',
type: 'success'
});
this.getDetailsTask(this.taskListData.workId);
this.getDetailsTask(this.taskForm.id);
})
}
} else {
......@@ -2059,6 +2080,20 @@
localStorage.setItem('taskDetail', this.$Base64.encode(JSON.stringify(data)));
this.$router.push({name: 'taskDetails'});
},
clickMainTaskItem(val) {
console.log(val)
if (val.workId === this.taskForm.id) {
this.$message({
message: '当前显示的任务详情为点击的任务详情!',
type: 'warning'
});
return false;
} else {
this.getUserById(this.userDetail.id);
this.getDetailsTask(val.workId);
this.dialogTaskMainVisible = false;
}
}
},
//生命周期 - 创建完成(可以访问当前this实例)
created () {
......@@ -2261,7 +2296,7 @@
/*text-align: center;*/
vertical-align: middle;
/*float: none;*/
width: 100px;
width: 110px;
font-size: 18px;
color: #787682;
line-height: 40px;
......@@ -2276,6 +2311,7 @@
font-size: 18px;
margin-left: 0 !important;
color: #19152c;
font-weight: bold;
}
.taskUploadTitle{
......@@ -2350,13 +2386,17 @@
}
.contentDetails{
padding: 20px 20px;
height: 600px; /*no*/
padding: 30px 20px;
height: 100%; /*no*/
min-height: 400px;
/*border: 1px solid #a8acea; !*no*!*/
overflow-y: auto;
font-size: 18px;
border-radius: 4px;
max-height: 800px; /*no*/
margin: 0px 0px;
background: #EFF2FA;
font-weight: normal;
}
/deep/ .el-input__inner{
......@@ -2406,6 +2446,7 @@
line-height: 40px;
position: relative;
font-size: 18px;
font-weight: bold;
margin-left: 0 !important;
}
......@@ -2593,8 +2634,8 @@
}
/deep/ .el-step__head.is-success {
color: #3cc65c;
border-color: #3cc65c;
color: #3cc65c !important;
border-color: #3cc65c !important;
}
/deep/ .el-step__title.is-success {
......@@ -2626,4 +2667,15 @@
/*border-radius: 50%;*/
/*padding: 3px 3px; !*no*!*/
/*}*/
.detailBtns{
text-align: center;
width: 78%;
/*height: 10%;*/
/*margin: 15px auto;*/
/*padding-bottom:30px;*/
clear:both;
position: fixed;
bottom: 30px;
}
</style>
......@@ -451,6 +451,14 @@
message: '发布任务成功!',
type: 'success'
});
obj = {
active: 'four',
page: 1,
url: 'unpublishedTask'
};
this.$store.commit('changeSaveView', {
saveView: obj
})
this.$refs[formName].resetFields();
this.$router.push({name: 'viewTask'});
}
......@@ -675,6 +683,7 @@
line-height: 40px;
position: relative;
font-size: 18px;
font-weight: bold;
margin-left: 0 !important;
}
......
......@@ -12,7 +12,7 @@
<view-task-table :tableList="dataList" @trData="taskDetails"></view-task-table>
</div>
</el-tab-pane>
<el-tab-pane name="four">
<el-tab-pane name="four" v-if="userDetail.roles !== undefined && userDetail.roles.length > 0 && userDetail.roles[0].authorities.findIndex(item => item.name === '发布任务') > -1">
<span slot="label" class="tabMargin">
<!--<i class="el-icon-date"></i>-->
发布任务
......@@ -267,7 +267,7 @@
console.log(storeValue)
// let thisStore = this.$store;
setTimeout(function () {
if (storeValue !== undefined && storeValue.url !== undefined && storeValue.url === 'taskDetails') {
if (storeValue !== undefined && storeValue.url !== undefined && (storeValue.url === 'taskDetails' || storeValue.url === 'addTask')) {
that.saveViewClick(storeValue);
} else {
that.getDataListUpcoming();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论