换个分段器

This commit is contained in:
shijingjing
2022-09-16 14:08:29 +08:00
parent 55e7c2ddd9
commit 70560a1663
3 changed files with 112 additions and 54 deletions

View File

@@ -52,7 +52,7 @@
}}</span>
<span>{{ info.executedCount || 0 }}</span>
</div>
<div>
<div v-if="detail.sendChannel !=1">
<span>{{
tabIndex == 0 ? "无法执行成员:" : "无法送达居民群:"
}}</span>
@@ -66,24 +66,17 @@
<div class="list_content">
<div class="list_card">
<div class="tab" v-show="update0">
<u-subsection
:list="subsection0"
mode="button"
activeColor="#3c9cff"
:current="subIndex0"
@change="changeSub0"
></u-subsection>
<div class="tab" v-show="detail.sendChannel ==1">
<div class="item" :class="subIndex0 == index? 'bgactive': ''" v-for="(item,index) in subsection" :key="index" @click="changeSub0(index)">
{{ item }}
</div>
</div>
<div class="tab" v-show="update1">
<u-subsection
:list="subsection1"
mode="button"
activeColor="#3c9cff"
:current="subIndex1"
@change="changeSub1"
></u-subsection>
<div class="tab" v-show="detail.sendChannel !=1">
<div class="item" :class="subIndex1 == index? 'bgactive': ''" v-for="(item,index) in subSelect" :key="index" @click="changeSub1(index)">
{{ item }}
</div>
</div>
<AiTable
@@ -115,19 +108,8 @@ export default {
firstClickTime: "",
currentClickTime: "",
detail: {},
subsection0: [
{ name: "未执行" },
{ name: "已执行" },
{ name: "无法执行" },
],
subsection1: [
{ name: "未送达" },
{ name: "已送达" },
{ name: "无法送达" },
],
update0: true,
update1: false,
subsection: [],
sendChannel: ''
};
},
computed: {
@@ -152,24 +134,20 @@ export default {
methods: {
tabClick(index) {
this.tabIndex = index;
this.subIndex0 = 0
this.subIndex1 = 0
if(this.sendChannel == 1) {
if(this.tabIndex == 0) {
this.subsection = [
{ name: "未执行" },
{ name: "已执行" },
{ name: "无法执行" },
]
this.update0 = true
this.update1 = false
this.$forceUpdate()
this.subsection = ["未执行","已执行"]
} else if(this.tabIndex == 1){
this.subsection = [
{ name: "未送达" },
{ name: "已送达" },
{ name: "无法送达" },
]
this.update0 = false
this.update1 = true
this.$forceUpdate()
this.subsection = ["未送达","已送达"]
}
} else if(this.sendChannel != 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行","无法执行"]
} else if(this.tabIndex == 1) {
this.subsection = ["未送达","已送达","无法送达"]
}
}
this.getStatistics();
},
@@ -238,13 +216,17 @@ export default {
this.subIndex1 = index;
this.getStatistics();
},
// changeSub(index) {
// this.subIndex = index;
// this.getStatistics();
// },
// 获取数据
getStatistics() {
this.$http
.post(`/app/appmasssendingtask/detailStatistics`, null, {
params: {
type: this.tabIndex,
sendStatus: this.tabIndex==0? this.subIndex0: this.subIndex1,
sendStatus: this.detail.sendChannel==1? this.subIndex0: this.subIndex1,
taskId: this.id,
current: this.current,
size: 3000
@@ -325,11 +307,56 @@ 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.subSelect = ["未执行","已执行","无法执行"]
this.$forceUpdate()
} else if(this.tabIndex == 1){
this.subSelect = ["未送达","已送达","无法送达"]
this.$forceUpdate()
}
}
}
},
deep: true
}
},
onShow() {
document.title = "群发居民群统计";
this.$dict.load("mstStatus")
this.getStatistics();
this.getDetail();
this.getStatistics();
if(this.sendChannel == 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行"]
this.$forceUpdate()
} else if(this.tabIndex == 1){
this.subsection = ["未送达","已送达"]
this.$forceUpdate()
}
} else if(this.sendChannel != 1) {
if(this.tabIndex == 0) {
this.subSelect = ["未执行","已执行","无法执行"]
this.$forceUpdate()
} else if(this.tabIndex == 1){
this.subSelect = ["未送达","已送达","无法送达"]
this.$forceUpdate()
}
}
this.getStatistics();
},
mounted() {
this.getPieEcharts();
@@ -488,7 +515,6 @@ export default {
.list_content {
padding: 0 32px 32px 32px;
box-sizing: border-box;
.list_card {
background: #fff;
border-radius: 16px;
@@ -502,9 +528,39 @@ export default {
}
}
.sub-select {
::v-deep .AiTable .u-table .u-tr .u-td p{
width: 100%;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
::v-deep .AiTable .u-table .u-tr .u-td {
width: 30%;
}
}
}
.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: #303133;
text-align: center;
border-radius: 16px;
}
.bgactive {
background: #fff;
}
}
}

View File

@@ -192,6 +192,7 @@ export default {
.detail {
padding: 32px 32px 140px 32px;
box-sizing: border-box;
.task {
position: relative;
margin-bottom: 24px;

View File

@@ -15,6 +15,7 @@
</div>
</div>
<div class="task_results" v-if="data.enableExamine == 1">
<!-- 5结束 8关闭 -->
<img v-if="data.status == 1" src="./images/refuse.png" alt="">
<img v-if="data.status == 2" src="./images/pass.png" alt="">
</div>
@@ -60,7 +61,7 @@
</div>
</div>
</div>
<div class="subBtn" @click="toSend">
<div class="subBtn" @click="toSend" v-if="data.status == 4">
<div>前往群发</div>
</div>
</div>