|
@@ -10,7 +10,12 @@
|
|
|
style="width: 100px"
|
|
|
placeholder="全部"
|
|
|
popper-class="select"
|
|
|
- @change="typechange"
|
|
|
+ @change="
|
|
|
+ () => {
|
|
|
+ getStationList();
|
|
|
+ typechange();
|
|
|
+ }
|
|
|
+ "
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in state.typeList"
|
|
@@ -181,7 +186,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { watch, reactive, nextTick, computed, onMounted } from "vue";
|
|
|
+import { watch, reactive, nextTick, computed, onMounted, ref } from "vue";
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
import dayjs from "dayjs";
|
|
|
import {
|
|
@@ -190,6 +195,7 @@ import {
|
|
|
fetchWindturbineList,
|
|
|
fetchModel,
|
|
|
fetchRelatePartAndAlarmType,
|
|
|
+ getWpList,
|
|
|
} from "/@/api/api.js";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import { initWebSocket } from "/@/websocket/indextest";
|
|
@@ -201,14 +207,15 @@ const isStation = computed(() => store.getters.isStation);
|
|
|
const route = useRoute();
|
|
|
|
|
|
onMounted(() => {
|
|
|
- getequipmentmodel_list();
|
|
|
- getfetchRelatePart();
|
|
|
state.dateTime = [
|
|
|
dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
|
|
|
dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
|
];
|
|
|
state.deviceId = route.params.deviceId || "";
|
|
|
state.alarmId = route.params.alarmId || "";
|
|
|
+ getStationList();
|
|
|
+ getequipmentmodel_list();
|
|
|
+ getfetchRelatePart();
|
|
|
});
|
|
|
// 机型
|
|
|
const getequipmentmodel_list = async () => {
|
|
@@ -235,7 +242,7 @@ const state = reactive({
|
|
|
value: "windturbine",
|
|
|
},
|
|
|
{
|
|
|
- label: "逆变器",
|
|
|
+ label: "光伏",
|
|
|
value: "inverter",
|
|
|
},
|
|
|
],
|
|
@@ -255,36 +262,37 @@ const state = reactive({
|
|
|
tableData: [],
|
|
|
isshowwindturbineName: true,
|
|
|
tableHeader: [
|
|
|
- { title: "时间", code: "ts", width: "180" },
|
|
|
- { title: "场站", code: "stationname", width: "180" },
|
|
|
- { title: "机组", code: "devicename", width: "180" },
|
|
|
- { title: "故障编码", code: "nemCode" },
|
|
|
+ { title: "时间", code: "ts", width: "150" },
|
|
|
+ { title: "场站", code: "stationname", width: "150" },
|
|
|
+ { title: "机组", code: "devicename", width: "150" },
|
|
|
+ { title: "故障编码", code: "nemCode", width: "100" },
|
|
|
{ title: "故障原因", code: "faultCause" },
|
|
|
{ title: "故障解决方法", code: "resolvent" },
|
|
|
- { title: "报警信息", code: "description" },
|
|
|
+ { title: "报警信息", code: "description", width: "180" },
|
|
|
{ title: "级别", code: "rank", width: "80" },
|
|
|
{ title: "类型", code: "alarmtype", width: "80" },
|
|
|
],
|
|
|
tableHeader1: [
|
|
|
- { title: "时间", code: "ts", width: "180" },
|
|
|
- { title: "升压站", code: "stationname", width: "180" },
|
|
|
- { title: "报警信息", code: "description" },
|
|
|
+ { title: "时间", code: "ts", width: "150" },
|
|
|
+ { title: "升压站", code: "stationname", width: "150" },
|
|
|
+ { title: "报警信息", code: "description", width: "180" },
|
|
|
{ title: "级别", code: "rank", width: "80" },
|
|
|
{ title: "类型", code: "alarmtype", width: "80" },
|
|
|
],
|
|
|
});
|
|
|
// 场站列表/升压站列表
|
|
|
-const stationList = computed(() => {
|
|
|
- if (state.typeVal == "windturbine") {
|
|
|
- return store.state.stationListAll;
|
|
|
- } else if (state.typeVal == "booststation") {
|
|
|
- return store.state.booststationList;
|
|
|
- }
|
|
|
-});
|
|
|
+const stationList = ref([]);
|
|
|
+
|
|
|
+const getStationList = async () => {
|
|
|
+ const { data } = await getWpList(state.typeVal);
|
|
|
+ console.log(1111, data);
|
|
|
+ stationList.value = data;
|
|
|
+};
|
|
|
+
|
|
|
watch(
|
|
|
() => stationList,
|
|
|
(val, old) => {
|
|
|
- val.value.length &&
|
|
|
+ val?.value?.length &&
|
|
|
nextTick(async () => {
|
|
|
state.stationId = val.value[0]?.id;
|
|
|
await getWindturbineList();
|