换一个分段器

This commit is contained in:
shijingjing
2023-03-01 15:31:00 +08:00
parent 50c326dc3b
commit 4d59b17d39
4 changed files with 80 additions and 64 deletions

View File

@@ -9,11 +9,11 @@
<div><span class="color_red">*</span><span class="title">发送范围</span></div> <div><span class="color_red">*</span><span class="title">发送范围</span></div>
<div @click="toSleectScoped"> <div @click="toSleectScoped">
<span> <span>
<span v-if="type=='ResidentsGroup' && form.wxGroups.length"> <span v-if="type=='ResidentsGroup'">
<span class="color_gray" v-if="!form.wxGroups">请选择</span> <span class="color_gray" v-if="!form.wxGroups.length">请选择</span>
<span v-else>预计送达{{ form.wxGroups.length }}个居民群</span> <span v-else>预计送达{{ form.wxGroups.length }}个居民群</span>
</span> </span>
<span v-if="type!='ResidentsGroup' && sum != 0"> <span v-if="type!='ResidentsGroup'">
<span class="color_gray" v-if="sum==0">请选择</span> <span class="color_gray" v-if="sum==0">请选择</span>
<span v-else>预计送达{{ sum }}名成员</span> <span v-else>预计送达{{ sum }}名成员</span>
</span> </span>
@@ -313,7 +313,7 @@ export default {
let params = { let params = {
count, count,
sizeType: ['compressed'], sizeType: ['compressed'],
sourceType: ['album', 'camera'], sourceType: ['album'],
success: (res) => { success: (res) => {
let count = this.files?.length + (res.tempFiles?.length || res.tempFile ? 1 : 0) let count = this.files?.length + (res.tempFiles?.length || res.tempFile ? 1 : 0)
if (count > 9) { if (count > 9) {

View File

@@ -162,7 +162,7 @@ export default {
this.subIndex = index; this.subIndex = index;
this.getStatistics(); this.getStatistics();
}, },
// 获取数据 // 获取表格数据
getStatistics() { getStatistics() {
this.$http.post('/app/whchatmomentstask/detailStatistics', null, { this.$http.post('/app/whchatmomentstask/detailStatistics', null, {
params: { params: {

View File

@@ -66,24 +66,10 @@
<div class="list_content"> <div class="list_content">
<div class="list_card"> <div class="list_card">
<div class="tab" v-show="update0"> <div class="tab" >
<u-subsection <div class="item" :class="tabIndex == index? 'bgactive': ''" v-for="(item,index) in subsection" :key="index" @click="changeSub(index)">
:list="subsection0" {{ item }}
mode="button" </div>
activeColor="#3c9cff"
:current="subIndex0"
@change="changeSub0"
></u-subsection>
</div>
<div class="tab" v-show="update1">
<u-subsection
:list="subsection1"
mode="button"
activeColor="#3c9cff"
:current="subIndex1"
@change="changeSub1"
></u-subsection>
</div> </div>
<AiTable <AiTable
@@ -105,8 +91,7 @@ export default {
tabs: ["成员统计", "居民群统计"], tabs: ["成员统计", "居民群统计"],
tabIndex: 0, tabIndex: 0,
pieEcharts: null, pieEcharts: null,
subIndex0: 0, subIndex: 0,
subIndex1: 0,
tableData: [], tableData: [],
id: "", id: "",
info: {}, info: {},
@@ -114,17 +99,7 @@ export default {
firstClickTime: "", firstClickTime: "",
currentClickTime: "", currentClickTime: "",
detail: {}, detail: {},
subsection: [],
subsection0: [
{ name: "未执行" },
{ name: "已执行" },
{ name: "无法执行" },
],
subsection1: [
{ name: "未送达" },
{ name: "已送达" },
{ name: "无法送达" },
],
update0: true, update0: true,
update1: false, update1: false,
type: '', type: '',
@@ -152,24 +127,19 @@ export default {
methods: { methods: {
tabClick(index) { tabClick(index) {
this.tabIndex = index; this.tabIndex = index;
if(this.tabIndex == 0) { this.subIndex = 0
this.subsection = [ if(this.sendChannel == 1) {
{ name: "未执行" }, if(this.tabIndex == 0) {
{ name: "执行" }, this.subsection = ["执行","已执行"]
{ name: "无法执行" }, } else if(this.tabIndex == 1){
] this.subsection = ["未送达","已送达"]
this.update0 = true }
this.update1 = false } else if(this.sendChannel != 1) {
this.$forceUpdate() if(this.tabIndex == 0) {
} else if(this.tabIndex == 1) { this.subsection = ["未执行","已执行","无法执行"]
this.subsection = [ } else if(this.tabIndex == 1) {
{ name: "未送达" }, this.subsection = ["未送达","已送达","无法送达"]
{ name: "已送达" }, }
{ name: "无法送达" },
]
this.update0 = false
this.update1 = true
this.$forceUpdate()
} }
this.getStatistics(); this.getStatistics();
}, },
@@ -230,13 +200,8 @@ export default {
} }
}, },
// 切换分段器 // 切换分段器
// 切换分段器 changeSub(index) {
changeSub0(index) { this.subIndex = index;
this.subIndex0 = index;
this.getStatistics();
},
changeSub1(index) {
this.subIndex1 = index;
this.getStatistics(); this.getStatistics();
}, },
// 获取数据 // 获取数据
@@ -244,7 +209,7 @@ export default {
this.$http.post(`/app/appmasssendingtask/detailStatistics`, null, { this.$http.post(`/app/appmasssendingtask/detailStatistics`, null, {
params: { params: {
type: this.tabIndex, type: this.tabIndex,
sendStatus: this.tabIndex==0? this.subIndex0: this.subIndex1, sendStatus: this.subIndex,
taskId: this.id, taskId: this.id,
current: this.current, current: this.current,
size: 3000, size: 3000,
@@ -325,6 +290,33 @@ export default {
}); });
}, },
}, },
watch: {
detail: {
handler(v) {
if(v) {
this.sendChannel = v.sendChannel
if(v.sendChannel == 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行"]
this.$forceUpdate()
} else if(this.tabIndex == 1){
this.subsection = ["未送达","已送达"]
this.$forceUpdate()
}
} else if(v.sendChannel != 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行","无法执行"]
this.$forceUpdate()
} else if(this.tabIndex == 1){
this.subsection = ["未送达","已送达","无法送达"]
this.$forceUpdate()
}
}
}
},
deep: true
}
},
onShow() { onShow() {
document.title = "群发居民群统计"; document.title = "群发居民群统计";
this.$dict.load("mstStatus") this.$dict.load("mstStatus")
@@ -495,6 +487,7 @@ export default {
.tab { .tab {
margin-bottom: 34px; margin-bottom: 34px;
::v-deep .u-subsection uni-view{ ::v-deep .u-subsection uni-view{
background: #eeef !important; background: #eeef !important;
} }
@@ -513,5 +506,30 @@ export default {
} }
} }
} }
.tab {
height: 70px;
background-color: #eeeeef;
padding: 3px 4px;
border-radius: 10px;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
.item {
flex: 1;
height: 58px;
line-height: 58px;
align-self: center;
color: #3aa0ff;
text-align: center;
border-radius: 16px;
}
.bgactive {
background: #fff;
font-weight: 600;
}
}
} }
</style> </style>

View File

@@ -167,8 +167,6 @@ export default {
}) })
}, },
examine() { examine() {
// /app/whchatmomentstask/examine
let url = ''
if(this.type == 'ResidentsGroup') { if(this.type == 'ResidentsGroup') {
url = `/app/appmasssendingtask/examine` url = `/app/appmasssendingtask/examine`
} else { } else {