| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965 |
- <template>
- <view class="page report-page maintenance-search-page">
- <z-paging
- ref="paging"
- v-model="dataList"
- class="report-paging"
- :default-page-size="10"
- @query="queryList">
- <view class="report-list">
- <view class="report-card" v-for="item in dataList" :key="item.id">
- <view class="card-header">
- <view class="device-title">
- {{ item.deviceName || "--" }}
- </view>
- <view
- class="distance-tag"
- :class="getDistanceClass(item.mainDistance)">
- {{ formatDistance(item.mainDistance) }}
- </view>
- </view>
- <view class="card-body">
- <view class="field-row">
- <text class="field-label">{{ $t("device.deviceCode") }}</text>
- <text class="field-value">{{ item.deviceCode || "--" }}</text>
- </view>
- <view class="field-row">
- <text class="field-label">{{ $t("ruiDuReport.dept") }}</text>
- <text class="field-value">{{ item.deptName || "--" }}</text>
- </view>
- <view class="field-row">
- <text class="field-label">{{
- $t("workOrder.responsiblePerson")
- }}</text>
- <text class="field-value">{{ item.responsibleNames || "--" }}</text>
- </view>
- <view class="field-row">
- <text class="field-label">{{
- $t("maintenanceSearch.deviceStatus")
- }}</text>
- <text class="field-value">{{
- getDeviceStatusName(item.deviceStatus)
- }}</text>
- </view>
- <view v-if="item.totalRunTime" class="field-row">
- <text class="field-label">{{
- $t("maintenanceSearch.totalRunTime")
- }}</text>
- <text class="field-value">{{ item.totalRunTime }}</text>
- </view>
- <view v-if="item.totalMileage" class="field-row">
- <text class="field-label">{{
- $t("maintenanceSearch.totalMileage")
- }}</text>
- <text class="field-value">{{ item.totalMileage }}</text>
- </view>
- <view v-if="formatMultiAttrs(item)" class="field-row brief-row">
- <text class="field-label">{{
- $t("maintenanceSearch.multiAttrs")
- }}</text>
- <UniTooltip :content="formatMultiAttrs(item)" placement="top">
- <text class="field-value brief-text">{{
- formatMultiAttrs(item)
- }}</text>
- </UniTooltip>
- </view>
- </view>
- <view class="card-footer">
- <view class="status-text">{{ getWorkOrderStatus(item) }}</view>
- <button
- v-if="hasDetailSource(item)"
- class="detail-btn"
- type="primary"
- plain
- @click="openDetail(item)">
- {{ $t("operation.view") }}
- </button>
- </view>
- </view>
- </view>
- </z-paging>
- <UniFab
- :pattern="fabPattern"
- horizontal="right"
- vertical="bottom"
- direction="horizontal"
- :popMenu="false"
- @fabClick="openFilterPopup" />
- <uni-popup
- ref="filterPopup"
- type="bottom"
- background-color="#fff"
- border-radius="10px 10px 0 0">
- <view class="filter-popup">
- <view class="filter-header">
- <text class="filter-action" @click="closeFilterPopup">
- {{ $t("operation.cancel") }}
- </text>
- <text class="filter-title">{{ $t("ruiDuReport.filterTitle") }}</text>
- <text class="filter-action primary" @click="applyFilter">
- {{ $t("operation.confirm") }}
- </text>
- </view>
- <view class="filter-body">
- <view class="filter-item">
- <view class="filter-label">{{
- $t("maintenanceSearch.deviceCode")
- }}</view>
- <uni-easyinput
- v-model="filterForm.deviceCode"
- :inputBorder="false"
- :styles="inputStyles"
- :placeholder="$t('maintenanceSearch.deviceCodePlaceholder')" />
- </view>
- <view class="filter-item">
- <view class="filter-label">{{
- $t("maintenanceSearch.deviceName")
- }}</view>
- <uni-easyinput
- v-model="filterForm.deviceName"
- :inputBorder="false"
- :styles="inputStyles"
- :placeholder="$t('maintenanceSearch.deviceNamePlaceholder')" />
- </view>
- <view class="filter-item dept-item">
- <view class="filter-label">{{ $t("ruiDuReport.dept") }}</view>
- <view class="dept-selected">
- {{ selectedDeptName || $t("operation.PleaseSelect") }}
- </view>
- <view class="tree">
- <DaTree
- :data="treeData"
- labelField="name"
- valueField="id"
- disabledField="disabled"
- defaultExpandAll
- checkedDisabled
- :defaultCheckedKeys="filterForm.deptId"
- @change="handleTreeChange" />
- </view>
- </view>
- </view>
- <view class="filter-footer">
- <button class="filter-button reset" @click="resetFilter">
- {{ $t("inventory.search.reset") }}
- </button>
- <button class="filter-button" type="primary" @click="applyFilter">
- {{ $t("operation.search") }}
- </button>
- </view>
- </view>
- </uni-popup>
- <uni-popup
- ref="detailPopup"
- type="bottom"
- background-color="#fff"
- border-radius="10px 10px 0 0">
- <view class="detail-popup">
- <view class="filter-header">
- <text class="filter-action" @click="closeDetailPopup">
- {{ $t("operation.cancel") }}
- </text>
- <text class="filter-title">{{
- $t("maintenanceSearch.detailTitle")
- }}</text>
- <text class="filter-action primary" @click="closeDetailPopup">
- {{ $t("operation.confirm") }}
- </text>
- </view>
- <view class="detail-device">
- <view class="detail-device-name">{{ detailDevice.deviceName }}</view>
- <view class="detail-device-code">{{ detailDevice.deviceCode }}</view>
- </view>
- <scroll-view scroll-y class="detail-list">
- <view
- class="detail-card"
- v-for="detail in detailList"
- :key="detail.id">
- <view class="detail-name">{{ detail.name || "--" }}</view>
- <view class="detail-grid">
- <view
- v-if="detail.runningTimeRule === 0"
- class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.totalRunTime")
- }}</text>
- <text>{{ detail.totalRunTime ?? detail.tempTotalRunTime ?? "--" }}</text>
- </view>
- <view
- v-if="detail.mileageRule === 0"
- class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.totalMileage")
- }}</text>
- <text>{{ detail.totalMileage ?? detail.tempTotalMileage ?? "--" }}</text>
- </view>
- </view>
- <view
- v-if="showTimeColumns && detail.runningTimeRule === 0"
- class="detail-section">
- <view class="detail-section-title">
- {{ $t("maintenanceSearch.maintenanceDuration") }}
- </view>
- <view class="detail-section-grid">
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.lastMaintenanceOperationTime")
- }}</text>
- <text>{{ detail.lastRunningTime ?? "--" }}</text>
- </view>
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.runTimeCycle")
- }}</text>
- <text>{{ detail.nextRunningTime ?? "--" }}</text>
- </view>
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.nextMaintTime")
- }}</text>
- <text :class="{ danger: isNegative(calculateTimePeriod(detail)) }">
- {{ calculateTimePeriod(detail) }}
- </text>
- </view>
- </view>
- </view>
- <view
- v-if="showMileageColumns && detail.mileageRule === 0"
- class="detail-section">
- <view class="detail-section-title">
- {{ $t("maintenanceSearch.maintenanceMileage") }}
- </view>
- <view class="detail-section-grid">
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.lastMaintenanceMileage")
- }}</text>
- <text>{{ detail.lastRunningKilometers ?? "--" }}</text>
- </view>
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.mileageCycle")
- }}</text>
- <text>{{ detail.nextRunningKilometers ?? "--" }}</text>
- </view>
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.nextMaintKil")
- }}</text>
- <text :class="{ danger: isNegative(calculateKiloPeriod(detail)) }">
- {{ calculateKiloPeriod(detail) }}
- </text>
- </view>
- </view>
- </view>
- <view
- v-if="showNaturalDateColumns && detail.naturalDateRule === 0"
- class="detail-section">
- <view class="detail-section-title">
- {{ $t("maintenanceSearch.maintenanceDate") }}
- </view>
- <view class="detail-section-grid">
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.lastMaintenanceNaturalDate")
- }}</text>
- <text>{{ formatDateValue(detail.lastNaturalDate) }}</text>
- </view>
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.naturalDateCycle")
- }}</text>
- <text>{{ detail.nextNaturalDate ?? "--" }}</text>
- </view>
- <view class="detail-item">
- <text class="detail-label">{{
- $t("maintenanceSearch.nextMaintDate")
- }}</text>
- <text>{{ calculateNextNaturalDate(detail) }}</text>
- </view>
- </view>
- </view>
- </view>
- <view v-if="!detailLoading && detailList.length === 0" class="empty">
- {{ $t("common.noData") }}
- </view>
- </scroll-view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script setup>
- import { computed, onMounted, reactive, ref } from "vue";
- import { useI18n } from "vue-i18n";
- import dayjs from "dayjs";
- import DaTree from "@/components/da-tree/index.vue";
- import UniFab from "@/uni_modules/uni-fab/components/uni-fab/uni-fab.vue";
- import UniTooltip from "@/uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue";
- import {
- getDeviceMainDistances,
- getMainPlanBOMs,
- getWorkOrderBOMs,
- } from "@/api/maintenance";
- import { specifiedSimpleDepts } from "@/api";
- import { getDeptId } from "@/utils/auth";
- import { useDataDictStore } from "@/store/modules/dataDict";
- const paging = ref(null);
- const { t } = useI18n({ useScope: "global" });
- const filterPopup = ref(null);
- const detailPopup = ref(null);
- const dataList = ref([]);
- const deptOptions = ref([]);
- const treeData = ref([]);
- const detailList = ref([]);
- const detailLoading = ref(false);
- const detailDevice = reactive({
- deviceCode: "",
- deviceName: "",
- });
- const deviceStatusDict = reactive({});
- const dictStore = useDataDictStore();
- const inputStyles = reactive({
- backgroundColor: "#f7f8fa",
- color: "#333",
- });
- const fabPattern = reactive({
- color: "#fff",
- backgroundColor: "#fff",
- selectedColor: "#fff",
- buttonColor: "#004098",
- iconColor: "#fff",
- icon: "search",
- });
- const filterForm = reactive({
- deptId: "",
- deviceCode: "",
- deviceName: "",
- });
- const selectedDeptName = computed(() => {
- const current = deptOptions.value.find(
- (item) => String(item.value) === String(filterForm.deptId)
- );
- return current?.text || "";
- });
- const showTimeColumns = computed(() => {
- return detailList.value.some((item) => item.runningTimeRule === 0);
- });
- const showMileageColumns = computed(() => {
- return detailList.value.some((item) => item.mileageRule === 0);
- });
- const showNaturalDateColumns = computed(() => {
- return detailList.value.some((item) => item.naturalDateRule === 0);
- });
- const handleTree = (
- data,
- id = "id",
- parentId = "parentId",
- children = "children"
- ) => {
- if (!Array.isArray(data)) return [];
- const childrenListMap = {};
- const nodeIds = {};
- const tree = [];
- for (const item of data) {
- const itemParentId = item[parentId];
- if (childrenListMap[itemParentId] == null) {
- childrenListMap[itemParentId] = [];
- }
- nodeIds[item[id]] = item;
- childrenListMap[itemParentId].push(item);
- }
- for (const item of data) {
- if (nodeIds[item[parentId]] == null) {
- tree.push(item);
- }
- }
- const adaptToChildrenList = (node) => {
- if (childrenListMap[node[id]] != null) {
- node[children] = childrenListMap[node[id]];
- }
- if (node[children]) {
- node[children].forEach(adaptToChildrenList);
- }
- };
- tree.forEach(adaptToChildrenList);
- return tree;
- };
- const sortDeptTree = (nodes) => {
- if (!Array.isArray(nodes)) return [];
- return [...nodes]
- .sort((a, b) => (a.sort ?? 999999) - (b.sort ?? 999999))
- .map((node) => ({
- ...node,
- children: sortDeptTree(node.children),
- }));
- };
- const loadDeptOptions = async () => {
- try {
- const response = await specifiedSimpleDepts(getDeptId());
- const list = response?.data || [];
- deptOptions.value = list.map((item) => ({
- text: item.name,
- value: item.id,
- }));
- treeData.value = sortDeptTree(handleTree(list));
- } catch (error) {
- treeData.value = [];
- deptOptions.value = [];
- }
- };
- const loadDeviceStatusDict = async () => {
- if (dictStore.dataDict.length <= 0) {
- await dictStore.loadDataDictList();
- }
- dictStore.getDataDictList("pms_device_status").forEach((item) => {
- deviceStatusDict[item.value] = item.label;
- });
- };
- const queryList = (pageNo, pageSize) => {
- getDeviceMainDistances({
- pageNo,
- pageSize,
- deptId: filterForm.deptId || undefined,
- deviceCode: filterForm.deviceCode || undefined,
- deviceName: filterForm.deviceName || undefined,
- setFlag: "",
- })
- .then((res) => {
- paging.value?.complete(res.data?.list || []);
- })
- .catch(() => {
- paging.value?.complete(false);
- });
- };
- const parseDistanceNumber = (distance) => {
- if (distance === null || distance === undefined || distance === "") {
- return undefined;
- }
- if (typeof distance === "number") return distance;
- const numericPart = String(distance).match(
- /[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?/
- )?.[0];
- return numericPart ? Number(numericPart) : undefined;
- };
- const hasMaintenancePlan = (mainDistance) => {
- return mainDistance !== null && mainDistance !== undefined && mainDistance !== "";
- };
- const hasDetailSource = (item) => {
- return hasMaintenancePlan(item.mainDistance) && (item.workOrderId || item.planId);
- };
- const formatDistance = (mainDistance) => {
- return hasMaintenancePlan(mainDistance)
- ? mainDistance
- : $tSafe("maintenanceSearch.noMaintenancePlan");
- };
- const getDistanceClass = (distance) => {
- const value = parseDistanceNumber(distance);
- if (value === undefined || value === 0) return "";
- return value < 0 ? "negative" : "positive";
- };
- const formatMultiAttrs = (item) => {
- const runtime = Object.entries(item.multiAttrsTotalRuntime || {});
- const mileage = Object.entries(item.multiAttrsTotalMileage || {});
- return runtime
- .concat(mileage)
- .filter(([key, value]) => key && value)
- .map(([key, value]) => `${key}: ${value}`)
- .join(" ");
- };
- const getDeviceStatusName = (code) => {
- return deviceStatusDict[code] || code || "--";
- };
- const getWorkOrderStatus = (item) => {
- if (item.shouldWorkOrder && item.runningWorkOrder) {
- return $tSafe("maintenanceSearch.generatedNotExecuted");
- }
- if (item.shouldWorkOrder && !item.runningWorkOrder) {
- return $tSafe("maintenanceSearch.notGenerated");
- }
- return "-";
- };
- const openFilterPopup = () => {
- filterPopup.value?.open();
- };
- const closeFilterPopup = () => {
- filterPopup.value?.close();
- };
- const handleTreeChange = (value) => {
- filterForm.deptId = value;
- };
- const applyFilter = () => {
- closeFilterPopup();
- paging.value?.reload();
- };
- const resetFilter = () => {
- filterForm.deptId = "";
- filterForm.deviceCode = "";
- filterForm.deviceName = "";
- };
- const openDetail = async (row) => {
- detailDevice.deviceCode = row.deviceCode || "";
- detailDevice.deviceName = row.deviceName || "";
- detailList.value = [];
- detailPopup.value?.open();
- detailLoading.value = true;
- try {
- const params = {
- pageNo: 1,
- pageSize: 100,
- deviceId: row.id,
- };
- const response = row.workOrderId
- ? await getWorkOrderBOMs({ ...params, workOrderId: row.workOrderId })
- : await getMainPlanBOMs({ ...params, planId: row.planId });
- detailList.value = Array.isArray(response?.data) ? response.data : [];
- } catch (error) {
- detailList.value = [];
- } finally {
- detailLoading.value = false;
- }
- };
- const closeDetailPopup = () => {
- detailPopup.value?.close();
- };
- const calculateTimePeriod = (item) => {
- if (item.runningTimeRule === 0) {
- const totalRunVal = item.totalRunTime ?? item.tempTotalRunTime;
- const next = Number(item.nextRunningTime) || 0;
- const totalRun = totalRunVal != null ? Number(totalRunVal) : 0;
- const lastRun = Number(item.lastRunningTime) || 0;
- return Number((next - (totalRun - lastRun)).toFixed(2));
- }
- return typeof item.timePeriod === "number"
- ? Number(item.timePeriod.toFixed(2))
- : item.timePeriod || "--";
- };
- const calculateKiloPeriod = (item) => {
- if (item.mileageRule === 0) {
- const totalRunVal = item.totalMileage ?? item.tempTotalMileage;
- const next = Number(item.nextRunningKilometers) || 0;
- const totalRun = totalRunVal != null ? Number(totalRunVal) : 0;
- const lastRun = Number(item.lastRunningKilometers) || 0;
- return Number((next - (totalRun - lastRun)).toFixed(2));
- }
- return typeof item.kilometerCycle === "number"
- ? Number(item.kilometerCycle.toFixed(2))
- : item.kilometerCycle || "--";
- };
- const calculateNextNaturalDate = (item) => {
- if (item.naturalDateRule !== 0 || !item.lastNaturalDate || !item.nextNaturalDate) {
- return "--";
- }
- return dayjs(item.lastNaturalDate)
- .add(item.nextNaturalDate, "day")
- .format("YYYY-MM-DD");
- };
- const formatDateValue = (value) => {
- return value ? dayjs(value).format("YYYY-MM-DD") : "--";
- };
- const isNegative = (value) => {
- if (value === null || value === undefined || value === "") return false;
- const num = Number(value);
- return !Number.isNaN(num) && num < 0;
- };
- const $tSafe = (key) => {
- return t(key);
- };
- onMounted(() => {
- loadDeptOptions();
- loadDeviceStatusDict();
- });
- </script>
- <style lang="scss" scoped>
- .report-page {
- padding: 10px !important;
- }
- .report-paging {
- height: 100%;
- }
- .report-list {
- padding: 8px 6px;
- box-sizing: border-box;
- }
- .report-card {
- position: relative;
- margin-bottom: 14px;
- overflow: hidden;
- background: #ffffff;
- border: 1px solid rgba(0, 64, 152, 0.08);
- border-radius: 8px;
- box-shadow: 0 6px 18px rgba(35, 54, 79, 0.08);
- }
- .card-header {
- min-height: 52px;
- padding: 14px 16px 10px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- box-sizing: border-box;
- border-bottom: 1px solid #edf1f7;
- }
- .device-title {
- min-width: 0;
- flex: 1;
- color: #000000;
- font-weight: 700;
- font-size: 18px;
- line-height: 24px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .distance-tag {
- max-width: 128px;
- height: 24px;
- line-height: 24px;
- padding: 0 9px;
- margin-left: 10px;
- border-radius: 12px;
- background: #f1f3f8;
- color: #606266;
- font-size: 12px;
- font-weight: 600;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- box-sizing: border-box;
- &.positive {
- color: #2bbb80;
- background: rgba(43, 187, 128, 0.12);
- }
- &.negative {
- color: #f56c6c;
- background: rgba(245, 108, 108, 0.12);
- }
- }
- .card-body {
- padding: 12px 16px 4px;
- box-sizing: border-box;
- }
- .field-row {
- display: flex;
- align-items: flex-start;
- min-height: 34px;
- font-size: 14px;
- }
- .field-label {
- width: 92px;
- flex-shrink: 0;
- color: #000000;
- font-weight: 600;
- font-size: 13px;
- line-height: 22px;
- }
- .field-value {
- min-width: 0;
- flex: 1;
- color: #233044;
- font-weight: 500;
- font-size: 14px;
- line-height: 22px;
- }
- .brief-row {
- padding-top: 4px;
- }
- .brief-row :deep(.uni-tooltip) {
- min-width: 0;
- flex: 1;
- display: block;
- }
- .brief-text {
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .card-footer {
- padding: 2px 16px 14px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .status-text {
- min-width: 0;
- flex: 1;
- color: #666;
- font-size: 13px;
- }
- .detail-btn {
- min-width: 72px;
- height: 30px;
- line-height: 28px;
- margin: 0;
- padding: 0 14px;
- border-radius: 15px;
- font-size: 13px;
- }
- .filter-popup,
- .detail-popup {
- height: 86vh;
- max-height: 86vh;
- display: flex;
- flex-direction: column;
- background: #fff;
- padding-bottom: env(safe-area-inset-bottom);
- }
- .filter-header {
- height: 48px;
- padding: 0 16px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-bottom: 1px solid #f0f0f0;
- box-sizing: border-box;
- }
- .filter-title {
- font-weight: 600;
- color: #333;
- font-size: 16px;
- }
- .filter-action {
- min-width: 48px;
- color: #666;
- font-size: 14px;
- &.primary {
- color: #004098;
- text-align: right;
- }
- }
- .filter-body {
- flex: 1;
- overflow-y: auto;
- padding: 12px 16px;
- box-sizing: border-box;
- }
- .filter-item {
- margin-bottom: 14px;
- }
- .filter-label {
- margin-bottom: 8px;
- color: #333;
- font-weight: 500;
- font-size: 14px;
- }
- .dept-selected {
- min-height: 36px;
- line-height: 36px;
- padding: 0 10px;
- margin-bottom: 8px;
- background: #f7f8fa;
- color: #666;
- border-radius: 4px;
- box-sizing: border-box;
- }
- .tree {
- height: 420px;
- overflow: hidden;
- border: 1px solid #f0f0f0;
- border-radius: 4px;
- }
- .filter-footer {
- display: flex;
- gap: 10px;
- padding: 10px 16px 14px;
- border-top: 1px solid #f0f0f0;
- box-sizing: border-box;
- }
- .filter-button {
- flex: 1;
- height: 38px;
- line-height: 38px;
- font-size: 14px;
- margin: 0;
- &.reset {
- color: #004098;
- background: #fff;
- border: 1px solid #004098;
- }
- }
- .detail-device {
- padding: 12px 16px;
- border-bottom: 1px solid #f0f0f0;
- }
- .detail-device-name {
- color: #000;
- font-weight: 700;
- font-size: 16px;
- line-height: 24px;
- }
- .detail-device-code {
- color: #666;
- font-size: 13px;
- line-height: 20px;
- }
- .detail-list {
- flex: 1;
- height: 0;
- padding: 12px 16px;
- box-sizing: border-box;
- }
- .detail-card {
- margin-bottom: 12px;
- padding: 12px;
- background: #f8fafc;
- border: 1px solid #edf1f7;
- border-radius: 8px;
- }
- .detail-name {
- margin-bottom: 10px;
- color: #000;
- font-weight: 700;
- font-size: 15px;
- }
- .detail-grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 8px 10px;
- }
- .detail-section {
- margin-top: 12px;
- padding-top: 10px;
- border-top: 1px solid #edf1f7;
- }
- .detail-section-title {
- margin-bottom: 8px;
- color: #004098;
- font-weight: 700;
- font-size: 14px;
- line-height: 20px;
- }
- .detail-section-grid {
- display: grid;
- grid-template-columns: repeat(3, minmax(0, 1fr));
- gap: 8px 10px;
- }
- .detail-item {
- min-width: 0;
- color: #233044;
- font-size: 13px;
- line-height: 20px;
- }
- .detail-label {
- display: block;
- color: #666;
- font-size: 12px;
- }
- @media screen and (max-width: 360px) {
- .detail-section-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- }
- .danger {
- color: #f56c6c;
- }
- .empty {
- padding: 32px 0;
- text-align: center;
- color: #999;
- font-size: 14px;
- }
- </style>
|