|
@@ -6,7 +6,7 @@
|
|
|
<el-form-item :label="$t('tasklist')">
|
|
|
<div style="margin-left: 8px">
|
|
|
<!-- <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入项目名称关键字" clearable="true"> -->
|
|
|
- <el-select v-model="searchField" style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')">
|
|
|
+ <el-select v-model="searchField" style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')" v-if="idx != 3">
|
|
|
<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-select>
|
|
@@ -14,8 +14,13 @@
|
|
|
<!-- </el-input> -->
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="idx == 3">
|
|
|
+ <el-input placeholder="请输入任务名称" v-model="auditFileTaskName" size="small" style="margin-top: 6px">
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="getFilesAwaitingReview()"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-form-item :label="$t('subordinatedepartments')" v-if="user.timeType.projectWithDept">
|
|
|
+ <el-form-item :label="$t('subordinatedepartments')" v-if="user.timeType.projectWithDept && idx != 3">
|
|
|
<el-cascader v-model="deptId" :options="departmentList" size="small" :placeholder="$t('qing-xuan-ze-bu-men')"
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover' }" :show-all-levels="false" clearable filterable @change="hiddens"
|
|
|
></el-cascader>
|
|
@@ -31,7 +36,7 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item :label="$t('types')">
|
|
|
+ <el-form-item :label="$t('types')" v-if="idx != 3">
|
|
|
<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>
|
|
@@ -49,7 +54,7 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item :label="$t('lable.taskGrouping')">
|
|
|
+ <el-form-item :label="$t('lable.taskGrouping')" v-if="idx != 3">
|
|
|
<div style="margin-left: 8px">
|
|
|
<el-select v-model="screenTaskGroupingId" style="width:150px;" size="small" :disabled="!screenProjectId" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="hiddens()">
|
|
|
<el-option v-for="item in taskGroupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
@@ -57,7 +62,7 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item :label="$t('ren-yuan')">
|
|
|
+ <el-form-item :label="$t('ren-yuan')" v-if="idx != 3">
|
|
|
<div style="margin-left: 8px">
|
|
|
<el-select v-model="screenPersonnelId" filterable style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="hiddens()" v-if="user.userNameNeedTranslate != '1'">
|
|
|
<el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
@@ -67,7 +72,7 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item v-if="idx != 3">
|
|
|
<div style="display: flex;">
|
|
|
<div style="margin-left: 20px">
|
|
|
<el-select v-model="dateType" style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')">
|
|
@@ -102,11 +107,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)" v-if="user.timeType.taskFileCharge == 1">待审核文件</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%;">
|
|
|
+ <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-column type="index" width="60">
|
|
|
<template slot-scope="scope" >
|
|
|
{{scope.$index+1+(page-1)*size}}
|
|
@@ -118,6 +124,9 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="stagesName" :label="$t('taskstage')" sortable width="180" @mouseover="mouseOver">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.stagesName }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="taskLevel" :label="$t('priority')" sortable width="100">
|
|
|
<template slot-scope="scope">
|
|
@@ -147,6 +156,30 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="finalChargeStatusText" label="文件审核状态" width="210" sortable v-if="user.timeType.taskFileCharge == 1 && [0, 2].includes(idx)">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <template v-if="scope.row.finalChargeStatus != 2">
|
|
|
+ <el-link :type="{'0': 'warning', '1': 'info', '2': 'danger'}[scope.row.fileChargeStatus]" :underline="false">
|
|
|
+ {{ scope.row.finalChargeStatusTextList[0] || '' }}
|
|
|
+ <template v-if="(scope.row.finalChargeStatusTextList || []).length > 1">
|
|
|
+ <TranslationOpenDataText :openid='scope.row.finalChargeStatusTextList[1]'></TranslationOpenDataText>
|
|
|
+ {{ scope.row.finalChargeStatusTextList[2] || '' }}
|
|
|
+ </template>
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-tooltip class="item" effect="dark" content="点击查看" placement="top">
|
|
|
+ <el-link :type="'danger'" :underline="false" @click="showReasonForRejection(scope.row)">
|
|
|
+ {{ scope.row.finalChargeStatusTextList[0] || '' }}
|
|
|
+ <template v-if="(scope.row.finalChargeStatusTextList || []).length > 1">
|
|
|
+ <TranslationOpenDataText :openid='scope.row.finalChargeStatusTextList[1]'></TranslationOpenDataText>
|
|
|
+ {{ scope.row.finalChargeStatusTextList[2] || '' }}
|
|
|
+ </template>
|
|
|
+ </el-link>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </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">
|
|
@@ -183,6 +216,51 @@
|
|
|
</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">
|
|
|
+ <el-table-column prop="projectName" :label="$t('headerTop.projectName')" sortable width="260" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link type="primary" :href="'#/projectInside/'+scope.row.projectId">{{scope.row.projectName}}</el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" :label="$t('nameofthetask')" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.taskName.length > 20">
|
|
|
+ <el-popover trigger="hover" placement="top" width="330" v-if="scope.row.taskName">
|
|
|
+ <p id="caseContent">{{scope.row.taskName}}</p>
|
|
|
+ <div slot="reference" class="name-wrapper">
|
|
|
+ <div class="cal" >
|
|
|
+ <el-link type="primary" @click="editTask(scope.row)">{{scope.row.taskName}}</el-link>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <div class="cal">
|
|
|
+ <el-link type="primary" @click="editTask(scope.row)">{{scope.row.taskName}}</el-link>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-for="(item, index) in scope.row.executorList" :key="index">
|
|
|
+ <template v-if="user.userNameNeedTranslate == 1">
|
|
|
+ <TranslationOpenDataText type='userName' :openid='item.executorName'></TranslationOpenDataText>
|
|
|
+ </template>
|
|
|
+ <template v-if="user.userNameNeedTranslate != 1">
|
|
|
+ {{ item.executorName }}
|
|
|
+ </template>
|
|
|
+ <span v-if="index < scope.row.executorList.length - 1">,</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="文件审核" width="140">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="primary" size="mini" @click="viewFilesAndReviewThem(scope.row)">查看文件并审核</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
<!-- 重启时输入原因 -->
|
|
|
<el-dialog :title="$t('zhongQiRenWu')" :visible.sync="causeRejectionDialog" width="600px" :before-close="handleClose">
|
|
|
<div>
|
|
@@ -307,6 +385,49 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 文件审核 -->
|
|
|
+ <el-dialog title="文件审核" :visible.sync="viewFilesAndReviewThemVisable" width="800px">
|
|
|
+ <el-table :data="viewFilesAndReviewThemRejectList" style="width: 100%" height="500px">
|
|
|
+ <el-table-column :label="$t('headerTop.serialNumber')" prop="documentType" min-width="60" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.$index + 1}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('filenames')" prop="documentName" min-width="180"></el-table-column>
|
|
|
+ <el-table-column :label="$t('filesize')" prop="size" min-width="80" align="center"></el-table-column>
|
|
|
+ <el-table-column :label="$t('founder')" prop="creatorName" min-width="60" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
|
|
|
+ <span v-if="user.userNameNeedTranslate == 1">
|
|
|
+ <TranslationOpenDataText type='userName' :openid='scope.row.creatorName'></TranslationOpenDataText>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('creationtime')" prop="indate" min-width="140" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.indate[0] + '-' + scope.row.indate[1] + '-' + scope.row.indate[2] + '\u0020\u0020' + scope.row.indate[3] + ':' + scope.row.indate[4] + ':' + scope.row.indate[5]}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('operation')" min-width="90" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link :href="scope.row.url" :download="scope.row.documentName" type="primary" style="margin-right:7px">{{ $t('other.download') }}</el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" size="small" :loading="viewFilesAndReviewThemAdoptLoading" @click="viewFilesAndReviewThemRejectCli(1)">通过</el-button>
|
|
|
+ <el-button type="danger" size="small" @click="viewFilesAndReviewThemReject()">驳回</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="文件驳回" :visible.sync="viewFilesAndReviewThemRejectVisable" width="800px">
|
|
|
+ <el-input type="textarea" :rows="5" placeholder="请输入驳回原因" v-model.trim="viewFilesAndReviewThemRejectVal">
|
|
|
+ </el-input>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" size="small" @click="viewFilesAndReviewThemRejectCli(2)" :loading="viewFilesAndReviewThemRejectValLoading">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<style scoped>
|
|
@@ -658,9 +779,77 @@ import { error } from 'dingtalk-jsapi';
|
|
|
allProjectList: [],
|
|
|
exportTaskLoading: false,
|
|
|
screenDeptId: [],
|
|
|
+
|
|
|
+ // 待审核文件
|
|
|
+ documentReview: [],
|
|
|
+ documentReviewLoading: false,
|
|
|
+ auditFileTaskName: '',
|
|
|
+ viewFilesAndReviewThemVisable: false,
|
|
|
+ viewFilesAndReviewThemList: [],
|
|
|
+ viewFilesAndReviewThemTableLoading: false,
|
|
|
+ viewFilesAndReviewThemRejectVisable: false,
|
|
|
+ viewFilesAndReviewThemRejectList: [],
|
|
|
+ viewFilesAndReviewThemRejectVal: '',
|
|
|
+ viewFilesAndReviewThemRejectValLoading: false,
|
|
|
+ viewFilesAndReviewThemRejectRow: {},
|
|
|
+ viewFilesAndReviewThemAdoptLoading: false,
|
|
|
+
|
|
|
+ tablesKey: 1,
|
|
|
+ tablesTwoKey: 300
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ showReasonForRejection(item) {
|
|
|
+ const taskId = item.id
|
|
|
+ this.http.post('/task/getFileRejectReason',{
|
|
|
+ taskId
|
|
|
+ },res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.$alert(res.data, '驳回原因');
|
|
|
+ }else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ },error => { this.$message.error(error) })
|
|
|
+ },
|
|
|
+ viewFilesAndReviewThemRejectCli(auditStatus = 1) {
|
|
|
+ if(!this.viewFilesAndReviewThemRejectVal && auditStatus == 2) {
|
|
|
+ this.$message.error('请输入驳回原因')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.viewFilesAndReviewThemRejectValLoading = true
|
|
|
+ const { id, projectId } = this.viewFilesAndReviewThemRejectRow
|
|
|
+ this.http.post('/task/auditFile',{
|
|
|
+ taskId: id, projectId,
|
|
|
+ auditStatus,
|
|
|
+ reason: auditStatus == 1 ? '' : this.viewFilesAndReviewThemRejectVal
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.viewFilesAndReviewThemRejectList = res.data || []
|
|
|
+ this.viewFilesAndReviewThemRejectVisable = false
|
|
|
+ this.viewFilesAndReviewThemVisable = false
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.getFilesAwaitingReview()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.viewFilesAndReviewThemRejectValLoading=false
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.viewFilesAndReviewThemRejectValLoading=false
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ viewFilesAndReviewThemReject() {
|
|
|
+ this.viewFilesAndReviewThemRejectVal = ''
|
|
|
+ this.viewFilesAndReviewThemRejectVisable = true
|
|
|
+ },
|
|
|
parentMeetingCli(id) {
|
|
|
this.meeting = true
|
|
|
if(id) {
|
|
@@ -668,6 +857,28 @@ import { error } from 'dingtalk-jsapi';
|
|
|
}
|
|
|
console.log(id)
|
|
|
},
|
|
|
+ getViewFilesAndReviewThemList() {
|
|
|
+ this.viewFilesAndReviewThemTableLoading = false
|
|
|
+ this.http.post('/task-files/getTaskFiles',{taskId:this.viewFilesAndReviewThemRejectRow.id},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.viewFilesAndReviewThemRejectList = res.data || []
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.viewFilesAndReviewThemTableLoading=false
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.viewFilesAndReviewThemTableLoading=false
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
confirmMeeting() {
|
|
|
var date = new Date();
|
|
|
let startTime = this.meetingStartValue
|
|
@@ -1016,7 +1227,15 @@ import { error } from 'dingtalk-jsapi';
|
|
|
res.data.records[i].executorNameList = arr
|
|
|
}
|
|
|
}
|
|
|
- this.list = res.data.records
|
|
|
+ // this.tablesKey++
|
|
|
+ this.list = (res.data.records || []).map(item => {
|
|
|
+ let str = item.finalChargeStatusText || ''
|
|
|
+ let arr = str.split(/\$|=/).filter(item => item && item !== 'userName');
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ finalChargeStatusTextList: arr || []
|
|
|
+ }
|
|
|
+ })
|
|
|
this.total = res.data.total
|
|
|
} else {
|
|
|
this.$message({
|
|
@@ -1024,7 +1243,6 @@ import { error } from 'dingtalk-jsapi';
|
|
|
type: "error"
|
|
|
});
|
|
|
}
|
|
|
- // console.log(res)
|
|
|
},
|
|
|
error => {
|
|
|
this.listLoading = false;
|
|
@@ -1035,6 +1253,48 @@ import { error } from 'dingtalk-jsapi';
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ getFilesAwaitingReview() {
|
|
|
+ this.documentReviewLoading = true;
|
|
|
+ let parameter = {
|
|
|
+ pageIndex: this.page,
|
|
|
+ pageSize: this.size,
|
|
|
+ projectId: this.screenProjectId,
|
|
|
+ taskName: this.auditFileTaskName
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.deptId.length > 0) {
|
|
|
+ parameter.deptId = this.deptId[this.deptId.length - 1]
|
|
|
+ } else {
|
|
|
+ parameter.deptId = ''
|
|
|
+ }
|
|
|
+
|
|
|
+ this.http.post('/task/getTaskChargePage', parameter,
|
|
|
+ res => {
|
|
|
+ this.documentReviewLoading = false;
|
|
|
+ if(res.code == 'ok') {
|
|
|
+ this.documentReview = (res.data.records || []).map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ id: item.taskId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.tablesTwoKey++
|
|
|
+ this.total = res.data.total
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.documentReviewLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
// 导出任务
|
|
|
exportTask() {
|
|
|
// console.log('执行代码')
|
|
@@ -1247,7 +1507,16 @@ import { error } from 'dingtalk-jsapi';
|
|
|
this.idx = e
|
|
|
this.page = 1
|
|
|
// console.log(this.searchField)
|
|
|
- this.getList()
|
|
|
+ if([3].includes(e)) {
|
|
|
+ this.getFilesAwaitingReview()
|
|
|
+ } else {
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ viewFilesAndReviewThem(item) {
|
|
|
+ this.viewFilesAndReviewThemRejectRow = item
|
|
|
+ this.viewFilesAndReviewThemVisable = true
|
|
|
+ this.getViewFilesAndReviewThemList()
|
|
|
},
|
|
|
// 下拉框选择
|
|
|
hiddens(e) {
|
|
@@ -1256,7 +1525,11 @@ import { error } from 'dingtalk-jsapi';
|
|
|
}
|
|
|
// console.log(this.searchField)
|
|
|
this.page = 1
|
|
|
- this.getList()
|
|
|
+ if([3].includes(this.idx)) {
|
|
|
+ this.getFilesAwaitingReview()
|
|
|
+ } else {
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
},
|
|
|
// 完成
|
|
|
completes(e, el, obj) {
|