fix: BUG修改

This commit is contained in:
kun 2024-06-05 23:32:47 +08:00
parent 280ec0b348
commit c097d3a912
4 changed files with 245 additions and 230 deletions

View File

@ -18,240 +18,255 @@
props: ['activeTab'],
data() {
return {
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
}],
userInfo: {
accountType: 1
tabList: [],
userInfo: {
accountType: 1
},
haveModuleList: []
// activeTab: 0
};
},
mounted() {
// console.log(this.tabList)
this.$forceUpdate()
},
created() {
let that = this;
console.log(666)
setTimeout(function() {
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: []
// activeTab: 0
};
},
mounted() {
// console.log(this.tabList)
this.$forceUpdate()
},
created() {
let that = this;
setTimeout(function() {
that.getModuleList();
}, 200)
},
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,
},
method: "post",
success(result) {
if (result.success) {
that.haveModuleList = result.result.moduleList
that.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
if (that.userInfo.accountType == 5 || that.userInfo.accountType == 6 || that
.userInfo
.accountType == 10) {
let findInfo = that.haveModuleList.find(item => item.modulePath ==
"/infoCenter/allInfo")
if (findInfo) {
that.tabList = [{
appName: '消息',
moduleIcon2: 'footerIcon1',
moduleIcon: 'footerIcon2',
plugin: 'mssage',
appShow: 1
}, {
appName: '首页',
moduleIcon2: 'tabIcon-index',
moduleIcon: 'tabIcon-index-active',
plugin: 'projectEnd',
appShow: 1
}, {
appName: '我的',
moduleIcon2: 'tabIcon-my2',
moduleIcon: 'tabIcon-my2-active',
plugin: 'my',
appShow: 1
}]
}
let findWorkSpace = that.haveModuleList.find(item => item.modulePath ==
"/workSpace")
if (findWorkSpace) {
that.tabList = [ {
appName: '首页',
moduleIcon2: 'tabIcon-index',
moduleIcon: 'tabIcon-index-active',
plugin: 'projectEnd',
appShow: 1
}, {
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',
method: "post",
success(result) {
if (result.success) {
that.haveModuleList = result.result.moduleList
that.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
if (that.userInfo.accountType == 5 || that.userInfo.accountType == 6 || that
.userInfo
.accountType == 10) {
let findInfo = that.haveModuleList.find(item => item.modulePath ==
"/infoCenter/allInfo")
if (findInfo) {
that.tabList = [{
appName: '消息',
moduleIcon2: 'footerIcon1',
moduleIcon: 'footerIcon2',
plugin: 'mssage',
appShow: 1
}, {
appName: '首页',
moduleIcon2: 'tabIcon-index',
moduleIcon: 'tabIcon-index-active',
plugin: 'projectEnd',
appShow: 1
}, {
appName: '我的',
moduleIcon2: 'tabIcon-my2',
moduleIcon: 'tabIcon-my2-active',
plugin: 'my',
appShow: 1
}]
}
let findWorkSpace = that.haveModuleList.find(item => item.modulePath ==
"/workSpace")
if (findWorkSpace) {
that.tabList = [{
appName: '首页',
moduleIcon2: 'tabIcon-index',
moduleIcon: 'tabIcon-index-active',
plugin: 'projectEnd',
appShow: 1
}, {
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
}]
if (findInfo) {
that.tabList.unshift({
appName: '消息',
moduleIcon2: 'footerIcon1',
moduleIcon: 'footerIcon2',
plugin: 'mssage',
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
})
}
})
},
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;
console.log(result, 777888)
}
}
})
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>
<style lang="scss" scoped>

View File

@ -37,7 +37,7 @@ if (process.env.NODE_ENV === 'development') {
console.log('开发环境')
// 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: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://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
// Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地

View File

@ -11,7 +11,7 @@
</view>
<view class="btns">
<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="supplier feedback black" @click="goto('supplier')">我是供应商</view> -->
</view>

View File

@ -186,7 +186,7 @@
</view>
</view>
</view> -->
<view class="tabBarBox">
<!-- <view class="tabBarBox">
<view class="item active">
<image src="/static/personManage/index.png" class="img"></image>
<view class="txt">
@ -199,13 +199,13 @@
查车辆
</view>
</view>
<!-- <view class="item">
<view class="item">
<image src="/static/personManage/location.png" class="img"></image>
<view class="txt">
定位
</view>
</view> -->
</view>
</view>
</view> -->
<levitatedsphere :x="100" :y="80"></levitatedsphere>
</view>
</template>