|
@@ -188,14 +188,14 @@
|
|
|
import { IotDeviceVO } from '@/api/pms/device'
|
|
import { IotDeviceVO } from '@/api/pms/device'
|
|
|
import IotInfoFormTree from '@/views/pms/iotinfo/IotInfoFormTree.vue'
|
|
import IotInfoFormTree from '@/views/pms/iotinfo/IotInfoFormTree.vue'
|
|
|
import * as IotInfoApi from '@/api/pms/iotinfo'
|
|
import * as IotInfoApi from '@/api/pms/iotinfo'
|
|
|
-import { ref, onMounted, onUnmounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
|
|
|
|
|
-import PmsTree from '@/views/system/tree/PmsTree.vue'
|
|
|
|
|
|
|
+import PmsTree from './PmsTree.vue'
|
|
|
import { useCache } from '@/hooks/web/useCache'
|
|
import { useCache } from '@/hooks/web/useCache'
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
|
|
import { IotInfoClassifyApi } from '@/api/pms/info'
|
|
import { IotInfoClassifyApi } from '@/api/pms/info'
|
|
|
import { IotTreeApi } from '@/api/system/tree'
|
|
import { IotTreeApi } from '@/api/system/tree'
|
|
|
-defineOptions({ name: 'IotTree' })
|
|
|
|
|
|
|
+defineOptions({ name: 'QHSEFile' })
|
|
|
|
|
|
|
|
const container = ref(null)
|
|
const container = ref(null)
|
|
|
const leftWidth = ref(350) // 初始左侧宽度
|
|
const leftWidth = ref(350) // 初始左侧宽度
|
|
@@ -217,9 +217,6 @@ const openWeb = (url) => {
|
|
|
'http://1.94.244.160:8012/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))
|
|
'http://1.94.244.160:8012/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
-const handleView = (row) => {
|
|
|
|
|
- openForm('detail', row.id)
|
|
|
|
|
-}
|
|
|
|
|
const startDrag = (e) => {
|
|
const startDrag = (e) => {
|
|
|
isDragging = true
|
|
isDragging = true
|
|
|
document.addEventListener('mousemove', onDrag)
|
|
document.addEventListener('mousemove', onDrag)
|
|
@@ -316,22 +313,7 @@ const deleteInfo = async (id) => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-// const handleFileView = (url: string) => {
|
|
|
|
|
-// window.open(
|
|
|
|
|
-// 'http://1.94.244.160:8012/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))
|
|
|
|
|
-// )
|
|
|
|
|
-// }
|
|
|
|
|
-const handleDelete = async (id: number) => {
|
|
|
|
|
- try {
|
|
|
|
|
- // 删除的二次确认
|
|
|
|
|
- await message.delConfirm()
|
|
|
|
|
- // 发起删除
|
|
|
|
|
- await IotInfoApi.IotInfoApi.deleteIotInfo(id)
|
|
|
|
|
- message.success(t('common.delSuccess'))
|
|
|
|
|
- // 刷新列表
|
|
|
|
|
- await getList()
|
|
|
|
|
- } catch {}
|
|
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
const formRef = ref()
|
|
const formRef = ref()
|
|
|
const openForm = async (type: string, id?: number) => {
|
|
const openForm = async (type: string, id?: number) => {
|
|
|
// if (classType.value==='dept'){
|
|
// if (classType.value==='dept'){
|
|
@@ -462,42 +444,6 @@ const handleBreadcrumbClick = async (index) => {
|
|
|
formLoading.value = false
|
|
formLoading.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// const handleFileNodeClick = async (row) => {
|
|
|
|
|
-// queryParams.classId = row.id
|
|
|
|
|
-// classType.value = row.type
|
|
|
|
|
-// if (row.type==='device') {
|
|
|
|
|
-// deviceId.value = row.originId
|
|
|
|
|
-// const queryParam = {
|
|
|
|
|
-// deviceId: row.originId,
|
|
|
|
|
-// pageNo: 1,
|
|
|
|
|
-// pagesize: 10,
|
|
|
|
|
-// }
|
|
|
|
|
-// const data = await IotInfoClassifyApi.getIotInfoClassifyPage(queryParam)
|
|
|
|
|
-// debugger
|
|
|
|
|
-// if (data){
|
|
|
|
|
-// const target = data.filter((item)=> item.parentId===0)
|
|
|
|
|
-// clickNodeId.value = target[0].id
|
|
|
|
|
-// }
|
|
|
|
|
-// } else if (row.type === 'file'){
|
|
|
|
|
-// clickNodeId.value = row.originId
|
|
|
|
|
-// } else if (row.type==='dept') {
|
|
|
|
|
-// // message.error("请选择设备及文件节点")
|
|
|
|
|
-// // return
|
|
|
|
|
-// }
|
|
|
|
|
-// nodeId.value = row.id
|
|
|
|
|
-// await getList()
|
|
|
|
|
-// }
|
|
|
|
|
-/** 获得详情 */
|
|
|
|
|
-// const getDetail = async () => {
|
|
|
|
|
-// if (id) {
|
|
|
|
|
-// formLoading.value = true
|
|
|
|
|
-// try {
|
|
|
|
|
-// formData.value = (await IotDeviceApi.getIotDevice(id)) as IotDeviceVO
|
|
|
|
|
-// } finally {
|
|
|
|
|
-// formLoading.value = false
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
/** 查询列表 */
|
|
/** 查询列表 */
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
|
formLoading.value = true
|
|
formLoading.value = true
|