Преглед изворни кода

2022-11-30 update

1. 同步蓝色版代码
2. 调整部分菜单router
3. 删除部分不必要文件
moccus пре 2 година
родитељ
комит
d63e0f29d7
33 измењених фајлова са 1097 додато и 4688 уклоњено
  1. 1 1
      src/components/Header.vue
  2. 0 0
      src/pages/dataAnalysis/chartTheme.json
  3. 0 0
      src/pages/dataAnalysis/combine/components/chartTheme.json
  4. 0 0
      src/pages/dataAnalysis/combine/components/current-scatter-chart.vue
  5. 0 0
      src/pages/dataAnalysis/combine/components/search.vue
  6. 0 0
      src/pages/dataAnalysis/combine/components/table.vue
  7. 8 8
      src/pages/dataFilter/combine/index.vue
  8. 321 0
      src/pages/dataAnalysis/lineAnalysis/components/current-scatter-chart.vue
  9. 53 0
      src/pages/dataAnalysis/lineAnalysis/components/search.vue
  10. 52 0
      src/pages/dataAnalysis/lineAnalysis/components/table.vue
  11. 537 0
      src/pages/dataAnalysis/lineAnalysis/index.vue
  12. 0 0
      src/pages/dataAnalysis/rateAnalysis/chartTheme.json
  13. 0 0
      src/pages/dataAnalysis/rateAnalysis/components/chart.vue
  14. 0 0
      src/pages/dataAnalysis/rateAnalysis/components/lineChart.vue
  15. 0 0
      src/pages/dataAnalysis/rateAnalysis/components/scatterSingleChart.vue
  16. 0 0
      src/pages/dataAnalysis/rateAnalysis/components/search.vue
  17. 76 14
      src/pages/curveDeviation/rateAnalysis/index.vue
  18. 0 174
      src/pages/dataFilter/bj_custom/component/BatchImport.vue
  19. 0 989
      src/pages/dataFilter/bj_custom/component/edit_form.vue
  20. 0 386
      src/pages/dataFilter/bj_custom/list copy.vue
  21. 0 616
      src/pages/dataFilter/bj_custom/list.vue
  22. 0 181
      src/pages/dataFilter/bj_scada/component/BatchImport.vue
  23. 0 126
      src/pages/dataFilter/bj_scada/component/Electric_DI_Point_Select copy.vue
  24. 0 52
      src/pages/dataFilter/bj_scada/component/Electric_DI_Point_Select.vue
  25. 0 257
      src/pages/dataFilter/bj_scada/component/edit_form.vue
  26. 0 521
      src/pages/dataFilter/bj_scada/list.vue
  27. 0 180
      src/pages/dataFilter/bj_windturbine/component/BatchImport.vue
  28. 0 56
      src/pages/dataFilter/bj_windturbine/component/DI_Point_Select.vue
  29. 0 415
      src/pages/dataFilter/bj_windturbine/component/edit_form.vue
  30. 0 675
      src/pages/dataFilter/bj_windturbine/list.vue
  31. 3 3
      src/pages/dataFilter/prepare/index.vue
  32. 3 3
      src/pages/dataFilter/process/index.vue
  33. 43 31
      src/router/index.js

+ 1 - 1
src/components/Header.vue

@@ -66,7 +66,7 @@
 <script setup>
 import { ref, computed, onMounted, reactive } from "vue";
 import { useRouter } from "vue-router";
-import { editRequest } from "/@/api/api.js";
+// import { editRequest } from "/@/api/api.js";
 import { ElMessage } from "element-plus";
 import { useStore } from "vuex";
 import { JSEncrypt } from "jsencrypt";

src/pages/dataFilter/chartTheme.json → src/pages/dataAnalysis/chartTheme.json


src/pages/dataFilter/combine/components/chartTheme.json → src/pages/dataAnalysis/combine/components/chartTheme.json


src/pages/dataFilter/combine/components/current-scatter-chart.vue → src/pages/dataAnalysis/combine/components/current-scatter-chart.vue


src/pages/dataFilter/combine/components/search.vue → src/pages/dataAnalysis/combine/components/search.vue


src/pages/dataFilter/combine/components/table.vue → src/pages/dataAnalysis/combine/components/table.vue


+ 8 - 8
src/pages/dataFilter/combine/index.vue

@@ -13,9 +13,9 @@ import CurrentScatterChart from './components/current-scatter-chart.vue'
 // import tableRes from '@/data/table.json'
 // import areaDataRes from '@/data/areaData.json'
 /**配置参数 */
-const treeHeight = ref('40vh') //tree高度
-const excelHeight = ref('40vh') //excel高度
-const tableHeight = ref('75vh')
+const treeHeight = ref((window.innerHeight - 210) / 2 + 'px') //tree高度
+const excelHeight = ref((window.innerHeight - 210) / 2 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 254 + 'px')
 /**excel 开始 */
 const excelCheckboxShow = ref(false)
 const excelType = ref('')
@@ -462,11 +462,11 @@ onMounted(() => {
 		treeHeight.value = (window.innerHeight - 210) / 2  + 'px'
 	})
 	/**test */
-	funExcelChange({
-		id: 1,
-		name: 'excel',
-		type: 'fitting',
-	})
+	// funExcelChange({
+	// 	id: 1,
+	// 	name: 'excel',
+	// 	type: 'fitting',
+	// })
 })
 /**activated */
 onActivated(() => {

+ 321 - 0
src/pages/dataAnalysis/lineAnalysis/components/current-scatter-chart.vue

@@ -0,0 +1,321 @@
+<template>
+  <div class="chart" :id="id"></div>
+</template>
+
+<script>
+import util from "@tools/util";
+import partten from "@tools/partten";
+import * as echarts from "echarts";
+import chartTheme from './../../chartTheme.json'
+
+export default {
+  name: 'currentScatterChart',
+  props: {
+    // 图表宽度
+    width: {
+      type: String,
+      default: "100%",
+    },
+    // 图表高度
+    height: {
+      type: String,
+      default: "350px",
+    },
+    // 图表主标题
+    chartTitle: {
+      type: String,
+      default: "自定义图表组件",
+    },
+    // X 轴配置项
+    xAxisData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // Y 轴配置项
+    yAxisData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    dataSet: {
+      type: String,
+      default: ''
+    },
+    // 图表核心数据
+    seriesData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // 是否显示图表图例
+    showLegend: {
+      type: Boolean,
+      default: true,
+    },
+    // 是否默认采用笔刷模式
+    brushSelected: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      id: "",
+      chart: null,
+      color: [
+        "#05bb4c",
+        "#4b55ae",
+        "#fa8c16",
+        "#f8de5b",
+        "#1a93cf",
+        "#c531c7",
+        "#bd3338",
+      ],
+      theme: 'dark'
+    };
+  },
+  methods: {
+    resize() {},
+    initChart() {
+      const that = this;
+      echarts.registerTheme('chartTheme', chartTheme)
+      let myChart = echarts.init(document.getElementById(this.id), 'chartTheme');
+      //指定图表的配置项和数据
+      const option = {
+        //标题
+        title: {
+          text: that.chartTitle,
+          right: 440,
+          top: 4,
+          textStyle: {
+            fontSize: 14,
+            color: that.theme === "dark" ? partten.getColor("grayl") : "#000",
+          },
+        },
+        // backgroundColor:
+        //   that.theme === "dark"
+        //     ? "rgba(0,0,0,0.4)"
+        //     : "rgba(255,255,255,0.5)",
+        //工具箱
+        toolbox: {
+          show: true,
+          x: "right",
+          position: [10, 10],
+          // backgroundColor:'rgba(0,0,0,0.4)',
+          borderColor: partten.getColor("gray"),
+          textStyle: {
+            fontSize: util.vh(16),
+            color: "#fff",
+          },
+          iconStyle: {
+            borderColor:"#fff",
+          },
+          emphasis: {
+            iconStyle: {
+              borderColor: "#fff",
+            },
+          },
+        },
+        tooltip: {
+          trigger: "item",
+          axisPointer: {
+            type: "cross",
+          },
+          backgroundColor: "rgba(0,0,0,0.4)",
+          borderColor: partten.getColor("gray"),
+          textStyle: {
+            fontSize: util.vh(16),
+            color: "#fff",
+          },
+          formatter(params) {
+            return params.value?.x
+              ? `${params.seriesName}<br />风速:${params.value.x}m/s<br />功率:${params.value.y}kW`
+              : `${params.name}`;
+          },
+        },
+        brush: {
+          seriesIndex: [2,3],
+          yAxisIndex: 0,
+          transformable: true,
+          throttleType: "debounce",
+          throttleDelay: 1000,
+          removeOnClick: true,
+          brushType: "polygon",
+          brushMode: "multiple",
+          brushStyle: {
+            borderWidth: 1,
+            borderColor: "#ff2424",
+          },
+        },
+        dataZoom: [
+          {
+            type: "inside", //图表下方的伸缩条
+            show: false, //是否显示
+            realtime: true, //拖动时,是否实时更新系列的视图
+            start: 0, //伸缩条开始位置(1-100),可以随时更改
+            end: 100, //伸缩条结束位置(1-100),可以随时更改
+          },
+          {
+            type: "slider", //图表下方的伸缩条
+            show: false, //是否显示
+            realtime: true, //拖动时,是否实时更新系列的视图
+            start: 0, //伸缩条开始位置(1-100),可以随时更改
+            end: 100, //伸缩条结束位置(1-100),可以随时更改
+          },
+        ],
+        textStyle: {
+          fontSize: util.vh(16),
+          color: that.theme === "dark" ? "#fff" : "#000",
+        },
+        //图例-每一条数据的名字
+        legend: {
+          show: that.showLegend,
+          data: [ "拟合功率", "保证功率","无用点", "有用点", "Cp值"],
+          right: "120",
+          top: "5",
+          // icon: "circle",
+          itemWidth: 6,
+          inactiveColor:
+            that.theme === "dark"
+              ? partten.getColor("gray")
+              : "#000",
+          textStyle: {
+            color:
+              that.theme === "dark"
+                ? partten.getColor("grayl")
+                : "#000",
+            fontSize: 12,
+          },
+          
+        },
+        grid: {
+          top: 48,
+          left: 40,
+          right: 40,
+          bottom: 24,
+        },
+        //x轴
+        xAxis: [
+          {
+            type: "value",
+            boundaryGap: false,
+            data: that.xAxisData || [],
+            min: 0,
+            max: 25,
+            interval: 1,
+            axisLabel: {
+              formatter: "{value}",
+            },
+            splitLine: {
+              show: false,
+            },
+            textStyle: {
+              color:
+                that.theme === "dark"
+                  ? partten.getColor("gray")
+                  : "#000",
+            },
+          },
+        ],
+        //y轴没有显式设置,根据值自动生成y轴
+        yAxis: [{
+          splitLine: { show: false },
+          position: 'left',
+          min: 0,
+        }, {
+          splitLine: { show: false },
+          position: 'right',
+          min: 0,
+        }],
+        animation: true,
+        dataset: that.dataSet.length? JSON.parse(that.dataSet) : [],
+        //数据-data是最终要显示的数据
+        series: that.seriesData,
+      };
+
+      that.resize = function () {
+        myChart.resize();
+      };
+
+      window.addEventListener("resize", that.resize);
+
+      myChart.setOption(option);
+      if (that.brushSelected) {
+        myChart.dispatchAction({
+          type: "takeGlobalCursor",
+          // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+          key: "brush",
+          brushOption: {
+            seriesIndex: [2,3],
+            yAxisIndex: 0,
+            transformable: true,
+            throttleType: "debounce",
+            throttleDelay: 1000,
+            removeOnClick: true,
+            brushType: "polygon",
+            brushMode: "multiple",
+            brushStyle: {
+              borderWidth: 1,
+              color: "rgba(255,36,36,0.2)",
+              borderColor: "#ff2424",
+            },
+          },
+        });
+      }
+      myChart.off("brushSelected");
+      myChart.on("brushSelected", (params) => {
+        that.$emit("getSelected", params.batch || []);
+      });
+      myChart.off('click')
+      myChart.on('click', params => {
+          console.log(params)
+          if(params.componentType === 'markArea'){
+            myChart.dispatchAction({
+              type: 'brush',
+              areas: [
+                {
+                  xAxisIndex: 0,
+                  brushType: 'lineX',
+                  coordRange: [params.data.coord[0][0], params.data.coord[1][0]]
+                },
+              ]
+            });
+          }
+        })
+    },
+  },
+  created() {
+    this.id = "chart-" + util.newGUID();
+  },
+  mounted() {
+    // this.$nextTick(() => {
+      this.$el.style.width = this.width;
+      this.$el.style.height = this.height;
+      this.initChart();
+    // });
+  },
+  updated() {
+    console.log('update')
+    let myChart = echarts.init(document.getElementById(this.id));
+    myChart.dispose();
+    this.$nextTick(() => {
+      this.initChart();
+    });
+  },
+  unmounted() {
+    window.removeEventListener("resize", this.resize);
+  },
+};
+</script>
+
+<style>
+.chart {
+  width: 100%;
+  height: 100%;
+  display: inline-block;
+}
+</style>

+ 53 - 0
src/pages/dataAnalysis/lineAnalysis/components/search.vue

@@ -0,0 +1,53 @@
+<script setup name="search">
+import { reactive, ref } from 'vue'
+import submitBtn from '@com/submitBtn'
+
+const queryForm = reactive({
+	maxs: 25,
+	mins: 0,
+	maxp: 2500,
+	minp: 0,
+	dimension: 10,  //拟合维度
+	mode: 0   //拟合方式
+})
+/**导出 */
+const emits = defineEmits(['submit'])
+const funSubmit = async () => {
+	emits('submit', queryForm)
+}
+/**created */
+</script>
+<template>
+	<div class="pl-[20px] flex items-center h-[80px] relative">
+		<div class="absolute top-[-7px] left-[20px] text-[#B3B3B3] text-[14px]">操作面板</div>
+		<el-form class="" :inline="true" :model="queryForm">
+			<el-form-item label="最大风速" class="!mb-0">
+				<el-input-number v-model="queryForm.maxs" size="small" :max="30"></el-input-number>
+			</el-form-item>
+			<el-form-item label="最小风速" class="!mb-0">
+				<el-input-number v-model="queryForm.mins" size="small" :min="0"></el-input-number>
+			</el-form-item>
+			<el-form-item label="最大功率" class="!mb-0">
+				<el-input-number v-model="queryForm.maxp" size="small"></el-input-number>
+			</el-form-item>
+			<el-form-item label="最小功率" class="!mb-0">
+				<el-input-number v-model="queryForm.minp" size="small" :min="0"></el-input-number>
+			</el-form-item>
+			<el-form-item label="多项式" class="!mb-0">
+				<el-select v-model="queryForm.dimension" class="w-[80px]">
+					<el-option v-for="item in 30" :key="item" :value="item" :label="item"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item label="拟合方式" class="!mb-0">
+				<el-select v-model="queryForm.mode" class="w-[120px]">
+					<el-option :value="0" label="单台拟合"></el-option>
+					<el-option :value="1" label="合并拟合"></el-option>
+					<el-option :value="2" label="同名拟合"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item class="!mb-0">
+				<submit-btn @click="funSubmit" desc="曲线拟合"></submit-btn>
+			</el-form-item>
+		</el-form>
+	</div>
+</template>

+ 52 - 0
src/pages/dataAnalysis/lineAnalysis/components/table.vue

@@ -0,0 +1,52 @@
+<script setup name="table">
+import { computed, ref } from 'vue';
+
+const props = defineProps({
+  height: {
+    type: String,
+    default: '800px'
+  },
+  data: {
+    type: Array,
+    default: () => ([]),
+  },
+  column: {
+    type: Array,
+    default: () => ([]),
+  },
+  tableName: {
+    type: String,
+    default: '',
+  },
+  tableId: {
+    type: String,
+    default: '',
+  },
+  loading: {
+    type: Boolean,
+    default: false,
+  }
+})
+const emits = defineEmits(['export'])
+const funExport = () => {
+  emits('export')
+}
+const tableRef = ref('')
+const tableHeight =  computed(() => {
+  return tableRef.value.offsetHeight? tableRef.value.offsetHeight - 46 : 739
+})
+</script>
+<template>
+  <div ref="tableRef" class=""
+    :style="{ height: typeof props.height === 'string' ? props.height : props.height + 'px' }">
+    <div class="flex justify-between items-center pb-[10px]">
+      <h3>{{ props.tableName }}</h3>
+      <!-- <el-button size="small" type="primary" @click="funExport" :disabled="!props.tableId">数据导出</el-button> -->
+    </div>
+    <el-table stripe :data="props.data" size="small" v-loading="props.loading" :max-height="tableHeight"
+      :style="{ width: '100%' }">
+      <el-table-column align="center" show-overflow-tooltip v-for="item in props.column" :prop="item.prop"
+        :label="item.label" sortable resizable :min-width="item.width ? item.width : 80" />
+    </el-table>
+  </div>
+</template>

+ 537 - 0
src/pages/dataAnalysis/lineAnalysis/index.vue

@@ -0,0 +1,537 @@
+<script setup name="prepare">
+import searchCop from './components/search.vue'
+import excelCop from '@/components/excel.vue'
+import treeCop from '@/components/tree.vue'
+import tableCop from './components/table.vue'
+import submitBtn from '@/components/submitBtn'
+import { ref, nextTick, onActivated, onMounted, reactive } from 'vue'
+import request from '@/utils/request'
+import { ElMessage } from 'element-plus'
+import util from "@tools/util";
+import CurrentScatterChart from './components/current-scatter-chart.vue'
+// import dotRes from '@/data/dot.json'
+// import tableRes from '@/data/table.json'
+// import areaDataRes from '@/data/areaData.json'
+/**配置参数 */
+const treeHeight = ref((window.innerHeight - 210) / 2 + 'px') //tree高度
+const excelHeight = ref((window.innerHeight - 210) / 2 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 254 + 'px')
+/**excel 开始 */
+const excelCheckboxShow = ref(false)
+const excelType = ref('')
+const excelCheckIds = ref([])
+const excelList = ref([])
+const funExcelChange = async (obj) => { //点击excel项时
+	activeTab.value = '1'
+	isChartArea.value = false
+	tableShowId.value = obj.id
+	tableName.value = obj.name
+	excelType.value = obj.type // 接收excel的type 用于控制右侧tab展示
+
+	let res = null
+	let chartRes = {
+		scatterhs: [[]],
+		scatterls: [[]],
+		sjgl: [[]],
+		llgl: [[]],
+		cpz: [[]]
+	}
+	let poiRes = null
+	let chartResponse = null
+	tableLoading.value = true
+	if (obj.type === 'process') {
+		res = await request.get('/power/process/show', { params: { id: obj.id } })
+	} else if (obj.type === 'fitting') {
+		activeTab.value = '2'
+		res = await request.get('/power/fitting/show', { params: { id: obj.id } })
+		// res = tableRes
+		// chartResponse = dotRes
+		chartResponse = await request.get('/power/fitting/curve', { params: { id: obj.id, p: 1 } })
+		poiRes = await request.get('/power/fitting/curve/ratio', {params: {id: obj.id}})
+		// poiRes = areaDataRes
+	}
+	tableColumn.value = res.data.title.map(o => {
+		return {
+			prop: o.key,
+			width: o.des==='时间'? 100: 80,
+			label: o.des,
+		}
+	})
+	tableData.value = res.data.data
+	tableLoading.value = false
+
+	// markDot 
+	if(poiRes && poiRes.code=== 200){
+		markDot.pcl5 = poiRes.data.pcl5
+		markDot.pcl10 = poiRes.data.pcl10
+		markDot.pcl12 = poiRes.data.pcl12
+		markDot.pcl25 = poiRes.data.pcl25
+	}
+
+	if (chartResponse && chartResponse.code === 200) {
+		chartRes = chartResponse.data
+		avgObj.cpavg = chartRes.obj.cpavg?.toFixed(2)
+		avgObj.frequency = chartRes.obj.frequency?.toFixed(2)
+		avgObj.pcratio = chartRes.obj.pcratio?.toFixed(2)
+		dataSet.value = JSON.stringify([
+			{
+				source: chartRes.wyd
+			},
+			{
+				source: chartRes.yyd
+			}
+		])
+		const color = ["#1C99FF", "#FF8700", "#3D54BE", "#fa8c16", "#1DA0D7", "#DD5044"]
+		seriesData.value = [
+			{
+				name: "拟合功率",
+				type: "line",
+				symbol: "line", //设定为实心点
+				symbolSize: 0, //设定实心点的大小
+				smooth: true, //这个是把线变成曲线
+				data: chartRes.sjgl,
+				xAxisIndex: 0,
+			},
+			{
+				name: "保证功率",
+				type: "line",
+				symbol: "line", //设定为实心点
+				symbolSize: 0, //设定实心点的大小
+				smooth: true, //这个是把线变成曲线
+				data: chartRes.llgl,
+				xAxisIndex: 0,
+			},
+			{
+				type: 'effectScatter',
+				showEffectOn: "emphasis",
+				rippleEffect: {
+					scale: 1
+				},
+				name: '无用点',
+				symbolSize: (data) => {
+					return data.s ? data.s > 10 ? 10 : data.s : 4
+				},
+				datasetIndex: 0,
+				encode: {
+					x: 'x',
+					y: 'y'
+				},
+				xAxisIndex: 0,
+				yAxisIndex: 0,
+			},
+			{
+				type: 'effectScatter',
+				showEffectOn: "emphasis",
+				rippleEffect: {
+					scale: 1
+				},
+				name: '有用点',
+				symbolSize: (data) => {
+					return data.s ? data.s > 10 ? 10 : data.s : 4
+				},
+				datasetIndex: 1,
+				encode: {
+					x: 'x',
+					y: 'y'
+				},
+				xAxisIndex: 0,
+				yAxisIndex: 0,
+			},
+			{
+				name: "Cp值",
+				type: "line",
+				symbol: "line", //设定为实心点
+				symbolSize: 0, //设定实心点的大小
+				smooth: true, //这个是把线变成曲线
+				data: chartRes.cpz,
+				xAxisIndex: 0,
+				yAxisIndex: 1,
+			},
+		]
+	}
+}
+const funExcelCheckChange = ({ checkArr, data }) => {   //bug 
+	excelCheckIds.value = checkArr
+}
+/**excel fitData */
+const excelFitList = ref([])
+/**prepare tree 开始 */
+const treeData = ref([])
+const funRepeatMap = (arr) => {
+	return arr.map(o => {
+		if (o.children) {
+			const findIndex = o.children.findIndex(p => !!p.type)
+			if (findIndex !== -1) {
+				o.childs = o.children
+				o.children = []
+			}
+		}
+		return {
+			...o,
+			children: o.children ? funRepeatMap(o.children) : []
+		}
+	})
+}
+const funGetTree = async () => {
+	const res = await request.get("/power/process/tree")
+	treeData.value = funRepeatMap(res.data)
+}
+const funCurrentChange = ({ current, currentNode }) => {
+	excelCheckboxShow.value = true
+	if (current.childs) {
+		excelList.value = current.childs.map(o => {
+			return {
+				id: o.id,
+				interval: o.interval,
+				path: o.path,
+				prepareid: o.prepareid,
+				station: o.station,
+				time: o.time,
+				type: o.type,
+				windturbine: o.windturbine,
+				name: o.path.substring(o.path.indexOf(o.station + '_') + (o.station + '_').length)
+			}
+		})
+	} else {
+		excelList.value = []
+	}
+}
+const funTreeCheckChange = ({ current, checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys }) => {  //tree change  -> excel change
+	funCurrentChange({ current, currentNode: '' })
+	const checkIds = []
+	if (checkedNodes.length) {
+		for (const node of checkedNodes) {
+			if (node.childs && node.childs.length) {
+				for (const child of node.childs) {
+					checkIds.push(child.id)
+				}
+			}
+		}
+	}
+	excelCheckIds.value = checkIds
+}
+
+/**process tree 开始 */
+const processTreeData = ref([])
+const funGetProcessTree = async () => {
+	const res = await request.get("/power/fitting/tree")
+	processTreeData.value = funRepeatMap(res.data)
+}
+const funProcessCurrentChange = ({ current, currentNode }) => {
+	if (current.childs) {
+		excelFitList.value = current.childs.map(o => {
+			return {
+				id: o.id,
+				interval: o.interval,
+				path: o.path,
+				prepareid: o.prepareid,
+				station: o.station,
+				time: o.time,
+				type: o.type,
+				windturbine: o.windturbine,
+				name: o.path.substring(o.path.indexOf(o.station + '_') + (o.station + '_').length)
+			}
+		})
+	} else {
+		excelFitList.value = []
+	}
+}
+
+/**table 开始 */
+const tableShowId = ref('')
+const tableColumn = ref([])
+const tableLoading = ref(false)
+const tableName = ref('')
+const tableData = ref([])
+/**table 结束 */
+/**search 开始 */
+const funSubmit = async (query) => {
+	if (!excelCheckIds.value.length) {
+		ElMessage.error('请勾选要预处理的项')
+		return false
+	}
+	const params = {
+		...query,
+		ids: excelCheckIds.value.join(',')
+	}
+	const res = await request.get('/power/fitting/data', { params: params })
+	if (res.code === 200) {
+		ElMessage.success(res.msg)
+		funGetProcessTree()
+		const excelInfo = res.data
+
+		/**拟合完成后 显示右侧图表及数据 */
+		funExcelChange({
+			id: excelInfo.id,
+			name: excelInfo.path.substring(excelInfo.path.indexOf(excelInfo.station + '_') + (excelInfo.station + '_').length),
+			type: 'fitting'
+		})
+	}
+}
+/**chart Data */
+const avgObj = reactive({ //平均cpz等
+	cpavg: '',
+	frequency: '',
+	pcratio: ''
+})
+const markDot = reactive({ //3-5 point点等
+	pcl5: null,
+	pcl10: null,
+	pcl12: null,
+	pcl25: null
+})
+const xAxisData = ref([])
+const chartRef = ref() //chart 的ref
+const seriesData = ref([])
+const isChartArea = ref(false) // 用来控制图表是否区域划分
+const dataSet = ref('')
+const funChartSelect = async (batch) => {
+	const wDataArr = []
+	const yDataArr = []
+	let scatterls = []
+	let scatterhs = []
+	let dataSetObj = []
+	wtData.value = []
+	if (batch?.length && dataSet.value) {
+		scatterls = batch[0].selected[2].dataIndex
+		scatterhs = batch[0].selected[3].dataIndex
+		if (scatterls?.length || scatterhs?.length) {
+			dataSetObj = JSON.parse(dataSet.value)
+			if (scatterls?.length) {
+				for (const scatterIndex of scatterls) {
+					wDataArr.push(dataSetObj[0].source[scatterIndex].k)
+				}
+			}
+			if (scatterhs?.length) {
+				for (const scatterIndex of scatterhs) {
+					yDataArr.push(dataSetObj[1].source[scatterIndex].k)
+				}
+			}
+			const wtRes = await request.get('/power/fitting/filter', { params: { yk: yDataArr.join(','), wk: wDataArr.join(',') } })
+			if (wtRes.code === 200) {
+				let id = 1
+				const tempArr = [] //用于以风机id 聚合dataArr
+				if (wtRes.data?.length) {
+					for (const data of wtRes.data) {
+						if (tempArr.length) {
+							const findIndex = tempArr.findIndex(o => o.wtId === data.wtId)
+							if (findIndex !== -1) {
+								if (!tempArr[findIndex].children) {
+									tempArr[findIndex].children = []
+								}
+								tempArr[findIndex].children.push({ ...data, id: id, filter: data.filter === 0 ? '是' : '否' })
+								id++
+							} else {
+								tempArr.push({ ...data, id: id, filter: data.filter === 0 ? '是' : '否' })
+								id++
+							}
+						} else {
+							tempArr.push({ ...data, id: id, filter: data.filter === 0 ? '是' : '否' })
+							id++
+						}
+					}
+					wtDialog.value = true
+					nextTick(() => {
+						wtTab.value = 'table'
+						wtData.value = tempArr
+					})
+				}
+			}
+		}
+	}
+}
+const funChartArea = () => {
+	if (seriesData.value?.length) {
+		if (!isChartArea.value) {
+			// 请求一下
+			seriesData.value[0] = {
+					...seriesData.value[0],
+					markLine: {
+						symbol: 'none',
+						label: {
+							show: false
+						},
+						lineStyle: {
+							color: 'rgba(96,174,255, 1)'
+						},
+						data: [
+							{
+								xAxis: 3,
+								valueIndex: 0,
+							},
+							{
+								xAxis: 5,
+								valueIndex: 0
+							},
+							{
+								xAxis: 10,
+								valueIndex: 0
+							},
+							{
+								xAxis: 12,
+								valueIndex: 0
+							},
+							{
+								xAxis: 25,
+								valueIndex: 0
+							},
+						]
+					},
+					markArea: {
+						label: {
+							fontSize: util.vh(12),
+						},
+						itemStyle: {
+							color: 'rgba(236,245,255, 0)'
+						},
+						emphasis: {
+							itemStyle: {
+								color: 'rgba(96,174,255, 0.5)'
+							}
+						},
+						data: [
+							[
+								{
+									name: `3~5m 偏差率: ${markDot.pcl5}`,
+									xAxis: 3,
+								},
+								{
+									xAxis: 5,
+								}
+							],
+							[
+								{
+									name: `5~10m 偏差率: ${markDot.pcl10}`,
+									xAxis: 5,
+								},
+								{
+									xAxis: 10,
+								}
+							],
+							[
+								{
+									name: `10~12m 偏差率: ${markDot.pcl12}`,
+									xAxis: 10,
+								},
+								{
+									xAxis: 12,
+								}
+							],
+							[
+								{
+									name: `12~25m 偏差率: ${markDot.pcl25}`,
+									xAxis: 12,
+								},
+								{
+									xAxis: 25,
+								}
+							],
+						]
+					},
+				}
+			isChartArea.value = true
+		} else {
+			seriesData.value[0] = {
+					...seriesData.value[0],
+					markLine: null,
+					markArea: null,
+				}
+			isChartArea.value = false
+		}
+	}
+}
+/**dialog 数据 */
+const wtDialog = ref(false)
+const wtData = ref([])
+const wtTab = ref('table')
+/**tab  */
+const activeTab = ref('1')
+/**created */
+funGetTree()
+funGetProcessTree()
+/**mounted */
+onMounted(() => {
+	tableHeight.value = window.innerHeight - 254 + 'px'
+	excelHeight.value =(window.innerHeight - 210) / 2 + 'px'
+	treeHeight.value = (window.innerHeight - 210) / 2 + 'px'
+	window.addEventListener('resize', () => {
+		tableHeight.value = window.innerHeight - 254 + 'px'
+		excelHeight.value = (window.innerHeight - 210) / 2 + 'px'
+		treeHeight.value = (window.innerHeight - 210) / 2  + 'px'
+	})
+	// /**test */
+	// funExcelChange({
+	// 	id: 1,
+	// 	name: 'excel',
+	// 	type: 'fitting',
+	// })
+})
+/**activated */
+onActivated(() => {
+	funGetTree()
+	funGetProcessTree()
+})
+</script>
+<template>
+	<div class="py-[10px] px-[10px]">
+		<search-cop class="mb-[20px] bg-[rgba(0,0,0,0.3)] shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
+		</search-cop>
+		<el-dialog v-model="wtDialog" title="风机功率点位">
+			<el-tabs v-model="wtTab">
+				<el-tab-pane label="数据" name="table">
+					<el-table :data="wtData" row-key="id" :max-height="550">
+						<el-table-column property="wtId" align="center" label="风机" />
+						<el-table-column property="time" sortable :width="160" align="center" label="时间" />
+						<el-table-column property="speed" sortable align="center" label="风速(m/s)" />
+						<el-table-column property="power" sortable align="center" label="功率(kw)" />
+						<el-table-column property="rr" sortable align="center" label="转速" />
+						<el-table-column property="filter" sortable align="center" label="是否有用点" />
+					</el-table>
+				</el-tab-pane>
+				<el-tab-pane label="故障" name="problem" disabled>
+
+				</el-tab-pane>
+				<el-tab-pane label="预警" name="warning" disabled>
+
+				</el-tab-pane>
+			</el-tabs>
+		</el-dialog>
+		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]">
+			<div class="text-[14px] absolute top-[-7px] text-[#B3B3B3] left-[20px]">数据展示</div>
+			<el-row :gutter="10">
+				<el-col :span="5">
+					<tree-cop :data="treeData" @checkChange="funTreeCheckChange" :show-checkbox="true" :height="treeHeight"
+						@currentChange="funCurrentChange" @refresh="funGetTree"></tree-cop>
+					<tree-cop class="mt-[10px]" :data="processTreeData" :height="treeHeight"
+						@currentChange="funProcessCurrentChange" @refresh="funGetProcessTree"></tree-cop>
+				</el-col>
+				<el-col :span="3">
+					<excel-cop :checkIds="excelCheckIds" :showCheckbox="excelCheckboxShow" :data="excelList" :height="excelHeight"
+						@excelChange="funExcelChange" @checkChange="funExcelCheckChange"></excel-cop>
+					<excel-cop class="mt-[10px]" :data="excelFitList" :height="excelHeight" @excelChange="funExcelChange">
+					</excel-cop>
+				</el-col>
+				<el-col :span="16">
+					<div class="px-[10px] shadow rounded-[6px] shadow-blue-500 bg-[rgba(0,0,0,0.3)]">
+						<submitBtn class="absolute right-[16px] top-[6px] z-10" desc="区域划分" v-if="activeTab === '2' && excelType === 'fitting'" @click="funChartArea"></submitBtn>
+						<el-tabs v-model="activeTab">
+							<el-tab-pane label="表格数据" name="1">
+							</el-tab-pane>
+							<el-tab-pane label="图表展示" name="2" v-if="excelType === 'fitting'">
+							</el-tab-pane>
+							<table-cop v-show="activeTab === '1'" :data="tableData" :loading="tableLoading" :column="tableColumn"
+								:height="tableHeight" :tableId="tableShowId" :tableName="tableName"></table-cop>
+							<div v-show="activeTab === '2'"
+								:style="{ height: typeof tableHeight === 'string' ? tableHeight : tableHeight + 'px' }"
+								class="p-[10px]">
+								<CurrentScatterChart ref="chartRef" width="100%" height="calc( 100% - 20px )" :chartTitle="'平均Cp:'+avgObj.cpavg+'; 静风频率:'+avgObj.frequency+'; 曲线偏差率:'+avgObj.pcratio+'%'"
+									:xAxisData="xAxisData" :yAxisData="{ splitLine: { show: false } }" :seriesData="seriesData"
+									:showLegend="true" :brushSelected="!isChartArea" :dataSet="dataSet" @getSelected="funChartSelect" />
+							</div>
+						</el-tabs>
+					</div>
+				</el-col>
+			</el-row>
+		</div>
+	</div>
+</template>

