|
|
@@ -1,26 +1,37 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="tasklist-all">
|
|
|
-
|
|
|
+ <el-dialog width="500px" title="完成情况" :visible.sync="dialogTasklist">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="特殊说明:" :label-width="formLabelWidth">
|
|
|
+ <el-input type="textarea" :rows="5" v-model="shuju.remark" autocomplete="off"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="完成时间:" :label-width="formLabelWidth">
|
|
|
+ <el-date-picker v-model="shuju.overTime" type="datetime" placeholder="选择日期时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogTasklist = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="PostTaskAllocationSetAuditStatus">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<div class="tasklist-head">
|
|
|
- <el-form style="display: flex;justify-content: space-between;align-items: center;" label-width="70px" class="demo-ruleForm">
|
|
|
+ <el-form style="display: flex;justify-content: space-between;align-items: center;" label-width="70px"
|
|
|
+ class="demo-ruleForm">
|
|
|
<div class="tasklist-head-select">
|
|
|
<el-form-item label="任务名称" prop="name">
|
|
|
- <el-select :clearable="true" size="medium" @change="changetasknames" filterable v-model="tasknames" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in tasknamelist"
|
|
|
- :key="item"
|
|
|
- :label="item"
|
|
|
- :value="item">
|
|
|
+ <el-select :clearable="true" size="medium" @change="changetasknames" filterable
|
|
|
+ v-model="tasknames" placeholder="请选择">
|
|
|
+ <el-option v-for="item in tasknamelist" :key="item" :label="item" :value="item">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="完成状态" prop="name">
|
|
|
- <el-select @change="changecompletionstatus" size="medium" filterable v-model="completionstatus" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in completionstatuslist"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
+ <el-select @change="changecompletionstatus" size="medium" filterable
|
|
|
+ v-model="completionstatus" placeholder="请选择">
|
|
|
+ <el-option v-for="item in completionstatuslist" :key="item.id" :label="item.name"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -41,11 +52,8 @@
|
|
|
</div>
|
|
|
<div class="tasklist-title">任务列表</div>
|
|
|
<div class="tasklist-table">
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- border
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column type="expand">
|
|
|
+ <el-table :data="tableData" border style="width: 100%">
|
|
|
+ <!-- <el-table-column type="expand">
|
|
|
<template slot-scope="scopee">
|
|
|
<div v-if="userId==scopee.row.taskerDetails[0].taskCreateUserId" class="table-boxli">
|
|
|
<el-table
|
|
|
@@ -135,9 +143,9 @@
|
|
|
width="180">
|
|
|
<template slot-scope="scopes">
|
|
|
<el-select v-if="scopes.row.taskStatus==2" size="small" @change="statuschange($event,scopes.row)" style="width:100px;margin-right: 15px;" v-model="reviewstatus" placeholder="请选择">
|
|
|
- <!-- <el-option label="未审核" value="shanghai"></el-option> -->
|
|
|
+ <el-option label="未审核" value="shanghai"></el-option>
|
|
|
<el-option label="已完成" value="4"></el-option>
|
|
|
- <!-- <el-option label="终止" value="beijing"></el-option> -->
|
|
|
+ <el-option label="终止" value="beijing"></el-option>
|
|
|
<el-option label="未完成" value="3"></el-option>
|
|
|
</el-select>
|
|
|
<el-button
|
|
|
@@ -152,119 +160,110 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column prop="taskName" label="任务名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="taskName"
|
|
|
- label="任务名称">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="taskPriority"
|
|
|
- label="优先级"
|
|
|
- width="70">
|
|
|
+ <el-table-column prop="taskPriority" label="优先级" width="70">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="participant"
|
|
|
- label="指派给"
|
|
|
- width="200">
|
|
|
+ <el-table-column prop="participant" label="指派给" width="200">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="status"
|
|
|
- label="状态"
|
|
|
- width="80">
|
|
|
- <template slot-scope="scopes">
|
|
|
- <div v-if="scopes.row.createUserName==cnName">
|
|
|
- <span v-if="scopes.row.status==0">
|
|
|
- 未开始
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==1">
|
|
|
- 进行中
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==2">
|
|
|
- 待审核
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==3">
|
|
|
- 未完成
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==4">
|
|
|
- 已完成
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div v-else-if="scopes.row.createUserName!=cnName">
|
|
|
- <span v-if="scopes.row.status==-1">
|
|
|
- 未开始
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==0">
|
|
|
- 已知晓
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==1">
|
|
|
- 进行中
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==2">
|
|
|
- 待审核
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==3">
|
|
|
- 未完成
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==4">
|
|
|
- 已完成
|
|
|
- </span>
|
|
|
- <span v-if="scopes.row.status==5">
|
|
|
- 任务中止
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <el-table-column prop="status" label="状态" width="80">
|
|
|
+ <template slot-scope="scopes">
|
|
|
+ <div v-if="scopes.row.createUserName==cnName">
|
|
|
+ <span v-if="scopes.row.status==0">
|
|
|
+ 未开始
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==1">
|
|
|
+ 进行中
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==2">
|
|
|
+ 待审核
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==3">
|
|
|
+ 未完成
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==4">
|
|
|
+ 已完成
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scopes.row.createUserName!=cnName">
|
|
|
+ <span v-if="scopes.row.status==-1">
|
|
|
+ 未开始
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==0">
|
|
|
+ 已知晓
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==1">
|
|
|
+ 进行中
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==2">
|
|
|
+ 待审核
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==3">
|
|
|
+ 未完成
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==4">
|
|
|
+ 已完成
|
|
|
+ </span>
|
|
|
+ <span v-if="scopes.row.status==5">
|
|
|
+ 任务中止
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- <template v-if="status" slot-scope="scope">
|
|
|
{{ scope.row.status==0? scope.row.status==1?:'全部' }}
|
|
|
</template> -->
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
prop="consummator"
|
|
|
label="完成者"
|
|
|
width="100">
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column prop="depName" label="归属部门" width="100">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="depName"
|
|
|
- label="归属部门"
|
|
|
- width="100">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="date"
|
|
|
- label="截止"
|
|
|
- width="100">
|
|
|
+ <el-table-column prop="tasktypename" label="类型" width="100">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="date"
|
|
|
- label="预计起止时间"
|
|
|
- width="170">
|
|
|
+ <el-table-column prop="date" label="预计起止时间" width="170">
|
|
|
<template slot-scope="scopeTime">
|
|
|
{{ scopeTime.row.predictBeginTime }}
|
|
|
- <br/>
|
|
|
+ <br />
|
|
|
{{ scopeTime.row.predictEndTime }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="createUserName"
|
|
|
- label="创建者"
|
|
|
- width="100">
|
|
|
+ <el-table-column prop="overTime" label="实际完成时间" width="170">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createUserName" label="创建者" width="100">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="createTime"
|
|
|
- label="创建时间"
|
|
|
- width="180">
|
|
|
+ <el-table-column prop="createTime" label="创建时间" width="180">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- width="210">
|
|
|
+ <el-table-column label="操作" width="210">
|
|
|
<template slot-scope="scopebtn">
|
|
|
<!-- //任务创建者
|
|
|
确认任务完成 编辑 删除
|
|
|
//任务归属者
|
|
|
开始 完成 -->
|
|
|
- <el-button
|
|
|
+ <el-button v-if="scopebtn.row.taskHavePerm" type="text" size="small"
|
|
|
+ @click.native.prevent="PostTaskAllocationSetHaveStatus(scopebtn.$index, scopebtn.row)">
|
|
|
+ 已知晓
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scopebtn.row.taskDetailsPerm" @click.native.prevent="taskedit(scopebtn.$index, scopebtn.row)" type="text"
|
|
|
+ size="small">
|
|
|
+ 详细
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scopebtn.row.editPerm"
|
|
|
+ @click.native.prevent="taskedit(scopebtn.$index, scopebtn.row)" type="text"
|
|
|
+ size="small">
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scopebtn.row.taskCompletedPerm" type="text" size="small"
|
|
|
+ @click.native.prevent="openDialog(scopebtn.row)">
|
|
|
+ 完成
|
|
|
+ </el-button>
|
|
|
+ <!-- <el-button
|
|
|
v-if="cnName!=scopebtn.row.createUserName"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- @click.native.prevent="PostTaskAllocationSetStartStatus(scopebtn.$index, scopebtn.row)">
|
|
|
+ @click.native.prevent="PostTaskAllocationSetHaveStatus(scopebtn.$index, scopebtn.row)">
|
|
|
已知晓
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -301,24 +300,20 @@
|
|
|
type="text"
|
|
|
size="small">
|
|
|
移除
|
|
|
- </el-button>
|
|
|
+ </el-button> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="block">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[1,5, 10, 15, 20]"
|
|
|
- :page-size="pagesize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="count">
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage" :page-sizes="[1,5, 10, 15, 20]" :page-size="pagesize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="count">
|
|
|
</el-pagination>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <el-dialog top="30vh" width="900px" title="等级评分" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
|
|
|
- <el-form >
|
|
|
+ <el-dialog top="30vh" width="900px" title="等级评分" :visible.sync="dialogFormVisible"
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <el-form>
|
|
|
<div class="score-box">
|
|
|
<el-form-item label="姓名" :label-width="labelWidth">
|
|
|
<el-input :disabled="true" v-model="scorename" placeholder="姓名"></el-input>
|
|
|
@@ -329,7 +324,7 @@
|
|
|
<el-radio label="一般"></el-radio>
|
|
|
<el-radio label="良好"></el-radio>
|
|
|
<el-radio label="优秀"></el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ </el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item size="medium" label="评分备注" :label-width="labelWidth">
|
|
|
<el-input rows="1" type="textarea" v-model="scoreRemark"></el-input>
|
|
|
@@ -337,10 +332,10 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="scoreconfirm()">确 定</el-button>
|
|
|
+ <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="scoreconfirm()">确 定</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -430,6 +425,13 @@ export default {
|
|
|
scoreRemark:'',
|
|
|
cnName:'',//登录用户名
|
|
|
reviewstatus:'',
|
|
|
+ formLabelWidth: '80px',
|
|
|
+ dialogTasklist: false,
|
|
|
+ shuju:{
|
|
|
+ id:'',
|
|
|
+ remark:'',
|
|
|
+ overTime:'',
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -619,13 +621,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//开始
|
|
|
- PostTaskAllocationSetStartStatus(index,row){
|
|
|
- console.log(row)
|
|
|
+ PostTaskAllocationSetHaveStatus(index,row){
|
|
|
if(row.status>=1){
|
|
|
this.$message.error('此任务已经开始!');
|
|
|
return false
|
|
|
}else{
|
|
|
- var url = "/api/PersonnelModule/PostTaskAllocationSetStartStatus"
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationSetHaveStatus"
|
|
|
var that = this
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
@@ -653,6 +654,17 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ //处理日期
|
|
|
+ datetime(val){
|
|
|
+ var date=new Date(val);
|
|
|
+ var y=date.getFullYear();
|
|
|
+ var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
|
|
|
+ var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
|
|
|
+ var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
|
|
|
+ var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
|
|
|
+ var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
|
|
|
+ return y+'-'+m+'-'+d+" "+s+':'+f+':'+mm
|
|
|
+ },
|
|
|
//完成
|
|
|
PostTaskAllocationSetOverStatus(index,row){
|
|
|
if(row.status==2||row.status==0||row.status==4){
|
|
|
@@ -754,8 +766,15 @@ export default {
|
|
|
this.open(row.id);
|
|
|
}
|
|
|
},
|
|
|
+ //打开情况传递数据
|
|
|
+ openDialog(row){
|
|
|
+ this.dialogTasklist = true;
|
|
|
+ this.shuju.id = row.id;
|
|
|
+ this.shuju.remark = row.remark;
|
|
|
+ this.shuju.overTime = row.overTime;
|
|
|
+ },
|
|
|
//审核
|
|
|
- PostTaskAllocationSetAuditStatus(id){
|
|
|
+ PostTaskAllocationSetAuditStatus(){
|
|
|
var url = "/api/PersonnelModule/PostTaskAllocationSetAuditStatus"
|
|
|
var that = this
|
|
|
this.$axios({
|
|
|
@@ -765,7 +784,10 @@ export default {
|
|
|
Authorization: 'Bearer ' + that.userId
|
|
|
},
|
|
|
data:{
|
|
|
- subId:id,
|
|
|
+ userId:that.userId,
|
|
|
+ id:that.shuju.id,
|
|
|
+ overTime:that.datetime(that.shuju.overTime),
|
|
|
+ remark:that.shuju.remark,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
console.log(res)
|
|
|
@@ -774,6 +796,7 @@ export default {
|
|
|
message: res.data.msg,
|
|
|
type: 'success'
|
|
|
});
|
|
|
+ that.dialogTasklist = false;
|
|
|
that.PostTaskAllocationPage();
|
|
|
}else{
|
|
|
that.$message.error(res.data.msg);
|