hookehuyr

新增驳回分支节点操作测试

<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-22 14:20:37
* @LastEditTime: 2024-07-22 15:07:51
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
......@@ -130,6 +130,14 @@
</div>
</div>
</van-overlay>
<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-group>
</div>
</van-dialog>
</template>
<script setup>
......@@ -268,12 +276,20 @@ const onClickFloatingBubble = () => {
}
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 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;
// }
myForm.value.submit();
}
// switch (item.id) {
......@@ -303,6 +319,16 @@ const onApprovalCancel = () => {
// console.warn(approval_note.value);
// }
const onConfirmDialog = () => { // 提交驳回节点操作
// TODO: 提交驳回节点操作,需要驳回的节点需要传递到后台数据中
// myForm.value.submit();
console.warn('onConfirmDialog', checked_reject.value);
}
const onCancelDialog = () => { // 取消驳回节点操作
checked_reject.value = [];
console.warn('onCancelDialog');
}
// TODO: 等待调试发送短信接口
const bind_tel_show = ref(false);
const bindForm = ref(null);
......