src/pages/curveDeviation/rateAnalysis/chartTheme.json → src/pages/dataAnalysis/rateAnalysis/chartTheme.json


src/pages/curveDeviation/rateAnalysis/components/chart.vue → src/pages/dataAnalysis/rateAnalysis/components/chart.vue


src/pages/curveDeviation/rateAnalysis/components/lineChart.vue → src/pages/dataAnalysis/rateAnalysis/components/lineChart.vue


src/pages/curveDeviation/rateAnalysis/components/scatterSingleChart.vue → src/pages/dataAnalysis/rateAnalysis/components/scatterSingleChart.vue


src/pages/curveDeviation/rateAnalysis/components/search.vue → src/pages/dataAnalysis/rateAnalysis/components/search.vue


+ 76 - 14
src/pages/curveDeviation/rateAnalysis/index.vue

@@ -6,20 +6,22 @@ import chartCop from './components/chart.vue'
 import lineChartCop from './components/lineChart.vue'
 import scatterSingleChartCop from './components/scatterSingleChart.vue'
 import { ElMessage } from 'element-plus';
-import { onMounted, ref, onActivated } from 'vue'
+import { onMounted, ref, onActivated, shallowRef, reactive } from 'vue'
 import request from '@/api/axios.js'
 // import flowerRes from '@/data/flower.json'
 // import lineChartRes from '@/data/lineNew.json'
 /**配置参数 */
-const treeHeight = ref('81vh') //tree高度
-const excelHeight = ref('81vh') //excel高度
-const tableHeight = ref('81vh')
+const treeHeight = ref(window.innerHeight - 200 + 'px') //tree高度
+const excelHeight = ref(window.innerHeight - 200 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 200 + 'px')
 /**excel 开始 */
 const excelCheckIds = ref([])
 const excelList = ref([])
 //点击excel项时
 const funExcelChange = async (obj) => { 
 	excelCheckIds.value = [obj.id] //当为单选展示风机图表时
+	chartExcelList.value = excelList.value  // 选中excel当前项时, excel列表赋值给dialog 下拉框
+	queryForm.checkIds = excelList.value.map(o => o.id)
 }
 const funExcelCheckChange = ({ checkArr, data }) => {
 	excelCheckIds.value = checkArr
@@ -331,12 +333,43 @@ const scatterSeries = ref(
 				}
 			]
 )
