|
@@ -74,14 +74,18 @@
|
|
|
|
|
|
<!-- 暂存关联列表 -->
|
|
|
<div class="temp-list card">
|
|
|
- <h3>待提交的关联关系</h3>
|
|
|
+ <h3>设备状态调整记录</h3>
|
|
|
<el-table :data="tempRelations" style="width: 100%">
|
|
|
<el-table-column prop="deviceNames" label="设备" width="200" >
|
|
|
<template #default="{ row }">
|
|
|
{{ row.deviceNames }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="status" label="状态" />
|
|
|
+ <el-table-column prop="status" label="状态" >
|
|
|
+ <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="调整原因" />
|
|
|
<el-table-column label="操作" width="120">
|
|
|
<template #default="{ row }">
|
|
@@ -103,7 +107,7 @@
|
|
|
@click="submitRelations"
|
|
|
:disabled="tempRelations.length === 0"
|
|
|
>
|
|
|
- 提交全部关联关系
|
|
|
+ 保 存
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -116,15 +120,12 @@ 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 {IotDevicePersonApi, IotDevicePersonVO} from "@/api/pms/iotdeviceperson";
|
|
|
-import * as UserApi from "@/api/system/user";
|
|
|
import {simpleUserList, UserVO} from "@/api/system/user";
|
|
|
import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
|
|
|
|
|
defineOptions({ name: 'ConfigDeviceStatus' })
|
|
|
|
|
|
const simpleDevices = ref<IotDeviceVO[]>([])
|
|
|
-const simpleUsers = ref<UserVO[]>([])
|
|
|
const currentStatus = ref<string>('')
|
|
|
const adjustReason = ref<string>('')
|
|
|
const deptList = ref<Tree[]>([]) // 树形结构
|
|
@@ -158,7 +159,6 @@ const emit = defineEmits(['success', 'node-click']) // 定义 success 树点击
|
|
|
// 响应式数据
|
|
|
const selectedDevice = ref<number>(0)
|
|
|
const selectedDept = ref('')
|
|
|
-const selectedUsers = ref<number[]>([])
|
|
|
const tempRelations = ref<Array<{
|
|
|
deviceId: number
|
|
|
deviceNames: string
|
|
@@ -302,10 +302,17 @@ onMounted(async () => {
|
|
|
}
|
|
|
|
|
|
.card {
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
flex: 1;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
overflow: hidden;
|
|
|
+ background: white;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
|
|
|
+ transition: box-shadow 0.2s;
|
|
|
}
|
|
|
|
|
|
.list-item {
|