Merge branch 'main' of http://172.16.20.1:3000/chenjiancheng/bigScreen into main
This commit is contained in:
		
						commit
						91d7eecb57
					
				| 
						 | 
				
			
			@ -468,6 +468,186 @@ const renderEventChart = () => {
 | 
			
		|||
  usageChart = echarts.init(usageCount.value);
 | 
			
		||||
  usageChart.setOption(lineOption);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const getY4data = (token) => {
 | 
			
		||||
  // 1. abc 服务调用总次数
 | 
			
		||||
  let aServiceCount = 0;
 | 
			
		||||
  let bServiceCount = 0;
 | 
			
		||||
  let cServiceCount = 0;
 | 
			
		||||
  request
 | 
			
		||||
    .get({
 | 
			
		||||
      url: `/y4_sys/y4/network/business/history/call_nums`, // 网络构建服务调用
 | 
			
		||||
      headers: {
 | 
			
		||||
        // y4Authorization: token,
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
    .then((res1) => {
 | 
			
		||||
      // console.log('res 1 ..', res1);
 | 
			
		||||
      request
 | 
			
		||||
        .get({
 | 
			
		||||
          url: `/y4_sys/y4/alg/business/history/call_nums`, // 网络计算服务调用
 | 
			
		||||
          headers: {
 | 
			
		||||
            // y4Authorization: token,
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
        .then((res2) => {
 | 
			
		||||
          // console.log('res 2..', res2);
 | 
			
		||||
 | 
			
		||||
          [...res1, ...res2].forEach((item) => {
 | 
			
		||||
            if (item.source == 'TSGZ') {
 | 
			
		||||
              aServiceCount = aServiceCount + item.count;
 | 
			
		||||
            }
 | 
			
		||||
            if (item.source == 'ZZGL') {
 | 
			
		||||
              bServiceCount = bServiceCount + item.count;
 | 
			
		||||
            }
 | 
			
		||||
            if (item.source == 'GJFZ') {
 | 
			
		||||
              cServiceCount = cServiceCount + item.count;
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
 | 
			
		||||
          aServiceCount = formateNum(aServiceCount);
 | 
			
		||||
          bServiceCount = formateNum(bServiceCount);
 | 
			
		||||
          cServiceCount = formateNum(cServiceCount);
 | 
			
		||||
 | 
			
		||||
          console.log('abc服务次数。。', aServiceCount, bServiceCount, cServiceCount);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
  // 2. fzwl总数据
 | 
			
		||||
  let totalNodes = 0;
 | 
			
		||||
  let totalLinks = 0;
 | 
			
		||||
  request
 | 
			
		||||
    .get({
 | 
			
		||||
      url: `/y4_sys/y4/main/getPlatformVolumeDeltas`,
 | 
			
		||||
      headers: {
 | 
			
		||||
        // y4Authorization: token,
 | 
			
		||||
      },
 | 
			
		||||
      params: {
 | 
			
		||||
        platform: '',
 | 
			
		||||
        minutes: 360,
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
    .then((res) => {
 | 
			
		||||
      let data = res.statsVo.nums || [];
 | 
			
		||||
      data.forEach((item) => {
 | 
			
		||||
        if (item.name == 'edges') {
 | 
			
		||||
          totalLinks = formateNum(item.count);
 | 
			
		||||
        }
 | 
			
		||||
        if (item.name == 'vertices') {
 | 
			
		||||
          totalNodes = formateNum(item.count);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      console.log('res .总数据.', totalNodes, totalLinks);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
  // 3.api接口调用
 | 
			
		||||
  let apiNetGj = 0; // 网络构建服务api
 | 
			
		||||
  let apiNetJS = 0; // 网络计算服务api
 | 
			
		||||
 | 
			
		||||
  request
 | 
			
		||||
    .get({
 | 
			
		||||
      url: `/y4_sys/y4/network/business/history/call_nums`, // 网络构建服务调用
 | 
			
		||||
      headers: {
 | 
			
		||||
        // y4Authorization: token,
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
    .then((res1) => {
 | 
			
		||||
      // console.log('res 1 ..', res1);
 | 
			
		||||
      res1.forEach((item) => {
 | 
			
		||||
        if (item.source != 'SYSTEM') {
 | 
			
		||||
          apiNetGj = apiNetGj + item.count;
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      apiNetGj = formateNum(apiNetGj);
 | 
			
		||||
      console.log('网络构建服务api。。。', apiNetGj);
 | 
			
		||||
    });
 | 
			
		||||
  request
 | 
			
		||||
    .get({
 | 
			
		||||
      url: `/y4_sys/y4/alg/business/history/call_nums`, // 网络计算服务调用
 | 
			
		||||
      headers: {
 | 
			
		||||
        // y4Authorization: token,
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
    .then((res2) => {
 | 
			
		||||
      res2.forEach((item) => {
 | 
			
		||||
        if (item.source != 'SYSTEM') {
 | 
			
		||||
          apiNetJS = apiNetJS + item.count;
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      apiNetJS = formateNum(apiNetJS);
 | 
			
		||||
      console.log('网络计算服务api。。', apiNetJS);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
  // 4. 6个数字
 | 
			
		||||
  let netGj = 0; // 复杂网络构建
 | 
			
		||||
  let netZtfx = 0; // 网络子图分析
 | 
			
		||||
  let nodeTzjs = 0; // 节点特征计算
 | 
			
		||||
  let netGgjs = 0; // 网络结构计算
 | 
			
		||||
  let netYhfx = 0; // 网络演化分析
 | 
			
		||||
  let linkYc = 0; // 链路预测
 | 
			
		||||
 | 
			
		||||
  request
 | 
			
		||||
    .get({
 | 
			
		||||
      url: `/y4_sys/y4/network/network_type/nums`,
 | 
			
		||||
      headers: {
 | 
			
		||||
        // y4Authorization: token,
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
    .then((res2) => {
 | 
			
		||||
      res2.forEach((item) => {
 | 
			
		||||
        netGj = netGj + item.count;
 | 
			
		||||
      });
 | 
			
		||||
      console.log('6个数字  1..', netGj);
 | 
			
		||||
    });
 | 
			
		||||
  request
 | 
			
		||||
    .post({
 | 
			
		||||
      url: `/y4_sys/y4/alg/info/query`,
 | 
			
		||||
      headers: {
 | 
			
		||||
        // y4Authorization: token,
 | 
			
		||||
      },
 | 
			
		||||
      data: {
 | 
			
		||||
        algType: 'BASIC',
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
    .then((res1) => {
 | 
			
		||||
      request
 | 
			
		||||
        .post({
 | 
			
		||||
          url: `/y4_sys/y4/alg/info/query`,
 | 
			
		||||
          headers: {
 | 
			
		||||
            // y4Authorization: token,
 | 
			
		||||
          },
 | 
			
		||||
          data: {
 | 
			
		||||
            algType: 'BUSINESS',
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
        .then((res2) => {
 | 
			
		||||
          console.log('6个数字  1..', res1);
 | 
			
		||||
          console.log('6个数字  2..', res2);
 | 
			
		||||
          let categoryVOList1 = res1.categoryVOList || [];
 | 
			
		||||
          let categoryVOList2 = res2.categoryVOList || [];
 | 
			
		||||
          [...categoryVOList1, ...categoryVOList2].forEach((item) => {
 | 
			
		||||
            if (item.category == '链路预测') {
 | 
			
		||||
              linkYc = linkYc + item.algCount;
 | 
			
		||||
            }
 | 
			
		||||
            if (item.category == '网络演化分析') {
 | 
			
		||||
              netYhfx = netYhfx + item.algCount;
 | 
			
		||||
            }
 | 
			
		||||
            if (item.category == '节点特征计算') {
 | 
			
		||||
              nodeTzjs = nodeTzjs + item.algCount;
 | 
			
		||||
            }
 | 
			
		||||
            if (item.category == '网络结构计算') {
 | 
			
		||||
              netGgjs = netGgjs + item.algCount;
 | 
			
		||||
            }
 | 
			
		||||
            if (item.category == '网络子图分析') {
 | 
			
		||||
              netZtfx = netZtfx + item.algCount;
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
 | 
			
		||||
          console.log('6个数字  2..', netZtfx, nodeTzjs, netGgjs, netYhfx, linkYc);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
};
 | 
			
		||||
onMounted(() => {
 | 
			
		||||
  if (designStore.appThemeDetail.cssName == 'theme-blue') {
 | 
			
		||||
    datasetOption.color = ['rgba(0,98,217,0.3)'];
 | 
			
		||||
| 
						 | 
				
			
			@ -480,8 +660,8 @@ onMounted(() => {
 | 
			
		|||
    .get({
 | 
			
		||||
      url: '/y4_sys/y4/sys/getAuthCode?clientId=1730804880778&clientSecret=cz4YaZHhnaWfdSh32e1ooEna',
 | 
			
		||||
    })
 | 
			
		||||
    .then((res) => {
 | 
			
		||||
      if (res) {
 | 
			
		||||
    .then((token) => {
 | 
			
		||||
      if (token) {
 | 
			
		||||
        request
 | 
			
		||||
          .get({
 | 
			
		||||
            url: `/y4_sys/y4/main/callDetails`,
 | 
			
		||||
| 
						 | 
				
			
			@ -490,7 +670,7 @@ onMounted(() => {
 | 
			
		|||
              endTime,
 | 
			
		||||
            },
 | 
			
		||||
            headers: {
 | 
			
		||||
              y4Authorization: res,
 | 
			
		||||
              y4Authorization: token,
 | 
			
		||||
            },
 | 
			
		||||
          })
 | 
			
		||||
          .then((res1) => {
 | 
			
		||||
| 
						 | 
				
			
			@ -504,7 +684,7 @@ onMounted(() => {
 | 
			
		|||
          .get({
 | 
			
		||||
            url: `/y4_sys/y4/main/callCount`,
 | 
			
		||||
            headers: {
 | 
			
		||||
              y4Authorization: res,
 | 
			
		||||
              y4Authorization: token,
 | 
			
		||||
            },
 | 
			
		||||
          })
 | 
			
		||||
          .then((res2) => {
 | 
			
		||||
| 
						 | 
				
			
			@ -520,7 +700,7 @@ onMounted(() => {
 | 
			
		|||
          .get({
 | 
			
		||||
            url: '/y4_sys/y4/network/network_type/nums',
 | 
			
		||||
            headers: {
 | 
			
		||||
              y4Authorization: res,
 | 
			
		||||
              y4Authorization: token,
 | 
			
		||||
            },
 | 
			
		||||
          })
 | 
			
		||||
          .then((res3) => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user