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
f71c6784
提交
f71c6784
authored
1月 11, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成待办刷新
父级
54e264c4
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
223 行增加
和
19 行删除
+223
-19
common/imageUtils.js
+21
-0
common/oss/config.js
+11
-0
common/oss/ossUtil.js
+3
-2
components/ls-swiper/ls-swiper.vue
+4
-1
main.js
+5
-0
pages.json
+18
-0
pages/gallery/allNeedDo/allNeedDo.vue
+4
-3
pages/gallery/finishNeedDo/finishNeedDo.vue
+6
-4
pages/gallery/gallery.vue
+4
-4
pages/index/index.vue
+6
-2
pages/index/siteNewList/siteNewList.vue
+1
-1
pages/mine/mine.vue
+1
-0
pages/monitor/labourMonitor/labourMonitor.vue
+40
-0
pages/monitor/monitor.vue
+60
-2
pages/monitor/zhgdMonitor/zhgdMonitor.vue
+39
-0
没有找到文件。
common/imageUtils.js
0 → 100644
View file @
f71c6784
const
$imageUtils
=
{
httpToHttps
:
function
(
url
)
{
var
newPath
=
''
if
(
url
)
{
let
array
=
url
.
split
(
"://"
)
if
(
array
[
0
]
===
"http"
)
{
array
[
0
]
=
"https"
newPath
=
array
[
0
]
+
"://"
+
array
[
1
]
}
else
{
newPath
=
url
}
}
if
(
newPath
.
indexOf
(
','
)
!=
-
1
)
{
var
urls
=
newPath
.
split
(
","
)
return
urls
[
0
]
}
return
newPath
}
}
export
default
$imageUtils
common/oss/config.js
0 → 100644
View file @
f71c6784
let
base_oss_url
=
""
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
// 开发环境
base_oss_url
=
'https://dev-hibuilding.oss-cn-hangzhou.aliyuncs.com/'
}
else
{
// 生产环境
base_oss_url
=
'https://hibuilding.oss-cn-hangzhou.aliyuncs.com/'
}
export
default
base_oss_url
common/oss/ossUtil.js
View file @
f71c6784
...
...
@@ -4,7 +4,7 @@ import './sha1.js';
import
{
Base64
}
from
'./base64.js'
;
import
base_oss_url
from
'../config.js'
import
base_oss_url
from
"./config.js"
const
uploadFileSize
=
1024
*
1024
*
100
;
// 上传文件的大小限制100m
const
accesskey
=
'IR6U1vqAnv7noj0qrMCwVFXjMdzFxL'
;
// 自己去申请
const
accessId
=
'LTAILXlaleXLe8Cf'
// 自己去申请
...
...
@@ -35,7 +35,8 @@ export default {
},
getFileName
(
filename
)
{
console
.
log
(
'filename:'
,
filename
)
return
'wx_img/'
+
new
Date
().
getTime
()
+
Math
.
random
().
toString
(
36
).
substring
(
3
,
20
)
+
this
.
_getSuffix
(
filename
)
return
'wx_img/'
+
new
Date
().
getTime
()
+
Math
.
random
().
toString
(
36
).
substring
(
3
,
20
)
+
this
.
_getSuffix
(
filename
)
},
getImage
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
components/ls-swiper/ls-swiper.vue
View file @
f71c6784
...
...
@@ -6,7 +6,7 @@
<swiper-item
v-for=
"(item,index) in list"
:key=
'index'
@
click=
"$emit('clickItem',item)"
>
<view
v-if=
"list && list.length>0"
class=
"item"
:class=
"[!crown ? '' : current==index ? 'crown-active':'crown']"
>
<image
v-if=
"!slots"
class=
"item-img"
:class=
"[imgShadow?'imgShadow':'']"
:src=
"
item[imgKey]
"
<image
v-if=
"!slots"
class=
"item-img"
:class=
"[imgShadow?'imgShadow':'']"
:src=
"
httpToHttps(item[imgKey])
"
:style=
"
{ borderRadius: imgRadius + 'px',width:imgWidth}" mode="">
</image>
<slot
v-else
:data=
'item'
></slot>
</view>
...
...
@@ -119,6 +119,9 @@
let
current
=
event
.
detail
.
current
this
.
current
=
current
this
.
$emit
(
'change'
,
this
.
list
[
current
])
},
httpToHttps
(
url
)
{
return
this
.
$imageUtils
.
httpToHttps
(
url
)
}
}
}
...
...
main.js
View file @
f71c6784
...
...
@@ -8,10 +8,15 @@ import $toast from './common/toast.js'
import
$config
from
'./common/config.js'
import
$mta
from
"api/mta.js"
import
$http
from
'./api/request.js'
import
$imageUtils
from
'./common/imageUtils.js'
Vue
.
prototype
.
$http
=
$http
Vue
.
prototype
.
$mta
=
$mta
Vue
.
prototype
.
$toast
=
$toast
Vue
.
prototype
.
$config
=
$config
Vue
.
prototype
.
$imageUtils
=
$imageUtils
// Vue.prototype.webUrl = "https://dev-console.hzdingmao.com"
// Vue.prototype.webUrl = "https://test-console.hzdingmao.com"
Vue
.
prototype
.
webUrl
=
"https://console.hibuilding.cn"
Vue
.
prototype
.
getToken
=
function
()
{
return
uni
.
getStorageSync
(
"token"
)
}
...
...
pages.json
View file @
f71c6784
...
...
@@ -484,6 +484,24 @@
}
}
,{
"path"
:
"pages/monitor/zhgdMonitor/zhgdMonitor"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/monitor/labourMonitor/labourMonitor"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"white"
,
...
...
pages/gallery/allNeedDo/allNeedDo.vue
View file @
f71c6784
...
...
@@ -10,10 +10,11 @@
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
click=
"itemClick(item)"
>
<image
class=
"image"
src=
"../../../static/ic-jrdb.png"
></image>
<view
class=
"item-content"
>
<view
class=
"title"
>
张三发起了隐患整改,请于2022/12/13 15:37:56前完成隐患整改。
</view>
<view
class=
"title"
>
{{
item
.
created_by_name
}}
发起了
{{
item
.
app_name
}}
,请于
{{
item
.
expect_end_date
}}
前完成。
</view>
<view
class=
"time-content"
>
<view
class=
"create-time"
>
2022/12/13 15:39:56
</view>
<view
class=
"leave-time"
>
处理倒计时:
0天20小时23分
</view>
<view
class=
"create-time"
>
{{
item
.
end_opt_time
}}
</view>
<view
class=
"leave-time"
>
处理倒计时:
{{
timeSpace
(
item
.
end_opt_time
)
}}
</view>
</view>
<view
class=
"line"
style=
"margin: 30rpx 0;"
></view>
</view>
...
...
pages/gallery/finishNeedDo/finishNeedDo.vue
View file @
f71c6784
<
template
>
<view
class=
"content"
>
<titleBar
title=
"完成待办"
></titleBar>
<view
class=
"count-content"
>
已经完成【
10
】条待办事项
</view>
<view
class=
"count-content"
>
已经完成【
{{
totalCount
}}
】条待办事项
</view>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
click=
"itemClick(item)"
>
<image
class=
"image"
src=
"../../../static/ic-jrdb.png"
></image>
<view
class=
"item-content"
>
<view
class=
"title"
>
张三发起了隐患整改,请于2022/12/13 15:37:56前完成隐患整改。
</view>
<view
class=
"title"
>
{{
item
.
created_by_name
}}
发起了
{{
item
.
app_name
}}
,请于
{{
item
.
expect_end_date
}}
前完成。
</view>
<view
class=
"time-content"
>
<view
class=
"create-time"
>
2022/12/13 15:39:56
</view>
<view
class=
"leave-time"
>
处理倒计时:
0天20小时23分
</view>
<view
class=
"create-time"
>
{{
item
.
end_opt_time
}}
</view>
<view
class=
"leave-time"
>
处理倒计时:
{{
timeSpace
(
item
.
end_opt_time
)
}}
</view>
</view>
<view
class=
"line"
style=
"margin: 30rpx 0;"
></view>
</view>
...
...
@@ -19,6 +20,7 @@
</
template
>
<
script
>
import
Api
from
"../../../api/api.js"
export
default
{
data
()
{
return
{
...
...
pages/gallery/gallery.vue
View file @
f71c6784
...
...
@@ -5,7 +5,7 @@
<navbar
:title=
"title"
:showBack=
"false"
></navbar>
<view
class=
"project-content"
:style=
"
{top:statusBarHeight+45+'px'}" @click="toChangeOrg">
<view
class=
"name"
>
{{
orgName
}}
</view>
<image
class=
"image"
src=
"../../static/down-arrow.png"
></image>
<image
class=
"image"
src=
"../../static/down-arrow.png"
v-if=
"role=='PM'"
></image>
</view>
<view
class=
"message-content"
:style=
"
{top:statusBarHeight+78+'px'}">
<view
class=
"item"
>
...
...
@@ -40,7 +40,7 @@
<uni-grid-item
class=
"grid-item"
v-for=
"(model,modelIndex) in item.data"
:key=
"modelIndex"
>
<view
class=
"item"
@
click=
"toIndex(model)"
>
<image
:src=
"model.ydt_logo"
class=
"image"
/>
<view
class=
"
single-text
"
style=
"color: #666666;font-size: 28rpx;margin-top: 10rpx;"
>
<view
class=
"
name
"
style=
"color: #666666;font-size: 28rpx;margin-top: 10rpx;"
>
{{
nameLengthDeal
(
model
.
app_name
)
}}
</view>
</view>
...
...
@@ -98,7 +98,6 @@
this
.
orgName
=
uni
.
getStorageSync
(
"org_name"
)
}
this
.
getAppGroup
()
this
.
getMostUsed
()
},
onShow
()
{
this
.
getMessages
()
...
...
@@ -107,6 +106,7 @@
this
.
orgName
=
uni
.
getStorageSync
(
"org_name"
)
})
this
.
getOrgTree
()
this
.
getMostUsed
()
},
methods
:
{
getMostUsed
()
{
...
...
@@ -523,7 +523,7 @@
height
:
50
rpx
;
}
text
{
.name
{
margin-top
:
20
rpx
;
font-weight
:
400
;
font-size
:
24
rpx
;
...
...
pages/index/index.vue
View file @
f71c6784
...
...
@@ -24,7 +24,7 @@
<!--
</view>
-->
</view>
<!-- 工地头条 -->
<view
class=
" top-new-content"
@
click=
"toLinkNew"
v-if=
"isCompShow('OnePointNews')"
>
<view
class=
" top-new-content"
@
click=
"toLinkNew"
v-if=
"isCompShow('OnePointNews')
&&role!='VISITOR'
"
>
<image
src=
"../../static/notice.png"
class=
"image"
></image>
<view
class=
"title"
>
工地头条
</view>
<swiper
circular=
"true"
:autoplay=
"true"
class=
"swiper"
:vertical=
"true"
>
...
...
@@ -454,10 +454,14 @@
this
.
getMyScore
()
uni
.
setStorageSync
(
"org_no"
,
this
.
userInfo
.
user
.
org_no
)
uni
.
setStorageSync
(
"org_name"
,
this
.
userInfo
.
currentProject
.
projectName
)
this
.
city
=
this
.
userInfo
.
currentProject
.
city
this
.
getWeather
()
}
}
if
(
this
.
role
!=
'VISITOR'
)
{
this
.
getNews
()
this
.
getBanners
()
}
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
...
...
@@ -505,7 +509,7 @@
// 获取用户的地理位置,
getLocation
()
{
const
that
=
this
uni
.
get
Fuzzy
Location
({
uni
.
getLocation
({
type
:
'gcj02'
,
altitude
:
true
,
success
(
res
)
{
...
...
pages/index/siteNewList/siteNewList.vue
View file @
f71c6784
...
...
@@ -73,7 +73,7 @@
var
urls
=
newPath
.
split
(
","
)
return
urls
[
0
]
}
return
url
return
newPath
},
toLinkDetail
(
item
)
{
uni
.
navigateTo
({
...
...
pages/mine/mine.vue
View file @
f71c6784
...
...
@@ -97,6 +97,7 @@
}
},
toLinkLogin
()
{
uni
.
clearStorageSync
()
uni
.
reLaunch
({
url
:
"/pages/login/login/login"
})
...
...
pages/monitor/labourMonitor/labourMonitor.vue
0 → 100644
View file @
f71c6784
<
template
>
<view>
<web-view
:src=
"url"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
url
:
""
,
tab
:
"1"
,
province_no
:
""
,
city_no
:
""
}
},
onLoad
:
function
()
{
let
short_token
=
uni
.
getStorageSync
(
"short_token"
)
console
.
log
(
short_token
);
this
.
url
=
`
${
this
.
webUrl
}
/mobileLaborScreen?token_id=
${
short_token
}
&tab=1&province_no=
${
this
.
province_no
}
&city_no=
${
this
.
city_no
}
`
},
onShow
:
function
()
{
uni
.
$once
(
"refresh"
,
(
res
)
=>
{
let
short_token
=
uni
.
getStorageSync
(
"short_token"
)
this
.
province_no
=
res
.
province_no
this
.
city_no
=
res
.
city_no
this
.
url
=
`
${
this
.
webUrl
}
/mobileLaborScreen?token_id=
${
short_token
}
&tab=2&province_no=
${
this
.
province_no
}
&city_no=
${
this
.
city_no
}
`
})
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
pages/monitor/monitor.vue
View file @
f71c6784
<
template
>
<view
class=
"content"
>
<titleBar
title=
"欢迎您访问工地一点通"
></titleBar>
<view
class=
"default-content"
>
<view
class=
"default-content"
v-if=
"!isHasAuth"
>
<image
src=
"../../static/ic-gth.png"
class=
"image"
></image>
<view
class=
"default-text"
>
当前无监控台权限
</view>
</view>
...
...
@@ -17,10 +17,59 @@
data
()
{
return
{
title
:
'欢迎您访问一点通'
,
isHasAuth
:
false
,
userInfo
:
{},
requestParam
:
{
page
:
1
,
per_page
:
500
,
authed
:
1
,
showed
:
1
,
app_endpoint
:
2
,
is_publish
:
1
,
app_sort
:
2
},
apps
:
[],
}
},
onLoad
()
{
this
.
getAppList
()
},
onShow
()
{
this
.
userInfo
=
getApp
().
globalData
.
userInfo
this
.
isHasAuth
=
this
.
userInfo
.
identity
.
code
==
"PM"
},
methods
:
{
// 获取app列表数据
getAppList
:
function
()
{
let
that
=
this
this
.
$http
.
consoleGet
({
url
:
'/proxy/adminc/v1/system_manage/p_app/application'
,
data
:
this
.
requestParam
,
header
:
{
"access_token"
:
this
.
getToken
()
}
}).
then
((
res
)
=>
{
console
.
log
(
res
.
data
);
if
(
res
.
data
.
code
===
0
)
{
let
list
=
res
.
data
.
data
.
list
this
.
apps
=
list
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
})
},
toIndex
:
function
(
index
)
{
let
app
=
this
.
apps
[
index
]
if
(
app
.
app_no
==
"appletboard"
)
{
uni
.
navigateTo
({
url
:
"/pages/monitor/zhgdMonitor/zhgdMonitor"
})
}
else
if
(
app
.
app_no
==
"appletlabourboard"
)
{
uni
.
navigateTo
({
url
:
"/pages/monitor/labourMonitor/labourMonitor"
})
}
}
}
}
</
script
>
...
...
@@ -63,5 +112,14 @@
color
:
#333
;
}
}
.list-content
{
display
:
flex
;
flex-direction
:
column
;
.item-content
{
position
:
relative
;
}
}
}
</
style
>
pages/monitor/zhgdMonitor/zhgdMonitor.vue
0 → 100644
View file @
f71c6784
<
template
>
<view>
<web-view
:src=
"url"
webview-styles=
"webview-style"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
url
:
""
,
short_token
:
uni
.
getStorageSync
(
"short_token"
)
}
},
onLoad
:
function
()
{
},
onShow
:
function
()
{
this
.
getWebPage
()
},
methods
:
{
getWebPage
:
function
()
{
let
userInfo
=
uni
.
getStorageSync
(
"user_info"
)
let
company_id
=
uni
.
getStorageSync
(
"company_id"
)
if
(
!
company_id
||
company_id
==
0
)
{
company_id
=
userInfo
.
comp_id
//兼容以前登录的账号
}
console
.
log
(
"当前公司ID"
,
userInfo
.
comp_id
);
this
.
url
=
`
${
this
.
webUrl
}
/mobilePagePreview?from=pageTemplate&categ_no=mobile-page&useage=mobile-page&is_mock=0&company_id=
${
company_id
}
&token_id=
${
this
.
short_token
}
&show_project_select=1`
console
.
log
(
"监控台地址:"
,
this
.
url
);
},
}
}
</
script
>
<
style
>
</
style
>
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment