去掉loadind

This commit is contained in:
shijingjing
2023-03-02 14:52:17 +08:00
parent c424f8256a
commit a97aa64a39
3 changed files with 96 additions and 61 deletions

View File

@@ -12,19 +12,21 @@
</div> </div>
</AiTopFixed> </AiTopFixed>
<div class="resident_list" v-if="list.length"> <div class="resident_list" v-if="list.length">
<div class="card" @click="toDetail(item)" v-for="(item,index) in list" :key="index"> <div class="card" v-for="(item,index) in list" :key="index">
<div class="card_title"> <div class="card_top" @click="toDetail(item)">
<div class="card_left">{{ item.taskTitle }}</div> <div class="card_title">
<div class="card_right"><span :class="item.status==0? 'status0': item.status==1? 'status1': item.status==2? 'status2': <div class="card_left">{{ item.taskTitle }}</div>
item.status == 3? 'status3':item.status==4? 'status4': 'status5'"></span>{{ $dict.getLabel('mstStatus', item.status) }}</div> <div class="card_right"><span :class="item.status==0? 'status0': item.status==1? 'status1': item.status==2? 'status2':
</div> item.status == 3? 'status3':item.status==4? 'status4': 'status5'"></span>{{ $dict.getLabel('mstStatus', item.status) }}</div>
<div>群发时间<span>{{ item.choiceTime }}</span></div> </div>
<div>共需<span class="num">{{ item.groupOwnerCount || 0 }}</span>名成员完成群发目前已完成<span class="num">{{ item.completionRate || 0 }}%</span></div> <div>群发时间<span>{{ item.choiceTime }}</span></div>
<div> <div>共需<span class="num">{{ item.groupOwnerCount || 0 }}</span>名成员完成群发目前已完成<span class="num">{{ item.completionRate || 0 }}%</span></div>
创建部门 <div>
<span v-if="item.createUserDeptName">{{ item.createUserDeptName }}</span> 创建部门
<!-- <span v-if="item.createUserSecondDept"><AiOpenData type="departmentName" :openid="item.createUserSecondDept" style="display: inline-block" /></span> --> <span v-if="item.createUserDeptName">{{ item.createUserDeptName }}</span>
</div>
</div> </div>
<div class="card_bottom" v-if="item.status == 4 && item.createUserId == user.wxUserId" @click="stopBtn(item.id)">关闭任务</div>
</div> </div>
</div> </div>
<AiEmpty description="暂无数据" v-if="!list.length"/> <AiEmpty description="暂无数据" v-if="!list.length"/>
@@ -93,6 +95,7 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
name: 'AppCooperationPropagandaBeta', name: 'AppCooperationPropagandaBeta',
appName: '协同宣发', appName: '协同宣发',
@@ -131,6 +134,9 @@ export default {
sendType: 'ResidentsGroup', sendType: 'ResidentsGroup',
} }
}, },
computed: {
...mapState(['user'])
},
methods: { methods: {
tabClick(item,index) { tabClick(item,index) {
this.list = [] this.list = []
@@ -229,6 +235,28 @@ export default {
}, },
toAdd() { toAdd() {
uni.navigateTo({url: `./addPropaganda?type=${this.sendType}`}) uni.navigateTo({url: `./addPropaganda?type=${this.sendType}`})
},
stopBtn(id) {
this.$confirm('确定停止该任务吗?').then(() => {
let url = ''
if(this.tabIndex==0) {
url = `/app/appmasssendingtask/closeTask`
} else {
url = `/app/whchatmomentstask/closeTask`
}
this.$http.post(url,null,{
params: {
id: id
}
}).then(res=> {
if(res?.code==0) {
this.$u.toast('已关闭该任务')
setTimeout(()=>{
this.getList()
}, 400)
}
})
})
} }
}, },
onShow() { onShow() {
@@ -313,55 +341,66 @@ export default {
.card { .card {
background: #FFF; background: #FFF;
border-radius: 16px; border-radius: 16px;
padding: 30px;
margin-bottom: 24px; margin-bottom: 24px;
& > div { .card_top {
padding: 10px 0; padding: 30px;
} box-sizing: border-box;
.num { & > div {
color: #3AA0FF; padding: 10px 0;
}
.card_title {
display: flex;
justify-content: space-between;
.card_left {
font-size: 32px;
color: #000000;
font-weight: 600;
} }
.card_right { .num {
span { color: #3AA0FF;
display: inline-block; }
width: 16px; .card_title {
height: 16px; display: flex;
// background: #3399FF; justify-content: space-between;
border-radius: 50%; .card_left {
margin-right: 10px; font-size: 32px;
color: #000000;
font-weight: 600;
} }
.card_right {
span {
display: inline-block;
width: 16px;
height: 16px;
// background: #3399FF;
border-radius: 50%;
margin-right: 10px;
}
.status0 { .status0 {
background: #FFA938; background: #FFA938;
} }
.status1 { .status1 {
background: #FF6758; background: #FF6758;
} }
.status2 { .status2 {
background: #3399FF; background: #3399FF;
} }
.status3 { .status3 {
background: #FF6758; background: #FF6758;
} }
.status4 { .status4 {
background: #3399FF; background: #3399FF;
} }
.status5 { .status5 {
background: #1CCEB0; background: #1CCEB0;
} }
.status6 { .status6 {
background: #666666; background: #666666;
}
} }
} }
} }
.card_bottom {
text-align: center;
height: 80px;
line-height: 80px;
color: #1365DD;
font-weight: 600;
border-top: 1px solid #d4d4d4;
}
} }
} }

View File

@@ -10,8 +10,8 @@
<div @click="toSleectScoped"> <div @click="toSleectScoped">
<span> <span>
<span v-if="type=='ResidentsGroup'"> <span v-if="type=='ResidentsGroup'">
<span class="color_gray" v-if="!form.wxGroups.length">请选择</span> <span class="color_gray" v-if="sum==0">请选择</span>
<span v-else>预计送达{{ form.wxGroups.length }}个居民群</span> <span v-else>预计送达{{ sum }}个居民群</span>
</span> </span>
<span v-if="type!='ResidentsGroup'"> <span v-if="type!='ResidentsGroup'">
<span class="color_gray" v-if="sum==0">请选择</span> <span class="color_gray" v-if="sum==0">请选择</span>
@@ -529,7 +529,6 @@ export default {
}, },
getDeptUser() { getDeptUser() {
uni.showLoading({title: '加载中'})
this.selectEnterpriseContact({ this.selectEnterpriseContact({
fromDepartmentId: 0, fromDepartmentId: 0,
mode: "multi", mode: "multi",
@@ -543,7 +542,6 @@ export default {
examineUserId: e.id examineUserId: e.id
} }
}) })
uni.hideLoading()
} }
}).catch((err) => { }).catch((err) => {
this.$u.toast(err) this.$u.toast(err)
@@ -585,7 +583,7 @@ export default {
this.forms.executorList = this.form.wxGroups this.forms.executorList = this.form.wxGroups
this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0) this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0)
} else if(this.type == 'ResidentsGroup') { } else if(this.type == 'ResidentsGroup') {
this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.groupCount, 0)
} }
this.forms.taskTitle = this.form.taskTitle this.forms.taskTitle = this.form.taskTitle
const girdArr = uni.getStorageSync('girdSelect') const girdArr = uni.getStorageSync('girdSelect')

View File

@@ -92,7 +92,6 @@ export default {
}, },
getDeptUser() { getDeptUser() {
uni.showLoading({title: '加载中'})
this.selectEnterpriseContact({ this.selectEnterpriseContact({
fromDepartmentId: 0, // 从最上层开始 fromDepartmentId: 0, // 从最上层开始
mode: "multi", // 多选 mode: "multi", // 多选
@@ -102,7 +101,6 @@ export default {
if(res?.departmentList) { if(res?.departmentList) {
this.deptListArr = res.departmentList this.deptListArr = res.departmentList
} }
uni.hideLoading()
}).catch((err) => { }).catch((err) => {
this.$u.toast(err) this.$u.toast(err)
}) })