截止‘运力管理’模块

This commit is contained in:
2026-07-20 11:26:51 +08:00
parent e66b4a3680
commit c6dffb5d97
98 changed files with 19429 additions and 176 deletions

View File

@@ -40,6 +40,14 @@
@click="handleExport"
>导出
</el-button>
<el-button
v-if="permission.region_sync"
type="primary"
icon="el-icon-refresh"
:loading="syncLoading"
@click="handleSync"
>同步
</el-button>
<el-button
v-if="permission.region_debug"
type="primary"
@@ -75,7 +83,7 @@
</template>
<script>
import { getLazyTree, getDetail, submit, remove } from '@/api/base/region';
import { getLazyTree, getDetail, submit, remove, sync } from '@/api/base/region';
import { exportBlob } from '@/api/common';
import { mapGetters } from 'vuex';
import { validatenull } from '@/utils/validate';
@@ -91,6 +99,7 @@ export default {
treeCode: '',
treeParentCode: '',
treeData: [],
syncLoading: false,
treeOption: {
nodeKey: 'id',
lazy: true,
@@ -431,6 +440,28 @@ export default {
handleImport() {
this.excelBox = true;
},
handleSync() {
this.$confirm('确定同步最新行政区划数据?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.syncLoading = true;
return sync();
})
.then(() => {
this.$message({
type: 'success',
message: '同步成功!',
});
this.initTree();
this.regionForm = {};
})
.finally(() => {
this.syncLoading = false;
});
},
handleExport() {
this.$confirm('是否导出行政区划数据?', '提示', {
confirmButtonText: '确定',