|
@@ -215,6 +215,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
|
import {buildSortingField} from "@/utils";
|
|
import {buildSortingField} from "@/utils";
|
|
import {defaultProps, handleTree} from "@/utils/tree";
|
|
import {defaultProps, handleTree} from "@/utils/tree";
|
|
import * as ProductClassifyApi from "@/api/pms/productclassify";
|
|
import * as ProductClassifyApi from "@/api/pms/productclassify";
|
|
|
|
+import { useRefreshStore } from '@/store/modules/pms/refreshStore';
|
|
|
|
|
|
/** 设备台账 列表 */
|
|
/** 设备台账 列表 */
|
|
defineOptions({ name: 'IotDevicePms' })
|
|
defineOptions({ name: 'IotDevicePms' })
|
|
@@ -223,6 +224,7 @@ const message = useMessage() // 消息弹窗
|
|
const { t } = useI18n() // 国际化
|
|
const { t } = useI18n() // 国际化
|
|
const { push } = useRouter() // 路由跳转
|
|
const { push } = useRouter() // 路由跳转
|
|
|
|
|
|
|
|
+const refreshStore = useRefreshStore();
|
|
const loading = ref(true) // 列表的加载中
|
|
const loading = ref(true) // 列表的加载中
|
|
const ifShow = ref(false)
|
|
const ifShow = ref(false)
|
|
const isDetail = ref(false) // 是否查看详情
|
|
const isDetail = ref(false) // 是否查看详情
|
|
@@ -322,14 +324,14 @@ const formRef = ref()
|
|
const openForm = (type: string, id?: number,deptId?:number) => {
|
|
const openForm = (type: string, id?: number,deptId?:number) => {
|
|
//修改
|
|
//修改
|
|
if (typeof id === 'number') {
|
|
if (typeof id === 'number') {
|
|
- push({ name: 'DeviceDetailEdit', params: { type,id } })
|
|
|
|
|
|
+ push({ name: 'DeviceDetailEdit', params: { type,id }, query:{source:'devicerouter'} })
|
|
return
|
|
return
|
|
}
|
|
}
|
|
// 新增
|
|
// 新增
|
|
if (deptId) {
|
|
if (deptId) {
|
|
- push({ name: 'DeviceDetailAdd', params: {type,deptId} })
|
|
|
|
|
|
+ push({ name: 'DeviceDetailAdd', params: {type,deptId}, query:{source:'devicerouter'} })
|
|
}else {
|
|
}else {
|
|
- push({ name: 'DeviceDetailAddd', params: {} })
|
|
|
|
|
|
+ push({ name: 'DeviceDetailAddd', params: {} ,query:{source:'devicerouter'}})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -380,6 +382,8 @@ onMounted(async () => {
|
|
}
|
|
}
|
|
queryParams.sortingFields.push(sort);
|
|
queryParams.sortingFields.push(sort);
|
|
await getList()
|
|
await getList()
|
|
|
|
+ refreshStore.registerCallback('devicerouter', getList);
|
|
|
|
+
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
<style scoped></style>
|
|
<style scoped></style>
|