🏚️整合同步按钮为下拉菜单
This commit is contained in:
parent
24a61c1937
commit
05b2eee4c7
@ -41,11 +41,17 @@
|
||||
<el-button type="primary" icon="ele-Expand" @click="handleExpand"> 全部展开 </el-button>
|
||||
<el-button type="primary" icon="ele-Fold" @click="handleFold"> 全部折叠 </el-button>
|
||||
</el-button-group>
|
||||
|
||||
<el-button type="danger" icon="ele-Lightning" @click="syncRegionGD" v-auth="'sysRegion/add'"> 同步高德地图 </el-button>
|
||||
<el-button type="danger" icon="ele-Lightning" @click="syncRegionTianditu" v-auth="'sysRegion/add'"> 同步天地图 </el-button>
|
||||
<el-button type="danger" icon="ele-Lightning" @click="syncRegionMca" v-auth="'sysRegion/add'"> 同步国家地名信息库 </el-button>
|
||||
<el-button type="danger" icon="ele-Lightning" @click="syncRegionMzb" v-auth="'sysRegion/add'"> 同步民政部行政区划 </el-button>
|
||||
<el-dropdown v-auth="'sysRegion/add'" @command="handleCommand">
|
||||
<el-button type="danger" icon="ele-Lightning"> 从云端同步 </el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="amap" icon="ele-Promotion">同步高德地图</el-dropdown-item>
|
||||
<el-dropdown-item command="tianDiTu" divided icon="ele-MostlyCloudy">同步天地图</el-dropdown-item>
|
||||
<el-dropdown-item command="mca" divided icon="ele-MapLocation">同步国家地名信息库</el-dropdown-item>
|
||||
<el-dropdown-item command="mzb" divided icon="ele-Location">同步民政部行政区划</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
<template #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
@ -235,27 +241,21 @@ const handleNodeChange = async (node: any) => {
|
||||
await handleQuery();
|
||||
};
|
||||
|
||||
// 同步高德地图
|
||||
const syncRegionGD = async () => {
|
||||
state.title = '同步高德地图';
|
||||
syncGdParamRef.value?.openDialog();
|
||||
};
|
||||
|
||||
// 同步国家地名信息库
|
||||
const syncRegionMca = async () => {
|
||||
state.title = '同步国家地名信息库';
|
||||
syncMcaParamRef.value?.openDialog();
|
||||
};
|
||||
|
||||
// 同步天地图行政区划
|
||||
const syncRegionTianditu = async () => {
|
||||
state.title = '同步天地图行政区划';
|
||||
syncTdtParamRef.value?.openDialog();
|
||||
};
|
||||
// 同步民政部行政区划
|
||||
const syncRegionMzb = async () => {
|
||||
state.title = '同步民政部行政区划';
|
||||
// syncTdtParamRef.value?.openDialog();
|
||||
// 从云端同步点击
|
||||
const handleCommand = (command: string) => {
|
||||
if (command === 'amap') {
|
||||
state.title = '同步高德地图';
|
||||
syncGdParamRef.value?.openDialog();
|
||||
} else if (command === 'tianDiTu') {
|
||||
state.title = '同步天地图行政区划';
|
||||
syncTdtParamRef.value?.openDialog();
|
||||
} else if (command === 'mca') {
|
||||
state.title = '同步国家地名信息库';
|
||||
syncMcaParamRef.value?.openDialog();
|
||||
} else if (command === 'mzb') {
|
||||
state.title = '同步民政部行政区划';
|
||||
// syncTdtParamRef.value?.openDialog();
|
||||
} else ElMessage.error(`菜单选择有误`);
|
||||
};
|
||||
|
||||
// 生成组织架构
|
||||
|
||||
Loading…
Reference in New Issue
Block a user