commit
This commit is contained in:
@@ -63,7 +63,7 @@ layout("/mobile/platform.html"){
|
||||
<van-dropdown-item v-model="pageForm.unitId" :options="unitOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" :options="unionOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
@change="unionChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.personType" :options="personTypeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
@@ -206,6 +206,10 @@ layout("/mobile/platform.html"){
|
||||
'member-change-info': MEMBER_CHANGE_INFO,
|
||||
},
|
||||
methods: {
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async doRevoke(row) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
@@ -298,23 +302,38 @@ layout("/mobile/platform.html"){
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async getUnionList(){
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
data.forEach(v => {
|
||||
async initUnion() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionOptions = await getUnionList(null)
|
||||
} else {
|
||||
this.unionOptions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.unionOptions.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部工会", value: ''})
|
||||
this.unionOptions = data
|
||||
this.unionOptions.unshift({text: "全部工会", value: null})
|
||||
if (this.unionOptions && this.unionOptions.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionOptions[0].value)
|
||||
}
|
||||
},
|
||||
async getUnitList(unionId) {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
data.forEach(v => {
|
||||
async initUnit(unionId) {
|
||||
this.unitOptions = await getUnits(unionId)
|
||||
this.unitOptions.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部单位", value: ''})
|
||||
this.unitOptions = data
|
||||
this.unitOptions.unshift({text: "全部单位", value: null})
|
||||
if (this.unitOptions && this.unitOptions.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitOptions[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.initUnit("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async getPersonTypeList() {
|
||||
const data = await getDictOptions("PERSON_TYPE")
|
||||
@@ -328,8 +347,8 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
async created() {
|
||||
this.changeTypeData = await getEnumOptions("MemberChangeType")
|
||||
await this.getUnionList()
|
||||
await this.getUnitList()
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
await this.getPersonTypeList()
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ layout("/mobile/platform.html"){
|
||||
<van-dropdown-item v-model="pageForm.unitId" :options="unitOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" :options="unionOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
@change="unionChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.personType" :options="personTypeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
@@ -153,6 +153,10 @@ layout("/mobile/platform.html"){
|
||||
'member-change-info': MEMBER_CHANGE_INFO,
|
||||
},
|
||||
methods: {
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
openView(row) {
|
||||
this.openType = 'view'
|
||||
this.memberChangeInfoPopup = true
|
||||
@@ -192,23 +196,38 @@ layout("/mobile/platform.html"){
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async getUnionList(){
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
data.forEach(v => {
|
||||
async initUnion() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionOptions = await getUnionList(null)
|
||||
} else {
|
||||
this.unionOptions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.unionOptions.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部工会", value: ''})
|
||||
this.unionOptions = data
|
||||
this.unionOptions.unshift({text: "全部工会", value: null})
|
||||
if (this.unionOptions && this.unionOptions.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionOptions[0].value)
|
||||
}
|
||||
},
|
||||
async getUnitList(unionId) {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
data.forEach(v => {
|
||||
async initUnit(unionId) {
|
||||
this.unitOptions = await getUnits(unionId)
|
||||
this.unitOptions.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部单位", value: ''})
|
||||
this.unitOptions = data
|
||||
this.unitOptions.unshift({text: "全部单位", value: null})
|
||||
if (this.unitOptions && this.unitOptions.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitOptions[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.initUnit("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async getPersonTypeList() {
|
||||
const data = await getDictOptions("PERSON_TYPE")
|
||||
@@ -222,8 +241,8 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
async created() {
|
||||
this.changeTypeData = await getEnumOptions("MemberChangeType")
|
||||
await this.getUnionList()
|
||||
await this.getUnitList()
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
await this.getPersonTypeList()
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
},
|
||||
async getUnionList(){
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
const {data} = await $.get("/platform/vi/common/getUnion")
|
||||
data.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
|
||||
Reference in New Issue
Block a user