修改
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="a-box" v-for="(item,index) in goodsList" :key="index">
|
||||||
<view class="t-box">
|
<view class="t-box">
|
||||||
<label>
|
<label>
|
||||||
<checkbox :value="item.id" color="#FFCC33" style="transform:scale(0.7)"/>
|
<checkbox :value="item.id+''" color="#FFCC33" style="transform:scale(0.7)"/>
|
||||||
</label>
|
</label>
|
||||||
<view class="s-img">
|
<view class="s-img">
|
||||||
<image :src="item.avatar" mode="aspectFill"></image>
|
<image :src="item.avatar" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="s-right">
|
<view class="s-right">
|
||||||
<view class="s-title">{{ item.nickname }}</view>
|
<view class="s-title">{{ item.nickname || item.username }}</view>
|
||||||
<view class="s-hui">电话:{{ item.mobile }}</view>
|
<view class="s-hui">岗位:{{item.roleName}}</view>
|
||||||
|
<view class="s-hui">电话:{{ item.mobile || item.username }}</view>
|
||||||
</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>
|
<uni-icons type="phone-filled" color="#0D2E8D" size="18"></uni-icons>
|
||||||
<text>电话</text>
|
<text>电话</text>
|
||||||
<!-- @click="getdelete(item.id)" -->
|
<!-- @click="getdelete(item.id)" -->
|
||||||
@ -138,7 +139,7 @@ export default {
|
|||||||
gwindex: 0,
|
gwindex: 0,
|
||||||
gwid: 0,
|
gwid: 0,
|
||||||
roleId:undefined,
|
roleId:undefined,
|
||||||
addRoleId:undefined
|
addRoleId:undefined,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -170,8 +171,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gettel(num) {
|
gettel(num) {
|
||||||
|
const value = num.mobile || num.username
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: num //仅为示例
|
phoneNumber: value //仅为示例
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
xgang(index, id) {
|
xgang(index, id) {
|
||||||
@ -239,7 +241,18 @@ export default {
|
|||||||
let total = res.total
|
let total = res.total
|
||||||
this.totalPages = Math.ceil(total / this.pageSize);
|
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) {
|
getedit(id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user