diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue
index 808658a..71358c1 100644
--- a/src/components/RightToolbar/index.vue
+++ b/src/components/RightToolbar/index.vue
@@ -2,13 +2,9 @@
-
+
@@ -22,9 +18,9 @@
-
-
-
+
+
+
diff --git a/src/components/Select/SelectOrgTree.vue b/src/components/Select/SelectOrgTree.vue
new file mode 100644
index 0000000..382846c
--- /dev/null
+++ b/src/components/Select/SelectOrgTree.vue
@@ -0,0 +1,360 @@
+
+
+
+
+ 顶级组织
+ {{ data.treeLabel || data.name || data.orgName || node.label
+ }}
+ {{ data.orgCode }}
+
+
+
+
+
+
+
+
diff --git a/src/components/index.ts b/src/components/index.ts
index 99370d4..1427835 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -1,130 +1,135 @@
-import Pagination from '/@/components/Pagination/index.vue';
-import RightToolbar from '/@/components/RightToolbar/index.vue';
-import DictTag from '/@/components/DictTag/index.vue';
-import DictSelect from '/@/components/DictTag/Select.vue';
-import UploadExcel from '/@/components/Upload/Excel.vue';
-import UploadFile from '/@/components/Upload/index.vue';
-import UploadImg from '/@/components/Upload/Image.vue';
-import DelWrap from '/@/components/DelWrap/index.vue';
-import Editor from '/@/components/Editor/index.vue';
-import Tip from '/@/components/Tip/index.vue';
-import TagList from '/@/components/TagList/index.vue';
-import SvgIcon from '/@/components/SvgIcon/index.vue';
-import Sign from '/@/components/Sign/index.vue';
-import ChinaArea from '/@/components/ChinaArea/index.vue';
-import OrgSelector from '/@/components/OrgSelector/index.vue';
+import Pagination from "/@/components/Pagination/index.vue";
+import RightToolbar from "/@/components/RightToolbar/index.vue";
+import DictTag from "/@/components/DictTag/index.vue";
+import DictSelect from "/@/components/DictTag/Select.vue";
+import UploadExcel from "/@/components/Upload/Excel.vue";
+import UploadFile from "/@/components/Upload/index.vue";
+import UploadImg from "/@/components/Upload/Image.vue";
+import DelWrap from "/@/components/DelWrap/index.vue";
+import Editor from "/@/components/Editor/index.vue";
+import Tip from "/@/components/Tip/index.vue";
+import TagList from "/@/components/TagList/index.vue";
+import SvgIcon from "/@/components/SvgIcon/index.vue";
+import Sign from "/@/components/Sign/index.vue";
+import ChinaArea from "/@/components/ChinaArea/index.vue";
+import OrgSelector from "/@/components/OrgSelector/index.vue";
-import DraggableDeptTree from "/@/components/DraggableDeptTree/index.vue"
-import DraggableOrgTree from "/@/components/DraggableOrgTree/index.vue"
-import DraggableDeviceGroup from "/@/components/DraggableDeviceGroup/index.vue"
-import DraggableDeviceGroupDraggable from "/@/components/DraggableDeviceGroupDraggable/index.vue"
+import DraggableDeptTree from "/@/components/DraggableDeptTree/index.vue";
+import DraggableOrgTree from "/@/components/DraggableOrgTree/index.vue";
+import DraggableDeviceGroup from "/@/components/DraggableDeviceGroup/index.vue";
+import DraggableDeviceGroupDraggable from "/@/components/DraggableDeviceGroupDraggable/index.vue";
-import PreviewImage from "/@/components/PreviewImage/index.vue"
+import PreviewImage from "/@/components/PreviewImage/index.vue";
-import TagOnline from "/@/components/Tag/TagOnline.vue"
-import TagSex from "/@/components/Tag/TagSex.vue"
-import TagSync from "/@/components/Tag/TagSync.vue"
-import TagUserStatus from "/@/components/Tag/TagUserStatus.vue"
+import TagOnline from "/@/components/Tag/TagOnline.vue";
+import TagSex from "/@/components/Tag/TagSex.vue";
+import TagSync from "/@/components/Tag/TagSync.vue";
+import TagUserStatus from "/@/components/Tag/TagUserStatus.vue";
-import SelectArea from "/@/components/Select/SelectArea.vue"
-import SelectDevice from "/@/components/Select/SelectDevice.vue"
-import SelectDeviceGroup from "/@/components/Select/SelectDeviceGroup.vue"
-import SelectDuty from "/@/components/Select/SelectDuty.vue"
-import SelectDutyType from "/@/components/Select/SelectDutyType.vue"
-import SelectTreeChannel from "/@/components/Select/SelectTreeChannel.vue"
-import SelectTreeChannelRadio from "/@/components/Select/SelectTreeChannelRadio.vue"
-import SelectTreeDept from "/@/components/Select/SelectTreeDept.vue"
-import SelectDeviceTree from "/@/components/Select/SelectDeviceTree.vue"
-import SelectAreaType from "/@/components/Select/SelectAreaType.vue"
-import SelectPersonCarType from "/@/components/Select/SelectPersonCarType.vue"
-import SelectPerson from "/@/components/Select/SelectPerson.vue"
+import SelectArea from "/@/components/Select/SelectArea.vue";
+import SelectDevice from "/@/components/Select/SelectDevice.vue";
+import SelectDeviceGroup from "/@/components/Select/SelectDeviceGroup.vue";
+import SelectDuty from "/@/components/Select/SelectDuty.vue";
+import SelectDutyType from "/@/components/Select/SelectDutyType.vue";
+import SelectTreeChannel from "/@/components/Select/SelectTreeChannel.vue";
+import SelectTreeChannelRadio from "/@/components/Select/SelectTreeChannelRadio.vue";
+import SelectTreeDept from "/@/components/Select/SelectTreeDept.vue";
+import SelectOrgTree from "/@/components/Select/SelectOrgTree.vue";
+import SelectDeviceTree from "/@/components/Select/SelectDeviceTree.vue";
+import SelectAreaType from "/@/components/Select/SelectAreaType.vue";
+import SelectPersonCarType from "/@/components/Select/SelectPersonCarType.vue";
+import SelectPerson from "/@/components/Select/SelectPerson.vue";
-import ColumnBtn from "/@/components/Column/ColumnBtn.vue"
+import ColumnBtn from "/@/components/Column/ColumnBtn.vue";
-import PreviewJson from "/@/components/PreviewJson/index.vue"
+import PreviewJson from "/@/components/PreviewJson/index.vue";
-import RtspPluginVideo from "/@/components/rtsp-plugin-video/video-plugin.vue"
+import RtspPluginVideo from "/@/components/rtsp-plugin-video/video-plugin.vue";
// 第三方组件
-import ElementPlus from 'element-plus';
-import * as ElementPlusIconsVue from '@element-plus/icons-vue';
-import 'element-plus/dist/index.css';
-import { Pane, Splitpanes } from 'splitpanes';
-import 'splitpanes/dist/splitpanes.css';
+import ElementPlus from "element-plus";
+import * as ElementPlusIconsVue from "@element-plus/icons-vue";
+import "element-plus/dist/index.css";
+import { Pane, Splitpanes } from "splitpanes";
+import "splitpanes/dist/splitpanes.css";
// 日历组件
-import { setupCalendar } from 'v-calendar';
+import { setupCalendar } from "v-calendar";
// 部门树组件
-import vue3TreeOrg from 'vue3-tree-org';
-import 'vue3-tree-org/lib/vue3-tree-org.css';
+import vue3TreeOrg from "vue3-tree-org";
+import "vue3-tree-org/lib/vue3-tree-org.css";
// 导入 FcDesigner
-import FcDesigner from 'form-create-designer';
+import FcDesigner from "form-create-designer";
// 导入声明
-import { App } from 'vue';
+import { App } from "vue";
export default {
- install(app: App) {
- app.component('DictTag', DictTag);
- app.component('DictSelect', DictSelect);
- app.component('Pagination', Pagination);
- app.component('RightToolbar', RightToolbar);
- app.component('uploadExcel', UploadExcel);
- app.component('UploadFile', UploadFile);
- app.component('UploadImg', UploadImg);
- app.component('Editor', Editor);
- app.component('Tip', Tip);
- app.component('DelWrap', DelWrap);
- app.component('TagList', TagList);
- app.component('SvgIcon', SvgIcon);
- app.component('ChinaArea', ChinaArea);
- app.component('OrgSelector', OrgSelector);
- app.component('Sign', Sign);
- app.component('PreviewImage', PreviewImage)
+ install(app: App) {
+ app.component("DictTag", DictTag);
+ app.component("DictSelect", DictSelect);
+ app.component("Pagination", Pagination);
+ app.component("RightToolbar", RightToolbar);
+ app.component("uploadExcel", UploadExcel);
+ app.component("UploadFile", UploadFile);
+ app.component("UploadImg", UploadImg);
+ app.component("Editor", Editor);
+ app.component("Tip", Tip);
+ app.component("DelWrap", DelWrap);
+ app.component("TagList", TagList);
+ app.component("SvgIcon", SvgIcon);
+ app.component("ChinaArea", ChinaArea);
+ app.component("OrgSelector", OrgSelector);
+ app.component("Sign", Sign);
+ app.component("PreviewImage", PreviewImage);
- app.component('DraggableDeptTree', DraggableDeptTree)
- app.component('DraggableOrgTree', DraggableOrgTree)
- app.component('DraggableDeviceGroup', DraggableDeviceGroup)
- app.component('DraggableDeviceGroupDraggable', DraggableDeviceGroupDraggable)
+ app.component("DraggableDeptTree", DraggableDeptTree);
+ app.component("DraggableOrgTree", DraggableOrgTree);
+ app.component("DraggableDeviceGroup", DraggableDeviceGroup);
+ app.component(
+ "DraggableDeviceGroupDraggable",
+ DraggableDeviceGroupDraggable
+ );
- app.component('TagOnline', TagOnline);
- app.component('TagSex', TagSex);
- app.component('TagSync', TagSync);
- app.component('TagUserStatus', TagUserStatus);
+ app.component("TagOnline", TagOnline);
+ app.component("TagSex", TagSex);
+ app.component("TagSync", TagSync);
+ app.component("TagUserStatus", TagUserStatus);
- app.component('SelectArea', SelectArea);
- app.component('SelectDevice', SelectDevice);
- app.component('SelectDeviceGroup', SelectDeviceGroup)
- app.component('SelectDuty', SelectDuty);
- app.component('SelectDutyType', SelectDutyType);
- app.component('SelectTreeChannel', SelectTreeChannel);
- app.component('SelectTreeChannelRadio', SelectTreeChannelRadio);
- app.component('SelectTreeDept', SelectTreeDept);
- app.component('SelectDeviceTree', SelectDeviceTree);
- app.component('SelectAreaType', SelectAreaType);
- app.component('SelectPersonCarType', SelectPersonCarType);
- app.component('SelectPerson', SelectPerson);
+ app.component("SelectArea", SelectArea);
+ app.component("SelectDevice", SelectDevice);
+ app.component("SelectDeviceGroup", SelectDeviceGroup);
+ app.component("SelectDuty", SelectDuty);
+ app.component("SelectDutyType", SelectDutyType);
+ app.component("SelectTreeChannel", SelectTreeChannel);
+ app.component("SelectTreeChannelRadio", SelectTreeChannelRadio);
+ app.component("SelectTreeDept", SelectTreeDept);
+ app.component("SelectOrgTree", SelectOrgTree);
+ app.component("SelectDeviceTree", SelectDeviceTree);
+ app.component("SelectAreaType", SelectAreaType);
+ app.component("SelectPersonCarType", SelectPersonCarType);
+ app.component("SelectPerson", SelectPerson);
- app.component('ColumnBtn', ColumnBtn);
+ app.component("ColumnBtn", ColumnBtn);
- app.component('PreviewJson', PreviewJson);
+ app.component("PreviewJson", PreviewJson);
- app.component('RtspPluginVideo', RtspPluginVideo)
+ app.component("RtspPluginVideo", RtspPluginVideo);
- // 导入全部的elmenet-plus的图标
- for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
- app.component(key, component);
- // 兼容性
- app.component(`ele-${key}`, component);
- }
- // 导入布局插件
- app.component('Splitpanes', Splitpanes);
- app.component('Pane', Pane);
- app.use(ElementPlus); // ELEMENT 组件
- app.use(setupCalendar, {}); // 日历组件
- app.use(vue3TreeOrg); // 组织架构组件
- app.use(FcDesigner);
- app.use(FcDesigner.formCreate);
- },
+ // 导入全部的elmenet-plus的图标
+ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
+ app.component(key, component);
+ // 兼容性
+ app.component(`ele-${key}`, component);
+ }
+ // 导入布局插件
+ app.component("Splitpanes", Splitpanes);
+ app.component("Pane", Pane);
+ app.use(ElementPlus); // ELEMENT 组件
+ app.use(setupCalendar, {}); // 日历组件
+ app.use(vue3TreeOrg); // 组织架构组件
+ app.use(FcDesigner);
+ app.use(FcDesigner.formCreate);
+ },
};
diff --git a/src/views/admin/log/index.vue b/src/views/admin/log/index.vue
index 6bfc3e7..94b8999 100644
--- a/src/views/admin/log/index.vue
+++ b/src/views/admin/log/index.vue
@@ -2,25 +2,19 @@
-
+
-
-
+
+
-
+
{{ $t('common.queryBtn') }}
@@ -32,31 +26,18 @@
+ icon="Delete" type="primary">
{{ $t('common.delBtn') }}
-
+
-
-
-
+
+
+
@@ -71,44 +52,44 @@
+ width="200">
+ width="200">
{{ $t('common.detailBtn') }}
+ type="primary">
{{ $t('common.delBtn') }}
-
+
+
+
+
diff --git a/src/views/device/detail/components/device-channer.vue b/src/views/device/detail/components/device-channer.vue
index ef53284..085a655 100644
--- a/src/views/device/detail/components/device-channer.vue
+++ b/src/views/device/detail/components/device-channer.vue
@@ -1,7 +1,17 @@
+
+ :header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle">
+
@@ -26,14 +36,28 @@
未安装
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
\ No newline at end of file
+
diff --git a/src/views/device/deviceCamera/index.vue b/src/views/device/deviceCamera/index.vue
index ca178f5..e26af53 100644
--- a/src/views/device/deviceCamera/index.vue
+++ b/src/views/device/deviceCamera/index.vue
@@ -16,6 +16,9 @@
+
+
+
{{ $t('common.queryBtn') }}
@@ -34,6 +37,9 @@
v-auth="'admin_deviceManage_del'" @click="handleDelete(selectObjs)">
删除
+
+ 导 入
+
@@ -113,6 +119,8 @@
+
@@ -138,6 +146,7 @@ const formDialogRef = ref()
const previewVideoRef = ref()
const replayVideoDialogRef = ref()
// 搜索变量
+const uploadExcelRef = ref()
const queryRef = ref()
const showSearch = ref(true)
// 多选变量
diff --git a/src/views/device/deviceManage/index.vue b/src/views/device/deviceManage/index.vue
index 5c824fe..bf3fe00 100644
--- a/src/views/device/deviceManage/index.vue
+++ b/src/views/device/deviceManage/index.vue
@@ -30,13 +30,13 @@
v-auth="'admin_deviceManage_add'">
新 增
-
- 导 入
-
删除
+
+ 导 入
+
diff --git a/src/views/sys/sysOrg/form.vue b/src/views/sys/sysOrg/form.vue
index 81abcf2..e52d3dc 100644
--- a/src/views/sys/sysOrg/form.vue
+++ b/src/views/sys/sysOrg/form.vue
@@ -2,96 +2,41 @@
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -107,7 +52,6 @@
import { useDict } from '/@/hooks/dict';
import { useMessage } from "/@/hooks/message";
import { getObj, addObj, putObj } from '/@/api/sys/sysOrg'
-import { rule } from '/@/utils/validate';
const emit = defineEmits(['refresh']);
// 定义变量内容
@@ -115,14 +59,15 @@ const dataFormRef = ref();
const visible = ref(false)
const loading = ref(false)
// 定义字典
+const { dh_org_type } = useDict("dh_org_type")
-// 提交表单数据
-const form = reactive({
+const defaultForm = {
id: '',
orgCode: '',
orgName: '',
orgSn: '',
- orgType: '',
+ orgType: 'org_base',
+ orgPreCode: '',
province: '',
city: '',
county: '',
@@ -134,16 +79,30 @@ const form = reactive({
forbidBindUser: '',
forbidBindService: '',
isSync: '',
-});
+}
+
+const createForm = () => ({
+ ...defaultForm,
+})
+
+// 提交表单数据
+const form = reactive(createForm());
// 定义校验规则
const dataRules = ref({
+ orgCode: [{ required: true, message: '组织编码不能为空', trigger: 'blur' }],
+ orgName: [{ required: true, message: '组织名称不能为空', trigger: 'blur' }],
+ orgType: [{ required: true, message: '组织类型不能为空', trigger: 'change' }],
})
+const resetForm = () => {
+ Object.assign(form, createForm());
+}
+
// 打开弹窗
-const openDialog = (id: string) => {
+const openDialog = (id = '') => {
visible.value = true
- form.id = ''
+ resetForm()
// 重置表单数据
nextTick(() => {
@@ -177,18 +136,24 @@ const onSubmit = async () => {
// 初始化表单数据
-const getsysOrgData = (id: string) => {
- // 获取数据
- loading.value = true
- getObj(id).then((res: any) => {
+const getsysOrgData = async (id: string) => {
+ try {
+ loading.value = true
+ const res: any = await getObj(id)
+ // default
+ if (!res.data.orgType) {
+ res.data.orgType = defaultForm.orgType
+ }
Object.assign(form, res.data)
- }).finally(() => {
+ } catch (err: any) {
+ useMessage().error(err.msg);
+ } finally {
loading.value = false
- })
+ }
};
// 暴露变量
defineExpose({
openDialog
});
-
\ No newline at end of file
+
diff --git a/src/views/sys/sysOrg/index.vue b/src/views/sys/sysOrg/index.vue
index 47c5292..d1c344b 100644
--- a/src/views/sys/sysOrg/index.vue
+++ b/src/views/sys/sysOrg/index.vue
@@ -1,10 +1,11 @@
-
+
+ class="flex gap-4 items-center p-3 border-2 rounded-lg mt-1 cursor-pointer transition-colors hover:border-blue-300"
+ v-for="(v, i) in data.topList" :key="getNodeKey(v, i)" @click="handleTopOrgClick(v, i)">
@@ -43,6 +44,18 @@
+
+
组织详情
+
+ 新增
+ 编辑
+ 删除
+
+
+
@@ -65,6 +78,11 @@
+
+
+
+
+
@@ -72,49 +90,55 @@
-
+