+/**dialog */
+const dialog = ref(false)
+const actCop = shallowRef(chartCop)
+const actCopProp = ref({
+	xAxis: [],
+	subtext: '',
+	title: '',
+	isRadar: false,
+	series: [],
+	yAxis: [],
+	dataset: []
+})
+const queryForm = reactive({
+	checkIds: []
+})
+const chartExcelList = ref([]) //dialog 下拉项
+const funActCop = (obj, type) => {
+	switch(type){
+		case 'chartCop':
+			actCop.value = chartCop
+			break
+		case 'lineChartCop':
+			actCop.value = lineChartCop
+			break
+		case 'scatterSingleChartCop':
+			actCop.value = scatterSingleChartCop
+			break
+	}
+	dialog.value = true
+	actCopProp.value = obj
+}
 /**created */
 funGetTree()
 /**activated */
 onMounted(() => {
 	//test
-	funSubmit()
+	// funSubmit()
 	//
 	tableHeight.value = window.innerHeight - 200 + 'px'
 	excelHeight.value =(window.innerHeight - 200) + 'px'
@@ -355,6 +388,20 @@ onActivated(() => {
 	<div class="bg-white py-[10px] px-[10px] relative">
 		<search-cop class="mb-[20px]  shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
 		</search-cop>
+		<el-dialog width="1200px" v-model="dialog" title="图表">
+			<el-form class="whitespace-nowrap" :inline="true" :model="queryForm">
+				<el-form-item label="" class="!mb-0">
+					<el-select v-model="queryForm.checkIds" clearable collapse-tags multiple>
+						<el-option v-for="item in chartExcelList" :key="item.id" :value="item.id" :label="item.name"></el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item class="!mb-0">
+					<submit-btn desc="多台展示"></submit-btn>
+				</el-form-item>
+			</el-form>
+			<component :is="actCop" width="1150px" height="800px" :xAxis="actCopProp.xAxis" :subtext="actCopProp.subtext" :title="actCopProp.title"
+				:isRadar="actCopProp.isRadar" :series="actCopProp.series" :yAxis="actCopProp.yAxis" :dataset="actCopProp.dataset"></component>
+		</el-dialog>
 		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]">
 			<div class="text-[14px] absolute top-[-7px] text-[#B3B3B3] left-[20px]">数据展示</div>
 			<el-row :gutter="10">
@@ -369,15 +416,30 @@ onActivated(() => {
 				</el-col>
 				<el-col :span="16">
 					<div :style="{ height: tableHeight }"
-						class=" flex flex-wrap justify-center items-center overflow-x-hidden overflow-y-auto ">
-						<chart-cop class="mb-[10px] shadow rounded-[6px] shadow-blue-500" :class="{ 'mr-[10px]': index % 2 === 0 }"
-							height="49%" width="49%" v-for="(item, index) in chartData" :key="item.id" :xAxis="item.xAxis"
-							:subtext="item.subtext" :title="item.title" :isRadar="item.isRadar" :series="item.series">
-						</chart-cop>
-						<line-chart-cop class="mr-[10px] shadow rounded-[6px] shadow-blue-500" height="49%" width="49%"
-							:xAxis="linexAxis" :yAxis="lineyAxis" :series="lineSeries" :dataset="lineDataSet"></line-chart-cop>
-						<scatter-single-chart-cop class="shadow rounded-[6px] shadow-blue-500" height="49%" width="49%"
-							:xAxis="scatterxData" :yAxis="scatteryData" :series="scatterSeries"></scatter-single-chart-cop>
+					class="flex flex-wrap justify-center items-center overflow-x-hidden overflow-y-auto ">
+						<div class="mb-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500" v-for="(item, index) in chartData" :key="item.id" :class="{ 'mr-[10px]': index % 2 === 0 }">
+							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18" @click="funActCop(item, 'chartCop')">
+								<ZoomIn />
+							</el-icon>
+							<chart-cop class="" height="100%" width="100%"
+								:xAxis="item.xAxis" :subtext="item.subtext" :title="item.title" :isRadar="item.isRadar"
+								:series="item.series">
+							</chart-cop>
+						</div>
+						<div class="mr-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500">
+							<el-icon class="mr-[10px] mt-[10px] cursor-pointer"  size="18" @click="funActCop({xAxis: linexAxis, yAxis: lineyAxis, series: lineSeries, dataset: lineDataSet}, 'lineChartCop')">
+								<ZoomIn />
+							</el-icon>
+							<line-chart-cop class="" height="100%" width="100%" :xAxis="linexAxis"
+								:yAxis="lineyAxis" :series="lineSeries" :dataset="lineDataSet"></line-chart-cop>
+						</div>
+						<div class="w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500">
+							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18" @click="funActCop({xAxis: scatterxData, yAxis: scatteryData, series: scatterSeries}, 'scatterSingleChartCop')">
+								<ZoomIn />
+							</el-icon>
+							<scatter-single-chart-cop class="" height="100%" width="100%"
+								:xAxis="scatterxData" :yAxis="scatteryData" :series="scatterSeries"></scatter-single-chart-cop>
+						</div>
 					</div>
 				</el-col>
 			</el-row>

+ 0 - 174
src/pages/dataFilter/bj_custom/component/BatchImport.vue

@@ -1,174 +0,0 @@
-<template>
-    <el-dialog 
-        class="avatar-uploader"
-        v-model="visible" 
-        title="批量导入"
-        width="250px"
-        :before-close="beforeClose"
-        @close="dialogCloseHandle">
-        <el-upload
-            class="upload-demo"
-            ref="upload"
-            accept=".xls,.xlsx"
-            action="#"
-            :on-change="uploadOnChangeHandle"
-            :show-file-list="false"
-            :auto-upload="false">
-            <!-- <el-button slot="trigger" size="small" type="primary">选取文件</el-button> -->
-            <img v-if="isFileEmpty" :src="imageUrl" class="avatar">
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-        </el-upload>
-        <span  class="dialog-footer">
-            <!-- <el-button @click="function(){visible = false;$emit('epVisibleCB', visible);}">取 消</el-button> -->
-            <el-button type="primary" @click="btnImportFileClickHandle">导 入</el-button>
-        </span>
-    </el-dialog>
-</template>
-<script>
-import XLSX from 'xlsx';
-import {custombj_batchImport} from '/@/api/api.js';
-export default {
-    props: {
-        isShow: Boolean,
-        pThead: Object,
-    },
-    data() {
-        return {
-            visible: this.isShow,
-            disabled: false,
-            importFile: {},
-            imageUrl: import('/@/assets/img/icon-excel.png'),
-            isFileEmpty: false,
-        };
-    },
-    watch: {
-        isShow(val) {
-            this.visible = val;
-        },
-        importFile(val) {
-            let keys = Object.keys(val);
-            if(keys.length > 0) {
-                this.isFileEmpty = true;
-            }else {
-                this.isFileEmpty = false;
-            }
-        }
-    },
-    methods: {
-        beforeClose() {
-            this.$confirm('确认关闭?')
-            .then(_ => {
-                this.visible = false;
-                this.$emit('epVisibleCB', this.visible);
-            })
-            .catch(_ => {});                
-        },
-        btnImportFileClickHandle() {
-            // 解析excel表格内数据
-            this.readExcel1(this.importFile);
-            // 关闭对话框
-            this.visible = false;
-            this.$emit('epVisibleCB', this.visible);
-        },
-        uploadOnChangeHandle(file,fileList){
-            console.log("file",file);
-            console.log("fileList",fileList);
-            this.importFile = {0:file.raw}
-        },
-        readExcel1(files) {//表格导入
-            var that = this;
-            console.log(files);
-            if(files.length<=0){//如果没有文件名
-                return false;
-            }else if(!/\.(xls|xlsx)$/.test(files[0].name.toLowerCase())){
-                this.$Message.error('上传格式不正确,请上传xls或者xlsx格式');
-                return false;
-            }
-            const fileReader = new FileReader();
-            fileReader.onload = (ev) => {
-                try {
-                    const data = ev.target.result;
-                    const workbook = XLSX.read(data, {
-                        type: 'binary'
-                    });
-                    const wsname = workbook.SheetNames[0];//取第一张表
-                    const ws = XLSX.utils.sheet_to_json(workbook.Sheets[wsname]);//生成json表格内容
-                    console.log(ws);
-                    // that.peopleArr = [];//清空接收数据
-                    // if(that.peopleArr.length == 1 && that.peopleArr[0].roleName == "" && that.peopleArr[0].enLine == ""){
-                    //     that.peopleArr = [];
-                    // }
-                    //重写数据
-                    let tableData = [];
-                    const thead = this.pThead;
-                    ws.map(item => {
-                        let obj = {};
-                        for(let prop in item) {
-                            // 检测属性是否属于thead自身的
-                            if (thead.hasOwnProperty(prop)) {
-                                obj[thead[prop]] = item[prop];
-                            }
-                        }
-                        tableData.push(obj);
-                    });
-                    console.log(tableData);
-                    try{
-                        custombj_batchImport(tableData).then(res => {
-                            console.log(res);
-                            if(res.success) {
-                                this.$message.success('完成导入');
-                                this.$emit('epVisibleCB', this.visible);
-                            }else {
-                                this.$message.error(res.msg);
-                            }
-                        })
-                    }catch(err){
-                        console.log(err)
-                    }
-                    this.$refs.upload.value = '';
-                } catch (e) {
-                    return false;
-                }
-            };
-            fileReader.readAsBinaryString(files[0]);
-        },
-        dialogCloseHandle() {
-            this.importFile = {};
-        }
-    },
-}
-</script>
-<style scoped>
-.avatar {
-    width: 178px;
-    height: 100%;
-    display: block;
-}
-.avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-}
-.avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-    border-color: #409EFF;
-}
-.upload-demo {
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    align-items: center;
-}
-.el-upload--text {
-    width: 178px !important;
-}
-</style>

+ 0 - 989
src/pages/dataFilter/bj_custom/component/edit_form.vue

@@ -1,989 +0,0 @@
-<template>
-  <!--编辑弹出框-->
-  <el-dialog
-    v-model="visible"
-    width="1100px"
-    :before-close="dialogBeforeClose"
-    @open="dialogOpenHandle"
-    @close="dialogCloseHandle"
-  >
-    <el-form
-      ref="form"
-      :model="form"
-      :rules="rules"
-      label-position="top"
-      label-width="200px"
-      :disabled="dialogStatus == 2"
-    >
-      <el-row type="flex" justify="space-between" align="middle" :gutter="10">
-        <el-col :span="15">
-          <el-form-item prop="name">
-            <el-tag>规则名称</el-tag>
-            <el-input v-model="form.name" />
-          </el-form-item>
-        </el-col>
-        <el-col
-          :span="9"
-          style="
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-          "
-        >
-          <el-form-item prop="category">
-            <el-tag>报警类别</el-tag>
-            <el-select v-model="form.category" class="select-mini">
-              <el-option key="1" label="风机" value="1" />
-              <el-option key="2" label="电气" value="2" />
-            </el-select>
-          </el-form-item>
-          <el-form-item prop="rank">
-            <el-tag>报警级别</el-tag>
-            <el-select v-model="form.rank" class="select-mini">
-              <el-option key="1" label="低" value="1" />
-              <el-option key="2" label="中低" value="2" />
-              <el-option key="3" label="中" value="3" />
-              <el-option key="4" label="中高" value="4" />
-              <el-option key="5" label="高" value="5" />
-            </el-select>
-          </el-form-item>
-          <el-form-item prop="enabled">
-            <el-tag>是否启用</el-tag>
-            <el-switch
-              v-model="form.enabled"
-              :active-value="1"
-              :inactive-value="0"
-              active-color="#13ce66"
-            />
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="10">
-        <el-col :span="6">
-          <el-form-item prop="station">
-            <el-tag>风场</el-tag>
-            <el-select
-              v-model="form.station"
-              style="width: 100%"
-              @change="stationChange"
-            >
-              <el-option
-                v-for="item in stationList"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item prop="modelId" v-show="isWindturbine">
-            <el-tag>风机类型</el-tag>
-            <el-select v-model="form.modelId" style="width: 100%">
-              <el-option
-                v-for="item in modelList"
-                :key="item.code"
-                :value="item.code"
-                :label="item.code"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item prop="relatedParts" v-show="isWindturbine">
-            <el-tag>所属部件</el-tag>
-            <el-select v-model="form.relatedParts" style="width: 100%">
-              <el-option
-                v-for="i in relatePartList"
-                :key="i.partCode"
-                :value="i.partCode"
-                :label="i.name"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item prop="fault">
-            <el-tag>预警类型</el-tag>
-            <el-select v-model="form.project" style="width: 100%">
-              <el-option
-                v-for="i in faultList"
-                :key="i.value"
-                :value="i.value"
-                :label="i.name"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="9">
-          <el-form-item prop="expression">
-            <el-tag>表达式</el-tag>
-            <el-input
-              type="textarea"
-              rows="14"
-              v-model="form.expression"
-              :value="form.expression"
-              id="expressionInput"
-            />
-          </el-form-item>
-        </el-col>
-        <el-col :span="9">
-          <el-tabs type="border-card">
-            <el-tab-pane label="AI测点">
-              <el-input v-model="AIPointSearch" @input="AIInputChange">
-                <el-button icon="el-icon-search" />
-              </el-input>
-              <el-table
-                size="mini"
-                fit
-                :show-header="false"
-                :highlight-current-row="true"
-                :stripe="false"
-                :border="false"
-                height="240"
-                :data="AIPointList"
-                @row-dblclick="tbAI_DBClickHandle"
-              >
-                <el-table-column prop="uniformCode" />
-                <el-table-column prop="name" />
-              </el-table>
-            </el-tab-pane>
-            <el-tab-pane label="DI测点">
-              <el-input v-model="DIPointSearch" @input="DIInputChange">
-                <el-button icon="el-icon-search" />
-              </el-input>
-              <el-table
-                size="mini"
-                fit
-                :show-header="false"
-                :highlight-current-row="true"
-                :stripe="false"
-                :border="false"
-                height="240"
-                :data="DIPointList"
-                @row-dblclick="tbDI_DBClickHandle"
-              >
-                <el-table-column prop="uniformCode" />
-                <el-table-column prop="name" />
-              </el-table>
-            </el-tab-pane>
-            <el-tab-pane label="函数">
-              <el-table
-                size="mini"
-                fit
-                :show-header="false"
-                :highlight-current-row="true"
-                :stripe="false"
-                :border="false"
-                :height="270"
-                :data="func"
-                @row-dblclick="tabFuncRowClickHandle"
-              >
-                <el-table-column min-width="60%">
-                  <template #default="scope">
-                    <el-popover trigger="hover" placement="bottom">
-                      <p>描述:{{ scope.row.describe }}</p>
-                      <p>参数:{{ scope.row.param }}</p>
-                      <template #reference>
-                        <span size="medium" transition="fade-in-linear">{{
-                          scope.row.lab
-                        }}</span>
-                      </template>
-                    </el-popover>
-                  </template>
-                </el-table-column>
-                <el-table-column min-width="40%">
-                  <template #default="scope">
-                    <el-popover trigger="hover" placement="bottom">
-                      <p>描述:{{ scope.row.describe }}</p>
-                      <p>参数:{{ scope.row.param }}</p>
-                      <template #reference>
-                        <span size="medium" transition="fade-in-linear">{{
-                          scope.row.name
-                        }}</span>
-                      </template>
-                    </el-popover>
-                  </template>
-                </el-table-column>
-              </el-table>
-            </el-tab-pane>
-            <el-tab-pane label="运算符">
-              <el-button-group>
-                <el-button
-                  v-for="item in operator"
-                  :key="item"
-                  plain
-                  type="primary"
-                  @click="btnOperatorClickHandle(item)"
-                  style="width: 60px; margin: 8px; height: 40px"
-                >
-                  {{ item }}
-                </el-button>
-              </el-button-group>
-            </el-tab-pane>
-          </el-tabs>
-        </el-col>
-      </el-row>
-      <el-row :gutter="24">
-        <el-col :span="24">
-          <el-form-item prop="description">
-            <el-tag>规则描述</el-tag>
-            <el-input type="textarea" rows="4" v-model="form.description" />
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
-    <span>
-      <el-button @click="btnCancelClickHandle">取 消</el-button>
-      <el-button type="primary" @click="submit">确 定</el-button>
-    </span>
-  </el-dialog>
-</template>
-<script>
-import {
-  fetchAIPointList,
-  fetchDIPointList,
-  fetchStationList,
-  fetchRelatePart,
-  custombj_postSave,
-  fetch_electrical_point_ai,
-  fetch_electrical_point_di,
-  tree,
-  equipmentmodel_list,
-} from "/@/api/api.js";
-// fetch_electrical_point_di} from '../../../../api/requestAPI';
-// /@/api/api.js
-import axios from "axios";
-import { warn } from "@vue/runtime-core";
-export default {
-  data() {
-    return {
-      visible: this.isVisible,
-      isWindturbine: true,
-      form: {
-        id: "",
-        name: "",
-        description: "",
-        expression: "111111",
-        tag: "",
-        rank: "",
-        enabled: "1", // 1可用-0禁用
-        modelId: "",
-        ednaValue: "",
-        category: "",
-        range: 0,
-        station: "",
-        windturbine: "",
-        line: "",
-        project: "",
-        electrical: "",
-        taskstart: "",
-        relatedParts: "",
-        userName: "",
-      },
-      stationList: [],
-      modelList: [],
-      relatePartList: [],
-      faultList: [
-        {
-          value: "sensors",
-          name: "传感器异常",
-        },
-        {
-          value: "parts",
-          name: "零部件隐患",
-        },
-        {
-          value: "control",
-          name: "控制参数优化",
-        },
-        {
-          value: "performance",
-          name: "性能下降",
-        },
-      ],
-      AIDataSource: [],
-      DIDataSource: [],
-      AIPointList: [],
-      DIPointList: [],
-      AIPointSearch: "",
-      DIPointSearch: "",
-      func: [
-        {
-          lab: "MR",
-          name: "移动极差",
-          param: "测点名,时间(秒)",
-          describe: "是指两个或多个连续样本值中最大值与最小值之差",
-          scene: "测点的移动极差超限报警",
-        },
-        {
-          lab: "MAR",
-          name: "均值极差",
-          param: "测点名,时间(秒)",
-          describe: "",
-          scene: "测点的均值极差计算",
-        },
-        {
-          lab: "RiseExceed",
-          name: "上升趋势",
-          param: "测点名,时间(秒),阈值",
-          describe: "取测点在给定的时间范围内数据上升的量是否超过阈值",
-          scene: "测点值的上升速度过快等",
-        },
-        {
-          lab: "Sustain",
-          name: "持续时间",
-          param: "表达式,时间(秒)",
-          describe:
-            "判定状态(表达式成立)持续的时间是否超过给定的时间判断状态持续的时间",
-          scene: "",
-        },
-        {
-          lab: "LastUpdateTime",
-          name: "最近数据时间",
-          param: "测点名",
-          describe: "",
-          scene: "判定离线,状态持续时间等",
-        },
-        {
-          lab: "abs",
-          name: "取绝对值",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "acos",
-          name: "反余弦",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "asin",
-          name: "反正弦",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "atan",
-          name: "反正切",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "atan2",
-          name: "xy坐标转为极坐标",
-          param: "x,y",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "ceiling",
-          name: "向上取整",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "cos",
-          name: "余弦",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "cosh",
-          name: "双曲线余弦",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "exp",
-          name: "欧拉数 e 的 double 次幂的值",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "floor",
-          name: "向下取整",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "log",
-          name: "自然对数",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "log10",
-          name: "底数为 10 的对数",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "max",
-          name: "比较最大值",
-          param: "double a, double b",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "min",
-          name: "比较最小值",
-          param: "double a, double b",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "pow",
-          name: "返回第一个参数的第二个参数次幂的值",
-          param: "double a, double b",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "round",
-          name: "返回最接近参数的 long,或int",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "sign",
-          name: "负数返回-1.0,整数返回1.0,0返回0.0",
-          param: "float f/double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "sin",
-          name: "三角正弦值",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "sinh",
-          name: "双曲线正弦",
-          param: "double x",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "sqrt",
-          name: "正平方根",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "tan",
-          name: "正切",
-          param: "double a",
-          describe: "",
-          scene: "",
-        },
-        {
-          lab: "tanh",
-          name: "双曲线余弦",
-          param: "double x",
-          describe: "",
-          scene: "",
-        },
-        { lab: "PI", name: "圆周率", param: "", describe: "", scene: "" },
-        { lab: "E", name: "自然对数", param: "", describe: "", scene: "" },
-      ],
-      operator: [
-        "+",
-        "-",
-        "*",
-        "/",
-        "(",
-        ")",
-        ">",
-        ">=",
-        "<",
-        "<=",
-        "==",
-        "!=",
-        "&&",
-        "||",
-        "!",
-        "%",
-        "true",
-        "false",
-        ".",
-      ],
-      rules: {
-        name: [{ required: true, message: "请输入规则名称", trigger: "blur" }],
-        category: [
-          { required: true, message: "请选择报警类别", trigger: "change" },
-        ],
-        rank: [
-          { required: true, message: "请选择报警级别", trigger: "change" },
-        ],
-        station: [{ required: true, message: "请选择风场", trigger: "change" }],
-        expression: [
-          { required: true, message: "表达式不能为空", trigger: "change" },
-        ],
-      },
-    };
-  },
-  props: {
-    isVisible: Boolean,
-    dialogStatus: Number, //窗口状态:0-新增;1-修改;2-查看
-    rowData: Object,
-  },
-  created() {
-    // this.RelatePartEdit();
-  },
-  watch: {
-    isVisible(val) {
-      this.visible = val;
-    },
-    rowData(val) {
-      this.form = JSON.parse(JSON.stringify(val));
-    },
-    // "form.station": {
-    //   handler(val) {
-    //     if (this.form.category !== undefined && val !== undefined) {
-    //       if (this.form.category === "1") {
-    //         // 风机
-    //         if (this.form.modelId !== undefined) {
-    //           this.queryWindturbine_AI_DI_Point(val, this.form.modelId);
-    //         }
-    //       } else if (this.form.category === "2") {
-    //         // 电气
-    //         this.queryElectrical_AI_DI_Point(val);
-    //       }
-    //     }
-    //     // 场站变更 - 加载设备类型
-    //     if (val !== undefined) {
-    //       // await this.getequipmentmodel_list();
-    //     }
-    //   },
-    //   deep: true,
-    //   immediate: true,
-    // },
-    "form.category": {
-      handler(val) {
-        if (val !== undefined) {
-          if (val === "1") {
-            // 风机
-            if (
-              this.form.station !== undefined &&
-              this.form.modelId !== undefined
-            ) {
-              this.queryWindturbine_AI_DI_Point(
-                this.form.station,
-                this.form.modelId
-              );
-            }
-          } else if (val === "2") {
-            // 电气
-            if (this.form.station !== undefined) {
-              this.queryElectrical_AI_DI_Point(this.form.station);
-            }
-          }
-        }
-        // 报警类别变更
-        if (this.form.category === "1") {
-          this.isWindturbine = true;
-        } else if (this.form.category === "2") {
-          this.isWindturbine = false;
-          this.form.modelId = "";
-          this.form.relatedParts = "";
-        }
-      },
-      deep: true,
-      immediate: true,
-    },
-    "form.modelId": {
-      handler(val) {
-        if (this.form.station !== undefined && val !== undefined) {
-          this.queryWindturbine_AI_DI_Point(this.form.station, val);
-        }
-      },
-      deep: true,
-      immediate: true,
-    },
-  },
-  methods: {
-    stationChange(val) {
-      if (this.form.category !== undefined && val !== undefined) {
-        if (this.form.category === "1") {
-          // 风机
-          if (this.form.modelId !== undefined) {
-            this.queryWindturbine_AI_DI_Point(val, this.form.modelId);
-          }
-        } else if (this.form.category === "2") {
-          // 电气
-          this.queryElectrical_AI_DI_Point(val);
-        }
-      }
-      // 场站变更 - 加载设备类型
-      if (val !== undefined) {
-        this.getequipmentmodel_list();
-      }
-    },
-    // 机型
-    async getequipmentmodel_list() {
-      const res = await equipmentmodel_list(this.form.station);
-      console.warn(res);
-      if (res.equipmentmodel == null) {
-        res.equipmentmodel = [];
-        res.modelList.forEach((e) => {
-          res.equipmentmodel.push({ code: e });
-        });
-      }
-      this.modelList = res.equipmentmodel;
-    },
-    // 所属部件修改
-    // async RelatePartEdit() {
-    //   const res = await tree();
-    //   let arr = [];
-    //   let data = res.children[1].children;
-    //   data.forEach((v) => {
-    //     let obj = {};
-    //     obj["partCode"] = v.node.code;
-    //     obj["name"] = v.node.name;
-    //     arr.push(obj);
-    //   });
-    //   console.warn(arr);
-    //   this.relatePartList = arr;
-    // },
-    // 点击取消事件
-    btnCancelClickHandle() {
-      this.visible = false;
-      this.$emit("cbFunc", this.visible);
-    },
-    // 窗口关闭前的回调
-    dialogBeforeClose(done) {
-      this.$confirm("确认关闭?")
-        .then((_) => {
-          done();
-          this.visible = false;
-          this.$emit("cbFunc", this.visible);
-        })
-        .catch((_) => {});
-    },
-    // 查询风场AI、DI测点
-    queryWindturbine_AI_DI_Point(station, modelId) {
-      // 获取AI测点
-      fetchAIPointList(station, modelId).then((res) => {
-        res.sort(function (a, b) {
-          if (a.uniformCode < b.uniformCode) {
-            return -1;
-          }
-          if (a.uniformCode > b.uniformCode) {
-            return 1;
-          }
-          return 0;
-        });
-
-        this.AIPointList = res;
-        this.AIDataSource = res;
-      });
-      // 获取DI测点
-      fetchDIPointList(station, modelId).then((res) => {
-        res.sort(function (a, b) {
-          if (a.uniformCode < b.uniformCode) {
-            return -1;
-          }
-          if (a.uniformCode > b.uniformCode) {
-            return 1;
-          }
-          return 0;
-        });
-
-        this.DIPointList = res;
-        this.DIDataSource = res;
-      });
-    },
-    // 查询电气AI、DI测点
-    queryElectrical_AI_DI_Point(station) {
-      // 电气AI点
-      fetch_electrical_point_ai(station)
-        .then((res) => {
-          res.sort(function (a, b) {
-            if (a.uniformCode < b.uniformCode) {
-              return -1;
-            }
-            if (a.uniformCode > b.uniformCode) {
-              return 1;
-            }
-            return 0;
-          });
-          this.AIDataSource = res;
-          this.AIPointList = res;
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-      // 电气DI点
-      fetch_electrical_point_di(station)
-        .then((res) => {
-          res.sort(function (a, b) {
-            if (a.uniformCode < b.uniformCode) {
-              return -1;
-            }
-            if (a.uniformCode > b.uniformCode) {
-              return 1;
-            }
-            return 0;
-          });
-          this.DIDataSource = res;
-          this.DIPointList = res;
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    },
-    // 函数点击事件
-    tabFuncRowClickHandle(row) {
-      let _row = this.deepClone(row);
-      let elInput = document.getElementById("expressionInput");
-      let startPos = elInput.selectionStart; //第0个字符到选中的字符
-      let endPos = elInput.selectionEnd; //选中字符到末尾字符
-      if (startPos === undefined || endPos === undefined) return;
-      let txt = elInput.value;
-      let func;
-      if (
-        row.lab === "MR" ||
-        row.lab === "MAR" ||
-        row.lab === "RiseExceed" ||
-        row.lab === "Sustain" ||
-        row.lab === "LastUpdateTime"
-      ) {
-        func = row.lab + "()";
-      } else if (row.lab === "PI" || row.lab === "E") {
-        func = "Math." + row.lab;
-      } else {
-        func = "Math." + row.lab + "()";
-      }
-      // 将插值添加到选中光标位置
-      let result = txt.substring(0, startPos) + func + txt.substring(endPos);
-      elInput.value = result;
-      // 重新定义光标位置
-      elInput.focus();
-      if (row.lab === "PI" || row.lab === "E") {
-        elInput.selectionStart = startPos + func.length;
-        elInput.selectionEnd = startPos + func.length;
-      } else {
-        elInput.selectionStart = startPos + func.length - 1;
-        elInput.selectionEnd = startPos + func.length - 1;
-      }
-      this.form.expression = result; // 赋值给表单中的的字段
-    },
-    // 运算符点击事件
-    btnOperatorClickHandle(row) {
-      this.elInputSplit(row);
-    },
-    //提交表单
-    submit() {
-      this.form.expression = document.getElementById("expressionInput").value;
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          let loginUser = sessionStorage.getItem("ms_username");
-          this.form.userName = loginUser;
-          this.form.range = "0";
-          this.$confirm("确认保存?")
-            .then(() => {
-              switch (this.dialogStatus) {
-                //窗口状态:0-新增;1-修改;2-查看
-                case 0:
-                  custombj_postSave(this.form)
-                    .then((response) => {
-                      if (response.status) {
-                        if (response.success) {
-                          this.$message.success("保存成功");
-                          // 关闭窗口
-                          this.visible = false;
-                          this.$emit("cbFunc", this.visible);
-                        } else {
-                          this.$message.error(response.msg);
-                        }
-                      }
-                    })
-                    .catch((err) => {
-                      console.log(err);
-                    });
-                  break;
-                case 1:
-                  custombj_postSave(this.form)
-                    .then((response) => {
-                      if (response.success) {
-                        this.$message.success("保存成功");
-                        // 关闭窗口
-                        this.visible = false;
-                        this.$emit("cbFunc", this.visible);
-                      } 
-                    })
-                    .catch((err) => {
-                      console.log(err);
-                    });
-                  break;
-                default:
-                  // 关闭窗口
-                  this.visible = false;
-                  this.$emit("cbFunc", this.visible);
-                  break;
-              }
-            })
-            .catch((err) => {
-              console.log(err);
-            });
-        }
-      });
-    },
-    // 窗口打开事件 - 做重置表单操作
-    dialogOpenHandle() {
-      // 重置表单
-      if (this.dialogStatus === 0) {
-        this.isWindturbine = true;
-        (this.AIDataSource = []),
-          (this.DIDataSource = []),
-          (this.AIPointList = []),
-          (this.DIPointList = []),
-          (this.AIPointSearch = ""),
-          (this.DIPointSearch = ""),
-          (this.form = { enabled: "1" });
-        if (this.$refs["form"] != undefined) {
-          this.$refs["form"].resetFields();
-        }
-      } else {
-        this.AIPointSearch = "";
-        this.DIPointSearch = "";
-        if (this.form.category === "1") {
-          this.isWindturbine = true;
-        } else if (this.form.category === "2") {
-          this.isWindturbine = false;
-        }
-      }
-      // 获取风场数据
-      fetchStationList().then((res) => {
-        this.stationList = res;
-      });
-      // 获取关联部件
-      fetchRelatePart().then(res => {
-          console.warn(res);
-          this.relatePartList = res;
-      });
-      // this.RelatePartEdit();
-    },
-    // 窗口关闭事件 - 做重置表单操作
-    dialogCloseHandle() {
-      // 重置表单
-      if (this.dialogStatus === 0) {
-        this.isWindturbine = true;
-        (this.AIDataSource = []),
-          (this.DIDataSource = []),
-          (this.AIPointList = []),
-          (this.DIPointList = []),
-          (this.AIPointSearch = ""),
-          (this.DIPointSearch = ""),
-          (this.form = { enabled: "1" });
-        if (this.$refs["form"] != undefined) {
-          this.$refs["form"].resetFields();
-        }
-      } else {
-        this.AIPointSearch = "";
-        this.DIPointSearch = "";
-        if (this.form.category === "1") {
-          this.isWindturbine = true;
-        } else if (this.form.category === "2") {
-          this.isWindturbine = false;
-        }
-      }
-      // 获取风场数据
-      fetchStationList().then((res) => {
-        this.stationList = res;
-      });
-      // 获取关联部件
-      fetchRelatePart().then(res => {
-          this.relatePartList = res;
-      });
-      // this.RelatePartEdit();
-    },
-    // AI测点模糊查询
-    AIInputChange() {
-      console.warn(this.AIDataSource);
-      console.warn(this.AIPointList);
-
-      this.AIPointList = this.AIDataSource.filter((i) => {
-        return (
-          i.name.indexOf(this.AIPointSearch) != -1 ||
-          i.uniformCode.indexOf(this.AIPointSearch) != -1
-        );
-      });
-    },
-    // DI测点模糊查询
-    DIInputChange() {
-      this.DIPointList = this.DIDataSource.filter((i) => {
-        return (
-          i.name.indexOf(this.DIPointSearch) != -1 ||
-          i.uniformCode.indexOf(this.DIPointSearch) != -1
-        );
-      });
-    },
-    tbAI_DBClickHandle(row) {
-      this.elInputSplit(row.uniformCode);
-    },
-    tbDI_DBClickHandle(row) {
-      this.elInputSplit(row.uniformCode);
-    },
-    deepClone(obj) {
-      let _obj = JSON.stringify(obj),
-        objClone = JSON.parse(_obj);
-      return objClone;
-    },
-    // 表达式字符串拼接
-    elInputSplit(val) {
-      let elInput = document.getElementById("expressionInput");
-      let startPos = elInput.selectionStart;
-      let endPos = elInput.selectionEnd;
-      if (startPos === undefined || endPos === undefined) return;
-      let txt = elInput.value;
-      let txtSplit = val;
-      let result =
-        txt.substring(0, startPos) + txtSplit + txt.substring(endPos);
-      elInput.value = result;
-      elInput.focus();
-      elInput.selectionStart = startPos + txtSplit.length;
-      elInput.selectionEnd = startPos + txtSplit.length;
-      // this.form.expression = result;
-    },
-  },
-};
-</script>
-<style>
-.col-box {
-  display: flex;
-  flex-direction: column;
-}
-.select-mini {
-  width: 120px;
-}
-.el-tabs__content {
-  padding: 0 !important;
-}
-.el-tabs--border-card {
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-.border {
-  border: solid red 1px;
-}
-.el-table--mini td {
-  padding: 3px 0;
-}
-.el-button-group .el-button--primary {
-  border: none;
-}
-.el-form--label-top .el-form-item__label {
-  padding: 0;
-}
-</style>

+ 0 - 386
src/pages/dataFilter/bj_custom/list copy.vue

@@ -1,386 +0,0 @@
-<template>
-  <div>
-    <div class="crumbs">
-      <el-breadcrumb separator="/">
-        <el-breadcrumb-item>
-          <i class="el-icon-lx-cascades"></i>自定义报警
-        </el-breadcrumb-item>
-      </el-breadcrumb>
-    </div>
-    <div class="container">
-      <el-row type="flex" justify="space-between">
-        <div class="handle-box" style="margin-bottom: 10px">
-          <el-button
-            type="primary"
-            icon="el-icon-lx-add"
-            class="handle-edit mr10"
-            @click="handleInsert"
-          >
-            新增记录
-          </el-button>
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="export2Excel"
-          >
-            批量导出</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="outExe"
-          >
-            模板下载</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-top"
-            class="handle-edit mr10"
-            @click="dialog.exportShow = true"
-          >
-            批量导入</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-refresh"
-            class="handle-refresh mr10"
-            @click="btnRefreshClickHandle"
-          >
-            刷新
-          </el-button>
-          <span
-            ><span class="handle-waring" style="margin: 0 10px">{{
-              state.total
-            }}</span
-            >条配置规则</span
-          >
-        </div>
-        <div style="display: flex; flex-direction: row; margin-bottom: 10px">
-          <el-input
-            placeholder="请输入名称"
-            v-model="state.query.name"
-            class="mr10"
-            clearable
-          ></el-input>
-          <el-button
-            icon="el-icon-search"
-            type="primary"
-            size="mini"
-            width="100"
-            @click="btnTableQueryClickHandle"
-            >搜索</el-button
-          >
-        </div>
-      </el-row>
-      <el-table
-        :data="state.tableData"
-        border
-        class="table"
-        ref="multipleTable"
-        header-cell-name="table-header"
-        :highlight-current-row="true"
-      >
-        <el-table-column label="编码" align="center" prop="id" min-width="50" />
-        <el-table-column label="名称" align="left" prop="name" min-width="50" />
-        <el-table-column label="表达式" align="left" prop="expression" />
-        <el-table-column label="级别" align="center" prop="rank" min-width="20">
-          <template #default="scope">{{
-            rankConvert(scope.row.rank)
-          }}</template>
-        </el-table-column>
-        <el-table-column
-          label="类型"
-          align="center"
-          prop="category"
-          min-width="20"
-        >
-          <template #default="scope">{{
-            categoryConvert(scope.row.category)
-          }}</template>
-        </el-table-column>
-        <el-table-column label="描述" align="left" prop="description" />
-        <el-table-column
-          label="是否启用"
-          align="center"
-          prop="enabled"
-          min-width="20"
-        >
-          <template #default="scope">
-            {{ enabledConvert(scope.row.enabled) }}
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="所属部件"
-          align="center"
-          prop="relatedParts"
-          min-width="30"
-        >
-          <template #default="scope">
-            <span>{{ relatePartConvert(scope.row.relatedParts) }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center" width="100">
-          <template #default="scope">
-            <el-button
-              type="primary"
-              plain
-              round
-              size="mini"
-              icon="el-icon-lx-edit"
-              @click="handleEditClick(scope.row)"
-              >编辑</el-button
-            >
-            <!-- <el-button type="primary" plain round size="mini" icon="el-icon-search" @click="handleViewClick(scope.$index, scope.row)">查看</el-button> -->
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination">
-        <el-pagination
-          background
-          layout="total, prev, pager, next"
-          :current-page="state.query.pagenum"
-          :page-size="state.query.pagesize"
-          :total="state.total"
-          @current-change="handlePageChange"
-        >
-        </el-pagination>
-      </div>
-    </div>
-    <!-- 编辑弹窗 -->
-    <Editform
-      :isVisible="dialog.editVisible"
-      :dialogStatus="dialog.dialogStatus"
-      :rowData="dialog.rowData"
-      @cbFunc="cbFunc"
-    />
-    <!-- 导入对话框 -->
-    <BatchInput
-      :isShow="dialog.exportShow"
-      @epVisibleCB="epVisibleCB"
-      :pThead="dialog.thead"
-    />
-  </div>
-</template>
-<script setup>
-const tHeader = [
-  "id",
-  "报警级别(ZC_BJ:运转正常;YJ_BJ:运转状态超出标准范围;GZ_BJ:非正常停止运转;WH_BJ:停机维护;XD_BJ:限电/计划停机)",
-  "制造商(HFYG_CS:合肥阳光电源有限公司;AMS_CS:艾默生;NRJD_CS:国电南瑞吉电新能源;MGSK_CS:美国赛康;LHDL_CS:联合动力;SYHC_CS:沈阳华创)",
-  "名称",
-  "上一级节点",
-  "是否有子节点",
-  "序列号",
-  "类别 :正常停机,正常启动,快速停机,紧急停机",
-  "风机型号",
-  "全部默认为1",
-  "统一编码",
-  "是否展示(0:是;1:否)",
-  "报警分类(bj:变桨;bpq:变频器;clx:齿轮箱;fdj:发电机;hh:滑环;jcjr:机舱加热;lq:冷却;ph:偏航;rh:润滑;yy:液压;zz:主轴;other:其它;kz:控制;yl:叶轮;jc:机舱;xb:箱变;dw:电网;td:塔底;fsy:风速仪)",
-  "消缺规定时间",
-  "是否可以复位(0:是;1:否)",
-  "报警类型编号",
-  "故障编码",
-  "关联部件",
-];
-import { custombj_fetchTableData } from "/@/api/api.js";
-import { ref, onMounted, warn, reactive, computed } from "vue";
-import { ElMessageBox, ElMessage } from "element-plus";
-import Editform from "./component/edit_form.vue";
-import BatchInput from "./component/BatchImport.vue";
-onMounted(() => {
-  getData();
-});
-let dialog = reactive({
-  editVisible: false,
-  dialogStatus: 0,
-  rowData: {
-    name: "",
-    category: "",
-    rank: "",
-    enabled: 1,
-    station: "",
-    modelId: "",
-    relatePart: "",
-    expression: "",
-    description: "",
-  },
-  ///BatchInput
-  exportShow: false,
-  thead: {
-    id: "id",
-    规则名称: "name",
-    "报警类别(1:风气;2:电气)": "category",
-    "报警级别(1:低;2:中低;3:中;4:中高;5:高)": "rank",
-    "是否启用(0:停用;1:启用)": "enabled",
-    风场: "station",
-    风机类型: "modelId",
-    所属部件: "relatedParts",
-    表达式: "expression",
-    规则描述: "description",
-  },
-});
-let state = reactive({
-  tableData: [],
-  total: 0,
-  query: {
-    pagenum: 1,
-    pagesize: 20,
-    name: "",
-  },
-});
-// getData
-const getData = async () => {
-  const res = await custombj_fetchTableData(state.query);
-  console.warn(res);
-  state.tableData = res.records;
-  state.total = res.total;
-};
-// 点击新增
-const handleInsert = () => {
-  dialog.dialogStatus = 0;
-  dialog.rowData = {};
-  dialog.editVisible = true;
-};
-// 条件查询表格数据
-const btnTableQueryClickHandle = () => {
-  getData();
-};
-// 编辑事件
-const handleEditClick = (row) => {
-  dialog.dialogStatus = 1;
-  dialog.rowData = row;
-  dialog.editVisible = true;
-};
-// 分页导航
-const handlePageChange = (val) => {
-  console.warn(val);
-  state.query.pagenum = val;
-  getData();
-};
-
-// 列表刷新
-const btnRefreshClickHandle = () => {
-  state.query = {
-    pagenum: 1,
-    pagesize: 20,
-    name: "",
-  };
-  getData();
-};
-// 父子传参时间
-const cbFunc = (val) => {
-  dialog.editVisible = val;
-  getData();
-};
-// 批量导入对话框的显隐
-const epVisibleCB = (val) => {
-  dialog.exportShow = val;
-};
-//export2Excel
-const export2Excel = () => {};
-const outExe =async () => {
-        const { export_json_to_excel } = await import("../../../assets/excel/Export2Excel");; //引入文件
-        console.warn(export_json_to_excel);
-        const data = [];
-        export_json_to_excel(tHeader, data, "风机报警模板");
-};
-// filters
-// 级别
-const rankConvert = (val) => {
-  if (val == "1") {
-    return "低";
-  } else if (val == "2") {
-    return "中低";
-  } else if (val == "3") {
-    return "中";
-  } else if (val == "4") {
-    return "中高";
-  } else if (val == "5") {
-    return "高";
-  }
-};
-//类型;
-const categoryConvert = (val) => {
-  if (val === "1") {
-    return "风机";
-  } else if (val === "2") {
-    return "电气";
-  }
-};
-// 状态
-const enabledConvert = (val) => {
-  if (val === "0") {
-    return "停用";
-  } else if (val === "1") {
-    return "启用";
-  }
-};
-// 关联部件
-const relatePartConvert = (val) => {
-  switch (val) {
-    case "YP":
-      return "叶片";
-      break;
-    case "LG":
-      return "轮毂";
-      break;
-    case "TZ":
-      return "塔架";
-      break;
-    case "JC":
-      return "机舱";
-      break;
-    case "KZXT":
-      return "控制系统";
-      break;
-    case "BJXT":
-      return "变桨系统";
-      break;
-    case "PHXT":
-      return "偏航系统";
-      break;
-    case "CLX":
-      return "齿轮箱";
-      break;
-    case "FDJ":
-      return "发电机";
-      return;
-    case "BPQ":
-      return "变频器";
-      return;
-    case "YYXT":
-      return "液压系统";
-      break;
-    case "FZXT":
-      return "辅助系统";
-      break;
-    case "CFXT":
-      return "测风系统";
-      break;
-    case "DWXT":
-      return "电网系统";
-      break;
-    case "TDG":
-      return "塔底柜";
-      break;
-    case "CDL":
-      return "传动链";
-      break;
-    case "QT":
-      return "其他";
-      break;
-    default:
-      break;
-  }
-};
-</script>
-<style scoped>
-.mr10 {
-  margin-right: 10px;
-}
-.el-button + .el-button {
-  margin-left: 10px;
-}
-</style>

+ 0 - 616
src/pages/dataFilter/bj_custom/list.vue

@@ -1,616 +0,0 @@
-<template>
-  <div>
-    <div class="container">
-      <el-row type="flex" justify="space-between">
-        <div class="handle-box" style="margin-bottom: 10px">
-          <el-button
-            type="primary"
-            icon="el-icon-lx-add"
-            class="handle-edit mr10"
-            @click="handleInsert"
-          >
-            新增记录
-          </el-button>
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="export2Excel"
-          >
-            批量导出</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="outExe"
-          >
-            模板下载</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-top"
-            class="handle-edit mr10"
-            @click="exportShow = true"
-          >
-            批量导入</el-button
-          >
-          <!-- <el-button
-            type="primary"
-            icon="el-icon-refresh"
-            class="handle-refresh mr10"
-            @click="btnRefreshClickHandle"
-          >
-            刷新
-          </el-button> -->
-          <span
-            ><span class="handle-waring" style="margin: 0 10px">{{
-              total
-            }}</span
-            >条配置规则</span
-          >
-        </div>
-        <div style="display: flex; flex-direction: row; margin-bottom: 10px">
-          <el-select
-            v-if="!isStation"
-            v-model="query.category"
-            class="mr10"
-            style="width: 150px"
-            popper-class="select"
-          >
-            <el-option key="1" label="风机" value="1"></el-option>
-            <el-option key="2" label="电气" value="2"></el-option>
-          </el-select>
-          <el-select
-            v-if="!isStation"
-            v-model="query.station"
-            clearable
-            class="mr10"
-            style="width: 150px"
-            placeholder="全部场站"
-            popper-class="select"
-            @change="changeStation()"
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :value="item.id"
-              :label="item.name"
-            ></el-option>
-          </el-select>
-          <el-select
-            v-model="query.modelId"
-            clearable
-            class="mr10"
-            style="width: 150px"
-            placeholder="全部机型"
-            popper-class="select"
-            @change="btnTableQueryClickHandle()"
-          >
-            <el-option
-              v-for="item in modelList"
-              :key="item.code"
-              :value="item.code"
-              :label="item.code"
-            ></el-option>
-          </el-select>
-          <el-select
-            v-model="query.rank"
-            clearable
-            class="mr10"
-            style="width: 150px"
-            placeholder="全部级别"
-            popper-class="select"
-            @change="btnTableQueryClickHandle()"
-          >
-            <el-option
-              v-for="item in rankList"
-              :key="item.id"
-              :value="item.id"
-              :label="item.name"
-            ></el-option>
-          </el-select>
-          <el-input
-            placeholder="请输入名称"
-            v-model="query.name"
-            style="width: 150px"
-            class="mr10"
-            clearable
-          ></el-input>
-          <el-button
-            icon="el-icon-search"
-            type="primary"
-            @click="btnTableQueryClickHandle"
-            >搜索</el-button
-          >
-        </div>
-      </el-row>
-      <el-table
-        :data="tableData"
-        border
-        class="table"
-        ref="multipleTable"
-        header-cell-name="table-header"
-        :highlight-current-row="true"
-      >
-        <el-table-column label="编码" align="center" prop="id" min-width="50" />
-        <el-table-column
-          label="场站"
-          align="center"
-          prop="windPowerStation.name"
-          min-width="50"
-        />
-        <el-table-column
-          label="机型"
-          align="center"
-          prop="modelId"
-          min-width="50"
-        />
-        <el-table-column label="名称" align="left" prop="name" min-width="50" />
-        <el-table-column label="表达式" align="left" prop="expression">
-          <template #default="scope">
-            {{ scope.row.expression }}
-          </template>
-        </el-table-column>
-        <el-table-column label="级别" align="center" prop="rank" min-width="20">
-          <template #default="scope">{{
-            rankConvert(scope.row.rank)
-          }}</template>
-        </el-table-column>
-        <el-table-column
-          label="类型"
-          align="center"
-          prop="category"
-          min-width="20"
-        >
-          <template #default="scope">{{
-            categoryConvert(scope.row.category)
-          }}</template>
-        </el-table-column>
-        <el-table-column label="描述" align="left" prop="description">
-          <template #default="scope">
-            {{ scope.row.description }}
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="是否启用"
-          align="center"
-          prop="enabled"
-          min-width="20"
-        >
-          <template #default="scope">
-            {{ enabledConvert(scope.row.enabled) }}
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="所属部件"
-          align="center"
-          prop="relatedParts"
-          min-width="30"
-        >
-          <template #default="scope">
-            <span>{{ relatePartConvert(scope.row.relatedParts) }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center" width="100">
-          <template #default="scope">
-            <el-button
-              type="primary"
-              plain
-              round
-              size="mini"
-              icon="el-icon-lx-edit"
-              @click="handleEditClick(scope.$index, scope.row)"
-              >编辑</el-button
-            >
-            <!-- <el-button type="primary" plain round size="mini" icon="el-icon-search" @click="handleViewClick(scope.$index, scope.row)">查看</el-button> -->
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination">
-        <el-pagination
-          background
-          layout="total, prev, pager, next"
-          :current-page="query.pagenum"
-          :page-size="query.pagesize"
-          :total="total"
-          @current-change="handlePageChange"
-        >
-        </el-pagination>
-      </div>
-    </div>
-    <!-- 编辑弹窗 -->
-    <edit_form
-      :isVisible="editVisible"
-      :dialogStatus="dialogStatus"
-      :rowData="rowData"
-      @cbFunc="cbFunc"
-    />
-    <!-- 导入对话框 -->
-    <BatchInput
-      :isShow="exportShow"
-      @epVisibleCB="epVisibleCB"
-      :pThead="thead"
-    />
-  </div>
-</template>
-<script>
-import {
-  custombj_fetchTableData,
-  tree,
-  equipmentmodel_list,
-} from "/@/api/api.js";
-import edit_form from "./component/edit_form.vue";
-import BatchInput from "./component/BatchImport.vue";
-import { export_json_to_excel } from "/@/assets/excel/Export2Excel"; //引入文件
-
-const tHeader = [
-  "id",
-  "规则名称",
-  "报警类别(1:风气;2:电气)",
-  "报警级别(1:低;2:中低;3:中;4:中高;5:高)",
-  "是否启用(0:停用;1:启用)",
-  "风场",
-  "风机类型",
-  "所属部件",
-  "表达式",
-  "规则描述",
-];
-export default {
-  name: "basetable3",
-  components: {
-    edit_form,
-    BatchInput,
-  },
-  data() {
-    return {
-      editVisible: false,
-      dialogStatus: 0, //窗口状态:0-新增;1-修改;2-查看
-      query: {
-        pagenum: 1,
-        pagesize: 20,
-        name: "",
-        station: "",
-        rank: "",
-        modelId: "",
-        category:"1",
-      },
-      tableData: [],
-      total: 0,
-      rowData: {
-        name: "",
-        category: "",
-        rank: "",
-        enabled: 1,
-        station: "",
-        modelId: "",
-        relatePart: "",
-        expression: "",
-        description: "",
-      },
-      exportShow: false,
-      thead: {
-        id: "id",
-        规则名称: "name",
-        "报警类别(1:风气;2:电气)": "category",
-        "报警级别(1:低;2:中低;3:中;4:中高;5:高)": "rank",
-        "是否启用(0:停用;1:启用)": "enabled",
-        风场: "station",
-        风机类型: "modelId",
-        所属部件: "relatedParts",
-        表达式: "expression",
-        规则描述: "description",
-      },
-      relatePartList: [],
-
-      ////
-      modelList: [],
-      rankList: [
-        {
-          id: 1,
-          name: "低",
-        },
-        {
-          id: 2,
-          name: "中低",
-        },
-        {
-          id: 3,
-          name: "中",
-        },
-        {
-          id: 4,
-          name: "中高",
-        },
-        {
-          id: 5,
-          name: "高",
-        },
-      ],
-    };
-  },
-
-  created() {
-    this.getData();
-    this.RelatePartEdit();
-    this.getequipmentmodel_list();
-  },
-  computed: {
-    stationList() {
-      return this.$store.state.stationList;
-    },
-    isStation() {
-      return this.$store.getters.isStation;
-    },
-  },
-  methods: {
-    //changeStation
-    async changeStation() {
-      this.query.modelId=''
-      await this.getequipmentmodel_list();
-      this.btnTableQueryClickHandle();
-    },
-    // 机型
-    async getequipmentmodel_list() {
-      const res = await equipmentmodel_list(this.query.station);
-      console.warn(res);
-      if (res.equipmentmodel == null) {
-        res.equipmentmodel = [];
-        res.modelList.forEach((e) => {
-          res.equipmentmodel.push({ code: e });
-        });
-      }
-      this.modelList = res.equipmentmodel;
-    },
-    // 所属部件修改
-    async RelatePartEdit() {
-      const res = await tree();
-      let arr = [];
-      let data = res.children[1].children;
-      data.forEach((v) => {
-        let obj = {};
-        obj[v.node.code] = v.node.name;
-        arr.push(obj);
-      });
-      console.warn(arr);
-      this.relatePartList = arr;
-    },
-    getData() {
-      //获取列表数据
-      custombj_fetchTableData(this.query)
-        .then((res) => {
-          console.warn(res);
-          this.tableData = res.records;
-          this.total = res.total;
-        })
-        .catch((err) => {
-          console.log(err);
-          this.$message.error("与服务器断开连接");
-        });
-    },
-    // 点击新增
-    handleInsert() {
-      this.dialogStatus = 0;
-      this.rowData = {};
-      this.editVisible = true;
-    },
-    // 编辑事件
-    handleEditClick(index, row) {
-      this.dialogStatus = 1;
-      this.rowData = row;
-
-      this.editVisible = true;
-    },
-    // 查看事件
-    // handleViewClick(i, e) {
-    //     this.dialogStatus = 2;
-    //     this.rowData = e;
-    //     this.editVisible = true;
-    // },
-    // 条件查询表格数据
-    btnTableQueryClickHandle() {
-      this.getData();
-    },
-    // 分页导航
-    handlePageChange(val) {
-      this.query.pagenum = val;
-      this.getData();
-    },
-    // 列表刷新
-    btnRefreshClickHandle() {
-      this.query = {
-        pagenum: 1,
-        pagesize: 20,
-        name: "",
-      };
-      this.getData();
-    },
-    // 接收窗体返回
-    cbFunc(val) {
-      this.editVisible = val;
-      this.getData();
-    },
-    // 批量导出
-    export2Excel() {
-      // const tHeader = ['场站', '测点', '描述', '报警类型', '报警级别', '报警逻辑', '是否可用'];
-      // 上面设置Excel的表格第一行的标题
-      const filterVal = [
-        "id",
-        "name",
-        "category",
-        "rank",
-        "enabled",
-        "station",
-        "modelId",
-        "relatedParts",
-        "expression",
-        "description",
-      ];
-      // 上面的index、phone_Num、school_Name是tableData里对象的属性
-      let params = {
-        pagenum: 1,
-        pagesize: 10000,
-        name: this.query.name,
-      };
-      let list = [];
-      let that = this;
-      //把data存到list
-      function exportDone() {
-        let isExport = false;
-        new Promise((resolve, reject) => {
-          let list = custombj_fetchTableData(params);
-          resolve(list);
-        })
-          .then((res) => {
-            console.warn(res);
-            res.records.forEach((i) => {
-              if (typeof i.id === "object") {
-                i.id = i.id.c[0].toString() + i.id.c[1].toString();
-              }
-            });
-            console.warn(res);
-            return new Promise((resolve, reject) => {
-              resolve(res);
-            });
-          })
-          .then((val) => {
-            list.push.apply(list, val.records);
-            if (Math.ceil(val.total / params.pagesize) > params.pagenum) {
-              params.pagenum += 1;
-              return exportDone();
-            } else {
-              return new Promise((resolve, reject) => {
-                isExport = true;
-                resolve();
-              });
-            }
-          })
-          .then(() => {
-            if (isExport) {
-              const data = that.formatJson(filterVal, list);
-              export_json_to_excel(tHeader, data, "自定义报警(导出)");
-              that.$message.success("导出完成");
-              isExport = false;
-            }
-          })
-          .catch((err) => {
-            console.log(err);
-            that.$message.error("导出错误");
-          });
-      }
-      exportDone();
-    },
-    formatJson(filterVal, jsonData) {
-      return jsonData.map((v) => filterVal.map((j) => v[j]));
-    },
-    // 模板下载
-    outExe() {
-      const data = [];
-      export_json_to_excel(tHeader, data, "自定义报警模板");
-    },
-    // 批量导入对话框的显隐
-    epVisibleCB(val) {
-      console.warn(11111111111);
-      this.exportShow = val;
-     this.btnTableQueryClickHandle()
-    },
-    // 级别
-    rankConvert(val) {
-      if (val === "1") {
-        return "低";
-      } else if (val === "2") {
-        return "中低";
-      } else if (val === "3") {
-        return "中";
-      } else if (val === "4") {
-        return "中高";
-      } else if (val === "5") {
-        return "高";
-      }
-    },
-    // 类型
-    categoryConvert(val) {
-      if (val === "1") {
-        return "风机";
-      } else if (val === "2") {
-        return "电气";
-      }
-    },
-    // 状态
-    enabledConvert(val) {
-      if (val === 0) {
-        return "停用";
-      } else if (val === 1) {
-        return "启用";
-      }
-    },
-    // 关联部件
-    relatePartConvert(val) {
-      // return this.relatePartList[val];
-      switch (val) {
-        case "YP":
-          return "叶片";
-          break;
-        case "LG":
-          return "轮毂";
-          break;
-        case "TZ":
-          return "塔架";
-          break;
-        case "JC":
-          return "机舱";
-          break;
-        case "KZXT":
-          return "控制系统";
-          break;
-        case "BJXT":
-          return "变桨系统";
-          break;
-        case "PHXT":
-          return "偏航系统";
-          break;
-        case "CLX":
-          return "齿轮箱";
-          break;
-        case "FDJ":
-          return "发电机";
-          return;
-        case "BPQ":
-          return "变频器";
-          return;
-        case "YYXT":
-          return "液压系统";
-          break;
-        case "FZXT":
-          return "辅助系统";
-          break;
-        case "CFXT":
-          return "测风系统";
-          break;
-        case "DWXT":
-          return "电网系统";
-          break;
-        case "TDG":
-          return "塔底柜";
-          break;
-        case "CDL":
-          return "传动链";
-          break;
-        case "QT":
-          return "其他";
-          break;
-        default:
-          break;
-      }
-    },
-  },
-};
-</script>
-<style scoped>
-.mr10 {
-  margin-right: 10px;
-}
-.el-button + .el-button {
-  margin-left: 10px;
-}
-</style>

+ 0 - 181
src/pages/dataFilter/bj_scada/component/BatchImport.vue

@@ -1,181 +0,0 @@
-<template>
-    <el-dialog 
-        class="avatar-uploader"
-        v-model="visible" 
-        title="批量导入"
-        width="250px"
-        :before-close="beforeClose"
-        @close="dialogCloseHandle">
-        <el-upload
-            class="upload-demo"
-            ref="upload"
-            accept=".xls,.xlsx"
-            action="#"
-            :on-change="uploadOnChangeHandle"
-            :show-file-list="false"
-            :auto-upload="false">
-            <!-- <el-button slot="trigger" size="small" type="primary">选取文件</el-button> -->
-            <img v-if="isFileEmpty" :src="imageUrl" class="avatar">
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-        </el-upload>
-        <span  class="dialog-footer">
-            <el-button @click="CloseHandle">取 消</el-button>
-            <el-button type="primary" @click="btnImportFileClickHandle">导 入</el-button>
-        </span>
-    </el-dialog>
-</template>
-<script>
-import XLSX from 'xlsx';
-import {scadabj_batchImport} from '/@/api/api.js';
-export default {
-    props: {
-        isShow: Boolean,
-        pThead: Object,
-    },
-    data() {
-        return {
-            visible: this.isShow,
-            disabled: false,
-            importFile: {},
-            imageUrl: import('/@/assets/img/icon-excel.png'),
-            isFileEmpty: false,
-        };
-    },
-    watch: {
-        isShow(val) {
-            this.visible = val;
-        },
-        importFile(val) {
-            let keys = Object.keys(val);
-            if(keys.length > 0) {
-                this.isFileEmpty = true;
-            }else {
-                this.isFileEmpty = false;
-            }
-        }
-    },
-    methods: {
-        beforeClose() {
-            this.$confirm('确认关闭?')
-            .then(_ => {
-                this.visible = false;
-                this.$emit('epVisibleCB', this.visible);
-            })
-            .catch(_ => {});                
-        },
-        btnImportFileClickHandle() {
-            // 解析excel表格内数据
-            this.readExcel1(this.importFile);
-            // 关闭对话框
-            this.visible = false;
-            this.$emit('epVisibleCB', this.visible);
-        },
-        uploadOnChangeHandle(file,fileList){
-            console.log("file",file);
-            console.log("fileList",fileList);
-            this.importFile = {0:file.raw}
-        },
-        readExcel1(files) {//表格导入
-            var that = this;
-            console.log(files);
-            if(files.length<=0){//如果没有文件名
-                return false;
-            }else if(!/\.(xls|xlsx)$/.test(files[0].name.toLowerCase())){
-                this.$Message.error('上传格式不正确,请上传xls或者xlsx格式');
-                return false;
-            }
-            const fileReader = new FileReader();
-            fileReader.onload = (ev) => {
-                try {
-                    const data = ev.target.result;
-                    const workbook = XLSX.read(data, {
-                        type: 'binary'
-                    });
-                    const wsname = workbook.SheetNames[0];//取第一张表
-                    const ws = XLSX.utils.sheet_to_json(workbook.Sheets[wsname]);//生成json表格内容
-                    console.log(ws);
-                    // that.peopleArr = [];//清空接收数据
-                    // if(that.peopleArr.length == 1 && that.peopleArr[0].roleName == "" && that.peopleArr[0].enLine == ""){
-                    //     that.peopleArr = [];
-                    // }
-                    //重写数据
-                    let tableData = [];
-                    const thead = this.pThead;
-                    ws.map(item => {
-                        let obj = {};
-                        for(let prop in item) {
-                            // 检测属性是否属于thead自身的
-                            if (thead.hasOwnProperty(prop)) {
-                                obj[thead[prop]] = item[prop];
-                            }
-                        }
-                        tableData.push(obj);
-                    });
-                    console.log(tableData);
-                    try{
-                        scadabj_batchImport(tableData).then(res => {
-                            console.log(res);
-                            if(res.success) {
-                                this.$message.success('完成导入');
-                                this.$emit('epVisibleCB', this.visible);
-                            }else {
-                                this.$message.error(res.msg);
-                            }
-                        })
-                        .catch(err => {
-                            console.log(err);
-                        });
-                    }catch(err){
-                        console.log(err)
-                    }
-                    this.$refs.upload.value = '';
-                } catch (e) {
-                    return false;
-                }
-            };
-            fileReader.readAsBinaryString(files[0]);
-        },
-        dialogCloseHandle() {
-            this.importFile = {};
-        },
-        CloseHandle(){
-        this.visible = false;
-        $emit('epVisibleCB', this.visible);
-        }
-    },
-}
-</script>
-<style scoped>
-.avatar {
-    width: 178px;
-    height: 100%;
-    display: block;
-}
-.avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-}
-.avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-    border-color: #409EFF;
-}
-.upload-demo {
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    align-items: center;
-}
-.el-upload--text {
-    width: 178px !important;
-}
-</style>

