Commit 294b7eb5 authored by 王鑫's avatar 王鑫

feat: 进度用户节点

parent c41cc552
<template> <template>
<a-card class="cust-list-cart"> <a-card class="cust-list-cart">
<!-- <q-page class="q-pa-sm">-->
<gantt-elastic <gantt-elastic
:options="options" :options="options"
:tasks="tasks" :tasks="tasks"
...@@ -10,9 +9,6 @@ ...@@ -10,9 +9,6 @@
> >
<gantt-header slot="header" :options="options"></gantt-header> <gantt-header slot="header" :options="options"></gantt-header>
</gantt-elastic> </gantt-elastic>
<!-- <div class="q-mt-md" />-->
<!-- <q-btn @click="addTask" icon="mdi-plus" label="Add tas k" />-->
<!-- </q-page>-->
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<a-pagination <a-pagination
@change="pageChange" @change="pageChange"
...@@ -181,7 +177,6 @@ export default { ...@@ -181,7 +177,6 @@ export default {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) { if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
let respData = response.data; let respData = response.data;
let taskList = []; let taskList = [];
respData = respData.splice(0,30)
for (const respDataKey in respData) { for (const respDataKey in respData) {
let day = this.GetNumberOfDays(new Date(),respData[respDataKey].begin); let day = this.GetNumberOfDays(new Date(),respData[respDataKey].begin);
let duration = this.GetNumberOfDays(respData[respDataKey].begin,respData[respDataKey].end); let duration = this.GetNumberOfDays(respData[respDataKey].begin,respData[respDataKey].end);
...@@ -197,7 +192,27 @@ export default { ...@@ -197,7 +192,27 @@ export default {
type: "project" type: "project"
}) })
// 子元素 // 子元素
}else { }else if(respData[respDataKey].name=== "") {
taskList.push({
id: respData[respDataKey].id,
name: '',
user:'',
label: respData[respDataKey].label,
parentId: respData[respDataKey].parentId,
start: getDate(24 * day),
duration: duration * 24 * 60 * 60 * 1000,
percent: 50,
type: "milestone",
collapsed: true,
style: {
base: {
fill: "#0287D0",
stroke: "#0077C0"
}
}
})
}
else{
taskList.push({ taskList.push({
id: respData[respDataKey].id, id: respData[respDataKey].id,
name: "", name: "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment