|
@@ -74,6 +74,14 @@ import { getCameraPagging, delCamera, addCamera, Camera } from "@/store/camera";
|
|
|
import { confirm } from "@/helper/message";
|
|
import { confirm } from "@/helper/message";
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
import { cameraTypeDesc } from "@/constant/camera";
|
|
import { cameraTypeDesc } from "@/constant/camera";
|
|
|
|
|
+import { user } from "@/store/user";
|
|
|
|
|
+import { computed } from "vue";
|
|
|
|
|
+
|
|
|
|
|
+const canShowAll = computed(() => {
|
|
|
|
|
+ const roleList = user.value.info?.roleList || [];
|
|
|
|
|
+ return roleList.includes("admin") || roleList.includes("admin-super");
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const { state, queryReset, refresh, changPageCurrent, changPageSize, add } = usePagging({
|
|
const { state, queryReset, refresh, changPageCurrent, changPageSize, add } = usePagging({
|
|
|
get: getCameraPagging,
|
|
get: getCameraPagging,
|
|
@@ -82,7 +90,7 @@ const { state, queryReset, refresh, changPageCurrent, changPageSize, add } = use
|
|
|
deptId: "",
|
|
deptId: "",
|
|
|
snCode: "",
|
|
snCode: "",
|
|
|
type: "2",
|
|
type: "2",
|
|
|
- searchType: "0",
|
|
|
|
|
|
|
+ searchType: canShowAll.value ? "2" : "0",
|
|
|
searchKey: "",
|
|
searchKey: "",
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|