+ 0 - 126
src/pages/dataFilter/bj_scada/component/Electric_DI_Point_Select copy.vue

@@ -1,126 +0,0 @@
-<template>
-  <!-- <el-select v-model="value" filterable placeholder="请选择" filterable:filter-method="dataFilter" clearable>
-        <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id">
-            <span style="float: left">{{ item.name }}</span>
-        </el-option>
-    </el-select>-->
-  <div>
-    <el-select
-      v-model="value"
-      filterable
-      placeholder="请选择"
-      v-el-select-loadmore="loadmore"
-      :filter-method="allDataFilter"
-      style="width: 380px"
-    >
-      <el-option
-        v-for="item in options"
-        :key="item.id"
-        :label="item.name"
-        :value="item.id"
-      >
-        <span style="float: left">{{ item.name }}</span>
-      </el-option>
-    </el-select>
-    <span>{{ this.value }}</span>
-  </div>
-</template>
-
-<script>
-import { fetchElectricDIPointList } from "/@/api/api.js";
-export default {
-  props: {
-    pointId: "",
-    stationId: "",
-  },
-  directives: {
-    "el-select-loadmore": {
-      bind(el, binding) {
-        // 获取element-ui定义好的scroll盒子
-        const SELECTWRAP_DOM = el.querySelector(
-          ".el-select-dropdown .el-select-dropdown__wrap"
-        );
-        SELECTWRAP_DOM.addEventListener("scroll", function () {
-          /**
-           * scrollHeight 获取元素内容高度(只读)
-           * scrollTop 获取或者设置元素的偏移值,常用于, 计算滚动条的位置, 当一个元素的容器没有产生垂直方向的滚动条, 那它的scrollTop的值默认为0.
-           * clientHeight 读取元素的可见高度(只读)
-           * 如果元素滚动到底, 下面等式返回true, 没有则返回false:
-           * ele.scrollHeight - ele.scrollTop === ele.clientHeight;
-           */
-          const condition =
-            this.scrollHeight - this.scrollTop <= this.clientHeight;
-          if (condition) {
-            binding.value();
-          }
-        });
-      },
-    },
-  },
-
-  data() {
-    return {
-      //所有的选项数据
-      allOptions: [],
-      //当前绑定到控件的选项
-      options: [],
-      //通过字符串筛选后的选项数据
-      searchOptions: [],
-
-      //存放选择控件所选中的值
-      value: "",
-      //当前选项所在的页码索引
-      pageIndex: 1,
-    };
-  },
-  methods: {
-    loadmore() {
-      this.pageIndex++;
-      this.dataFilter_more(this.pageIndex);
-    },
-    dataFilter_more(num) {
-      this.options = this.allOptions.slice(0, 100 * num);
-    },
-    allDataFilter(val) {
-      let op = [];
-      for (var i = 0; i < this.allOptions.length; i++) {
-        if (this.allOptions[i].name.search(val) != -1) {
-          op.push(this.allOptions[i]);
-        }
-      }
-      this.options = op;
-      this.value = "";
-    },
-  },
-
-  watch: {
-    stationId: {
-      handler(newstationId, oldstationId) {
-        //根据风场编号,获取电气测点,并加载到选项中
-        if (newstationId != "")
-          fetchElectricDIPointList(newstationId).then((res) => {
-            this.allOptions = res;
-            this.options = this.allOptions.slice(0, 100);
-            if (this.value != "") {
-              for (var i = 0; i < this.allOptions.length; i++) {
-                if (this.allOptions[i].id == this.value) {
-                  this.options.push(this.allOptions[i]);
-                }
-              }
-            }
-          });
-      },
-      deep: true,
-      immediate: true,
-    },
-
-    pointId: {
-      handler(newpointId, oldpointId) {
-        this.value = newpointId;
-      },
-      immediate: true,
-      deep: true,
-    },
-  },
-};
-</script>

