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
e3d01697
提交
e3d01697
authored
2月 21, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
企业级新闻接口接入
应用按钮操作权限接口接入
父级
8f082e36
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
234 行增加
和
35 行删除
+234
-35
api/api.js
+8
-0
pages/gallery/app/checkObjList/checkObjList.vue
+44
-1
pages/gallery/app/modeFormList/modeFormList.vue
+102
-1
pages/gallery/app/modeList/modeList.vue
+4
-2
pages/gallery/app/originalIndex/originalIndex.vue
+4
-22
pages/gallery/gallery.vue
+4
-4
pages/index/index.vue
+68
-5
没有找到文件。
api/api.js
View file @
e3d01697
...
@@ -156,6 +156,10 @@ const params = {
...
@@ -156,6 +156,10 @@ const params = {
url
:
"/ydt/aArticleLibrary/getAArticleLibraryForm"
,
url
:
"/ydt/aArticleLibrary/getAArticleLibraryForm"
,
method
:
"get"
method
:
"get"
},
},
getCompanyNews
:
{
url
:
"/ydt/aArticleLibrary/getWithCompany"
,
method
:
"get"
},
getHomeComp
:
{
getHomeComp
:
{
url
:
"/ydt/api/v1/pageTemplate/getByTemplateKey"
,
url
:
"/ydt/api/v1/pageTemplate/getByTemplateKey"
,
method
:
"get"
method
:
"get"
...
@@ -304,6 +308,10 @@ const params = {
...
@@ -304,6 +308,10 @@ const params = {
switchJob
:
{
switchJob
:
{
url
:
"/api/v2/user/user_v2/switch_job"
,
url
:
"/api/v2/user/user_v2/switch_job"
,
method
:
"put"
method
:
"put"
},
getAppOperateAuth
:
{
url
:
"/proxy/adminc/v1/system_manage/p_operation/queryAppOperations"
,
method
:
"get"
}
}
}
}
...
...
pages/gallery/app/checkObjList/checkObjList.vue
View file @
e3d01697
...
@@ -37,7 +37,9 @@
...
@@ -37,7 +37,9 @@
projectId
:
""
,
projectId
:
""
,
checkItemId
:
""
,
checkItemId
:
""
,
inputValue
:
""
,
inputValue
:
""
,
check_tpl_id
:
""
check_tpl_id
:
""
,
appId
:
""
,
auths
:
[
'1'
,
'2'
,
'3'
,
'4'
]
//操作权限对应增改查删
}
}
},
},
onShow
()
{
onShow
()
{
...
@@ -51,6 +53,7 @@
...
@@ -51,6 +53,7 @@
this
.
check_tpl_id
=
option
.
check_tpl_id
this
.
check_tpl_id
=
option
.
check_tpl_id
this
.
checkItemId
=
option
.
check_item_id
this
.
checkItemId
=
option
.
check_item_id
this
.
projectId
=
option
.
project_id
this
.
projectId
=
option
.
project_id
this
.
appId
=
option
.
appId
},
},
onPullDownRefresh
()
{
onPullDownRefresh
()
{
...
@@ -67,6 +70,18 @@
...
@@ -67,6 +70,18 @@
this
.
loadMore
()
this
.
loadMore
()
},
},
methods
:
{
methods
:
{
getOperateAuth
()
{
Api
.
getAppOperateAuth
({
data
:
{
appId
:
this
.
appId
}
}).
then
((
result
)
=>
{
console
.
log
(
"按钮权限"
,
result
);
if
(
result
.
code
==
0
)
{
this
.
auths
=
result
.
data
}
})
},
initData
()
{
initData
()
{
this
.
loadData
(
true
)
this
.
loadData
(
true
)
},
},
...
@@ -80,6 +95,20 @@
...
@@ -80,6 +95,20 @@
this
.
getCheckList
(
refresh
,
1
)
this
.
getCheckList
(
refresh
,
1
)
},
},
add
()
{
add
()
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'1'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有新增权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/createCheck/createCheck?check_item_id=
${
this
.
checkItemId
}
&title=
${
this
.
title
}
&check_tpl_id=
${
this
.
check_tpl_id
}
`
,
url
:
`/pages/gallery/app/createCheck/createCheck?check_item_id=
${
this
.
checkItemId
}
&title=
${
this
.
title
}
&check_tpl_id=
${
this
.
check_tpl_id
}
`
,
})
})
...
@@ -93,6 +122,20 @@
...
@@ -93,6 +122,20 @@
this
.
getCheckList
(
true
,
0
)
this
.
getCheckList
(
true
,
0
)
},
},
itemClick
(
index
)
{
itemClick
(
index
)
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'3'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有查看权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
let
obj_no
=
this
.
objList
[
index
].
obj_no
let
obj_no
=
this
.
objList
[
index
].
obj_no
let
check_obj_id
=
this
.
objList
[
index
].
check_obj_id
let
check_obj_id
=
this
.
objList
[
index
].
check_obj_id
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
pages/gallery/app/modeFormList/modeFormList.vue
View file @
e3d01697
...
@@ -331,6 +331,7 @@
...
@@ -331,6 +331,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"../../../../api/api.js"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -374,7 +375,8 @@
...
@@ -374,7 +375,8 @@
"align_type"
:
"left"
//对齐方式,可选参数:【'left','middle','right'】=》【'左对齐', '居中对齐', '右对齐'】
"align_type"
:
"left"
//对齐方式,可选参数:【'left','middle','right'】=》【'左对齐', '居中对齐', '右对齐'】
},
},
isSelectState
:
false
,
//是否选择状态
isSelectState
:
false
,
//是否选择状态
selectItems
:
[]
//选中记录的recordId
selectItems
:
[],
//选中记录的recordId
auths
:
[
'1'
,
'2'
,
'3'
,
'4'
]
//操作权限对应增改查删
}
}
},
},
onLoad
:
function
(
option
)
{
onLoad
:
function
(
option
)
{
...
@@ -383,6 +385,8 @@
...
@@ -383,6 +385,8 @@
this
.
businessType
=
option
.
business_type
this
.
businessType
=
option
.
business_type
this
.
checkModuleId
=
option
.
check_module_id
this
.
checkModuleId
=
option
.
check_module_id
this
.
appId
=
option
.
check_tpl_id
this
.
appId
=
option
.
check_tpl_id
//真正的appId
var
appId1
=
option
.
appId
this
.
isModelEdit
=
option
.
is_edit
this
.
isModelEdit
=
option
.
is_edit
this
.
loadProject
()
this
.
loadProject
()
if
(
this
.
businessType
==
3
)
{
if
(
this
.
businessType
==
3
)
{
...
@@ -392,6 +396,7 @@
...
@@ -392,6 +396,7 @@
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
option
.
title
title
:
option
.
title
})
})
this
.
getOperateAuth
(
appId1
)
},
},
onShow
:
function
()
{
onShow
:
function
()
{
uni
.
$once
(
"refresh"
,
res
=>
{
uni
.
$once
(
"refresh"
,
res
=>
{
...
@@ -418,7 +423,33 @@
...
@@ -418,7 +423,33 @@
}
}
},
},
methods
:
{
methods
:
{
getOperateAuth
(
appId
)
{
Api
.
getAppOperateAuth
({
data
:
{
appId
:
appId
}
}).
then
((
result
)
=>
{
console
.
log
(
"按钮权限"
,
result
);
if
(
result
.
code
==
0
)
{
this
.
auths
=
result
.
data
}
})
},
onDelete
()
{
onDelete
()
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'4'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有删除权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
if
(
this
.
selectItems
.
length
==
0
)
{
if
(
this
.
selectItems
.
length
==
0
)
{
this
.
$toast
.
showToast
(
"请选择需删除的记录"
)
this
.
$toast
.
showToast
(
"请选择需删除的记录"
)
return
return
...
@@ -511,6 +542,20 @@
...
@@ -511,6 +542,20 @@
this
.
getFormList
()
this
.
getFormList
()
},
},
add
:
function
()
{
add
:
function
()
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'1'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有新增权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
if
(
this
.
businessType
==
4
)
{
if
(
this
.
businessType
==
4
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/addBusinessData/addBusinessData?check_tpl_id=
${
this
.
appId
}
&check_module_id=
${
this
.
checkModuleId
}
&bussness_type=
${
this
.
businessType
}
&project_id=
${
this
.
projectId
}
&title=
${
this
.
title
}
`
url
:
`/pages/gallery/app/addBusinessData/addBusinessData?check_tpl_id=
${
this
.
appId
}
&check_module_id=
${
this
.
checkModuleId
}
&bussness_type=
${
this
.
businessType
}
&project_id=
${
this
.
projectId
}
&title=
${
this
.
title
}
`
...
@@ -542,6 +587,20 @@
...
@@ -542,6 +587,20 @@
this
.
getFormList
()
this
.
getFormList
()
},
},
toEdit
:
function
(
type
,
index
)
{
toEdit
:
function
(
type
,
index
)
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'2'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有编辑权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
let
form
=
{}
let
form
=
{}
if
(
type
==
"left"
)
{
if
(
type
==
"left"
)
{
form
=
this
.
leftList
[
index
]
form
=
this
.
leftList
[
index
]
...
@@ -561,6 +620,20 @@
...
@@ -561,6 +620,20 @@
}
}
},
},
toEditDetail
:
function
(
type
,
index
)
{
toEditDetail
:
function
(
type
,
index
)
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'3'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有编辑权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
let
form
=
{}
let
form
=
{}
if
(
type
==
"left"
)
{
if
(
type
==
"left"
)
{
form
=
this
.
leftList
[
index
]
form
=
this
.
leftList
[
index
]
...
@@ -574,6 +647,20 @@
...
@@ -574,6 +647,20 @@
})
})
},
},
toDelete
:
function
(
type
,
index
)
{
toDelete
:
function
(
type
,
index
)
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'4'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有删除权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'确定删除该内容?'
,
content
:
'确定删除该内容?'
,
...
@@ -613,6 +700,20 @@
...
@@ -613,6 +700,20 @@
})
})
},
},
toDetail
:
function
(
type
,
index
)
{
toDetail
:
function
(
type
,
index
)
{
var
isAuth
=
this
.
auths
.
find
(
item
=>
item
==
'3'
)
if
(
!
isAuth
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您没有查看权限,如需要请联系管理人员'
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
success
:
res
=>
{
}
})
return
}
let
form
=
{}
let
form
=
{}
if
(
type
==
"left"
)
{
if
(
type
==
"left"
)
{
form
=
this
.
leftList
[
index
]
form
=
this
.
leftList
[
index
]
...
...
pages/gallery/app/modeList/modeList.vue
View file @
e3d01697
...
@@ -15,11 +15,13 @@
...
@@ -15,11 +15,13 @@
return
{
return
{
appId
:
""
,
appId
:
""
,
models
:
[],
models
:
[],
appInfo
:
{}
appInfo
:
{},
appId1
:
""
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
appId
=
option
.
check_tpl_id
this
.
appId
=
option
.
check_tpl_id
this
.
appId1
=
option
.
appId
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
option
.
title
title
:
option
.
title
})
})
...
@@ -43,7 +45,7 @@
...
@@ -43,7 +45,7 @@
},
},
itemClick
(
index
)
{
itemClick
(
index
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/modeFormList/modeFormList?business_type=
${
this
.
appInfo
.
business_type
}
&check_tpl_id=
${
this
.
appId
}
&check_module_id=
${
this
.
models
[
index
].
check_module_id
}
&title=
${
this
.
models
[
index
].
module_name
}
&is_edit=
${
this
.
models
[
index
].
is_edit
}
&showCfg=
${
JSON
.
stringify
(
this
.
models
[
index
].
show_cfg
)}
`
url
:
`/pages/gallery/app/modeFormList/modeFormList?business_type=
${
this
.
appInfo
.
business_type
}
&check_tpl_id=
${
this
.
appId
}
&check_module_id=
${
this
.
models
[
index
].
check_module_id
}
&title=
${
this
.
models
[
index
].
module_name
}
&is_edit=
${
this
.
models
[
index
].
is_edit
}
&showCfg=
${
JSON
.
stringify
(
this
.
models
[
index
].
show_cfg
)}
&appId=
${
this
.
appId1
}
`
})
})
}
}
}
}
...
...
pages/gallery/app/originalIndex/originalIndex.vue
View file @
e3d01697
...
@@ -45,12 +45,14 @@
...
@@ -45,12 +45,14 @@
},
},
menu
:
[],
menu
:
[],
appId
:
""
,
appId
:
""
,
projectName
:
""
projectName
:
""
,
appId1
:
""
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
appId
=
option
.
check_tpl_id
this
.
appId
=
option
.
check_tpl_id
this
.
title
=
option
.
title
this
.
title
=
option
.
title
this
.
appId1
=
option
.
appId
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
this
.
title
title
:
this
.
title
})
})
...
@@ -78,26 +80,6 @@
...
@@ -78,26 +80,6 @@
}
else
{
}
else
{
this
.
projectSelect
=
this
.
projectList
[
0
]
this
.
projectSelect
=
this
.
projectList
[
0
]
}
}
// 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 {
// let project = this.projectList.find(item => item.project_id == curId)
// if (project) {
// this.projectSelect = uni.getStorageSync("project_name")
// } else {
// this.projectSelect = this.projectList[0].project_name
// }
// }
// }
}
else
{
}
else
{
if
(
result
.
code
===
-
1
)
{
if
(
result
.
code
===
-
1
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -155,7 +137,7 @@
...
@@ -155,7 +137,7 @@
}
=
e
.
detail
}
=
e
.
detail
let
item
=
this
.
list
[
index
]
let
item
=
this
.
list
[
index
]
uni
.
navigateTo
({
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
}
&project_id=
${
this
.
projectSelect
.
project_id
}
`
,
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
}
&project_id=
${
this
.
projectSelect
.
project_id
}
&appId=
${
this
.
appId1
}
`
,
})
})
},
},
itemSelect
(
e
)
{
itemSelect
(
e
)
{
...
...
pages/gallery/gallery.vue
View file @
e3d01697
...
@@ -208,14 +208,14 @@
...
@@ -208,14 +208,14 @@
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
if
(
!
result
.
data
.
business_type
)
{
if
(
!
result
.
data
.
business_type
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/originalIndex/originalIndex?check_tpl_id=
${
model
.
source_id
}
&title=
${
result
.
data
.
tpl_name
}
`
url
:
`/pages/gallery/app/originalIndex/originalIndex?check_tpl_id=
${
model
.
source_id
}
&title=
${
result
.
data
.
tpl_name
}
&appId=
${
model
.
app_id
}
`
})
})
}
else
if
(
result
.
data
.
business_type
==
2
)
{
//独立模式 需要获取模块数量 如果只有一个模块 自动跳转表单页面 "体验嘛 呵呵"
}
else
if
(
result
.
data
.
business_type
==
2
)
{
//独立模式 需要获取模块数量 如果只有一个模块 自动跳转表单页面 "体验嘛 呵呵"
this
.
toAlone
(
model
,
result
.
data
)
this
.
toAlone
(
model
,
result
.
data
)
}
else
if
(
result
.
data
.
business_type
==
3
||
result
.
data
.
business_type
==
4
)
{
//流程模式
}
else
if
(
result
.
data
.
business_type
==
3
||
result
.
data
.
business_type
==
4
)
{
//流程模式
this
.
models
=
result
.
data
.
tpl_config
this
.
models
=
result
.
data
.
tpl_config
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/modeFormList/modeFormList?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
)}
`
url
:
`/pages/gallery/app/modeFormList/modeFormList?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
)}
&appId=
${
model
.
app_id
}
`
})
})
}
else
if
(
result
.
data
.
business_type
==
5
)
{
}
else
if
(
result
.
data
.
business_type
==
5
)
{
var
source
=
"1"
var
source
=
"1"
...
@@ -295,11 +295,11 @@
...
@@ -295,11 +295,11 @@
if
(
this
.
models
.
length
==
1
)
{
if
(
this
.
models
.
length
==
1
)
{
let
is_model_edit
=
this
.
models
[
0
].
is_edit
let
is_model_edit
=
this
.
models
[
0
].
is_edit
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/modeFormList/modeFormList?business_type=2&check_tpl_id=
${
model
.
source_id
}
&check_module_id=
${
this
.
models
[
0
].
check_module_id
}
&title=
${
this
.
models
[
0
].
module_name
}
&is_edit=
${
is_model_edit
}
&showCfg=
${
JSON
.
stringify
(
this
.
models
[
0
].
show_cfg
)}
`
url
:
`/pages/gallery/app/modeFormList/modeFormList?business_type=2&check_tpl_id=
${
model
.
source_id
}
&check_module_id=
${
this
.
models
[
0
].
check_module_id
}
&title=
${
this
.
models
[
0
].
module_name
}
&is_edit=
${
is_model_edit
}
&showCfg=
${
JSON
.
stringify
(
this
.
models
[
0
].
show_cfg
)}
&appId=
${
model
.
app_id
}
`
})
})
}
else
{
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/modeList/modeList?check_tpl_id=
${
model
.
source_id
}
&title=
${
info
.
tpl_name
}
`
url
:
`/pages/gallery/app/modeList/modeList?check_tpl_id=
${
model
.
source_id
}
&title=
${
info
.
tpl_name
}
&appId=
${
model
.
app_id
}
`
})
})
}
}
},
},
...
...
pages/index/index.vue
View file @
e3d01697
...
@@ -286,8 +286,8 @@
...
@@ -286,8 +286,8 @@
uni
.
setStorageSync
(
"project_id"
,
this
.
project
.
project_id
)
uni
.
setStorageSync
(
"project_id"
,
this
.
project
.
project_id
)
}
}
}
}
this
.
initData
()
}
}
this
.
initData
()
},
(
err
)
=>
{
},
(
err
)
=>
{
this
.
$toast
.
showToast
(
err
.
msg
)
this
.
$toast
.
showToast
(
err
.
msg
)
})
})
...
@@ -431,7 +431,7 @@
...
@@ -431,7 +431,7 @@
Api
.
getNews
({
Api
.
getNews
({
data
:
{
data
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
2
0
,
pageSize
:
1
0
,
clientId
:
2
,
clientId
:
2
,
projectId
:
this
.
project_id
,
projectId
:
this
.
project_id
,
}
}
...
@@ -445,6 +445,63 @@
...
@@ -445,6 +445,63 @@
this
.
$toast
.
showToast
(
err
.
msg
)
this
.
$toast
.
showToast
(
err
.
msg
)
})
})
},
},
getCompanyNews
()
{
Api
.
getNews
({
data
:
{
pageNum
:
1
,
pageSize
:
10
,
clientId
:
2
,
orgId
:
uni
.
getStorageSync
(
"org_id"
)
}
}).
then
((
result
)
=>
{
if
(
result
.
code
==
0
)
{
this
.
news
=
result
.
data
.
list
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
},
(
err
)
=>
{
this
.
$toast
.
showToast
(
err
.
msg
)
})
},
getCompanyBanners
()
{
Api
.
getNews
({
data
:
{
pageNum
:
1
,
pageSize
:
5
,
clientId
:
1
,
orgId
:
uni
.
getStorageSync
(
"org_id"
)
}
}).
then
((
result
)
=>
{
if
(
result
.
code
==
0
)
{
this
.
banners
=
[]
if
(
result
.
data
.
list
.
length
>
0
)
{
result
.
data
.
list
.
forEach
((
item
)
=>
{
if
(
!
item
.
coverImg
||
item
.
coverImg
==
'null'
)
{
item
.
coverImg
=
"../../static/banner-content.png"
}
this
.
banners
.
push
(
item
)
})
console
.
log
(
"banner"
,
this
.
banners
);
}
else
{
if
(
this
.
role
==
'VISITOR'
)
{
this
.
banners
.
push
({
"coverImg"
:
"../../static/banner-authority.png"
})
}
else
{
this
.
banners
.
push
({
"coverImg"
:
"../../static/banner-content.png"
})
}
}
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
},
(
err
)
=>
{
this
.
$toast
.
showToast
(
err
.
msg
)
})
},
//获取常用应用
//获取常用应用
getCommonApp
()
{
getCommonApp
()
{
Api
.
getNormalApp
().
then
((
result
)
=>
{
Api
.
getNormalApp
().
then
((
result
)
=>
{
...
@@ -644,8 +701,14 @@
...
@@ -644,8 +701,14 @@
this
.
city
=
currentProject
.
city
||
'杭州市'
this
.
city
=
currentProject
.
city
||
'杭州市'
this
.
address
=
currentProject
.
province
+
currentProject
.
city
+
currentProject
.
area
this
.
address
=
currentProject
.
province
+
currentProject
.
city
+
currentProject
.
area
}
}
this
.
project_id
=
uni
.
getStorageSync
(
"project_id"
)
if
(
!
this
.
project_id
)
{
this
.
getCompanyBanners
()
this
.
getCompanyNews
()
}
else
{
this
.
getNews
()
this
.
getNews
()
this
.
getBanners
()
this
.
getBanners
()
}
this
.
getWeather
()
this
.
getWeather
()
this
.
getAuthMenu
()
this
.
getAuthMenu
()
},
},
...
@@ -803,7 +866,7 @@
...
@@ -803,7 +866,7 @@
}
else
if
(
result
.
data
.
business_type
==
3
||
result
.
data
.
business_type
==
4
)
{
//流程模式
}
else
if
(
result
.
data
.
business_type
==
3
||
result
.
data
.
business_type
==
4
)
{
//流程模式
this
.
models
=
result
.
data
.
tpl_config
this
.
models
=
result
.
data
.
tpl_config
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/modeFormList/modeFormList?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
)}
`
url
:
`/pages/gallery/app/modeFormList/modeFormList?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
)}
&appId=
${
model
.
app_id
}
`
})
})
}
else
if
(
result
.
data
.
business_type
==
5
)
{
}
else
if
(
result
.
data
.
business_type
==
5
)
{
var
source
=
"1"
var
source
=
"1"
...
@@ -877,11 +940,11 @@
...
@@ -877,11 +940,11 @@
if
(
this
.
models
.
length
==
1
)
{
if
(
this
.
models
.
length
==
1
)
{
let
is_model_edit
=
this
.
models
[
0
].
is_edit
let
is_model_edit
=
this
.
models
[
0
].
is_edit
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/modeFormList/modeFormList?business_type=2&check_tpl_id=
${
model
.
source_id
}
&check_module_id=
${
this
.
models
[
0
].
check_module_id
}
&title=
${
this
.
models
[
0
].
module_name
}
&is_edit=
${
is_model_edit
}
&showCfg=
${
JSON
.
stringify
(
this
.
models
[
0
].
show_cfg
)}
`
url
:
`/pages/gallery/app/modeFormList/modeFormList?business_type=2&check_tpl_id=
${
model
.
source_id
}
&check_module_id=
${
this
.
models
[
0
].
check_module_id
}
&title=
${
this
.
models
[
0
].
module_name
}
&is_edit=
${
is_model_edit
}
&showCfg=
${
JSON
.
stringify
(
this
.
models
[
0
].
show_cfg
)}
&appId=
${
model
.
app_id
}
`
})
})
}
else
{
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/gallery/app/modeList/modeList?check_tpl_id=
${
model
.
source_id
}
&title=
${
info
.
tpl_name
}
`
url
:
`/pages/gallery/app/modeList/modeList?check_tpl_id=
${
model
.
source_id
}
&title=
${
info
.
tpl_name
}
&appId=
${
model
.
app_id
}
`
})
})
}
}
},
},
...
...
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment