去掉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,7 +12,8 @@
</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_top" @click="toDetail(item)">
<div class="card_title"> <div class="card_title">
<div class="card_left">{{ item.taskTitle }}</div> <div class="card_left">{{ item.taskTitle }}</div>
<div class="card_right"><span :class="item.status==0? 'status0': item.status==1? 'status1': item.status==2? 'status2': <div class="card_right"><span :class="item.status==0? 'status0': item.status==1? 'status1': item.status==2? 'status2':
@@ -23,9 +24,10 @@
<div> <div>
创建部门 创建部门
<span v-if="item.createUserDeptName">{{ item.createUserDeptName }}</span> <span v-if="item.createUserDeptName">{{ item.createUserDeptName }}</span>
<!-- <span v-if="item.createUserSecondDept"><AiOpenData type="departmentName" :openid="item.createUserSecondDept" style="display: inline-block" /></span> -->
</div> </div>
</div> </div>
<div class="card_bottom" v-if="item.status == 4 && item.createUserId == user.wxUserId" @click="stopBtn(item.id)">关闭任务</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,8 +341,10 @@ export default {
.card { .card {
background: #FFF; background: #FFF;
border-radius: 16px; border-radius: 16px;
padding: 30px;
margin-bottom: 24px; margin-bottom: 24px;
.card_top {
padding: 30px;
box-sizing: border-box;
& > div { & > div {
padding: 10px 0; padding: 10px 0;
} }
@@ -363,6 +393,15 @@ export default {
} }
} }
} }
.card_bottom {
text-align: center;
height: 80px;
line-height: 80px;
color: #1365DD;
font-weight: 600;
border-top: 1px solid #d4d4d4;
}
}
} }
.btn { .btn {

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)
}) })