+ 0 - 52
src/pages/dataFilter/bj_scada/component/Electric_DI_Point_Select.vue

@@ -1,52 +0,0 @@
-<template>
-  <el-select-v2
-    v-model="value"
-    filterable
-    :options="options"
-    placeholder="Please select"
-    style="width: 380px"
-  />
-</template>
-
-<script>
-import { fetchElectricDIPointList } from "/@/api/api.js";
-export default {
-  props: {
-    pointId: "",
-    stationId: "",
-  },
-  data() {
-    return {
-      options: [],
-      value: "",
-    };
-  },
-  methods: {},
-
-  watch: {
-    stationId: {
-      handler(newstationId, oldstationId) {
-        //根据风场编号,获取电气测点,并加载到选项中
-        if (newstationId != "")
-          fetchElectricDIPointList(newstationId).then((res) => {
-            res.forEach(e=>{
-              e['value'] = e.id
-              e['label'] = e.name
-            })
-            this.options = res;
-          });
-      },
-      deep: true,
-      immediate: true,
-    },
-
-    pointId: {
-      handler(newpointId, oldpointId) {
-        this.value = newpointId;
-      },
-      immediate: true,
-      deep: true,
-    },
-  },
-};
-</script>

+ 0 - 257
src/pages/dataFilter/bj_scada/component/edit_form.vue

