提交 1ea6c48a 作者: wk

工人沟通日身份参数调整

父级 d0039dc9
...@@ -14,6 +14,8 @@ const $config = { ...@@ -14,6 +14,8 @@ const $config = {
// gtrBase:"https://cwcd-h5.huizhucloud.com",//测试 // gtrBase:"https://cwcd-h5.huizhucloud.com",//测试
gtrBase: "https://gdt-front-mobile.hibuilding.cn", //生产 gtrBase: "https://gdt-front-mobile.hibuilding.cn", //生产
// jyxyBase: "https://edu.huizhucloud.com", //测试 // jyxyBase: "https://edu.huizhucloud.com", //测试
jyxyBase: "https://wlxy.cnzgc.com" //生产 jyxyBase: "https://wlxy.cnzgc.com", //生产
// webUrl: "https://dev-console.hzdingmao.com", //开发
webUrl: "https://console.hibuilding.cn" //生产
} }
export default $config export default $config
<template> <template>
<view class="wrap"> <view class="wrap">
<swiper class="swiper" :style="{height: height *2 + 'rpx'}" :autoplay="autoplay" :interval="interval" <swiper class="swiper" :style="{height: height *2 + 'rpx','margin-top': 72 *heightScale + 'px'}"
:duration="duration" :circular='loop' @change='change' :previous-margin='previousMargin + "rpx"' :autoplay="autoplay" :interval="interval" :duration="duration" :circular='loop' @change='change'
:next-margin='nextMargin + "rpx"'> :previous-margin='previousMargin + "rpx"' :next-margin='nextMargin + "rpx"'>
<swiper-item v-for="(item,index) in list" :key='index' @click="$emit('clickItem',item)"> <swiper-item v-for="(item,index) in list" :key='index' @click="$emit('clickItem',item)">
<view v-if="list && list.length>0" class="item" <view v-if="list && list.length>0" class="item"
:class="[!crown ? '' : current==index ? 'crown-active':'crown']"> :class="[!crown ? '' : current==index ? 'crown-active':'crown']">
...@@ -100,9 +100,20 @@ ...@@ -100,9 +100,20 @@
data() { data() {
return { return {
current: 0, current: 0,
slots: false slots: false,
heightScale: 1
}; };
}, },
created() {
const info = uni.getSystemInfoSync()
if (info.platform == 'windows') {
this.statusBarHeight = info.safeArea.top
} else {
this.statusBarHeight = info.statusBarHeight
}
this.heightScale = info.screenWidth / 375
console.log("尺寸比例", this.heightScale);
},
watch: { watch: {
// 判断异步数据源,是否使用插槽自定义样式 // 判断异步数据源,是否使用插槽自定义样式
list: { list: {
...@@ -131,7 +142,7 @@ ...@@ -131,7 +142,7 @@
.wrap { .wrap {
position: relative; position: relative;
border-radius: 30rpx; border-radius: 30rpx;
margin: 72px 30rpx 0 30rpx; margin: 0 30rpx;
// background-color: #3B73FE; // background-color: #3B73FE;
.swiper { .swiper {
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
}) })
if (!uni.getStorageSync("org_name")) { if (!uni.getStorageSync("org_name")) {
this.getOrgTree() this.getOrgTree()
console.log("orgName", this.orgName);
} else { } else {
this.orgName = uni.getStorageSync("org_name") this.orgName = uni.getStorageSync("org_name")
} }
...@@ -193,10 +194,11 @@ ...@@ -193,10 +194,11 @@
var source = "1" var source = "1"
if (this.role == 'PM') { if (this.role == 'PM') {
source = 1 source = 1
} else if (this.role == 'VISITOR') { } else if (this.role == 'WORKER') {
source = 9 source = 9
} }
if ("63e1e639e7025e13c471a9d2" == result.data.check_tpl_id) { //建筑工人沟通日 if ("63e1e639e7025e13c471a9d2" == result.data.check_tpl_id) { //建筑工人沟通日
this.project_id = uni.getStorageSync("project_id")
uni.navigateTo({ uni.navigateTo({
url: "/pages/gallery/outPage/gdtPage/gdtPage?url=" + url: "/pages/gallery/outPage/gdtPage/gdtPage?url=" +
`${this.$config.gtrBase}/#/loginByToken&projectId=${this.project_id}&source=${source}&token=${uni.getStorageSync("token")}&to=jzgrgtr` `${this.$config.gtrBase}/#/loginByToken&projectId=${this.project_id}&source=${source}&token=${uni.getStorageSync("token")}&to=jzgrgtr`
...@@ -210,7 +212,7 @@ ...@@ -210,7 +212,7 @@
this.toOutPage(result.data.tpl_config[0]) this.toOutPage(result.data.tpl_config[0])
} }
// 汇筑工地通H5:https://cwcd-h5.huizhucloud.com/#/loginByToken?projectId=${projectId}&source=${source}&JG-AUTH=${token} // 汇筑工地通H5:https://cwcd-h5.huizhucloud.com/#/loginByToken?projectId=${projectId}&source=${source}&JG-AUTH=${token}
// 网络学院H5: https: //edu.huizhucloud.com/dologin/workSite?workSiteToken=${token} // 网络学院H5: https: //edu.huizhucloud.com/admin/sys/workSiteLogin?workSiteToken=${token}
// token: 一点通小程序端登录成功之后的值 // token: 一点通小程序端登录成功之后的值
// projectId: 项目ID // projectId: 项目ID
// source: 9( 工人)、 1( 管理员) 赋值9或者1 // source: 9( 工人)、 1( 管理员) 赋值9或者1
......
...@@ -15,10 +15,11 @@ ...@@ -15,10 +15,11 @@
onLoad(options) { onLoad(options) {
if ('jzgrgtr' == options.to) { if ('jzgrgtr' == options.to) {
this.webUrl = this.webUrl =
`${options.url}?projectId=${options.project_id}&source=${options.source}&JG-AUTH=${options.token}` `${options.url}?projectId=${options.projectId}&source=${options.source}&JG-AUTH=${options.token}`
} else if ('jypx' == options.to) { } else if ('jypx' == options.to) {
this.webUrl = `${options.url}?workSiteToken=${options.workSiteToken}` this.webUrl = `${options.url}?workSiteToken=${options.workSiteToken}`
} }
console.log("外链参数", options);
console.log("外部链接", this.webUrl); console.log("外部链接", this.webUrl);
}, },
methods: { methods: {
......
...@@ -179,11 +179,16 @@ ...@@ -179,11 +179,16 @@
}).then((result) => { }).then((result) => {
if (result.code === 0) { if (result.code === 0) {
let list = result.data.list let list = result.data.list
list.forEach((item, index) => { // list.forEach((item, index) => {
this.selList.forEach((sel) => { // this.selList.forEach((sel) => {
if (item.app_id == sel.app_id) { // if (item.app_id == sel.app_id) {
list.splice(index, 1) // list.splice(index, 1)
} // }
// })
// })
list = list.filter((item) => {
return this.selList.every((sel) => {
return sel.app_id != item.app_id
}) })
}) })
//先根据菜单分组 //先根据菜单分组
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
success(res) { success(res) {
//获取用户信息 //获取用户信息
that.getUserInfo() that.getUserInfo()
that.getSetting() // that.getSetting()
that.getHomeComp() that.getHomeComp()
if (that.isCommonSel) { if (that.isCommonSel) {
that.getCommonApp() that.getCommonApp()
...@@ -255,10 +255,12 @@ ...@@ -255,10 +255,12 @@
if (result.data.list.length > 0) { if (result.data.list.length > 0) {
this.project = result.data.list[0] this.project = result.data.list[0]
this.project_id = this.project.project_id this.project_id = this.project.project_id
uni.setStorageSync("org_no", this.project.org_no) if (!orgNo) { //不存在组织默认第一个项目
uni.setStorageSync("org_name", this.project.project_name) uni.setStorageSync("org_no", this.project.org_no)
uni.setStorageSync("org_id", this.project.id) uni.setStorageSync("org_name", this.project.project_name)
uni.setStorageSync("project_id", this.project.project_id) uni.setStorageSync("org_id", this.project.id)
uni.setStorageSync("project_id", this.project.project_id)
}
} }
this.initData() this.initData()
} }
...@@ -567,8 +569,8 @@ ...@@ -567,8 +569,8 @@
this.userInfo = result.data this.userInfo = result.data
// this.title = "欢迎" + this.userInfo.user.user_name + "访问一点通" // this.title = "欢迎" + this.userInfo.user.user_name + "访问一点通"
this.role = this.userInfo.identity.code this.role = this.userInfo.identity.code
console.log("当前组织", uni.getStorageSync("org_no"));
this.project_id = uni.getStorageSync("project_id") this.project_id = uni.getStorageSync("project_id")
console.log("当前组织", this.project_id);
if (!this.project_id) { if (!this.project_id) {
this.loadProject() this.loadProject()
} else { } else {
...@@ -758,7 +760,7 @@ ...@@ -758,7 +760,7 @@
var source = "1" var source = "1"
if (this.role == 'PM') { if (this.role == 'PM') {
source = 1 source = 1
} else if (this.role == 'VISITOR') { } else if (this.role == 'WORKER') {
source = 9 source = 9
} }
if ("63e1e639e7025e13c471a9d2" == result.data.check_tpl_id) { //建筑工人沟通日 if ("63e1e639e7025e13c471a9d2" == result.data.check_tpl_id) { //建筑工人沟通日
......
...@@ -140,12 +140,13 @@ ...@@ -140,12 +140,13 @@
switchOrg: function(item) { switchOrg: function(item) {
console.log("切换组织", item); console.log("切换组织", item);
uni.setStorageSync("org_no", item.org_no) uni.setStorageSync("org_no", item.org_no)
uni.setStorageSync("org_name", item.name)
uni.setStorageSync("org_id", item.id) uni.setStorageSync("org_id", item.id)
if (item.project_id) { if (item.project_id) {
uni.setStorageSync("project_id", item.project_id) uni.setStorageSync("project_id", item.project_id)
uni.setStorageSync("org_name", item.name)
} else { } else {
uni.setStorageSync("project_id", "") uni.setStorageSync("project_id", null)
uni.setStorageSync("org_name", item.org_name)
} }
uni.$emit("refreshOrg") uni.$emit("refreshOrg")
uni.navigateBack({ uni.navigateBack({
......
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
.shop-list-content { .shop-list-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 132px 30rpx 30rpx 30rpx; margin: 210px 30rpx 30rpx 30rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
padding: 30rpx; padding: 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
this.project_id = option.project_id this.project_id = option.project_id
this.project_name = option.project_name this.project_name = option.project_name
this.url = this.url =
`${this.webUrl}/mobileLaborScreen?token_id=${short_token}&tab=1&type=${this.type}&project_id=${this.project_id}&project_name=${this.project_name}` `${this.$config.webUrl}/mobileLaborScreen?token_id=${short_token}&tab=1&type=${this.type}&project_id=${this.project_id}&project_name=${this.project_name}`
console.log("web链接", this.url); console.log("web链接", this.url);
}, },
onShow: function() { onShow: function() {
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
// item.company_id == currentComId // item.company_id == currentComId
// ) // )
// console.log("当前岗位", job); // console.log("当前岗位", job);
this.currentJob = job // this.currentJob = job
// this.orgName = this.currentJob.org_name // this.orgName = this.currentJob.org_name
} else { } else {
this.isProject = true this.isProject = true
...@@ -92,11 +92,11 @@ ...@@ -92,11 +92,11 @@
"access_token": this.getToken() "access_token": this.getToken()
} }
}).then((res) => { }).then((res) => {
console.log(res.data); console.log("监控台", res.data);
if (res.data.code === 0) { if (res.data.code === 0) {
let list = res.data.data.list let list = res.data.data.list
list.forEach((item) => { list.forEach((item) => {
if (item.app_no == "appletlabourboard") { if (item.app_no == "20230207002") {
this.apps.push(item) this.apps.push(item)
} }
}) })
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/monitor/zhgdMonitor/zhgdMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}` url: `/pages/monitor/zhgdMonitor/zhgdMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
}) })
} else if (app.app_no == "appletlabourboard") { } else if (app.app_no == "20230207002") {
uni.navigateTo({ uni.navigateTo({
url: `/pages/monitor/labourMonitor/labourMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}` url: `/pages/monitor/labourMonitor/labourMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
}) })
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
margin: 15px 30rpx; margin: 15px 30rpx;
position: absolute; position: absolute;
top: 53; top: 53;
z-index: 1; z-index: 99;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment