|
|
@@ -5,38 +5,25 @@
|
|
|
<el-main ref="elMain" style="padding: 0px">
|
|
|
<!-- 搜索 新增-展开折叠 -->
|
|
|
<div style="margin-bottom: 20px; margin-top: 15px" class="flex a-start">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- icon="el-icon-plus"
|
|
|
- :label="$t('action.addCompany')"
|
|
|
- @click="handleAddCompany"
|
|
|
- >新增子机构</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="info"
|
|
|
- plain
|
|
|
- icon="el-icon-sort"
|
|
|
- @click="fold()"
|
|
|
- >展开折叠</el-button
|
|
|
- >
|
|
|
- <!-- <el-form
|
|
|
- :inline="true"
|
|
|
- class="demo-form-inline"
|
|
|
- size="small"
|
|
|
- style="margin-left: 30px"
|
|
|
- >
|
|
|
+ <el-button size="small" type="primary" plain icon="el-icon-plus" :label="$t('action.addCompany')" @click="handleAddCompany">新增子机构</el-button>
|
|
|
+ <el-button size="small" type="info" plain icon="el-icon-sort" @click="fold()" >展开折叠</el-button>
|
|
|
+ <el-form :inline="true" class="demo-form-inline" size="small" style="margin-left: 30px">
|
|
|
+ <el-form-item label="机构名称">
|
|
|
+ <el-cascader v-model="formData.id" size="small"
|
|
|
+ :show-all-levels="false" :options="formListData" :props="{ label: 'name', value: 'id', children: 'children', checkStrictly: true }" clearable
|
|
|
+ filterable></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="机构类型">
|
|
|
+ <el-select style="width:200px" clearable v-model="formData.comtype" placeholder="请选择">
|
|
|
+ <el-option v-for="val in comtypeoptions" :label="val.label" :value="val.value"
|
|
|
+ :key="val.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- @click="managementSourceQuery"
|
|
|
- >查询</el-button
|
|
|
- >
|
|
|
+ <el-button size="small" @click="resultList">重置</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="findTreeData">查询</el-button>
|
|
|
</el-form-item>
|
|
|
- </el-form> -->
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
<!-- 表格渲染 -->
|
|
|
<el-table
|
|
|
@@ -195,12 +182,6 @@ export default {
|
|
|
tree,
|
|
|
KtCommonTable,
|
|
|
},
|
|
|
- created() {
|
|
|
- this.findTreeData(); // 获取左边机构树数据
|
|
|
- this.$api.dept.sysDeptInternalAgentType().then(res => {
|
|
|
- this.comtypeoptions = res.data
|
|
|
- })
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
@@ -265,14 +246,29 @@ export default {
|
|
|
isshow: false,
|
|
|
expanded: false, // 在这里定义了展开与否的标志
|
|
|
parentName: '',
|
|
|
+ formListData: [], // 全部树
|
|
|
+ formData: {},
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.findTreeData();
|
|
|
+ this.$api.dept.sysDeptInternalAgentType().then(res => {
|
|
|
+ this.comtypeoptions = res.data
|
|
|
+ })
|
|
|
+ this.$api.dept.sysDeptInternalAgentFindTree().then((res) => {
|
|
|
+ this.formListData = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.changeTreeWidth(); // 初始化树的宽度
|
|
|
this.filters.id = "9";
|
|
|
this.findSubDeptPage(); //初始化数据
|
|
|
},
|
|
|
methods: {
|
|
|
+ resultList() {
|
|
|
+ this.formData = {}
|
|
|
+ this.findTreeData()
|
|
|
+ },
|
|
|
//点击每一行的事件
|
|
|
rowClick(row, treeNode) {
|
|
|
//点每行展开折叠
|
|
|
@@ -320,8 +316,15 @@ export default {
|
|
|
},
|
|
|
findTreeData() {
|
|
|
// 获取机构树的数据
|
|
|
+ let queryData = {
|
|
|
+ comtype: this.formData.comtype
|
|
|
+ }
|
|
|
+ if (this.formData.id) {
|
|
|
+ queryData.deptId = this.formData.id[this.formData.id.length-1]
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
- this.$api.dept.sysDeptInternalAgentFindTree().then((res) => {
|
|
|
+ this.$api.dept.sysDeptInternalAgentFindTree(queryData).then((res) => {
|
|
|
+ this.ztreeNodes = []
|
|
|
this.ztreeNodes = res.data;
|
|
|
this.loading = false;
|
|
|
});
|