|
@@ -9,6 +9,7 @@
|
|
|
<el-option :label="$t('ongoing')" value="0" @click.native="hiddens()"></el-option>
|
|
|
<el-option :label="$t('state.completed')" value="1" @click.native="hiddens()"></el-option>
|
|
|
<el-option label="待审核" value="2" @click.native="hiddens()"></el-option>
|
|
|
+ <el-option label="已驳回" value="3" @click.native="hiddens()"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -26,9 +27,7 @@
|
|
|
<el-form-item :label="$t('types')">
|
|
|
<div style="margin-left: 8px">
|
|
|
<el-select v-model="typeField" style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="hiddens()">
|
|
|
- <el-option :label="$t('other.task')" value="0"></el-option>
|
|
|
- <el-option :label="$t('other.milestone')" value="1"></el-option>
|
|
|
- <el-option :label="$t('risk')" value="2"></el-option>
|
|
|
+ <el-option v-for="item in typeList" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -82,7 +81,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right;" v-if="user.companyId != '3092'">
|
|
|
<el-link type="primary" :underline="false" @click="addTask()">新建任务</el-link>
|
|
|
- <el-link type="primary" :underline="false" @click="addTask()" style="margin-left: 10px;">批量导入</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="importTaskDialog = true" style="margin-left: 10px;">批量导入</el-link>
|
|
|
<el-link type="primary" :underline="false" @click="exportTaskList()" style="margin-left: 10px;" v-loading="exportTaskLoading" >数据导出</el-link>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -93,12 +92,12 @@
|
|
|
<p :class="idx == 0 ? 'on' : ''" @click="switchs(0)" v-if="permissions.projectView || permissions.projectManagement || permissions.projectViewAllTasks">{{ $t('alltaskss') }}</p>
|
|
|
<p :class="idx == 1 ? 'on' : ''" @click="switchs(1)">{{ $t('perform') }}</p>
|
|
|
<p :class="idx == 2 ? 'on' : ''" @click="switchs(2)">{{ $t('created') }}</p>
|
|
|
- <p :class="idx == 3 ? 'on' : ''" @click="switchs(3)" >待我审核的</p>
|
|
|
+ <p :class="idx == 3 ? 'on' : ''" @click="switchs(3)" >待我审核的<span v-if="auditCount>0" style="color:red;">({{auditCount}})</span></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="max-width: 94%;min-width: 90%">
|
|
|
<!--列表-->
|
|
|
- <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" v-if="[0, 1, 2].includes(idx)" :key="tablesKey">
|
|
|
+ <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" :key="tablesKey">
|
|
|
<el-table-column type="index" width="60">
|
|
|
<template slot-scope="scope" >
|
|
|
{{scope.$index+1+(page-1)*size}}
|
|
@@ -123,6 +122,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="taskPlanTypeName" label="类型" sortable width="100"></el-table-column>
|
|
|
<el-table-column prop="name" :label="$t('nameofthetask')" sortable width="330">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.name.length > 20">
|
|
@@ -166,6 +166,14 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="taskStatus" label="状态" sortable width="150" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :style="'color:'+taskStatusColorList[scope.row.taskStatus]">{{taskStatusList[scope.row.taskStatus] }}</span>
|
|
|
+ <el-tooltip class="itemName bosx" v-if="scope.row.taskStatus == 5 || scope.row.taskStatus == 6" effect="dark" :content="scope.row.rejectTime+' '+scope.row.rejectUserName+'驳回:'+scope.row.taskRejectReason" placement="top">
|
|
|
+ <span>查看原因</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column prop="projectCategorySub" label="项目分组" sortable width="300" v-if="user.companyId == '428'"></el-table-column> -->
|
|
|
<el-table-column prop="departmentName" :label="$t('subordinatedepartments')" sortable width="300" v-if="user.timeType.projectWithDept">
|
|
|
<template slot-scope="scope">
|
|
@@ -197,12 +205,15 @@
|
|
|
</span>
|
|
|
<el-button v-if="searchField == 0" size="small" type="primary" @click="completes(scope.row.id, 0, scope.row)">{{ $t('wan-cheng') }}</el-button>
|
|
|
<el-button v-if="searchField == 1" size="small" type="warning" @click="completes(scope.row.id, 1, scope.row)">{{ $t('zhong-qi') }}</el-button>
|
|
|
+ <el-button v-if="idx == 3" size="small" type="primary" @click="handleAuditTask(scope.row, true)">通过</el-button>
|
|
|
+ <el-button v-if="idx == 3" size="small" type="danger" @click="handleAuditTask(scope.row, false)">驳回</el-button>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <el-table v-if="[3].includes(idx)" :data="documentReview" highlight-current-row v-loading="documentReviewLoading" :height="tableHeight" style="width: 100%;" :key="tablesTwoKey" @selection-change="agentSelectChange">
|
|
|
+ <!-- <el-table v-if="[3].includes(idx)" :data="documentReview" highlight-current-row v-loading="documentReviewLoading" :height="tableHeight" style="width: 100%;" :key="tablesTwoKey" @selection-change="agentSelectChange">
|
|
|
<el-table-column type="selection" width="55" v-if="documentRadios == '待他人审核'"></el-table-column>
|
|
|
<el-table-column prop="projectName" :label="$t('headerTop.projectName')" sortable width="260" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
@@ -263,7 +274,7 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- </el-table>
|
|
|
+ </el-table> -->
|
|
|
|
|
|
<!-- 重启时输入原因 -->
|
|
|
<el-dialog :title="$t('zhongQiRenWu')" :visible.sync="causeRejectionDialog" width="600px" :before-close="handleClose">
|
|
@@ -354,7 +365,7 @@
|
|
|
:close-on-click-modal="false" customClass="customWidth" width="840px" :top="'6vh'">
|
|
|
<!-- <div style="width: 200%;height:80%;position: absolute;right:-100%;top:0;background:#000;opacity: 0;" @click="sss"></div> -->
|
|
|
<!-- 整合 -->
|
|
|
- <taskComponent ref="thskComponents" :integrationTask="integrationTask" :showOrNot="showOrNot" @closeBounced="closeBounced"></taskComponent>
|
|
|
+ <taskComponent ref="thskComponents" :integrationTask="integrationTask" :showOrNot="showOrNot" :showMmeiLaiDe="true" :showMmeiLaiDeData="showMmeiLaiDeData" @closeBounced="closeBounced"></taskComponent>
|
|
|
<div slot="title" v-if="addForm.parentTid != null">
|
|
|
<el-page-header @back="backToParentTask" :title="$t('parenttask')" :content="addForm.parentTname"></el-page-header>
|
|
|
</div>
|
|
@@ -430,11 +441,25 @@
|
|
|
<el-button type="danger" size="small" :disabled="tableMultipleSelection.length == 0" @click="viewFilesAndReviewThemReject()">驳回</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="文件驳回" :visible.sync="viewFilesAndReviewThemRejectVisable" width="800px">
|
|
|
+ <el-dialog title="工作计划驳回" :visible.sync="taskRejectReasonDialog" width="800px">
|
|
|
<el-input type="textarea" :rows="5" placeholder="请输入驳回原因" v-model.trim="viewFilesAndReviewThemRejectVal" :maxlength="50">
|
|
|
</el-input>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" size="small" @click="viewFilesAndReviewThemRejectCli(2)" :loading="viewFilesAndReviewThemRejectValLoading">确定</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="viewFilesAndReviewThemRejectCli(false)" :loading="viewFilesAndReviewThemRejectValLoading">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!--导入数据,下载模板 -->
|
|
|
+ <el-dialog :title="$t('wdorkplanimport')" v-if="importTaskDialog" :visible.sync="importTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
+ <el-form ref="form4" >
|
|
|
+ <el-form-item :label="'1. '+$t('qing-xian-xia-zai-mo-ban-bing-tian-xie-hou-shang-chuan')" >
|
|
|
+ <el-link type="primary" :underline="false" href="./upload/多项目任务导入模板.xlsx" download="多项目任务模板.xlsx'">{{ $t('xiaZaiDuoXiangMuRenWuMoBan') }}</el-link>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
|
|
|
+ <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">{{ $t('uoloadFiles') }}</el-button>
|
|
|
+ </el-upload>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
@@ -642,6 +667,11 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ taskStatusList:[this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone'),'待第一审核人审核','待第二审核人审核','第一审核人驳回','第二审核人驳回'],
|
|
|
+ taskStatusColorList:['#20a0ff','#E6A23C','#a0a0a0','#f7863b','#262626','#FF0000','#FF0000'],
|
|
|
+ showMmeiLaiDeData:{},
|
|
|
+ importTaskDialog: false,
|
|
|
+ typeList:[],
|
|
|
meeting: false,
|
|
|
causeRejectionDialog: false,
|
|
|
causeRejectionForm: {
|
|
@@ -695,6 +725,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
taskRules : {
|
|
|
name: [{ required: true, message: this.$t('enterthetaskcontent'), trigger: "blur" }],
|
|
|
},
|
|
|
+ auditCount: 0,
|
|
|
sleectId: null,
|
|
|
sleectProjectId: null,
|
|
|
sidebarIndex: null, // 侧边栏索引
|
|
@@ -758,7 +789,6 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
taskTypeList:[{id:0,name:this.$t('other.task'), icon:"iconfont firerock-iconrenwu"},{id:1,name:this.$t('other.milestone'),icon:"iconfont firerock-iconicon-"},{id:2,name:this.$t('risk'),icon:"iconfont firerock-iconfengxian"}],
|
|
|
taskTypeColor:[getThemeColor(),'#8613ad','#bf0404'],
|
|
|
taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
|
|
|
- taskStatusList:[this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone')],
|
|
|
//优先级
|
|
|
taskLevelColor:['#262626','#E6A23C','#F56C6C'],
|
|
|
stageList: '',
|
|
@@ -790,6 +820,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
exportTaskLoading: false,
|
|
|
screenDeptId: [],
|
|
|
|
|
|
+ rejectItem:{},
|
|
|
// 待审核文件
|
|
|
documentRadios: '待我审核',
|
|
|
documentReview: [],
|
|
@@ -798,7 +829,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
viewFilesAndReviewThemVisable: false,
|
|
|
viewFilesAndReviewThemList: [],
|
|
|
viewFilesAndReviewThemTableLoading: false,
|
|
|
- viewFilesAndReviewThemRejectVisable: false,
|
|
|
+ taskRejectReasonDialog: false,
|
|
|
viewFilesAndReviewThemRejectList: [],
|
|
|
viewFilesAndReviewThemRejectVal: '',
|
|
|
viewFilesAndReviewThemRejectValLoading: false,
|
|
@@ -810,10 +841,85 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
|
|
|
tablesKey: 1,
|
|
|
tablesTwoKey: 300,
|
|
|
- tableMultipleSelection: []
|
|
|
+ tableMultipleSelection: [],
|
|
|
+ loadingExport: false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 批量导入任务
|
|
|
+ importTask(item) {
|
|
|
+ //首先判断文件类型
|
|
|
+ this.loadingExport = true
|
|
|
+ let str = item.file.name.split(".");
|
|
|
+ let format = str[str.length - 1];
|
|
|
+ if (format != "xls" && format != "xlsx") {
|
|
|
+ this.loadingExport = false
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.listLoading = true;
|
|
|
+ let formData = new FormData();
|
|
|
+ formData.append("file", item.file);
|
|
|
+ formData.append("isMultiProject", 1);
|
|
|
+ this.http.uploadFile('/task/importTask', formData,
|
|
|
+ res => {
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ this.listLoading = false;
|
|
|
+ this.loadingExport = false
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('other.importSuccess'),
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.importTaskDialog = false;
|
|
|
+ this.list();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ this.listLoading = false;
|
|
|
+ this.loadingExport = false
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getTaskTypeList() {
|
|
|
+ this.http.post('/task-type/list', { companyId: this.user.companyId },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.typeList = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message({ message: res.msg, type: "error" });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({ message: error, type: "error" });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getMyAuditCount() {
|
|
|
+ this.http.post('/task/getMyAuditCount', {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.auditCount = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message({ message: res.msg, type: "error" });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({ message: error, type: "error" });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
viewOnline(row) {
|
|
|
sessionStorage.setItem("fileName",row.documentName);
|
|
|
sessionStorage.setItem("fileUrl",row.url);
|
|
@@ -882,25 +988,20 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
}
|
|
|
},error => { this.$message.error(error) })
|
|
|
},
|
|
|
- viewFilesAndReviewThemRejectCli(auditStatus = 1) {
|
|
|
- if(!this.viewFilesAndReviewThemRejectVal && auditStatus == 2) {
|
|
|
+ viewFilesAndReviewThemRejectCli(isPass) {
|
|
|
+ if(!this.viewFilesAndReviewThemRejectVal && !isPass) {
|
|
|
this.$message.error('请输入驳回原因')
|
|
|
return
|
|
|
}
|
|
|
- const taskFileIds = this.tableMultipleSelection.map(item => item.id).join(',')
|
|
|
this.viewFilesAndReviewThemRejectValLoading = true
|
|
|
- const { id, projectId } = this.viewFilesAndReviewThemRejectRow
|
|
|
- this.http.post(auditStatus == 1 ? '/task-files/approveFile' : '/task-files/rejectFile',{
|
|
|
- taskFileIds,
|
|
|
- reason: auditStatus == 1 ? '' : this.viewFilesAndReviewThemRejectVal
|
|
|
+ this.http.post('/task/taskPlanPassOrReject',{
|
|
|
+ taskId: this.rejectItem.id, type:isPass,
|
|
|
+ reason: isPass? '' : this.viewFilesAndReviewThemRejectVal
|
|
|
},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
- this.viewFilesAndReviewThemRejectList = res.data || []
|
|
|
- this.viewFilesAndReviewThemRejectVisable = false
|
|
|
- this.viewFilesAndReviewThemVisable = false
|
|
|
- this.$message.success('操作成功')
|
|
|
- this.getFilesAwaitingReview()
|
|
|
+ this.getList();
|
|
|
+ this.getMyAuditCount();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -917,9 +1018,24 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ handleAuditTask(data, isPass) {
|
|
|
+ this.rejectItem = data;
|
|
|
+ if (isPass) {
|
|
|
+ //弹窗confirm确认
|
|
|
+ this.$confirm('确认审核通过该任务吗', this.$t('other.prompts'), {
|
|
|
+ //type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.viewFilesAndReviewThemRejectCli(true);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ //驳回弹窗
|
|
|
+ this.viewFilesAndReviewThemRejectVal = ''
|
|
|
+ this.taskRejectReasonDialog = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
viewFilesAndReviewThemReject() {
|
|
|
this.viewFilesAndReviewThemRejectVal = ''
|
|
|
- this.viewFilesAndReviewThemRejectVisable = true
|
|
|
+ this.taskRejectReasonDialog = true
|
|
|
},
|
|
|
parentMeetingCli(id) {
|
|
|
this.meeting = true
|
|
@@ -956,7 +1072,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
var date = new Date();
|
|
|
let startTime = this.meetingStartValue
|
|
|
let endTime = this.meetingEndValue
|
|
|
- this.http.post('/task//operateMeeting',{taskId:this.toMeetTaskId,startTime:startTime,endTime:endTime},
|
|
|
+ this.http.post('/task/operateMeeting',{taskId:this.toMeetTaskId,startTime:startTime,endTime:endTime},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.meeting=false,
|
|
@@ -1623,6 +1739,10 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
this.idx = e
|
|
|
this.page = 1
|
|
|
this.documentRadios = '待我审核的'
|
|
|
+ if (e == 3) {
|
|
|
+ //待我审核的
|
|
|
+ this.searchField = '2';
|
|
|
+ }
|
|
|
this.getList()
|
|
|
},
|
|
|
viewFilesAndReviewThem(item) {
|
|
@@ -1720,8 +1840,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
// this.addLoading = false;
|
|
|
this.title = this.$t('editingtasks');
|
|
|
this.dynamicTab = true
|
|
|
- this.showOrNot = false
|
|
|
- console.log(task, '<=== 点击的数据', this.integrationTaskNingwai.length)
|
|
|
+ this.showOrNot = true
|
|
|
const { projectId } = task
|
|
|
// 自定义组件
|
|
|
this.integrationTask = {
|
|
@@ -1766,7 +1885,6 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
this.addForm.indate = null;
|
|
|
this.addLoading = false;
|
|
|
this.recentProgressInfo = this.addForm.progress;
|
|
|
-
|
|
|
this.addForm.executorListFront = this.addForm.executorList;
|
|
|
//删除中间传值的变量数组
|
|
|
delete this.addForm.executorList;
|
|
@@ -2410,6 +2528,8 @@ import { getThemeColor } from '@/utils/commonMethod.js'
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.getTaskTypeList();
|
|
|
+ this.getMyAuditCount();
|
|
|
this.getList();
|
|
|
this.getUsers();
|
|
|
// this.getDailyList()
|