|
|
|
@ -21,62 +21,57 @@ |
|
|
|
|
</div> |
|
|
|
|
<!-- 选择框 --> |
|
|
|
|
<div class="header_right"> |
|
|
|
|
<div class="right_box"> |
|
|
|
|
<el-button @click="Reset">重置</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div class="right_box"> |
|
|
|
|
<template> |
|
|
|
|
<el-select |
|
|
|
|
v-model="valueproject" |
|
|
|
|
placeholder="请选择项目名称" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in pnameOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
@change="searchBypn" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
<div class="right_box"> |
|
|
|
|
<template> |
|
|
|
|
<el-select |
|
|
|
|
v-model="valuepeople" |
|
|
|
|
placeholder="请选择任务负责人名称" |
|
|
|
|
clearable |
|
|
|
|
@change="searchByhn" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in hnameOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
<div class="right_box"> |
|
|
|
|
<template> |
|
|
|
|
<el-select |
|
|
|
|
v-model="valuetype" |
|
|
|
|
placeholder="请选择任务类型" |
|
|
|
|
clearable |
|
|
|
|
@change="searchBytype" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in typeOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
<div class="table-page-search-wrapper"> |
|
|
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
|
|
|
|
<a-row :gutter="24"> |
|
|
|
|
<a-col :md="6" :sm="12"> |
|
|
|
|
<a-form-item class="searcha"> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
v-model="queryParam.typeId" |
|
|
|
|
placeholder="请选择任务类型" |
|
|
|
|
dict-code="task_type,type_name,id" |
|
|
|
|
></j-dict-select-tag> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :md="6" :sm="12"> |
|
|
|
|
<a-form-item class="searcha"> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
v-model="queryParam.managerUsers" |
|
|
|
|
placeholder="请选责任人" |
|
|
|
|
dict-code="sys_user,realname,id" |
|
|
|
|
style="width: 100%" |
|
|
|
|
></j-dict-select-tag> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :md="6" :sm="12"> |
|
|
|
|
<a-form-item class="searcha"> |
|
|
|
|
<j-dict-select-tag |
|
|
|
|
v-model="queryParam.projectId" |
|
|
|
|
placeholder="请选择项目" |
|
|
|
|
dict-code="projectx,project_name,id" |
|
|
|
|
style="width: 100%" |
|
|
|
|
></j-dict-select-tag> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :md="6" :sm="8"> |
|
|
|
|
<span |
|
|
|
|
style="float: left; overflow: hidden" |
|
|
|
|
class="table-page-search-submitButtons searcha" |
|
|
|
|
> |
|
|
|
|
<a-button type="primary" @click="allUpadate" icon="search"> |
|
|
|
|
查询 |
|
|
|
|
</a-button> |
|
|
|
|
<a-button |
|
|
|
|
type="primary" |
|
|
|
|
@click="Reset" |
|
|
|
|
icon="reload" |
|
|
|
|
style="margin-left: 8px" |
|
|
|
|
>重置</a-button |
|
|
|
|
> |
|
|
|
|
</span> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
</a-form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -87,6 +82,7 @@ |
|
|
|
|
:title="item.status" |
|
|
|
|
:color="item.color" |
|
|
|
|
:total="item.total" |
|
|
|
|
@add="Add" |
|
|
|
|
></HeaderCard> |
|
|
|
|
</div> |
|
|
|
|
<div |
|
|
|
@ -104,12 +100,18 @@ |
|
|
|
|
:projectData="item.data" |
|
|
|
|
:statusNum="item.statusNum" |
|
|
|
|
:timeid="timeid" |
|
|
|
|
:typeId="queryParam.typeId" |
|
|
|
|
:managerUsers="queryParam.managerUsers" |
|
|
|
|
:projectId="queryParam.projectIda" |
|
|
|
|
@getAllData="getAllData" |
|
|
|
|
@delete="Delete" |
|
|
|
|
@edit="Edit" |
|
|
|
|
@fenjie="Decompose" |
|
|
|
|
></ContenCard> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<task-modal ref="modalForm" @ok="allUpadate"></task-modal> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -117,13 +119,15 @@ |
|
|
|
|
import ContenCard from './content_card/ContentCard.vue' |
|
|
|
|
import HeaderCard from './content_card/HeaderCard.vue' |
|
|
|
|
import { getAction, getFileAccessHttpUrl } from '@/api/manage.js' |
|
|
|
|
import TaskModal from '@/views/task/modules/TaskModal' |
|
|
|
|
import { mixinDevice } from '@/utils/mixin' |
|
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
|
|
|
|
export default { |
|
|
|
|
mixins: [JeecgListMixin, mixinDevice], |
|
|
|
|
components: { |
|
|
|
|
ContenCard, |
|
|
|
|
HeaderCard |
|
|
|
|
HeaderCard, |
|
|
|
|
TaskModal |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -176,27 +180,15 @@ export default { |
|
|
|
|
], |
|
|
|
|
time: [ |
|
|
|
|
{ id: 1, name: '当天', select: false }, |
|
|
|
|
{ id: 2, name: '本周', select: false }, |
|
|
|
|
{ id: 2, name: '本周', select: true }, |
|
|
|
|
{ id: 3, name: '本月', select: false }, |
|
|
|
|
{ id: 4, name: '全部', select: false } |
|
|
|
|
], |
|
|
|
|
timeid: '', // 选择的时间段id |
|
|
|
|
loading: true, // 加载中 |
|
|
|
|
valueproject: '', // 项目名字查找绑定值 |
|
|
|
|
valuepeople: '', // 负责人名字查找绑定值 |
|
|
|
|
valuetype: '', // 任务类型查找绑定值 |
|
|
|
|
pnameOptions: [ |
|
|
|
|
{ id: 1, name: 'xxxx项目' }, |
|
|
|
|
{ id: 2, name: 'yyy项目' } |
|
|
|
|
], // 放项目名字数组 |
|
|
|
|
hnameOptions: [ |
|
|
|
|
{ id: 1, name: '小明' }, |
|
|
|
|
{ id: 2, name: '小红' } |
|
|
|
|
], // 负责人名字数组 |
|
|
|
|
typeOptions: [ |
|
|
|
|
{ id: 1, name: '编码' }, |
|
|
|
|
{ id: 2, name: '前端开发' } |
|
|
|
|
] // 负责人名字数组 |
|
|
|
|
timeid: 2, // 选择的时间段id |
|
|
|
|
loading: true // 加载中 |
|
|
|
|
// valueproject: '', // 项目名字查找绑定值 |
|
|
|
|
// valuepeople: '', // 负责人名字查找绑定值 |
|
|
|
|
// valuetype: '' // 任务类型查找绑定值 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -212,18 +204,21 @@ export default { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 分类获取全部数据 |
|
|
|
|
async getAllData(index, time) { |
|
|
|
|
async getAllData(index, time, typeId, managerUsers, projectId) { |
|
|
|
|
const res = await getAction(this.url.list, { |
|
|
|
|
workStatus: this.TotalData[index].statusNum, |
|
|
|
|
time |
|
|
|
|
time, |
|
|
|
|
typeId, |
|
|
|
|
managerUsers, |
|
|
|
|
projectId |
|
|
|
|
}) |
|
|
|
|
if (res.success) { |
|
|
|
|
console.log(this.TotalData[index].statusNum, time) |
|
|
|
|
this.TotalData[index].data = res.result.records |
|
|
|
|
this.TotalData[index].total = res.result.total |
|
|
|
|
this.TotalData[index].data.forEach((element) => { |
|
|
|
|
element.headpic = getFileAccessHttpUrl(element.headpic) |
|
|
|
|
element.taskPic = getFileAccessHttpUrl(element.taskPic) |
|
|
|
|
element.taskFile = getFileAccessHttpUrl(element.taskFile) |
|
|
|
|
}) |
|
|
|
|
this.loading = false |
|
|
|
|
} else { |
|
|
|
@ -232,23 +227,31 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 分页获取 |
|
|
|
|
async getDataByPage(index, current, lastPage, time) { |
|
|
|
|
async getDataByPage( |
|
|
|
|
index, |
|
|
|
|
current, |
|
|
|
|
lastPage, |
|
|
|
|
time, |
|
|
|
|
typeId, |
|
|
|
|
managerUsers, |
|
|
|
|
projectId |
|
|
|
|
) { |
|
|
|
|
this.loading = true |
|
|
|
|
if (!lastPage) { |
|
|
|
|
const res = await getAction(this.url.list, { |
|
|
|
|
workStatus: this.TotalData[index].statusNum, |
|
|
|
|
pageNo: current, |
|
|
|
|
time |
|
|
|
|
time, |
|
|
|
|
typeId, |
|
|
|
|
managerUsers, |
|
|
|
|
projectId |
|
|
|
|
}) |
|
|
|
|
if (res.success) { |
|
|
|
|
console.log('底部数据', current, lastPage) |
|
|
|
|
console.log('请求回来的数据', res.result, '第几页', current) |
|
|
|
|
this.TotalData[index].data = [ |
|
|
|
|
...this.TotalData[index].data, |
|
|
|
|
...res.result.records |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
this.TotalData[index].data = [ |
|
|
|
|
...this.TotalData[index].data, |
|
|
|
|
...res.result.records |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
if (res.result.records.length < 10) { |
|
|
|
|
this.TotalData[index].lastPage = true |
|
|
|
|
} |
|
|
|
@ -268,7 +271,10 @@ export default { |
|
|
|
|
index, |
|
|
|
|
this.TotalData[index].currentPage, |
|
|
|
|
this.TotalData[index].lastPage, |
|
|
|
|
time |
|
|
|
|
time, |
|
|
|
|
this.queryParam.typeId, |
|
|
|
|
this.queryParam.managerUsers, |
|
|
|
|
this.queryParam.projectId |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -280,54 +286,69 @@ export default { |
|
|
|
|
|
|
|
|
|
// 选择日期内的任务 |
|
|
|
|
async selectTime(time) { |
|
|
|
|
this.timeid = time |
|
|
|
|
this.allUpadate() |
|
|
|
|
// 变颜色 |
|
|
|
|
for (let i = 0; i < 4; i++) { |
|
|
|
|
this.getAllData(i, time) |
|
|
|
|
this.timeid = time |
|
|
|
|
// 变颜色 |
|
|
|
|
this.time[i].select = false |
|
|
|
|
if (this.time[i].id === time) { |
|
|
|
|
this.time[i].select = true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 根据项目名字查找 |
|
|
|
|
searchBypn() { |
|
|
|
|
console.log(this.valueproject) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 根据负责人名字查找 |
|
|
|
|
searchByhn() { |
|
|
|
|
console.log(this.valuepeople) |
|
|
|
|
}, |
|
|
|
|
// 根据任务类型查找 |
|
|
|
|
searchBytype() { |
|
|
|
|
console.log(this.valuetype) |
|
|
|
|
}, |
|
|
|
|
// 点击重置 |
|
|
|
|
// 重置 |
|
|
|
|
Reset() { |
|
|
|
|
this.valueproject = '' |
|
|
|
|
this.valuepeople = '' |
|
|
|
|
this.valuetype = '' |
|
|
|
|
this.searchReset() |
|
|
|
|
for (let i = 0; i < 4; i++) { |
|
|
|
|
this.getAllData(i, this.timeid) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 添加 |
|
|
|
|
Add() { |
|
|
|
|
this.handleAdd() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 删除 |
|
|
|
|
Delete(id) { |
|
|
|
|
Delete(id, tid) { |
|
|
|
|
this.handleDelete(id) |
|
|
|
|
this.getAllData(0, 3) |
|
|
|
|
this.getAllData(0, 3) |
|
|
|
|
this.getAllData(0, tid, this.queryParam.typeId) |
|
|
|
|
this.getAllData(0, tid, this.queryParam.typeId) |
|
|
|
|
}, |
|
|
|
|
// 编辑 |
|
|
|
|
async Edit(record, tid) { |
|
|
|
|
await this.handleEdit(record) |
|
|
|
|
// this.getAllData(0, tid, this.queryParam.typeId) |
|
|
|
|
// this.getAllData(0, tid, this.queryParam.typeId) |
|
|
|
|
}, |
|
|
|
|
// 分解任务 |
|
|
|
|
Decompose(record, tid) { |
|
|
|
|
this.fengjieRenwu(record) |
|
|
|
|
}, |
|
|
|
|
// 更新(根据条件更新数据) |
|
|
|
|
allUpadate() { |
|
|
|
|
for (let i = 0; i < 4; i++) { |
|
|
|
|
this.TotalData[i].currentPage = 1 |
|
|
|
|
this.TotalData[i].lastPage = false |
|
|
|
|
this.getAllData( |
|
|
|
|
i, |
|
|
|
|
this.timeid, |
|
|
|
|
this.queryParam.typeId, |
|
|
|
|
this.queryParam.managerUsers, |
|
|
|
|
this.queryParam.projectId |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() {}, |
|
|
|
|
created() { |
|
|
|
|
this.getAllData(0) |
|
|
|
|
this.getAllData(1) |
|
|
|
|
this.getAllData(2) |
|
|
|
|
this.getAllData(3) |
|
|
|
|
this.allUpadate() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
|
.a { |
|
|
|
|
width: 15rem; |
|
|
|
|
} |
|
|
|
|
.bigcontent { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
@ -373,14 +394,10 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.header_right { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: row-reverse; |
|
|
|
|
width: 60%; |
|
|
|
|
height: 100%; |
|
|
|
|
.right_box { |
|
|
|
|
margin-top: auto; |
|
|
|
|
margin-bottom: auto; |
|
|
|
|
margin-left: 0.5rem; |
|
|
|
|
.searcha { |
|
|
|
|
margin-top: 16%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -389,7 +406,7 @@ export default { |
|
|
|
|
justify-content: space-between; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
margin-top: 2%; |
|
|
|
|
margin-top: 1%; |
|
|
|
|
//background-color: rgb(48, 214, 159); |
|
|
|
|
.content_box { |
|
|
|
|
width: 24%; |
|
|
|
|