Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
96344528
Commit
96344528
authored
Dec 06, 2024
by
冷玲鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务流:批量下线、复制到(加)
parent
2872f9ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
23 deletions
+109
-23
checkModal.vue
src/views/taskScheduling/taskFlow/checkModal.vue
+38
-0
index.vue
src/views/taskScheduling/taskFlow/index.vue
+37
-20
mock.ts
src/views/taskScheduling/taskFlow/mock.ts
+17
-0
taskFlow.data.ts
src/views/taskScheduling/taskFlow/taskFlow.data.ts
+13
-0
index.vue
src/views/taskScheduling/taskFlowDesign/index.vue
+4
-3
No files found.
src/views/taskScheduling/taskFlow/checkModal.vue
0 → 100644
View file @
96344528
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicTable
@
register=
"registerTable"
ref=
"selectTable"
>
</BasicTable>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicTable
,
useTable
}
from
"@/components/Table"
;
import
{
checkColumn
}
from
"@/views/taskScheduling/taskFlow/taskFlow.data"
;
import
{
TableData
}
from
"./mock"
;
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
,
okText
:
'忽略并继续执行'
,
});
});
const
[
registerTable
]
=
useTable
({
dataSource
:
TableData
,
columns
:
checkColumn
,
pagination
:
false
,
showIndexColumn
:
false
,
scroll
:
{
y
:
300
},
showSummary
:
true
,
});
const
getTitle
=
'检查'
;
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
();
}
</
script
>
src/views/taskScheduling/taskFlow/index.vue
View file @
96344528
...
...
@@ -15,8 +15,9 @@
</a-button>
</div>
<div>
<a-button
style=
"border-color:transparent "
>
<Icon
icon=
"ant-design:cloud-download-outlined"
style=
"color: blue"
size=
"24"
/>
<a-button
style=
"border-color:transparent "
@
click=
"batchOffline"
>
<Icon
icon=
"ant-design:cloud-download-outlined"
style=
"color: blue"
size=
"24"
/>
<p>
下线
</p>
</a-button>
</div>
...
...
@@ -105,7 +106,7 @@
{
icon:'ant-design:cloud-download-outlined',
tooltip:'下线',
onClick: handleO
n
line.bind(null, record),
onClick: handleO
ff
line.bind(null, record),
ifShow: () => {
return record.releaseStatus !== ''; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
},
...
...
@@ -113,15 +114,15 @@
{
icon:'ant-design:send-outlined',
tooltip:'发布',
onClick:
apiDetail
.bind(null, record),
onClick:
flowPublish
.bind(null, record),
ifShow: () => {
return record.releaseStatus !== ''; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
},
},
{
icon:'ant-design:android-outlined',
tooltip:'检查
?
',
onClick:
handleOffline
.bind(null, record),
tooltip:'检查',
onClick:
check
.bind(null, record),
ifShow: () => {
return record.releaseStatus !== ''; // 这里只是实现树文件夹按钮
},
...
...
@@ -131,7 +132,7 @@
{
icon:'ant-design:reconciliation-outlined',
label: '复制',
onClick:
apiDetail
.bind(null, record),
onClick:
handleCopy
.bind(null, record),
},
{
icon:'ant-design:delete-outlined',
...
...
@@ -159,6 +160,8 @@
</BasicTable>
</div>
</template>
<CopyModal
@
register=
"copyModal"
/>
<CheckModal
@
register=
"checkModal"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
...
...
@@ -168,13 +171,14 @@ import {PageWrapper} from '@/components/Page';
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
columns
,
searchFormSchema
}
from
'./taskFlow.data'
;
import
{
tableList
}
from
"./mock"
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
router
}
from
'@/router'
;
import
Icon
from
"@/components/Icon/Icon.vue"
;
import
BasicForm
from
"@/components/Form/src/BasicForm.vue"
;
import
ModelTree
from
"@/views/taskScheduling/taskFlowDesign/ModelTree.vue"
;
import
{
designData
}
from
"@/views/taskScheduling/taskFlowDesign/designData"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
CopyModal
from
"@/views/taskScheduling/taskFlowDesign/copyModal.vue"
;
import
CheckModal
from
"@/views/taskScheduling/taskFlow/CheckModal.vue"
;
defineOptions
({
name
:
'safetyLevelManage'
});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
...
...
@@ -182,6 +186,8 @@ const route = useRoute();
let
modelLevel
=
ref
(
1
);
const
tableData
=
ref
([]);
const
searchInfo
=
reactive
<
Recordable
>
({});
const
[
copyModal
,
{
openModal
:
openCopyModal
}]
=
useModal
();
const
[
checkModal
,
{
openModal
:
openCheckModal
}]
=
useModal
();
const
[
registerTable
,
{
getRowSelection
,
setTableData
}]
=
useTable
({
/* title: '任务流',*/
api
:
async
(
params
)
=>
{
...
...
@@ -304,25 +310,36 @@ function RUN(record) {
function
apiDetail
()
{
}
function
flowPublish
(
record
)
{
record
.
releaseStatus
=
'已发布'
;
}
/**下线按钮*/
function
handleOffline
(
record
)
{
// 修改 record 对象的 flag 值为 "未上线"
record
.
flag
=
'未上线'
;
record
.
releaseStatus
=
'未发布'
;
}
/**上线按钮*/
function
handleOnline
()
{
/**批量下线按钮*/
function
batchOffline
(
record
)
{
openCheckModal
(
true
,
{
isUpdate
:
false
,
});
record
.
releaseStatus
=
'未发布'
;
}
/**检查按钮*/
function
check
(
record
)
{
openCheckModal
(
true
,
{
isUpdate
:
false
,
});
}
/**复制按钮*/
function
handleCopy
(
record
)
{
openCopyModal
(
true
,
{
isUpdate
:
false
,
});
}
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
console
.
log
(
'11111111111'
,
rowSelection
);
createMessage
.
success
(
'删除成功!'
);
reload
();
}
...
...
src/views/taskScheduling/taskFlow/mock.ts
View file @
96344528
...
...
@@ -241,3 +241,20 @@ export const tableList: any[] = [
themeId
:
'1-2-5'
,
},
];
export
const
TableData
:
any
[]
=
[
{
businessId
:
1
,
taskFlowName
:
'2_7'
,
checkInfo
:
'任务流[id=31232894hufhsdbfsfio]'
,
},
{
businessId
:
2
,
taskFlowName
:
'2_7'
,
checkInfo
:
'任务流[id=31232894hufhsdbfsfio]'
,
},
{
businessId
:
3
,
taskFlowName
:
'2_7'
,
checkInfo
:
'任务流[id=31232894hufhsdbfsfio]'
,
},
];
src/views/taskScheduling/taskFlow/taskFlow.data.ts
View file @
96344528
...
...
@@ -41,6 +41,19 @@ export const columns: BasicColumn[] = [
width
:
120
,
},
];
/** 检查列表字段*/
export
const
checkColumn
:
BasicColumn
[]
=
[
{
title
:
'任务流名称'
,
dataIndex
:
'taskFlowName'
,
width
:
120
,
},
{
title
:
'检查信息'
,
dataIndex
:
'checkInfo'
,
width
:
220
,
},
];
/** 列表筛选项*/
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
...
...
src/views/taskScheduling/taskFlowDesign/index.vue
View file @
96344528
...
...
@@ -165,9 +165,10 @@
</
template
>
</BasicTable>
<div
v-if=
"showType === 'chart'"
class=
"w-3/4"
style=
"height: 1000px; margin-left: 30px"
>
<!-- <img src="/src/assets/images/taskFlushChart.jpg" style="width: 100%" alt="" />-->
<!-- <FlowChart :data="demoData" :flowOptions="flowOptions" :patternItems="patternItems" v-if="showType === 'chart'"/>-->
<FlowChart
:data=
"demoData"
:patternItems=
"patternItems"
v-if=
"showType === 'chart'"
/>
<img
src=
"/src/assets/images/taskFlushChart.jpg"
style=
"width: 100%"
alt=
""
/>
<!-- <FlowChart :data="demoData" :flowOptions="flowOptions" :patternItems="patternItems"
v-if="showType === 'chart'"/>-->
<!-- <FlowChart :data="demoData" :patternItems="patternItems" v-if="showType === 'chart'" />-->
</div>
</div>
</template>
...
...
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