fix: BUG修改
This commit is contained in:
parent
280ec0b348
commit
c097d3a912
@ -18,240 +18,255 @@
|
|||||||
props: ['activeTab'],
|
props: ['activeTab'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabList: [
|
tabList: [],
|
||||||
{
|
userInfo: {
|
||||||
appName: '首页',
|
accountType: 1
|
||||||
moduleIcon2: 'tabIcon-index',
|
},
|
||||||
moduleIcon: 'tabIcon-index-active',
|
haveModuleList: []
|
||||||
plugin: 'projectEnd',
|
// activeTab: 0
|
||||||
appShow: 1
|
};
|
||||||
},
|
},
|
||||||
{
|
mounted() {
|
||||||
appName: '我的',
|
// console.log(this.tabList)
|
||||||
moduleIcon2: 'tabIcon-my2',
|
this.$forceUpdate()
|
||||||
moduleIcon: 'tabIcon-my2-active',
|
},
|
||||||
plugin: 'my',
|
created() {
|
||||||
appShow: 1
|
let that = this;
|
||||||
}],
|
console.log(666)
|
||||||
userInfo: {
|
setTimeout(function() {
|
||||||
accountType: 1
|
that.getModuleList();
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getModuleList() {
|
||||||
|
var that = this
|
||||||
|
this.sendRequest({
|
||||||
|
url: "xmgl/baseModule/getModuleAndMenuList",
|
||||||
|
data: {
|
||||||
|
projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn,
|
||||||
|
moduleType: 7,
|
||||||
|
userId: JSON.parse(uni.getStorageSync('userInfo')).userId,
|
||||||
},
|
},
|
||||||
haveModuleList: []
|
method: "post",
|
||||||
// activeTab: 0
|
success(result) {
|
||||||
};
|
if (result.success) {
|
||||||
},
|
that.haveModuleList = result.result.moduleList
|
||||||
mounted() {
|
that.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
||||||
// console.log(this.tabList)
|
if (that.userInfo.accountType == 5 || that.userInfo.accountType == 6 || that
|
||||||
this.$forceUpdate()
|
.userInfo
|
||||||
},
|
.accountType == 10) {
|
||||||
created() {
|
let findInfo = that.haveModuleList.find(item => item.modulePath ==
|
||||||
let that = this;
|
"/infoCenter/allInfo")
|
||||||
setTimeout(function() {
|
if (findInfo) {
|
||||||
that.getModuleList();
|
that.tabList = [{
|
||||||
}, 200)
|
appName: '消息',
|
||||||
},
|
moduleIcon2: 'footerIcon1',
|
||||||
methods: {
|
moduleIcon: 'footerIcon2',
|
||||||
getModuleList() {
|
plugin: 'mssage',
|
||||||
var that = this
|
appShow: 1
|
||||||
this.sendRequest({
|
}, {
|
||||||
url: "xmgl/baseModule/getModuleAndMenuList",
|
appName: '首页',
|
||||||
data: {
|
moduleIcon2: 'tabIcon-index',
|
||||||
projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn,
|
moduleIcon: 'tabIcon-index-active',
|
||||||
moduleType: 7,
|
plugin: 'projectEnd',
|
||||||
userId: JSON.parse(uni.getStorageSync('userInfo')).userId,
|
appShow: 1
|
||||||
},
|
}, {
|
||||||
method: "post",
|
appName: '我的',
|
||||||
success(result) {
|
moduleIcon2: 'tabIcon-my2',
|
||||||
if (result.success) {
|
moduleIcon: 'tabIcon-my2-active',
|
||||||
that.haveModuleList = result.result.moduleList
|
plugin: 'my',
|
||||||
that.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
appShow: 1
|
||||||
if (that.userInfo.accountType == 5 || that.userInfo.accountType == 6 || that
|
}]
|
||||||
.userInfo
|
}
|
||||||
.accountType == 10) {
|
let findWorkSpace = that.haveModuleList.find(item => item.modulePath ==
|
||||||
let findInfo = that.haveModuleList.find(item => item.modulePath ==
|
"/workSpace")
|
||||||
"/infoCenter/allInfo")
|
if (findWorkSpace) {
|
||||||
if (findInfo) {
|
that.tabList = [{
|
||||||
that.tabList = [{
|
appName: '首页',
|
||||||
appName: '消息',
|
moduleIcon2: 'tabIcon-index',
|
||||||
moduleIcon2: 'footerIcon1',
|
moduleIcon: 'tabIcon-index-active',
|
||||||
moduleIcon: 'footerIcon2',
|
plugin: 'projectEnd',
|
||||||
plugin: 'mssage',
|
appShow: 1
|
||||||
appShow: 1
|
}, {
|
||||||
}, {
|
appName: '发起审批',
|
||||||
appName: '首页',
|
moduleIcon2: 'submit-n',
|
||||||
moduleIcon2: 'tabIcon-index',
|
moduleIcon: 'submit',
|
||||||
moduleIcon: 'tabIcon-index-active',
|
plugin: 'submit',
|
||||||
plugin: 'projectEnd',
|
appShow: 1
|
||||||
appShow: 1
|
}, {
|
||||||
}, {
|
appName: '工作台',
|
||||||
appName: '我的',
|
moduleIcon2: 'workspace-n',
|
||||||
moduleIcon2: 'tabIcon-my2',
|
moduleIcon: 'workspace',
|
||||||
moduleIcon: 'tabIcon-my2-active',
|
plugin: 'workspace',
|
||||||
plugin: 'my',
|
appShow: 1
|
||||||
appShow: 1
|
}, {
|
||||||
}]
|
appName: '我的',
|
||||||
}
|
moduleIcon2: 'tabIcon-my2',
|
||||||
let findWorkSpace = that.haveModuleList.find(item => item.modulePath ==
|
moduleIcon: 'tabIcon-my2-active',
|
||||||
"/workSpace")
|
plugin: 'my',
|
||||||
if (findWorkSpace) {
|
appShow: 1
|
||||||
that.tabList = [ {
|
}]
|
||||||
appName: '首页',
|
if (findInfo) {
|
||||||
moduleIcon2: 'tabIcon-index',
|
that.tabList.unshift({
|
||||||
moduleIcon: 'tabIcon-index-active',
|
appName: '消息',
|
||||||
plugin: 'projectEnd',
|
moduleIcon2: 'footerIcon1',
|
||||||
appShow: 1
|
moduleIcon: 'footerIcon2',
|
||||||
}, {
|
plugin: 'mssage',
|
||||||
appName: '发起审批',
|
|
||||||
moduleIcon2: 'submit-n',
|
|
||||||
moduleIcon: 'submit',
|
|
||||||
plugin: 'submit',
|
|
||||||
appShow: 1
|
|
||||||
}, {
|
|
||||||
appName: '工作台',
|
|
||||||
moduleIcon2: 'workspace-n',
|
|
||||||
moduleIcon: 'workspace',
|
|
||||||
plugin: 'workspace',
|
|
||||||
appShow: 1
|
|
||||||
}, {
|
|
||||||
appName: '我的',
|
|
||||||
moduleIcon2: 'tabIcon-my2',
|
|
||||||
moduleIcon: 'tabIcon-my2-active',
|
|
||||||
plugin: 'my',
|
|
||||||
appShow: 1
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
} else if (that.COMPANY == 'sanjiang') {
|
|
||||||
that.tabList.push({
|
|
||||||
appName: '首页总览',
|
|
||||||
moduleIcon2: 'sjjt_syzl',
|
|
||||||
moduleIcon: 'sjjt_syzl-tab',
|
|
||||||
plugin: 'projectManage',
|
|
||||||
appShow: 1
|
|
||||||
}, {
|
|
||||||
appName: '我的',
|
|
||||||
moduleIcon2: 'tabIcon-my',
|
|
||||||
moduleIcon: 'tabIcon-my-select',
|
|
||||||
plugin: 'my',
|
|
||||||
appShow: 1
|
appShow: 1
|
||||||
})
|
})
|
||||||
} else if (that.userInfo.accountType == 11) {
|
|
||||||
// 供应商
|
|
||||||
that.tabList.push({
|
|
||||||
appName: '首页总览',
|
|
||||||
moduleIcon2: 'sjjt_syzl',
|
|
||||||
moduleIcon: 'sjjt_syzl-tab',
|
|
||||||
plugin: 'supplierHome',
|
|
||||||
appShow: 1
|
|
||||||
}, {
|
|
||||||
appName: '我的',
|
|
||||||
moduleIcon2: 'tabIcon-my',
|
|
||||||
moduleIcon: 'tabIcon-my-select',
|
|
||||||
plugin: 'supplierMy',
|
|
||||||
appShow: 1
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
var moduleList = that.userInfo.menuAuthority.moduleList
|
|
||||||
for (let i = 0; i < moduleList.length; i++) {
|
|
||||||
if (moduleList[i].moduleType == 1) {
|
|
||||||
that.tabList.push(moduleList[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
//TODO handle the exception
|
|
||||||
}
|
|
||||||
that.tabList.push({
|
|
||||||
appName: '我的',
|
|
||||||
moduleIcon2: 'tabIcon-my',
|
|
||||||
moduleIcon: 'tabIcon-my-select',
|
|
||||||
plugin: 'my',
|
|
||||||
appShow: 1
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(result, 777888)
|
|
||||||
}
|
}
|
||||||
|
} else if (that.COMPANY == 'sanjiang') {
|
||||||
|
that.tabList.push({
|
||||||
|
appName: '首页总览',
|
||||||
|
moduleIcon2: 'sjjt_syzl',
|
||||||
|
moduleIcon: 'sjjt_syzl-tab',
|
||||||
|
plugin: 'projectManage',
|
||||||
|
appShow: 1
|
||||||
|
}, {
|
||||||
|
appName: '我的',
|
||||||
|
moduleIcon2: 'tabIcon-my',
|
||||||
|
moduleIcon: 'tabIcon-my-select',
|
||||||
|
plugin: 'my',
|
||||||
|
appShow: 1
|
||||||
|
})
|
||||||
|
} else if (that.userInfo.accountType == 11) {
|
||||||
|
// 供应商
|
||||||
|
that.tabList.push({
|
||||||
|
appName: '首页总览',
|
||||||
|
moduleIcon2: 'sjjt_syzl',
|
||||||
|
moduleIcon: 'sjjt_syzl-tab',
|
||||||
|
plugin: 'supplierHome',
|
||||||
|
appShow: 1
|
||||||
|
}, {
|
||||||
|
appName: '我的',
|
||||||
|
moduleIcon2: 'tabIcon-my',
|
||||||
|
moduleIcon: 'tabIcon-my-select',
|
||||||
|
plugin: 'supplierMy',
|
||||||
|
appShow: 1
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
var moduleList = that.userInfo.menuAuthority.moduleList
|
||||||
|
for (let i = 0; i < moduleList.length; i++) {
|
||||||
|
if (moduleList[i].moduleType == 1) {
|
||||||
|
that.tabList.push(moduleList[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//TODO handle the exception
|
||||||
|
}
|
||||||
|
that.tabList.push({
|
||||||
|
appName: '我的',
|
||||||
|
moduleIcon2: 'tabIcon-my',
|
||||||
|
moduleIcon: 'tabIcon-my-select',
|
||||||
|
plugin: 'my',
|
||||||
|
appShow: 1
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
console.log(result, 777888)
|
||||||
},
|
|
||||||
tabClick(plugin) {
|
|
||||||
console.log(plugin)
|
|
||||||
switch (plugin) {
|
|
||||||
case 'projectManage':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '../../pages/projectManage/projectManage'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'videoManage':
|
|
||||||
if (this.userInfo.accountType == 5) {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '../../pages/videoManage/videoList?sn=' + that.userInfo.sn
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '../../pages/areaTree/areaTree'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'my':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'submit':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/submit/submit'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'workspace':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/workspace/workspace'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'supplierHome':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/supplier/supplier'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'supplierMy':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/supplier/my/my'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'personManage':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '../../pages/personManage/personManage'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'projectEnd':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/projectEnd/projectIndex/projectIndex'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'mssage':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/messageCenter/messageCenter'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'deviceManage':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '../../pages/deviceManage/deviceManage'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'markRoom':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '../../pages/markRoomManage/markRoomManage'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'messageTask':
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/messageTask/messageTask'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
setTimeout(function() {
|
||||||
|
if (that.tabList.length == 0) {
|
||||||
|
that.tabList = [{
|
||||||
|
appName: '首页',
|
||||||
|
moduleIcon2: 'tabIcon-index',
|
||||||
|
moduleIcon: 'tabIcon-index-active',
|
||||||
|
plugin: 'projectEnd',
|
||||||
|
appShow: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
appName: '我的',
|
||||||
|
moduleIcon2: 'tabIcon-my2',
|
||||||
|
moduleIcon: 'tabIcon-my2-active',
|
||||||
|
plugin: 'my',
|
||||||
|
appShow: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
tabClick(plugin) {
|
||||||
|
console.log(plugin)
|
||||||
|
switch (plugin) {
|
||||||
|
case 'projectManage':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '../../pages/projectManage/projectManage'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'videoManage':
|
||||||
|
if (this.userInfo.accountType == 5) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '../../pages/videoManage/videoList?sn=' + that.userInfo.sn
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '../../pages/areaTree/areaTree'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'my':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/my/my'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'submit':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/submit/submit'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'workspace':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/workspace/workspace'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'supplierHome':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/supplier/supplier'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'supplierMy':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/supplier/my/my'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'personManage':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '../../pages/personManage/personManage'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'projectEnd':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/projectEnd/projectIndex/projectIndex'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'mssage':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/messageCenter/messageCenter'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'deviceManage':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '../../pages/deviceManage/deviceManage'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'markRoom':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '../../pages/markRoomManage/markRoomManage'
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'messageTask':
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/messageTask/messageTask'
|
||||||
|
})
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
2
main.js
2
main.js
@ -37,7 +37,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
console.log('开发环境')
|
console.log('开发环境')
|
||||||
// Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用)
|
// Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用)
|
||||||
// Vue.prototype.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址
|
// Vue.prototype.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址
|
||||||
Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
// Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
||||||
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
|
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
|
||||||
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
|
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
|
||||||
// Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地
|
// Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="user feedback" @click="goto('user')">用户登录</view>
|
<view class="user feedback" @click="goto('user')">用户登录</view>
|
||||||
<!-- <view class="feedback personLocation" @click="gotoPersonLocation()">施工人员登录</view> -->
|
<view class="feedback personLocation" @click="gotoPersonLocation()">施工人员登录</view>
|
||||||
<!-- <view class="user feedback" @click="goto('user')">我是用户</view> -->
|
<!-- <view class="user feedback" @click="goto('user')">我是用户</view> -->
|
||||||
<!-- <view class="supplier feedback black" @click="goto('supplier')">我是供应商</view> -->
|
<!-- <view class="supplier feedback black" @click="goto('supplier')">我是供应商</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -186,7 +186,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="tabBarBox">
|
<!-- <view class="tabBarBox">
|
||||||
<view class="item active">
|
<view class="item active">
|
||||||
<image src="/static/personManage/index.png" class="img"></image>
|
<image src="/static/personManage/index.png" class="img"></image>
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
@ -199,13 +199,13 @@
|
|||||||
查车辆
|
查车辆
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="item">
|
<view class="item">
|
||||||
<image src="/static/personManage/location.png" class="img"></image>
|
<image src="/static/personManage/location.png" class="img"></image>
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
定位
|
定位
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<levitatedsphere :x="100" :y="80"></levitatedsphere>
|
<levitatedsphere :x="100" :y="80"></levitatedsphere>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user