@@ -1,257 +0,0 @@
-<!-- 编辑弹出框 -->
-<template>
-  <el-dialog
-    v-model="visible"
-    :before-close="dialogBeforeCloseHandle"
-    :destroy-on-close="true"
-    width="500px"
-    @open="dialogOpenHandle"
-  >
-    <el-form
-      ref="refform"
-      :model="formData"
-      :rules="formRules"
-      label-position="right"
-      label-width="80px"
-    >
-      <el-form-item label="场站" prop="stationId">
-        <el-select
-          v-model="formData.stationId"
-          placeholder="场站"
-          class="el-component"
-          @change="stationChangeHandle"
-        >
-          <el-option
-            v-for="item in stationList"
-            :key="item.id"
-            :value="item.id"
-            :label="item.name"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-       <el-form-item label="报警类型" prop="category1">
-        <el-select
-          v-model="formData.category1"
-          placeholder="报警类型"
-          class="el-component"
-        >
-          <el-option key="1" label="升压站" value="SYZ"></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="测点名称" prop="pointKey">
-        <Electric_DI_Point_Select
-          :stationId="formData.stationId"
-          :pointId="formData.pointKey"
-          ref="childMethod"
-        />
-      </el-form-item>
-      <el-form-item label="描述" prop="description">
-        <el-input v-model="formData.description" type="textarea" rows="3" />
-      </el-form-item>
-     
-      <el-form-item label="报警级别" prop="rank">
-        <el-select
-          v-model="formData.rank"
-          placeholder="报警级别"
-          class="el-component"
-        >
-          <el-option key="1" label="低" value="1" />
-          <el-option key="2" label="中低" value="2" />
-          <el-option key="3" label="中" value="3" />
-          <el-option key="4" label="中高" value="4" />
-          <el-option key="5" label="高" value="5" />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="报警逻辑" prop="alarmType">
-        <el-select
-          v-model="formData.alarmType"
-          placeholder="报警逻辑"
-          class="el-component"
-        >
-          <el-option key="1" label="0触发,1解除" :value="0" />
-          <el-option key="2" label="1触发,0解除" :value="1" />
-          <el-option key="3" label="变化触发" :value="2" />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="是否启用" prop="enabled">
-        <el-select
-          v-model="formData.enabled"
-          placeholder="是否可用"
-          class="el-component"
-        >
-          <el-option key="1" label="启用" :value="1" />
-          <el-option key="2" label="停用" :value="0" />
-        </el-select>
-      </el-form-item>
-    </el-form>
-    <span class="dialog-footer">
-      <el-button @click="btnCancelClickHandle">取 消</el-button>
-      <el-button type="primary" @click="btnSubmitClickHandle">确 定</el-button>
-    </span>
-  </el-dialog>
-</template>
-<script>
-import { scadabj_postSave } from "/@/api/api.js";
-import Electric_DI_Point_Select from "./Electric_DI_Point_Select.vue";
-import { warn } from '@vue/runtime-core';
-export default {
-  components: {
-    Electric_DI_Point_Select,
-  },
-  data() {
-    return {
-      visible: this.isVisible,
-      formData: {
-        id: "",
-        stationId: "",
-        pointKey: "",
-        description: "",
-        category1: "SYZ",
-        rank: "",
-        alarmType: "",
-        enabled: "",
-        userName: "",
-      },
-      formRules: {
-        stationId: [
-          { required: true, message: "请选择场站", trigger: "change" },
-        ],
-        pointKey: [{ required: true, message: "请输入测点", trigger: "blur" }],
-        description: [
-          { required: true, message: "请输入描述", trigger: "blur" },
-        ],
-        category1: [
-          { required: true, message: "请选择报警类型", trigger: "change" },
-        ],
-        rank: [{ required: true, message: "请选择级别", trigger: "change" }],
-        alarmType: [
-          { required: true, message: "请选择报警逻辑", trigger: "change" },
-        ],
-        enabled: [
-          { required: true, message: "请选择是否可用", trigger: "change" },
-        ],
-      },
-    };
-  },
-  computed: {
-    stationList() {
-      return this.$store.state.stationListAll;
-    },
-    isStation() {
-      return this.$store.getters.isStation;
-    },
-  },
-  props: {
-    isVisible: Boolean,
-    isEdit: Boolean,
-    rowData: Object,
-  },
-  watch: {
-    stationList: {
-      handler(nval, oldv) {
-        console.warn(nval);
-      },
-      immediate: true,
-      deep: true,
-    },
-    isVisible(val) {
-      this.visible = val;
-    },
-    rowData(val) {
-      if(Object.keys(val) == 0){
-        return
-      }else{
-      this.formData = JSON.parse(JSON.stringify(val));
-      }
-    },
-  },
-  methods: {
-    // 关闭窗口
-    dialogBeforeCloseHandle(done) {
-      this.$confirm("确认关闭?")
-        .then((_) => {
-          done();
-          this.formData.stationId = "";
-          this.formData.pointKey = "";
-          this.visible = false;
-          this.$emit("rVisible", this.visible);
-          this.$refs["refform"].resetFields();
-        })
-        .catch((_) => {});
-    },
-    // 取消事件
-    btnCancelClickHandle() {
-      this.visible = false;
-      this.$emit("rVisible", this.visible);
-    },
-    // 保存编辑
-    btnSubmitClickHandle() {
-      //父子传参,获取电气测点选择组件中的value值
-      this.formData.pointKey = this.$refs.childMethod.value;
-      this.$refs["refform"].validate((valid) => {
-        if (valid) {
-          let loginUser = sessionStorage.getItem("ms_username");
-          this.formData.userName = loginUser;
-          this.$confirm("确认保存吗?").then(() => {
-            if (this.isEdit) {
-              scadabj_postSave(this.formData)
-                .then((response) => {
-                  if (response.success) {
-                    this.$message.success(`修改成功`);
-                    this.visible = false;
-                    this.$emit("rVisible", this.visible);
-                  } else if (
-                    response.status != null &&
-                    response.status == 521
-                  ) {
-                    this.$message.error("登陆过期");
-                    this.$router.push("/login");
-                    return;
-                  } else {
-                    this.$message.error(response.msg);
-                  }
-                })
-                .catch((err) => {
-                  console.log(err);
-                });
-            } else {
-              // 新增
-              scadabj_postSave(this.formData)
-                .then((response) => {
-                  if (response.status != null && response.status == 521) {
-                    this.$message.error("登陆过期");
-                    this.$router.push("/login");
-                    return;
-                  }
-                  if (response.success) {
-                    this.$message.success("保存成功");
-                    this.visible = false;
-                    this.$emit("rVisible", this.visible);
-                  } 
-                })
-                .catch((err) => {
-                  console.log(err);
-                });
-            }
-          });
-        }
-      });
-    },
-    // 窗口打开事件
-    // dialogOpenHandle() {
-    //     if (!this.isEdit && this.$refs['refform'] !== undefined) {
-    //         this.$refs['refform'].resetFields();
-    //     }
-    // },
-    stationChangeHandle() {
-      //场站id发生变化时,清空测点绑定数据
-      this.formData.pointKey = "";
-    },
-  },
-};
-</script>
-<style scoped>
-.el-component {
-  width: 100%;
-}
-</style>

+ 0 - 521
src/pages/dataFilter/bj_scada/list.vue

@@ -1,521 +0,0 @@
-<template>
-  <div>
-    <div class="container">
-      <div class="row-box">
-        <div class="handle-box">
-          <!-- <el-button
-                        type="warning"
-                        icon="el-icon-lx-edit"
-                        class="handle-del mr10"
-                        @click="enableAllSelection(multipleSelection)"
-                    >批量禁用</el-button> -->
-          <el-button
-            type="primary"
-            icon="el-icon-lx-add"
-            class="handle-edit mr10"
-            @click="handleInsert"
-            >新增记录</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="export2Excel"
-            >批量导出</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="outExe"
-            >模板下载</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-top"
-            class="handle-edit mr10"
-            @click="exportShow = true"
-            >批量导入</el-button
-          >
-        </div>
-        <div class="handle-box">
-          <el-select
-          v-if="!isStation"
-            v-model="query.stationId"
-            placeholder="场站"
-            class="handle-select mr10"
-            style="width: 150px"
-            clearable
-          >
-          <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :value="item.id"
-              :label="item.name"
-            ></el-option>
-          </el-select>
-          <el-input
-            v-model="query.description"
-            placeholder="描述"
-            class="handle-input mr10"
-            clearable
-          ></el-input>
-          <el-input
-            v-model="query.pointKey"
-            placeholder="测点"
-            class="handle-input mr10"
-            clearable
-          ></el-input>
-          <el-select
-            v-model="query.enable"
-            placeholder="是否可用"
-            class="handle-select mr10"
-            clearable
-          >
-            <el-option key="1" label="启用" value="1" />
-            <el-option key="2" label="停用" value="0" />
-          </el-select>
-          <el-button type="primary" icon="el-icon-search" @click="handleSearch"
-            >搜索</el-button
-          >
-        </div>
-      </div>
-      <el-table
-        id="out-table"
-        :data="tableData"
-        border
-        class="table"
-        ref="multipleTable"
-        header-cell-class-name="table-header"
-        :highlight-current-row="true"
-        @selection-change="handleSelectionChange"
-      >
-        <el-table-column
-          prop="pointKey"
-          label="测点"
-          align="center"
-          min-width="200px"
-        />
-        <el-table-column
-          prop="description"
-          label="描述"
-          align="left"
-          min-width="120px"
-        >
-        </el-table-column>
-        <el-table-column label="报警类型" align="center" min-width="50">
-          <template #default="scope">{{
-            category1Convert(scope.row.category1)
-          }}</template>
-        </el-table-column>
-        <el-table-column label="场站" prop="stationName" align="center"/>
-        <el-table-column label="报警级别" align="center" min-width="40">
-          <template #default="scope">{{
-            rankConvert(scope.row.rank)
-          }}</template>
-        </el-table-column>
-        <el-table-column label="报警逻辑" align="center" min-width="70">
-          <template #default="scope">{{
-            alarmTypeConvert(scope.row.alarmType)
-          }}</template>
-        </el-table-column>
-        <el-table-column
-          label="是否启用"
-          align="center"
-          min-width="50"
-          prop="enabled"
-        >
-          <template #default="scope">
-            <!-- <el-button type="primary" plain round size="mini" @click="handleEnabled(scope.$index, scope.row)">{{scope.row.enabled | enabledConvert}}</el-button> -->
-            <span>{{ enabledConvert(scope.row.enabled) }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center" width="100">
-          <template #default="scope">
-            <el-button
-              type="primary"
-              plain
-              round
-              size="mini"
-              icon="el-icon-lx-edit"
-              @click="btnEditClickHandle(scope.$index, scope.row)"
-              >编辑</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination">
-        <el-pagination
-          background
-          layout="total, prev, pager, next"
-          :current-page="currentPage"
-          :page-size="pageSize"
-          :total="total"
-          @current-change="handlePageChange"
-        ></el-pagination>
-      </div>
-    </div>
-    <!-- 编辑弹出框 -->
-    <edit_form
-      :isVisible="editVisible"
-      :isEdit="isEdit"
-      :rowData="rowData"
-      @rVisible="rVisible"
-    />
-    <!-- 导入对话框 -->
-    <BatchInput
-      :isShow="exportShow"
-      @epVisibleCB="epVisibleCB"
-      :pThead="thead"
-    />
-  </div>
-</template>
-
-<script>
-import { scadabj_fetchTableData, scadabj_postSave } from "/@/api/api.js";
-import edit_form from "./component/edit_form.vue";
-import BatchInput from "./component/BatchImport.vue";
-import { export_json_to_excel } from "/@/assets/excel/Export2Excel"; //引入文件
-const tHeader = [
-  "id",
-  "场站(必填)",
-  "测点(必填)",
-  "描述",
-  "报警类型(必填)",
-  "类别2",
-  "类别3",
-  "类别4",
-  "报警级别(必填——1:低;2:中低;3:中;4:中高;5:高)",
-  "报警逻辑(必填——0:【0触发,1解除】;1:【1触发,0解除】;2:【变化触发】)",
-  "是否可用(必填——1:启用;0:停用)",
-  "设备编号",
-]; //将对应的属性名转换成中文
-export default {
-  name: "scadaTabdle",
-  data() {
-    return {
-      query: {
-        pagenum: 1,
-        pagesize: 20,
-        stationId: "",
-        description: "",
-        pointKey: "",
-        enable: "",
-      },
-      exportShow: false,
-      tableData: [],
-      multipleSelection: [],
-      editVisible: false,
-      isEdit: false,
-      pageTotal: 0,
-      total: 0,
-      pageSize: 0,
-      currentPage: 0,
-      rowData: {},
-      thead: {
-        id: "id",
-        "场站(必填)": "stationId",
-        "测点(必填)": "pointKey",
-        描述: "description",
-        "报警类型(必填)": "category1",
-        类别2: "category2",
-        类别3: "category3",
-        类别4: "category4",
-        "报警级别(必填——1:低;2:中低;3:中;4:中高;5:高)": "rank",
-        "报警逻辑(必填——0:【0触发,1解除】;1:【1触发,0解除】;2:【变化触发】)":
-          "alarmType",
-        "是否可用(必填——1:启用;0:停用)": "enabled",
-        设备编号: "deviceId",
-      },
-    };
-  },
-  created() {
-    this.getData();
-    
-  },
-  components: {
-    edit_form,
-    BatchInput,
-  },
-  computed:{
-    stationList(){
-     return this.$store.state.stationListAll
-    },
-    isStation(){
-     return this.$store.getters.isStation
-    }
-  },
-  filters: {},
-  methods: {
-    getData() {
-      scadabj_fetchTableData(this.query)
-        .then((res) => {
-          if (res.status != null && res.status == 521) {
-            this.$message.error("登陆过期");
-            this.$router.push("/login");
-            return;
-          }
-          res.records.forEach((i) => {
-            if (typeof i.id === "object") {
-              i.id = i.id.c[0].toString() + i.id.c[1].toString();
-            }
-          });
-          this.tableData = res.records;
-          this.total = res.total || 0;
-          // this.pageTotal = res.page;
-          (this.pageSize = res.size), (this.currentPage = res.current);
-          this.pageTotal = Math.ceil(res.total / res.size);
-        })
-        .catch((err) => {
-          console.log(err);
-          this.$message.error("服务器连接中断");
-        });
-    },
-    // 触发搜索按钮
-    handleSearch() {
-      this.getData();
-    },
-    // 禁用操作
-    handleEnabled(index, row) {
-      // 二次确认禁用
-      switch (row.enabled) {
-        case 0:
-          this.$confirm("确定要启用吗?", "提示", {
-            type: "warning",
-          })
-            .then(() => {
-              row.enabled = 1;
-              scadabj_postSave(row).then((response) => {
-                let res = response;
-                this.$message.success("启用成功");
-              });
-            })
-            .catch((err) => console.log(err));
-          break;
-        case 1:
-          this.$confirm("确定要停用吗?", "提示", {
-            type: "warning",
-          })
-            .then(() => {
-              row.enabled = 0;
-              scadabj_postSave(row).then((response) => {
-                let res = response;
-                this.$message.success("停用成功");
-              });
-            })
-            .catch((err) => console.log(err));
-      }
-    },
-    // 多选操作
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 批量停用
-    enableAllSelection(rows) {
-      if (rows) {
-        this.$confirm("确定要停用吗?", "提示", { type: "warning" })
-          .then(function () {
-            rows.forEach((row) => {
-              row.enabled = 0;
-              scadabj_postSave(row)
-                .then((response) => {})
-                .catch((err) => console.log(err));
-            });
-          })
-          .catch((err) => {
-            console.log(err);
-          });
-        rows.forEach((row) => {
-          // 切换选中状态
-          this.$refs.multipleTable.toggleRowSelection(row);
-        });
-      } else {
-        this.$refs.multipleTable.clearSelection();
-      }
-    },
-    //新增操作
-    handleInsert() {
-      this.isEdit = false;
-      this.rowData = {};
-      this.editVisible = true;
-    },
-    // 编辑操作
-    btnEditClickHandle(index, row) {
-      this.rowData = row;
-      this.isEdit = true;
-
-      this.editVisible = true;
-    },
-    // 分页导航
-    handlePageChange(val) {
-      // this.$set(this.query, 'pagenum', val);
-      this.query.pagenum = val;
-
-      this.getData();
-    },
-    // 子组件返回更新editvisible
-    rVisible(val) {
-      this.editVisible = val;
-      this.getData();
-    },
-    // 批量导入对话框的显隐
-    epVisibleCB(val) {
-      this.exportShow = val;
-    },
-    export2Excel() {
-      // const tHeader = ['场站', '测点', '描述', '报警类型', '报警级别', '报警逻辑', '是否可用'];
-      // 上面设置Excel的表格第一行的标题
-      const filterVal = [
-        "id",
-        "stationId",
-        "pointKey",
-        "description",
-        "category1",
-        "category2",
-        "category3",
-        "category4",
-        "rank",
-        "alarmType",
-        "enabled",
-        "deviceId",
-      ];
-      // 上面的index、phone_Num、school_Name是tableData里对象的属性
-      let params = {
-        pagenum: 1,
-        pagesize: 10000,
-        stationId: this.query.stationId,
-        description: this.query.description,
-        pointKey: this.query.pointKey,
-        enable: this.query.enable,
-      };
-      let list = [];
-      let that = this;
-      //把data存到list
-      function exportDone() {
-        let isExport = false;
-        new Promise((resolve, reject) => {
-          let list = scadabj_fetchTableData(params);
-          resolve(list);
-        })
-          .then((res) => {
-            res.records.forEach((i) => {
-              if (typeof i.id === "object") {
-                i.id = i.id.c[0].toString() + i.id.c[1].toString();
-              }
-            });
-            return new Promise((resolve, reject) => {
-              resolve(res);
-            });
-          })
-          .then((val) => {
-            list.push.apply(list, val.records);
-            if (Math.ceil(val.total / params.pagesize) > params.pagenum) {
-              params.pagenum += 1;
-              return exportDone();
-            } else {
-              return new Promise((resolve, reject) => {
-                isExport = true;
-                resolve();
-              });
-            }
-          })
-          .then(() => {
-            if (isExport) {
-              const data = that.formatJson(filterVal, list);
-              export_json_to_excel(tHeader, data, "Scada报警(导出)");
-              that.$message.success("导出完成");
-              isExport = false;
-            }
-          })
-          .catch((err) => {
-            console.log(err);
-            that.$message.error("导出错误");
-          });
-      }
-      exportDone();
-    },
-    formatJson(filterVal, jsonData) {
-      return jsonData.map((v) => filterVal.map((j) => v[j]));
-    },
-    // 模板下载
-    outExe: function () {
-      const data = [];
-      export_json_to_excel(tHeader, data, "scada报警模板");
-    },
-    ///fifter
-
-    rankConvert(rank) {
-      if (rank === "1") {
-        return "低";
-      } else if (rank === "2") {
-        return "中低";
-      } else if (rank === "3") {
-        return "中";
-      } else if (rank === "4") {
-        return "中高";
-      } else if (rank === "5") {
-        return "高";
-      }
-    },
-    alarmTypeConvert(alarmType) {
-      if (alarmType === 0) {
-        return "0触发,1解除";
-      } else if (alarmType === 1) {
-        return "1触发,0解除";
-      } else if (alarmType === 2) {
-        return "变化触发";
-      }
-    },
-    enabledConvert(enabled) {
-      if (enabled === 1) {
-        return "启用";
-      } else if (enabled === 0) {
-        return "停用";
-      }
-    },
-    category1Convert(category1) {
-      if (category1 == "SYZ") {
-        return "升压站";
-      } else if (category1 == "GF") {
-        return "光伏";
-      }
-    },
-  },
-};
-</script>
-
-<style scoped>
-.handle-box {
-  margin-bottom: 10px;
-}
-
-.handle-select {
-  width: 120px;
-}
-
-.handle-input {
-  width: 200px;
-  display: inline-block;
-}
-.table {
-  width: 100%;
-  font-size: 14px;
-}
-.red {
-  color: #ff0000;
-}
-.mr10 {
-  margin-right: 10px;
-}
-.table-td-thumb {
-  display: block;
-  margin: auto;
-  width: 40px;
-  height: 40px;
-}
-.row-box {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-}
-</style>

+ 0 - 180
src/pages/dataFilter/bj_windturbine/component/BatchImport.vue

@@ -1,180 +0,0 @@
-<template>
-    <el-dialog 
-        class="avatar-uploader"
-        v-model="visible" 
-        title="批量导入"
-        width="250px"
-        :before-close="beforeClose"
-        @close="dialogCloseHandle">
-        <el-upload
-            class="upload-demo"
-            ref="upload"
-            accept=".xls,.xlsx"
-            action="#"
-            :on-change="uploadOnChangeHandle"
-            :show-file-list="false"
-            :auto-upload="false">
-            <!-- <el-button slot="trigger" size="small" type="primary">选取文件</el-button> -->
-            <img v-if="isFileEmpty" :src="imageUrl" class="avatar">
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-        </el-upload>
-        <span  class="dialog-footer">
-            <el-button @click="CloseHandle">取 消</el-button>
-            <el-button type="primary" @click="btnImportFileClickHandle">导 入</el-button>
-        </span>
-    </el-dialog>
-</template>
-<script>
-import XLSX from 'xlsx';
-import {windturbinebj_batchImport} from '/@/api/api.js';
-export default {
-    props: {
-        isShow: Boolean,
-        pThead: Object,
-    },
-    data() {
-        return {
-            visible: this.isShow,
-            disabled: false,
-            importFile: {},
-            imageUrl: import('/@/assets/img/icon-excel.png'),
-            isFileEmpty: false,
-        };
-    },
-    watch: {
-        isShow(val) {
-            this.visible = val;
-        },
-        importFile(val) {
-            let keys = Object.keys(val);
-            if(keys.length > 0) {
-                this.isFileEmpty = true;
-            }else {
-                this.isFileEmpty = false;
-            }
-        }
-    },
-    methods: {
-        beforeClose() {
-            this.$confirm('确认关闭?')
-            .then(_ => {
-                this.visible = false;
-                this.$emit('epVisibleCB', this.visible);
-            })
-            .catch(_ => {});                
-        },
-        btnImportFileClickHandle() {
-            // 解析excel表格内数据
-            this.readExcel1(this.importFile);
-            // 关闭对话框
-            this.visible = false;
-            this.$emit('epVisibleCB', this.visible);
-        },
-        uploadOnChangeHandle(file,fileList){
-          
-            this.importFile = {0:file.raw}
-        },
-        readExcel1(files) {//表格导入
-            var that = this;
-       
-            if(files.length<=0){//如果没有文件名
-                return false;
-            }else if(!/\.(xls|xlsx)$/.test(files[0].name.toLowerCase())){
-                this.$Message.error('上传格式不正确,请上传xls或者xlsx格式');
-                return false;
-            }
-            const fileReader = new FileReader();
-            fileReader.onload = (ev) => {
-                try {
-                    const data = ev.target.result;
-                    const workbook = XLSX.read(data, {
-                        type: 'binary'
-                    });
-                    const wsname = workbook.SheetNames[0];//取第一张表
-                    const ws = XLSX.utils.sheet_to_json(workbook.Sheets[wsname]);//生成json表格内容
-                    console.log(ws);
-                    // that.peopleArr = [];//清空接收数据
-                    // if(that.peopleArr.length == 1 && that.peopleArr[0].roleName == "" && that.peopleArr[0].enLine == ""){
-                    //     that.peopleArr = [];
-                    // }
-                    //重写数据
-                    let tableData = [];
-                    const thead = this.pThead;
-                    ws.map(item => {
-                        let obj = {};
-                        for(let prop in item) {
-                            // 检测属性是否属于thead自身的
-                            if (thead.hasOwnProperty(prop)) {
-                                obj[thead[prop]] = item[prop];
-                            }
-                        }
-                        tableData.push(obj);
-                    });
-                 
-                    try{
-                        windturbinebj_batchImport(tableData).then(res => {
-                         
-                            if(res.success) {
-                                this.$message.success('完成导入');
-                                this.$emit('epVisibleCB', this.visible);
-                            }else {
-                                this.$message.error(res.msg);
-                            }
-                        })
-                        .catch(err => {
-                            console.log(err);
-                        });
-                    }catch(err){
-                        console.log(err)
-                    }
-                    this.$refs.upload.value = '';
-                } catch (e) {
-                    return false;
-                }
-            };
-            fileReader.readAsBinaryString(files[0]);
-        },
-        dialogCloseHandle() {
-            this.importFile = {};
-        },
-        CloseHandle() {
-            this.visible = false;
-            $emit('epVisibleCB', this.visible);
-        }
-    },
-}
-</script>
-<style scoped>
-.avatar {
-    width: 178px;
-    height: 100%;
-    display: block;
-}
-.avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-}
-.avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-    border-color: #409EFF;
-}
-.upload-demo {
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    align-items: center;
-}
-.el-upload--text {
-    width: 178px !important;
-}
-</style>

