修改推送的懒加载
This commit is contained in:
@@ -37,148 +37,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
export default {
|
||||
name: 'index',
|
||||
props: ['query', 'value'],
|
||||
data(){
|
||||
return{
|
||||
loading:true,
|
||||
gData:[
|
||||
{
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
title: 'parent 1',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '张晨成',
|
||||
key: '0-0-0',
|
||||
disabled: true,
|
||||
children: [
|
||||
{ title: 'leaf', key: '0-0-0-0' },
|
||||
{ title: 'leaf', key: '0-0-0-1' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
key: '0-0-1',
|
||||
children: [{ key: '0-0-1-0', title: 'zcvc' }],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
gData:[],
|
||||
autoExpandParent: true,
|
||||
expandedKeys:[],
|
||||
visible: false,
|
||||
@@ -210,6 +76,17 @@
|
||||
onChange(){
|
||||
|
||||
},
|
||||
queryDepartUserTreeList() {
|
||||
this.confirmLoading = true
|
||||
getAction('sys/user/queryDepartUserTreeList', { departId: this.departId }).then((res) => {
|
||||
this.confirmLoading = false
|
||||
if (res.success) {
|
||||
this.gData = res.result
|
||||
} else {
|
||||
this.gData = []
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '9'">
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '9' || item.field_show_type == 'sel_user'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryDepartUserTreeList()
|
||||
|
||||
},
|
||||
methods: {
|
||||
getPush(data) {
|
||||
@@ -108,7 +108,14 @@
|
||||
},
|
||||
queryDepartUserTreeList() {
|
||||
this.confirmLoading = true
|
||||
getAction('sys/user/queryDepartUserTreeList', { departId: this.departId }).then((res) => {
|
||||
let gData = JSON.parse(JSON.stringify(this.gData))
|
||||
if (gData && gData.length > 0) {
|
||||
gData = JSON.stringify(gData)
|
||||
}
|
||||
postAction('sys/user/queryDepartUserTreeList', {
|
||||
departId: this.departId,
|
||||
json: gData
|
||||
}).then((res) => {
|
||||
this.confirmLoading = false
|
||||
if (res.success) {
|
||||
this.gData = res.result
|
||||
|
||||
Reference in New Issue
Block a user