Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b293f157
authored
Oct 08, 2024
by
GoldenZqqqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: mock测试数据
parent
753a32ae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
210 additions
and
4 deletions
+210
-4
src/views/bpm/model/index.vue
+8
-4
src/views/bpm/model/mock.js
+202
-0
No files found.
src/views/bpm/model/index.vue
View file @
b293f157
...
@@ -42,11 +42,14 @@
...
@@ -42,11 +42,14 @@
<!-- 分类卡片组 -->
<!-- 分类卡片组 -->
<div
class=
"px-30px"
>
<div
class=
"px-30px"
>
<ContentWrap
v-for=
"(list, title) in categoryGroup"
:key=
"title"
>
<ContentWrap
v-for=
"(list, title) in categoryGroup"
:key=
"title"
>
<h3
class=
"ml-20px"
>
{{ title }}
</h3>
<div
class=
"flex items-center mb-20px"
>
<h3
class=
"ml-20px mr-8px"
>
{{ title }}
</h3>
<div
class=
"text-[var(--el-text-color-placeholder)]"
>
({{ list?.length || 0 }})
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"流程名"
align=
"center"
prop=
"name"
min-width=
"200"
>
<el-table-column
label=
"流程名"
align=
"center"
prop=
"name"
min-width=
"200"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<div
class=
"flex items-center
justify-center
"
>
<div
class=
"flex items-center"
>
<el-image
:src=
"scope.row.icon"
class=
"h-32px w-32px mr-10px rounded"
/>
<el-image
:src=
"scope.row.icon"
class=
"h-32px w-32px mr-10px rounded"
/>
{{
scope
.
row
.
name
}}
{{
scope
.
row
.
name
}}
</div>
</div>
...
@@ -206,6 +209,7 @@ import { BpmModelType } from '@/utils/constants'
...
@@ -206,6 +209,7 @@ import { BpmModelType } from '@/utils/constants'
import
{
checkPermi
}
from
'@/utils/permission'
import
{
checkPermi
}
from
'@/utils/permission'
import
{
useUserStoreWithOut
}
from
'@/store/modules/user'
import
{
useUserStoreWithOut
}
from
'@/store/modules/user'
import
{
groupBy
}
from
'lodash-es'
import
{
groupBy
}
from
'lodash-es'
import
{
mockData
}
from
'./mock'
defineOptions
({
name
:
'BpmModel'
})
defineOptions
({
name
:
'BpmModel'
})
...
@@ -213,7 +217,6 @@ const message = useMessage() // 消息弹窗
...
@@ -213,7 +217,6 @@ const message = useMessage() // 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
const
{
t
}
=
useI18n
()
// 国际化
const
{
push
}
=
useRouter
()
// 路由
const
{
push
}
=
useRouter
()
// 路由
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
...
@@ -224,7 +227,7 @@ const queryParams = reactive({
...
@@ -224,7 +227,7 @@ const queryParams = reactive({
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
const
categoryList
=
ref
([])
// 流程分类列表
const
categoryList
=
ref
([])
// 流程分类列表
const
categoryGroup
=
ref
({})
// 按照category分组的数据
const
categoryGroup
=
ref
<
any
>
({})
// 按照category分组的数据
/** 查询列表 */
/** 查询列表 */
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
...
@@ -232,6 +235,7 @@ const getList = async () => {
...
@@ -232,6 +235,7 @@ const getList = async () => {
try
{
try
{
// TODO 芋艿:这里需要一个不分页查全部的流程模型接口
// TODO 芋艿:这里需要一个不分页查全部的流程模型接口
const
data
=
await
ModelApi
.
getModelPage
(
queryParams
)
const
data
=
await
ModelApi
.
getModelPage
(
queryParams
)
data
.
list
=
mockData
categoryGroup
.
value
=
groupBy
(
data
.
list
,
'categoryName'
)
categoryGroup
.
value
=
groupBy
(
data
.
list
,
'categoryName'
)
}
finally
{
}
finally
{
loading
.
value
=
false
loading
.
value
=
false
...
...
src/views/bpm/model/mock.js
0 → 100644
View file @
b293f157
export
const
mockData
=
[
{
key
:
'out_apply'
,
name
:
'外出申请'
,
description
:
null
,
category
:
'1'
,
categoryName
:
'测试1'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/OA/goingOut/create'
,
formCustomViewPath
:
'/OA/goingOut/detail'
,
id
:
'ff8f8bab-4d4e-11ef-8201-0242ac130002'
,
formName
:
null
,
createTime
:
1722218716216
,
processDefinition
:
{
id
:
'out_apply:4:7f56d464-4eec-11ef-8c3a-0242ac130002'
,
version
:
4
,
deploymentTime
:
1722396312641
,
suspensionState
:
1
}
},
{
key
:
'contract_change_history'
,
name
:
'合同变更申请'
,
description
:
null
,
category
:
'2'
,
categoryName
:
'测试2'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/project/changeRecord/detail'
,
formCustomViewPath
:
'/project/changeRecord/detail'
,
id
:
'0c689067-3a92-11ef-b7f0-0242ac130002'
,
formName
:
null
,
createTime
:
1720158441959
,
processDefinition
:
{
id
:
'contract_change_history:1:f69fff4f-3a9a-11ef-b7f0-0242ac130002'
,
version
:
1
,
deploymentTime
:
1720162270788
,
suspensionState
:
1
}
},
{
key
:
'expenses_claim'
,
name
:
'费用报销申请'
,
description
:
null
,
category
:
'1'
,
categoryName
:
'测试1'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/finance/reimbursement/detail'
,
formCustomViewPath
:
'/finance/reimbursement/detail'
,
id
:
'0310ad0c-351e-11ef-a653-0242ac130002'
,
formName
:
null
,
createTime
:
1719558848849
,
processDefinition
:
{
id
:
'expenses_claim:5:a043a1d8-4eec-11ef-8c3a-0242ac130002'
,
version
:
5
,
deploymentTime
:
1722396367911
,
suspensionState
:
1
}
},
{
key
:
'out_business_apply'
,
name
:
'申请单'
,
description
:
null
,
category
:
'2'
,
categoryName
:
'测试2'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/finance/businessTripApply/detail'
,
formCustomViewPath
:
'/finance/businessTripApply/detail'
,
id
:
'279e27a4-3393-11ef-8401-0242ac130002'
,
formName
:
null
,
createTime
:
1719389258966
,
processDefinition
:
{
id
:
'out_business_apply:9:a7b2d4e2-430f-11ef-876f-0242ac130002'
,
version
:
9
,
deploymentTime
:
1721091998780
,
suspensionState
:
1
}
},
{
key
:
'pms_project_delay_application'
,
name
:
'项目延时申请'
,
description
:
null
,
category
:
'2'
,
categoryName
:
'测试2'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/project/workHourDelay/create'
,
formCustomViewPath
:
'/project/workHourDelay/detail'
,
id
:
'46d87275-27c7-11ef-b258-0242ac130002'
,
formName
:
null
,
createTime
:
1718092231234
,
processDefinition
:
{
id
:
'b7ed308a-430f-11ef-876f-0242ac130002'
,
version
:
5
,
deploymentTime
:
1721092026059
,
suspensionState
:
1
}
},
{
key
:
'pms_project_result_approval'
,
name
:
'项目成果审核'
,
description
:
null
,
category
:
'2'
,
categoryName
:
'测试2'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/project/projectTaskResult/detail'
,
formCustomViewPath
:
'/project/projectTaskResult/detail'
,
id
:
'4a15d4f8-23cc-11ef-8dd0-0242ac130002'
,
formName
:
null
,
createTime
:
1717654579502
,
processDefinition
:
{
id
:
'dd3cc360-4eec-11ef-8c3a-0242ac130002'
,
version
:
6
,
deploymentTime
:
1722396470232
,
suspensionState
:
1
}
},
{
key
:
'pms_contract'
,
name
:
'合同管理'
,
description
:
null
,
category
:
'2'
,
categoryName
:
'测试2'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/sales/contract/create'
,
formCustomViewPath
:
'/sales/contract/detail'
,
id
:
'8317cb71-0d1a-11ef-8445-70b5e844a623'
,
formName
:
null
,
createTime
:
1715159299146
,
processDefinition
:
{
id
:
'pms_contract:5:c7d6012a-29f2-11ef-a08d-0242ac130002'
,
version
:
5
,
deploymentTime
:
1718330818270
,
suspensionState
:
1
}
},
{
key
:
'pms_consult_task_act'
,
name
:
'咨询任务书'
,
description
:
null
,
category
:
'1'
,
categoryName
:
'测试1'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/consultTask/create'
,
formCustomViewPath
:
'/consultTask/detail'
,
id
:
'47fad8e4-0b91-11ef-b841-70b5e844a623'
,
formName
:
null
,
createTime
:
1714990407756
,
processDefinition
:
{
id
:
'pms_consult_task_act:1:67c2ae59-0b91-11ef-b841-70b5e844a623'
,
version
:
1
,
deploymentTime
:
1714990460960
,
suspensionState
:
1
}
},
{
key
:
'pms_project'
,
name
:
'立项管理'
,
description
:
null
,
category
:
'1'
,
categoryName
:
'测试1'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/project/applyProject/create'
,
formCustomViewPath
:
'/project/applyProject/detail'
,
id
:
'f0ba6bde-0b90-11ef-b841-70b5e844a623'
,
formName
:
null
,
createTime
:
1714990261372
,
processDefinition
:
{
id
:
'pms_project:6:b9e4e33b-2c6c-11ef-8386-0242ac130002'
,
version
:
6
,
deploymentTime
:
1718603095738
,
suspensionState
:
1
}
},
{
key
:
'invoice_apply_manage'
,
name
:
'开票申请'
,
description
:
'asdas'
,
category
:
'1'
,
categoryName
:
'测试1'
,
formType
:
20
,
formId
:
null
,
formCustomCreatePath
:
'/sales/invoice/create'
,
formCustomViewPath
:
'/sales/invoice/detail'
,
id
:
'7ec07575-0605-11ef-ab76-cc96e508c010'
,
formName
:
null
,
createTime
:
1714380614292
,
processDefinition
:
{
id
:
'invoice_apply_manage:8:665a8c40-44c9-11ef-9813-0242ac130002'
,
version
:
8
,
deploymentTime
:
1721281726671
,
suspensionState
:
1
}
}
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment