Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
Sign in / Register
Toggle navigation
S
site-uniapp
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
王柯
site-uniapp
Commits
08d41c5c
提交
08d41c5c
authored
2月 18, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
应用详情页查看二维码 左侧有白边修复
工作台的应用根据切换岗位刷新
父级
20c05fcc
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
89 行增加
和
88 行删除
+89
-88
App.vue
+2
-1
components/gi-signin/gi-signin.vue
+8
-5
components/uni-tabbar/uni-tabbar.vue
+11
-3
pages/gallery/gallery.vue
+5
-1
pages/index/index.vue
+45
-10
pagesSub/mine/changeCompany/changeCompany.vue
+6
-1
pagesSub/mine/changeOrg/changeOrg.vue
+0
-61
pagesSub/mine/projectInfo/projectInfo.vue
+12
-6
没有找到文件。
App.vue
View file @
08d41c5c
...
...
@@ -3,7 +3,8 @@
globalData
:
{
userInfo
:
{},
isReject
:
false
,
authMenus
:
[]
authMenus
:
[],
isInit
:
false
},
onLaunch
:
function
()
{
console
.
log
(
'App Launch'
)
...
...
components/gi-signin/gi-signin.vue
View file @
08d41c5c
<
template
>
<view
style=
"padding: 10rpx 20rpx;background-color: #FFFFFF;"
>
<gi-title
title=
"签到二维码"
></gi-title>
<image
src=
"../../static/qrcode-ic.png"
style=
"width: 96rpx;height: 96rpx;margin-top: 10px;"
<view
style=
"padding: 10rpx 0;background-color: #FFFFFF;"
>
<view
class=
"gi-title"
style=
"margin-left: 20rpx;"
>
<text
class=
"star"
v-if=
"isMust"
>
*
</text>
<text
class=
"text-black-normal"
style=
"margin-left: 10rpx;flex: 1;"
>
签到二维码
</text>
</view>
<image
src=
"../../static/qrcode-ic.png"
style=
"width: 96rpx;height: 96rpx;margin-top: 10px;margin-left: 20rpx;"
@
click=
"showQrcode"
>
</image>
<view
style=
"display: flex;flex-direction: column;"
v-if=
"record_id!=''"
>
<view
style=
"margin-top: 10px;"
>
签到人员
</view>
<view
style=
"display: flex;flex-direction: row;flex-wrap: wrap;"
>
<view
style=
"margin-top: 10px;
margin-left: 20rpx
"
>
签到人员
</view>
<view
style=
"display: flex;flex-direction: row;flex-wrap: wrap;
margin-left: 20rpx
"
>
<view
v-for=
"(item,index) in users"
:key=
"index"
>
<view
class=
"sign-user-style"
>
{{
item
.
value
}}
...
...
components/uni-tabbar/uni-tabbar.vue
View file @
08d41c5c
...
...
@@ -140,6 +140,7 @@
},
orgCode
(
res
)
{
try
{
var
role
=
getApp
().
globalData
.
userInfo
.
identity
.
code
let
result
=
JSON
.
parse
(
res
.
result
)
if
(
result
&&
typeof
result
==
'object'
)
{
let
type
=
result
.
type
...
...
@@ -150,9 +151,16 @@
})
}
else
if
(
type
==
"project"
)
{
this
.
code
=
result
.
text
uni
.
navigateTo
({
url
:
`/pages/login/joinDepartment/joinDepartment?code=
${
this
.
code
}
&type=project&projectId=
${
result
.
ext
.
id
}
`
})
if
(
role
==
'VISITOR'
)
{
uni
.
navigateTo
({
url
:
`/pages/login/joinDepartment/joinDepartment?code=
${
this
.
code
}
&type=project&projectId=
${
result
.
ext
.
id
}
`
})
}
else
{
uni
.
navigateTo
({
url
:
`/pagesSub/mine/projectInfo/projectInfo?projectId=
${
result
.
ext
.
id
}
&from=qrcode`
})
}
}
else
if
(
type
==
"department"
)
{
this
.
code
=
result
.
text
uni
.
navigateTo
({
...
...
pages/gallery/gallery.vue
View file @
08d41c5c
...
...
@@ -105,11 +105,11 @@
const
info
=
uni
.
getSystemInfoSync
()
this
.
statusBarHeight
=
info
.
statusBarHeight
this
.
role
=
getApp
().
globalData
.
userInfo
.
identity
.
code
this
.
getAppGroup
()
},
onShow
()
{
this
.
getMessages
()
this
.
getNeedDo
()
this
.
getAppGroup
()
uni
.
$once
(
"refreshOrg"
,
res
=>
{
this
.
orgName
=
uni
.
getStorageSync
(
"org_name"
)
})
...
...
@@ -234,6 +234,10 @@
url
:
"/pages/gallery/outPage/gdtPage/gdtPage?url="
+
`
${
this
.
$config
.
jyxyBase
}
/dologin/workSite&workSiteToken=
${
uni
.
getStorageSync
(
"token"
)}
&to=jypx`
})
}
else
if
(
"63f05e5dc9d53f743030fa92"
==
result
.
data
.
check_tpl_id
)
{
uni
.
navigateTo
({
url
:
"/pagesSub/mine/myScore/myScore"
})
}
else
{
this
.
toOutPage
(
result
.
data
.
tpl_config
[
0
])
}
...
...
pages/index/index.vue
View file @
08d41c5c
...
...
@@ -160,6 +160,7 @@
}
},
onLoad
()
{
getApp
().
globalData
.
isInit
=
true
const
info
=
uni
.
getSystemInfoSync
()
console
.
log
(
"系统"
,
info
);
if
(
info
.
platform
==
'windows'
)
{
...
...
@@ -228,6 +229,33 @@
}
})
},
getDeptProject
()
{
this
.
$http
.
get
({
url
:
"/api/v1/project/project_list"
,
data
:
{
is_all
:
1
,
org_no
:
uni
.
getStorageSync
(
"org_no"
)
},
header
:
{
"access_token"
:
this
.
getToken
()
}
}).
then
(
res
=>
{
let
result
=
res
.
data
console
.
log
(
"项目列表:"
,
result
);
if
(
result
.
code
===
0
)
{
if
(
result
.
data
.
list
.
length
>
0
)
{
this
.
project
=
result
.
data
.
list
[
0
]
this
.
project_id
=
this
.
project
.
project_id
uni
.
setStorageSync
(
"org_no"
,
this
.
project
.
org_no
)
uni
.
setStorageSync
(
"org_name"
,
this
.
project
.
project_name
)
uni
.
setStorageSync
(
"project_id"
,
this
.
project
.
project_id
)
}
this
.
initData
()
}
},
(
err
)
=>
{
this
.
$toast
.
showToast
(
err
.
msg
)
})
},
loadProject
:
function
()
{
let
orgNo
=
uni
.
getStorageSync
(
"org_no"
)
if
(
orgNo
==
'001'
)
{
...
...
@@ -567,22 +595,29 @@
//如果是项目端 获取当前岗位
//如果是工人 获取工人当前项目
if
(
this
.
role
==
'PM'
)
{
if
(
jobs
)
{
let
currentJob
=
jobs
[
0
]
uni
.
setStorageSync
(
"org_no"
,
currentJob
.
org_no
)
uni
.
setStorageSync
(
"org_id"
,
currentJob
.
org_id
)
//当前岗位 判断当前岗位是项目部还是其他
if
(
this
.
userInfo
.
user
.
dept_type
==
'2'
)
{
//项目级
uni
.
setStorageSync
(
"org_name"
,
currentJob
.
dept_name
)
if
(
getApp
().
globalData
.
isInit
)
{
if
(
jobs
)
{
let
currentJob
=
jobs
[
0
]
uni
.
setStorageSync
(
"org_no"
,
currentJob
.
org_no
)
uni
.
setStorageSync
(
"org_id"
,
currentJob
.
org_id
)
//当前岗位 判断当前岗位是项目部还是其他
if
(
this
.
userInfo
.
user
.
dept_type
==
'2'
)
{
//项目级
uni
.
setStorageSync
(
"org_name"
,
currentJob
.
dept_name
)
this
.
getDeptProject
()
}
else
{
uni
.
setStorageSync
(
"org_name"
,
currentJob
.
org_name
)
this
.
initData
()
}
}
else
{
uni
.
setStorageSync
(
"org_name"
,
currentJob
.
org_name
)
uni
.
setStorageSync
(
"org_no"
,
""
)
uni
.
setStorageSync
(
"org_id"
,
""
)
uni
.
setStorageSync
(
"org_name"
,
""
)
this
.
initData
()
}
this
.
initData
()
getApp
().
globalData
.
isInit
=
false
}
}
else
{
this
.
project_id
=
uni
.
getStorageSync
(
"project_id"
)
console
.
log
(
"当前组织"
,
this
.
project_id
);
if
(
!
this
.
project_id
)
{
this
.
loadProject
()
}
else
{
...
...
pagesSub/mine/changeCompany/changeCompany.vue
View file @
08d41c5c
...
...
@@ -85,7 +85,9 @@
})
},
isCurrent
(
item
)
{
return
item
.
company_id
==
uni
.
getStorageSync
(
"company_id"
)
var
orgId
=
uni
.
getStorageSync
(
"org_id"
)
console
.
log
(
"当前org_id:"
+
orgId
,
"条目的org_id:"
+
item
.
org_id
);
return
item
.
org_id
==
orgId
&&
item
.
company_id
==
this
.
currentCompany
.
company_id
},
isCurrentJob
(
job
)
{
return
job
.
job_id
==
this
.
currentJob
.
job_id
...
...
@@ -145,6 +147,9 @@
uni
.
setStorageSync
(
"user_info"
,
result
.
data
)
uni
.
setStorageSync
(
"company_id"
,
result
.
data
.
comp_id
)
uni
.
setStorageSync
(
"org_no"
,
result
.
data
.
org_no
)
uni
.
setStorageSync
(
"org_id"
,
result
.
data
.
org_id
)
console
.
log
(
"当前组织id"
,
uni
.
getStorageSync
(
"org_id"
));
getApp
().
globalData
.
isInit
=
true
uni
.
switchTab
({
url
:
"/pages/index/index"
})
...
...
pagesSub/mine/changeOrg/changeOrg.vue
View file @
08d41c5c
...
...
@@ -92,7 +92,6 @@
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
// if (!data.label) return false
return
data
.
name
.
indexOf
(
value
)
!=
-
1
;
},
toSwitch
()
{
...
...
@@ -224,66 +223,6 @@
delta
:
1
})
},
search
(
e
)
{
// var key = e.detail.value
// this.$refs.tree.filter(key, null)
// if (key) {
// var list = []
// var sourceData = this.temp
// console.log("数据源", sourceData);
// sourceData.forEach((item) => {
// if (item.name.indexOf(key) != -1) {
// item.isOpen = true
// list.push(item)
// } else {
// var children = item.children_list
// var childrens = []
// if (children) {
// children.forEach((child) => {
// if (child.name.indexOf(key) != -1) {
// child.isOpen = true
// var childs = child.children_list
// var childList = []
// if (childs) {
// childs.forEach((childItem) => {
// if (childItem.name.indexOf(key) != -1) {
// childList.push(childItem)
// }
// })
// }
// child.children_list = childList
// childrens.push(child)
// } else {
// var childs = child.children_list
// var childList = []
// if (childs) {
// childs.forEach((childItem) => {
// if (childItem.name.indexOf(key) != -1) {
// childList.push(childItem)
// }
// })
// }
// if (childList.length > 0) {
// child.children_list = childList
// child.isOpen = true
// childrens.push(child)
// }
// }
// })
// }
// if (childrens.length > 0) {
// item.isOpen = true
// item.children_list = childrens
// list.push(item)
// }
// }
// })
// this.trees = list
// } else {
// this.getOrgTree()
// }
}
}
}
</
script
>
...
...
pagesSub/mine/projectInfo/projectInfo.vue
View file @
08d41c5c
...
...
@@ -33,7 +33,7 @@
<view
class=
"line"
></view>
<view
class=
"item"
>
<view
class=
"item-name"
>
详细地址:
</view>
<
view
class=
"item-value"
style=
"width: 488rpx;"
>
{{
project
.
address
||
""
}}
</view
>
<
text
class=
"item-value"
style=
"width: 488rpx;"
>
{{
project
.
address
||
""
}}
</text
>
</view>
<view
class=
"line"
></view>
<view
class=
"item"
>
...
...
@@ -79,12 +79,17 @@
markers
:
[]
}
},
onLoad
()
{
this
.
role
=
getApp
().
globalData
.
userInfo
.
identity
.
code
if
(
this
.
role
==
'WORKER
'
)
{
this
.
projectId
=
getApp
().
globalData
.
userInfo
.
worker
.
projectId
onLoad
(
options
)
{
var
from
=
options
.
from
if
(
from
&&
from
==
'qrcode
'
)
{
this
.
projectId
=
options
.
projectId
}
else
{
this
.
projectId
=
uni
.
getStorageSync
(
"project_id"
)
this
.
role
=
getApp
().
globalData
.
userInfo
.
identity
.
code
if
(
this
.
role
==
'WORKER'
)
{
this
.
projectId
=
getApp
().
globalData
.
userInfo
.
worker
.
projectId
}
else
{
this
.
projectId
=
uni
.
getStorageSync
(
"project_id"
)
}
}
this
.
getProjectInfo
()
},
...
...
@@ -242,6 +247,7 @@
.item-value
{
font-weight
:
400
;
font-size
:
28
rpx
;
text-align
:
right
;
color
:
#333
;
}
...
...
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment