Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-07-22 17:32:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4158e27bf11f0fa0b3d31ed5022b008b18ca4985
4158e27b
1 parent
0b28ac92
驳回操作需要有分支选择功能
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
src/views/index.vue
src/views/index.vue
View file @
4158e27
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-22 1
6:44:27
* @LastEditTime: 2024-07-22 1
7:30:54
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -151,7 +151,7 @@
<van-dialog v-model:show="show_reject" title="选择驳回节点" show-cancel-button :confirm-button-color="themeVars.buttonPrimaryBackground" @confirm="onConfirmDialog" @cancel="onCancelDialog">
<div style="padding: 1rem 0;">
<van-checkbox-group v-model="checked_reject" shape="square" :checked-color="themeVars.buttonPrimaryBackground">
<van-checkbox v-for="(node, index) in reject_nodes" :key="index" :name="node.
id
" style="margin: 0 0 8px 20px;">{{ node.name }}</van-checkbox>
<van-checkbox v-for="(node, index) in reject_nodes" :key="index" :name="node.
code
" style="margin: 0 0 8px 20px;">{{ node.name }}</van-checkbox>
</van-checkbox-group>
</div>
</van-dialog>
...
...
@@ -295,18 +295,19 @@ const myForm = ref(null);
const approval_actions = ref([]);
const show_reject = ref(false);
const checked_reject = ref([]);
const reject_nodes = ref([
{ id: '123', name: 'node1' }, { id: '456', name: 'node2' }]); // TODO: 待完善,节点数据需要后台获取
const reject_nodes = ref([
]);
const onApprovalSelect = (item) => {
flow_node_action_id.value = item.id;
if (page_type === 'add') { // 新增页面统一处理为提交
myForm.value.submit();
}
if (page_type === 'flow') {
// TODO:待完善,驳回选择分支操作
// if (item.id === 'reject') { // 点击驳回按钮
// show_reject.value = true;
// return;
// }
// 驳回选择分支操作
if (item.id === 'reject' && item?.parent_nodes?.length) { // 点击驳回按钮
show_reject.value = true;
reject_nodes.value = item.parent_nodes; // 驳回操作对应的上级节点
return;
}
myForm.value.submit();
}
// switch (item.id) {
...
...
@@ -337,13 +338,11 @@ const onApprovalCancel = () => {
// }
const onConfirmDialog = () => { // 提交驳回节点操作
// TODO: 提交驳回节点操作,需要驳回的节点需要传递到后台数据中
// myForm.value.submit();
console.warn('onConfirmDialog', checked_reject.value);
// 提交驳回节点操作,需要驳回的节点需要传递到后台数据中
myForm.value.submit();
}
const onCancelDialog = () => { // 取消驳回节点操作
checked_reject.value = [];
console.warn('onCancelDialog');
}
// TODO: 等待调试发送短信接口
...
...
@@ -376,7 +375,6 @@ const onBindSubmit = (values) => {
})
};
// const flow_node_code = getUrlParams(location.href) ? getUrlParams(location.href).flow_node_code : formSetting.value.flow_node_code; // flow_node_code 表示随机选择的流程节点的ID
const flow_node_code = $route.query.flow_node_code ? $route.query.flow_node_code :formSetting.value.flow_node_code; // flow_node_code 表示随机选择的流程节点的ID
onMounted(async () => {
...
...
@@ -1115,7 +1113,8 @@ const onSubmit = async (values) => {
data_id,
flow_node_code,
flow_node_action_id: flow_node_action_id.value,
flow_content: approval_note.value
flow_content: approval_note.value,
flow_reject_to_node_codes: checked_reject.value.length ? checked_reject.value.join(',') : '',
});
if (result.code) {
// 提交按钮禁用状态
...
...
Please
register
or
login
to post a comment