Merge remote-tracking branch 'origin/master'
| | |
| | | # @Author : yuan |
| | | # @Date : 2026-01-31 14:34:31 |
| | | # @LastEditors : yuan |
| | | # @LastEditTime : 2026-01-31 14:49:37 |
| | | # @LastEditTime : 2026-01-31 15:18:17 |
| | | # @FilePath : \applications\drone-command\env\.env.development |
| | | # @Description : |
| | | # Copyright 2026 OBKoro1, All Rights Reserved. |
| | |
| | | |
| | | #开发环境代理地址(推荐本地新建文件 .env.development.local 来进行覆盖) |
| | | # VITE_APP_URL=https://wrj.shuixiongit.com/api |
| | | VITE_APP_URL=http://192.168.1.204 |
| | | VITE_APP_URL=http://192.168.1.33 |
| | | |
| | | #新大屏地址 |
| | | VITE_APP_DASHBOARD_URL='https://wrj.shuixiongit.com/command-center-dashboard/' |
| | |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .el-checkbox__input.is-checked .el-checkbox__inner { |
| | | background-color: #023aff !important; |
| | | border-color: #023aff !important; |
| | | } |
| | | .el-checkbox__input { |
| | | .el-checkbox__inner { |
| | | width: 16px; |
| | | height: 16px; |
| | | background: transparent !important; |
| | | border-radius: 2px 2px 2px 2px; |
| | | border: 2px solid #A1A3D4 !important; |
| | | box-shadow: none; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .el-checkbox__inner { |
| | | width: 16px; |
| | | height: 16px; |
| | | background: transparent !important; |
| | | border-radius: 2px 2px 2px 2px; |
| | | border: 2px solid #A1A3D4 !important; |
| | | box-shadow: none; |
| | | box-sizing: border-box; |
| | | &.is-checked { |
| | | .el-checkbox__inner { |
| | | border: none !important; |
| | | background: url("@/assets/images/common/checkbox.png") no-repeat center / 100% 100% !important; |
| | | |
| | | &::after { |
| | | content: none !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | this.container = viewer?.container || null |
| | | this.tooltipEl = null |
| | | this.isVisible = false |
| | | this.handleMouseLeave = this.handleMouseLeave.bind(this) |
| | | this.init() |
| | | } |
| | | |
| | |
| | | el.style.display = 'none' |
| | | this.container.appendChild(el) |
| | | this.tooltipEl = el |
| | | this.container.addEventListener('mouseleave', this.handleMouseLeave) |
| | | this.container.addEventListener('pointerleave', this.handleMouseLeave) |
| | | } |
| | | |
| | | show(text, position) { |
| | |
| | | |
| | | move(position) { |
| | | if (!this.tooltipEl || !position) return |
| | | const width = this.container?.clientWidth ?? 0 |
| | | const height = this.container?.clientHeight ?? 0 |
| | | if ( |
| | | !width || |
| | | !height || |
| | | position.x < 0 || |
| | | position.y < 0 || |
| | | position.x > width || |
| | | position.y > height |
| | | ) { |
| | | this.hide() |
| | | return |
| | | } |
| | | const offset = this.options.offset || { x: 12, y: 12 } |
| | | this.tooltipEl.style.left = `${position.x + offset.x}px` |
| | | this.tooltipEl.style.top = `${position.y + offset.y}px` |
| | |
| | | this.isVisible = false |
| | | } |
| | | |
| | | handleMouseLeave() { |
| | | this.hide() |
| | | } |
| | | |
| | | destroy() { |
| | | this.hide() |
| | | if (this.container) { |
| | | this.container.removeEventListener('mouseleave', this.handleMouseLeave) |
| | | this.container.removeEventListener('pointerleave', this.handleMouseLeave) |
| | | } |
| | | if (this.tooltipEl && this.container) { |
| | | this.container.removeChild(this.tooltipEl) |
| | | } |
| | |
| | | v-model="formData.areaCode" |
| | | node-key="id" |
| | | :default-expanded-keys="expandedKeys" |
| | | :props="{ |
| | | value: 'id', |
| | | label: 'name', |
| | | children: 'children' |
| | | }" |
| | | :props="treeSelectProps" |
| | | placeholder="请选择" |
| | | clearable |
| | | filterable |
| | |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' }) |
| | | const expandedKeys = ref([]) // 树形选择器展开的节点 |
| | | const regionNodeCache = ref(new Map()) // 缓存区域节点及其父节点关系 |
| | | |
| | | const treeSelectProps = ref({ |
| | | value: 'id', |
| | | label: 'name', |
| | | children: 'children', |
| | | // 判断叶子节点 |
| | | isLeaf: (data, node) => { |
| | | // 如果是第二级节点,则认为是叶子节点 |
| | | return node.level >= 2 |
| | | } |
| | | }) |
| | | const rules = { |
| | | deptName: fieldRules(true), |
| | | areaCode: fieldRules(true), |
| | |
| | | const treeSelectProps = { |
| | | value: 'id', |
| | | label: 'name', |
| | | children: 'children' |
| | | children: 'children', |
| | | // 添加isLeaf配置,告诉组件如何判断叶子节点 |
| | | isLeaf: (data, node) => { |
| | | return data.leaf === true |
| | | } |
| | | } |
| | | // 导入机构相关 |
| | | const isShowImportView = ref(false) |
| | |
| | | |
| | | // 懒加载获取区域节点数据 |
| | | async function loadRegionNode(node, resolve) { |
| | | |
| | | try { |
| | | // 限制只加载两级,当前节点 level >= 1 时不加载子节点 |
| | | if (node.level >= 2) { |
| | |
| | | |
| | | // 处理返回的节点数据 |
| | | const processedNodes = nodes.map(item => { |
| | | // 判断是否为叶子节点:如果是第二级(node.level === 1)则为叶子节点 |
| | | const isLeaf = node.level === 1 |
| | | |
| | | return { |
| | | id: item.id || item.value, |
| | | name: item.name || item.title || item.label, |
| | | hasChildren: item.hasChildren || false |
| | | hasChildren: item.hasChildren || false, |
| | | // 关键:设置leaf属性,告知Tree组件该节点是否为叶子节点 |
| | | leaf: isLeaf |
| | | } |
| | | }) |
| | | |
| | |
| | | v-model="formData.parentCode" |
| | | node-key="id" |
| | | :default-expanded-keys="expandedKeys" |
| | | :props="{ |
| | | value: 'id', |
| | | label: 'name', |
| | | children: 'children' |
| | | }" |
| | | :props="treeSelectProps" |
| | | placeholder="请选择" |
| | | clearable |
| | | filterable |
| | |
| | | zoningDetailApi, |
| | | regionLazyTreeApi |
| | | } from './zoningApi' |
| | | |
| | | const treeSelectProps = ref({ |
| | | value: 'id', |
| | | label: 'name', |
| | | children: 'children', |
| | | // 判断叶子节点 |
| | | isLeaf: (data, node) => { |
| | | // 如果是第二级节点,则认为是叶子节点 |
| | | return node.level >= 2 |
| | | } |
| | | }) |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | | code: '', |