diff --git a/src/api/device/index.ts b/src/api/device/index.ts
index 1cab5831..204967ef 100644
--- a/src/api/device/index.ts
+++ b/src/api/device/index.ts
@@ -47,6 +47,10 @@ export const DeviceApi = {
deleteDevice: async (id: number) => {
return await request.delete({ url: `/system/device/delete?id=` + id })
},
+ // 删除设备
+ deleteDeviceCode: async (devicecode: number) => {
+ return await request.delete({ url: `/system/device/deletecode?devicecode=` + devicecode })
+ },
// 导出设备 Excel
exportDevice: async (params) => {
diff --git a/src/api/deviceuser/index.ts b/src/api/deviceuser/index.ts
index a4dec16b..be687a49 100644
--- a/src/api/deviceuser/index.ts
+++ b/src/api/deviceuser/index.ts
@@ -1,46 +1,50 @@
-import request from '@/config/axios'
-
-// 设备人员关联 VO
-export interface DeviceuserVO {
- id: number // 主键ID
- deviceid: number // 设备ID
- userid: number // 用户ID
- createtime: Date // 创建时间
- updatetime: Date // 更新时间
- createby: string // 创建人
- updateby: string // 更新人
- username: string // 用户姓名
-}
-
-// 设备人员关联 API
-export const DeviceuserApi = {
- // 查询设备人员关联分页
- getDeviceuserPage: async (params: any) => {
- return await request.get({ url: `/system/deviceuser/page`, params })
- },
-
- // 查询设备人员关联详情
- getDeviceuser: async (id: number) => {
- return await request.get({ url: `/system/deviceuser/get?id=` + id })
- },
-
- // 新增设备人员关联
- createDeviceuser: async (data: DeviceuserVO) => {
- return await request.post({ url: `/system/deviceuser/create`, data })
- },
-
- // 修改设备人员关联
- updateDeviceuser: async (data: DeviceuserVO) => {
- return await request.put({ url: `/system/deviceuser/update`, data })
- },
-
- // 删除设备人员关联
- deleteDeviceuser: async (id: number) => {
- return await request.delete({ url: `/system/deviceuser/delete?id=` + id })
- },
-
- // 导出设备人员关联 Excel
- exportDeviceuser: async (params) => {
- return await request.download({ url: `/system/deviceuser/export-excel`, params })
- },
-}
\ No newline at end of file
+import request from '@/config/axios'
+
+// 设备人员关联 VO
+export interface DeviceuserVO {
+ id: number // 主键ID
+ deviceid: number // 设备ID
+ userid: number // 用户ID
+ createtime: Date // 创建时间
+ updatetime: Date // 更新时间
+ createby: string // 创建人
+ updateby: string // 更新人
+ username: string // 用户姓名
+}
+
+// 设备人员关联 API
+export const DeviceuserApi = {
+ // 查询设备人员关联分页
+ getDeviceuserPage: async (params: any) => {
+ return await request.get({ url: `/system/deviceuser/page`, params })
+ },
+
+ // 查询设备人员关联详情
+ getDeviceuser: async (id: number) => {
+ return await request.get({ url: `/system/deviceuser/get?id=` + id })
+ },
+ // 查询设备人员关联数量
+ getDevCount: async (devicecode: number) => {
+ return await request.get({ url: `/system/deviceuser/getDevCount?devicecode=` + devicecode })
+ },
+
+ // 新增设备人员关联
+ createDeviceuser: async (data: DeviceuserVO) => {
+ return await request.post({ url: `/system/deviceuser/create`, data })
+ },
+
+ // 修改设备人员关联
+ updateDeviceuser: async (data: DeviceuserVO) => {
+ return await request.put({ url: `/system/deviceuser/update`, data })
+ },
+
+ // 删除设备人员关联
+ deleteDeviceuser: async (id: number) => {
+ return await request.delete({ url: `/system/deviceuser/delete?id=` + id })
+ },
+
+ // 导出设备人员关联 Excel
+ exportDeviceuser: async (params) => {
+ return await request.download({ url: `/system/deviceuser/export-excel`, params })
+ }
+}
diff --git a/src/views/devices/DetailsForm.vue b/src/views/devices/DetailsForm.vue
index 06aab1af..b81fe860 100644
--- a/src/views/devices/DetailsForm.vue
+++ b/src/views/devices/DetailsForm.vue
@@ -5,13 +5,14 @@
v-loading="formLoading"
:model="formData"
label-width="100px"
- :disabled="true"
+ :disabled="!isEditing"
>
{{ formData.devicecode }}
- {{ formData.devicename }}
+
+ {{ formData.devicename }}
{{ formData.orgname }}
@@ -19,18 +20,37 @@
{{ getDeviceTypeName(formData.devicetype) }}
-
- {{ formData.location }}
+
+
+
+
+
+ {{ fullLocation }}
{{ getDeviceStatusName(formData.devicestatus) }}
- {{ formData.description }}
+
+ {{ formData.description }}
- 关 闭
+ 编 辑
+ 保 存
+ 关 闭
@@ -38,6 +58,8 @@
+
+
diff --git a/src/views/devices/DevFrom.vue b/src/views/devices/DevFrom.vue
index de4c096f..12c117a5 100644
--- a/src/views/devices/DevFrom.vue
+++ b/src/views/devices/DevFrom.vue
@@ -1,5 +1,12 @@
-