|
@@ -33,7 +33,7 @@
|
|
|
|
|
|
<el-form-item :label="'项目'">
|
|
|
<div style="margin-left: 8px">
|
|
|
- <el-select v-model="screenProjectId" style="width:150px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="screenProjectChange">
|
|
|
+ <el-select v-model="screenProjectId" filterable style="width:150px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="screenProjectChange">
|
|
|
<el-option v-for="item in allProjectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -82,6 +82,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right;" v-if="user.companyId != '3092'">
|
|
|
<el-link type="primary" icon="el-icon-circle-plus-outline" :underline="false" @click="addTask()">新建任务</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="exportTask()" style="margin-left: 20px;" v-loading="exportTaskLoading">导出</el-link>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
@@ -103,7 +104,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="stagesName" :label="$t('taskstage')" sortable width="180" @mouseover="mouseOver">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="taskLevel" label="优先级" sortable width="180">
|
|
|
+ <el-table-column prop="taskLevel" label="优先级" sortable width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span v-if="scope.row.taskLevel == 0">一般</span>
|
|
@@ -140,11 +141,6 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <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="executorName" :label="$t('zhi-hang-ren')" sortable width="130">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->
|
|
@@ -159,6 +155,11 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="startDate" :label="$t('starttimes')" sortable width="180"></el-table-column>
|
|
|
+ <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="endDate" :label="$t('deadline')" width="310" fixed="right" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<div style="display: flex;justify-content: space-between;padding-right: 40px">
|
|
@@ -639,7 +640,8 @@ import { error } from 'dingtalk-jsapi';
|
|
|
screenProjectId: '',
|
|
|
screenTaskGroupingId: '',
|
|
|
screenPersonnelId: '',
|
|
|
- allProjectList: []
|
|
|
+ allProjectList: [],
|
|
|
+ exportTaskLoading: false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -962,6 +964,59 @@ import { error } from 'dingtalk-jsapi';
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 导出任务
|
|
|
+ exportTask() {
|
|
|
+ // console.log('执行代码')
|
|
|
+ this.exportTaskLoading = true
|
|
|
+ let url = '' // 导出连接
|
|
|
+ let parameter = {
|
|
|
+ status: this.searchField,
|
|
|
+ viewId: this.idx,
|
|
|
+ pageIndex: this.page,
|
|
|
+ pageSize: this.size,
|
|
|
+ // type: this.typeField
|
|
|
+ projectId: this.screenProjectId,
|
|
|
+ groupId: this.screenTaskGroupingId,
|
|
|
+ targetUserId: this.screenPersonnelId
|
|
|
+ }
|
|
|
+ if(this.typeField != 'null' && this.typeField != null && this.typeField != '') {
|
|
|
+ parameter.type = this.typeField
|
|
|
+ }
|
|
|
+ if(this.dateSelect != null && this.dateSelect.length != 0){
|
|
|
+ parameter.dateType = this.dateType
|
|
|
+ parameter.startDate = this.dateSelect[0]
|
|
|
+ parameter.endDate = this.dateSelect[1]
|
|
|
+ }
|
|
|
+ if(this.deptId.length > 0) {
|
|
|
+ parameter.deptId = this.deptId[this.deptId.length - 1]
|
|
|
+ } else {
|
|
|
+ parameter.deptId = ''
|
|
|
+ }
|
|
|
+ this.http.post(url, parameter,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.exportTaskLoading = false;
|
|
|
+ var aTag = document.createElement('a');
|
|
|
+ aTag.download = '待办任务';
|
|
|
+ aTag.href = res.data;
|
|
|
+ aTag.click();
|
|
|
+ } else {
|
|
|
+ this.exportTaskLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ this.exportTaskLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
//显示新增界面
|
|
|
handleAdd(i, item) {
|
|
|
if(i == -1) {
|