+ 0 - 56
src/pages/dataFilter/bj_windturbine/component/DI_Point_Select.vue

@@ -1,56 +0,0 @@
-<template>
-    <el-select v-model="value"  class="width-100"  filterable placeholder="请选择" >
-        <el-option
-            v-for="item in options"
-            :key="item.id"
-            :label="item.uniformCode+'    '+item.name"
-            :value="item.uniformCode"
-        >
-            <span style="float: left">{{ item.name }}</span>
-            <span style="float: right; color: #8492a6; font-size: 13px">{{ item.uniformCode }}</span>
-        </el-option>
-    </el-select>
-</template>
-
-<script>
-import { fetchDIPointList,getDIPointList } from '/@/api/api.js';
-export default {
-    props: {
-        uniform_code: '',
-        modelId: ''
-    },
-    data() {
-        return {
-            query: { modelId: '' },
-            options: [],
-            value: ''
-        };
-    },
-    watch: {
-    
-        modelId: {
-            //由于这里使用了组件嵌套,需要使用深度监听  
-            handler(new_modelId, old_modelId) {
-                if (new_modelId != '') {
-                    this.query.modelId = new_modelId;
-                    getDIPointList(this.query.modelId).then(res => {
-                        this.options = res.data;
-                    });
-                }
-            },
-            immediate: true,
-            deep: true
-        },
-
-        uniform_code: {
-            handler(newuniform_code, olduniform_code) {
-                if (newuniform_code != '0') {
-                    this.value = 'DI' + newuniform_code;
-                }
-            },
-            immediate: true,
-            deep: true
-        }
-    }
-};
-</script>

+ 0 - 415
src/pages/dataFilter/bj_windturbine/component/edit_form.vue

