员工管理
This commit is contained in:
parent
74cc28d805
commit
572eb56d16
@ -21,7 +21,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<scroll-view scroll-x="true" class="box-bottom">
|
<scroll-view scroll-x="true" class="box-bottom">
|
||||||
<view class="tap-box" v-for="(item,index) in tabList" :key="index" @click="gettap(index,item.id)">
|
<view class="tap-box" v-for="(item,index) in tabList" :key="index" @click="gettap(index,item.id)">
|
||||||
<view :class="{'lan' : tapindex == index}">{{item.name}}</view>
|
<view :class="{'lan' : tapindex == index}">{{ item.name }}</view>
|
||||||
<view class="gang" v-if="tapindex == index"></view>
|
<view class="gang" v-if="tapindex == index"></view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@ -29,8 +29,6 @@
|
|||||||
<view class="top-ail">
|
<view class="top-ail">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="jsy" v-if="!goodsList||goodsList.length == 0">
|
<view class="jsy" v-if="!goodsList||goodsList.length == 0">
|
||||||
<image src="http://www.nuoyunr.com/lananRsc/detection/qs.png" mode=""></image>
|
<image src="http://www.nuoyunr.com/lananRsc/detection/qs.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
@ -40,16 +38,16 @@
|
|||||||
<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.workName}}</view>
|
<view class="s-title">{{ item.nickname }}</view>
|
||||||
<view class="s-hui">电话:{{item.workPhone}}</view>
|
<view class="s-hui">电话:{{ item.mobile }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom-box" @click="gettel(item.workPhone)">
|
<view class="bottom-box" @click="gettel(item.mobile)">
|
||||||
<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)" -->
|
||||||
@ -89,7 +87,7 @@
|
|||||||
<view class="warp-flax">
|
<view class="warp-flax">
|
||||||
<view class="flasxbox" :class="{ 'gwcss' : gwindex == index }" v-for="(item,index) in renList"
|
<view class="flasxbox" :class="{ 'gwcss' : gwindex == index }" v-for="(item,index) in renList"
|
||||||
:key="index" @click="xgang(index,item.id)">
|
:key="index" @click="xgang(index,item.id)">
|
||||||
<text>{{item.name}}</text>
|
<text>{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -103,9 +101,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
msg: '3',
|
msg: '3',
|
||||||
@ -138,6 +137,8 @@
|
|||||||
postid: '',
|
postid: '',
|
||||||
gwindex: 0,
|
gwindex: 0,
|
||||||
gwid: 0,
|
gwid: 0,
|
||||||
|
roleId:undefined,
|
||||||
|
addRoleId:undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -167,7 +168,7 @@
|
|||||||
this.gettab()
|
this.gettab()
|
||||||
// this.baseUrl = this.$baseUrl
|
// this.baseUrl = this.$baseUrl
|
||||||
this.partnerId = uni.getStorageSync('partnerId')
|
this.partnerId = uni.getStorageSync('partnerId')
|
||||||
this.getindex()
|
// this.getindex()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gettel(num) {
|
gettel(num) {
|
||||||
@ -181,16 +182,25 @@
|
|||||||
},
|
},
|
||||||
async gettab() {
|
async gettab() {
|
||||||
let res = await request({
|
let res = await request({
|
||||||
url: '/partnerOwn/partner/inspectionPostInfo',
|
url: '/system/role/pageByQuery',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
servicePackageId:'jiance'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
console.log(res);
|
console.log('获取所有角色', res);
|
||||||
this.tabList = res.data
|
this.tabList = [{
|
||||||
this.renList = res.data.slice(1)
|
name: '全部',
|
||||||
|
id: undefined
|
||||||
|
}]
|
||||||
|
this.tabList.push(...res.data)
|
||||||
|
this.roleId = this.tabList[0].id
|
||||||
|
this.renList = res.data
|
||||||
|
this.getindex()
|
||||||
},
|
},
|
||||||
gettap(index, id) {
|
gettap(index, id) {
|
||||||
this.tapindex = index
|
this.tapindex = index
|
||||||
this.postid = id
|
this.roleId = id
|
||||||
this.goodsList = []
|
this.goodsList = []
|
||||||
this.getindex()
|
this.getindex()
|
||||||
|
|
||||||
@ -207,15 +217,14 @@
|
|||||||
async getindex() {
|
async getindex() {
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
partnerId: this.partnerId,
|
nickname: this.workName,
|
||||||
workName: this.workName,
|
roleId: this.roleId,
|
||||||
postId: this.postid,
|
pageNo: this.pageNum, //第几页
|
||||||
pageNum: this.pageNum, //第几页
|
|
||||||
pageSize: this.pageSize, //一页多少张
|
pageSize: this.pageSize, //一页多少张
|
||||||
}
|
}
|
||||||
let res = await request({
|
let res = await request({
|
||||||
|
|
||||||
url: '/partnerOwn/partner/getWorkList',
|
url: '/system/role/selectListByRoleId',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@ -266,16 +275,13 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
this.workids = this.workids.join(",")
|
// this.workids = this.workids.join(",")
|
||||||
}
|
|
||||||
let data = {
|
|
||||||
partnerId: this.partnerId,
|
|
||||||
workIdStr: this.workids
|
|
||||||
}
|
}
|
||||||
let res = await request({
|
let res = await request({
|
||||||
url: '/partnerOwn/partner/delWorker',
|
url: '/system/user/deleteUserByIds',
|
||||||
method: 'post',
|
method: 'delete',
|
||||||
params: data
|
data: this.workids
|
||||||
|
|
||||||
})
|
})
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -299,19 +305,32 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
partnerId: this.partnerId,
|
nickname: this.realName,
|
||||||
realName: this.realName,
|
mobile: this.phoneNum,
|
||||||
phoneNum: this.phoneNum,
|
username: this.phoneNum,
|
||||||
postId: this.gwid,
|
status:0,
|
||||||
|
userType:'01',
|
||||||
|
roleId:this.gwid,
|
||||||
|
password:'123456'
|
||||||
|
|
||||||
}
|
}
|
||||||
let res = await request({
|
let res = await request({
|
||||||
url: '/partnerOwn/partner/addWorker',
|
url: '/system/user/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: data
|
data: data
|
||||||
})
|
})
|
||||||
//
|
//
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
let roleIds = []
|
||||||
|
roleIds.push(this.gwid)
|
||||||
|
let resp = await request({
|
||||||
|
url: '/system/permission/assign-user-role',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
userId: res.data,
|
||||||
|
roleIds: roleIds
|
||||||
|
}
|
||||||
|
})
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "添加成功"
|
title: "添加成功"
|
||||||
})
|
})
|
||||||
@ -319,7 +338,8 @@
|
|||||||
this.getindex()
|
this.getindex()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
open() {},
|
open() {
|
||||||
|
},
|
||||||
close() {
|
close() {
|
||||||
this.show = false
|
this.show = false
|
||||||
|
|
||||||
@ -329,24 +349,24 @@
|
|||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.content {
|
.content {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh);
|
height: calc(100vh);
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.warp-flax {
|
.warp-flax {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flasxbox {
|
.flasxbox {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
@ -356,9 +376,9 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gwcss {
|
.gwcss {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
@ -369,9 +389,9 @@
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-heder {
|
.top-heder {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
background: white;
|
background: white;
|
||||||
@ -380,13 +400,13 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 5px 15px;
|
padding: 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-left {
|
.t-left {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-input {
|
.t-input {
|
||||||
width: 75%;
|
width: 75%;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
background: #F0F0F0;
|
background: #F0F0F0;
|
||||||
@ -396,42 +416,42 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-ail {
|
.top-ail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
padding-bottom: 45px;
|
padding-bottom: 45px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sou {
|
.sou {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mub {
|
.mub {
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
height: calc(100vh);
|
height: calc(100vh);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dix {
|
.dix {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-tap {
|
.top-tap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tap-box {
|
.tap-box {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -440,38 +460,38 @@
|
|||||||
color: #606266;
|
color: #606266;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gang {
|
.gang {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
background: #0D2E8D;
|
background: #0D2E8D;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin: 4px auto;
|
margin: 4px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.a-box {
|
.a-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-box {
|
.t-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// padding-bottom: 15px;
|
// padding-bottom: 15px;
|
||||||
display: flex;
|
display: flex;
|
||||||
// border-bottom: 1px solid #EEEEEE;
|
// border-bottom: 1px solid #EEEEEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-huix {
|
.s-huix {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-img {
|
.s-img {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@ -483,32 +503,32 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-right {
|
.s-right {
|
||||||
width: 65%;
|
width: 65%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-title {
|
.s-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-hui {
|
.s-hui {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
margin: 2px auto;
|
margin: 2px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-ju {
|
.s-ju {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #FF571A;
|
color: #FF571A;
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-bottom {
|
.d-bottom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
@ -520,9 +540,9 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: #0D2E8D;
|
background: #0D2E8D;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-bottom {
|
.s-bottom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
@ -535,9 +555,9 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: crimson;
|
background: crimson;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-box {
|
.bottom-box {
|
||||||
width: 66px;
|
width: 66px;
|
||||||
height: 31px;
|
height: 31px;
|
||||||
background: #DAE1F8;
|
background: #DAE1F8;
|
||||||
@ -549,37 +569,36 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lan {
|
.lan {
|
||||||
color: #0D2E8D !important;
|
color: #0D2E8D !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jsy {
|
.jsy {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #0D2E8D !important;
|
color: #0D2E8D !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pop-box {
|
.pop-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.on-input {
|
.on-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #DAE1F8;
|
border-bottom: 1px solid #DAE1F8;;
|
||||||
;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tjiao {
|
.tjiao {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
margin: 5px auto;
|
margin: 5px auto;
|
||||||
@ -589,9 +608,9 @@
|
|||||||
background: #0D2E8D;
|
background: #0D2E8D;
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.c-tap {
|
.c-tap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -599,31 +618,31 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tap-box {
|
.tap-box {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gang {
|
.gang {
|
||||||
height: 4px;
|
height: 4px;
|
||||||
background: #0D2E8D;
|
background: #0D2E8D;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lan {
|
.lan {
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-bottom {
|
.box-bottom {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user