|
@@ -1,338 +1,320 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="container">
|
|
|
|
|
- <el-row :gutter="20" class="equal-height-row">
|
|
|
|
|
- <!-- 左侧设备列表 -->
|
|
|
|
|
- <el-col :span="12" class="col-wrapper">
|
|
|
|
|
- <div class="card">
|
|
|
|
|
- <h3>{{ t('configPerson.deviceList') }}</h3>
|
|
|
|
|
- <div class="dept-select">
|
|
|
|
|
- <el-tree-select
|
|
|
|
|
- clearable
|
|
|
|
|
- v-model="formData.deptId1"
|
|
|
|
|
- :data="deptList"
|
|
|
|
|
- :props="defaultProps"
|
|
|
|
|
- check-strictly
|
|
|
|
|
- node-key="id"
|
|
|
|
|
- filterable
|
|
|
|
|
- :placeholder="t('configPerson.deviceListHolder')"
|
|
|
|
|
- @node-click="handleDeptDeviceTreeNodeClick"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <div class="status-config-page">
|
|
|
|
|
+ <div class="selection-grid">
|
|
|
|
|
+ <section class="panel">
|
|
|
|
|
+ <div class="panel-header">
|
|
|
|
|
+ <div class="panel-title">
|
|
|
|
|
+ <span class="panel-marker"></span>
|
|
|
|
|
+ <span>{{ t('configPerson.deviceList') }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <!-- 设备搜索框 -->
|
|
|
|
|
- <div class="filter-input">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="deviceFilterText"
|
|
|
|
|
- :placeholder="t('devicePerson.filterDevicePlaceholder')"
|
|
|
|
|
- clearable
|
|
|
|
|
- prefix-icon="Search"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <el-scrollbar height="400px">
|
|
|
|
|
- <el-checkbox-group v-model="selectedDevices" @change="handleDeviceChange">
|
|
|
|
|
- <div
|
|
|
|
|
- v-for="device in filteredDevices"
|
|
|
|
|
- :key="device.id"
|
|
|
|
|
- class="checkbox-item"
|
|
|
|
|
- >
|
|
|
|
|
- <el-checkbox :label="device.id">
|
|
|
|
|
- {{ device.deviceCode }} ({{ device.deviceName }}) - {{ device.deviceStatusName }}
|
|
|
|
|
- </el-checkbox>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-checkbox-group>
|
|
|
|
|
- </el-scrollbar>
|
|
|
|
|
|
|
+ <el-tag size="small" type="info">{{ filteredDevices.length }} 台</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 右侧设备状态 -->
|
|
|
|
|
- <el-col :span="12" class="col-wrapper">
|
|
|
|
|
- <div class="card">
|
|
|
|
|
- <h3>{{ t('configDevice.rp') }}</h3>
|
|
|
|
|
- <div class="dept-select">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="formData.deviceStatus"
|
|
|
|
|
- @change="handleStatusChange"
|
|
|
|
|
- :placeholder="t('deviceStatus.choose')"
|
|
|
|
|
- clearable
|
|
|
|
|
- :disabled="selectedDevices.length === 0"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="dict in getStrDictOptions(DICT_TYPE.PMS_DEVICE_STATUS)"
|
|
|
|
|
- :key="dict.label"
|
|
|
|
|
- :label="dict.label"
|
|
|
|
|
- :value="dict.value"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
|
|
+ <div class="panel-toolbar">
|
|
|
|
|
+ <el-tree-select
|
|
|
|
|
+ v-model="formData.deptId"
|
|
|
|
|
+ :data="deptList"
|
|
|
|
|
+ :props="defaultProps"
|
|
|
|
|
+ check-strictly
|
|
|
|
|
+ node-key="id"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ clearable
|
|
|
|
|
+ size="default"
|
|
|
|
|
+ class="toolbar-control"
|
|
|
|
|
+ :placeholder="t('configPerson.deviceListHolder')"
|
|
|
|
|
+ @node-click="handleDeptDeviceTreeNodeClick"
|
|
|
|
|
+ @clear="handleClearDeptForDevice" />
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="formData.reason"
|
|
|
|
|
- :placeholder="t('configDevice.rfaHolder')"
|
|
|
|
|
- :disabled="!formData.deviceStatus"
|
|
|
|
|
- class="reason-input"
|
|
|
|
|
- type="textarea"
|
|
|
|
|
- :rows="3"
|
|
|
|
|
- @input="handleReasonInput"
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <div class="action-bar">
|
|
|
|
|
|
|
+ v-model="deviceFilterText"
|
|
|
|
|
+ :placeholder="t('devicePerson.filterDevicePlaceholder')"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ size="default"
|
|
|
|
|
+ class="toolbar-control">
|
|
|
|
|
+ <template #prefix>
|
|
|
|
|
+ <Icon icon="ep:search" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
+ <el-scrollbar class="option-scroll">
|
|
|
|
|
+ <el-checkbox-group v-model="selectedDevices" class="option-list">
|
|
|
|
|
+ <el-checkbox
|
|
|
|
|
+ v-for="device in filteredDevices"
|
|
|
|
|
+ :key="device.id"
|
|
|
|
|
+ :value="device.id"
|
|
|
|
|
+ class="option-item"
|
|
|
|
|
+ :class="{ 'is-selected': selectedDevices.includes(device.id) }">
|
|
|
|
|
+ <span class="option-content">
|
|
|
|
|
+ <span class="option-main">{{ device.deviceCode || '暂无编码' }}</span>
|
|
|
|
|
+ <span class="option-sub">{{ device.deviceName || '暂无名称' }}</span>
|
|
|
|
|
+ <span class="option-extra">当前状态:{{ device.deviceStatusName || '暂无' }}</span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </el-checkbox>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
|
+ <el-empty v-if="filteredDevices.length === 0" :image-size="92" description="暂无设备" />
|
|
|
|
|
+ </el-scrollbar>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="panel">
|
|
|
|
|
+ <div class="panel-header">
|
|
|
|
|
+ <div class="panel-title">
|
|
|
|
|
+ <span class="panel-marker"></span>
|
|
|
|
|
+ <span>{{ t('configDevice.rp') }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <el-tag size="small" type="info">{{ selectedDevices.length }} 台已选</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 暂存关联列表 -->
|
|
|
|
|
- <div class="temp-list card">
|
|
|
|
|
- <h3>{{ t('configPerson.adjustmentRecords') }}</h3>
|
|
|
|
|
- <el-table :data="tempRelations" style="width: 100%">
|
|
|
|
|
- <el-table-column prop="deviceNames" :label="t('deviceStatus.deviceName')" width="200" >
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- {{ row.deviceNames }}
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="status" :label="t('deviceStatus.status')" >
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <dict-tag :type="DICT_TYPE.PMS_DEVICE_STATUS" :value="scope.row.status" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="reason" :label="t('configDevice.reasonForAdjustment')" />
|
|
|
|
|
- <el-table-column :label="t('deviceStatus.operation')" width="120">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="danger"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="removeTempRelation(row.deviceId)"
|
|
|
|
|
- >
|
|
|
|
|
- {{ t('fault.del') }}
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
|
|
|
|
|
- <div class="submit-area">
|
|
|
|
|
|
|
+ <div class="status-form">
|
|
|
|
|
+ <el-form label-position="top" size="default">
|
|
|
|
|
+ <el-form-item :label="t('deviceStatus.status')">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="formData.deviceStatus"
|
|
|
|
|
+ :placeholder="t('deviceStatus.choose')"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ class="toolbar-control"
|
|
|
|
|
+ :disabled="selectedDevices.length === 0"
|
|
|
|
|
+ @change="syncRelations">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in statusOptions"
|
|
|
|
|
+ :key="dict.value"
|
|
|
|
|
+ :label="dict.label"
|
|
|
|
|
+ :value="dict.value" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <template #label>
|
|
|
|
|
+ <span>{{ t('configDevice.reasonForAdjustment') }}</span>
|
|
|
|
|
+ <span class="required-star">*</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="formData.reason"
|
|
|
|
|
+ :placeholder="t('configDevice.rfaHolder')"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :rows="8"
|
|
|
|
|
+ resize="none"
|
|
|
|
|
+ :disabled="!formData.deviceStatus"
|
|
|
|
|
+ @input="syncRelations" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="panel record-panel">
|
|
|
|
|
+ <div class="panel-header">
|
|
|
|
|
+ <div class="panel-title">
|
|
|
|
|
+ <span class="panel-marker"></span>
|
|
|
|
|
+ <span>{{ t('configPerson.adjustmentRecords') }}</span>
|
|
|
|
|
+ </div>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- size="large"
|
|
|
|
|
- @click="submitRelations"
|
|
|
|
|
|
|
+ size="default"
|
|
|
:disabled="isSaveDisabled"
|
|
:disabled="isSaveDisabled"
|
|
|
- >
|
|
|
|
|
|
|
+ @click="submitRelations">
|
|
|
|
|
+ <Icon icon="ep:check" class="mr-5px" />
|
|
|
{{ t('iotMaintain.save') }}
|
|
{{ t('iotMaintain.save') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <ZmTable
|
|
|
|
|
+ :data="tempRelations"
|
|
|
|
|
+ :loading="false"
|
|
|
|
|
+ :show-border="true"
|
|
|
|
|
+ settings-cache-key="pms-device-status-config-record"
|
|
|
|
|
+ class="record-table">
|
|
|
|
|
+ <ZmTableColumn prop="deviceNames" :label="t('deviceStatus.deviceName')" min-width="240" />
|
|
|
|
|
+ <ZmTableColumn prop="status" :label="t('deviceStatus.status')" min-width="140">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <dict-tag :type="DICT_TYPE.PMS_DEVICE_STATUS" :value="row.status" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ZmTableColumn>
|
|
|
|
|
+ <ZmTableColumn
|
|
|
|
|
+ prop="reason"
|
|
|
|
|
+ :label="t('configDevice.reasonForAdjustment')"
|
|
|
|
|
+ min-width="280"
|
|
|
|
|
+ align="left">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <span>{{ row.reason || '未填写调整原因' }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ZmTableColumn>
|
|
|
|
|
+ <ZmTableColumn :label="t('deviceStatus.operation')" width="120" fixed="right" action>
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-button type="danger" link size="default" @click="removeTempRelation(row.deviceId)">
|
|
|
|
|
+ <Icon icon="ep:delete" class="mr-4px" />
|
|
|
|
|
+ {{ t('fault.del') }}
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ZmTableColumn>
|
|
|
|
|
+ </ZmTable>
|
|
|
|
|
+ </section>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, computed, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { computed, onMounted, reactive, ref, unref, watch } from 'vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
-import {defaultProps, handleTree} from "@/utils/tree";
|
|
|
|
|
-import * as DeptApi from "@/api/system/dept";
|
|
|
|
|
-import {IotDeviceApi, IotDeviceVO} from "@/api/pms/device";
|
|
|
|
|
-import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
|
|
|
|
-import { useRouter, useRoute } from 'vue-router'
|
|
|
|
|
-import { useTagsViewStore } from "@/store/modules/tagsView";
|
|
|
|
|
-const router = useRouter()
|
|
|
|
|
-const route = useRoute() // 获取路由参数
|
|
|
|
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
+import { useTableComponents } from '@/components/ZmTable/useTableComponents'
|
|
|
|
|
+import * as DeptApi from '@/api/system/dept'
|
|
|
|
|
+import { IotDeviceApi, type IotDeviceVO } from '@/api/pms/device'
|
|
|
|
|
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
|
|
|
|
+import { useTagsViewStore } from '@/store/modules/tagsView'
|
|
|
|
|
+import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
|
|
|
|
|
-const { t } = useI18n() // 国际化
|
|
|
|
|
defineOptions({ name: 'ConfigDeviceStatus' })
|
|
defineOptions({ name: 'ConfigDeviceStatus' })
|
|
|
|
|
|
|
|
-const simpleDevices = ref<IotDeviceVO[]>([])
|
|
|
|
|
-const currentStatus = ref<string>('')
|
|
|
|
|
-const adjustReason = ref<string>('')
|
|
|
|
|
-const deptList = ref<Tree[]>([]) // 树形结构
|
|
|
|
|
-const selectedDevices = ref<number[]>([]) // 改为数组存储多选
|
|
|
|
|
-// 获取当前设备对象
|
|
|
|
|
-const currentDevice = computed(() => {
|
|
|
|
|
- return simpleDevices.value.find(d => d.id === selectedDevice.value)
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const { delView } = useTagsViewStore() // 视图操作
|
|
|
|
|
-
|
|
|
|
|
-const formData = ref({
|
|
|
|
|
- id: undefined,
|
|
|
|
|
- deviceCode: undefined,
|
|
|
|
|
- deviceName: undefined,
|
|
|
|
|
- brand: undefined,
|
|
|
|
|
- model: undefined,
|
|
|
|
|
- deptId: undefined as string | undefined,
|
|
|
|
|
- deptId1: undefined as string | undefined,
|
|
|
|
|
- deviceStatus: undefined,
|
|
|
|
|
- reason: '',
|
|
|
|
|
- assetProperty: undefined,
|
|
|
|
|
- picUrl: undefined,
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const queryParams = reactive({
|
|
|
|
|
- deptId1: formData.value.deptId1,
|
|
|
|
|
- deptId: formData.value.deptId,
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const emit = defineEmits(['success', 'node-click']) // 定义 success 树点击 事件,用于操作成功后的回调
|
|
|
|
|
-
|
|
|
|
|
-// 响应式数据
|
|
|
|
|
-const selectedDevice = ref<number>(0)
|
|
|
|
|
-const selectedDept = ref('')
|
|
|
|
|
-const tempRelations = ref<Array<{
|
|
|
|
|
|
|
+type TempRelation = {
|
|
|
deviceId: number
|
|
deviceId: number
|
|
|
deviceNames: string
|
|
deviceNames: string
|
|
|
status: string
|
|
status: string
|
|
|
- statusLabel: string
|
|
|
|
|
reason: string
|
|
reason: string
|
|
|
-}>>([])
|
|
|
|
|
-
|
|
|
|
|
-// 设备切换时清空状态
|
|
|
|
|
-const handleDeviceChange = () => {
|
|
|
|
|
- currentStatus.value = ''
|
|
|
|
|
- adjustReason.value = ''
|
|
|
|
|
- // 尝试从暂存记录恢复数据
|
|
|
|
|
- const existRecord = tempRelations.value.find(r => r.deviceId === selectedDevice.value)
|
|
|
|
|
- if (existRecord) {
|
|
|
|
|
- currentStatus.value = existRecord.deviceStatus
|
|
|
|
|
- adjustReason.value = existRecord.reason
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 修改watch监听
|
|
|
|
|
-watch(selectedDevices, (newVal, oldVal) => {
|
|
|
|
|
- // 删除取消选择的设备
|
|
|
|
|
- const removedDevices = oldVal.filter(id => !newVal.includes(id))
|
|
|
|
|
- removedDevices.forEach(deviceId => {
|
|
|
|
|
- const index = tempRelations.value.findIndex(r => r.deviceId === deviceId)
|
|
|
|
|
- if (index > -1) tempRelations.value.splice(index, 1)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+type ConfigFormData = {
|
|
|
|
|
+ deptId?: number
|
|
|
|
|
+ deviceStatus?: string
|
|
|
|
|
+ reason: string
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- // 自动应用当前状态到新选设备
|
|
|
|
|
- if (formData.value.deviceStatus && formData.value.reason) {
|
|
|
|
|
- saveCurrentRelation()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+const route = useRoute()
|
|
|
|
|
+const { t } = useI18n()
|
|
|
|
|
+const { delView } = useTagsViewStore()
|
|
|
|
|
+const { ZmTable, ZmTableColumn } = useTableComponents<TempRelation>()
|
|
|
|
|
+
|
|
|
|
|
+const deptList = ref<Tree[]>([])
|
|
|
|
|
+const simpleDevices = ref<IotDeviceVO[]>([])
|
|
|
|
|
+const selectedDevices = ref<number[]>([])
|
|
|
|
|
+const tempRelations = ref<TempRelation[]>([])
|
|
|
|
|
+const deviceFilterText = ref('')
|
|
|
|
|
+
|
|
|
|
|
+const formData = reactive<ConfigFormData>({
|
|
|
|
|
+ deptId: undefined,
|
|
|
|
|
+ deviceStatus: undefined,
|
|
|
|
|
+ reason: ''
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-// 修改保存方法
|
|
|
|
|
-const saveCurrentRelation = () => {
|
|
|
|
|
- if (!formData.value.deviceStatus /*|| !formData.value.reason*/) return
|
|
|
|
|
|
|
+const statusOptions = computed(() => getStrDictOptions(DICT_TYPE.PMS_DEVICE_STATUS))
|
|
|
|
|
|
|
|
- const statusDict = getStrDictOptions(DICT_TYPE.PMS_DEVICE_STATUS)
|
|
|
|
|
- .find(d => d.value === formData.value.deviceStatus)
|
|
|
|
|
|
|
+const filteredDevices = computed(() => {
|
|
|
|
|
+ const searchText = deviceFilterText.value.toLowerCase().trim()
|
|
|
|
|
+ if (!searchText) return simpleDevices.value
|
|
|
|
|
|
|
|
- selectedDevices.value.forEach(deviceId => {
|
|
|
|
|
- const device = simpleDevices.value.find(d => d.id === deviceId)
|
|
|
|
|
- if (!device) return
|
|
|
|
|
|
|
+ return simpleDevices.value.filter((device) => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ (device.deviceCode || '').toLowerCase().includes(searchText) ||
|
|
|
|
|
+ (device.deviceName || '').toLowerCase().includes(searchText) ||
|
|
|
|
|
+ (device.deviceStatusName || '').toLowerCase().includes(searchText)
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
- const newRelation = {
|
|
|
|
|
- deviceId,
|
|
|
|
|
- deviceNames: `${device.deviceCode} (${device.deviceName})`,
|
|
|
|
|
- status: formData.value.deviceStatus!,
|
|
|
|
|
- statusLabel: statusDict?.label || '未知状态',
|
|
|
|
|
- reason: formData.value.reason
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const isSaveDisabled = computed(() => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ tempRelations.value.length === 0 ||
|
|
|
|
|
+ !formData.reason.trim() ||
|
|
|
|
|
+ tempRelations.value.some((item) => !item.status || !item.reason?.trim())
|
|
|
|
|
+ )
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
- const existIndex = tempRelations.value.findIndex(r => r.deviceId === deviceId)
|
|
|
|
|
- if (existIndex > -1) {
|
|
|
|
|
- tempRelations.value[existIndex] = newRelation
|
|
|
|
|
- } else {
|
|
|
|
|
- tempRelations.value.push(newRelation)
|
|
|
|
|
|
|
+watch(
|
|
|
|
|
+ selectedDevices,
|
|
|
|
|
+ (newVal, oldVal) => {
|
|
|
|
|
+ const removedDeviceIds = oldVal.filter((id) => !newVal.includes(id))
|
|
|
|
|
+ tempRelations.value = tempRelations.value.filter(
|
|
|
|
|
+ (relation) => !removedDeviceIds.includes(relation.deviceId)
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ if (newVal.length === 0) {
|
|
|
|
|
+ formData.deviceStatus = undefined
|
|
|
|
|
+ formData.reason = ''
|
|
|
|
|
+ tempRelations.value = []
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ syncRelations()
|
|
|
|
|
+ },
|
|
|
|
|
+ { deep: true }
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+const getDeviceLabel = (device: IotDeviceVO) => {
|
|
|
|
|
+ return `${device.deviceCode || '暂无编码'}(${device.deviceName || '暂无名称'})`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 处理 部门-设备 树 被点击 */
|
|
|
|
|
-const handleDeptDeviceTreeNodeClick = async (row: { [key: string]: any }) => {
|
|
|
|
|
- emit('node-click', row)
|
|
|
|
|
- formData.value.deptId1 = row.id
|
|
|
|
|
- await getDeviceList()
|
|
|
|
|
|
|
+const syncRelations = () => {
|
|
|
|
|
+ if (!formData.deviceStatus) {
|
|
|
|
|
+ tempRelations.value = []
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const selectedDeviceSet = new Set(selectedDevices.value)
|
|
|
|
|
+ tempRelations.value = simpleDevices.value
|
|
|
|
|
+ .filter((device) => selectedDeviceSet.has(device.id))
|
|
|
|
|
+ .map((device) => ({
|
|
|
|
|
+ deviceId: device.id,
|
|
|
|
|
+ deviceNames: getDeviceLabel(device),
|
|
|
|
|
+ status: formData.deviceStatus!,
|
|
|
|
|
+ reason: formData.reason
|
|
|
|
|
+ }))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 获得 部门下的设备 列表 */
|
|
|
|
|
const getDeviceList = async () => {
|
|
const getDeviceList = async () => {
|
|
|
try {
|
|
try {
|
|
|
- const params = { deptId: formData.value.deptId1 }
|
|
|
|
|
- const data = await IotDeviceApi.simpleDevices(params)
|
|
|
|
|
|
|
+ const data = await IotDeviceApi.simpleDevices({ deptId: formData.deptId })
|
|
|
simpleDevices.value = data || []
|
|
simpleDevices.value = data || []
|
|
|
|
|
+ selectedDevices.value = selectedDevices.value.filter((id) =>
|
|
|
|
|
+ simpleDevices.value.some((device) => device.id === id)
|
|
|
|
|
+ )
|
|
|
|
|
+ syncRelations()
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
simpleDevices.value = []
|
|
simpleDevices.value = []
|
|
|
- console.error('获取设备列表失败:', error)
|
|
|
|
|
|
|
+ ElMessage.error('获取设备列表失败')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 添加计算属性:判断保存按钮是否禁用
|
|
|
|
|
-const isSaveDisabled = computed(() => {
|
|
|
|
|
- // 当没有调整记录或调整原因为空时禁用按钮
|
|
|
|
|
- return tempRelations.value.length === 0 || !formData.value.reason.trim();
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 添加状态变更处理
|
|
|
|
|
-const handleStatusChange = () => {
|
|
|
|
|
- if (selectedDevices.value.length > 0) {
|
|
|
|
|
- saveCurrentRelation()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const handleDeptDeviceTreeNodeClick = async (row: Tree) => {
|
|
|
|
|
+ formData.deptId = row.id
|
|
|
|
|
+ selectedDevices.value = []
|
|
|
|
|
+ deviceFilterText.value = ''
|
|
|
|
|
+ await getDeviceList()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 新增输入处理方法
|
|
|
|
|
-const handleReasonInput = (value: string) => {
|
|
|
|
|
- formData.value.reason = value
|
|
|
|
|
- if (selectedDevices.value.length > 0 && formData.value.deviceStatus) {
|
|
|
|
|
- saveCurrentRelation()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const handleClearDeptForDevice = () => {
|
|
|
|
|
+ simpleDevices.value = []
|
|
|
|
|
+ selectedDevices.value = []
|
|
|
|
|
+ tempRelations.value = []
|
|
|
|
|
+ deviceFilterText.value = ''
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 添加多设备判断方法
|
|
|
|
|
-const isMultiDevice = (row: any) => {
|
|
|
|
|
- return selectedDevices.value.includes(row.deviceId) && selectedDevices.value.length > 1
|
|
|
|
|
|
|
+const removeTempRelation = (deviceId: number) => {
|
|
|
|
|
+ selectedDevices.value = selectedDevices.value.filter((id) => id !== deviceId)
|
|
|
|
|
+ tempRelations.value = tempRelations.value.filter((relation) => relation.deviceId !== deviceId)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 设备过滤文本
|
|
|
|
|
-const deviceFilterText = ref('')
|
|
|
|
|
-
|
|
|
|
|
-// 计算属性:过滤设备列表
|
|
|
|
|
-const filteredDevices = computed(() => {
|
|
|
|
|
- const searchText = deviceFilterText.value.toLowerCase().trim()
|
|
|
|
|
- if (!searchText) return simpleDevices.value
|
|
|
|
|
-
|
|
|
|
|
- return simpleDevices.value.filter(device => {
|
|
|
|
|
- return (
|
|
|
|
|
- (device.deviceCode || '').toLowerCase().includes(searchText) ||
|
|
|
|
|
- (device.deviceName || '').toLowerCase().includes(searchText)
|
|
|
|
|
- )
|
|
|
|
|
- })
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-// 修改删除方法
|
|
|
|
|
-const removeTempRelation = (deviceId: number) => {
|
|
|
|
|
- // 从暂存列表删除
|
|
|
|
|
- tempRelations.value = tempRelations.value.filter(r => r.deviceId !== deviceId)
|
|
|
|
|
|
|
+const submitRelations = async () => {
|
|
|
|
|
+ if (!selectedDevices.value.length) {
|
|
|
|
|
+ ElMessage.error(t('iotMaintain.deviceHolder'))
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 从选中设备中移除
|
|
|
|
|
- selectedDevices.value = selectedDevices.value.filter(id => id !== deviceId)
|
|
|
|
|
|
|
+ if (!formData.deviceStatus) {
|
|
|
|
|
+ ElMessage.error(t('deviceStatus.choose'))
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 如果当前表单状态为空,尝试恢复其他设备的状态
|
|
|
|
|
- if (!formData.value.deviceStatus && tempRelations.value.length > 0) {
|
|
|
|
|
- const firstRelation = tempRelations.value[0]
|
|
|
|
|
- formData.value.deviceStatus = firstRelation.status
|
|
|
|
|
- formData.value.reason = firstRelation.reason
|
|
|
|
|
|
|
+ if (tempRelations.value.some((item) => !item.reason?.trim())) {
|
|
|
|
|
+ ElMessage.error('请填写所有设备的调整原因')
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
-// 提交时处理数据
|
|
|
|
|
-const submitRelations = async () => {
|
|
|
|
|
try {
|
|
try {
|
|
|
- // 检查是否有空的原因
|
|
|
|
|
- const hasEmptyReason = tempRelations.value.some(
|
|
|
|
|
- item => !item.reason?.trim()
|
|
|
|
|
- )
|
|
|
|
|
- if (hasEmptyReason) {
|
|
|
|
|
- ElMessage.error('请填写所有设备的调整原因')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- // 转换数据结构
|
|
|
|
|
- const submitData = tempRelations.value.map(r => ({
|
|
|
|
|
- deviceId: r.deviceId,
|
|
|
|
|
- status: r.status,
|
|
|
|
|
- reason: r.reason
|
|
|
|
|
|
|
+ const submitData = tempRelations.value.map((relation) => ({
|
|
|
|
|
+ deviceId: relation.deviceId,
|
|
|
|
|
+ status: relation.status,
|
|
|
|
|
+ reason: relation.reason
|
|
|
}))
|
|
}))
|
|
|
|
|
+
|
|
|
await IotDeviceApi.saveDeviceStatuses(submitData)
|
|
await IotDeviceApi.saveDeviceStatuses(submitData)
|
|
|
ElMessage.success('提交成功')
|
|
ElMessage.success('提交成功')
|
|
|
tempRelations.value = []
|
|
tempRelations.value = []
|
|
@@ -343,168 +325,200 @@ const submitRelations = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 初始化 */
|
|
|
|
|
|
|
+const findDeptNode = (nodes: Tree[], deptId: number): Tree | null => {
|
|
|
|
|
+ for (const node of nodes) {
|
|
|
|
|
+ if (node.id === deptId) return node
|
|
|
|
|
+
|
|
|
|
|
+ if (node.children?.length) {
|
|
|
|
|
+ const found = findDeptNode(node.children, deptId)
|
|
|
|
|
+ if (found) return found
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return null
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
try {
|
|
try {
|
|
|
- // 初始化部门树
|
|
|
|
|
const deptData = await DeptApi.getSimpleDeptList()
|
|
const deptData = await DeptApi.getSimpleDeptList()
|
|
|
- deptList.value = handleTree(deptData) // 转换为树形结构
|
|
|
|
|
-
|
|
|
|
|
- // 从路由参数获取部门ID
|
|
|
|
|
- const routeDeptId = route.query.deptId ? Number(route.query.deptId) : null
|
|
|
|
|
- let targetDeptId: number
|
|
|
|
|
-
|
|
|
|
|
- if (routeDeptId) {
|
|
|
|
|
- // 如果路由参数有部门ID,使用路由参数中的部门ID
|
|
|
|
|
- targetDeptId = routeDeptId
|
|
|
|
|
- } else if (deptList.value.length > 0) {
|
|
|
|
|
- // 否则使用第一个节点
|
|
|
|
|
- targetDeptId = deptList.value[0].id
|
|
|
|
|
- } else {
|
|
|
|
|
- console.warn("部门树数据为空,无法设置默认值")
|
|
|
|
|
|
|
+ deptList.value = handleTree(deptData)
|
|
|
|
|
+
|
|
|
|
|
+ const routeDeptId = route.query.deptId ? Number(route.query.deptId) : undefined
|
|
|
|
|
+ const targetDeptId = routeDeptId || deptList.value[0]?.id
|
|
|
|
|
+
|
|
|
|
|
+ if (!targetDeptId) {
|
|
|
|
|
+ ElMessage.warning('暂无可用部门数据')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 设置默认选中的部门(转换后树的第一个节点)
|
|
|
|
|
- // if (deptList.value.length > 0) {
|
|
|
|
|
- // 获取转换后树的第一个节点
|
|
|
|
|
- // const firstRootNode = deptList.value[0]
|
|
|
|
|
-
|
|
|
|
|
- // 设置设备部门的默认值
|
|
|
|
|
- formData.value.deptId1 = targetDeptId
|
|
|
|
|
- // 触发设备部门的节点点击事件,加载设备列表
|
|
|
|
|
|
|
+ formData.deptId = targetDeptId
|
|
|
const targetDeptNode = findDeptNode(deptList.value, targetDeptId)
|
|
const targetDeptNode = findDeptNode(deptList.value, targetDeptId)
|
|
|
- // 触发设备部门的节点点击事件,加载设备列表
|
|
|
|
|
if (targetDeptNode) {
|
|
if (targetDeptNode) {
|
|
|
await handleDeptDeviceTreeNodeClick(targetDeptNode)
|
|
await handleDeptDeviceTreeNodeClick(targetDeptNode)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ await getDeviceList()
|
|
|
}
|
|
}
|
|
|
- // } else {
|
|
|
|
|
- // console.warn("部门树数据为空,无法设置默认值")
|
|
|
|
|
- // }
|
|
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- console.error("初始化部门树失败:", error)
|
|
|
|
|
- ElMessage.error("加载部门数据失败")
|
|
|
|
|
|
|
+ ElMessage.error('加载部门数据失败')
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+</script>
|
|
|
|
|
|
|
|
-// 在部门树中查找指定ID的节点
|
|
|
|
|
-const findDeptNode = (nodes: Tree[], deptId: number): Tree | null => {
|
|
|
|
|
- for (const node of nodes) {
|
|
|
|
|
- if (node.id === deptId) {
|
|
|
|
|
- return node
|
|
|
|
|
- }
|
|
|
|
|
- if (node.children && node.children.length > 0) {
|
|
|
|
|
- const found = findDeptNode(node.children, deptId)
|
|
|
|
|
- if (found) return found
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return null
|
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.status-config-page {
|
|
|
|
|
+ min-height: calc(
|
|
|
|
|
+ 100vh - 20px - var(--top-tool-height) - var(--tags-view-height) - var(--app-footer-height)
|
|
|
|
|
+ );
|
|
|
|
|
+ background: #f5f7fb;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-</script>
|
|
|
|
|
-
|
|
|
|
|
-<style scoped>
|
|
|
|
|
-.container {
|
|
|
|
|
- padding: 20px;
|
|
|
|
|
|
|
+.selection-grid {
|
|
|
|
|
+ display: grid;
|
|
|
|
|
+ grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
|
|
+ gap: 16px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.card {
|
|
|
|
|
- border: 1px solid #ebeef5;
|
|
|
|
|
- border-radius: 4px;
|
|
|
|
|
- padding: 20px;
|
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
|
|
+.panel {
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
- background: white;
|
|
|
|
|
- box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
|
|
|
|
|
- transition: box-shadow 0.2s;
|
|
|
|
|
|
|
+ background: var(--el-bg-color);
|
|
|
|
|
+ border: 1px solid var(--el-border-color-lighter);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ box-shadow: 0 8px 24px rgb(15 35 70 / 5%);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.list-item {
|
|
|
|
|
- padding: 8px 12px;
|
|
|
|
|
- border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
|
|
+.panel-header {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ min-height: 56px;
|
|
|
|
|
+ padding: 0 18px;
|
|
|
|
|
+ background: #f4f9ff;
|
|
|
|
|
+ border-bottom: 1px solid var(--el-border-color-lighter);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.col-wrapper {
|
|
|
|
|
|
|
+.panel-title {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: var(--el-text-color-primary);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.dept-select {
|
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
|
|
|
+.panel-marker {
|
|
|
|
|
+ width: 4px;
|
|
|
|
|
+ height: 18px;
|
|
|
|
|
+ margin-right: 10px;
|
|
|
|
|
+ background: var(--el-color-primary);
|
|
|
|
|
+ border-radius: 4px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.user-list {
|
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
|
- border: 1px solid #ebeef5;
|
|
|
|
|
- border-radius: 4px;
|
|
|
|
|
- padding: 10px;
|
|
|
|
|
|
|
+.panel-toolbar {
|
|
|
|
|
+ display: grid;
|
|
|
|
|
+ grid-template-columns: minmax(0, 1fr);
|
|
|
|
|
+ gap: 12px;
|
|
|
|
|
+ padding: 16px 18px 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.action-bar {
|
|
|
|
|
- text-align: right;
|
|
|
|
|
|
|
+.toolbar-control {
|
|
|
|
|
+ width: 100%;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.temp-list {
|
|
|
|
|
- margin-top: 20px;
|
|
|
|
|
|
|
+.status-form {
|
|
|
|
|
+ padding: 18px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.submit-area {
|
|
|
|
|
- margin-top: 20px;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
|
|
+.option-scroll {
|
|
|
|
|
+ height: 430px;
|
|
|
|
|
+ padding: 14px 18px 18px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-h3 {
|
|
|
|
|
- margin: 0 0 15px 0;
|
|
|
|
|
- color: #303133;
|
|
|
|
|
|
|
+.option-list {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 10px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.radio-item {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- padding: 8px 12px;
|
|
|
|
|
- border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
|
|
+.option-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ padding: 12px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ background: var(--el-fill-color-blank);
|
|
|
|
|
+ border: 1px solid var(--el-border-color-lighter);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ transition:
|
|
|
|
|
+ border-color 0.2s,
|
|
|
|
|
+ background-color 0.2s,
|
|
|
|
|
+ box-shadow 0.2s;
|
|
|
|
|
+
|
|
|
|
|
+ &:hover,
|
|
|
|
|
+ &.is-selected {
|
|
|
|
|
+ background: #f7fbff;
|
|
|
|
|
+ border-color: var(--el-color-primary-light-5);
|
|
|
|
|
+ box-shadow: 0 6px 18px rgb(64 158 255 / 10%);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-checkbox__input) {
|
|
|
|
|
+ margin-top: 2px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-checkbox__label) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ padding-left: 10px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.radio-item .el-radio {
|
|
|
|
|
|
|
+.option-content {
|
|
|
|
|
+ display: grid;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ grid-template-columns: minmax(90px, 0.7fr) minmax(120px, 1fr) minmax(150px, 1.2fr);
|
|
|
|
|
+ gap: 12px;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 100%;
|
|
|
|
|
|
|
+ min-width: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.radio-item .el-radio__label {
|
|
|
|
|
- display: block;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
|
|
+.option-main,
|
|
|
|
|
+.option-sub,
|
|
|
|
|
+.option-extra {
|
|
|
|
|
+ min-width: 0;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.equal-height-row {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: stretch;
|
|
|
|
|
|
|
+.option-main {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: var(--el-text-color-primary);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.el-scrollbar {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
|
|
+.option-sub,
|
|
|
|
|
+.option-extra {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: var(--el-text-color-secondary);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.reason-input {
|
|
|
|
|
- margin-top: 20px;
|
|
|
|
|
|
|
+.record-panel {
|
|
|
|
|
+ padding-bottom: 18px;
|
|
|
|
|
+ margin-top: 16px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* 添加多设备标签样式 */
|
|
|
|
|
-.el-tag {
|
|
|
|
|
- margin-left: 8px;
|
|
|
|
|
- vertical-align: middle;
|
|
|
|
|
|
|
+.record-table {
|
|
|
|
|
+ width: calc(100% - 36px);
|
|
|
|
|
+ margin: 18px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.filter-input {
|
|
|
|
|
- margin-bottom: 15px;
|
|
|
|
|
|
|
+.required-star {
|
|
|
|
|
+ margin-left: 4px;
|
|
|
|
|
+ color: var(--el-color-danger);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.no-data {
|
|
|
|
|
- padding: 20px;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- color: #999;
|
|
|
|
|
|
|
+@media (width <= 1180px) {
|
|
|
|
|
+ .selection-grid {
|
|
|
|
|
+ grid-template-columns: minmax(0, 1fr);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|