<template> <div class="extractionAnalysis"> <n-radio-group v-model:value="selectedValue" size="small"> <n-radio-button v-for="v in tongdaoList" :key="v.value" :value="v.value"> {{ v.label }} </n-radio-button> </n-radio-group> <ul class="detailed"> <li v-for="(item, i) in detailedList" :key="i"> <div class="left"> <img src="../../../../assets/Imgs/fangxunMap/extraction_icon.png" alt="" /> </div> <div class="right"> <span class="value" :class=" item.id == 7 || item.id == 8 ? 'red seven' : '' || item.id == 5 ? 'font14' : '' || item.id == 3 ? 'green' : '' " >{{ item.value }}</span > <span class="name">{{ item.name }}</span> </div> </li> </ul> <img class="big_img" src="../../../../assets/Imgs/weixiufenxi1.png" alt="" /> <div class="big_btn">计划排班16人,实际到岗18人,换班1人</div> <div class="table_box"> <n-data-table ref="tableRef" size="small" :bordered="false" :max-height="170" :columns="columns" :data="data" ></n-data-table> </div> </div> </template> <script> import { reactive, toRefs, onMounted } from "vue"; export default { name: "extractionAnalysis", setup() { const state = reactive({ selectedValue: 0, tongdaoList: [ { label: "后湖二期泵站", value: 0 }, { label: "铁路桥泵站", value: 1 }, { label: "机场河补水泵站", value: 2 }, ], detailedList: [ { name: "启抽水位", value: "86.63m", id: 0 }, { name: "停抽水位", value: " 85.11m", id: 1 }, { name: "当前水位", value: "86.55m", id: 2 }, { name: "状 态", value: "运行中", id: 3 }, { name: "防汛指令", value: "已发送", id: 4 }, { name: "提醒人员", value: "张三(值)赵武(站)", id: 5 }, { name: "当前开启", value: "2泵机", id: 6 }, { name: "状况分析", value: "未接受平台 分析建议", id: 7 }, { name: "状况分析", value: "未按分析..", id: 8 }, ], // 表格相关 columns: [ { title: "泵闸排班", key: "pump", align: "center", width: "150", }, { title: "当前排班", key: "current", align: "center", }, { title: "下次排班", key: "next", align: "center", }, { title: "站长", key: "stationmaster", align: "center", }, { title: "签到", key: "sign", align: "center", }, ], data: [], }); //获取降雨表格数据 const getTableData = () => { state.data = Array.apply(null, { length: 10 }).map((v, j) => ({ pump: "后湖二期泵站", current: "张三", next: "李四", stationmaster: "周站", sign: "是", })); }; onMounted(() => { getTableData(); }); return { ...toRefs(state), getTableData, }; }, }; </script> <style lang='less' scoped> .extractionAnalysis { padding: 10px; .detailed { margin: 10px 0; display: flex; flex-direction: row; flex-wrap: wrap; li { margin: 3px 13px; width: 170px; height: 63px; background: var(--color-odd); box-shadow: 0px 4px 10px 0px rgba(135, 180, 237, 0.35); border-radius: 2px; display: flex; justify-content: space-around; align-items: center; } .left { width: 44px; height: 44px; background: linear-gradient(0deg, #3d8cf1, #6db4ff); border-radius: 50%; display: flex; justify-content: center; align-items: center; } .right { display: flex; flex-direction: column; .value { width: 60px; font-size: 16px; font-family: DIN; font-weight: bold; color: #3c8ff0; overflow: hidden; text-overflow: ellipsis; } .name { font-size: 14px; font-family: Source Han Sans CN; color: #6b84a0; } .seven { font-size: 12px; } .red { color: #ef4c7a; text-align: center; } .green { color: #5BC056; } .font14 { font-size: 14px; } } } .big_img { width: 100%; height: 220px; } .big_btn { width: 100%; line-height: 42px; background: linear-gradient(0deg, #ffffff 0%, #4290f2 0%, #69b0fe 100%); border-radius: 5px; font-size: 12px; font-family: Source Han Sans CN; color: #fafbfd; text-align: center; } .table_box { margin-top: 20px; } } ::v-deep(.n-data-table-td) { background: var(--bg-menu); } ::v-deep(.n-data-table-table) { background: var(--bg-menu); } ::v-deep(.n-data-table-thead){ background: var(--bg-menu); } ::v-deep(.n-data-table-th){ background: var( --color-odd); } </style>