|
@@ -18,13 +18,13 @@
|
|
|
<div>
|
|
<div>
|
|
|
<image :src="item.avatar" mode="aspectFit" style="width:100upx;height:100upx;border-radius: 50%"></image>
|
|
<image :src="item.avatar" mode="aspectFit" style="width:100upx;height:100upx;border-radius: 50%"></image>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="list-det">
|
|
|
|
|
|
|
+ <div class="list-det" @click="pageTo({url: '/admin/staff/detail?id='+ item.id})">
|
|
|
<div class="list-det-left">
|
|
<div class="list-det-left">
|
|
|
<div>
|
|
<div>
|
|
|
<span class="staff-name">{{ item.name }}</span>
|
|
<span class="staff-name">{{ item.name }}</span>
|
|
|
- <span>{{ item.mobile }}</span>
|
|
|
|
|
|
|
+ <span> {{ item.id }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div></div>
|
|
|
|
|
|
|
+ <div>{{ item.mobile }}</div>
|
|
|
<div class="flex-center">
|
|
<div class="flex-center">
|
|
|
<div class="status-list">
|
|
<div class="status-list">
|
|
|
<i class="iconfont icondagou" :class="[item.remind == 1 ? 'app-color-1' : '' ]"></i>
|
|
<i class="iconfont icondagou" :class="[item.remind == 1 ? 'app-color-1' : '' ]"></i>
|
|
@@ -38,8 +38,8 @@
|
|
|
<view class="super-class" v-if="item.founder == 2">超管</view>
|
|
<view class="super-class" v-if="item.founder == 2">超管</view>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list-det-right">
|
|
<div class="list-det-right">
|
|
|
- <div v-if="item.founder != 2 && item.id != loginInfo.shopAdminId" @click="delModalFn(item)"> <i class="iconfont iconshanchu1"></i> </div>
|
|
|
|
|
- <div @click="pageTo({url: '/admin/staff/detail',query: {id: item.id}})"> <i class="iconfont iconbianji"></i> </div>
|
|
|
|
|
|
|
+ <div v-if="item.founder != 2 && item.id != loginInfo.shopAdminId" @click.stop="delModalFn(item)"> <i class="iconfont iconshanchu1"></i> </div>
|
|
|
|
|
+ <div> <i class="iconfont iconbianji"></i> </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -59,29 +59,14 @@
|
|
|
<div class="list-wrap role-list">
|
|
<div class="list-wrap role-list">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<div class="list" v-for="(item, index) in list.data" :key="index">
|
|
<div class="list" v-for="(item, index) in list.data" :key="index">
|
|
|
- <div class="app-size-32">{{ item.roleName }}({{ item.num }})</div>
|
|
|
|
|
- <div class="role-option">
|
|
|
|
|
- <!--
|
|
|
|
|
- <div @click="modifyRoleFn(item)">
|
|
|
|
|
- <i class="iconfont iconbianji"></i>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div @click="delModalFn(item)">
|
|
|
|
|
- <i class="iconfont iconshanchu1"></i>
|
|
|
|
|
- </div>
|
|
|
|
|
- -->
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="app-size-32">{{ item.roleName }}</div>
|
|
|
|
|
+ <div class="role-option"></div>
|
|
|
</div>
|
|
</div>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
</block>
|
|
</block>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 按钮 -->
|
|
|
|
|
- <!--
|
|
|
|
|
- <div class="app-footer">
|
|
|
|
|
- <div class="admin-button-com middle blue" @click="addRoleFn">添加角色</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- -->
|
|
|
|
|
</block>
|
|
</block>
|
|
|
<!-- 操作记录 -->
|
|
<!-- 操作记录 -->
|
|
|
<block v-if="tabIndex == 2">
|
|
<block v-if="tabIndex == 2">
|
|
@@ -108,7 +93,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</block>
|
|
</block>
|
|
|
<!-- 角色操作 -->
|
|
<!-- 角色操作 -->
|
|
|
- <modal-module :show="roleModal" @cancel="modalCancel" @click="roleModalClick" :title="roleModalText" padding="30upx 30upx">
|
|
|
|
|
|
|
+ <modal-module :show="roleModal" @cancel="modalCancel" @click="roleModalClick" :title="roleModalText" padding="30rpx 30rpx">
|
|
|
<template v-slot:content>
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
<div class="app-modal-input-wrap">
|
|
|
<div class="inp-list-line required">
|
|
<div class="inp-list-line required">
|
|
@@ -121,10 +106,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
</modal-module>
|
|
</modal-module>
|
|
|
<!-- 删除弹窗 -->
|
|
<!-- 删除弹窗 -->
|
|
|
- <modal-module :show="delModal" @cancel="modalCancel" @click="delModalClick" :content="delModalText" color="#333" :size="32" padding="30upx 30upx"></modal-module>
|
|
|
|
|
|
|
+ <modal-module :show="delModal" @cancel="modalCancel" @click="delModalClick" :content="delModalText" color="#333" :size="32" padding="30rpx 30rpx"></modal-module>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import AppTabs from '@/components/plugin/tabs'
|
|
import AppTabs from '@/components/plugin/tabs'
|
|
|
import AppAvatarModule from '@/components/module/app-avatar'
|
|
import AppAvatarModule from '@/components/module/app-avatar'
|
|
@@ -161,20 +145,19 @@ export default {
|
|
|
value: 2
|
|
value: 2
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- // 删除弹窗操作
|
|
|
|
|
delModal: false,
|
|
delModal: false,
|
|
|
delModalText: '确定删除该员工吗?',
|
|
delModalText: '确定删除该员工吗?',
|
|
|
operateData: {},
|
|
operateData: {},
|
|
|
- // 角色弹窗操作
|
|
|
|
|
roleModal: false,
|
|
roleModal: false,
|
|
|
roleModalText: '添加',
|
|
roleModalText: '添加',
|
|
|
roleModalVal: '',
|
|
roleModalVal: '',
|
|
|
- roleOperateData: {}
|
|
|
|
|
|
|
+ roleOperateData: {},
|
|
|
|
|
+ fromDetail:{status:0}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this._list().then(res => {
|
|
|
|
|
|
|
+ this.getStaffList().then(res => {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -183,25 +166,27 @@ export default {
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
if (!this.list.finished) {
|
|
if (!this.list.finished) {
|
|
|
- this._list().then(res => {
|
|
|
|
|
|
|
+ this.getStaffList().then(res => {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onLoad: function() {
|
|
|
|
|
|
|
+ onShow(){
|
|
|
|
|
+ if(this.fromDetail.status == 1){
|
|
|
|
|
+ this.fromDetail.status = 0
|
|
|
|
|
+ this.resetList()
|
|
|
|
|
+ this.getStaffList()
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
async init() {
|
|
async init() {
|
|
|
- this._list()
|
|
|
|
|
- },
|
|
|
|
|
- searchFn(){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.getStaffList()
|
|
|
},
|
|
},
|
|
|
- _list() {
|
|
|
|
|
|
|
+ getStaffList() {
|
|
|
let hostFn = this.tabIndex == 0 ? getStaffList : this.tabIndex == 1 ? getRoleList : getLogList
|
|
let hostFn = this.tabIndex == 0 ? getStaffList : this.tabIndex == 1 ? getRoleList : getLogList
|
|
|
- return hostFn().then(res => {
|
|
|
|
|
|
|
+ return hostFn({page: this.list.page}).then(res => {
|
|
|
this.completes(res)
|
|
this.completes(res)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -211,7 +196,7 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.tabIndex = e.index
|
|
this.tabIndex = e.index
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this._list()
|
|
|
|
|
|
|
+ this.getStaffList()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 关闭弹窗
|
|
// 关闭弹窗
|
|
@@ -238,12 +223,11 @@ export default {
|
|
|
this.$msg('删除成功!')
|
|
this.$msg('删除成功!')
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this._list()
|
|
|
|
|
|
|
+ this.getStaffList()
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 角色操作
|
|
|
|
|
addRoleFn() {
|
|
addRoleFn() {
|
|
|
this.roleModal = true
|
|
this.roleModal = true
|
|
|
this.roleModalText = '添加'
|
|
this.roleModalText = '添加'
|
|
@@ -272,7 +256,7 @@ export default {
|
|
|
this.$msg(`${this.roleModalText}成功!`)
|
|
this.$msg(`${this.roleModalText}成功!`)
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this._list()
|
|
|
|
|
|
|
+ this.getStaffList()
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -339,14 +323,14 @@ export default {
|
|
|
position:relative;
|
|
position:relative;
|
|
|
.staff-name {
|
|
.staff-name {
|
|
|
color: #333;
|
|
color: #333;
|
|
|
- font-size: 30upx;
|
|
|
|
|
|
|
+ font-size:27upx;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
margin-right: 10upx;
|
|
margin-right: 10upx;
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
text-overflow:ellipsis;
|
|
text-overflow:ellipsis;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
- width:150upx;
|
|
|
|
|
|
|
+ width:180upx;
|
|
|
}
|
|
}
|
|
|
.super-class{
|
|
.super-class{
|
|
|
background-color: #3385FF;
|
|
background-color: #3385FF;
|
|
@@ -358,7 +342,7 @@ export default {
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
padding:6upx 0 6upx 0;
|
|
padding:6upx 0 6upx 0;
|
|
|
position:absolute;
|
|
position:absolute;
|
|
|
- right:-90upx;
|
|
|
|
|
|
|
+ right:-50upx;
|
|
|
top:9upx;
|
|
top:9upx;
|
|
|
}
|
|
}
|
|
|
.flex-center {
|
|
.flex-center {
|