去掉多余的api地址
This commit is contained in:
@@ -35,7 +35,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { queryDepartTreeList } from '@/api/api'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'JSelectDepartModal',
|
name: 'JSelectDepartModal',
|
||||||
props:['modalWidth','multi','rootOpened','departId'],
|
props:['modalWidth','multi','rootOpened','departId'],
|
||||||
@@ -53,7 +52,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.loadDepart();
|
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
departId(){
|
departId(){
|
||||||
@@ -76,19 +74,6 @@
|
|||||||
this.checkedRows=[]
|
this.checkedRows=[]
|
||||||
this.checkedKeys=[]
|
this.checkedKeys=[]
|
||||||
},
|
},
|
||||||
loadDepart(){
|
|
||||||
queryDepartTreeList().then(res=>{
|
|
||||||
if(res.success){
|
|
||||||
let arr = [...res.result]
|
|
||||||
this.reWriterWithSlot(arr)
|
|
||||||
this.treeData = arr
|
|
||||||
this.initDepartComponent()
|
|
||||||
if(this.rootOpened){
|
|
||||||
this.initExpandedKeys(res.result)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
initDepartComponent(){
|
initDepartComponent(){
|
||||||
let names = ''
|
let names = ''
|
||||||
if(this.departId){
|
if(this.departId){
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {filterObj} from '@/utils/util'
|
import {filterObj} from '@/utils/util'
|
||||||
import {queryDepartTreeList, getUserList, queryUserByDepId} from '@/api/api'
|
import {getUserList, queryUserByDepId} from '@/api/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'JSelectUserByDepModal',
|
name: 'JSelectUserByDepModal',
|
||||||
@@ -298,13 +298,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
queryDepartTree() {
|
queryDepartTree() {
|
||||||
queryDepartTreeList().then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.departTree = res.result;
|
|
||||||
// 默认展开父节点
|
|
||||||
this.expandedKeys = this.departTree.map(item => item.id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
modalFormOk() {
|
modalFormOk() {
|
||||||
this.loadData();
|
this.loadData();
|
||||||
|
|||||||
Reference in New Issue
Block a user