Commit 2f445113 by 杨子

甘特图对接

parent 51352f50
......@@ -41,7 +41,7 @@ import { reactive, ref } from "vue";
import GGanttRow from "./GGanttRow.vue";
import GGanttChart from "./GGanttChart.vue";
import { GanttBarObject } from "../models/models";
import { ClickOutside as vClickOutside, ElPopover} from "element-plus"
import { ClickOutside as vClickOutside, ElPopover, ElMessage } from "element-plus"
import httpRequest from '@/utils/httpRequest.js'
let chartStart = ref("2022-02-01 12:00");
......@@ -72,13 +72,22 @@ const getRandomColor = function(){
&& (color.length == 6) ? color : arguments.callee(color);
})('');
}
const baseUrl = '/task/helicopterTask/getGanttInfo?id=1'
const baseUrl = '/task/helicopterTask/getGanttInfo?id='+ sessionStorage.getItem('taskResultId')
const url = process.env.NODE_ENV === 'production' ? '/jeeplus-vue'+baseUrl: baseUrl
httpRequest
.get(url)
.then(({ data }) => {
if(!data){
ElMessage({
message: '数据正在计算中...',
type: 'warning'
})
return
}
let { beginTime, endTime, name, contreeList } = data;
emits("updateTaskName", name);
chartStart.value = beginTime;
......
......@@ -22,4 +22,9 @@ const router = createRouter({
routes
})
router.beforeEach((to, from, next)=>{
sessionStorage.setItem('taskResultId', to.query.id as string)
next()
})
export default router
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