修改
This commit is contained in:
parent
1fc379e0ae
commit
7e88642740
@ -38,16 +38,17 @@
|
||||
<view class="a-box" v-for="(item,index) in goodsList" :key="index">
|
||||
<view class="t-box">
|
||||
<label>
|
||||
<checkbox :value="item.id" color="#FFCC33" style="transform:scale(0.7)"/>
|
||||
<checkbox :value="item.id+''" color="#FFCC33" style="transform:scale(0.7)"/>
|
||||
</label>
|
||||
<view class="s-img">
|
||||
<image :src="item.avatar" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="s-right">
|
||||
<view class="s-title">{{ item.nickname }}</view>
|
||||
<view class="s-hui">电话:{{ item.mobile }}</view>
|
||||
<view class="s-title">{{ item.nickname || item.username }}</view>
|
||||
<view class="s-hui">岗位:{{item.roleName}}</view>
|
||||
<view class="s-hui">电话:{{ item.mobile || item.username }}</view>
|
||||
</view>
|
||||
<view class="bottom-box" @click="gettel(item.mobile)">
|
||||
<view class="bottom-box" @click="gettel(item)">
|
||||
<uni-icons type="phone-filled" color="#0D2E8D" size="18"></uni-icons>
|
||||
<text>电话</text>
|
||||
<!-- @click="getdelete(item.id)" -->
|
||||
@ -138,7 +139,7 @@ export default {
|
||||
gwindex: 0,
|
||||
gwid: 0,
|
||||
roleId:undefined,
|
||||
addRoleId:undefined
|
||||
addRoleId:undefined,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -170,8 +171,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
gettel(num) {
|
||||
const value = num.mobile || num.username
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: num //仅为示例
|
||||
phoneNumber: value //仅为示例
|
||||
});
|
||||
},
|
||||
xgang(index, id) {
|
||||
@ -239,7 +241,18 @@ export default {
|
||||
let total = res.total
|
||||
this.totalPages = Math.ceil(total / this.pageSize);
|
||||
}
|
||||
|
||||
const newUsers = this.goodsList.filter(item => !item.roleName)
|
||||
if (newUsers && newUsers.length > 0){
|
||||
const ids = newUsers.map(item => item.id)
|
||||
request({
|
||||
url: '/inspection/util/getRoleNameByIds?ids=' + ids,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.goodsList.filter(item => !item.roleName).map(item => {
|
||||
this.$set(item, "roleName", res.data[item.id])
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 去编辑
|
||||
getedit(id) {
|
||||
|
Loading…
Reference in New Issue
Block a user