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
cf895e49
提交
cf895e49
authored
1月 07, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
原始模式迁移
父级
7bfec634
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
1257 行增加
和
48 行删除
+1257
-48
api/api.js
+16
-0
api/http.js
+1
-1
api/request.js
+404
-0
main.js
+5
-0
pages.json
+46
-1
pages/gallery/app/checkObjDetail/checkObjDetail.vue
+235
-0
pages/gallery/app/checkObjList/checkObjList.vue
+153
-0
pages/gallery/app/checkRecord/checkRecord.vue
+0
-0
pages/gallery/app/createCheck/createCheck.vue
+0
-0
pages/gallery/app/originalIndex/originalIndex.vue
+246
-0
pages/gallery/gallery.vue
+123
-40
pages/index/bussConfig/bussConfig.vue
+22
-3
pages/index/index.vue
+6
-3
static/icon_down_select.png
+0
-0
没有找到文件。
api/api.js
View file @
cf895e49
...
@@ -229,6 +229,22 @@ const params = {
...
@@ -229,6 +229,22 @@ const params = {
getNeedDo
:
{
getNeedDo
:
{
url
:
"/plat/api/v1/common_check/check_object/my_form_list"
,
url
:
"/plat/api/v1/common_check/check_object/my_form_list"
,
method
:
"get"
method
:
"get"
},
getAppDetail
:
{
url
:
"/plat/web/v1/common_check/check_tpl/tpl_detail"
,
method
:
"get"
},
getOriginAppDetail
:
{
url
:
"/plat/api/v1/common_check/check_tpl/tpl_detail"
,
method
:
"get"
},
getProjectList
:
{
url
:
"/plat/api/v1/project/project_list"
,
method
:
"get"
},
getObjList
:
{
url
:
"/plat/api/v1/common_check/check_object/obj_list"
,
method
:
"get"
}
}
}
}
...
...
api/http.js
View file @
cf895e49
...
@@ -9,7 +9,7 @@ const http = (params) => {
...
@@ -9,7 +9,7 @@ const http = (params) => {
data
:
params
.
data
,
data
:
params
.
data
,
header
:
{
header
:
{
'access_token'
:
uni
.
getStorageSync
(
'token'
)
||
''
,
'access_token'
:
uni
.
getStorageSync
(
'token'
)
||
''
,
"token"
:
uni
.
getStorageSync
(
'token'
)
||
''
//
"token": uni.getStorageSync('token') || ''
},
},
success
(
res
)
{
success
(
res
)
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
...
api/request.js
0 → 100644
View file @
cf895e49
// 公共中心域名
export
const
consoleBaseUrl
=
'https://dev-console-api.hzdingmao.com'
// export const consoleBaseUrl = 'https://test-console-api.hzdingmao.com'
//正式环境
// export const consoleBaseUrl = 'https://console-api.hibuilding.cn'
const
$http
=
{
get
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
consoleBaseUrl
}
/plat
${
url
}
`
,
data
:
data
,
method
:
"GET"
,
header
:
header
,
success
:
function
(
res
)
{
// console.log("请求参数", data);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
);
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
);
}
})
})
},
consoleGet
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
consoleBaseUrl
+
url
,
data
:
data
,
method
:
"GET"
,
header
:
header
,
success
:
function
(
res
)
{
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
);
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
);
}
})
})
},
post
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
consoleBaseUrl
}
/plat
${
url
}
`
,
data
:
data
,
method
:
"POST"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
"data"
,
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
consolePost
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
consoleBaseUrl
+
url
,
data
:
data
,
method
:
"POST"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
deleteRequest
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
consoleBaseUrl
}
/plat
${
url
}
`
,
data
:
data
,
method
:
"DELETE"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
"data"
,
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
put
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
consoleBaseUrl
}
/plat
${
url
}
`
,
data
:
data
,
method
:
"PUT"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
"data"
,
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
consolePut
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
consoleBaseUrl
+
url
,
data
:
data
,
method
:
"PUT"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
delete
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
consoleBaseUrl
}
/plat
${
url
}
`
,
data
:
data
,
method
:
"DELETE"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
consoleDelete
:
function
({
url
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
consoleBaseUrl
}${
url
}
`
,
data
:
data
,
method
:
"DELETE"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
postJSON
:
function
({
url
,
data
,
header
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
consoleBaseUrl
}
/plat
${
url
}
`
,
data
:
data
,
method
:
"POST"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
res
);
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
reject
(
err
)
}
})
})
},
consolePostJSON
:
function
({
url
,
data
,
header
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
consoleBaseUrl
+
url
,
data
:
data
,
method
:
"POST"
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
res
);
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
reject
(
err
)
}
})
})
},
upImg
:
function
({
imgUrl
,
access_token
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
uploadFile
({
url
:
consoleBaseUrl
+
"/api/v1/base/file/upload_file"
,
filePath
:
imgUrl
,
name
:
'pic_file_apk'
,
header
:
{
"access_token"
:
access_token
,
"Content-Type"
:
"multipart/form-data"
},
success
:
function
(
uploadFileRes
)
{
resolve
(
uploadFileRes
);
},
fail
:
function
(
err
)
{
reject
(
err
)
}
});
})
},
upFile
:
function
({
fileUrl
,
access_token
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
uploadFile
({
url
:
consoleBaseUrl
+
"/api/v1/base/file/upload_file"
,
filePath
:
fileUrl
,
name
:
'pic_file_apk'
,
header
:
{
"access_token"
:
access_token
,
"Content-Type"
:
"multipart/form-data"
},
success
:
function
(
uploadFileRes
)
{
resolve
(
uploadFileRes
);
},
fail
:
function
(
err
)
{
reject
(
err
)
}
});
})
},
gcyRequest
:
function
({
url
,
method
,
data
,
header
})
{
uni
.
showLoading
({
title
:
"请求中..."
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
url
:
`
${
gcyBaseUrl
}${
url
}
`
,
data
:
data
,
method
:
method
,
header
:
header
,
success
:
function
(
res
)
{
console
.
log
(
"data"
,
data
);
uni
.
hideLoading
()
if
(
res
.
statusCode
!==
200
)
{
reject
(
res
)
}
else
{
resolve
(
res
);
}
},
fail
:
function
(
err
)
{
uni
.
hideLoading
()
reject
(
err
)
}
})
})
},
}
export
default
$http
main.js
View file @
cf895e49
...
@@ -7,9 +7,14 @@ import tabBar from 'components/uni-tabbar/uni-tabbar.vue'
...
@@ -7,9 +7,14 @@ import tabBar from 'components/uni-tabbar/uni-tabbar.vue'
import
$toast
from
'./common/toast.js'
import
$toast
from
'./common/toast.js'
import
$config
from
'./common/config.js'
import
$config
from
'./common/config.js'
import
$mta
from
"api/mta.js"
import
$mta
from
"api/mta.js"
import
$http
from
'./api/request.js'
Vue
.
prototype
.
$http
=
$http
Vue
.
prototype
.
$mta
=
$mta
Vue
.
prototype
.
$mta
=
$mta
Vue
.
prototype
.
$toast
=
$toast
Vue
.
prototype
.
$toast
=
$toast
Vue
.
prototype
.
$config
=
$config
Vue
.
prototype
.
$config
=
$config
Vue
.
prototype
.
getToken
=
function
()
{
return
uni
.
getStorageSync
(
"token"
)
}
Vue
.
component
(
'tabBar'
,
tabBar
)
Vue
.
component
(
'tabBar'
,
tabBar
)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
App
.
mpType
=
'app'
App
.
mpType
=
'app'
...
...
pages.json
View file @
cf895e49
...
@@ -363,7 +363,52 @@
...
@@ -363,7 +363,52 @@
}
}
}
}
],
,{
"path"
:
"pages/gallery/app/originalIndex/originalIndex"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/gallery/app/checkObjList/checkObjList"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/gallery/app/createCheck/createCheck"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/gallery/app/checkObjDetail/checkObjDetail"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/gallery/app/checkRecord/checkRecord"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"white"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarTitleText"
:
"uni-app"
,
...
...
pages/gallery/app/checkObjDetail/checkObjDetail.vue
0 → 100644
View file @
cf895e49
<
template
>
<view
class=
"check-detail-home"
>
<!--
<navbar
:title=
"title"
></navbar>
-->
<view
class=
"check-detail-head"
>
<canvas
canvas-id=
"qrcode"
style=
"width: 100px;height: 100px;"
/>
<view
class=
"check-detail-download"
>
<text
style=
"font-size: 14px;font-weight: bold;color: #333333;"
>
{{
title
}}
</text>
<view
class=
"detail-download"
@
click=
"downloadQrcode"
>
<text>
下载二维码
</text>
</view>
</view>
</view>
<view
class=
"check-detail-list"
>
<view
v-for=
"(item,index) in itemList"
:key=
"index"
@
click=
"itemClick(index)"
>
<view
class=
"check-detail-item"
>
<view
class=
"check-detail-content"
>
<view
class=
"check-detail-v-title"
>
{{
item
.
check_item_name
}}
</view>
<view
class=
"check-detail-v-date"
>
{{
item
.
created_at
}}
</view>
</view>
<view
class=
"check-detail-listcard-image"
>
<image
src=
"../../static/ic_arrow_left.png"
></image>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
uQRCode
from
"../../../../common/Sansnn-uQRCode/uqrcode.js"
export
default
{
data
()
{
return
{
title
:
"记录对象"
,
check_obj_id
:
""
,
qrcodeSrc
:
''
,
itemList
:
[],
size
:
100
,
check_item_id
:
""
}
},
onLoad
:
function
(
option
)
{
this
.
title
=
option
.
obj_no
;
this
.
check_obj_id
=
option
.
check_obj_id
;
this
.
check_item_id
=
option
.
check_item_id
uni
.
setNavigationBarTitle
({
title
:
option
.
obj_no
})
},
onReady
()
{
let
text
=
`{"type":"platform-obj","text":"
${
this
.
title
}
"}`
setTimeout
(()
=>
{
this
.
make
(
text
)
},
100
)
},
methods
:
{
itemClick
(
index
)
{
let
checkItem
=
this
.
itemList
[
index
]
uni
.
navigateTo
({
url
:
`/pages/gallery/app/checkRecord/checkRecord?check_record_id=
${
checkItem
.
check_record_id
}
&check_item_id=
${
checkItem
.
check_item_id
}
&check_item_name=
${
checkItem
.
check_item_name
}
`
})
},
loadRecordList
()
{
let
_this
=
this
uni
.
showLoading
({
title
:
"加载中"
})
this
.
$http
.
get
({
url
:
"/api/v1/common_check/check_record/item_list"
,
data
:
{
"project_id"
:
uni
.
getStorageSync
(
"project_id"
),
"obj_no"
:
_this
.
title
,
"is_page"
:
0
},
header
:
{
"access_token"
:
this
.
getToken
()
}
}).
then
((
res
)
=>
{
let
result
=
res
.
data
console
.
log
(
"检查对象详情"
,
result
);
let
list
=
result
.
data
.
list
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
check_item_id
==
_this
.
check_item_id
)
{
this
.
itemList
.
push
(
list
[
i
])
}
}
})
},
make
(
text
)
{
uQRCode
.
make
({
canvasId
:
'qrcode'
,
componentInstance
:
this
,
text
:
text
,
size
:
this
.
size
,
margin
:
10
,
backgroundColor
:
'#ffffff'
,
foregroundColor
:
'#000000'
,
fileType
:
'jpg'
,
correctLevel
:
uQRCode
.
errorCorrectLevel
.
H
,
success
:
res
=>
{
console
.
log
(
res
)
this
.
qrcodeSrc
=
res
this
.
loadRecordList
()
},
fail
:
error
=>
{
console
.
log
(
error
)
this
.
loadRecordList
()
}
})
},
downloadQrcode
()
{
// #ifndef H5
this
.
save
(
this
.
qrcodeSrc
)
// #endif
// #ifdef H5
let
_t
=
this
;
uni
.
downloadFile
({
url
:
this
.
qrcodeSrc
,
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
let
file
=
res
.
tempFilePath
;
_t
.
save
(
file
)
}
}
});
// #endif
},
save
(
url
)
{
let
_this
=
this
;
uni
.
saveImageToPhotosAlbum
({
filePath
:
url
,
success
:
()
=>
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
"图片已保存到相册"
});
},
fail
:
()
=>
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
"图片保存失败"
});
}
});
}
}
}
</
script
>
<
style
lang=
"scss"
>
.check-detail-home
{
display
:
flex
;
flex-direction
:
column
;
.check-detail-head
{
background-color
:
#F5F5F5
;
flex-direction
:
row
;
display
:
flex
;
padding
:
10px
;
.check-detail-download
{
display
:
flex
;
margin-top
:
10px
;
margin-left
:
10px
;
flex-direction
:
column
;
.detail-download
{
display
:
flex
;
flex-direction
:
column
;
width
:
86px
;
margin-top
:
10px
;
height
:
24px
;
background-color
:
#1890FF
;
color
:
#FFFFFF
;
font-size
:
14px
;
align-items
:
center
;
justify-content
:
center
;
border-radius
:
2px
;
}
}
}
.check-detail-list
{
display
:
flex
;
flex-direction
:
column
;
.check-detail-item
{
display
:
flex
;
padding
:
10px
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
row
;
border-bottom
:
1px
solid
#f5f5f5
;
.check-detail-content
{
display
:
flex
;
flex
:
1
;
flex-direction
:
column
;
justify-content
:
center
;
height
:
50px
;
overflow
:
hidden
;
.check-detail-v-title
{
font-size
:
16px
;
color
:
#333333
;
overflow
:
hidden
;
-o-text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
normal
;
display
:
block
;
}
.check-detail-v-date
{
margin-top
:
5px
;
font-size
:
12px
;
color
:
#000
;
}
}
.check-detail-listcard-image
{
width
:
20px
;
margin-right
:
10px
;
image
{
width
:
10px
;
height
:
15px
;
}
}
}
}
}
</
style
>
pages/gallery/app/checkObjList/checkObjList.vue
0 → 100644
View file @
cf895e49
<
template
>
<view
class=
"home"
>
<!--
<navbar
:title=
"title"
></navbar>
-->
<view
class=
"uni-search"
>
<uni-search-bar
placeholder=
"搜索"
bgColor=
"#F5F5F5"
@
confirm=
"search"
@
input=
"search"
/>
</view>
<view
class=
"content"
>
<view
v-for=
"(item,index) in objList"
:key=
"index"
@
click=
"itemClick(index)"
>
<list-card
:item=
'item'
></list-card>
</view>
<view
class=
"loadmore"
v-if=
"showLoadMore"
>
{{
loadTips
}}
</view>
</view>
<uni-fab
horizontal=
"right"
vertical=
"bottom"
text=
"新增"
:content=
"menu"
@
fabClick=
"add"
:popMenu=
popMenu
:pattern=
"pattern"
></uni-fab>
</view>
</
template
>
<!-- 检查对象列表 -->
<
script
>
import
Api
from
"../../../../api/api.js"
export
default
{
data
()
{
return
{
objList
:
[],
menu
:
[],
loadTips
:
'正在加载...'
,
showLoadMore
:
false
,
pattern
:
{
color
:
'#7A7E83'
,
backgroundColor
:
'#fff'
,
selectedColor
:
'#007AFF'
,
buttonColor
:
'#007AFF'
},
popMenu
:
false
,
currPage
:
1
,
pageSize
:
20
,
title
:
"记录对象"
,
projectId
:
""
,
checkItemId
:
""
,
inputValue
:
""
,
check_tpl_id
:
""
}
},
onShow
()
{
this
.
initData
()
},
onLoad
:
function
(
option
)
{
this
.
title
=
option
.
check_item_name
uni
.
setNavigationBarTitle
({
title
:
option
.
check_item_name
})
this
.
check_tpl_id
=
option
.
check_tpl_id
this
.
checkItemId
=
option
.
check_item_id
this
.
projectId
=
uni
.
getStorageSync
(
"project_id"
)
},
onPullDownRefresh
()
{
this
.
currPage
=
1
this
.
objList
=
[];
this
.
showLoadMore
=
false
this
.
loadTips
=
'正在加载...'
console
.
log
(
'onPullDownRefresh'
);
this
.
initData
()
},
onReachBottom
()
{
this
.
showLoadMore
=
true
;
this
.
currPage
++
;
this
.
loadMore
()
},
methods
:
{
initData
()
{
this
.
loadData
(
true
)
},
loadMore
()
{
this
.
loadData
(
false
);
},
loadData
(
refresh
)
{
if
(
refresh
)
{
this
.
currPage
=
1
}
this
.
getCheckList
(
refresh
,
1
)
},
add
()
{
uni
.
navigateTo
({
url
:
`/pages/gallery/app/createCheck/createCheck?check_item_id=
${
this
.
checkItemId
}
&title=
${
this
.
title
}
&check_tpl_id=
${
this
.
check_tpl_id
}
`
,
})
},
search
(
val
)
{
this
.
inputValue
=
val
.
value
this
.
currPage
=
1
console
.
log
(
val
.
value
);
let
length
=
this
.
objList
.
length
this
.
objList
.
splice
(
0
,
length
)
this
.
getCheckList
(
true
,
0
)
},
itemClick
(
index
)
{
let
obj_no
=
this
.
objList
[
index
].
obj_no
let
check_obj_id
=
this
.
objList
[
index
].
check_obj_id
uni
.
navigateTo
({
url
:
`/pages/gallery/app/checkObjDetail/checkObjDetail?check_item_id=
${
this
.
checkItemId
}
&obj_no=
${
obj_no
}
&check_obj_id=
${
check_obj_id
}
`
})
},
getCheckList
(
refresh
,
is_page
)
{
uni
.
showLoading
({
title
:
"加载中"
})
Api
.
getObjList
({
data
:
{
"project_id"
:
this
.
projectId
,
"check_item_id"
:
this
.
checkItemId
,
"obj_no"
:
this
.
inputValue
,
"is_page"
:
is_page
,
"page"
:
this
.
currPage
,
"page_size"
:
this
.
pageSize
}
}).
then
((
result
)
=>
{
console
.
log
(
"检查对象列表:"
,
result
);
let
list
=
result
.
data
.
list
if
(
refresh
)
{
uni
.
stopPullDownRefresh
()
this
.
objList
=
list
}
else
{
if
(
list
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
this
.
objList
.
push
(
list
[
i
])
}
}
else
{
uni
.
showToast
({
title
:
"没有更多数据"
,
icon
:
'none'
})
}
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
.home
{
display
:
flex
;
flex
:
1
;
box-sizing
:
border-box
;
flex-direction
:
column
;
.loadmore
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
</
style
>
pages/gallery/app/checkRecord/checkRecord.vue
0 → 100644
View file @
cf895e49
差异被折叠。
点击展开。
pages/gallery/app/createCheck/createCheck.vue
0 → 100644
View file @
cf895e49
差异被折叠。
点击展开。
pages/gallery/app/originalIndex/originalIndex.vue
0 → 100644
View file @
cf895e49
<
template
>
<view
class=
"index-content"
>
<!--
<navbar
:showBack=
"false"
:title=
"title"
></navbar>
-->
<picker
@
change=
"itemSelect"
:range=
"projectNames"
>
<label>
<view
class=
"index-uni-project"
>
<text>
{{
projectSelect
}}
</text>
<image
src=
"../../../../static/icon_down_select.png"
></image>
</view>
</label>
</picker>
<auto-banner
class=
"index-uni-banner"
:homeSlide=
"banners"
></auto-banner>
<view
class=
"index-grid-box"
>
<uni-grid
:column=
"column"
@
change=
"change"
>
<uni-grid-item
v-for=
"(item, index) in list"
:index=
"index"
:key=
"index"
>
<view
class=
"index-grid-item-box"
>
<image
:src=
"'https://release-console.oss-cn-hangzhou.aliyuncs.com/intecons/uniimage/'+item.menu_icon+'.png'"
class=
"image"
/>
<text
class=
"index-text"
>
{{
item
.
check_item_name
}}
</text>
</view>
</uni-grid-item>
</uni-grid>
</view>
</view>
</
template
>
<
script
>
import
Api
from
"../../../../api/api.js"
export
default
{
data
()
{
return
{
title
:
''
,
column
:
3
,
projectList
:
[],
projectNames
:
[],
banners
:
[],
tplConfig
:
[],
list
:
[],
projectSelect
:
"示例项目"
,
projectId
:
""
,
pattern
:
{
color
:
'#7A7E83'
,
backgroundColor
:
'#fff'
,
selectedColor
:
'#007AFF'
,
buttonColor
:
'#007AFF'
},
menu
:
[],
appId
:
""
}
},
onLoad
(
option
)
{
this
.
appId
=
option
.
check_tpl_id
this
.
title
=
option
.
title
uni
.
setNavigationBarTitle
({
title
:
this
.
title
})
this
.
loadProject
()
this
.
loadData
()
},
methods
:
{
loadProject
(
access_token
)
{
Api
.
getProjectList
({
data
:
{
is_all
:
1
}
}).
then
((
result
)
=>
{
console
.
log
(
"项目列表:"
,
result
);
if
(
result
.
code
===
0
)
{
this
.
projectList
=
result
.
data
.
list
for
(
var
i
=
0
;
i
<
this
.
projectList
.
length
;
i
++
)
{
this
.
projectNames
[
i
]
=
this
.
projectList
[
i
].
project_name
}
if
(
this
.
projectList
.
length
>
0
)
{
console
.
log
(
"项目ID:"
,
);
let
curId
=
uni
.
getStorageSync
(
"project_id"
)
if
(
curId
.
length
==
0
)
{
this
.
projectSelect
=
this
.
projectList
[
0
].
project_name
uni
.
setStorageSync
(
"project_id"
,
this
.
projectList
[
0
].
project_id
)
uni
.
setStorageSync
(
"project_name"
,
this
.
projectList
[
0
].
project_name
)
}
else
{
this
.
projectSelect
=
uni
.
getStorageSync
(
"project_name"
)
}
}
}
else
{
if
(
result
.
code
===
-
1
)
{
uni
.
showToast
({
title
:
result
.
msg
,
icon
:
'none'
})
return
}
}
})
},
loadData
()
{
Api
.
getOriginAppDetail
({
data
:
{
"check_tpl_id"
:
this
.
appId
,
"show_status"
:
1
}
}).
then
((
result
)
=>
{
console
.
log
(
"检查项菜单:"
,
result
);
if
(
result
.
code
===
-
1
)
{
uni
.
showToast
({
title
:
result
.
msg
,
icon
:
'none'
})
return
}
if
(
result
.
data
.
line_menu_num
)
{
if
(
result
.
data
.
line_menu_num
!==
""
)
{
this
.
column
=
parseInt
(
result
.
data
.
line_menu_num
)
}
else
{
this
.
column
=
3
}
}
else
{
this
.
column
=
3
}
console
.
log
(
this
.
column
);
this
.
banners
=
result
.
data
.
home_pic
console
.
log
(
"轮播图:"
,
this
.
banners
);
this
.
tplConfig
=
result
.
data
.
tpl_config
console
.
log
(
"检查项列表:"
,
this
.
tplConfig
);
if
(
this
.
tplConfig
)
{
if
(
this
.
tplConfig
.
length
>
0
)
{
this
.
list
=
this
.
tplConfig
[
0
].
module_config
}
}
this
.
title
=
result
.
data
.
tpl_name
uni
.
setStorageSync
(
"version"
,
result
.
data
.
version
)
uni
.
setStorageSync
(
"application_name"
,
result
.
data
.
application_name
)
uni
.
setStorageSync
(
"version_pic"
,
result
.
data
.
version_pic
)
})
},
change
(
e
)
{
let
{
index
}
=
e
.
detail
let
item
=
this
.
list
[
index
]
uni
.
navigateTo
({
url
:
`/pages/gallery/app/checkObjList/checkObjList?check_item_name=
${
item
.
check_item_name
}
&check_item_id=
${
item
.
check_item_id
}
&check_tpl_id=
${
this
.
appId
}
`
,
})
},
itemSelect
(
e
)
{
console
.
log
(
e
);
let
index
=
parseInt
(
e
.
detail
.
value
)
this
.
projectSelect
=
this
.
projectList
[
index
].
project_name
uni
.
setStorageSync
(
"project_id"
,
this
.
projectList
[
index
].
project_id
)
uni
.
setStorageSync
(
"project_name"
,
this
.
projectList
[
index
].
project_name
)
},
}
}
</
script
>
<
style
lang=
"scss"
>
.index-content
{
display
:
flex
;
flex-direction
:
column
;
background-color
:
#F5F5F5
;
box-sizing
:
border-box
;
position
:
relative
;
.index-uni-project
{
height
:
80
rpx
;
background-color
:
#FFFFFF
;
display
:
flex
;
flex-direction
:
row
;
width
:
100%
;
align-items
:
center
;
justify-content
:
center
;
text
{
font-size
:
32
rpx
;
color
:
#333333
;
max-width
:
400
rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
image
{
width
:
40
rpx
;
height
:
40
rpx
;
}
}
.index-uni-banner
{
background-color
:
#FFFFFF
;
border
:
2
rpx
solid
#F5F5F5
;
border-radius
:
10
rpx
;
margin
:
30
rpx
;
}
.index-grid-box
{
flex-direction
:
row
;
padding
:
30
rpx
;
background-color
:
#FFFFFF
;
.index-grid-item-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
flex-start
;
padding
:
30
rpx
10
rpx
;
image
{
width
:
80
rpx
;
height
:
80
rpx
;
}
text
{
text-align
:
center
;
margin-top
:
10
rpx
;
font-size
:
24
rpx
;
color
:
#333333
;
}
}
}
}
.index-content
::after
{
content
:
""
;
display
:
block
;
}
.back-icon
{
width
:
100
rpx
;
height
:
100
rpx
;
border-radius
:
50%
;
position
:
absolute
;
right
:
30
rpx
;
bottom
:
-320
rpx
;
background-color
:
rgb
(
0
,
122
,
255
);
box-shadow
:
0
0
10
rpx
4
rpx
rgba
(
0
,
0
,
0
,
0.2
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
image
{
width
:
80
rpx
;
height
:
80
rpx
;
}
}
</
style
>
pages/gallery/gallery.vue
View file @
cf895e49
...
@@ -34,16 +34,17 @@
...
@@ -34,16 +34,17 @@
<view
class=
"app-content"
>
<view
class=
"app-content"
>
<v-tabs
:tabs=
"tabs"
:scroll=
"true"
:value=
"current"
@
change=
"tabChange"
></v-tabs>
<v-tabs
:tabs=
"tabs"
:scroll=
"true"
:value=
"current"
@
change=
"tabChange"
></v-tabs>
<view
class=
"app-group-content"
>
<view
class=
"app-group-content"
>
<view
class=
"app-group-item"
v-for=
"(item,index) in apps"
:key=
"index"
>
<view
class=
"app-group-item"
v-for=
"(item,index) in apps
[current].list
"
:key=
"index"
>
<view
class=
"title"
>
{{
item
.
group_name
||
"其他"
}}
</view>
<view
class=
"title"
>
{{
item
.
group_name
||
"其他"
}}
</view>
<uni-grid
column=
"4"
class=
"grid-container"
>
<uni-grid
column=
"4"
class=
"grid-container"
>
<uni-grid-item
class=
"grid-item"
v-for=
"(model,modelIndex) in item.data"
:key=
"modelIndex"
<uni-grid-item
class=
"grid-item"
v-for=
"(model,modelIndex) in item.data"
:key=
"modelIndex"
>
@
click=
"toIndex(model)"
>
<view
class=
"item"
@
click=
"toIndex(model)"
>
<image
<image
:src=
"'https://release-console.oss-cn-hangzhou.aliyuncs.com/intecons/uniimage/'+model.logo+'.png'"
:src=
"'https://release-console.oss-cn-hangzhou.aliyuncs.com/intecons/uniimage/'+model.logo+'.png'"
class=
"image"
/>
class=
"image"
/>
<view
class=
"single-text"
style=
"color: #666666;font-size: 28rpx;margin-top: 10rpx;"
>
<view
class=
"single-text"
style=
"color: #666666;font-size: 28rpx;margin-top: 10rpx;"
>
{{
model
.
app_name
}}
{{
nameLengthDeal
(
model
.
app_name
)
}}
</view>
</view>
</view>
</uni-grid-item>
</uni-grid-item>
</uni-grid>
</uni-grid>
...
@@ -56,6 +57,7 @@
...
@@ -56,6 +57,7 @@
<
script
>
<
script
>
import
Api
from
"../../api/api.js"
import
Api
from
"../../api/api.js"
import
StringUtils
from
"../../common/stringUtils.js"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -64,7 +66,16 @@
...
@@ -64,7 +66,16 @@
messageCount
:
0
,
messageCount
:
0
,
needDoCount
:
0
,
needDoCount
:
0
,
groups
:
[],
groups
:
[],
apps
:
[],
apps
:
[{
app_menu
:
1
,
list
:
[]
},
{
app_menu
:
2
,
list
:
[]
},
{
app_menu
:
3
,
list
:
[]
}],
current
:
0
,
current
:
0
,
tabs
:
[
"生活服务"
,
"综合办公"
,
"岗位工作"
],
tabs
:
[
"生活服务"
,
"综合办公"
,
"岗位工作"
],
requestParam
:
{
requestParam
:
{
...
@@ -88,6 +99,45 @@
...
@@ -88,6 +99,45 @@
this
.
getNeedDo
()
this
.
getNeedDo
()
},
},
methods
:
{
methods
:
{
toIndex
(
model
)
{
this
.
$mta
(
model
.
app_id
)
this
.
getAppDetail
(
model
)
},
getAppDetail
(
model
)
{
Api
.
getAppDetail
({
data
:
{
"check_tpl_id"
:
model
.
source_id
}
}).
then
((
result
)
=>
{
console
.
log
(
"应用信息"
,
result
);
uni
.
setStorageSync
(
"business_name"
,
result
.
data
.
tpl_name
)
if
(
result
.
code
==
0
)
{
if
(
!
result
.
data
.
business_type
)
{
uni
.
navigateTo
({
url
:
`/pages/gallery/app/originalIndex/originalIndex?check_tpl_id=
${
model
.
source_id
}
&title=
${
result
.
data
.
tpl_name
}
`
})
}
else
if
(
result
.
data
.
business_type
==
2
)
{
//独立模式 需要获取模块数量 如果只有一个模块 自动跳转表单页面 "体验嘛 呵呵"
that
.
toAlone
(
model
,
result
.
data
)
}
else
if
(
result
.
data
.
business_type
==
3
||
result
.
data
.
business_type
==
4
)
{
//流程模式
this
.
models
=
result
.
data
.
tpl_config
uni
.
navigateTo
({
url
:
`../model-form-list-page/model-form-list-page?check_tpl_id=
${
model
.
source_id
}
&business_type=
${
result
.
data
.
business_type
}
&title=
${
result
.
data
.
tpl_name
}
&showCfg=
${
JSON
.
stringify
(
this
.
models
[
0
].
show_cfg
)}
`
})
}
else
if
(
result
.
data
.
business_type
==
5
)
{
this
.
currentModel
=
result
.
data
.
tpl_config
[
0
]
console
.
log
(
this
.
currentModel
);
this
.
$refs
.
bottomDialog
.
handleShow
()
}
else
{
//之前的默认
uni
.
navigateTo
({
url
:
`../index/index?check_tpl_id=
${
model
.
source_id
}
&title=
${
result
.
data
.
tpl_name
}
`
})
}
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
})
},
tabChange
(
e
)
{
tabChange
(
e
)
{
this
.
current
=
e
this
.
current
=
e
},
},
...
@@ -140,6 +190,7 @@
...
@@ -140,6 +190,7 @@
"code_type"
:
"applicationGroup"
"code_type"
:
"applicationGroup"
}
}
}).
then
((
result
)
=>
{
}).
then
((
result
)
=>
{
console
.
log
(
"应用分组"
,
result
);
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
let
list
=
result
.
data
[
0
].
sub_data
let
list
=
result
.
data
[
0
].
sub_data
this
.
groups
=
[]
this
.
groups
=
[]
...
@@ -165,31 +216,33 @@
...
@@ -165,31 +216,33 @@
})
})
},
},
getAppList
:
function
()
{
getAppList
:
function
()
{
let
that
=
this
Api
.
getAppList
({
Api
.
getAppList
({
data
:
this
.
requestParam
data
:
this
.
requestParam
,
header
:
{
'access_token'
:
uni
.
getStorageSync
(
'token'
)
||
''
}
}).
then
((
result
)
=>
{
}).
then
((
result
)
=>
{
if
(
result
.
code
===
0
)
{
if
(
result
.
code
===
0
)
{
let
list
=
result
.
data
.
list
let
list
=
result
.
data
.
list
that
.
apps
=
that
.
sortGroup
(
list
)
//先根据菜单分组
console
.
log
(
that
.
apps
);
this
.
apps
=
this
.
menuSort
(
list
)
if
(
that
.
groups
.
length
>
0
)
{
//再根据类型分组
for
(
var
i
=
0
;
i
<
that
.
apps
.
length
;
i
++
)
{
this
.
apps
.
forEach
((
item
)
=>
{
for
(
var
j
=
0
;
j
<
that
.
groups
.
length
;
j
++
)
{
item
.
list
=
this
.
sortGroup
(
item
.
list
)
if
(
that
.
groups
[
j
].
key
==
that
.
apps
[
i
].
app_group
)
{
if
(
this
.
groups
.
length
>
0
)
{
that
.
apps
[
i
].
group_name
=
that
.
groups
[
j
].
val
for
(
var
i
=
0
;
i
<
item
.
list
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
this
.
groups
.
length
;
j
++
)
{
if
(
this
.
groups
[
j
].
key
==
item
.
list
[
i
].
app_group
)
{
item
.
list
[
i
].
group_name
=
this
.
groups
[
j
].
val
}
}
}
}
}
}
}
}
})
console
.
log
(
"应用分组之后"
,
this
.
apps
);
}
else
{
}
else
{
if
(
result
.
code
===
-
1
)
{
this
.
$toast
.
showToast
(
result
.
msg
)
this
.
$toast
.
showToast
(
result
.
msg
)
if
(
result
.
action
===
'Laravel_public_permission_fail'
)
{
that
.
refreshToken
()
}
}
}
}
})
})
},
},
...
@@ -201,7 +254,8 @@
...
@@ -201,7 +254,8 @@
if
(
!
map
[
app
.
app_group
])
{
if
(
!
map
[
app
.
app_group
])
{
dest
.
push
({
dest
.
push
({
app_group
:
app
.
app_group
,
app_group
:
app
.
app_group
,
data
:
[
app
]
data
:
[
app
],
app
});
});
map
[
app
.
app_group
]
=
app
;
map
[
app
.
app_group
]
=
app
;
}
else
{
}
else
{
...
@@ -216,6 +270,32 @@
...
@@ -216,6 +270,32 @@
}
}
return
dest
return
dest
},
},
menuSort
(
arr
)
{
var
map
=
{},
dest
=
[];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
var
app
=
arr
[
i
];
if
(
!
map
[
app
.
app_menu
])
{
dest
.
push
({
app_menu
:
app
.
app_menu
,
list
:
[
app
]
});
map
[
app
.
app_menu
]
=
app
;
}
else
{
for
(
var
j
=
0
;
j
<
dest
.
length
;
j
++
)
{
var
dj
=
dest
[
j
];
if
(
dj
.
app_menu
==
app
.
app_menu
)
{
dj
.
list
.
push
(
app
);
break
;
}
}
}
}
return
dest
},
nameLengthDeal
(
name
)
{
return
StringUtils
.
stringLength
(
name
,
4
)
}
}
}
}
}
</
script
>
</
script
>
...
@@ -378,22 +458,25 @@
...
@@ -378,22 +458,25 @@
margin-top
:
30
rpx
;
margin-top
:
30
rpx
;
.grid-item
{
.grid-item
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
image
{
.item
{
width
:
50
rpx
;
display
:
flex
;
height
:
50
rpx
;
flex-direction
:
column
;
}
align-items
:
center
;
justify-content
:
center
;
text
{
image
{
margin-top
:
10
rpx
;
width
:
50
rpx
;
font-weight
:
400
;
height
:
50
rpx
;
font-size
:
24
rpx
;
}
color
:
#333
;
text
{
margin-top
:
20
rpx
;
font-weight
:
400
;
font-size
:
24
rpx
;
color
:
#333
;
}
}
}
}
}
}
}
...
...
pages/index/bussConfig/bussConfig.vue
View file @
cf895e49
...
@@ -70,9 +70,28 @@
...
@@ -70,9 +70,28 @@
})
})
},
},
sureConfig
()
{
sureConfig
()
{
uni
.
$emit
(
"refreshApp"
)
if
(
thsi
.
selList
.
length
==
0
)
{
uni
.
navigateBack
({
this
.
$toast
.
showToast
(
"请设置常用应用"
)
delta
:
1
return
}
let
apps
=
[]
this
.
selList
.
forEach
((
item
)
=>
{
apps
.
push
(
item
.
app_id
)
})
Api
.
saveAppConfig
({
data
:
{
apps
:
apps
}
}).
then
((
result
)
=>
{
if
(
result
.
code
==
0
)
{
this
.
$toast
.
showToast
(
"常用应用设置成功"
)
uni
.
$emit
(
"refreshApp"
)
uni
.
navigateBack
({
delta
:
1
})
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
})
})
},
},
toAdd
(
item
)
{
toAdd
(
item
)
{
...
...
pages/index/index.vue
View file @
cf895e49
...
@@ -51,7 +51,8 @@
...
@@ -51,7 +51,8 @@
<uni-grid-item
v-for=
"(app,index) in appList"
:key=
"index"
>
<uni-grid-item
v-for=
"(app,index) in appList"
:key=
"index"
>
<view
class=
"app-item"
@
click=
"toLink(app)"
>
<view
class=
"app-item"
@
click=
"toLink(app)"
>
<view
:class=
"isLineVisil(index)?'app-name-left':'app-name-right'"
>
<view
:class=
"isLineVisil(index)?'app-name-left':'app-name-right'"
>
{{
nameLengthDeal
(
app
.
app_name
)
}}
</view>
{{
nameLengthDeal
(
app
.
app_name
)
}}
</view>
<image
class=
"app-logo"
src=
"../../static/ic-score-logo.png"
></image>
<image
class=
"app-logo"
src=
"../../static/ic-score-logo.png"
></image>
<view
class=
"line"
v-if=
"isLineVisil(index)"
></view>
<view
class=
"line"
v-if=
"isLineVisil(index)"
></view>
</view>
</view>
...
@@ -744,17 +745,19 @@
...
@@ -744,17 +745,19 @@
font-family
:
"PingFang SC Medium"
;
font-family
:
"PingFang SC Medium"
;
font-weight
:
700
;
font-weight
:
700
;
margin-left
:
30
rpx
;
margin-left
:
30
rpx
;
flex
:
1
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
text-align
:
center
;
text-align
:
left
;
color
:
#333
;
color
:
#333
;
}
}
.app-name-right
{
.app-name-right
{
font-family
:
"PingFang SC Medium"
;
font-family
:
"PingFang SC Medium"
;
font-weight
:
700
;
font-weight
:
700
;
flex
:
1
;
margin-left
:
60
rpx
;
margin-left
:
60
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
text-align
:
center
;
text-align
:
left
;
color
:
#333
;
color
:
#333
;
}
}
...
...
static/icon_down_select.png
0 → 100644
View file @
cf895e49
243 Bytes
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment