Browse Source

升级甘特图

master
陈裕财 4 years ago
parent
commit
b3da397ce4
  1. 2
      package.json
  2. 16
      src/views/xm/core/components/xm-gantt.vue

2
package.json

@ -57,7 +57,7 @@
"vue-router": "3.0.1", "vue-router": "3.0.1",
"vuedraggable": "2.15.0", "vuedraggable": "2.15.0",
"vuex": "3.0.1", "vuex": "3.0.1",
"wl-gantt": "^1.0.4",
"wl-gantt": "^1.0.6",
"xlsx": "^0.14.5" "xlsx": "^0.14.5"
}, },
"devDependencies": { "devDependencies": {

16
src/views/xm/core/components/xm-gantt.vue

@ -1,13 +1,15 @@
<template> <template>
<section> <section>
<wl-gantt :data="treeData" <wl-gantt :data="treeData"
:start-date="projectPhase.startTime"
:end-date="projectPhase.endTime"
:usePreColumn="true" :usePreColumn="true"
:dateType="'monthAndDay'"
:startDate="projectDateRange.startTime"
:endDate="projectDateRange.endTime"
:autoGanttDateType="true"
:checkSource="true" :checkSource="true"
:useRealTime="useRealTime" :useRealTime="useRealTime"
:treeProps="{children: 'children', hasChildren: 'hasChildren',pid:'parentPhaseId', pre: 'taskFinishCnt'}"
:props="columns"
:treeProps="{children: 'children', hasChildren: 'hasChildren',pid:'parentTaskid', pre: 'preTaskid',startDate:'startTime',endDate:'endTime',realStartDate:'actStartTime',realEndDate:'actEndTime'}"
row-key="id"> row-key="id">
<!-- <el-table-column prop="name" label="计划名称" min-width="160" > <!-- <el-table-column prop="name" label="计划名称" min-width="160" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -41,12 +43,12 @@ Vue.use(wlGantt)
return {}; return {};
} }
}, },
projectPhase: {
projectDateRange: {
type: Object, type: Object,
default: () => { default: () => {
return { return {
startTime: '2020-06-01',
endTime: '2021-12-30'
startTime: '2022-01-01',
endTime: '2022-12-30'
} }
} }
}, },

Loading…
Cancel
Save