吉安感知网项目-前端
罗广辉
2026-02-03 a7ae744cb34b46b47b619cab94454862009a7ccf
Merge remote-tracking branch 'origin/master'
5 files modified
69 ■■■■ changed files
applications/drone-command/env/.env.development 4 ●●●● patch | view | raw | blame | history
applications/drone-command/src/styles/common/cockpit.scss 2 ●●● patch | view | raw | blame | history
applications/drone-command/src/views/basicManage/deviceStock/DeviceTrackDiaLog.vue 3 ●●●● patch | view | raw | blame | history
applications/drone-command/src/views/permissionManage/permissionDept/FormDiaLog.vue 2 ●●● patch | view | raw | blame | history
applications/drone-command/src/views/permissionManage/permissionDept/index.vue 58 ●●●●● patch | view | raw | blame | history
applications/drone-command/env/.env.development
@@ -2,7 +2,7 @@
 # @Author       : yuan
 # @Date         : 2026-01-31 14:34:31
 # @LastEditors  : yuan
 # @LastEditTime : 2026-02-03 09:34:48
 # @LastEditTime : 2026-02-03 14:21:15
 # @FilePath     : \applications\drone-command\env\.env.development
 # @Description  : 
 # Copyright 2026 OBKoro1, All Rights Reserved. 
@@ -16,7 +16,7 @@
#开发环境代理地址(推荐本地新建文件 .env.development.local 来进行覆盖)
# VITE_APP_URL=https://wrj.shuixiongit.com/api
VITE_APP_URL=http://192.168.1.168
VITE_APP_URL=http://192.168.1.33
#新大屏地址
VITE_APP_DASHBOARD_URL='https://wrj.shuixiongit.com/command-center-dashboard/'
applications/drone-command/src/styles/common/cockpit.scss
@@ -1316,7 +1316,7 @@
                    align-items: center;
                    .label {
                        width: 88px;
                        min-width: 88px;
                        font-family: Source Han Sans CN, Source Han Sans CN;
                        font-weight: 500;
                        font-size: 14px;
applications/drone-command/src/views/basicManage/deviceStock/DeviceTrackDiaLog.vue
@@ -24,7 +24,7 @@
                            placeholder="请选择"
                            clearable
                        >
                            <el-option v-for="item in areaOptions" :key="item.value" :label="item.label" :value="item.label" />
                            <el-option v-for="item in areaOptions" :key="item.value" :label="item.label" :value="item.value" />
                        </el-select>
                    </el-form-item>
                </el-col>
@@ -137,6 +137,7 @@
    submitting.value = true
    try {
        const selected = areaOptions.value.find(item => item.value === formData.value.outTarget)
        const payload = {
            ...formData.value,
            outTarget: selected?.label ?? formData.value.outTarget,
applications/drone-command/src/views/permissionManage/permissionDept/FormDiaLog.vue
@@ -258,7 +258,7 @@
        })
        ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功')
        visible.value = false
        emit('success')
        emit('success', { parentId: formData.value.parentId || null, mode: dialogMode.value, isAddChild: isAddChild.value })
    } finally {
        submitting.value = false
    }
applications/drone-command/src/views/permissionManage/permissionDept/index.vue
@@ -87,7 +87,7 @@
            </div>
        </div>
        <FormDiaLog ref="dialogRef" @success="getList" v-model="visible" v-if="visible" />
        <FormDiaLog ref="dialogRef" @success="handleFormSuccess" v-model="visible" v-if="visible" />
        <ShareDiaLog ref="shareDialogRef" @success="getList" v-model="shareVisible" v-if="shareVisible" />
    </basic-container>
</template>
@@ -123,6 +123,8 @@
const list = ref([])
const total = ref(0)
const selectedIds = ref([])
const selectedRows = ref([])
const lastActionParentRow = ref(null)
const queryParamsRef = ref(null)
const dialogRef = ref(null)
const shareDialogRef = ref(null)
@@ -133,6 +135,7 @@
})
const deptTree = ref([])
const route = useRoute()
const treeResolveMap = new Map()
provide('dictObj', dictObj)
provide('deptTree', deptTree)
@@ -167,6 +170,7 @@
}
function handleAddChild(row) {
    lastActionParentRow.value = row
    visible.value = true
    nextTick(() => {
        dialogRef.value?.open({ mode: 'add', parent: row })
@@ -203,6 +207,7 @@
        cancelButtonClass: 'command-message-box-cancel',
    })
    const ids = row ? row.id : selectedIds.value.join(',')
    const rows = row ? [row] : selectedRows.value
    await remove(ids)
    saveOperationLog({
        requestUri: route.path,
@@ -211,11 +216,18 @@
    })
    ElMessage.success('删除成功')
    selectedIds.value = []
    getList()
    selectedRows.value = []
    const parentIds = Array.from(new Set(rows.map(item => item.parentId).filter(Boolean)))
    const hasRoot = rows.some(item => !item.parentId)
    if (hasRoot) {
        getList()
    }
    parentIds.forEach(parentId => refreshChildNodes(parentId))
}
function handleSelectionChange(rows) {
    selectedIds.value = rows.map(item => item.id)
    selectedRows.value = rows
}
function getDictList() {
@@ -236,11 +248,49 @@
}
function loadChildren(row, treeNode, resolve) {
    treeResolveMap.set(row.id, { resolve, row })
    getChildLazyTree({ parentId: row.id })
        .then(res => {
            resolve(res?.data?.data ?? [])
            const children = res?.data?.data ?? []
            row.hasChildren = children.length > 0
            resolve(children)
        })
        .catch(() => resolve([]))
        .catch(() => {
            row.hasChildren = false
            resolve([])
        })
}
function refreshChildNodes(parentId) {
    const cache = treeResolveMap.get(parentId)
    if (!cache?.resolve) return
    getChildLazyTree({ parentId })
        .then(res => {
            const children = res?.data?.data ?? []
            if (cache.row) {
                cache.row.hasChildren = children.length > 0
            }
            cache.resolve(children)
        })
        .catch(() => {
            if (cache.row) {
                cache.row.hasChildren = false
            }
            cache.resolve([])
        })
}
function handleFormSuccess(payload = {}) {
    if (payload?.parentId) {
        refreshChildNodes(payload.parentId)
        if (payload.isAddChild && lastActionParentRow.value?.id === payload.parentId) {
            lastActionParentRow.value.hasChildren = true
        }
        lastActionParentRow.value = null
        return
    }
    lastActionParentRow.value = null
    getList()
}
onMounted(() => {