管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-03-29 98a2b24c89e81a5aacdcbd6b739fef422adf17dd
代码更新
已添加1个文件
已修改14个文件
2315 ■■■■■ 文件已修改
src/api/api.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/screen.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chart/VisitCount.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/js/dataStatistics.js 245 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/auth.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/dataStatistics.vue 549 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/dataUpdata.vue 1036 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/databaseMonitoring.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/eventlogManage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/opexController.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/parameterConfiguration.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/systemMonitoring copy.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/systemMonitoring.vue 201 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/userManage/templateManage.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js
@@ -942,8 +942,87 @@
export function dataCount_countExplorationPoints(params) {
  return request.get('/dataCount/countExplorationPoints', { params: params });
}
export function dataCount_countWaterDamageByPrj(params) {
  return request.get('/dataCount/countWaterDamageByPrj', { params: params });
}
export function dataCount_countUnstableSlopeByPrj(params) {
  return request.get('/dataCount/countUnstableSlopeByPrj', { params: params });
}
export function dataCount_countLandSlideByPrj(params) {
  return request.get('/dataCount/countLandSlideByPrj', { params: params });
}
export function dataCount_countHighSteepSlopeByPrj(params) {
  return request.get('/dataCount/countHighSteepSlopeByPrj', { params: params });
}
export function dataCount_countGroundCollapseByPrj(params) {
  return request.get('/dataCount/countGroundCollapseByPrj', { params: params });
}
export function dataCount_countDebrisFlowByPrj(params) {
  return request.get('/dataCount/countDebrisFlowByPrj', { params: params });
}
export function dataCount_countCollapseByPrj(params) {
  return request.get('/dataCount/countCollapseByPrj', { params: params });
}
export function dataCount_countExplorationReportByPrj(params) {
  return request.get('/dataCount/countExplorationReportByPrj', { params: params });
}
export function dataCount_countSurveyWorksiteByPrj(params) {
  return request.get('/dataCount/countSurveyWorksiteByPrj', { params: params });
}
export function dataCount_countLasAreaByPrj(params) {
  return request.get('/dataCount/countLasAreaByPrj', { params: params });
}
export function dataCount_countOsgbAreaByPrj(params) {
  return request.get('/dataCount/countOsgbAreaByPrj', { params: params });
}
export function dataCount_countMptAreaByPrj(params) {
  return request.get('/dataCount/countMptAreaByPrj', { params: params });
}
export function dataCount_countDemAreaByPrj(params) {
  return request.get('/dataCount/countDemAreaByPrj', { params: params });
}
export function dataCount_countDomAreaByPrj(params) {
  return request.get('/dataCount/countDomAreaByPrj', { params: params });
}
export function dataCount_countDlgAreaByPrj(params) {
  return request.get('/dataCount/countDlgAreaByPrj', { params: params });
}
export function dataCount_countExplorationPointByPrj(params) {
  return request.get('/dataCount/countExplorationPointByPrj', { params: params });
}
export function dataCount_countLineLength(params) {
  return request.get('/dataCount/countLineLength', { params: params });
}
export function dataCount_countGeoModelAreaByPrj(params) {
  return request.get('/dataCount/countGeoModelAreaByPrj', { params: params });
}
export function dataCount_countGeologicHazardByPrj(params) {
  return request.get('/dataCount/countGeologicHazardByPrj', { params: params });
}
export function dataCount_countVariousDataByPrj(params) {
  return request.get('/dataCount/countVariousDataByPrj', { params: params });
}
//数据统计=>下载报告
export function dataCount_downloadReport(params) {
  return request.get('/dataCount/downloadReport', { params: params });
src/api/screen.js
@@ -54,6 +54,17 @@
  return request.get("/oneMap/countLargeCategories", { params: params })
}
//按照类别访问统计访问次数
export function countByMajor(params) {
  return request.get("/oneMap/countByMajor", { params: params })
}
//全国站场座数、阀室、管道数等
export function countZhPipeStations(params) {
  return request.get("/oneMap/countZhPipeStations", { params: params })
src/components/chart/VisitCount.vue
@@ -4,7 +4,7 @@
<script>
import * as echarts from "echarts"
import { GetTypeVisitsCount } from "@/api/screen.js"
import { countByMajor } from "@/api/screen.js"
export default {
  data() {
    return {
@@ -17,54 +17,16 @@
  methods: {
    async initChart() {
      let data = [
        {
          name: "user1",
          value: 10,
        },
        {
          name: "user2",
          value: 20,
        },
        {
          name: "user3",
          value: 23,
        },
        {
          name: "user4",
          value: 44,
        },
        {
          name: "user1",
          value: 10,
        },
        {
          name: "user2",
          value: 20,
        },
        {
          name: "user3",
          value: 53,
        },
        {
          name: "user4",
          value: 24,
        },
        {
          name: "user1",
          value: 10,
        },
        {
          name: "user2",
          value: 20,
        },
      ]
      const res = await GetTypeVisitsCount()
      const res = await countByMajor()
      let xAxis = []
      let yAxis = []
      if (res.code == 200) {
        var obj = res.result;
        data = res.result.map(item => {
          xAxis.push(item.name)
          yAxis.push(item.count)
          xAxis.push(item.m2)
          yAxis.push(item.sizes)
        })
      }
      let option = {
@@ -76,13 +38,34 @@
          bottom: "15%",
        },
        tooltip: {
          show: true
          show: true,
          formatter: function (data) {
            var val = obj.filter(res=>{
              if(data.value == res.sizes){
                return res
              }
            })
            if(val.length>0){
              var num = val[0].m3
              if(num=="平方千米"){
                num= " km²";
              }else  if(num=="平方米"){
                num= " m²";
              }else  if(num=="千米"){
                num= " km";
              }
               return  val[0].m2+":<br/>"+val[0].sizes+ num;
            }else{
              return data;
            }
          },
        },
        xAxis: {
          data: xAxis,
          axisLabel: {
            show: true,
            color: "#ffff",
          },
          axisTick: {
            show: false,
@@ -180,7 +163,7 @@
</script>
<style lang="less" scoped>
.visit-count{
.visit-count {
  width: 100%;
  height: calc(100% - 30px);
}
src/components/js/dataStatistics.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,245 @@
const dataStatistics= {
    statistics:[
        {
          value: "dataTable",
          label: "上传数据表格模板",
          isCount:false,
          isMenu:true
        },
        {
          value: "uploadDir",
          label: "上传目录结构模板",
          isCount:false,
          isMenu:true
        },
        {
          value: "dirFolder",
          label: "目录结构文件夹模板",
          isCount:false,
          pid:0,
          isMenu:true,
          id:1,
        },  {
          value: "countSizes",
          label: "数据量统计",
          isCount:true,
          pid:0,
          isMenu:true,
          id:2,
        },
        {
          value: "countServices",
          label: "服务调用量统计",
          isCount:true,
          pid:0,
          isMenu:true,
          id:3,
        },
        {
          value: "countOperates",
          label: "用户流量统计",
          isCount:true,
          pid:0,
          isMenu:true,
          id:4,
        },
       {
          value: "countExplorationPoints",
          label: "钻孔数据统计",
          isCount:true,
          pid:0,
          isMenu:true,
          id:5,
        }, {
          value: "countSizesByType",
          label: "数据格式统计",
          isCount:true,
          pid:0,
          isMenu:true,
          id:6,
        },{
          value: "countSizesByPrj",
          label: "项目数据统计",
          isCount:true,
          pid:0,
          isMenu:true,
          id:7,
        },{
          value: "countVariousDataByPrj",
          label: "项目数据分类统计",
          isCount:true,
          pid:0,
          isMenu:true,
          id:11,
        },
{
  label: "测绘(ESV)",
  isCount:true,
  pid:0,
  isMenu:false,
  id:8,
},{
  value: "countDlgAreaByPrj",
  label: "数字线划图统计",
  isCount:true,
  pid:8,
  isMenu:true,
  id:11,
},{
  value: "countDemAreaByPrj",
  label: "数字高程模型统计",
  isCount:true,
  pid:8,
  isMenu:true,
  id:12,
},{
  value: "countDomAreaByPrj",
  label: "数字正射影像图统计",
  isCount:true,
  pid:8,
  isMenu:true,
  id:13,
},{
  value: "countOsgbAreaByPrj",
  label: "倾斜摄影模型统计",
  isCount:true,
  pid:8,
  isMenu:true,
  id:14,
},{
  value: "countLasAreaByPrj",
  label: "激光点云模型统计",
  isCount:true,
  pid:8,
  isMenu:true,
  id:15,
},{
  value: "countLineLength",
  label: "管线长度统计",
  isCount:true,
  pid:8,
  isMenu:true,
  id:16,
},{
  value: "countMptAreaByPrj",
  label: "三维地形模型统计",
  isCount:false,
  pid:8,
  isMenu:true,
  id:17,
},
{
  label: "勘察(EGE)",
  isCount:true,
  pid:0,
  isMenu:false,
  id:9,
},{
  value: "countExplorationPointByPrj",
  label: "勘探点统计",
  isCount:true,
  pid:9,
  isMenu:true,
  id:18,
},{
  value: "countSurveyWorksiteByPrj",
  label: "勘察工点统计",
  isCount:true,
  pid:9,
  isMenu:true,
  id:19,
},{
  value: "countExplorationReportByPrj",
  label: "勘察报告统计",
  isCount:true,
  pid:9,
  isMenu:true,
  id:20,
},{
  value: "countGeoModelAreaByPrj",
  label: "三维地质模型统计",
  isCount:true,
  pid:9,
  isMenu:true,
  id:21,
},{
  label: "地灾(EGD)",
  isCount:true,
  pid:0,
  isMenu:false,
  id:10,
},{
  value: "countGeologicHazardByPrj",
  label: "地灾点统计",
  isCount:true,
  pid:10,
  isMenu:true,
  id:22,
},{
  value: "countCollapseByPrj",
  label: "崩塌统计",
  isCount:true,
  pid:10,
  isMenu:true,
  id:23,
},{
  value: "countDebrisFlowByPrj",
  label: "泥石流统计",
  isCount:true,
  pid:10,
  isMenu:true,
  id:24,
},{
  value: "countGroundCollapseByPrj",
  label: "地面塌陷统计",
  isCount:true,
  pid:10,
  isMenu:true,
  id:25,
},{
  value: "countHighSteepSlopeByPrj",
  label: "高陡边坡统计",
  isCount:true,
  pid:10,
  isMenu:true,
  id:26,
},{
  value: "countLandSlideByPrj",
  label: "滑坡统计",
  isCount:true,
  pid:10,
  isMenu:true,
  id:27,
} ,{
  value: "countUnstableSlopeByPrj",
  label: "不稳定斜坡统计",
  isCount:true,
  pid:10,
  isMenu:true,
  id:28,
},{
          value: "countWaterDamageByPrj",
          label: "水毁统计",
          isCount:true,
          pid:10,
          isMenu:true,
          id:29,
        }
      ]
};
export default dataStatistics;
src/utils/auth.js
@@ -26,7 +26,7 @@
const TokenKey = 'Admin-Token';
export function getToken() {
  console.log(window.sessionStorage.getItem(TokenKey));
  return window.sessionStorage.getItem(TokenKey);
}
src/utils/request.js
@@ -13,7 +13,7 @@
// create an axios instance
const service = axios.create({
  baseURL: BASE_URL, // api的base_url
  timeout: 35000, // è¯·æ±‚è¶…æ—¶æ—¶é—´
  timeout: -1, // è¯·æ±‚è¶…æ—¶æ—¶é—´
  headers: {
    "content-type": "application/json;charset=UTF-8",
  },
src/views/datamanage/dataStatistics.vue
@@ -8,7 +8,7 @@
    <div class="contentBox">
      <div class="content_Left subpage_Div" style="border: 1px solid #dcdfe6;">
        <el-tree :data="treeData" @node-click="handleNodeClick" node-key="id" ref="tree" highlight-current
          :props="defaultProps">
          :props="defaultProps" accordion>
        </el-tree>
      </div>
      <div class="content_Right subpage_Div" style="border: 1px solid #dcdfe6;">
@@ -21,26 +21,34 @@
                  <el-option label="数据存储量" value="sjccl">
                  </el-option>
                  <el-option label="文件个数" value="sjts">
                  <el-option label="文件个数" v-show="queryData.value != 'countExplorationPoints'" value="sjts">
                  </el-option>
                  <el-option label="数量" v-show="queryData.value == 'countExplorationPoints'" value="sjts">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item v-show="!setCountFlag" label="总计:">
              <el-form-item v-show="!setCountFlag && setExcelType" label="总计:">
                {{ dataVolume }}
              </el-form-item>
              <el-form-item>
              <el-form-item v-show="setExcelType">
                <el-button icon="el-icon-c-scale-to-original" size="small" type="warning"
                  @click="setCountFlagChange(1)">{{ $t("shuJuGuanLi.butten.Report") }}</el-button>
              </el-form-item>
              <el-form-item>
              <el-form-item v-show="setExcelType">
                <el-button icon="el-icon-pie-chart" size="small" type="primary" @click="setCountFlagChange(2)">{{
                  $t("shuJuGuanLi.butten.Histogram") }}</el-button>
      $t("shuJuGuanLi.butten.Histogram") }}</el-button>
              </el-form-item>
              <el-form-item v-show="setDownloadType">
              <el-form-item v-show="!setExcelType">
                <el-select v-model="prjCunt" size="small" @change="setPrjCuntChange" placeholder="">
                  <el-option v-for="item in prjOption" :key="item.id" :label="item.name" :value="item.code">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item>
                <el-button icon="el-icon-download" size="small" type="success" @click="setCountFlagChange(3)">{{
                  $t("shuJuGuanLi.butten.Download") }}</el-button>
      $t("shuJuGuanLi.butten.Download") }}</el-button>
              </el-form-item>
            </el-form>
@@ -52,8 +60,8 @@
            <el-table-column v-if="queryData.value == 'countServices'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countServices'" :formatter="formatterColumn2" prop="count" key="2"
              align="center" :label="$t('dataManage.dataStaticObj.type2')">
            <el-table-column v-if="queryData.value == 'countServices'" :formatter="formatterColumn2" prop="count"
              key="2" align="center" :label="$t('dataManage.dataStaticObj.type2')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countSizes'" prop="m1" key="3" align="center"
              :label="$t('dataManage.dataStaticObj.type3')">
@@ -67,8 +75,8 @@
            <el-table-column v-if="queryData.value == 'countOperates'" prop="m1" key="5" align="center"
              :label="$t('dataManage.dataStaticObj.type5')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countOperates'" prop="count" :formatter="formatterColumn3" key="6"
              align="center" :label="$t('dataManage.dataStaticObj.type7')">
            <el-table-column v-if="queryData.value == 'countOperates'" prop="count" :formatter="formatterColumn3"
              key="6" align="center" :label="$t('dataManage.dataStaticObj.type7')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countSizesByType'" prop="m1" key="3" align="center"
              :label="$t('common.fileType')">
@@ -98,8 +106,134 @@
            <el-table-column v-if="queryData.value == 'countExplorationPoints'" prop="sizes" key="4" align="center"
              :formatter="formatterColumn" :label="$t('dataManage.dataStaticObj.type4')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countExplorationPoints'" prop="count" :formatter="formatterColumn3"
            <el-table-column v-if="queryData.value == 'countExplorationPoints'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countWaterDamageByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countWaterDamageByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countUnstableSlopeByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countUnstableSlopeByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countLandSlideByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countLandSlideByPrj'" prop="count" :formatter="formatterColumn3"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countHighSteepSlopeByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countHighSteepSlopeByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countGroundCollapseByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countGroundCollapseByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDebrisFlowByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDebrisFlowByPrj'" prop="count" :formatter="formatterColumn3"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countCollapseByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countCollapseByPrj'" prop="count" :formatter="formatterColumn3"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countExplorationReportByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countExplorationReportByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countSurveyWorksiteByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countSurveyWorksiteByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countLasAreaByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countLasAreaByPrj'" prop="area" :formatter="formatterColumn4"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countOsgbAreaByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countOsgbAreaByPrj'" prop="area" :formatter="formatterColumn4"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countMptAreaByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countMptAreaByPrj'" prop="area" :formatter="formatterColumn4"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDemAreaByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDemAreaByPrj'" prop="area" :formatter="formatterColumn4"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDomAreaByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDomAreaByPrj'" prop="area" :formatter="formatterColumn4"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDlgAreaByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countDlgAreaByPrj'" prop="area" :formatter="formatterColumn4"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countExplorationPointByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countExplorationPointByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countLineLength'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countLineLength'" prop="len" :formatter="formatterColumn5"
              key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countGeoModelAreaByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countGeoModelAreaByPrj'" prop="area"
              :formatter="formatterColumn4" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countGeologicHazardByPrj'" prop="m1" key="1" align="center"
              :label="$t('dataManage.dataStaticObj.type1')">
            </el-table-column>
            <el-table-column v-if="queryData.value == 'countGeologicHazardByPrj'" prop="count"
              :formatter="formatterColumn3" key="4" align="center" :label="$t('dataManage.dataStaticObj.type9')">
            </el-table-column>
          </el-table>
        </div>
@@ -144,48 +278,38 @@
  dataCount_downloadReport,
  dataCount_countSizesByType,
  dataCount_countSizesByPrj,
  dataCount_countExplorationPoints
  dataCount_countExplorationPoints,
  dataCount_countWaterDamageByPrj,
  dataCount_countUnstableSlopeByPrj,
  dataCount_countLandSlideByPrj,
  dataCount_countHighSteepSlopeByPrj,
  dataCount_countGroundCollapseByPrj,
  dataCount_countDebrisFlowByPrj,
  dataCount_countCollapseByPrj,
  dataCount_countExplorationReportByPrj,
  dataCount_countSurveyWorksiteByPrj,
  dataCount_countLasAreaByPrj,
  dataCount_countOsgbAreaByPrj,
  dataCount_countMptAreaByPrj,
  dataCount_countDemAreaByPrj,
  dataCount_countDomAreaByPrj,
  dataCount_countDlgAreaByPrj,
  dataCount_countExplorationPointByPrj,
  dataCount_countLineLength,
  dataCount_countGeoModelAreaByPrj,
  dataCount_countGeologicHazardByPrj,
  project_selectDirAll,
  dataCount_countVariousDataByPrj
} from "../../api/api.js";
import { t } from 'element-ui/lib/locale';
import dataStatistics from '@/components/js/dataStatistics.js'
export default {
  name: "DataStatistics",
  components: { MyBread },
  data() {
    return {
      treeData: [
        {
          id: 5,
          label: "项目统计数据",
          value: "countSizesByPrj",
          children: [],
        }, {
          id: 2,
          label: "单位数据统计",
          value: "countSizes",
          children: [],
        }, {
          id: 4,
          label: "数据格式统计",
          value: "countSizesByType",
          children: [],
        },
        {
          id: 3,
          label: "用户流量统计",
          value: "countOperates",
          children: [],
        }, {
          id: 1,
          label: "服务调用量统计",
          value: "countServices",
          children: [],
        },
        {
          id: 6,
          label: "钻孔数据统计",
          value: "countExplorationPoints",
          children: [],
        },
      ],
      tjlxData: {
        region: 'sjccl',
@@ -211,13 +335,54 @@
      setDownloadType: false,
      dataVolume: null,
      reportFormsData: [],
      setExcelType: true,
      prjOption: [],
      prjCunt: null,
      prjData: [],
    };
  },
  mounted() {
    this.setStartDataCount();
    this.setTreeDataStart();
  },
  methods: {
    setTreeDataStart() {
      this.treeData = [];
      var val = dataStatistics.statistics;
      var std = [];
      for (var i = 0; i < val.length; i++) {
        if (val[i].isCount) {
          std.push(val[i])
        }
      }
      var obj = this.getTreeData(std);
      this.treeData = obj
      this.setStartDataCount();
      setStartDataCount
    },
    getTreeData(source) {
      let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ•°æ®æ·±åº¦å…‹éš†
      if (cloneData.length != 0) {
        return cloneData.filter((father) => {
          // å¾ªçŽ¯æ‰€æœ‰é¡¹
          let branchArr = cloneData.filter((child) => father.id == child.pid); // å¯¹æ¯”ID,分别上下级菜单,并返回数据
          branchArr.length > 0 ? (father.children = branchArr) : ''; // ç»™çˆ¶çº§æ·»åŠ ä¸€ä¸ªchildren属性,并赋值
          // å±žäºŽåŒä¸€å¯¹è±¡é—®é¢˜ï¼Œä¾‹å¦‚:令 a=b、c=1 ï¼Œç„¶åŽå†ä»¤ b.c=c ï¼Œ é‚£ä¹ˆ a.c=b.c=c=1 ï¼›åŒç†ï¼ŒåŽç»­ä»¤ c.d=2 ,那么 a.c.d ä¹Ÿæ˜¯=2;
          // ç”±æ­¤å¾ªçŽ¯å¤šæ¬¡åŽï¼Œå°±èƒ½å½¢æˆç›¸åº”çš„æ ‘å½¢æ•°æ®ç»“æž„
          return father.pid == 0; // è¿”回一级菜单
        });
      } else {
        this.$message({
          message: '暂无菜单栏数据',
          type: 'warning'
        });
      }
    },
    setTjlxDataChange() {
      this.showCountEchart()
    },
@@ -234,13 +399,29 @@
    formatterColumn3(row) {
      return row.count + "个"
    },
    formatterColumn5(row) {
      return row.len + "<span style='font-size:16px;'>km<span>"
    },
    formatterColumn4(row) {
      if (row.area >= 1000000) {
        return (row.area / 1000000).toFixed(3) + "<span  style='font-size:16px;'>km²<span>"
      } else {
        return (row.area).toFixed(3) + "<span  style='font-size:16px; '>m²<span>"
      }
    },
    setDownLoadRow(rows) {
      var obj = ''
      if (this.queryData.value == "countVariousDataByPrj") {
        obj = "&code=" + this.prjCunt
      }
      var url =
        BASE_URL +
        "/dataCount/downloadReport?token=" +
        getToken() +
        "&id=" +
        rows.id;
        rows.id + obj;
      $("#Iframe1").attr("src", url).click();
    },
@@ -276,19 +457,32 @@
      var m1 = "总计"
      for (var i in this.tableData) {
        sizes += this.tableData[i].sizes;
        count += this.tableData[i].count;
        if (this.queryData.value == 'countDlgAreaByPrj' || this.queryData.value == 'countGeoModelAreaByPrj') {
          count += this.tableData[i].area;
        } else if (this.queryData.value == 'countLineLength') {
          count += this.tableData[i].len;
        } else {
          count += this.tableData[i].count;
        }
      }
      val.count = count;
      if (this.queryData.value == 'countDlgAreaByPrj' || this.queryData.value == 'countGeoModelAreaByPrj') {
        val.area = count;
      } else if (this.queryData.value == 'countLineLength') {
        val.len = count;
      } else {
        val.count = count;
      }
      val.sizes = sizes;
      val.m1 = m1;
      this.reportFormsData = JSON.parse(JSON.stringify(this.tableData));
      this.reportFormsData.push(val)
    },
    //统计切换
    setCountFlagChange(res) {
      switch (res) {
        case 1:
          this.getReportForms();
          this.setCountFlag = true;
          break;
@@ -319,6 +513,30 @@
      this.modelData = data.result;
      this.listData.count = data.count;
    },
    getEchartFormate(val) {
      var obj = this.prjData.filter(res => {
        if (res.m1 == val) {
          return res;
        }
      })[0];
      var message = "";
      if (obj) {
        if (obj.m2 == 'area') {
          if (obj.area > 1000000) {
            message = (obj.area / 1000000).toFixed(3) + "<span  style='font-size:16px; '>km²<span>";
          } else {
            message = obj.area + "<span  style='font-size:16px; '>m²<span>";
          }
        } else if (obj.m2 == 'count') {
          message = obj.count + '个';
        } else if (obj.m2 == 'len') {
          message = obj.len + "<span style='font-size:16px;'>km<span>";
        }
      }
      return message;
    },
    //Echart图表显示
    showCountEchart() {
      var dom = document.getElementById("chart_11");
@@ -344,7 +562,44 @@
      let data = [];
      window.sjName = this.queryData.value
      window.sjType = this.tjlxData.region
      if (sjName == 'countServices' || sjName == 'countOperates') {
      if (sjName == 'countDemAreaByPrj'
        || sjName == 'countMptAreaByPrj'
        || sjName == 'countOsgbAreaByPrj'
        || sjName == 'countLasAreaByPrj'
        || sjName == 'countDomAreaByPrj'
        || sjName == 'countDlgAreaByPrj'
        || sjName == 'countGeoModelAreaByPrj'
      ) {
        for (var i in this.tableData) {
          if (this.tableData[i].count > yMax) {
            yMax = this.tableData[i].area;
          }
          data.push(this.tableData[i].area);
          var m1 = this.tableData[i].m1;
          dataAxis.push(m1);
          this.dataVolume += this.tableData[i].area;
        }
        if (parseFloat(this.dataVolume) >= 1000000) {
          this.dataVolume = parseFloat(this.dataVolume / 1000000).toFixed(3) + "km²";
        } else {
          this.dataVolume = this.dataVolume.toFixed(3) + "m²"
        }
      } else if (sjName == 'countWaterDamageByPrj'
        || sjName == 'countUnstableSlopeByPrj'
        || sjName == 'countLandSlideByPrj'
        || sjName == 'countHighSteepSlopeByPrj'
        || sjName == 'countGroundCollapseByPrj'
        || sjName == 'countDebrisFlowByPrj'
        || sjName == 'countCollapseByPrj'
        || sjName == 'countExplorationReportByPrj'
        || sjName == 'countSurveyWorksiteByPrj'
        || sjName == 'countExplorationPointByPrj'
        || sjName == 'countGeologicHazardByPrj'
      ) {
        for (var i in this.tableData) {
          if (this.tableData[i].count > yMax) {
            yMax = this.tableData[i].count;
@@ -353,9 +608,43 @@
          var m1 = this.tableData[i].m1;
          dataAxis.push(m1);
          this.dataVolume += this.tableData[i].count;
        }
        this.dataVolume += "个"
      } else if (sjName == 'countLineLength') {
        for (var i in this.tableData) {
          if (this.tableData[i].count > yMax) {
            yMax = this.tableData[i].len;
          }
          data.push(this.tableData[i].len);
          var m1 = this.tableData[i].m1;
          dataAxis.push(m1);
          this.dataVolume += this.tableData[i].len;
        }
        this.dataVolume = this.dataVolume.toFixed(3) +"km";
      } else if (sjName == 'countServices' || sjName == 'countOperates') {
        for (var i in this.tableData) {
          if (this.tableData[i].count > yMax) {
            yMax = this.tableData[i].count;
          }
          data.push(this.tableData[i].count);
          var m1 = this.tableData[i].m1;
          dataAxis.push(m1);
          this.dataVolume += this.tableData[i].count;
        }
        this.dataVolume += "次"
      } else if (sjName == 'countVariousDataByPrj') {
        for (var i in this.tableData) {
          var val = this.tableData[i].m2;
          var obj = this.tableData[i][val];
          if (val == 'area') {
            if (obj > 1000000) {
              obj = (obj / 1000000).toFixed(3)
            }
          }
          data.push(obj);
          var m1 = this.tableData[i].m1;
          dataAxis.push(m1);
        }
      } else {
        for (var i in this.tableData) {
@@ -393,6 +682,7 @@
      for (let i = 0; i < data.length; i++) {
        dataShadow.push(yMax);
      }
      var that = this;
      this.option = {
        grid: {
          left: "5%",
@@ -412,12 +702,48 @@
          formatter: function (params) {
            var p_name = params[0].axisValue;
            var p_val;
            if (sjName == 'countServices' || sjName == 'countOperates') {
            if (that.queryData.value == 'countServices' || that.queryData.value == 'countOperates') {
              p_val = p_name + '<br/>访问次数  ï¼š' + params[0].data + '次'
            } else if (that.queryData.value == 'countDemAreaByPrj'
              || that.queryData.value == 'countMptAreaByPrj'
              || that.queryData.value == 'countOsgbAreaByPrj'
              || that.queryData.value == 'countLasAreaByPrj'
              || that.queryData.value == 'countDomAreaByPrj'
              || that.queryData.value == 'countDlgAreaByPrj'
              || that.queryData.value == 'countGeoModelAreaByPrj'
            ) {
              if (params[0].data >= 1000000) {
                p_val = p_name + '<br/>' + (params[0].data / 1000000).toFixed(3) + "<span style='font-size:20px; '>km²<span>"
              } else {
                p_val = p_name + '<br/>' + params[0].data.toFixed(3) + "<span style='font-size:20px; '>m²<span>"
              }
            } else if (sjName == 'countLineLength') {
              p_val = p_name + '<br/>距离:' + params[0].data.toFixed(3) + "<span style='font-size:16px;'>km<span>";
            } else if (sjName == 'countWaterDamageByPrj'
              || sjName == 'countUnstableSlopeByPrj'
              || sjName == 'countLandSlideByPrj'
              || sjName == 'countHighSteepSlopeByPrj'
              || sjName == 'countGroundCollapseByPrj'
              || sjName == 'countDebrisFlowByPrj'
              || sjName == 'countCollapseByPrj'
              || sjName == 'countExplorationReportByPrj'
              || sjName == 'countDlgAreaByPrj'
              || sjName == 'countExplorationPointByPrj'
              || sjName == 'countGeologicHazardByPrj'
              || sjName == 'countSurveyWorksiteByPrj'
            ) {
              p_val = p_name + '<br/>' + params[0].data + '个'
            } else if (sjName == "countVariousDataByPrj") {
              p_val = p_name + '<br/>' + that.getEchartFormate(p_name)
            } else {
              if (sjType == 'sjts') {
                p_val = p_name + '<br/>文件个数:' + params[0].data + '个'
                if (that.queryData.value != "countExplorationPoints") {
                  p_val = p_name + '<br/>文件个数:' + params[0].data + '个'
                } else if (that.queryData.value == "countExplorationPoints") {
                  p_val = p_name + '<br/>个数:' + params[0].data + '个'
                }
              } else {
                if (params[0].data >= 1024) {
                  p_val = p_name + '<br/>数据存储量:' + (params[0].data / 1024).toFixed(3) + 'GB'
@@ -520,6 +846,8 @@
    },
    //树点击事件
    handleNodeClick(data, node, prop) {
      if (data.isMenu == false) return
      this.prjCunt = "";
      this.setCountFlag = false;
      this.queryData = data;
      this.listData.code = data.value;
@@ -530,42 +858,116 @@
    handleIsopenSelect() {
      this.$forceUpdate()
    },
    async setPrjCuntChange() {
      const data = await dataCount_countVariousDataByPrj({ code: this.prjCunt })
      if (!data || data.code != 200) {
        return;
      }
      this.tableData = data.result;
      this.prjData = data.result;
      this.showCountEchart();
    },
    //查询统计信息
    async setQueryCountData() {
      this.tjlxData.region = 'sjccl';
      var data, val;
      this.setDownloadType = true;
      this.tjlxData.flag = true;
      this.setExcelType = true;
      if (this.queryData.value == "countServices") {
        this.tjlxData.flag = false;
        data = await dataCount_selectCountServices();
      } else if (this.queryData.value == "countSizes") {
        data = await dataCount_selectCountSizes();
      } else if (this.queryData.value == "countOperates") {
        this.tjlxData.flag = false;
        data = await dataCount_selectCountOperates();
      } else if (this.queryData.value == "countSizesByType") {
        data = await dataCount_countSizesByType();
        this.setDownloadType = false;
      } else if (this.queryData.value == "countSizesByPrj") {
        data = await dataCount_countSizesByPrj();
        this.setDownloadType = false;
      } else if (this.queryData.value == "countExplorationPoints") {
        data = await dataCount_countExplorationPoints();
      }
      if (this.queryData.value == 'countServices' || this.queryData.value == 'countOperates') {
      else if (this.queryData.value == "countWaterDamageByPrj") {
        this.tjlxData.flag = false;
      } else {
        this.tjlxData.flag = true;
        data = await dataCount_countWaterDamageByPrj();
      } else if (this.queryData.value == "countUnstableSlopeByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countUnstableSlopeByPrj();
      } else if (this.queryData.value == "countLandSlideByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countLandSlideByPrj();
      } else if (this.queryData.value == "countHighSteepSlopeByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countHighSteepSlopeByPrj();
      } else if (this.queryData.value == "countGroundCollapseByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countGroundCollapseByPrj();
      } else if (this.queryData.value == "countDebrisFlowByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countDebrisFlowByPrj();
      } else if (this.queryData.value == "countCollapseByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countCollapseByPrj();
      } else if (this.queryData.value == "countExplorationReportByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countExplorationReportByPrj();
      } else if (this.queryData.value == "countSurveyWorksiteByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countSurveyWorksiteByPrj();
      } else if (this.queryData.value == "countLasAreaByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countLasAreaByPrj();
      } else if (this.queryData.value == "countOsgbAreaByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countOsgbAreaByPrj();
      } else if (this.queryData.value == "countMptAreaByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countMptAreaByPrj();
      } else if (this.queryData.value == "countDemAreaByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countDemAreaByPrj();
      } else if (this.queryData.value == "countDomAreaByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countDomAreaByPrj();
      } else if (this.queryData.value == "countDlgAreaByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countDlgAreaByPrj();
      } else if (this.queryData.value == "countExplorationPointByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countExplorationPointByPrj();
      } else if (this.queryData.value == "countLineLength") {
        this.tjlxData.flag = false;
        data = await dataCount_countLineLength();
      } else if (this.queryData.value == "countGeoModelAreaByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countGeoModelAreaByPrj();
      } else if (this.queryData.value == "countGeologicHazardByPrj") {
        this.tjlxData.flag = false;
        data = await dataCount_countGeologicHazardByPrj();
      } else if (this.queryData.value == "countVariousDataByPrj") {
        this.setDownloadType = false;
        this.tjlxData.flag = false;
        this.setCountFlag = false;
        this.setExcelType = false;
        data = await project_selectDirAll();
        if (!data || data.code != 200) {
          return;
        } else {
          this.prjOption = [];
          var val_std = [{
            name: '全部',
            code: "ALL",
          }]
          this.prjOption = val_std.concat(data.result);
          this.prjCunt = this.prjOption[0].code
          this.setPrjCuntChange();
          return
        }
      }
      if (data.code != 200) {
      if (!data || data.code != 200) {
        return;
      }
@@ -647,6 +1049,7 @@
        .el-table /deep/ th,
        .el-table /deep/ tr {
          background-color: transparent !important;
        }
      }
    }
src/views/datamanage/dataUpdata.vue
@@ -1972,559 +1972,559 @@
      var fs2 = null;
      if (this.formInline.uploadType == "v1") {
        //单文件项目上传
        fs2 = document.getElementById("metaDataFile");
        if (this.pathBak != null && this.pathBak.indexOf("checkMain") > -1) {
          if (fs2.files.length == 0) {
            return this.$message.error("请选择需要上传的元数据文件");
          }
        }
      } else if (this.formInline.uploadType == "v2") {
        //整体项目上传
        fs2 = document.getElementById("wbsDataFile");
        if (fs2.files.length == 0) {
          return this.$message.error("请选择需要上传的WBS数据文件");
        }
      } else if (this.formInline.uploadType == "v3") {
        //     fs2 = document.getElementById("metaDataFile");
        //   if (this.pathBak != null && this.pathBak.indexOf("checkMain") > -1) {
        //   if (fs2.files.length == 0) {
        //   return this.$message.error("请选择需要上传的元数据文件");
      // }
    // }
  } else if(this.formInline.uploadType == "v2") {
  //整体项目上传
  fs2 = document.getElementById("wbsDataFile");
  if (fs2.files.length == 0) {
    return this.$message.error("请选择需要上传的WBS数据文件");
  }
} else if (this.formInline.uploadType == "v3") {
}
for (var i = 0, c = fs1.files.length; i < c; i++) {
  formData.append(fs1.files[i].name, fs1.files[i]);
  this.fileType.push({ name: fs1.files[i].name, type: "selectData" });
}
if (fs2 != null) {
  for (var i = 0, c = fs2.files.length; i < c; i++) {
    formData.append(fs2.files[i].name, fs2.files[i]);
    if (this.formInline.uploadType == "v1") {
      this.fileType.push({ name: fs2.files[i].name, type: "metaData" });
    } else if (this.formInline.uploadType == "v2") {
      this.fileType.push({ name: fs2.files[i].name, type: "wbsData" });
    }
  }
}
const that = this;
that.jindudialogVisible = true;
let listval = [];
formData.forEach((key, val) => {
  listval.push({
    name: val,
  });
});
that.$set(this, "jindutiaoname", listval);
that.$set(this, "jindutiao", 0);
// this.loading = true;
$.ajax(
  BASE_URL +
  "/dataUpload/uploadFiles?token=" +
  token +
  "&path=" +
  this.formInline.path,
  {
    type: "post",
    data: formData,
    async: true,
    cache: false,
    processData: false,
    contentType: false,
    success: (rs) => {
      this.loading = false;
      if (rs.code != 200) {
        return this.$message.error("数据上传失败");
      }
      for (var i = 0, c = fs1.files.length; i < c; i++) {
        formData.append(fs1.files[i].name, fs1.files[i]);
        this.fileType.push({ name: fs1.files[i].name, type: "selectData" });
      }
      if (fs2 != null) {
        for (var i = 0, c = fs2.files.length; i < c; i++) {
          formData.append(fs2.files[i].name, fs2.files[i]);
          if (this.formInline.uploadType == "v1") {
            this.fileType.push({ name: fs2.files[i].name, type: "metaData" });
          } else if (this.formInline.uploadType == "v2") {
            this.fileType.push({ name: fs2.files[i].name, type: "wbsData" });
          }
        }
      }
      const that = this;
      that.jindudialogVisible = true;
      let listval = [];
      formData.forEach((key, val) => {
        listval.push({
          name: val,
        });
      this.getFileLength();
      this.$set(this, "jindutiao", 100);
      this.$message({
        message: "上传成功",
        type: "success",
      });
      that.$set(this, "jindutiaoname", listval);
      that.$set(this, "jindutiao", 0);
      // this.loading = true;
      $.ajax(
        BASE_URL +
        "/dataUpload/uploadFiles?token=" +
        token +
        "&path=" +
        this.formInline.path,
        {
          type: "post",
          data: formData,
          async: true,
          cache: false,
          processData: false,
          contentType: false,
          success: (rs) => {
            this.loading = false;
            if (rs.code != 200) {
              return this.$message.error("数据上传失败");
            }
            this.getFileLength();
            this.$set(this, "jindutiao", 100);
            this.$message({
              message: "上传成功",
              type: "success",
            });
            this.clearFileSelect();
          },
          error: (rs) => {
            this.loading = false;
            this.$message.error("数据上传失败");
          },
          xhr: function () {
            var myXhr = $.ajaxSettings.xhr();
            if (myXhr.upload) {
              //检查upload属性是否存在
              myXhr.upload.addEventListener(
                "progress",
                that.progressHandlingFunction,
                false
              ); //绑定progress事件的回调函数
            }
            return myXhr; //xhr对象返回给jQuery使用
          },
        }
      );
      this.clearFileSelect();
    },
    progressHandlingFunction(event) {
      var loaded = event.loaded; //已上传
      var loaded = Math.floor(100 * (event.loaded / event.total) - 1); //计算已经上传的百分比
      $("#prog").html(loaded + "%"); //应用到显示UI,可根据自己需要修改
      this.jindutiao = loaded;
      this.$set(this, "jindutiao", loaded);
    error: (rs) => {
      this.loading = false;
      this.$message.error("数据上传失败");
    },
    format(percentage) {
    xhr: function () {
      var myXhr = $.ajaxSettings.xhr();
      // return percentage === 100 ? "上传完毕" : `${percentage}%`;
      var label;
      if (this.sc.label1 == "上传") {
        label = "上传完毕"
      } else {
        label = `${percentage}%`
      if (myXhr.upload) {
        //检查upload属性是否存在
        myXhr.upload.addEventListener(
          "progress",
          that.progressHandlingFunction,
          false
        ); //绑定progress事件的回调函数
      }
      return percentage === 100 ? label : `${percentage}%`;
      return myXhr; //xhr对象返回给jQuery使用
    },
  }
);
    },
progressHandlingFunction(event) {
  var loaded = event.loaded; //已上传
  var loaded = Math.floor(100 * (event.loaded / event.total) - 1); //计算已经上传的百分比
  $("#prog").html(loaded + "%"); //应用到显示UI,可根据自己需要修改
  this.jindutiao = loaded;
  this.$set(this, "jindutiao", loaded);
},
format(percentage) {
  // return percentage === 100 ? "上传完毕" : `${percentage}%`;
  var label;
  if (this.sc.label1 == "上传") {
    label = "上传完毕"
  } else {
    label = `${percentage}%`
  }
  return percentage === 100 ? label : `${percentage}%`;
},
    //获取文件上传路径
    async getFilePath() {
      const res = await dataUploadSelectPath();
      if (res.code != 200) {
        this.$message.error("文件上传路径获取失败");
        return;
      }
      this.formInline.path = res.result;
    },
    //项目名称切换
    entryNameChange(res) {
      var val = this.entryOption.filter((rs) => {
        if (rs.name == res) {
          return rs;
        }
      });
      this.pathBak = val[0].checks;
      this.formInline.dirid = val[0].id;
      this.getselectVerByDirid();
    },
  const res = await dataUploadSelectPath();
  if (res.code != 200) {
    this.$message.error("文件上传路径获取失败");
    return;
  }
  this.formInline.path = res.result;
},
//项目名称切换
entryNameChange(res) {
  var val = this.entryOption.filter((rs) => {
    if (rs.name == res) {
      return rs;
    }
  });
  this.pathBak = val[0].checks;
  this.formInline.dirid = val[0].id;
  this.getselectVerByDirid();
},
    //获取项目名称
    async setProjectName() {
      const data = await dataUpload_selectProject();
      if (data.code != 200) {
        this.$message.error("项目列表获取失败");
        return;
      }
      this.entryOption = data.result;
      this.formInline.entryId = this.entryOption[0].name;
      this.formInline.dirid = this.entryOption[0].id;
  const data = await dataUpload_selectProject();
  if (data.code != 200) {
    this.$message.error("项目列表获取失败");
    return;
  }
  this.entryOption = data.result;
  this.formInline.entryId = this.entryOption[0].name;
  this.formInline.dirid = this.entryOption[0].id;
      this.getselectVerByDirid();
    },
  this.getselectVerByDirid();
},
    //获取所有坐标系
    async setCoordinateSystem() {
      const data = await dataUpload_selectCoords();
      if (data.code != 200) {
        this.$message.error("坐标系列表获取失败");
        return;
      }
      this.coordinateOption = data.result;
      this.formInline.coordinateId = this.coordinateOption[0].epsgcode;
    },
    //WBS数据选择
    setWBSFile() {
      $("#wbsDataFile").click();
    },
    //重置WPS选择
    restWBSFile() {
      this.formInline.wbsData = "请选择WBS数据";
      document.getElementById("wbsDataFile").value = "";
    },
    //WBS数据Change事件
    handleWBSFileChange(event) {
      var std = [];
      var len = event.currentTarget.files.length;
      for (var i = 0; i < len; i++) {
        var f = event.currentTarget.files[i];
        std.push(f.name);
      }
      this.formInline.wbsData = std.toString();
    },
    //数据质检弹窗关闭--项目整体
    handleTestQuayCloseDown() {
      this.$confirm("确认关闭?")
        .then((_) => {
          this.closeTestQuayCloseDialog();
        })
        .catch((_) => {
        });
    },
    closeTestQuayCloseDialog() {
      this.testQuayVisible = false;
    },
    //数据质检弹窗关闭--单文件
    handleQuayTestCloseDown() {
      this.$confirm("确认关闭?")
        .then((_) => {
          this.closeQuayTestCloseDialog();
        })
        .catch((_) => {
        });
    },
    closeQuayTestCloseDialog() {
      this.quayTestVisible = false;
    },
    //数据质检点击事件
    handleQuayTestClick() {
      if (this.pathBak == null) {
        return this.$message("无质检方案");
      }
      if (this.multipleSelection.length == 0) {
        return this.$message("请选择需要质检的文件");
      }
      if (this.formInline.uploadType == "v1") {
  const data = await dataUpload_selectCoords();
  if (data.code != 200) {
    this.$message.error("坐标系列表获取失败");
    return;
  }
  this.coordinateOption = data.result;
  this.formInline.coordinateId = this.coordinateOption[0].epsgcode;
},
//WBS数据选择
setWBSFile() {
  $("#wbsDataFile").click();
},
//重置WPS选择
restWBSFile() {
  this.formInline.wbsData = "请选择WBS数据";
  document.getElementById("wbsDataFile").value = "";
},
//WBS数据Change事件
handleWBSFileChange(event) {
  var std = [];
  var len = event.currentTarget.files.length;
  for (var i = 0; i < len; i++) {
    var f = event.currentTarget.files[i];
    std.push(f.name);
  }
  this.formInline.wbsData = std.toString();
},
//数据质检弹窗关闭--项目整体
handleTestQuayCloseDown() {
  this.$confirm("确认关闭?")
    .then((_) => {
      this.closeTestQuayCloseDialog();
    })
    .catch((_) => {
    });
},
closeTestQuayCloseDialog() {
  this.testQuayVisible = false;
},
//数据质检弹窗关闭--单文件
handleQuayTestCloseDown() {
  this.$confirm("确认关闭?")
    .then((_) => {
      this.closeQuayTestCloseDialog();
    })
    .catch((_) => {
    });
},
closeQuayTestCloseDialog() {
  this.quayTestVisible = false;
},
//数据质检点击事件
handleQuayTestClick() {
  if (this.pathBak == null) {
    return this.$message("无质检方案");
  }
  if (this.multipleSelection.length == 0) {
    return this.$message("请选择需要质检的文件");
  }
  if (this.formInline.uploadType == "v1") {
        var value = this.getCheckedKeys
        var fileType = value.data.fullName;
        this.quayTestForms.names = fileType;
        this.quayTestForms.sjzy = this.formInline.specialtyId;
        this.quayTestVisible = true;
      } else if (this.formInline.uploadType == "v2") {
        var fileZip = [];
        var fileExcel = [];
        for (var i in this.multipleSelection) {
          if (this.multipleSelection[i].name.indexOf(".zip") != -1) {
            fileZip.push(this.multipleSelection[i].name);
          } else if (this.multipleSelection[i].name.indexOf(".xls") != -1) {
            fileExcel.push(this.multipleSelection[i].name);
          } else if (this.multipleSelection[i].name.indexOf(".xlsx") != -1) {
            fileExcel.push(this.multipleSelection[i].name);
          }
        }
        if (fileZip.length != 1) {
          return this.$message("请选择一个整体项目文件");
        }
        if (fileExcel.length != 1) {
          return this.$message("请选择一个WBS文件");
        }
        this.formCheckAll.names = JSON.parse(this.pathBak).toString();
        var val = this.entryOption.filter((res) => {
          if (res.id == this.formInline.dirid) {
            return res;
          }
        });
        this.formCheckAll.xmmc = val[0].name;
        this.formCheckAll.sjzy = this.formInline.specialtyId;
        if (this.formCheckAll.sjzy.indexOf("地灾") != -1) {
          this.formCheckAll.isDiZai = "YES";
          this.formCheckAll.diZaiType = this.disOptions[0].value;
        } else {
          this.formCheckAll.isDiZai = "NO";
          this.formCheckAll.diZaiType = "NO";
        }
        this.testQuayVisible = true;
    var value = this.getCheckedKeys
    var fileType = value.data.fullName;
    this.quayTestForms.names = fileType;
    this.quayTestForms.sjzy = this.formInline.specialtyId;
    this.quayTestVisible = true;
  } else if (this.formInline.uploadType == "v2") {
    var fileZip = [];
    var fileExcel = [];
    for (var i in this.multipleSelection) {
      if (this.multipleSelection[i].name.indexOf(".zip") != -1) {
        fileZip.push(this.multipleSelection[i].name);
      } else if (this.multipleSelection[i].name.indexOf(".xls") != -1) {
        fileExcel.push(this.multipleSelection[i].name);
      } else if (this.multipleSelection[i].name.indexOf(".xlsx") != -1) {
        fileExcel.push(this.multipleSelection[i].name);
      }
    },
    }
    if (fileZip.length != 1) {
      return this.$message("请选择一个整体项目文件");
    }
    if (fileExcel.length != 1) {
      return this.$message("请选择一个WBS文件");
    }
    this.formCheckAll.names = JSON.parse(this.pathBak).toString();
    var val = this.entryOption.filter((res) => {
      if (res.id == this.formInline.dirid) {
        return res;
      }
    });
    this.formCheckAll.xmmc = val[0].name;
    this.formCheckAll.sjzy = this.formInline.specialtyId;
    if (this.formCheckAll.sjzy.indexOf("地灾") != -1) {
      this.formCheckAll.isDiZai = "YES";
      this.formCheckAll.diZaiType = this.disOptions[0].value;
    } else {
      this.formCheckAll.isDiZai = "NO";
      this.formCheckAll.diZaiType = "NO";
    }
    this.testQuayVisible = true;
  }
},
    //上传数据列表清单删除
    async setWarehouseDel() {
      this.loading = true;
      var std = [];
      for (var i in this.multipleDelete) {
        std.push(this.multipleDelete[i].id);
      }
  this.loading = true;
  var std = [];
  for (var i in this.multipleDelete) {
    std.push(this.multipleDelete[i].id);
  }
      const res = await dataUpload_deleteMetas({ ids: std.toString() });
      this.loading = false;
      if (res.code != 200) {
        this.$message.error("删除失败");
      } else {
        this.$message({
          message: "删除成功",
          type: "success",
        });
        this.setStartWareTable();
      }
    },
    //上传数据列表清单查询
    setWarehouseSearch() {
      this.listData = {
        pageIndex: 1,
        pageSize: 10,
        name: this.formWarehousing.name,
      };
      this.getAllWareTable();
    },
    //上传数据列表重置
    setWarehouseReset() {
      this.formWarehousing.name = "";
      this.listData = {
        pageIndex: 1,
        pageSize: 10,
        name: null,
      };
      this.getAllWareTable();
    },
    //格式化时间
    changetimeFile(res) {
      var time = new Date(res.createTime);
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
      var d = time.getDate();
      var h = time.getHours();
      var mm = time.getMinutes();
      var s = time.getSeconds();
      return (
        y +
        "-" +
        this.add0(m) +
        "-" +
        this.add0(d) +
        " " +
        h +
        ":" +
        mm +
        ":" +
        s
      );
    },
    //格式化时间
    add0(m) {
      return m < 10 ? "0" + m : m;
    },
    //大小值改变
    changeSizeFile(row, column, cellValue, index) {
      if (cellValue >= 1024) {
        return parseFloat(cellValue / 1204).toFixed(3) + "GB";
      } else {
        return cellValue + "MB";
      }
    },
    //上传数据列表清单选择
    handleDelteChange(val) {
      this.multipleDelete = val;
    },
    //上传数据列表清单初始化
    setStartWareTable() {
      // this.listData = {
      //   pageIndex: 1,
      //   pageSize: 10,
      //   name: null,
      // };
      this.listData.pageIndex = 1;
      this.listData.name = null;
      this.getAllWareTable();
    },
  const res = await dataUpload_deleteMetas({ ids: std.toString() });
  this.loading = false;
  if (res.code != 200) {
    this.$message.error("删除失败");
  } else {
    this.$message({
      message: "删除成功",
      type: "success",
    });
    this.setStartWareTable();
  }
},
//上传数据列表清单查询
setWarehouseSearch() {
  this.listData = {
    pageIndex: 1,
    pageSize: 10,
    name: this.formWarehousing.name,
  };
  this.getAllWareTable();
},
//上传数据列表重置
setWarehouseReset() {
  this.formWarehousing.name = "";
  this.listData = {
    pageIndex: 1,
    pageSize: 10,
    name: null,
  };
  this.getAllWareTable();
},
//格式化时间
changetimeFile(res) {
  var time = new Date(res.createTime);
  var y = time.getFullYear();
  var m = time.getMonth() + 1;
  var d = time.getDate();
  var h = time.getHours();
  var mm = time.getMinutes();
  var s = time.getSeconds();
  return (
    y +
    "-" +
    this.add0(m) +
    "-" +
    this.add0(d) +
    " " +
    h +
    ":" +
    mm +
    ":" +
    s
  );
},
//格式化时间
add0(m) {
  return m < 10 ? "0" + m : m;
},
//大小值改变
changeSizeFile(row, column, cellValue, index) {
  if (cellValue >= 1024) {
    return parseFloat(cellValue / 1204).toFixed(3) + "GB";
  } else {
    return cellValue + "MB";
  }
},
//上传数据列表清单选择
handleDelteChange(val) {
  this.multipleDelete = val;
},
//上传数据列表清单初始化
setStartWareTable() {
  // this.listData = {
  //   pageIndex: 1,
  //   pageSize: 10,
  //   name: null,
  // };
  this.listData.pageIndex = 1;
  this.listData.name = null;
  this.getAllWareTable();
},
    //获取数据上传列表清单
    async getAllWareTable() {
      const res = await dataUpload_selectByPageForUpload(this.listData);
      if (res.code != 200) {
        this.$message.error("列表数据获取失败");
        return;
      }
      this.count = res.count;
      this.waretableData = res.result;
    },
    //数据上传列表清单page Count åˆ‡æ¢
    handleSizeChange(val) {
      this.listData.pageIndex = 1;
      this.listData.pageSize = val;
      this.getAllWareTable();
    },
  const res = await dataUpload_selectByPageForUpload(this.listData);
  if (res.code != 200) {
    this.$message.error("列表数据获取失败");
    return;
  }
  this.count = res.count;
  this.waretableData = res.result;
},
//数据上传列表清单page Count åˆ‡æ¢
handleSizeChange(val) {
  this.listData.pageIndex = 1;
  this.listData.pageSize = val;
  this.getAllWareTable();
},
    //数据上传列表清单page切换
    handleCurrentChange(val) {
      this.listData.pageIndex = val;
      this.getAllWareTable();
    },
    //上传数据表格选择
    handleSelectionChange(res) {
      this.multipleSelection = res;
    },
//数据上传列表清单page切换
handleCurrentChange(val) {
  this.listData.pageIndex = val;
  this.getAllWareTable();
},
//上传数据表格选择
handleSelectionChange(res) {
  this.multipleSelection = res;
},
    //选择数据文件切换
    handleSelectFileChange(event) {
      var std = [];
      var len = event.currentTarget.files.length;
      for (var i = 0; i < len; i++) {
        var f = event.currentTarget.files[i];
        std.push(f.name);
      }
      this.formInline.specialtyData = std.toString();
    },
    //选择元数据
    setMetaFile() {
      $("#metaDataFile").click();
    },
    //重置元数据
    restMetaFile() {
      this.formInline.metaData = "请选择元数据";
      document.getElementById("metaDataFile").value = "";
    },
    //选择元数据文件切换
    handleMetaFileChange(event) {
      var std = [];
      var len = event.currentTarget.files.length;
      for (var i = 0; i < len; i++) {
        var f = event.currentTarget.files[i];
        std.push(f.name);
      }
      this.formInline.metaData = std.toString();
      this.metaFileData = std;
    },
//选择数据文件切换
handleSelectFileChange(event) {
  var std = [];
  var len = event.currentTarget.files.length;
  for (var i = 0; i < len; i++) {
    var f = event.currentTarget.files[i];
    std.push(f.name);
  }
  this.formInline.specialtyData = std.toString();
},
//选择元数据
setMetaFile() {
  $("#metaDataFile").click();
},
//重置元数据
restMetaFile() {
  this.formInline.metaData = "请选择元数据";
  document.getElementById("metaDataFile").value = "";
},
//选择元数据文件切换
handleMetaFileChange(event) {
  var std = [];
  var len = event.currentTarget.files.length;
  for (var i = 0; i < len; i++) {
    var f = event.currentTarget.files[i];
    std.push(f.name);
  }
  this.formInline.metaData = std.toString();
  this.metaFileData = std;
},
    //From表单初始化
    setFromStart() {
      this.formInline.verid = null;
      this.formInline.specialtyId = "测量专业";
      this.formInline.specialtyData = "请选择数据";
      this.formInline.metaData = "请选择元数据";
      this.formInline.entryId = null;
      this.formInline.selectFileType = "*.*";
      this.formInline.coordinateId = this.coordinateOption[0].epsgcode;
      this.formInline.medium = "";
      this.formInline.tab = "";
    },
    //选择数据
    setSelectFile() {
      $("#selectDataFile").click();
    },
    //重置数据
    restSelectFile() {
      this.formInline.specialtyData = "请选择数据";
      document.getElementById("selectDataFile").value = "";
    },
    //入库类型切换
    uploadTypeChange(res) {
      this.setFromStart();
      if (res == "v2") {
        this.uploadFlag = false;
        this.formInline.selectFileType = ".zip";
        this.formInline.entryId = this.entryOption[0].name;
        this.formInline.dirid = this.entryOption[0].id;
        this.getselectVerByDirid();
        this.pathBak = this.entryOption[0].checks;
      } else if (res == "v3") {
        this.formInline.selectFileType = ".kml";
        this.getSelectdirTab();
        this.getselectVerByDirid();
        this.formInline.specialtyId = "线路专业";
        this.uploadFlag = true;
        this.formInline.tab = this.lineOptions[0].value;
        this.formInline.medium = this.mediumOptions[0].value
      } else {
        this.getSelectdirTab();
        this.getselectVerByDirid();
        this.uploadFlag = true;
      }
      this.formInline.uploadType = res;
    },
//From表单初始化
setFromStart() {
  this.formInline.verid = null;
  this.formInline.specialtyId = "测量专业";
  this.formInline.specialtyData = "请选择数据";
  this.formInline.metaData = "请选择元数据";
  this.formInline.entryId = null;
  this.formInline.selectFileType = "*.*";
  this.formInline.coordinateId = this.coordinateOption[0].epsgcode;
  this.formInline.medium = "";
  this.formInline.tab = "";
},
//选择数据
setSelectFile() {
  $("#selectDataFile").click();
},
//重置数据
restSelectFile() {
  this.formInline.specialtyData = "请选择数据";
  document.getElementById("selectDataFile").value = "";
},
//入库类型切换
uploadTypeChange(res) {
  this.setFromStart();
  if (res == "v2") {
    this.uploadFlag = false;
    this.formInline.selectFileType = ".zip";
    this.formInline.entryId = this.entryOption[0].name;
    this.formInline.dirid = this.entryOption[0].id;
    this.getselectVerByDirid();
    this.pathBak = this.entryOption[0].checks;
  } else if (res == "v3") {
    this.formInline.selectFileType = ".kml";
    this.getSelectdirTab();
    this.getselectVerByDirid();
    this.formInline.specialtyId = "线路专业";
    this.uploadFlag = true;
    this.formInline.tab = this.lineOptions[0].value;
    this.formInline.medium = this.mediumOptions[0].value
  } else {
    this.getSelectdirTab();
    this.getselectVerByDirid();
    this.uploadFlag = true;
  }
  this.formInline.uploadType = res;
},
    //版本号获取
    async getselectVerByDirid() {
      this.verOption = [];
  this.verOption = [];
      const res = await dataUploadSelectVerByDirid({
        dirid: this.formInline.dirid,
      });
  const res = await dataUploadSelectVerByDirid({
    dirid: this.formInline.dirid,
  });
      if (res.code != 200) {
        this.$message.error("版本列表获取失败");
        return;
      }
      this.verOption = res.result;
      this.formInline.verid = res.result[0].id;
    },
  if (res.code != 200) {
    this.$message.error("版本列表获取失败");
    return;
  }
  this.verOption = res.result;
  this.formInline.verid = res.result[0].id;
},
    //目录列表获取
    async getSelectdirTab() {
      const res = await selectdirTab();
      if (res.code != 200) {
        this.$message.error("目录列表获取失败");
        return;
      }
  const res = await selectdirTab();
  if (res.code != 200) {
    this.$message.error("目录列表获取失败");
    return;
  }
      this.catalogOption = this.treeData(res.result);
      this.formInline.dirName = this.catalogOption[0].name;
      this.formInline.dirid = this.catalogOption[0].id;
      // this.getStartDirChecked(this.catalogOption);
      this.getselectVerByDirid();
    },
  this.catalogOption = this.treeData(res.result);
  this.formInline.dirName = this.catalogOption[0].name;
  this.formInline.dirid = this.catalogOption[0].id;
  // this.getStartDirChecked(this.catalogOption);
  this.getselectVerByDirid();
},
    getStartDirChecked(res) {
      if (res.length != 0) {
        if (res[0].children == null || res[0].children == undefined) {
          this.formInline.dirid = res[0].id;
        } else {
          this.getStartDirChecked(res[0].children);
        }
      }
    },
    //单文件质检弹窗初始化
    startQuayTestForms() {
      (this.quayTestForms = {
        tolerance: "0.001",
        gcdOffset: "20",
        rangeOffset: "200",
        kzdOffset: "100",
        xgMax: "0.005",
        coordinateSystem: "CGCS2000/degree",
        imgResolution: "0.2",
        demTolerance: "5",
        demChangeRate: "200",
        lazDensity: "1",
        imgResolution: "0.2",
      }),
        (this.quayTestShow = {
          checkOsgb: false,
          checkXls: false,
          checkLaz: false,
          checkDem: false,
          checkAttrs: false,
          checkTopology: false,
          checkDecorate: false,
          checkOrigin: false,
          checkDom: false,
          checkMath: false,
          checkMeta: false,
          checkMain: false,
        });
    },
    //目录切换
    catalogChange(data, node, nodeData) {
      this.startQuayTestForms();
      // this.$refs['selectcascader'].dropDownVisible = false
      // var value = this.$refs['selectcascader'].getCheckedNodes();
getStartDirChecked(res) {
  if (res.length != 0) {
    if (res[0].children == null || res[0].children == undefined) {
      this.formInline.dirid = res[0].id;
    } else {
      this.getStartDirChecked(res[0].children);
    }
  }
},
//单文件质检弹窗初始化
startQuayTestForms() {
  (this.quayTestForms = {
    tolerance: "0.001",
    gcdOffset: "20",
    rangeOffset: "200",
    kzdOffset: "100",
    xgMax: "0.005",
    coordinateSystem: "CGCS2000/degree",
    imgResolution: "0.2",
    demTolerance: "5",
    demChangeRate: "200",
    lazDensity: "1",
    imgResolution: "0.2",
  }),
    (this.quayTestShow = {
      checkOsgb: false,
      checkXls: false,
      checkLaz: false,
      checkDem: false,
      checkAttrs: false,
      checkTopology: false,
      checkDecorate: false,
      checkOrigin: false,
      checkDom: false,
      checkMath: false,
      checkMeta: false,
      checkMain: false,
    });
},
//目录切换
catalogChange(data, node, nodeData) {
  this.startQuayTestForms();
  // this.$refs['selectcascader'].dropDownVisible = false
  // var value = this.$refs['selectcascader'].getCheckedNodes();
      var bak = node.data.checks;
      this.getCheckedKeys = node
      this.pathBak = bak;
      if (bak != null) {
        for (var key in this.quayTestShow) {
          if (bak.indexOf(key) != -1) {
            this.quayTestShow[key] = true;
          }
        }
  var bak = node.data.checks;
  this.getCheckedKeys = node
  this.pathBak = bak;
  if (bak != null) {
    for (var key in this.quayTestShow) {
      if (bak.indexOf(key) != -1) {
        this.quayTestShow[key] = true;
      }
      var fileType = node.data.exts;
      if (fileType == null) {
        fileType = "*.*";
      }
      this.formInline.selectFileType = fileType;
      this.formInline.dirid = node.data.id;
      this.formInline.dirName = node.data.name;
      this.getselectVerByDirid();
      setTimeout(() => {
        this.$refs.multiSelect.blur()
      }, 100)
    },
    //Tabsq切换
    handleTabClick(tab, event) {
      if (tab.name == "second") {
        this.setStartWareTable();
      } else {
        this.noteVisible = true
      }
      this.calHeight();
    },
    //树列表生成
    treeData(source) {
      let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ•°æ®æ·±åº¦å…‹éš†
      return cloneData.filter((father) => {
        // å¾ªçŽ¯æ‰€æœ‰é¡¹
        let branchArr = cloneData.filter((child) => father.id == child.pid); // å¯¹æ¯”ID,分别上下级菜单,并返回数据
        branchArr.length > 0 ? (father.children = branchArr) : ""; // ç»™çˆ¶çº§æ·»åŠ ä¸€ä¸ªchildren属性,并赋值
        return father.pid == 0; // è¿”回一级菜单
      });
    },
    }
  }
  var fileType = node.data.exts;
  if (fileType == null) {
    fileType = "*.*";
  }
  this.formInline.selectFileType = fileType;
  this.formInline.dirid = node.data.id;
  this.formInline.dirName = node.data.name;
  this.getselectVerByDirid();
  setTimeout(() => {
    this.$refs.multiSelect.blur()
  }, 100)
},
//Tabsq切换
handleTabClick(tab, event) {
  if (tab.name == "second") {
    this.setStartWareTable();
  } else {
    this.noteVisible = true
  }
  this.calHeight();
},
//树列表生成
treeData(source) {
  let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ•°æ®æ·±åº¦å…‹éš†
  return cloneData.filter((father) => {
    // å¾ªçŽ¯æ‰€æœ‰é¡¹
    let branchArr = cloneData.filter((child) => father.id == child.pid); // å¯¹æ¯”ID,分别上下级菜单,并返回数据
    branchArr.length > 0 ? (father.children = branchArr) : ""; // ç»™çˆ¶çº§æ·»åŠ ä¸€ä¸ªchildren属性,并赋值
    return father.pid == 0; // è¿”回一级菜单
  });
},
  },
};
</script>
src/views/maintenance/databaseMonitoring.vue
@@ -34,7 +34,6 @@
      if (url.indexOf('{webHost}') != -1) {
        url = url.replace('{webHost}', webHost)
      }
      if (url.indexOf('token=') != -1) {
        this.sql_Url = url + getToken();
      } else {
src/views/maintenance/eventlogManage.vue
@@ -297,7 +297,7 @@
    async getList() {
      const data = await resOpSelectByPageAndCount(this.listData);
      console.log(data);
      if (data.code != 200) {
        return this.$message.error("列表调用失败");
      }
src/views/maintenance/opexController.vue
@@ -288,7 +288,8 @@
      this.$store.state.currentPerms = data.perms;
      var index = data.url;
      if (index != null) {
        if (index.indexOf('http') != -1) {
        if (index.indexOf('{webHost}') != -1) {
          this.$store.commit('getIframe', data.url);
          index = 'dataIfream';
        }
src/views/maintenance/parameterConfiguration.vue
@@ -253,7 +253,7 @@
      if (data.code != 200) {
        this.$message.error("列表调用失败");
      }
      console.log(data);
      this.tableData = data.result;
      this.count = data.count;
    },
src/views/maintenance/systemMonitoring copy.vue
@@ -836,7 +836,7 @@
    Window.ws.onmessage = (msg) => {
      // console.log('来自服务器端的数据:' + msg.data); //监听接受来自服务端的信息
      var data = JSON.parse(msg.data);
      console.log(data);
      if (data.userInfo != undefined) {
        that.SetTableData1(data);
      } else if (data.resInfo != undefined) {
src/views/maintenance/systemMonitoring.vue
@@ -1,72 +1,40 @@
<template>
  <div class="systemMonitoring_box">
    <My-bread
      :list="[
        `${$t('operatManage.operatManage')}`,
        `${$t('operatManage.systemMonitoring')}`,
      ]"
    ></My-bread>
    <My-bread :list="[
      `${$t('operatManage.operatManage')}`,
      `${$t('operatManage.systemMonitoring')}`,
    ]"></My-bread>
    <el-divider />
    <div class="content_Box">
      <div class="cloumn_Box1">
        <div class="flex_Box1 subpage_Div">
          <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane
              :label="$t('operatManage.systemMonitoringObj.abnormalResources')"
              name="first"
            >
            <el-tab-pane :label="$t('operatManage.systemMonitoringObj.abnormalResources')" name="first">
              <div class="table_b">
                <el-table :data="resInfo" style="width: 100%; height: 100%">
                  <el-table-column
                    prop="id"
                    :label="$t('operatManage.systemMonitoringObj.resourceID')"
                  >
                  <el-table-column prop="id" :label="$t('operatManage.systemMonitoringObj.resourceID')">
                  </el-table-column>
                  <el-table-column
                    prop="name"
                    :label="$t('operatManage.systemMonitoringObj.resourceName')"
                  >
                  <el-table-column prop="name" :label="$t('operatManage.systemMonitoringObj.resourceName')">
                  </el-table-column>
                  <el-table-column
                    prop="bak"
                    :label="
                      $t('operatManage.systemMonitoringObj.resourceState')
                    "
                  >
                  <el-table-column prop="bak" :label="$t('operatManage.systemMonitoringObj.resourceState')
      ">
                  </el-table-column>
                  <el-table-column
                    prop="createTime"
                    :label="$t('operatManage.systemMonitoringObj.abnormaltime')"
                    show-overflow-tooltip
                  >
                  <el-table-column prop="createTime" :label="$t('operatManage.systemMonitoringObj.abnormaltime')"
                    show-overflow-tooltip>
                  </el-table-column>
                </el-table>
              </div>
            </el-tab-pane>
            <el-tab-pane
              :label="
                $t('operatManage.systemMonitoringObj.serviceResourceStatus')
              "
              name="second"
            >
            <el-tab-pane :label="$t('operatManage.systemMonitoringObj.serviceResourceStatus')
      " name="second">
              <div id="resUseChart" style="width: 101vh; height: 30vh"></div>
            </el-tab-pane>
            <el-tab-pane
              :label="$t('operatManage.systemMonitoringObj.userloginStatus')"
              name="third"
            >
            <el-tab-pane :label="$t('operatManage.systemMonitoringObj.userloginStatus')" name="third">
              <div id="userLoginChart" style="width: 101vh; height: 30vh"></div>
            </el-tab-pane>
            <el-tab-pane
              :label="
                $t('operatManage.systemMonitoringObj.resourceOperationStatus')
              "
              name="fourth"
            >
              <div
                id="operateCountChart"
                style="width: 101vh; height: 30vh"
              ></div>
            <el-tab-pane :label="$t('operatManage.systemMonitoringObj.resourceOperationStatus')
      " name="fourth">
              <div id="operateCountChart" style="width: 101vh; height: 30vh"></div>
            </el-tab-pane>
          </el-tabs>
        </div>
@@ -78,27 +46,13 @@
          </div>
          <div class="table_b">
            <el-table :data="tableData" style="width: 100%">
              <el-table-column
                align="center"
                type="index"
                :label="$t('operatManage.ELM.index')"
                width="100px"
              />
              <el-table-column
                prop="uid"
                :label="$t('operatManage.systemMonitoringObj.userID')"
              >
              <el-table-column align="center" type="index" :label="$t('operatManage.ELM.index')" width="100px" />
              <el-table-column prop="uid" :label="$t('operatManage.systemMonitoringObj.userID')">
              </el-table-column>
              <el-table-column
                prop="uname"
                :label="$t('operatManage.systemMonitoringObj.username')"
              >
              <el-table-column prop="uname" :label="$t('operatManage.systemMonitoringObj.username')">
              </el-table-column>
              <el-table-column
                prop="loginTime"
                :label="$t('operatManage.systemMonitoringObj.onlineTime')"
                fixed="right"
              >
              <el-table-column prop="loginTime" :label="$t('operatManage.systemMonitoringObj.onlineTime')"
                fixed="right">
              </el-table-column>
            </el-table>
          </div>
@@ -118,17 +72,15 @@
                <div class="height_title">
                  <label>
                    {{
                      $t("operatManage.systemMonitoringObj.haveBeenUsed")
                    }}</label
                  >
      $t("operatManage.systemMonitoringObj.haveBeenUsed")
    }}</label>
                  <p>{{ memInfo.use }}</p>
                </div>
                <div class="height_title">
                  <label>
                    {{
                      $t("operatManage.systemMonitoringObj.usageRate")
                    }}</label
                  >
      $t("operatManage.systemMonitoringObj.usageRate")
    }}</label>
                  <p>{{ memInfo.usage }}</p>
                </div>
              </div>
@@ -136,17 +88,15 @@
                <div class="height_title">
                  <label>
                    {{
                      $t("operatManage.systemMonitoringObj.totalMemory")
                    }}</label
                  >
      $t("operatManage.systemMonitoringObj.totalMemory")
    }}</label>
                  <p>{{ memInfo.totalMem }}</p>
                </div>
                <div class="height_title">
                  <label>
                    {{
                      $t("operatManage.systemMonitoringObj.remainingMemory")
                    }}</label
                  >
      $t("operatManage.systemMonitoringObj.remainingMemory")
    }}</label>
                  <p>{{ memInfo.remainMem }}</p>
                </div>
              </div>
@@ -163,10 +113,7 @@
              {{ $t("operatManage.systemMonitoringObj.cpuMonitoring") }}
            </div>
          </div>
          <div
            id="Sys_cpu_chart"
            style="width: 100%; height: 86%; margin-top: 8%"
          ></div>
          <div id="Sys_cpu_chart" style="width: 100%; height: 86%; margin-top: 8%"></div>
        </div>
        <div class="flex_Box subpage_Div">
          <div style="width: 100%; height: 34px">
@@ -181,8 +128,8 @@
                <div class="ycTltle">{{ resInfoCount }}</div>
                <div class="heteroTitle">
                  {{
                    $t("operatManage.systemMonitoringObj.numberOfExceptions")
                  }}
      $t("operatManage.systemMonitoringObj.numberOfExceptions")
    }}
                </div>
              </div>
            </div>
@@ -633,12 +580,15 @@
          },
        ],
      };
      var dome = document.getElementById("shuiwen")
      if (dome) {
        let myChart1 = this.$echarts.init(dome);
        myChart1.setOption(options);
        window.addEventListener("resize", function () {
          myChart1.resize();
        });
      }
      let myChart1 = this.$echarts.init(document.getElementById("shuiwen"));
      myChart1.setOption(options);
      window.addEventListener("resize", function () {
        myChart1.resize();
      });
    },
    lineChart3() {
      var data = [
@@ -803,6 +753,24 @@
      );
      myChart4.setOption(option);
    },
    isJSON(str) {
      if (typeof str == 'string') {
        try {
          var obj = JSON.parse(str);
          if (typeof obj == 'object' && obj) {
            return true;
          } else {
            return false;
          }
        } catch (e) {
          return false;
        }
      }
    }
  },
  created() {
    if (Window.ws != null) {
@@ -814,19 +782,22 @@
    }
    Window.ws = new WebSocket(socketUrl);
    Window.ws.option = () => {};
    Window.ws.option = () => { };
    var that = this;
    Window.ws.onmessage = (msg) => {
      // console.log('来自服务器端的数据:' + msg.data); //监听接受来自服务端的信息
      var data = JSON.parse(msg.data);
      console.log(data);
      if (data.userInfo != undefined) {
        that.SetTableData1(data);
      } else if (data.resInfo != undefined) {
        that.SetTableData2(data);
      } else if (data.operateCount != undefined) {
        that.SetTableData3(data);
      var obj = this.isJSON(msg.data);
      if (obj) {
        var data = JSON.parse(msg.data);
        if (data.userInfo != undefined) {
          that.SetTableData1(data);
        } else if (data.resInfo != undefined) {
          that.SetTableData2(data);
        } else if (data.operateCount != undefined) {
          that.SetTableData3(data);
        }
      }
    };
  },
@@ -853,10 +824,12 @@
  .table_b .el-table /deep/ .el-table__expanded-cell {
    background-color: transparent !important;
  }
  .table_b .el-table /deep/ th,
  .table_b .el-table /deep/ tr {
    background-color: transparent !important;
  }
  .content_Box {
    width: 100%;
    height: 90%;
@@ -864,12 +837,14 @@
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    .cloumn_Box {
      width: 100%;
      height: 38%;
      display: flex;
      justify-content: space-between;
      .flex_Box {
        width: 30.5%;
        height: 88%;
@@ -881,37 +856,37 @@
          width: 46px;
          height: 20px;
          float: left;
          background: url("../../assets/img/systemMonitoring/图层 38.png")
            no-repeat;
          background: url("../../assets/img/systemMonitoring/图层 38.png") no-repeat;
          background-size: 100% 100%;
        }
        .image2 {
          width: 34px;
          height: 34px;
          float: left;
          background: url("../../assets/img/systemMonitoring/图层 37.png")
            no-repeat;
          background: url("../../assets/img/systemMonitoring/图层 37.png") no-repeat;
          background-size: 100% 100%;
        }
        .image3 {
          width: 32px;
          height: 32px;
          float: left;
          background: url("../../assets/img/systemMonitoring/图层 40.png")
            no-repeat;
          background: url("../../assets/img/systemMonitoring/图层 40.png") no-repeat;
          background-size: 100% 100%;
        }
      }
      .ycsBox {
        width: 495px;
        height: 182px;
        background: url("../../assets/img/systemMonitoring/图层 39.png")
          no-repeat;
        background: url("../../assets/img/systemMonitoring/图层 39.png") no-repeat;
        background-size: 100% 100%;
        border: 1px;
        display: flex;
        align-items: center;
      }
      .ycContent {
        width: 100%;
        padding: 1%;
@@ -921,11 +896,13 @@
        justify-content: center;
      }
    }
    .imageTitle {
      float: left;
      margin-left: 10px;
    }
    .ycTltle {
      width: 100%;
      margin-top: 8%;
@@ -935,6 +912,7 @@
      color: #009cff;
      text-align: center;
    }
    .heteroTitle {
      width: 100%;
      text-align: center;
@@ -948,6 +926,7 @@
      // text-align: center;
    }
    .top_Box1 {
      width: 96%;
      height: 91%;
@@ -955,17 +934,20 @@
      margin-left: 4%;
      display: flex;
      justify-content: space-between;
      .top_box_left {
        width: 59%;
        height: 100%;
        display: flex;
        justify-content: space-between;
        .left_title {
          width: 48%;
          height: 100%;
          display: flex;
          flex-direction: column;
          justify-content: space-around;
          .height_title {
            width: 100%;
            height: 48%;
@@ -977,6 +959,7 @@
          }
        }
      }
      .top_box_right {
        width: 39%;
        height: 100%;
@@ -989,6 +972,7 @@
      display: flex;
      justify-content: space-between;
      .flex_Box1 {
        width: 64%;
        height: 92%;
@@ -996,6 +980,7 @@
        border-radius: 5px;
      }
      .flex_Box {
        width: 30.5%;
        height: 92%;
src/views/userManage/templateManage.vue
@@ -31,12 +31,13 @@
                size="small">{{ $t('common.append') }}</el-button>
            </el-form-item>
            <el-form-item>
              <el-button v-if="btnStatus.delete" icon="el-icon-delete" @click="delTableData" type="danger" size="small">{{
                $t('common.delete') }}</el-button>
              <el-button v-if="btnStatus.delete" icon="el-icon-delete" @click="delTableData" type="danger"
                size="small">{{
      $t('common.delete') }}</el-button>
            </el-form-item>
            <el-form-item>
              <el-button icon="el-icon-refresh" @click="restRefreshTable" type="info" size="small">{{ $t('common.empty')
              }}</el-button>
                }}</el-button>
            </el-form-item>
          </div>
        </div>
@@ -72,6 +73,7 @@
        <el-table-column align="center" prop="createTime" :label="$t('dataManage.vmobj.createontime')"
          :formatter="formatData" />
        <el-table-column min-width="100" :label="$t('dataManage.dictionaryManageObj.operation')">
          <template slot-scope="scope">
            <el-button v-if="btnStatus.select" @click="showDetail(scope.$index, scope.row)" type="primary" plain
              size="small">{{ $t('dataManage.dictionaryManageObj.lookOver') }}</el-button>
@@ -91,8 +93,8 @@
    </div>
    <!-- æ–°å¢ž -->
    <el-dialog :title="behavior == '新增'
        ? `${$t('common.append')}`
        : `${$t('common.update')}`
      ? `${$t('common.append')}`
      : `${$t('common.update')}`
      " :visible.sync="dialogVisible" :before-close="handleClose">
      <div style="height: 500px; overflow: auto">
        <el-form ref="form" :model="editForm" label-width="100px" label-position="top">
@@ -236,41 +238,14 @@
  report_deletes,
  report_update,
} from "../../api/api.js";
import dataStatistics from '../../components/js/dataStatistics.js'
import { getToken } from "@/utils/auth";
export default {
  name: "templateManage",
  components: { MyBread },
  data() {
    return {
      options: [
        {
          value: "countSizes",
          label: "数据量统计",
        },
        {
          value: "countServices",
          label: "服务调用量统计",
        },
        {
          value: "countOperates",
          label: "用户流量统计",
        },
        {
          value: "dataTable",
          label: "上传数据表格模板",
        },
        {
          value: "uploadDir",
          label: "上传目录结构模板",
        },
        {
          value: "dirFolder",
          label: "目录结构文件夹模板",
        }, {
          value: "countExplorationPoints",
          label: "钻孔数据统计",
        },
      ],
      options: [],
      itemdetail: {},
      showinfoBox: false,
      behavior: "新增",
@@ -321,6 +296,12 @@
    window.removeEventListener("resize", this.onResize);
  },
  mounted() {
    var obj = dataStatistics.statistics.filter(res => {
      if (res.isMenu != false)
        return res;
    })
    this.options = obj
    window.addEventListener("resize", this.onResize);
    this.calHeight();
  },
@@ -388,7 +369,10 @@
          return res
        }
      })
      this.itemdetail.code = val[0].label;
      if (val.length > 0 && val[0].label) {
        this.itemdetail.code = val[0].label;
      }
      // if (row.code.indexOf("countSizes") != -1) {
      //   this.itemdetail.code = "数据量统计";
      // } else if (row.code.indexOf("countServices") != -1) {
@@ -452,7 +436,7 @@
          break;
        }
      }
      console.log(name)
      if (name.indexOf('统计') > -1) {
        this.typeOption = [{
          label: "World模板",
@@ -484,12 +468,38 @@
    handleEdit(index, row) {
      this.behavior = "修改";
      this.editForm = row;
      if (row.name.indexOf('统计') > -1) {
        this.typeOption = [{
          label: "World模板",
          value: "1"
        }, {
          label: "Excel模板",
          value: "2"
        }]
      } else {
        this.typeOption = [{
          label: "World模板",
          value: "1"
        }, {
          label: "Excel模板",
          value: "2"
        }, {
          label: "Zip模板",
          value: "3"
        }]
      }
      if (parseInt(row.type) == 1) {
        this.selectFileType = ".docx";
      } else if (parseInt(row.type) == 2) {
        this.selectFileType = ".xlsx";
      }
      this.rowGuid = row.guid;
      this.dialogVisible = true;
    },
    //删除
@@ -552,6 +562,7 @@
    },
    //新增一条数据
    async addInsertData() {
      this.editForm.guid = this.rowGuid;
      const data = await report_insert(this.editForm);
      if (data.code != 200) {
        return this.$message.error("新增失败");
@@ -578,10 +589,24 @@
    },
    //文件上传
    async geteditFile(res) {
      if (parseInt(this.editForm.type) == 1) {
        this.selectFileType = ".docx";
      } else if (parseInt(this.editForm.type) == 2) {
        this.selectFileType = ".xlsx";
      }
      this.$nextTick(() => {
        this.setEditFile(res)
      })
    },
    async setEditFile(res) {
      if (res == 0) {
        if (this.editForm.type == "") {
          return this.$message("请选择上传文件类型");
        }
        $("#editFile").click();
      } else if (res == 1) {
@@ -597,7 +622,7 @@
        formData.append("file", fs.files[0]);
        var val_data = await report_upload(formData);
        if (val_data.code == 200) {
          // this.editForm.guid = val_data.result;
          this.editForm.guid = val_data.result;
          this.rowGuid = val_data.result;
          this.$message({
            message: "上传成功!",
@@ -641,7 +666,7 @@
    },
    editFormStart() {
      this.editForm.code = "countSizes";
      this.editForm.code = "dataTable";
      var name;
      for (var i in this.options) {
        if (this.options[i].value == this.editForm.code) {
@@ -713,6 +738,7 @@
  },
};
</script>
<style lang="less" scoped>
//@import url(); å¼•入公共cssç±»
.authorityManagement_box {
@@ -779,4 +805,3 @@
  }
}
</style>