吉安感知网项目-前端
张含笑
2026-01-27 1bd4b14a7074eb3b43fa5d11c126f0d988f82bab
feat:更新机构
4 files modified
110 ■■■■■ changed files
applications/task-work-order/src/views/orderView/organizational/agenciesManagement/FormDiaLog.vue 21 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/organizational/agenciesManagement/index.vue 23 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/organizational/zoningManagement/FormDiaLog.vue 20 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/organizational/zoningManagement/index.vue 46 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/organizational/agenciesManagement/FormDiaLog.vue
@@ -275,29 +275,10 @@
    resolve([])
  }
}
// 获取初始区域数据(根节点)
// async function getRegionList() {
//   try {
//     // 懒加载模式下,只需要初始化根节点
//     const res = await regionLazyTreeApi({ parentCode: '360800000000' })
//     const nodes = res?.data?.data || []
//     // 处理根节点数据
//     regionOptions.value = nodes.map(item => {
//       return {
//         id: item.id || item.value,
//         name: item.name || item.title || item.label,
//         hasChildren: item.hasChildren || false
//       }
//     })
//   } catch (error) {
//     console.error('获取区域数据失败:', error)
//   }
// }
defineExpose({ open })
onMounted(() => {
  // getRegionList()
})
</script>
applications/task-work-order/src/views/orderView/organizational/agenciesManagement/index.vue
@@ -68,7 +68,7 @@
             {{ getDictLabel(row.status, dictObj.institutionStatus) }}
            </template>
          </el-table-column>
          <el-table-column label="操作" class-name="operation-btns" width="310">
          <el-table-column label="操作" class-name="operation-btns" width="400">
            <template v-slot="{ row }">
              <el-link type="primary" @click="openForm('view', row)">查看</el-link>
              <el-link type="primary"  @click="openForm('edit', row)">编辑</el-link>
@@ -218,25 +218,7 @@
  }
}
// 获取初始区域数据(根节点)
// async function getRegionList() {
//   try {
//     // 懒加载模式下,只需要初始化根节点
//     const res = await regionLazyTreeApi({ parentCode: '360800000000' })
//     const nodes = res?.data?.data || []
//     // 处理根节点数据
//     regionOptions.value = nodes.map(item => {
//       return {
//         id: item.id || item.value,
//         name: item.name || item.title || item.label,
//         hasChildren: item.hasChildren || false
//       }
//     })
//   } catch (error) {
//     console.error('获取区域数据失败:', error)
//   }
// }
// 获取列表
async function getList() {
@@ -385,7 +367,6 @@
onMounted(() => {
  getDictList()
  // getRegionList()
  getList()
})
</script>
applications/task-work-order/src/views/orderView/organizational/zoningManagement/FormDiaLog.vue
@@ -306,29 +306,9 @@
    resolve([])
  }
}
// 获取初始区域数据(根节点)
async function getRegionList() {
  try {
    // 懒加载模式下,只需要初始化根节点
    const res = await regionLazyTreeApi({ code: '360800000000' })
    const nodes = res?.data?.data || []
    // 处理根节点数据
    regionOptions.value = nodes.map(item => {
      return {
        id: item.id || item.value,
        name: item.name || item.title || item.label,
        hasChildren: item.hasChildren || false
      }
    })
  } catch (error) {
    console.error('获取区域数据失败:', error)
  }
}
defineExpose({ open })
onMounted(() => {
  getRegionList()
})
</script>
applications/task-work-order/src/views/orderView/organizational/zoningManagement/index.vue
@@ -65,7 +65,7 @@
              {{ getDictLabel(row.status, dictObj.zoningStatus) }}
            </template>
          </el-table-column>
          <el-table-column label="操作" class-name="operation-btns" width="310">
          <el-table-column label="操作" class-name="operation-btns" width="400">
            <template v-slot="{ row }">
              <el-link type="primary" @click="openForm('view', row)">查看</el-link>
              <el-link type="primary"  @click="openForm('edit', row)">编辑</el-link>
@@ -180,49 +180,6 @@
    return getDictionaryByCode('zoningStatus,divisionLevel').then(res => {
        dictObj.value = res.data.data
    })
}
// 懒加载获取区域节点数据
async function loadRegionNode(node, resolve) {
  try {
    const parentCode = node.data?.id || '360800000000'
    const res = await regionLazyTreeApi({ parentCode })
    const nodes = res?.data?.data || []
    // 处理返回的节点数据
    const processedNodes = nodes.map(item => {
      return {
        id: item.id || item.value,
        name: item.name || item.title || item.label,
        hasChildren: item.hasChildren || false
      }
    })
    resolve(processedNodes)
  } catch (error) {
    console.error('获取区域数据失败:', error)
    resolve([])
  }
}
// 获取初始区域数据(根节点)
async function getRegionList() {
  try {
    // 懒加载模式下,只需要初始化根节点
    const res = await regionLazyTreeApi({ parentCode: '360800000000' })
    const nodes = res?.data?.data || []
    // 处理根节点数据
    regionOptions.value = nodes.map(item => {
      return {
        id: item.id || item.value,
        name: item.name || item.title || item.label,
        hasChildren: item.hasChildren || false
      }
    })
  } catch (error) {
    console.error('获取区域数据失败:', error)
  }
}
// 获取列表
@@ -372,7 +329,6 @@
onMounted(() => {
  getDictList()
  getRegionList()
  getList()
})
</script>