ali
2025-02-27 99d1c9fbcfaf391c5403752b0a491fb37418ebe9
解决日月年综合分析图表bug
已修改4个文件
72 ■■■■ 文件已修改
zhitan-vue/src/views/comprehensive/dailyComprehensive/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhitan-vue/src/views/comprehensive/monthlyComprehensive/index.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhitan-vue/src/views/comprehensive/yearComprehensive/index.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhitan-vue/vite.config.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhitan-vue/src/views/comprehensive/dailyComprehensive/index.vue
@@ -33,7 +33,7 @@
      </el-form>
    </div>
    <div class="table-bg-style">
    <div class="table-bg-style" style="padding-bottom: 12px">
      <div class="table-box">
        <el-table :data="energyList" v-loading="loading" border max-height="380px">
          <el-table-column fixed prop="indexName" label="指标名称" width="210px">
@@ -131,6 +131,8 @@
    energyList.value = response.data
    if (response.data && response.data.length !== 0) {
      selectChange(response.data[0])
    } else {
      lineChartData.value = {}
    }
  })
}
zhitan-vue/src/views/comprehensive/monthlyComprehensive/index.vue
@@ -33,7 +33,7 @@
      </el-form>
    </div>
    <div class="table-bg-style">
    <div class="table-bg-style" style="padding-bottom: 12px">
      <div class="table-box">
        <el-table :data="energyList" v-loading="loading" border max-height="380px">
          <el-table-column fixed prop="indexName" label="指标名称" width="210px">
@@ -126,6 +126,8 @@
    energyList.value = response.data.tabledata
    if (energyList.value && energyList.value.length !== 0) {
      selectChange(energyList.value[0])
    } else {
      lineChartData.value = {}
    }
  })
}
@@ -148,32 +150,6 @@
    console.log(expectedData)
    lineChartData.value = {
      // xData: [
      //   "0时",
      //   "1时",
      //   "2时",
      //   "3时",
      //   "4时",
      //   "5时",
      //   "6时",
      //   "7时",
      //   "8时",
      //   "9时",
      //   "10时",
      //   "11时",
      //   "12时",
      //   "13时",
      //   "14时",
      //   "15时",
      //   "16时",
      //   "17时",
      //   "18时",
      //   "19时",
      //   "20时",
      //   "21时",
      //   "22时",
      //   "23时",
      // ],
      xData: actualData,
      yData: expectedData,
      title,
zhitan-vue/src/views/comprehensive/yearComprehensive/index.vue
@@ -33,7 +33,7 @@
      </el-form>
    </div>
    <div class="table-bg-style">
    <div class="table-bg-style" style="padding-bottom: 12px">
      <div class="table-box">
        <el-table :data="energyList" v-loading="loading" border max-height="380px">
          <el-table-column fixed prop="indexName" label="指标名称" width="210px">
@@ -127,6 +127,8 @@
    energyList.value = response.data
    if (response.data && response.data.length !== 0) {
      selectChange(response.data[0])
    } else {
      lineChartData.value = {}
    }
  })
}
@@ -143,7 +145,7 @@
    let title = ""
    response.data.forEach((item) => {
      expectedData.push(numFilter(item.value))
      actualData.push(item.timeCode.slice(item.timeCode.length - 2, item.timeCode.length) + "时")
      actualData.push(item.timeCode.slice(item.timeCode.length - 2, item.timeCode.length) + "月")
      title = item.indexName + "(" + (item.unitId || "") + ")"
    })
@@ -152,32 +154,6 @@
    console.log(expectedData)
    lineChartData.value = {
      // xData: [
      //   "0时",
      //   "1时",
      //   "2时",
      //   "3时",
      //   "4时",
      //   "5时",
      //   "6时",
      //   "7时",
      //   "8时",
      //   "9时",
      //   "10时",
      //   "11时",
      //   "12时",
      //   "13时",
      //   "14时",
      //   "15时",
      //   "16时",
      //   "17时",
      //   "18时",
      //   "19时",
      //   "20时",
      //   "21时",
      //   "22时",
      //   "23时",
      // ],
      xData: actualData,
      yData: expectedData,
      title,
zhitan-vue/vite.config.js
@@ -4,9 +4,9 @@
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
  mode='production'
  mode = "production"
  const env = loadEnv(mode, process.cwd())
  console.log(mode,'==========env')
  console.log(mode, "==========env")
  const { VITE_APP_ENV } = env
  return {
    // 部署生产环境和开发环境下的URL。
@@ -33,7 +33,7 @@
      proxy: {
        // https://cn.vitejs.dev/config/#server-proxy
        "/dev-api": {
          target: "http://139.159.201.118:8201",
          target: "http://localhost",
          changeOrigin: true,
          rewrite: (p) => p.replace(/^\/dev-api/, ""),
        },