@@ -1,415 +0,0 @@
-<template>
-  <el-dialog
-    v-model="visible"
-    width="800px"
-    :before-close="beforeClose"
-    @close="dialogCloseHandle"
-  >
-    <el-form
-      label-position="right"
-      label-width="100px"
-      :model="form"
-      :rules="formRules"
-      ref="form"
-    >
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="序列号" prop="id">
-            <el-input v-model="form.id" disabled />
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="制造商" prop="manufacturerCode">
-            <el-select class="width-100" v-model="form.manufacturerCode">
-              <el-option
-                v-for="item in creator"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="风机型号" prop="modelId">
-            <el-select class="width-100" v-model="form.modelId">
-              <el-option
-                v-for="item in windturbine"
-                :key="item"
-                :value="item"
-                :label="item"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="风机测点" prop="ednaValue">
-            <!-- <el-input v-model="form.ednaValue"/> -->
-            <!---自定义组件添加ref="childMethod" 可以进行父子传参,通过childMethod获取组件中的值-->
-            <Dipointselect
-              :modelId="form.modelId"
-              :uniform_code="form.ednaValue"
-              ref="childMethod"
-            />
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="停机类型" prop="characteristic">
-            <el-select class="width-100" v-model="form.characteristic">
-              <el-option
-                v-for="item in CHARACTERISTIC"
-                :key="item"
-                :label="item"
-                :value="item"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="故障编码" prop="faultCode">
-            <el-input v-model="form.faultCode" :disabled="isEdit" />
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="描述" prop="chineseText">
-            <el-input v-model="form.chineseText" />
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="报警级别" prop="levelId">
-            <el-select class="width-100" v-model="form.levelId">
-              <el-option
-                v-for="item in LEVELID"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="报警分类" prop="warningClassIfyId">
-            <el-select class="width-100" v-model="form.warningClassIfyId">
-              <el-option
-                v-for="item in warningClassifyId"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="报警类型" prop="warningTypeId">
-            <el-select class="width-100" v-model="form.warningTypeId">
-              <el-option
-                v-for="item in warningTypeId"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="上一级节点" prop="parentId">
-            <el-select v-model="form.parentId" class="width-100" clearable>
-              <el-option
-                v-for="item in leafList"
-                :key="item.id"
-                :value="item.id"
-                :label="item.chineseText"
-              >
-                <span style="float: left; color: #8492a6; font-size: 13px">{{
-                  item.id
-                }}</span>
-                <span style="float: right">{{ item.chineseText }}</span>
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="是否有子节点" prop="isleaf">
-            <el-radio-group v-model="form.isleaf">
-              <el-radio-button label="0">有</el-radio-button>
-              <el-radio-button label="1">无</el-radio-button>
-            </el-radio-group>
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="关联部件" prop="relatedParts">
-            <el-select class="width-100" v-model="form.relatedParts">
-              <el-option
-                v-for="item in relatedPart"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="是否可以复位" prop="isreset">
-            <el-radio-group v-model="form.isreset">
-              <el-radio-button label="0">是</el-radio-button>
-              <el-radio-button label="1">否</el-radio-button>
-            </el-radio-group>
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="50">
-        <el-col :span="12">
-          <el-form-item label="是否展示" prop="display">
-            <el-radio-group v-model="form.display">
-              <el-radio-button label="0">是</el-radio-button>
-              <el-radio-button label="1">否</el-radio-button>
-            </el-radio-group>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12"></el-col>
-      </el-row>
-    </el-form>
-    <span class="dialog-footer">
-      <el-button @click="btnCancelClickHandle">取 消</el-button>
-      <el-button type="primary" @click="btnSubmitClickHandle">确 定</el-button>
-    </span>
-  </el-dialog>
-</template>
-<script>
-import {
-  windturbinebj_postSave,
-  fetchLeaf,
-  fetchWarningType,
-  fetchWarningClassify,
-  fetchRelatePart,
-  equipmentmodel_list,
-  getTestingpointDI
-} from "/@/api/api.js";
-import Dipointselect from "./DI_Point_Select.vue";
-
-export default {
-  components: {
-    Dipointselect,
-  },
-  props: {
-    isVisible: Boolean,
-    rowData: null,
-    isEdit: Boolean,
-  },
-  data() {
-    return {
-      visible: this.isVisible,
-      relatedPart: [],
-      warningTypeId: [],
-      warningClassifyId: [],
-      creator: [
-        {
-          id: "HFYG_CS",
-          name: "合肥阳光电源有限公司",
-          country: "中国",
-          place: "合肥",
-        },
-        { id: "AMS_CS", name: "艾默生", country: "", place: "" },
-        {
-          id: "NRJD_CS",
-          name: "国电南瑞吉电新能源",
-          country: "中国",
-          place: "",
-        },
-        { id: "MGSK_CS", name: "美国赛康", country: "美国", place: "" },
-        { id: "LHDL_CS", name: "联合动力", country: "中国", place: "保定" },
-        { id: "SYHC_CS", name: "沈阳华创", country: "中国", place: "沈阳" },
-      ],
-      LEVELID: [
-        { id: "ZC_BJ", name: "运转正常" },
-        { id: "YJ_BJ", name: "运转状态超出标准范围" },
-        { id: "GZ_BJ", name: "非正常停止运转" },
-        { id: "WH_BJ", name: "停机维护" },
-        { id: "XD_BJ", name: "限电/计划停机" },
-      ],
-      CHARACTERISTIC: ["正常停机", "正常启动", "快速停机", "紧急停机"],
-      form: {
-        id: "",
-        levelId: "",
-        manufacturerCode: "",
-        chineseText: "",
-        parentId: "",
-        isleaf: "",
-        sequenceNumber: "",
-        characteristic: "",
-        modelId: "",
-        codeName: "1",
-        ednaValue: "",
-        display: "0",
-        warningClassIfyId: "",
-        standardTime: 2,
-        isreset: "1",
-        warningTypeId: "",
-        faultCode: "",
-        relatedParts: "",
-        userName: "",
-      },
-      formRules: {
-        manufacturerCode: {
-          required: true,
-          message: "请选择制造商",
-          trigger: "change",
-        },
-        ednaValue: {
-          required: true,
-          message: "请输入统一编码",
-          trigger: "trigger",
-        },
-        characteristic: {
-          required: true,
-          message: "请选择类别",
-          trigger: "trigger",
-        },
-        modelId: {
-          required: true,
-          message: "请选择风机型号",
-          trigger: "change",
-        },
-      },
-      windturbine: [
-      ],
-      leafList: [],
-    };
-  },
-  watch: {
-    isVisible(val) {
-      this.visible = val;
-    },
-    rowData(val) {
-      this.form = val;
-    },
-  },
-  created() {
-    this.getequipmentmodel_list();
-    // 上级节点
-    fetchLeaf().then((res) => {
-      let rList = res.records;
-      rList.sort(function (a, b) {
-        if (a.id < b.id) {
-          return -1;
-        }
-        if (a.id > b.id) {
-          return 1;
-        }
-        return 0;
-      });
-      this.leafList = rList;
-    });
-    // 报警类别
-    fetchWarningType().then((res) => {
-      this.warningTypeId = res;
-    });
-    // 报警分类
-    fetchWarningClassify().then((res) => {
-      this.warningClassifyId = res;
-    });
-    // 关联部件
-    fetchRelatePart().then((res) => {
-      this.relatedPart = res;
-    });
-  },
-  methods: {
-    // 机型
-    async getequipmentmodel_list() {
-      const res = await getTestingpointDI();
-      
-      this.windturbine = res.data;
-    },
-    btnCancelClickHandle() {
-      this.visible = false;
-      this.$emit("rVisible", this.visible);
-      this.$refs["form"].resetFields();
-    },
-    // 提交按钮
-    btnSubmitClickHandle() {
-      //获取子组件值,复制给form数据,完成双向
-      this.form.ednaValue = this.$refs.childMethod.value;
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          let loginUser = sessionStorage.getItem("ms_username");
-          this.form.userName = loginUser;
-          this.$confirm("确认保存吗?").then(() => {
-            new Promise((resolve, reject) => {
-              let nEdnaValue = this.form.ednaValue
-                .toString()
-                .replace("AI", "")
-                .replace("DI", "");
-              this.form.ednaValue;
-              this.form.ednaValue = nEdnaValue
-              resolve(windturbinebj_postSave(this.form));
-            })
-              .then((res) => {
-                if (res.success) {
-                  this.$message.success("保存成功");
-                  this.visible = false;
-                  this.$emit("rVisible", this.visible);
-                  this.$refs["form"].resetFields();
-                }
-              })
-              .catch((err) => {
-                console.log(err);
-              });
-          });
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    beforeClose(done) {
-      this.$confirm("确认关闭?")
-        .then((_) => {
-          done();
-          this.visible = false;
-          this.$emit("rVisible", this.visible);
-          this.$refs["form"].resetFields();
-        })
-        .catch((_) => {});
-    },
-    dialogCloseHandle() {
-      this.form = {
-        id: "",
-        levelId: "",
-        manufacturerCode: "",
-        chineseText: "",
-        parentId: "",
-        isleaf: "",
-        sequenceNumber: "",
-        characteristic: "",
-        modelId: "",
-        codeName: "1",
-        ednaValue: "",
-        display: "0",
-        warningClassIfyId: "",
-        standardTime: 2,
-        isreset: "1",
-        warningTypeId: "",
-        faultCode: "",
-        relatedParts: "",
-      };
-    },
-  },
-};
-</script>
-<style scoped>
-.width-100 {
-  width: 100%;
-}
-</style>

+ 0 - 675
src/pages/dataFilter/bj_windturbine/list.vue

@@ -1,675 +0,0 @@
-<template>
-  <div>
-    <div class="container">
-      <div class="row-box">
-        <div class="handle-box mb10">
-          <el-button
-            type="primary"
-            icon="el-icon-lx-add"
-            @click="btnInsertClickHandle"
-          >
-            新增记录</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="export2Excel"
-          >
-            批量导出</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-down"
-            class="handle-edit mr10"
-            @click="outExe"
-          >
-            模板下载</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-lx-top"
-            class="handle-edit mr10"
-            @click="exportShow = true"
-          >
-            批量导入</el-button
-          >
-        </div>
-        <div class="handle-box mb10">
-          <el-select
-            v-if="!isStation"
-            v-model="query.stationId"
-            placeholder="场站"
-            class="handle-select mr10"
-            style="width: 150px"
-            clearable
-            @change="changeStation()"
-          >
-            <el-option
-              v-for="item in stationList"
-              :key="item.id"
-              :value="item.id"
-              :label="item.name"
-            ></el-option>
-          </el-select>
-          <el-select
-            placeholder="风机型号"
-            v-model="query.modelId"
-            clearable
-            class="mr10"
-          >
-            <el-option
-              v-for="item in modelList"
-              :key="item.code"
-              :value="item.code"
-              :label="item.code"
-            ></el-option>
-          </el-select>
-          <el-input
-            placeholder="名称"
-            style="width: 200px"
-            class="mr10"
-            v-model="query.name"
-            clearable
-          />
-          <el-button
-            icon="el-icon-search"
-            type="primary"
-            @click="btnQueryClickHandle"
-            >搜索</el-button
-          >
-        </div>
-      </div>
-      <el-table :data="tableData" :highlight-current-row="true" border>
-        <el-table-column label="序列号" align="center" prop="id" />
-        <el-table-column label="统一编码" align="center" prop="ednaValue">
-          <template #default="scope">{{
-            ednaValueConvert(scope.row.ednaValue)
-          }}</template>
-        </el-table-column>
-        <el-table-column label="名称" align="left" prop="chineseText" />
-        <el-table-column
-          label="停机类型"
-          align="center"
-          prop="characteristic"
-        />
-        <el-table-column label="风机型号" align="center" prop="modelId" />
-        <el-table-column label="报警类型" align="center" prop="warningTypeId" />
-        <el-table-column label="故障编码" align="center" prop="faultCode" />
-        <el-table-column label="报警级别" align="center" prop="levelId">
-          <template #default="scope">{{
-            levelIdConvert(scope.row.levelId)
-          }}</template>
-        </el-table-column>
-        <el-table-column
-          label="报警分类"
-          align="center"
-          prop="warningClassIfyId"
-          min-width="50"
-        >
-          <template #default="scope">{{
-            warningClassIfyIdConvert(scope.row.warningClassIfyId)
-          }}</template>
-        </el-table-column>
-        <el-table-column
-          label="是否可以复位"
-          align="center"
-          prop="isreset"
-          min-width="50"
-        >
-          <template #default="scope">{{
-            isresetConvert(scope.row.isreset)
-          }}</template>
-        </el-table-column>
-        <el-table-column
-          label="是否展示"
-          align="center"
-          prop="display"
-          min-width="50"
-        >
-          <template #default="scope">{{
-            displayConvert(scope.row.display)
-          }}</template>
-        </el-table-column>
-        <el-table-column
-          label="关联部件"
-          align="center"
-          prop="relatedParts"
-          min-width="50"
-        >
-          <template #default="scope">
-            <span>{{ relatePartConvert(scope.row.relatedParts) }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center" width="100">
-          <template #default="scope">
-            <el-button
-              type="primary"
-              plain
-              round
-              size="mini"
-              icon="el-icon-lx-edit"
-              @click="btnEditClickHandle(scope.$index, scope.row)"
-            >
-              编辑</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination">
-        <el-pagination
-          background
-          layout="total, prev, pager, next"
-          :current-page="currentPage"
-          :page-size="pageSize"
-          :total="total"
-          @current-change="handleCurrentChange"
-        ></el-pagination>
-      </div>
-    </div>
-    <Editform
-      :isVisible="editVisible"
-      @rVisible="rVisible"
-      :isEdit="isEdit"
-      :rowData="rowData"
-    />
-    <!-- 导入对话框 -->
-    <BatchInput
-      :isShow="exportShow"
-      @epVisibleCB="epVisibleCB"
-      :pThead="thead"
-    />
-  </div>
-</template>
-<script>
-import Editform from "./component/edit_form.vue";
-import {
-  windturbinebj_fetchTableData,
-  equipmentmodel_list,
-} from "/@/api/api.js";
-import BatchInput from "./component/BatchImport.vue";
-import { export_json_to_excel } from "/@/assets/excel/Export2Excel"; //引入文件
-const creator = [
-  {
-    id: "HFYG_CS",
-    name: "合肥阳光电源有限公司",
-    country: "中国",
-    place: "合肥",
-  },
-  { id: "AMS_CS", name: "艾默生", country: "", place: "" },
-  { id: "NRJD_CS", name: "国电南瑞吉电新能源", country: "中国", place: "" },
-  { id: "MGSK_CS", name: "美国赛康", country: "美国", place: "" },
-  { id: "LHDL_CS", name: "联合动力", country: "中国", place: "保定" },
-  { id: "SYHC_CS", name: "沈阳华创", country: "中国", place: "沈阳" },
-];
-const LEVELID = [
-  { id: "ZC_BJ", name: "运转正常" },
-  { id: "YJ_BJ", name: "运转状态超出标准范围" },
-  { id: "GZ_BJ", name: "非正常停止运转" },
-  { id: "WH_BJ", name: "停机维护" },
-  { id: "XD_BJ", name: "限电/计划停机" },
-];
-const warningTypeId = [
-  "转子刹车类故障",
-  "齿轮箱类故障",
-  "总故障",
-  "机舱振动类故障",
-  "未知",
-  "变频器类故障",
-  "液压类故障",
-  "偏航系统类故障",
-  "发电机类故障",
-  "箱变类故障",
-  "电网监测类故障",
-  "柜体冷却类故障",
-  "柜体加热类故障",
-  "UPS电源类故障",
-  "Profibus类故障",
-];
-const tHeader = [
-  "id",
-  "报警级别(ZC_BJ:运转正常;YJ_BJ:运转状态超出标准范围;GZ_BJ:非正常停止运转;WH_BJ:停机维护;XD_BJ:限电/计划停机)",
-  "制造商(HFYG_CS:合肥阳光电源有限公司;AMS_CS:艾默生;NRJD_CS:国电南瑞吉电新能源;MGSK_CS:美国赛康;LHDL_CS:联合动力;SYHC_CS:沈阳华创)",
-  "名称",
-  "上一级节点",
-  "是否有子节点",
-  "序列号",
-  "类别 :正常停机,正常启动,快速停机,紧急停机",
-  "风机型号",
-  "全部默认为1",
-  "统一编码",
-  "是否展示(0:是;1:否)",
-  "报警分类(bj:变桨;bpq:变频器;clx:齿轮箱;fdj:发电机;hh:滑环;jcjr:机舱加热;lq:冷却;ph:偏航;rh:润滑;yy:液压;zz:主轴;other:其它;kz:控制;yl:叶轮;jc:机舱;xb:箱变;dw:电网;td:塔底;fsy:风速仪)",
-  "消缺规定时间",
-  "是否可以复位(0:是;1:否)",
-  "报警类型编号",
-  "故障编码",
-  "关联部件",
-];
-export default {
-  components: {
-    Editform,
-    BatchInput,
-  },
-  data() {
-    return {
-      editVisible: false,
-      tableData: [],
-      currentPage: 0,
-      pageSize: 0,
-      total: 0,
-      query: {
-        stationId: "",
-        pagenum: 1,
-        pagesize: 20,
-        name: "",
-        modelId: "",
-      },
-      exportShow: false,
-      windturbine: [],
-      rowData: {},
-      thead: {
-        id: "id",
-        "报警级别(ZC_BJ:运转正常;YJ_BJ:运转状态超出标准范围;GZ_BJ:非正常停止运转;WH_BJ:停机维护;XD_BJ:限电/计划停机)":
-          "levelId",
-        "制造商(HFYG_CS:合肥阳光电源有限公司;AMS_CS:艾默生;NRJD_CS:国电南瑞吉电新能源;MGSK_CS:美国赛康;LHDL_CS:联合动力;SYHC_CS:沈阳华创)":
-          "manufacturerCode",
-        名称: "chineseText",
-        上一级节点: "parentId",
-        是否有子节点: "isleaf",
-        序列号: "sequenceNumber",
-        "类别 :正常停机,正常启动,快速停机,紧急停机": "characteristic",
-        风机型号: "modelId",
-        全部默认为1: "codeName",
-        统一编码: "ednaValue",
-        "是否展示(0:是;1:否)": "display",
-        "报警分类(bj:变桨;bpq:变频器;clx:齿轮箱;fdj:发电机;hh:滑环;jcjr:机舱加热;lq:冷却;ph:偏航;rh:润滑;yy:液压;zz:主轴;other:其它;kz:控制;yl:叶轮;jc:机舱;xb:箱变;dw:电网;td:塔底;fsy:风速仪)":
-          "warningClassIfyId",
-        消缺规定时间: "standardTime",
-        "是否可以复位(0:是;1:否)": "isreset",
-        报警类型编号: "warningTypeId",
-        故障编码: "faultCode",
-        关联部件: "relatedParts",
-      },
-      isEdit: false,
-      modelList: [],
-    };
-  },
-  methods: {
-    async changeStation() {
-      this.query.modelId =''
-      await this.getequipmentmodel_list();
-      this.getData()
-    },
-    // 机型
-    async getequipmentmodel_list() {
-      const res = await equipmentmodel_list(this.query.stationId);
-      console.warn(res);
-      if (res.equipmentmodel == null) {
-        res.equipmentmodel = [];
-        res.modelList.forEach((e) => {
-          res.equipmentmodel.push({ code: e });
-        });
-      }
-      this.modelList = res.equipmentmodel;
-    },
-    rVisible(val) {
-      this.editVisible = val;
-    },
-    getData() {
-      windturbinebj_fetchTableData(this.query).then((res) => {
-        if (res.status != null && res.status == 521) {
-          this.$message.error("登陆过期");
-          this.$router.push("/login");
-          return;
-        }
-
-        this.tableData = res.records;
-        this.total = res.total;
-        this.pageSize = res.size;
-        this.currentPage = res.current;
-      });
-    },
-    handleCurrentChange(val) {
-      //   this.$set(this.query, "pagenum", val);
-      this.query.pagenum = val;
-      this.getData();
-    },
-    // 批量导出
-    export2Excel() {
-      // const tHeader = ['场站', '测点', '描述', '报警类型', '报警级别', '报警逻辑', '是否可用'];
-      // 上面设置Excel的表格第一行的标题
-      const filterVal = [
-        "id",
-        "levelId",
-        "manufacturerCode",
-        "chineseText",
-        "parentId",
-        "isleaf",
-        "sequenceNumber",
-        "characteristic",
-        "modelId",
-        "codeName",
-        "ednaValue",
-        "display",
-        "warningClassIfyId",
-        "standardTime",
-        "isreset",
-        "warningTypeId",
-        "faultCode",
-        "relatedParts",
-      ];
-      // 上面的index、phone_Num、school_Name是tableData里对象的属性
-      let params = {
-        pagenum: 1,
-        pagesize: 10000,
-        name: this.query.name,
-        modelId: this.query.modelId,
-      };
-      let list = [];
-      let that = this;
-      //把data存到list
-      function exportDone() {
-        let isExport = false;
-        new Promise((resolve, reject) => {
-          let list = windturbinebj_fetchTableData(params);
-          resolve(list);
-        })
-          .then((res) => {
-            res.records.forEach((i) => {
-              if (typeof i.id === "object") {
-                i.id = i.id.c[0].toString() + i.id.c[1].toString();
-              }
-            });
-            return new Promise((resolve, reject) => {
-              resolve(res);
-            });
-          })
-          .then((val) => {
-            list.push.apply(list, val.records);
-            if (Math.ceil(val.total / params.pagesize) > params.pagenum) {
-              params.pagenum += 1;
-              return exportDone();
-            } else {
-              return new Promise((resolve, reject) => {
-                isExport = true;
-                resolve();
-              });
-            }
-          })
-          .then(() => {
-            if (isExport) {
-              const data = that.formatJson(filterVal, list);
-              export_json_to_excel(tHeader, data, "风机报警(导出)");
-              that.$message.success("导出完成");
-              isExport = false;
-            }
-          })
-          .catch((err) => {
-            console.log(err);
-            that.$message.error("导出错误");
-          });
-      }
-      exportDone();
-    },
-    formatJson(filterVal, jsonData) {
-      return jsonData.map((v) => filterVal.map((j) => v[j]));
-    },
-    // 模板下载
-    outExe: function () {
-      const data = [];
-      export_json_to_excel(tHeader, data, "风机报警模板");
-    },
-    // 批量导入对话框的显隐
-    epVisibleCB(val) {
-      this.exportShow = val;
-    },
-    // 编辑按钮点击事件
-    btnEditClickHandle(index, row) {
-      console.warn(row);
-      this.rowData = this.deepClone(row);
-      this.isEdit = true;
-      this.editVisible = true;
-    },
-    // 搜索按钮点击事件
-    btnQueryClickHandle() {
-      this.getData();
-    },
-    // 新增点击事件
-    btnInsertClickHandle() {
-      this.isEdit = false;
-      this.editVisible = true;
-    },
-    deepClone(obj) {
-      let _obj = JSON.stringify(obj),
-        objClone = JSON.parse(_obj);
-      return objClone;
-    },
-    // 制造商
-    manufacturerCodeConvert(val) {
-      switch (val) {
-        case "HFYG_CS":
-          return "合肥阳光电源有限公司";
-          break;
-        case "AMS_CS":
-          return "艾默生";
-          break;
-        case "NRJD_CS":
-          return "国电南瑞吉电新能源";
-          break;
-        case "MGSK_CS":
-          return "美国赛康";
-          break;
-        case "LHDL_CS":
-          return "联合动力";
-          break;
-        case "SYHC_CS":
-          return "沈阳华创";
-          break;
-        default:
-          return;
-      }
-    },
-    // 报警级别
-    levelIdConvert(val) {
-      switch (val) {
-        case "ZC_BJ":
-          return "运转正常";
-          break;
-        case "YJ_BJ":
-          return "运转状态超出标准范围";
-          break;
-        case "GZ_BJ":
-          return "非正常停止运转";
-          break;
-        case "WH_BJ":
-          return "停机维护";
-          break;
-        case "XD_BJ":
-          return "限电/计划停机";
-          break;
-        default:
-          return;
-      }
-    },
-    // 报警分类
-    warningClassIfyIdConvert(val) {
-      switch (val) {
-        case "bj":
-          return "变桨";
-          break;
-        case "bpq":
-          return "变频器";
-          break;
-        case "clx":
-          return "齿轮箱";
-          break;
-        case "fdj":
-          return "发电机";
-          break;
-        case "hh":
-          return "滑环";
-          break;
-        case "jcjr":
-          return "机舱加热";
-          break;
-        case "lq":
-          return "冷却";
-          break;
-        case "ph":
-          return "偏航";
-          break;
-        case "rh":
-          return "润滑";
-          break;
-        case "yy":
-          return "液压";
-          break;
-        case "zz":
-          return "主轴";
-          break;
-        case "other":
-          return "其它";
-          break;
-        case "kz":
-          return "控制";
-          break;
-        case "yl":
-          return "叶轮";
-          break;
-        case "jc":
-          return "机舱";
-          break;
-        case "xb":
-          return "箱变";
-          break;
-        case "dw":
-          return "电网";
-          break;
-        case "td":
-          return "塔底";
-          break;
-        case "fsy":
-          return "风速仪";
-          break;
-      }
-    },
-    // 是否可以复位
-    isresetConvert(val) {
-      switch (val) {
-        case 0:
-          return "是";
-          break;
-        case 1:
-          return "否";
-          break;
-      }
-    },
-    // 是否展示
-    displayConvert(val) {
-      switch (val) {
-        case 0:
-          return "是";
-          break;
-        case 1:
-          return "否";
-          break;
-      }
-    },
-    // 统一编码
-    ednaValueConvert(val) {
-      if (val === 0) {
-        return "";
-      } else if (val < 100 && val > 0) {
-        return "DI0" + val;
-      } else if (val > 100) {
-        return "DI" + val;
-      }
-    },
-    // 关联部件
-    relatePartConvert(val) {
-      switch (val) {
-        case "YP":
-          return "叶片";
-          break;
-        case "LG":
-          return "轮毂";
-          break;
-        case "TZ":
-          return "塔架";
-          break;
-        case "JC":
-          return "机舱";
-          break;
-        case "KZXT":
-          return "控制系统";
-          break;
-        case "BJXT":
-          return "变桨系统";
-          break;
-        case "PHXT":
-          return "偏航系统";
-          break;
-        case "CLX":
-          return "齿轮箱";
-          break;
-        case "FDJ":
-          return "发电机";
-          return;
-        case "BPQ":
-          return "变频器";
-          return;
-        case "YYXT":
-          return "液压系统";
-          break;
-        case "FZXT":
-          return "辅助系统";
-          break;
-        case "CFXT":
-          return "测风系统";
-          break;
-        case "DWXT":
-          return "电网系统";
-          break;
-        case "TDG":
-          return "塔底柜";
-          break;
-        case "CDL":
-          return "传动链";
-          break;
-        case "QT":
-          return "其他";
-          break;
-        default:
-          break;
-      }
-    },
-  },
-
-  computed: {
-    stationList() {
-      return this.$store.state.stationList;
-    },
-    isStation() {
-      return this.$store.getters.isStation;
-    },
-  },
-  created() {
-    this.getData();
-    this.getequipmentmodel_list();
-  },
-};
-</script>
-<style scoped>
-.mb10 {
-  margin-bottom: 10px;
-}
-.mr10 {
-  margin-right: 10px;
-}
-.row-box {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-}
-</style>

+ 3 - 3
src/pages/dataFilter/prepare/index.vue

@@ -8,9 +8,9 @@ import { onMounted, ref, onActivated } from 'vue'
 import request from '@/api/axios.js'
 import {baseURL, socketURL} from '@/api/axios.js'
 /**配置参数 */
-const treeHeight = ref('81vh') //tree高度
-const excelHeight = ref('81vh') //excel高度
-const tableHeight = ref('81vh')
+const treeHeight = ref(window.innerHeight - 200 + 'px') //tree高度
+const excelHeight = ref(window.innerHeight - 200 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 200 + 'px')
 /**excel 开始 */
 const excelList = ref([])
 const funExcelChange = async (obj) => { //点击excel项时

+ 3 - 3
src/pages/dataFilter/process/index.vue

@@ -8,9 +8,9 @@ import request from '@/api/axios.js'
 import {baseURL} from '@/api/axios.js'
 import { ElMessage } from 'element-plus'
 /**配置参数 */
-const treeHeight = ref('40vh') //tree高度
-const excelHeight = ref('81vh') //excel高度
-const tableHeight = ref('81vh')
+const treeHeight = ref((window.innerHeight - 210) / 2  + 'px') //tree高度
+const excelHeight = ref(window.innerHeight - 200 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 200 + 'px')
 /**excel 开始 */
 const excelCheckboxShow = ref(false)
 const excelCheckIds = ref([])

+ 43 - 31
src/router/index.js

@@ -47,27 +47,15 @@ const routes = [{
                             '../pages/dataFilter/process/index.vue'
                         ),
                 },
-                {
-                    icon: 'el-icon-s-home',
-                    path: '/dataFilter/combine',
-                    name: 'dataFilterCombine',
-                    meta: {
-                        title: '功率曲线拟合',
-                    },
-                    component: () =>
-                        import(
-                            '../pages/dataFilter/combine/index.vue'
-                        ),
-                },
             ]
         },
         {
             icon: 'iconfont iconbaojingpeizhi',
-            path: '/curveDeviation',
-            name: 'curveDeviation',
-            redirect: '/curveDeviation/rateAnalysis',
+            path: '/dataAnalysis',
+            name: 'dataAnalysis',
+            redirect: '/dataAnalysis/combine',
             meta: {
-                title: '曲线偏差率分析',
+                title: '数据分析',
             },
             component: () =>
                 import(
@@ -76,14 +64,38 @@ const routes = [{
             children: [
                 {
                     icon: 'el-icon-s-home',
-                    path: '/curveDeviation/rateAnalysis',
-                    name: 'curveDeviationRateAnalysis',
+                    path: '/dataAnalysis/combine',
+                    name: 'dataAnalysis',
+                    meta: {
+                        title: '功率曲线拟合分析',
+                    },
+                    component: () =>
+                        import(
+                            '../pages/dataAnalysis/combine/index.vue'
+                        ),
+                },
+                {
+                    icon: 'el-icon-s-home',
+                    path: '/dataAnalysis/rateAnalysis',
+                    name: 'dataAnalysisRateAnalysis',
+                    meta: {
+                        title: '风资源分析',
+                    },
+                    component: () =>
+                        import(
+                            '../pages/dataAnalysis/rateAnalysis/index.vue'
+                        ),
+                },
+                {
+                    icon: 'el-icon-s-home',
+                    path: '/dataAnalysis/lineAnalysis',
+                    name: 'dataAnalysislineAnalysis',
                     meta: {
                         title: '曲线偏差率分析',
                     },
                     component: () =>
                         import(
-                            '../pages/curveDeviation/rateAnalysis/index.vue'
+                            '../pages/dataAnalysis/lineAnalysis/index.vue'
                         ),
                 },
             ]
@@ -91,18 +103,18 @@ const routes = [{
     ],
 },
 
-{
-    path: '/login',
-    name: 'Login',
-    meta: {
-        title: '登录',
-    },
-    component: () =>
-        import(
-            /* webpackChunkName: "login" */
-            '../pages/Login.vue'
-        ),
-},
+// {
+//     path: '/login',
+//     name: 'Login',
+//     meta: {
+//         title: '登录',
+//     },
+//     component: () =>
+//         import(
+//             /* webpackChunkName: "login" */
+//             '../pages/Login.vue'
+//         ),
+// },
 ]
 
 const router = createRouter({