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