userSelect
This commit is contained in:
parent
ce0c440666
commit
411e2bb2b8
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<view class="componentWrap">
|
||||||
|
<uni-nav-bar
|
||||||
|
@clickLeft="goBack()"
|
||||||
|
class="nav-bar" leftText="人员选择"
|
||||||
|
height="110rpx" leftWidth="200rpx"
|
||||||
|
leftIcon="left" backgroundColor="#2cade8" color="#fff"
|
||||||
|
border fixed statusBar shadow
|
||||||
|
></uni-nav-bar>
|
||||||
|
|
||||||
|
<view class="apply-info">
|
||||||
|
<view> 返回上一级 </view>
|
||||||
|
<view> 返回上一级 </view>
|
||||||
|
<view> 返回上一级 </view>
|
||||||
|
<view> 返回上一级 </view>
|
||||||
|
<view> 返回上一级 </view>
|
||||||
|
<view> 返回上一级 </view>
|
||||||
|
<view> 返回上一级 </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
onLoad() {},
|
||||||
|
onShow() {},
|
||||||
|
methods: {
|
||||||
|
goBack() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
>>> .uni-navbar__header,
|
||||||
|
>>> .uni-status-bar {
|
||||||
|
background-image: linear-gradient(254deg, #0ca7ee 0%, #005aff 100%, #2a8cff 100%, #54bdff 100%),
|
||||||
|
linear-gradient(#e60012, #e60012);
|
||||||
|
}
|
||||||
|
>>> uni-image {
|
||||||
|
height: 200upx;
|
||||||
|
width: 200upx;
|
||||||
|
}
|
||||||
|
.componentWrap {
|
||||||
|
background-color: #f3fbff;
|
||||||
|
padding-bottom: 227rpx;
|
||||||
|
}
|
||||||
|
.apply-info {
|
||||||
|
width: 720rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 25rpx 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
60
pages.json
60
pages.json
|
@ -16,7 +16,7 @@
|
||||||
"navigationBarTitleText": "曲阳金隅EHS-密码登录",
|
"navigationBarTitleText": "曲阳金隅EHS-密码登录",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "pages/login/userRegister",
|
"path": "pages/login/userRegister",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "曲阳金隅EHS-新用户注册",
|
"navigationBarTitleText": "曲阳金隅EHS-新用户注册",
|
||||||
|
@ -146,13 +146,13 @@
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/workSpace/newWork/userList",
|
"path": "pages/workSpace/newWork/userList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择人员",
|
"navigationBarTitleText": "选择人员",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -160,7 +160,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "添加人员",
|
"navigationBarTitleText": "添加人员",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "新增违章",
|
"navigationBarTitleText": "新增违章",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "曲阳金隅EHS-来访项目",
|
"navigationBarTitleText": "曲阳金隅EHS-来访项目",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -240,7 +240,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "新建来访项目",
|
"navigationBarTitleText": "新建来访项目",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择人员",
|
"navigationBarTitleText": "选择人员",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -256,7 +256,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "来访项目查看",
|
"navigationBarTitleText": "来访项目查看",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "动火作业许可证",
|
"navigationBarTitleText": "动火作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "高处作业许可证",
|
"navigationBarTitleText": "高处作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "临时用电许可证",
|
"navigationBarTitleText": "临时用电许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -288,7 +288,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "动土作业许可证",
|
"navigationBarTitleText": "动土作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "预热器清堵作业许可证",
|
"navigationBarTitleText": "预热器清堵作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -304,7 +304,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "吊装作业许可证",
|
"navigationBarTitleText": "吊装作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -312,7 +312,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "篦冷机清大块作业许可证",
|
"navigationBarTitleText": "篦冷机清大块作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -320,7 +320,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "清库作业许可证",
|
"navigationBarTitleText": "清库作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "有限空间作业许可证",
|
"navigationBarTitleText": "有限空间作业许可证",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -336,7 +336,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "人员确定",
|
"navigationBarTitleText": "人员确定",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -348,7 +348,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/my/myInfo",
|
"path": "pages/my/myInfo",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人信息",
|
"navigationBarTitleText": "个人信息",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
@ -356,7 +356,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/my/myInfoChange",
|
"path": "pages/my/myInfoChange",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人信息完善",
|
"navigationBarTitleText": "个人信息完善",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
@ -364,7 +364,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/my/myCertificates",
|
"path": "pages/my/myCertificates",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的证书",
|
"navigationBarTitleText": "我的证书",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
@ -372,7 +372,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/my/clock_in",
|
"path": "pages/my/clock_in",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "打卡记录",
|
"navigationBarTitleText": "打卡记录",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
@ -380,7 +380,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/my/passwordChange",
|
"path": "pages/my/passwordChange",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "修改密码",
|
"navigationBarTitleText": "修改密码",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
@ -388,7 +388,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/workSpace/visit/visitor",
|
"path": "pages/workSpace/visit/visitor",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的访客库",
|
"navigationBarTitleText": "我的访客库",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
@ -396,11 +396,19 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/workSpace/rpj/remployee",
|
"path": "pages/workSpace/rpj/remployee",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的人员库",
|
"navigationBarTitleText": "我的人员库",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/comm/userSelect/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "人员选择",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|
|
@ -0,0 +1,266 @@
|
||||||
|
<template>
|
||||||
|
<view class="componentWrap">
|
||||||
|
<uni-nav-bar
|
||||||
|
@clickLeft="goBack()"
|
||||||
|
class="nav-bar" leftText="人员选择"
|
||||||
|
height="110rpx" leftWidth="200rpx"
|
||||||
|
leftIcon="left" backgroundColor="#2cade8" color="#fff"
|
||||||
|
border fixed statusBar shadow
|
||||||
|
></uni-nav-bar>
|
||||||
|
|
||||||
|
<view class="list-wrap">
|
||||||
|
<button @click="backPreLevel"> 返回上一级 </button>
|
||||||
|
<view>
|
||||||
|
<view v-for="(dept,index) in showDepts" :key="dept.id" class="listItem" @click="deptClick(dept,index)">
|
||||||
|
<image class="deptImage" src="../../../static/common/wenjianjia.png"></image>
|
||||||
|
<view class="itemName"> {{dept.name}}</view>
|
||||||
|
</view>
|
||||||
|
<radio-group @change="(e) => radioChange(e)">
|
||||||
|
<label class="listItem"v-for="(user,index1) in userLists" :key="user.id">
|
||||||
|
<view>
|
||||||
|
<radio :value="user.id" :id="user.id" :name=user.name :checked="user.checked" />
|
||||||
|
</view>
|
||||||
|
<image class="userImage" src="../../../static/login/userRegister.png"></image>
|
||||||
|
<view>{{user.name}}</view>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottomBlock">
|
||||||
|
<text v-if="selectedUser.length>0" class="checkUserShow">已选人员:{{selectedUser[0].name}}</text>
|
||||||
|
<button size="mini" type="primary" class="submitBtn" @click="submitClick">确定</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
type:'',
|
||||||
|
typeName:'',
|
||||||
|
level:'dept',
|
||||||
|
showDepts:[],
|
||||||
|
deptLists:[],
|
||||||
|
userLists:[],
|
||||||
|
rpartyLists:[],
|
||||||
|
selectedUser:[],
|
||||||
|
currentDept:'',
|
||||||
|
currentIndex:'',
|
||||||
|
currentParent:'',
|
||||||
|
currentId:''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(params) {
|
||||||
|
this.type = params.type;
|
||||||
|
this.typeName = params.typeName;
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getDept();
|
||||||
|
this.getRparty();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getDept(){
|
||||||
|
let that = this;
|
||||||
|
that.$u.api.deptList({
|
||||||
|
page: 0,
|
||||||
|
type__in: 'dept',
|
||||||
|
query: '{id, name, parent, type}'
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
that.showDepts = res;
|
||||||
|
that.deptLists = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getRparty(){
|
||||||
|
let that = this;
|
||||||
|
that.$u.api.deptList({
|
||||||
|
page: 0,
|
||||||
|
type__in: 'rparty',
|
||||||
|
query: '{id, name, parent, type}'
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
that.rpartyLists = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击部门
|
||||||
|
deptClick(dept,index){
|
||||||
|
let that = this;
|
||||||
|
let showDepts = [];
|
||||||
|
let params = {
|
||||||
|
page: 0,
|
||||||
|
belong_dept: dept.id,
|
||||||
|
is_active: true,
|
||||||
|
query: '{id, name, belong_dept}'
|
||||||
|
};
|
||||||
|
if(that.level == 'dept'){
|
||||||
|
that.level = 'rparty';
|
||||||
|
that.currentIndex = index;
|
||||||
|
//获取该部门下的相关方
|
||||||
|
showDepts = that.rpartyLists.filter(item=>{
|
||||||
|
return item.parent==dept.id;
|
||||||
|
})
|
||||||
|
//获取该部门下的人员
|
||||||
|
if(that.deptLists[index].childreUser){
|
||||||
|
that.userLists =that.deptLists[index].childreUser;
|
||||||
|
that.userLists
|
||||||
|
for(let i = 0;i<that.userLists.length;i++){
|
||||||
|
if(that.userLists[i].id==that.currentId){
|
||||||
|
that.userLists[i].checked = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
that.$u.api.userList(params).then(res=>{
|
||||||
|
let arr = [];
|
||||||
|
res.forEach(userItem=>{
|
||||||
|
let obj = {};
|
||||||
|
obj = userItem;
|
||||||
|
obj.checked = false;
|
||||||
|
arr.push(obj)
|
||||||
|
})
|
||||||
|
that.deptLists[index].childreUser = arr;
|
||||||
|
that.userLists =arr;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else if(that.level == 'rparty'){
|
||||||
|
that.level = 'user';
|
||||||
|
showDepts = [];
|
||||||
|
//获取该相关方下的人员
|
||||||
|
that.$u.api.userList(params).then(res=>{
|
||||||
|
let arr = [];
|
||||||
|
res.forEach(userItem=>{
|
||||||
|
let obj = {};
|
||||||
|
obj = userItem;
|
||||||
|
if(that.currentId!==''&&that.currentId==userItem.id){
|
||||||
|
obj.checked = true;
|
||||||
|
}else{
|
||||||
|
obj.checked = false;
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
})
|
||||||
|
that.userLists =arr;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
that.currentDept = dept.id;
|
||||||
|
that.currentParent = dept.parent;
|
||||||
|
that.showDepts = showDepts;
|
||||||
|
},
|
||||||
|
//返回上一级
|
||||||
|
backPreLevel(){
|
||||||
|
let that = this;
|
||||||
|
if(that.level == 'user'){//相关方人员选择时
|
||||||
|
//获取
|
||||||
|
that.level = 'rparty';
|
||||||
|
that.showDepts = that.deptList;
|
||||||
|
that.currentDept = that.currentParent;
|
||||||
|
//获取该部门下的相关方
|
||||||
|
that.showDepts = that.rpartyLists.filter(item=>{
|
||||||
|
return item.parent==that.currentDept;
|
||||||
|
})
|
||||||
|
that.userLists = that.deptLists[that.currentIndex].childreUser;
|
||||||
|
}else if(that.level == 'rparty'){
|
||||||
|
that.level = 'dept';
|
||||||
|
that.showDepts = that.deptLists;
|
||||||
|
//获取该部门下的人员
|
||||||
|
that.userLists = [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
radioChange(e,item){
|
||||||
|
let that = this;
|
||||||
|
let value = e.detail.value;
|
||||||
|
that.currentId = value;
|
||||||
|
that.selectedUser = that.userLists.filter(item=>{
|
||||||
|
return item.id == value;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitClick(){
|
||||||
|
debugger;
|
||||||
|
let pages = getCurrentPages(); //获取所有页面栈实例列表
|
||||||
|
let nowPage = pages[ pages.length - 1]; //当前页页面实例
|
||||||
|
let prevPage = pages[ pages.length - 2 ]; //上一页页面实例
|
||||||
|
prevPage.$vm.formData[this.type] = this.selectedUser[0].id;
|
||||||
|
prevPage.$vm[this.typeName] = this.selectedUser[0].name;
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta: 1
|
||||||
|
// });
|
||||||
|
// let obj={};
|
||||||
|
// obj.type=this.type;
|
||||||
|
// obj.id=this.selectedUser[0].id;
|
||||||
|
// obj.name=this.selectedUser[0].name;
|
||||||
|
// uni.$emit('Selection',obj)
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goBack() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
>>> .uni-navbar__header,
|
||||||
|
>>> .uni-status-bar {
|
||||||
|
background-image: linear-gradient(254deg, #0ca7ee 0%, #005aff 100%, #2a8cff 100%, #54bdff 100%),
|
||||||
|
linear-gradient(#e60012, #e60012);
|
||||||
|
}
|
||||||
|
>>> uni-image {
|
||||||
|
height: 200upx;
|
||||||
|
width: 200upx;
|
||||||
|
}
|
||||||
|
.componentWrap {
|
||||||
|
background-color: #f3fbff;
|
||||||
|
padding-bottom: 227rpx;
|
||||||
|
}
|
||||||
|
.list-wrap {
|
||||||
|
width: 720rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 25rpx 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
.listItem{
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
padding: 28upx;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1upx solid #dddddd;
|
||||||
|
}
|
||||||
|
.deptImage{
|
||||||
|
width: 37upx;
|
||||||
|
height: 33upx;
|
||||||
|
margin-right: 28upx;
|
||||||
|
}
|
||||||
|
.userImage{
|
||||||
|
width: 50upx;
|
||||||
|
height: 50upx;
|
||||||
|
margin-right: 28upx;
|
||||||
|
}
|
||||||
|
.itemName{
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
.bottomBlock{
|
||||||
|
width: 100%;
|
||||||
|
height: 150upx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #015efe;
|
||||||
|
color: #ffffff;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
.checkUserShow{
|
||||||
|
padding-left:20upx;
|
||||||
|
line-height: 150upx;
|
||||||
|
}
|
||||||
|
.submitBtn{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 40upx;
|
||||||
|
right: 30upx;
|
||||||
|
background-color: #ff7000;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -30,7 +30,7 @@
|
||||||
</view>
|
</view>
|
||||||
<text class="title-text-left">待审批</text>
|
<text class="title-text-left">待审批</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="" @click="goIntoTargetPage('daiban')">
|
<view class="" @click="goIntoTargetPage('duty')">
|
||||||
<text class="title-text-right">查看更多</text>
|
<text class="title-text-right">查看更多</text>
|
||||||
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
|
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
</view>
|
</view>
|
||||||
<text class="title-text-left">抄送我</text>
|
<text class="title-text-left">抄送我</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="" @click="goIntoTargetPage('daiban')">
|
<view class="" @click="goIntoTargetPage('cc')">
|
||||||
<text class="title-text-right">查看更多</text>
|
<text class="title-text-right">查看更多</text>
|
||||||
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
|
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
@ -242,14 +242,15 @@
|
||||||
// debugger;
|
// debugger;
|
||||||
if(this.limitedVisit==true){
|
if(this.limitedVisit==true){
|
||||||
}else{
|
}else{
|
||||||
if (type == "daiban") {
|
let params = `?type=${type}`;
|
||||||
|
if (type == "duty") {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "./list/ticket"
|
url: "./list/ticket"+params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (type == "copy") {
|
if (type == "cc") {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "./list/ticket"
|
url: "./list/ticket"+params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (type == "warning") {
|
if (type == "warning") {
|
||||||
|
|
|
@ -78,8 +78,8 @@
|
||||||
return {
|
return {
|
||||||
params: {
|
params: {
|
||||||
search: '',
|
search: '',
|
||||||
pageSize: 10,
|
page_size: 10,
|
||||||
pageNum: 1,
|
page: 1,
|
||||||
category: 'duty'
|
category: 'duty'
|
||||||
},
|
},
|
||||||
userId:'',
|
userId:'',
|
||||||
|
@ -88,11 +88,15 @@
|
||||||
ticketList: [],
|
ticketList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(params) {
|
||||||
|
this.ticketTypye = params.type;
|
||||||
|
this.params.category = params.type;
|
||||||
|
},
|
||||||
//上拉加载
|
//上拉加载
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
const totalPage = Math.ceil(this.totalNum / this.params.page_size);
|
||||||
if (this.params.pageNum < totalPage) {
|
if (this.params.page < totalPage) {
|
||||||
this.params.pageNum += 1;
|
this.params.page += 1;
|
||||||
this.getTicketLists();
|
this.getTicketLists();
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -107,7 +111,7 @@
|
||||||
},
|
},
|
||||||
//下拉刷新
|
//下拉刷新
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.params.pageNum = 1;
|
this.params.page = 1;
|
||||||
this.ticketList = [];
|
this.ticketList = [];
|
||||||
this.getTicketLists();
|
this.getTicketLists();
|
||||||
},
|
},
|
||||||
|
@ -158,12 +162,12 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchHandle() {
|
searchHandle() {
|
||||||
this.params.pageNum = 1;
|
this.params.page = 1;
|
||||||
this.ticketList = [];
|
this.ticketList = [];
|
||||||
this.getTicketLists()
|
this.getTicketLists()
|
||||||
},
|
},
|
||||||
resetSearch() {
|
resetSearch() {
|
||||||
this.params.pageNum = 1;
|
this.params.page = 1;
|
||||||
this.params.search = "";
|
this.params.search = "";
|
||||||
this.ticketList = [];
|
this.ticketList = [];
|
||||||
this.getTicketLists();
|
this.getTicketLists();
|
||||||
|
@ -172,7 +176,7 @@
|
||||||
// debugger;
|
// debugger;
|
||||||
this.ticketTypye = index;
|
this.ticketTypye = index;
|
||||||
this.ticketList = [];
|
this.ticketList = [];
|
||||||
this.params.pageNum = 1;
|
this.params.page = 1;
|
||||||
if (index === 'duty') {
|
if (index === 'duty') {
|
||||||
this.params.category = 'duty';
|
this.params.category = 'duty';
|
||||||
} else if (index === 'owner') {
|
} else if (index === 'owner') {
|
||||||
|
|
|
@ -58,21 +58,17 @@
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="form-item border-bottom" v-if="formData.purpose!==50">
|
<view class="form-item border-bottom" v-if="formData.purpose!==50">
|
||||||
<view class="form-left">
|
<view class="form-left" @click="Selection">
|
||||||
<text class="form-left-text">接待人</text>
|
<text class="form-left-text">接待人</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-right">
|
<view class="form-right">
|
||||||
<ba-tree-picker ref="dcoordinator_Picker" :multiple='false' @select-change="select_coordinator_Change" title="选择接待人"
|
<!-- <ba-tree-picker ref="dcoordinator_Picker" :multiple='false' @select-change="select_coordinator_Change" title="选择接待人"
|
||||||
:localdata="vuex_userRange2" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
:localdata="vuex_userRange2" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/> -->
|
||||||
<view @click="showDcoordinatorPicker" style="position: relative;display: flex;">
|
<view @click="showDcoordinatorPicker" style="position: relative;display: flex;">
|
||||||
<text type="text" >{{receptionist_name}}</text>
|
<text type="text" >{{receptionist_name}}</text>
|
||||||
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
|
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="form-right">
|
|
||||||
<uni-data-select v-model="formData.receptionist" :localdata="userRange">
|
|
||||||
</uni-data-select>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item border-bottom" v-if="formData.purpose!==50">
|
<view class="form-item border-bottom" v-if="formData.purpose!==50">
|
||||||
<view class="form-left">
|
<view class="form-left">
|
||||||
|
@ -94,7 +90,6 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item border-bottom">
|
<view class="form-item border-bottom">
|
||||||
<view class="form-left">
|
<view class="form-left">
|
||||||
<!-- <text class="star">*</text> -->
|
|
||||||
<text class="form-left-text">来访人数</text>
|
<text class="form-left-text">来访人数</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-right">
|
<view class="form-right">
|
||||||
|
@ -110,14 +105,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
|
|
||||||
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
||||||
import resetData from '../../../utils/common.js';
|
import resetData from '../../../utils/common.js';
|
||||||
export default {
|
export default {
|
||||||
name: "visit",
|
name: "visit",
|
||||||
components:{
|
|
||||||
baTreePicker
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formData: {
|
formData: {
|
||||||
|
@ -192,17 +183,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
// uni.$once('Selection',function(e){
|
||||||
|
// debugger;
|
||||||
|
// console.log(e)
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDcoordinatorPicker(){
|
showDcoordinatorPicker(){
|
||||||
this.$refs.dcoordinator_Picker._show();
|
let params='?type=receptionist&typeName=receptionist_name'
|
||||||
},
|
uni.navigateTo({
|
||||||
cancel(){
|
url:"../../comm/userSelect/index"+params
|
||||||
this.$refs.treePicker._hide();
|
})
|
||||||
},
|
|
||||||
select_coordinator_Change(ids, names){
|
|
||||||
this.formData.receptionist = ids[0];
|
|
||||||
this.receptionist_name = names;
|
|
||||||
},
|
},
|
||||||
getVisitItem() {
|
getVisitItem() {
|
||||||
this.$u.api.visitItem(this.visitId).then(res => {
|
this.$u.api.visitItem(this.visitId).then(res => {
|
||||||
|
@ -346,11 +337,6 @@
|
||||||
background-color: #f3fbff;
|
background-color: #f3fbff;
|
||||||
padding-bottom: 227rpx;
|
padding-bottom: 227rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* >>>.uni-status-bar {
|
|
||||||
height: 0 !important;
|
|
||||||
} */
|
|
||||||
|
|
||||||
>>>.uni-navbar-btn-text text {
|
>>>.uni-navbar-btn-text text {
|
||||||
font-size: 32rpx !important;
|
font-size: 32rpx !important;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue