|
@@ -6,7 +6,7 @@
|
|
|
<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 size="medium" @change="changetasknames" filterable v-model="tasknames" placeholder="请选择">
|
|
|
+ <el-select :clearable="true" size="medium" @change="changetasknames" filterable v-model="tasknames" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in tasknamelist"
|
|
|
:key="item"
|
|
@@ -45,6 +45,114 @@
|
|
|
: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
|
|
|
+ :data="scopee.row.taskerDetails"
|
|
|
+ border
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="序号"
|
|
|
+ width="50" >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="userName"
|
|
|
+ label="姓名"
|
|
|
+ width="100">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="beginTime"
|
|
|
+ label="开始日期"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="overTime"
|
|
|
+ label="完成日期"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="状态"
|
|
|
+ width="80">
|
|
|
+ <template slot-scope="scopeStatus">
|
|
|
+ <span v-if="scopeStatus.row.taskStatus==-1">
|
|
|
+ 未开始
|
|
|
+ </span>
|
|
|
+ <span v-if="scopeStatus.row.taskStatus==0">
|
|
|
+ 已知晓
|
|
|
+ </span>
|
|
|
+ <span v-if="scopeStatus.row.taskStatus==1">
|
|
|
+ 进行中
|
|
|
+ </span>
|
|
|
+ <span v-if="scopeStatus.row.taskStatus==2">
|
|
|
+ 待审核
|
|
|
+ </span>
|
|
|
+ <span v-if="scopeStatus.row.taskStatus==3">
|
|
|
+ 未完成
|
|
|
+ </span>
|
|
|
+ <span v-if="scopeStatus.row.taskStatus==4">
|
|
|
+ 已完成
|
|
|
+ </span>
|
|
|
+ <span v-if="scopeStatus.row.taskStatus==5">
|
|
|
+ 任务中止
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="score"
|
|
|
+ label="评分"
|
|
|
+ width="180">
|
|
|
+ <template slot-scope="scopescore">
|
|
|
+ <span v-if="scopescore.row.score==0">
|
|
|
+ 未评分
|
|
|
+ </span>
|
|
|
+ <span v-if="scopescore.row.score==1">
|
|
|
+ 不合格
|
|
|
+ </span>
|
|
|
+ <span v-if="scopescore.row.score==2">
|
|
|
+ 一般
|
|
|
+ </span>
|
|
|
+ <span v-if="scopescore.row.score==3">
|
|
|
+ 良好
|
|
|
+ </span>
|
|
|
+ <span v-if="scopescore.row.score==4">
|
|
|
+ 优秀
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="scoreRemark"
|
|
|
+ label="评分备注"
|
|
|
+ width="250">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="cause"
|
|
|
+ label="备注">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ 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="4"></el-option>
|
|
|
+ <!-- <el-option label="终止" value="beijing"></el-option> -->
|
|
|
+ <el-option label="未完成" value="3"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button
|
|
|
+ v-if="scopes.row.taskStatus==4"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="scoreclick(scopes.$index,scopes.row)">
|
|
|
+ 评分
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="taskName"
|
|
|
label="任务名称">
|
|
@@ -63,22 +171,47 @@
|
|
|
prop="status"
|
|
|
label="状态"
|
|
|
width="80">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.status==0">
|
|
|
- 未开始
|
|
|
- </span>
|
|
|
- <span v-if="scope.row.status==1">
|
|
|
- 进行中
|
|
|
- </span>
|
|
|
- <span v-if="scope.row.status==2">
|
|
|
- 待审核
|
|
|
- </span>
|
|
|
- <span v-if="scope.row.status==3">
|
|
|
- 未完成
|
|
|
- </span>
|
|
|
- <span v-if="scope.row.status==4">
|
|
|
- 已完成
|
|
|
- </span>
|
|
|
+ <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?:'全部' }}
|
|
@@ -102,9 +235,11 @@
|
|
|
<el-table-column
|
|
|
prop="date"
|
|
|
label="预计起止时间"
|
|
|
- width="200">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.predictBeginTime }}~{{ scope.row.predictEndTime }}
|
|
|
+ width="170">
|
|
|
+ <template slot-scope="scopeTime">
|
|
|
+ {{ scopeTime.row.predictBeginTime }}
|
|
|
+ <br/>
|
|
|
+ {{ scopeTime.row.predictEndTime }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -119,26 +254,50 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
- width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
+ width="210">
|
|
|
+ <template slot-scope="scopebtn">
|
|
|
+ <!-- //任务创建者
|
|
|
+ 确认任务完成 编辑 删除
|
|
|
+ //任务归属者
|
|
|
+ 开始 完成 -->
|
|
|
<el-button
|
|
|
+ v-if="cnName!=scopebtn.row.createUserName"
|
|
|
type="text"
|
|
|
- size="small">
|
|
|
- 开始
|
|
|
+ size="small"
|
|
|
+ @click.native.prevent="PostTaskAllocationSetStartStatus(scopebtn.$index, scopebtn.row)">
|
|
|
+ 已知晓
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
+ v-if="cnName!=scopebtn.row.createUserName"
|
|
|
type="text"
|
|
|
- size="small">
|
|
|
+ size="small"
|
|
|
+ @click.native.prevent="PostTaskAllocationSetOverStatus(scopebtn.$index, scopebtn.row)">
|
|
|
完成
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- @click.native.prevent="taskedit(scope.$index, scope.row)"
|
|
|
+ v-if="cnName==scopebtn.row.createUserName"
|
|
|
+ @click.native.prevent="taskedit(scopebtn.$index, scopebtn.row)"
|
|
|
type="text"
|
|
|
size="small">
|
|
|
编辑
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- @click.native.prevent="deleteRow(scope.$index, tableData)"
|
|
|
+ v-if="cnName!=scopebtn.row.createUserName"
|
|
|
+ @click.native.prevent="taskedit(scopebtn.$index, scopebtn.row)"
|
|
|
+ type="text"
|
|
|
+ size="small">
|
|
|
+ 详细
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="cnName==scopebtn.row.createUserName"
|
|
|
+ @click.native.prevent="PostTaskAllocationTermination(scopebtn.$index, scopebtn.row)"
|
|
|
+ type="text"
|
|
|
+ size="small">
|
|
|
+ 任务终止
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="cnName==scopebtn.row.createUserName"
|
|
|
+ @click.native.prevent="deleteRow(scopebtn.$index,scopebtn.row,tableData)"
|
|
|
type="text"
|
|
|
size="small">
|
|
|
移除
|
|
@@ -156,12 +315,37 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="count">
|
|
|
</el-pagination>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <el-dialog top="30vh" width="900px" title="等级评分" :visible.sync="dialogFormVisible">
|
|
|
+ <el-form >
|
|
|
+ <div class="score-box">
|
|
|
+ <el-form-item label="姓名" :label-width="labelWidth">
|
|
|
+ <el-input :disabled="true" v-model="scorename" placeholder="姓名"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="评分" :label-width="labelWidth">
|
|
|
+ <el-radio-group v-model="score">
|
|
|
+ <el-radio label="不合格"></el-radio>
|
|
|
+ <el-radio label="一般"></el-radio>
|
|
|
+ <el-radio label="良好"></el-radio>
|
|
|
+ <el-radio label="优秀"></el-radio>
|
|
|
+ </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>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="scoreconfirm()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { co } from '@fullcalendar/core/internal-common'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -219,6 +403,15 @@ export default {
|
|
|
pagesize:10,
|
|
|
currentPage: 1,
|
|
|
count:0,
|
|
|
+ dialogFormVisible:false,
|
|
|
+ labelWidth:'80px',
|
|
|
+ scorename:'',
|
|
|
+ score:'',
|
|
|
+ scoreid:'',
|
|
|
+ ID:'',
|
|
|
+ scoreRemark:'',
|
|
|
+ cnName:'',//登录用户名
|
|
|
+ reviewstatus:'',
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -257,6 +450,17 @@ export default {
|
|
|
}
|
|
|
var url = "/api/PersonnelModule/PostTaskAllocationPage"
|
|
|
var that = this
|
|
|
+ var data={
|
|
|
+ portType:1,
|
|
|
+ userId: that.userId,
|
|
|
+ pageId: that.pageId,
|
|
|
+ pageIndex: that.currentPage,
|
|
|
+ pageSize: that.pagesize,
|
|
|
+ type: that.assignmenttype,
|
|
|
+ status: that.completionstatus,
|
|
|
+ taskName: that.tasknames,
|
|
|
+ }
|
|
|
+ console.log(JSON.stringify(data))
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
url: url,
|
|
@@ -285,8 +489,47 @@ export default {
|
|
|
that.$message.error("获取数据源失败!");
|
|
|
});
|
|
|
},
|
|
|
- deleteRow(index, rows) {
|
|
|
- rows.splice(index, 1);
|
|
|
+ deleteRow(index,row,rows) {
|
|
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationDel"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ portType: 1,
|
|
|
+ userId: that.userId,
|
|
|
+ pageId: that.pageId,
|
|
|
+ id: row.id,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ rows.splice(index, 1);
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("任务终止失败!");
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
//每页条数改变时触发 选择一页显示多少行
|
|
|
handleSizeChange(val) {
|
|
@@ -320,17 +563,286 @@ export default {
|
|
|
taskedit(index,val){
|
|
|
// this.$router.push({path: '/home/AssignTasks?id='+val.id+''});
|
|
|
// this.$router.push({path: '/home/MyTasksinif?id='+val.id+''});
|
|
|
- var cnName=JSON.parse(localStorage.getItem('userinif')).userInfo.cnName;
|
|
|
- if(val.createUserName==cnName){
|
|
|
+
|
|
|
+ if(val.createUserName==this.cnName){
|
|
|
this.$router.push({path: '/home/AssignTasks?id='+val.id+''});
|
|
|
}else{
|
|
|
- if(val.participant.indexOf(cnName)!=-1){
|
|
|
+ if(val.participant.indexOf(this.cnName)!=-1){
|
|
|
this.$router.push({path: '/home/MyTasksinif?id='+val.id+''});
|
|
|
}else{
|
|
|
this.$message.error("此任务被指派人没有此账号!");
|
|
|
}
|
|
|
}
|
|
|
- console.log(val,cnName);
|
|
|
+ },
|
|
|
+ //基础数据原
|
|
|
+ PostTaskAllocationInit(){
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationInit"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ portType:1,
|
|
|
+ userId: that.userId
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.tasknamelist=res.data.data.taskNameInfos;
|
|
|
+ that.PostTaskAllocationPage()
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("获取数据源失败!");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //开始
|
|
|
+ PostTaskAllocationSetStartStatus(index,row){
|
|
|
+ console.log(row)
|
|
|
+ if(row.status>=1){
|
|
|
+ this.$message.error('此任务已经开始!');
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationSetStartStatus"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ userId: that.userId,
|
|
|
+ id: row.id,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.PostTaskAllocationPage();
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("操作失败(开始步骤)");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //完成
|
|
|
+ PostTaskAllocationSetOverStatus(index,row){
|
|
|
+ if(row.status==2||row.status==0||row.status==4){
|
|
|
+ this.$message.error('此任务未开始或待审核,请勿多次提交!');
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationSetOverStatus"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ userId: that.userId,
|
|
|
+ id: row.id,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.PostTaskAllocationPage();
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("操作失败(完成步骤)");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //评分
|
|
|
+ scoreclick(index,row){
|
|
|
+ console.log(index,row)
|
|
|
+ this.dialogFormVisible=true;
|
|
|
+ this.scorename=row.userName;
|
|
|
+ this.scoreid=row.taId;
|
|
|
+ this.scoreRemark=row.scoreRemark;
|
|
|
+ this.ID=row.id;
|
|
|
+ if(row.score==0){
|
|
|
+ this.score='良好';
|
|
|
+ }else{
|
|
|
+ this.score=row.score==4?'优秀':row.score==3?'良好':row.score==2?'一般':'不合格';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //评分确认
|
|
|
+ scoreconfirm(){
|
|
|
+ var score=3
|
|
|
+ if(this.score=='不合格'){
|
|
|
+ score=1
|
|
|
+ }else if(this.score=='一般'){
|
|
|
+ score=2
|
|
|
+ }else if(this.score=='良好'){
|
|
|
+ score=3
|
|
|
+ }else{
|
|
|
+ score=4
|
|
|
+ }
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationScore"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ portType: 1,
|
|
|
+ userId: that.userId,
|
|
|
+ pageId: that.pageId,
|
|
|
+ subId: that.ID,
|
|
|
+ score: score,
|
|
|
+ scoreRemark: that.scoreRemark,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.dialogFormVisible=false;
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.PostTaskAllocationPage();
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("获取数据源失败!");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //change
|
|
|
+ statuschange(val,row){
|
|
|
+ console.log(val,row)
|
|
|
+ if(val==4){
|
|
|
+ this.PostTaskAllocationSetAuditStatus(row.id);
|
|
|
+ }else if(val==3){
|
|
|
+ this.open(row.id);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //审核
|
|
|
+ PostTaskAllocationSetAuditStatus(id){
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationSetAuditStatus"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ subId:id,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.PostTaskAllocationPage();
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("审核失败!");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ open(id) {
|
|
|
+ this.$prompt('请输入未完成原因', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern: /^.+$/,
|
|
|
+ inputErrorMessage: '原因不能为空'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ this.PostTaskAllocationSetUnFinishedStatus(id,value)
|
|
|
+ // this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: '你的邮箱是: ' + value
|
|
|
+ // });
|
|
|
+ }).catch(() => {
|
|
|
+ this.reviewstatus='';
|
|
|
+ // this.$message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: '取消输入'
|
|
|
+ // });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //未完成
|
|
|
+ PostTaskAllocationSetUnFinishedStatus(id,val){
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationSetUnFinishedStatus"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ subId:id,
|
|
|
+ cause:val,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.PostTaskAllocationPage();
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("审核失败!");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //任务终止
|
|
|
+ PostTaskAllocationTermination(index,row){
|
|
|
+ var url = "/api/PersonnelModule/PostTaskAllocationTermination"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.userId
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ portType: 1,
|
|
|
+ userId: that.userId,
|
|
|
+ pageId: that.pageId,
|
|
|
+ id: row.id,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.PostTaskAllocationPage();
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error("任务终止失败!");
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
filters:{
|
|
@@ -350,6 +862,7 @@ export default {
|
|
|
this.pageId=Number(localStorage.getItem('indexs').split('-')[1]);//页面id
|
|
|
this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
|
this.jobName=JSON.parse(localStorage.getItem('userinif')).userInfo.jobName;
|
|
|
+ this.cnName=JSON.parse(localStorage.getItem('userinif')).userInfo.cnName;
|
|
|
this.PostTaskAllocationInit()
|
|
|
}
|
|
|
}
|
|
@@ -382,4 +895,50 @@ export default {
|
|
|
text-align: center;
|
|
|
margin-top: 15px;
|
|
|
}
|
|
|
+.score-box{
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+.score-box .el-form-item_content{
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.score-box .el-form-item:nth-child(1){
|
|
|
+ width: 50%;
|
|
|
+}
|
|
|
+.score-box .el-form-item:nth-child(2){
|
|
|
+ width: 50%;
|
|
|
+}
|
|
|
+.score-box .el-form-item:nth-child(3){
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.tasklist-table .demo-table-expand {
|
|
|
+ font-size: 0;
|
|
|
+}
|
|
|
+.tasklist-table .demo-table-expand label {
|
|
|
+ width: 90px;
|
|
|
+ color: #99a9bf;
|
|
|
+}
|
|
|
+.tasklist-table .demo-table-expand .el-form-item {
|
|
|
+ margin-right: 0;
|
|
|
+ margin-bottom: 0;
|
|
|
+ width: 50%;
|
|
|
+}
|
|
|
+.table-boxli{
|
|
|
+ text-align: center;
|
|
|
+ padding: 0 20px;
|
|
|
+}
|
|
|
+.table-boxli .el-table--border, .el-table--group{
|
|
|
+ border: 1px solid #b5bfd7;
|
|
|
+}
|
|
|
+.table-boxli .el-table--border .el-table__cell{
|
|
|
+ border: 1px solid #b5bfd7;
|
|
|
+ padding: 12px 0;
|
|
|
+ min-width: 0;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ vertical-align: middle;
|
|
|
+ position: relative;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
</style>
|