1、修复基础配置
2、修复业务模块 3、拆分页面代码
This commit is contained in:
+26
-23
@@ -4,7 +4,11 @@
|
||||
<div class="box">
|
||||
<el-scrollbar>
|
||||
<basic-container>
|
||||
<avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
|
||||
<avue-tree
|
||||
:option="treeOption"
|
||||
:data="treeData"
|
||||
@node-click="nodeClick"
|
||||
/>
|
||||
</basic-container>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@@ -27,20 +31,8 @@
|
||||
<el-option label="区县" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源">
|
||||
<el-select v-model="searchForm.dataSource" clearable placeholder="请选择" style="width: 200px;">
|
||||
<el-option label="手动录入" value="手动录入" />
|
||||
<el-option label="初始化导入" value="初始化导入" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: row; align-items: center; justify-content: space-between;">
|
||||
<el-form-item label="启停状态">
|
||||
<el-select v-model="searchForm.status" clearable placeholder="请选择" style="width: 200px;">
|
||||
<el-option label="启用" :value="1" />
|
||||
<el-option label="停用" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div style="display: flex; flex-direction: row; align-items: center; justify-content: flex-end;">
|
||||
<el-form-item class="region-page__search-actions">
|
||||
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||
<el-button @click="handleSearchReset">清空</el-button>
|
||||
@@ -180,8 +172,6 @@ export default {
|
||||
code: '',
|
||||
name: '',
|
||||
regionLevel: undefined,
|
||||
dataSource: '',
|
||||
status: undefined,
|
||||
},
|
||||
parentOptions: [],
|
||||
syncLoading: false,
|
||||
@@ -203,6 +193,7 @@ export default {
|
||||
},
|
||||
addBtn: false,
|
||||
menu: false,
|
||||
defaultExpandAll: false,
|
||||
size: 'default',
|
||||
props: {
|
||||
labelText: '标题',
|
||||
@@ -458,7 +449,13 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
hasSearchCriteria() {
|
||||
return Object.values(this.searchForm).some(
|
||||
value => value !== '' && value !== undefined && value !== null
|
||||
);
|
||||
},
|
||||
handleSearch() {
|
||||
this.treeOption.defaultExpandAll = this.hasSearchCriteria();
|
||||
this.initTree();
|
||||
this.regionForm = {};
|
||||
},
|
||||
@@ -467,8 +464,6 @@ export default {
|
||||
code: '',
|
||||
name: '',
|
||||
regionLevel: undefined,
|
||||
dataSource: '',
|
||||
status: undefined,
|
||||
};
|
||||
this.handleSearch();
|
||||
},
|
||||
@@ -507,6 +502,10 @@ export default {
|
||||
this.$message.warning('请先选择一项区划');
|
||||
return;
|
||||
}
|
||||
if (Number(this.regionForm.regionLevel) >= 3) {
|
||||
this.$message.warning('区县已是末级,不能新增下级');
|
||||
return;
|
||||
}
|
||||
const parentCode = this.regionForm.code;
|
||||
const parentName = this.regionForm.name;
|
||||
const parentGroupCode = this.regionForm.parentCode || this.topCode;
|
||||
@@ -517,8 +516,7 @@ export default {
|
||||
this.regionForm.subCode = '';
|
||||
this.regionForm.originalCode = '';
|
||||
this.regionForm.name = '';
|
||||
this.regionForm.regionLevel =
|
||||
this.regionForm.regionLevel === 5 ? 5 : this.regionForm.regionLevel + 1;
|
||||
this.regionForm.regionLevel = Number(this.regionForm.regionLevel) + 1;
|
||||
this.loadParentOptionsByGroup(parentGroupCode, parentCode, parentName);
|
||||
},
|
||||
setRegionColumnDisplay(prop, display) {
|
||||
@@ -637,9 +635,14 @@ export default {
|
||||
},
|
||||
handleImport() {
|
||||
this.syncImportAction();
|
||||
openImportDialog(this, '行政区划', () => {
|
||||
this.initTree();
|
||||
});
|
||||
openImportDialog(
|
||||
this,
|
||||
'行政区划',
|
||||
() => {
|
||||
this.initTree();
|
||||
},
|
||||
{ timeout: 180000 }
|
||||
);
|
||||
},
|
||||
syncImportAction() {
|
||||
const column = this.findColumn(this.excelOption.column, 'excelFile');
|
||||
|
||||
Reference in New Issue
Block a user