diff --git a/src/api/model/ops.js b/src/api/model/ops.js index 3587e2f0..e0f18460 100644 --- a/src/api/model/ops.js +++ b/src/api/model/ops.js @@ -9,6 +9,13 @@ export default { req: async function(data){ return await http.get(this.url, data); } + }, + audit: { + url: `${config.API_URL}/monitor/auditlog/`, + name: "审计日志", + req: async function(data){ + return await http.get(this.url, data); + } } }, dbbackup: { diff --git a/src/components/GanttComponent.vue b/src/components/GanttComponent.vue index c403cf46..78950af1 100644 --- a/src/components/GanttComponent.vue +++ b/src/components/GanttComponent.vue @@ -38,22 +38,21 @@ export default { gantt.plugins({ tooltip: true }); gantt.config.bar_height = 20; //task高度 gantt.config.duration_unit = "day";// 设置时间单位为天 - + //今天标志 + // gantt.plugins({marker: true}); + // gantt.addMarker({start_date: new Date(),text: '今日'}); + + //工作日设置 // gantt.config.work_time = true; // gantt.setWorkTime({ hours:["20:00-20:00"] }); // gantt.setWorkTime({ day:7, hours:false }); - // gantt.setWorkTime({ hours:["0-24"] }); // gantt.config.start_date = new Date(2023, 9, 1); // gantt.config.end_date = new Date(2023, 9, 10); //更改父项图标 - // gantt.templates.grid_folder = (item) => { - // return "" - // } + // gantt.templates.grid_folder = (item) => { return "" } //更改子项图标 - // gantt.templates.grid_file = (item) => { - // return "" - // } + // gantt.templates.grid_file = (item) => { return "" } gantt.config.columns = [ { name: 'number', label: '任务编号', tree: true, width: '200', align: 'left' }, { name: 'material_name', label: '产品名称', width: '70', align: 'left' }, @@ -131,7 +130,24 @@ export default { // 初始化甘特图 gantt.init(this.$refs.ganttContainer); gantt.parse(this.$props.tasks); - } + }, + // methods:{ + // setBarColor() { + // this.tasks.map(v => { + // var newObj = {}; + // if (v.status === "CJ") { + // newObj = Object.assign(v, { + // 'color': '#aaa8eb' + // }); + // } else if (v.status === "SX") { + // newObj = Object.assign(v, { + // 'color': '#7cbbff' + // }); + // } + // return newObj; + // }); + // }, + // }, }