Compare commits
	
		
			No commits in common. "42841de47d15e9010807c567a9387809c5c8f7ae" and "9761ce29abaf62c01195aa70d3bbc588716abcf1" have entirely different histories.
		
	
	
		
			42841de47d
			...
			9761ce29ab
		
	
		
							
								
								
									
										1
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							@ -9,7 +9,6 @@ declare module '@vue/runtime-core' {
 | 
			
		||||
  export interface GlobalComponents {
 | 
			
		||||
    AboutView: typeof import('./src/components/AboutView.vue')['default']
 | 
			
		||||
    Collapse: typeof import('./src/components/Collapse/index.vue')['default']
 | 
			
		||||
    Dialog: typeof import('./src/components/Dialog/index.vue')['default']
 | 
			
		||||
    HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
 | 
			
		||||
    HomeView: typeof import('./src/components/HomeView.vue')['default']
 | 
			
		||||
    IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										521
									
								
								src/api/Gantt/gantt.js
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										521
									
								
								src/api/Gantt/gantt.js
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@ -1,525 +1,26 @@
 | 
			
		||||
import { defAxios as request } from '@/utils/http'
 | 
			
		||||
const baseUrl = `${window.settings.apis}/gantt`
 | 
			
		||||
 | 
			
		||||
const ddList = {
 | 
			
		||||
  code: 200,
 | 
			
		||||
  message: '成功',
 | 
			
		||||
  data: {
 | 
			
		||||
    list: [
 | 
			
		||||
      {
 | 
			
		||||
        id: 1,
 | 
			
		||||
        name: '民兵3',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '美国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 2,
 | 
			
		||||
        name: '三叉戟II',
 | 
			
		||||
        model: 'D5',
 | 
			
		||||
        countryName: '美国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 3,
 | 
			
		||||
        name: '火星-15',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '朝鲜',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 4,
 | 
			
		||||
        name: '东风-5甲',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '中国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 5,
 | 
			
		||||
        name: '东风-5乙',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '中国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 6,
 | 
			
		||||
        name: '东风-31',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '中国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 7,
 | 
			
		||||
        name: 'SS-18“撒旦”',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '俄罗斯',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 8,
 | 
			
		||||
        name: 'M51',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '法国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: null,
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
const sub = {
 | 
			
		||||
  code: 200,
 | 
			
		||||
  message: '成功',
 | 
			
		||||
  data: {
 | 
			
		||||
    list: [
 | 
			
		||||
      {
 | 
			
		||||
        id: 1,
 | 
			
		||||
        name: '飞机',
 | 
			
		||||
        level: 2,
 | 
			
		||||
        pid: 1,
 | 
			
		||||
        children: [
 | 
			
		||||
          {
 | 
			
		||||
            id: 2,
 | 
			
		||||
            name: '轰炸机',
 | 
			
		||||
            level: 3,
 | 
			
		||||
            pid: 1,
 | 
			
		||||
            children: [
 | 
			
		||||
              {
 | 
			
		||||
                id: 10,
 | 
			
		||||
                activityId: 1,
 | 
			
		||||
                name: '轰炸合计',
 | 
			
		||||
                equipModel: '歼-15',
 | 
			
		||||
                describe: null,
 | 
			
		||||
                reportSite: null,
 | 
			
		||||
                startTime: '2026-11-30 16:00:00',
 | 
			
		||||
                endTime: '2025-03-27 16:00:00',
 | 
			
		||||
                fileUrl:
 | 
			
		||||
                  '/upload/1741082451927/Snipaste_2026-12-26_09-53-15.png',
 | 
			
		||||
                oneType: 1,
 | 
			
		||||
                twoType: 2,
 | 
			
		||||
                twoTypeName: '轰炸机',
 | 
			
		||||
                level: 4,
 | 
			
		||||
                pid: 2,
 | 
			
		||||
                status: 1,
 | 
			
		||||
              },
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 1,
 | 
			
		||||
            name: '战斗机',
 | 
			
		||||
            level: 3,
 | 
			
		||||
            pid: 1,
 | 
			
		||||
            children: [
 | 
			
		||||
              {
 | 
			
		||||
                id: 4,
 | 
			
		||||
                activityId: 1,
 | 
			
		||||
                name: 'cehi',
 | 
			
		||||
                equipModel: '歼-15',
 | 
			
		||||
                describe: null,
 | 
			
		||||
                reportSite: null,
 | 
			
		||||
                startTime: '2025-01-31 16:00:00',
 | 
			
		||||
                endTime: '2025-04-28 16:00:00',
 | 
			
		||||
                fileUrl:
 | 
			
		||||
                  '/upload/1741078260582/Snipaste_2026-12-26_09-53-15.png',
 | 
			
		||||
                oneType: 1,
 | 
			
		||||
                twoType: 1,
 | 
			
		||||
                twoTypeName: '战斗机',
 | 
			
		||||
                level: 4,
 | 
			
		||||
                pid: 1,
 | 
			
		||||
                status: 1,
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                id: 3,
 | 
			
		||||
                activityId: 1,
 | 
			
		||||
                name: 'rr',
 | 
			
		||||
                equipModel: '歼-20',
 | 
			
		||||
                describe: null,
 | 
			
		||||
                reportSite: null,
 | 
			
		||||
                startTime: '2026-12-31 16:00:00',
 | 
			
		||||
                endTime: '2025-04-09 16:00:00',
 | 
			
		||||
                fileUrl:
 | 
			
		||||
                  '/upload/1741078034784/Snipaste_2026-12-26_09-53-15.png',
 | 
			
		||||
                oneType: 1,
 | 
			
		||||
                twoType: 1,
 | 
			
		||||
                twoTypeName: '战斗机',
 | 
			
		||||
                level: 4,
 | 
			
		||||
                pid: 1,
 | 
			
		||||
                status: 1,
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                id: 2,
 | 
			
		||||
                activityId: 1,
 | 
			
		||||
                name: '测试战斗机',
 | 
			
		||||
                equipModel: 'adsf',
 | 
			
		||||
                describe: null,
 | 
			
		||||
                reportSite: null,
 | 
			
		||||
                startTime: '2025-03-04 16:00:00',
 | 
			
		||||
                endTime: '2025-04-09 16:00:00',
 | 
			
		||||
                fileUrl:
 | 
			
		||||
                  '/upload/1741077889066/Snipaste_2026-12-26_09-53-15.png',
 | 
			
		||||
                oneType: 1,
 | 
			
		||||
                twoType: 1,
 | 
			
		||||
                twoTypeName: '战斗机',
 | 
			
		||||
                level: 4,
 | 
			
		||||
                pid: 1,
 | 
			
		||||
                status: 2,
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                id: 1,
 | 
			
		||||
                activityId: 1,
 | 
			
		||||
                name: '起飞',
 | 
			
		||||
                equipModel: '歼-20',
 | 
			
		||||
                describe: '飞机起飞',
 | 
			
		||||
                reportSite: '北京站',
 | 
			
		||||
                startTime: '2025-03-03 09:21:34',
 | 
			
		||||
                endTime: '2025-03-03 09:21:34',
 | 
			
		||||
                fileUrl: 'https://www.iocoder.cn',
 | 
			
		||||
                oneType: 1,
 | 
			
		||||
                twoType: 1,
 | 
			
		||||
                twoTypeName: '战斗机',
 | 
			
		||||
                level: 4,
 | 
			
		||||
                pid: 1,
 | 
			
		||||
                status: 2,
 | 
			
		||||
              },
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 2,
 | 
			
		||||
        name: '舰船',
 | 
			
		||||
        level: 2,
 | 
			
		||||
        pid: 1,
 | 
			
		||||
        children: [
 | 
			
		||||
          {
 | 
			
		||||
            id: 7,
 | 
			
		||||
            name: '驱逐舰',
 | 
			
		||||
            level: 3,
 | 
			
		||||
            pid: 2,
 | 
			
		||||
            children: [
 | 
			
		||||
              {
 | 
			
		||||
                id: 9,
 | 
			
		||||
                activityId: 1,
 | 
			
		||||
                name: '优惠',
 | 
			
		||||
                equipModel: '歼-15',
 | 
			
		||||
                describe: null,
 | 
			
		||||
                reportSite: null,
 | 
			
		||||
                startTime: '2025-02-28 16:00:00',
 | 
			
		||||
                endTime: '2025-03-04 16:00:00',
 | 
			
		||||
                fileUrl:
 | 
			
		||||
                  '/upload/1741080337527/Snipaste_2026-12-26_09-53-15.png',
 | 
			
		||||
                oneType: 2,
 | 
			
		||||
                twoType: 7,
 | 
			
		||||
                twoTypeName: '驱逐舰',
 | 
			
		||||
                level: 4,
 | 
			
		||||
                pid: 7,
 | 
			
		||||
                status: 1,
 | 
			
		||||
              },
 | 
			
		||||
            ],
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 3,
 | 
			
		||||
        name: '遥感',
 | 
			
		||||
        level: 2,
 | 
			
		||||
        pid: 1,
 | 
			
		||||
        children: [],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 4,
 | 
			
		||||
        name: '公开源',
 | 
			
		||||
        level: 2,
 | 
			
		||||
        pid: 1,
 | 
			
		||||
        children: [],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 5,
 | 
			
		||||
        name: '航警',
 | 
			
		||||
        level: 2,
 | 
			
		||||
        pid: 1,
 | 
			
		||||
        children: [],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 6,
 | 
			
		||||
        name: '频谱&组网',
 | 
			
		||||
        level: 2,
 | 
			
		||||
        pid: 1,
 | 
			
		||||
        children: [],
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 7,
 | 
			
		||||
        name: '声音&视频&流量&告警',
 | 
			
		||||
        level: 2,
 | 
			
		||||
        pid: 1,
 | 
			
		||||
        children: [],
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const main = {
 | 
			
		||||
  code: 200,
 | 
			
		||||
  message: '成功',
 | 
			
		||||
  data: {
 | 
			
		||||
    list: [
 | 
			
		||||
      {
 | 
			
		||||
        id: 1,
 | 
			
		||||
        name: '民兵3',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '美国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: [
 | 
			
		||||
          {
 | 
			
		||||
            id: 22,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: 'sdfas',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: 'adfdf',
 | 
			
		||||
            startTime: '2025-03-05 00:00:00',
 | 
			
		||||
            endTime: '2025-05-01 00:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 15,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '朝鲜发射火星-18洲际弹道导弹事件',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe:
 | 
			
		||||
              '2025年10月4日,朝鲜发射火星-18洲际弹道导弹,这是一种固体燃料的洲际弹道导弹。\n导弹发射后,美国、日本、韩国强烈谴责,认为此举加剧地区紧张,同时联合国呼吁朝鲜遵守安理会决议,停止导弹试验。',
 | 
			
		||||
            startTime: '2025-10-03 16:00:00',
 | 
			
		||||
            endTime: '2025-10-03 16:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 3,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '美国民兵3发射试验2',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '美国民兵3在太平洋发射试验2',
 | 
			
		||||
            startTime: '2026-03-05 13:14:58',
 | 
			
		||||
            endTime: '2026-03-13 13:15:10',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 2,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '美国民兵3发射试验1',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '美国民兵3在太平洋发射试验1',
 | 
			
		||||
            startTime: '2026-05-04 13:14:05',
 | 
			
		||||
            endTime: '2026-05-05 13:14:14',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 1,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '美国民兵3发射试验',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '美国民兵3在太平洋发射试验',
 | 
			
		||||
            startTime: '2025-01-04 13:12:40',
 | 
			
		||||
            endTime: '2025-01-05 13:12:50',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 12,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '测试添加---编辑',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '测试添加描述---编辑',
 | 
			
		||||
            startTime: '2025-03-01 00:00:00',
 | 
			
		||||
            endTime: '2025-03-03 00:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 21,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '0307测试事件',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '1111111111',
 | 
			
		||||
            startTime: '2025-03-07 00:00:00',
 | 
			
		||||
            endTime: '2025-03-07 00:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
const main2 = {
 | 
			
		||||
  code: 200,
 | 
			
		||||
  message: '成功',
 | 
			
		||||
  data: {
 | 
			
		||||
    list: [
 | 
			
		||||
      {
 | 
			
		||||
        id: 1,
 | 
			
		||||
        name: '民兵3',
 | 
			
		||||
        model: null,
 | 
			
		||||
        countryName: '美国',
 | 
			
		||||
        remark: null,
 | 
			
		||||
        children: [
 | 
			
		||||
          {
 | 
			
		||||
            id: 22,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: 'sdfas123',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: 'adfdf',
 | 
			
		||||
            startTime: '2025-03-27 00:00:00',
 | 
			
		||||
            endTime: '2025-05-01 00:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 12,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '测试添加-12--编辑',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '测试添加描述---编辑',
 | 
			
		||||
            startTime: '2025-04-01 00:00:00',
 | 
			
		||||
            endTime: '2025-04-03 00:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 21,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '0307测试12事件',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '1111111111',
 | 
			
		||||
            startTime: '2025-04-07 00:00:00',
 | 
			
		||||
            endTime: '2025-04-07 00:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 1,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '美国民兵3发射12试验',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '美国民兵3在太平洋发射试验',
 | 
			
		||||
            startTime: '2025-06-04 13:12:40',
 | 
			
		||||
            endTime: '2025-06-05 13:12:50',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 15,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '朝鲜发射火星-18洲123际弹道导弹事件',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe:
 | 
			
		||||
              '2025年10月4日,朝鲜发射火星-18洲际弹道导弹,这是一种固体燃料的洲际弹道导弹。\n导弹发射后,美国、日本、韩国强烈谴责,认为此举加剧地区紧张,同时联合国呼吁朝鲜遵守安理会决议,停止导弹试验。',
 | 
			
		||||
            startTime: '2025-10-03 16:00:00',
 | 
			
		||||
            endTime: '2025-10-03 16:00:00',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 3,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '美国民兵3发射试123验2',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '美国民兵3在太平洋发射试验2',
 | 
			
		||||
            startTime: '2026-03-05 13:14:58',
 | 
			
		||||
            endTime: '2026-03-13 13:15:10',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            id: 2,
 | 
			
		||||
            targetId: 1,
 | 
			
		||||
            name: '美国民兵3发射123试验1',
 | 
			
		||||
            code: null,
 | 
			
		||||
            describe: '美国民兵3在太平洋发射试验1',
 | 
			
		||||
            startTime: '2026-05-04 13:14:05',
 | 
			
		||||
            endTime: '2026-05-05 13:14:14',
 | 
			
		||||
            fileUrl: null,
 | 
			
		||||
            source: null,
 | 
			
		||||
            publishTime: null,
 | 
			
		||||
            status: null,
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
export function getDDList() {
 | 
			
		||||
  return new Promise((resolve, reject) => {
 | 
			
		||||
    setTimeout(() => {
 | 
			
		||||
      resolve(ddList)
 | 
			
		||||
    }, 200)
 | 
			
		||||
  return request({
 | 
			
		||||
    url: `${baseUrl}/gantt/target-info/simp-list`,
 | 
			
		||||
    method: 'get',
 | 
			
		||||
  })
 | 
			
		||||
  //   return request({
 | 
			
		||||
  //     url: `${baseUrl}/gantt/target-info/simp-list`,
 | 
			
		||||
  //     method: 'get',
 | 
			
		||||
  //   })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getMainGantt(data = {}) {
 | 
			
		||||
  return new Promise((resolve, reject) => {
 | 
			
		||||
    setTimeout(() => {
 | 
			
		||||
      if (data.status === 1) {
 | 
			
		||||
        resolve(main)
 | 
			
		||||
      } else {
 | 
			
		||||
        resolve(main2)
 | 
			
		||||
      }
 | 
			
		||||
    }, 200)
 | 
			
		||||
  return request({
 | 
			
		||||
    url: `${baseUrl}/gantt/target-info/gantt-list`,
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data,
 | 
			
		||||
  })
 | 
			
		||||
  //   return request({
 | 
			
		||||
  //     url: `${baseUrl}/gantt/target-info/gantt-list`,
 | 
			
		||||
  //     method: 'post',
 | 
			
		||||
  //     data,
 | 
			
		||||
  //   })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getSubGantt(params) {
 | 
			
		||||
  return new Promise((resolve, reject) => {
 | 
			
		||||
    setTimeout(() => {
 | 
			
		||||
      resolve(sub)
 | 
			
		||||
    }, 200)
 | 
			
		||||
  return request({
 | 
			
		||||
    url: `${baseUrl}/gantt/activity-event/gantt-list`,
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params,
 | 
			
		||||
  })
 | 
			
		||||
  //   return request({
 | 
			
		||||
  //     url: `${baseUrl}/gantt/activity-event/gantt-list`,
 | 
			
		||||
  //     method: 'get',
 | 
			
		||||
  //     params,
 | 
			
		||||
  //   })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/api/Gantt/index.js
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								src/api/Gantt/index.js
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								src/assets/fonts/digital.ttf
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								src/assets/fonts/digital.ttf
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@ -1,13 +0,0 @@
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { useDialog } from 'naive-ui'
 | 
			
		||||
import { defineComponent } from 'vue'
 | 
			
		||||
 | 
			
		||||
// content
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  setup() {
 | 
			
		||||
    window.$dialog = useDialog()
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template></template>
 | 
			
		||||
@ -4,7 +4,6 @@ export const useTree = () => {
 | 
			
		||||
    getAllKeys,
 | 
			
		||||
    getLeafNodeIds,
 | 
			
		||||
    getLeafNode,
 | 
			
		||||
    getTimeRangeForTree,
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -73,36 +72,3 @@ function getLeafNode(tree) {
 | 
			
		||||
 | 
			
		||||
  return leafNodes
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getTimeRangeForTree(tree) {
 | 
			
		||||
  let earliestStartTime = null
 | 
			
		||||
  let latestEndTime = null
 | 
			
		||||
  function traverse(node) {
 | 
			
		||||
    if ('startTime' in node) {
 | 
			
		||||
      const nodeStartTime = new Date(node.startTime).getTime()
 | 
			
		||||
      const nodeEndTime = new Date(node.endTime).getTime()
 | 
			
		||||
      if (
 | 
			
		||||
        earliestStartTime === null ||
 | 
			
		||||
        nodeStartTime < new Date(earliestStartTime).getTime()
 | 
			
		||||
      ) {
 | 
			
		||||
        earliestStartTime = node.startTime
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (
 | 
			
		||||
        latestEndTime === null ||
 | 
			
		||||
        nodeEndTime > new Date(latestEndTime).getTime()
 | 
			
		||||
      ) {
 | 
			
		||||
        latestEndTime = node.endTime
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    if (
 | 
			
		||||
      node.children &&
 | 
			
		||||
      Array.isArray(node.children) &&
 | 
			
		||||
      node.children.length > 0
 | 
			
		||||
    ) {
 | 
			
		||||
      node.children.forEach(child => traverse(child))
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  tree.forEach(rootNode => traverse(rootNode))
 | 
			
		||||
  return [earliestStartTime, latestEndTime]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,6 @@ const useGantt = ({ router, route }: GanttParams) => {
 | 
			
		||||
 | 
			
		||||
  const timeRange = ref([])
 | 
			
		||||
  const plans = ref()
 | 
			
		||||
  const happen = ref()
 | 
			
		||||
  // onMounted(() => {
 | 
			
		||||
  //   getGanttData()
 | 
			
		||||
  // })
 | 
			
		||||
@ -84,12 +83,12 @@ const useGantt = ({ router, route }: GanttParams) => {
 | 
			
		||||
                const date = new Date(mainEvent.startTime)
 | 
			
		||||
                const year = date.getFullYear()
 | 
			
		||||
                const month = date.getMonth()
 | 
			
		||||
                const startOfMonth = new Date(year, month, 1)
 | 
			
		||||
                // const startOfMonth = new Date(year, month, mainEvent.startTime)
 | 
			
		||||
                //const startOfMonth = new Date(year, month, 1)
 | 
			
		||||
                const startOfMonth = new Date(year, month, mainEvent.startTime)
 | 
			
		||||
                startOfMonth.setHours(0, 0, 0, 0)
 | 
			
		||||
 | 
			
		||||
                const lastDayOfMonth = new Date(year, month + 1, 0)
 | 
			
		||||
                //  const lastDayOfMonth = new Date(year, month ,mainEvent.startTime)
 | 
			
		||||
               // const lastDayOfMonth = new Date(year, month + 1, 0)
 | 
			
		||||
               const lastDayOfMonth = new Date(year, month ,mainEvent.startTime)
 | 
			
		||||
                const endOfMonth = new Date(
 | 
			
		||||
                  year,
 | 
			
		||||
                  month,
 | 
			
		||||
@ -231,7 +230,7 @@ const useGantt = ({ router, route }: GanttParams) => {
 | 
			
		||||
    const columns = [
 | 
			
		||||
      {
 | 
			
		||||
        field: 'name',
 | 
			
		||||
        title: subId ? '目标' : '事件主体',
 | 
			
		||||
        title: subId ? '事件类型' : '事件主体',
 | 
			
		||||
        width: '120',
 | 
			
		||||
        mergeCell: true,
 | 
			
		||||
        customLayout: args => {
 | 
			
		||||
@ -285,12 +284,12 @@ const useGantt = ({ router, route }: GanttParams) => {
 | 
			
		||||
      },
 | 
			
		||||
    ]
 | 
			
		||||
    if (subId) {
 | 
			
		||||
      // columns.unshift({
 | 
			
		||||
      //   field: 'parentName',
 | 
			
		||||
      //   title: '事件分类',
 | 
			
		||||
      //   width: '120',
 | 
			
		||||
      //   mergeCell: true,
 | 
			
		||||
      // })
 | 
			
		||||
      columns.unshift({
 | 
			
		||||
        field: 'parentName',
 | 
			
		||||
        title: '事件分类',
 | 
			
		||||
        width: '120',
 | 
			
		||||
        mergeCell: true,
 | 
			
		||||
      })
 | 
			
		||||
      // columns.unshift({
 | 
			
		||||
      //   field: 'isChecked',
 | 
			
		||||
      //   title: '',
 | 
			
		||||
@ -539,7 +538,7 @@ const useGantt = ({ router, route }: GanttParams) => {
 | 
			
		||||
        })
 | 
			
		||||
        container.add(end)
 | 
			
		||||
        // 事件条
 | 
			
		||||
        if (happen.value == 2) {
 | 
			
		||||
        if (plans.value == 'hour') {
 | 
			
		||||
          const rect = new Rect({
 | 
			
		||||
            width: width,
 | 
			
		||||
            height: 7,
 | 
			
		||||
@ -610,9 +609,8 @@ const useGantt = ({ router, route }: GanttParams) => {
 | 
			
		||||
    return new Image(opt)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function changeTimeScales(scale: TYPES.ITimelineScale['unit'], val: number) {
 | 
			
		||||
  function changeTimeScales(scale: TYPES.ITimelineScale['unit']) {
 | 
			
		||||
    plans.value = scale
 | 
			
		||||
    happen.value = val
 | 
			
		||||
    const scales = getTimeScales(scale)
 | 
			
		||||
    ganttInstance && ganttInstance.updateScales(scales)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -8,11 +8,7 @@ export default defineComponent({
 | 
			
		||||
  props: {
 | 
			
		||||
    scale: {
 | 
			
		||||
      type: String,
 | 
			
		||||
      default: 'year',
 | 
			
		||||
    },
 | 
			
		||||
    happen: {
 | 
			
		||||
      type: Number,
 | 
			
		||||
      default: 1,
 | 
			
		||||
      default: 'day',
 | 
			
		||||
    },
 | 
			
		||||
    dateRange: {
 | 
			
		||||
      type: Array,
 | 
			
		||||
@ -65,7 +61,6 @@ export default defineComponent({
 | 
			
		||||
          ids: props.types,
 | 
			
		||||
          startTime: props.dateRange ? props.dateRange[0] : null,
 | 
			
		||||
          endTime: props.dateRange ? props.dateRange[1] : null,
 | 
			
		||||
          status: props.happen, //发生状态:1已发生、2未发生
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
        stopRefresh()
 | 
			
		||||
@ -77,13 +72,7 @@ export default defineComponent({
 | 
			
		||||
    watch(
 | 
			
		||||
      () => props.scale,
 | 
			
		||||
      val => {
 | 
			
		||||
        changeTimeScales(val, props.happen)
 | 
			
		||||
      }
 | 
			
		||||
    )
 | 
			
		||||
    watch(
 | 
			
		||||
      () => props.happen,
 | 
			
		||||
      val => {
 | 
			
		||||
        changeTimeScales(props.scale, val)
 | 
			
		||||
        changeTimeScales(val)
 | 
			
		||||
      }
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
@ -101,7 +90,6 @@ export default defineComponent({
 | 
			
		||||
        ids: props.types,
 | 
			
		||||
        startTime: props.dateRange ? props.dateRange[0] : null,
 | 
			
		||||
        endTime: props.dateRange ? props.dateRange[1] : null,
 | 
			
		||||
        status: props.happen, //发生状态:1已发生、2未发生
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      updateMarkLine()
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ import { Group, Image, Text, CheckBox, Rect } from '@visactor/vtable/es/vrender'
 | 
			
		||||
 | 
			
		||||
import { useDialog } from 'naive-ui'
 | 
			
		||||
import { Gantt, tools, TYPES } from '@visactor/vtable-gantt'
 | 
			
		||||
import { getMainGantt, getSubGantt } from '@/api/Gantt/gantt'
 | 
			
		||||
import { getMainGantt, getSubGantt } from '@/api/Gantt'
 | 
			
		||||
 | 
			
		||||
type GanttParams = {
 | 
			
		||||
  route?: any
 | 
			
		||||
 | 
			
		||||
@ -13,8 +13,8 @@ import { onBeforeMount } from 'vue'
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  setup() {
 | 
			
		||||
    const range = ref([new Date('2000-01-01 00:00:00').getTime(), Date.now()])
 | 
			
		||||
    //const value = ref('year')
 | 
			
		||||
    const value = ref('day')
 | 
			
		||||
    const happen = ref(1)
 | 
			
		||||
    const types = ref([])
 | 
			
		||||
 | 
			
		||||
    const router = useRouter()
 | 
			
		||||
@ -40,9 +40,6 @@ export default defineComponent({
 | 
			
		||||
    function searchGanttData() {
 | 
			
		||||
      ganttRef.value.refresh = true
 | 
			
		||||
    }
 | 
			
		||||
    function changeHappen() {
 | 
			
		||||
      range.value = [Date.now(), new Date('2027-01-01 00:00:00').getTime()]
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return () => (
 | 
			
		||||
      <>
 | 
			
		||||
@ -57,13 +54,9 @@ export default defineComponent({
 | 
			
		||||
            <NRadioButton value="hour" label="日" />
 | 
			
		||||
            <NRadioButton value="day" label="月" />
 | 
			
		||||
          </NRadioGroup> */}
 | 
			
		||||
          <NRadioGroup
 | 
			
		||||
            v-model:value={happen.value}
 | 
			
		||||
            name="radiobuttongroup"
 | 
			
		||||
            onChange={changeHappen}
 | 
			
		||||
          >
 | 
			
		||||
            <NRadioButton value={1} label="已发生" />
 | 
			
		||||
            <NRadioButton value={2} label="未来计划" />
 | 
			
		||||
          <NRadioGroup v-model:value={value.value} name="radiobuttongroup">
 | 
			
		||||
            <NRadioButton value="hour" label="已发生" />
 | 
			
		||||
            <NRadioButton value="day" label="未来计划" />
 | 
			
		||||
          </NRadioGroup>
 | 
			
		||||
          <NSelect
 | 
			
		||||
            v-model:value={types.value}
 | 
			
		||||
@ -83,7 +76,6 @@ export default defineComponent({
 | 
			
		||||
        <GanttCom
 | 
			
		||||
          ref={ganttRef}
 | 
			
		||||
          scale={value.value}
 | 
			
		||||
          happen={happen.value}
 | 
			
		||||
          dateRange={range.value}
 | 
			
		||||
          types={types.value}
 | 
			
		||||
        />
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { NForm, NFormItem, NInput, NDataTable, NButton } from 'naive-ui'
 | 
			
		||||
import ModalCom from '@/components/Modal/index.vue'
 | 
			
		||||
import { getMainGantt } from '@/api/Gantt/gantt'
 | 
			
		||||
import { getMainGantt } from '@/api/gantt'
 | 
			
		||||
import useTask from './hooks'
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  // props: {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user