123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881 |
- <template>
- <div style="width: 100%; height: 100%">
- <el-row type="flex" justify="space-between">
- <div class="handle-box" style="margin-bottom: 10px">
- <el-button size="mini" round class="buttons" @click="handleInsert">
- 新增记录
- </el-button>
- <el-button size="mini" round class="buttons" @click="export2Excel">
- 批量导出</el-button
- >
- <el-button size="mini" round class="buttons" @click="outExe">
- 模板下载</el-button
- >
- <el-upload
- style="display: inline; margin-left: 10px"
- action="/sharding/warning2/import"
- :headers="token"
- :show-file-list="false"
- :on-success="handleSuccess"
- :on-progress="handleProgress"
- :on-error="handleError"
- >
- <el-button
- size="mini"
- round
- class="buttons"
- @click="exportShow = true"
- >
- 批量导入</el-button
- >
- </el-upload>
- </div>
- <div style="display: flex; flex-direction: row; margin-bottom: 10px">
- <el-select
- v-if="isStation"
- v-model="query.stationId"
- clearable
- size="mini"
- 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
- size="mini"
- style="width: 150px"
- placeholder="全部机型"
- popper-class="select"
- >
- <el-option
- v-for="item in state.modelList"
- :key="item"
- :value="item"
- :label="item"
- ></el-option>
- </el-select>
- <el-input
- placeholder="请输入名称"
- v-model="query.name"
- style="width: 150px; margin-right: 10px"
- size="mini"
- clearable
- ></el-input>
- <el-button
- icon="Search"
- size="mini"
- round
- class="buttons"
- @click="getData"
- >搜索</el-button
- >
- </div>
- </el-row>
- <div class="wind-table">
- <el-table
- :data="state.tableData"
- size="mini"
- style="width: 100%; height: calc(100% - 65px)"
- stripe
- >
- <el-table-column
- v-for="item in state.tableHeader"
- :key="item.id"
- :prop="item.prop"
- :label="item.label"
- :align="item.align"
- header-align="center"
- :width="item.width"
- :min-width="item.minWidth"
- show-overflow-tooltip
- >
- <template #default="{ row }">
- <span v-if="item.prop == 'rank'">
- {{ levelIdConvert(row.rank) }}</span
- >
- <span v-else-if="item.prop == 'deviceType'">
- {{ warningClassIfyIdConvert(row.deviceType) }}</span
- >
- <span v-else-if="item.prop == 'resetTable'">
- {{ row.resetTable ? "是" : "否" }}</span
- >
- <span v-else-if="item.prop == 'enabled'">
- {{ row.enabled == 1 ? "是" : "否" }}</span
- >
- <span v-else>{{ row[item.prop] ? row[item.prop] : "--" }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="100">
- <template #default="scope">
- <el-button
- type="text"
- :style="`color: ${
- $store.state.theme ? '#1890ff' : '#47aee7'
- } !important`"
- icon="el-icon-lx-edit"
- @click="handleEditClick(scope.row)"
- >
- 编辑</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <div class="pagination">
- <el-pagination
- layout="total, sizes, prev, pager, next"
- :page-sizes="[19, 50, 100, 200, 500]"
- @size-change="
- (value) => {
- query.pageSize = value;
- query.pageNum = 1;
- getData();
- }
- "
- :current-page="query.pageNum"
- :page-size="query.pageSize"
- :total="total"
- @current-change="handlePageChange"
- ></el-pagination>
- </div>
- </div>
- <windturbinecomponents
- @close="dialogclose"
- :isVisible="state.visible"
- :form="state.form"
- />
- </div>
- </template>
- <script setup>
- import {
- windturbinebj_fetchTableData,
- getWtModel,
- getWpList,
- } from "@/api/zhbj/index.js";
- import { outExportExcel } from "@/tools/excel/exportExcel.js"; //引入文件
- import { ref, onMounted, provide, computed, reactive, watch } from "vue";
- import { useStore } from "vuex";
- import { ElMessageBox, ElMessage } from "element-plus";
- import windturbinecomponents from "./windturbine_components.vue";
- const token = { token: sessionStorage.getItem("token") };
- const store = useStore();
- const stationList = ref([]);
- const getStationList = async () => {
- const { data } = await getWpList("windturbine");
- stationList.value = data || [];
- };
- const isStation = computed(() => stationList.value.length);
- const state = reactive({
- tableData: [
- {
- id: "001047",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS001DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00001",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "220kV总圣线231测控231断路器合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001048",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS002DB0111SW02RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00002",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "220kV总圣线231测控231-A刀闸合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001049",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS003DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00003",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "220kV总圣线231测控231-1刀闸合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001050",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS004DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00004",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "220kV总圣线231测控231-A0地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001051",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS005DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00005",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "220kV总圣线231测控231-10地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001052",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS006DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00006",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "220kV总圣线231测控231-线0地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001053",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS006DB0111SW09RAW00",
- triggerType: 1,
- deviceId: null,
- suffix: null,
- rank: 5,
- uniformCode: "DI00007",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "复合信号虚装置全站事故总",
- characteristic: "事故",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001054",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS007DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00008",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#变压器高压侧201测控201断路器合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001055",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS008DB0111SW02RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00009",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#变压器高压侧201测控201-A刀闸合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001056",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS009DB0111SW02RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00010",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#变压器高压侧201测控201-1刀闸合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001057",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS010DB0111SW05RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00011",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#变压器高压侧201测控201-A0地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001058",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS011DB0111SW04RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00012",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#变压器高压侧201测控201-10地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001059",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS012DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00013",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#变压器高压侧201测控201-变0地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001060",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS013DB0111SW03RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00014",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#变压器高压侧201测控1#主变2010地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001061",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS014DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00015",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#主变35kV侧301进线断路器合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001062",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS015DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00016",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "1#主变35kV侧301进线手车工作位置",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001063",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS016DB0111SW11RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00017",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "2#变压器高压侧202测控202断路器合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001064",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS018DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00018",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "2#变压器高压侧202测控202-1刀闸合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- {
- id: "001065",
- tagId: "FD-DJY-YuanDong.140623F0221MDQ02GS019DB0111SW01RAW00",
- triggerType: -1,
- deviceId: null,
- suffix: null,
- rank: 4,
- uniformCode: "DI00019",
- stationId: "SXJ_KGDL_DJYF01_SBS",
- modelId: null,
- alarmType: "booststation",
- deviceType: "booststation",
- components: null,
- subcomponents: null,
- description: "2#变压器高压侧202测控202-A0地刀合位",
- characteristic: "动作",
- resetTable: false,
- enable: true,
- name: null,
- nemCode: null,
- faultCause: null,
- resolvent: null,
- stationName: "丁家窑风电场",
- componentsName: null,
- },
- ],
- modelList: [],
- visible: false,
- form: {},
- tableHeader: [
- { label: "序列号", prop: "id", align: "center" },
- { label: "统一编码", prop: "uniformCode", align: "center" },
- { label: "描述", prop: "description", align: "left", width: 180 },
- { label: "停机类型", prop: "characteristic", align: "center" },
- { label: "风机型号", prop: "modelId", align: "center" },
- { label: "报警类型", prop: "alarmTypeName", align: "center" },
- { label: "故障编码", prop: "nemCode", align: "center" },
- { label: "报警级别", prop: "rank", align: "center" },
- { label: "报警分类", prop: "deviceType", align: "center", minWidth: 50 },
- {
- label: "是否可以复位",
- prop: "resetTable",
- align: "center",
- minWidth: 50,
- },
- { label: "是否启用", prop: "enabled", align: "center", minWidth: 50 },
- {
- label: "关联部件",
- prop: "componentsName",
- align: "center",
- minWidth: 50,
- },
- ],
- });
- const query = reactive({
- pageNum: 1,
- pageSize: 19,
- stationId: "",
- modelId: "",
- name: "",
- });
- let total = ref(0);
- onMounted(() => {
- // getStationList();
- // getData();
- // getequipmentmodel_list();
- });
- const dialogclose = () => {
- state.visible = false;
- getData();
- };
- const getData = async () => {
- const { data } = await windturbinebj_fetchTableData(query);
- data.records.forEach((ele) => {
- ele.alarmTypeName = warningClassIfyIdConvert(ele.alarmType);
- });
- state.tableData = data.records;
- total.value = data.total;
- };
- const handleInsert = () => {
- state.visible = true;
- };
- const handleEditClick = (row) => {
- console.warn(row);
- let obj = Object.assign({}, row);
- state.form = obj;
- state.visible = true;
- };
- //changeStation
- const changeStation = async () => {
- query.modelId = "";
- await getequipmentmodel_list();
- };
- // 机型
- const getequipmentmodel_list = async () => {
- const { data } = await getWtModel(query.stationId);
- state.modelList = data || [];
- };
- // 分页导航
- const handlePageChange = (val) => {
- query.pageNum = val;
- getData();
- };
- const tableHeader = [
- "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:否)",
- "报警类型编号",
- "故障编码",
- "关联部件",
- ];
- const tableKey = [
- "id",
- "levelId",
- "manufacturerCode",
- "chineseText",
- "parentId",
- "isleaf",
- "sequenceNumber",
- "characteristic",
- "modelId",
- "codeName",
- "ednaValue",
- "display",
- "warningClassIfyId",
- "standardTime",
- "isreset",
- "warningTypeId",
- "faultCode",
- "relatedParts",
- ];
- // 批量导出
- const export2Excel = async () => {
- const res = await windturbinebj_fetchTableData({
- ...query,
- pageNum: 1,
- pageSize: 999999,
- });
- outExportExcel(
- state.tableHeader.map((item) => item.label),
- state.tableHeader.map((item) => item.prop),
- res.data.records.map((item) => {
- return {
- ...item,
- rank: levelIdConvert(item.rank),
- alarmTypeName: warningClassIfyIdConvert(item.alarmType),
- deviceType: warningClassIfyIdConvert(item.deviceType),
- enabled: item.enabled == 1 ? "是" : "否",
- resetTable: item.resetTable ? "是" : "否",
- };
- }),
- "设备报警配置导出excel"
- );
- };
- // 模板下载
- const outExe = () => {
- const data = [];
- ElMessage.success(`导出成功!`);
- outExportExcel(tableHeader, tableKey, data, "风机报警模板");
- };
- // 批量导入
- const handleSuccess = (response, file, fileList) => {
- ElMessage.success("导入成功!");
- getData();
- };
- const handleProgress = (response, file, fileList) => {};
- const handleError = (response, file, fileList) => {
- ElMessage.success("导入失败!");
- };
- // 报警级别
- const levelIdConvert = (val) => {
- switch (val) {
- case 1:
- return "低级";
- case 2:
- return "低中级";
- case 3:
- return "中级";
- case 4:
- return "中高级";
- case 5:
- return "限电/高级";
- default:
- return "";
- }
- };
- // 报警分类
- const warningClassIfyIdConvert = (val) => {
- switch (val) {
- case "interver":
- return "光伏";
- case "windturbine":
- return "风机";
- case "booststation":
- return "升压站";
- default:
- return "";
- }
- };
- // 统一编码
- const ednaValueConvert = (val) => {
- if (val === 0) {
- return "";
- } else if (val < 100 && val > 0) {
- return "DI0" + val;
- } else if (val >= 100) {
- return "DI" + val;
- }
- };
- </script>
- <style scoped lang="less">
- .wind-table {
- height: calc(100% - 40px);
- }
- .buttons {
- background-color: rgba(5, 187, 76, 0.2);
- border: 1px solid #3b6c53;
- color: #b3b3b3;
- font-size: 14px;
- &:hover {
- background-color: rgba(5, 187, 76, 0.5);
- color: #ffffff;
- }
- }
- .el-select ::v-deep {
- margin-right: 10px;
- }
- .el-button + .el-button {
- margin-left: 10px;
- }
- .pagination {
- padding-top: 15px;
- }
- </style>
|