丰都大屏完成

This commit is contained in:
aixianling
2023-11-01 11:34:27 +08:00
parent 4e07ff289e
commit a0afde54ff
2 changed files with 21 additions and 11 deletions

View File

@@ -47,7 +47,7 @@
<div class="flex mar-v12"> <div class="flex mar-v12">
<b class="fill title">志愿者名单</b> <b class="fill title">志愿者名单</b>
<ai-select v-model="fraternity" class="areaPicker" placeholder="团队选择" :select-list="fraternities" <ai-select v-model="fraternity" class="areaPicker" placeholder="团队选择" :select-list="fraternities"
:prop="{label:'fraternity_name',value:'fraternity_name'}" :prop="{label:'fraternity_name',value:'fraternity_id'}"
@select="getVolunteerData(areaId)"/> @select="getVolunteerData(areaId)"/>
</div> </div>
<dv-scroll-board :config="volunteerConfig"/> <dv-scroll-board :config="volunteerConfig"/>
@@ -469,7 +469,8 @@ export default {
this.getGdyh(areaId), this.getGdyh(areaId),
this.getFraternitySta(this.transferAreaCode(areaId)), this.getFraternitySta(this.transferAreaCode(areaId)),
this.getFraternityTypes(areaId).then(data => this.fraternityTypes = data), this.getFraternityTypes(areaId).then(data => this.fraternityTypes = data),
this.getFraternities(this.transferAreaCode(areaId)).then(() => this.getMapData(areaId)) this.getFraternities(this.transferAreaCode(areaId)).then(() => this.getMapData(areaId)),
this.getVolunteerData(areaId)
]).finally(() => loading.close()) ]).finally(() => loading.close())
} else if (c < 10) setTimeout(() => this.getData(++c), 500) } else if (c < 10) setTimeout(() => this.getData(++c), 500)
else console.error(`尝试${c}次加载数据,无法过去数据`) else console.error(`尝试${c}次加载数据,无法过去数据`)
@@ -740,7 +741,7 @@ export default {
params: { params: {
page_size: 40, page_size: 40,
area_code, area_code,
team_name: this.fraternity team_id: this.fraternity
} }
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -754,7 +755,7 @@ export default {
getFraternities(area_code) { getFraternities(area_code) {
return this.instance.get("/hzh/find-fraternity-detail", {params: {page_size: 999, area_code}}).then(res => { return this.instance.get("/hzh/find-fraternity-detail", {params: {page_size: 999, area_code}}).then(res => {
if (res?.data) { if (res?.data) {
this.fraternity = res.data[0]?.fraternity_name // this.fraternity = res.data[0]?.fraternity_id
return this.fraternities = res.data || [] return this.fraternities = res.data || []
} }
}) })
@@ -780,29 +781,38 @@ export default {
getFraternityData(args) { getFraternityData(args) {
const row = this.fraternityTypes[args.rowIndex] const row = this.fraternityTypes[args.rowIndex]
this.dialog = true this.dialog = true
this.detail = {eventType: row.type, mapType: 'fraternitySta', list: []} this.detail = {eventType: row.type, mapType: 'fraternitySta', list: [], fraternity_type: row.type_id}
const area_code = this.transferAreaCode(this.areaId) const area_code = this.transferAreaCode(this.areaId)
this.fraternityLoading = true this.fraternityLoading = true
this.instance.get("/hzh/find-fraternity-member-detail", {params: {area_code}}).then(res => { this.instance.get("/hzh/find-fraternity-member-detail", {
params: {
area_code,
fraternity_type: row.type_id
}
}).then(res => {
if (res?.data) { if (res?.data) {
this.detail = {...this.detail, list: res.data} this.detail = {...this.detail, list: res.data}
} }
}).finally(() => this.fraternityLoading = false) }).finally(() => this.fraternityLoading = false)
}, },
handleFraternityTableClick(args) { handleFraternityTableClick(args) {
const {columnIndex: type, rowIndex} = args const {columnIndex: type, rowIndex} = args,
{fraternity_type} = this.detail
if (type > 0) { if (type > 0) {
const current = this.detail.list[rowIndex] const current = this.detail.list[rowIndex]
console.log(current)
this.fraternityExtra = true this.fraternityExtra = true
this.$set(this.detail, 'extraType', type) this.$set(this.detail, 'extraType', type)
this.$set(this.detail, 'extraTitle', { this.$set(this.detail, 'extraTitle', {
1: '家长名单', 2: '学生名单', 3: '活动情况' 1: '家长名单', 2: '学生名单', 3: '活动情况'
}[type]) }[type])
if (type == 3) { if (type == 3) {
this.$set(this.detail, 'others', {header: [], rowNum: 3}) this.$set(this.detail, 'others', {header: [], rowNum: 3})
this.instance.get("/hzh/find-fraternity-activity-detail", {params: {area_code: this.transferAreaCode(this.areaId)}}).then(res => { this.instance.get("/hzh/find-fraternity-activity-detail", {
params: {
area_code: this.transferAreaCode(this.areaId),
fraternity_type
}
}).then(res => {
if (res?.data) { if (res?.data) {
this.$set(this.detail, 'extra', res.data.map(e => [` this.$set(this.detail, 'extra', res.data.map(e => [`
<div class="staPanel activity flex mar-t10" > <div class="staPanel activity flex mar-t10" >

View File

@@ -33,7 +33,7 @@ export default {
instance: { instance: {
deep: true, deep: true,
handler(v) { handler(v) {
v && this.isAction && !this.options.toString() && this.getOptions() v && this.isAction && !this.options?.toString() && this.getOptions()
} }
}, },
action() { action() {