mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 23:39:36 +08:00
1
This commit is contained in:
parent
dc5db06814
commit
c44a6b606a
@ -124,7 +124,7 @@ Page({
|
||||
// 订单状态 1 待派单,3 重新派单,5 已派单,7 处理中, 9已完成 待评价, 11 已关闭 13 已评价
|
||||
//
|
||||
if (status == 1) { // 1 待派单
|
||||
if ((dataType == 3) || dataType == 7) { // 派单员 or 管理员
|
||||
if ((dataType == 3 && detail.typeId == userDetail.typeId) || dataType == 7) { // 派单员 or 管理员
|
||||
operatorBtn.invalid = true //无效申请
|
||||
operatorBtn.affirm = true // 确认损坏
|
||||
operatorBtn.feedback = true // 提交反馈
|
||||
|
@ -7,22 +7,31 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
userDetail: {},
|
||||
menuList: [{
|
||||
type: "report",
|
||||
name: "我要报修",
|
||||
img: "/profile/static/repair/index/my.png",
|
||||
path: "/pages/reportRepair/report/report"
|
||||
path: "/pages/reportRepair/report/report",
|
||||
visible: true
|
||||
}, {
|
||||
type: "query",
|
||||
name: "报修查询",
|
||||
img: "/profile/static/repair/index/query.png",
|
||||
path: "/pages/reportRepair/query/record/record"
|
||||
path: "/pages/reportRepair/query/record/record",
|
||||
visible: true
|
||||
}, {
|
||||
type: "repair",
|
||||
name: "维修入口",
|
||||
img: "/profile/static/repair/index/repair.png",
|
||||
path: "/pages/reportRepair/repair/index/index"
|
||||
path: "/pages/reportRepair/repair/index/index",
|
||||
visible: false
|
||||
}, {
|
||||
type: "assign",
|
||||
name: "派单入口",
|
||||
img: "/profile/static/repair/index/case.png",
|
||||
path: "/pages/reportRepair/assign/record/record"
|
||||
path: "/pages/reportRepair/assign/record/record",
|
||||
visible: false
|
||||
}]
|
||||
},
|
||||
|
||||
@ -30,7 +39,13 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
let _this = this
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
_this.setData({
|
||||
userDetail
|
||||
})
|
||||
// 展示模块
|
||||
_this.visibleBlock()
|
||||
},
|
||||
|
||||
// 跳转菜单
|
||||
@ -42,7 +57,35 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
back(){
|
||||
// 展示模块
|
||||
visibleBlock() {
|
||||
let _this = this
|
||||
let userDetail = _this.data.userDetail
|
||||
let dataType = userDetail.dataType
|
||||
let menuList = _this.data.menuList
|
||||
// 角色类型 1.普通用户,3派单员,5维修工,7管理员
|
||||
if (dataType == 3 || dataType == 7) { // 展示-派单入口
|
||||
menuList = menuList.map(item => {
|
||||
if (item.type == 'assign') {
|
||||
item.visible = true
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
if (dataType == 5) { // 展示-维修入口
|
||||
menuList = menuList.map(item => {
|
||||
if (item.type == 'repair') {
|
||||
item.visible = true
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
_this.setData({
|
||||
menuList
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
wx.navigateBack()
|
||||
},
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
</view>
|
||||
|
||||
<view class="menuContainerView">
|
||||
<view class="menuView" wx:for="{{menuList}}" wx:key="*this" bind:tap="jumpMenu" data-obj="{{item}}">
|
||||
<view class="menuView" wx:for="{{menuList}}" wx:key="*this" bind:tap="jumpMenu" data-obj="{{item}}" wx:if="{{item.visible}}">
|
||||
<view class="menuImg" style="background: no-repeat center/cover url({{IMG_NAME + item.img}});"></view>
|
||||
<view class="menuTitle">{{item.name}}</view>
|
||||
</view>
|
||||
|
Loading…
x
Reference in New Issue
Block a user