hookehuyr

fix flow_node_code 获取方式修改

1 <!-- 1 <!--
2 * @Date: 2022-07-18 10:22:22 2 * @Date: 2022-07-18 10:22:22
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-07-15 18:26:54 4 + * @LastEditTime: 2024-07-16 15:29:29
5 * @FilePath: /data-table/src/views/index.vue 5 * @FilePath: /data-table/src/views/index.vue
6 * @Description: 首页 6 * @Description: 首页
7 --> 7 -->
...@@ -332,12 +332,14 @@ const onBindSubmit = (values) => { ...@@ -332,12 +332,14 @@ const onBindSubmit = (values) => {
332 }) 332 })
333 }; 333 };
334 334
335 +const flow_node_code = getUrlParams(location.href) ? getUrlParams(location.href).flow_node_code : formSetting.value.flow_node_code; // flow_node_code 表示随机选择的流程节点的ID
336 +
335 onMounted(async () => { 337 onMounted(async () => {
336 // TAG: 全局背景色 338 // TAG: 全局背景色
337 document 339 document
338 .querySelector("body") 340 .querySelector("body")
339 .setAttribute("style", `background-color: ${styleColor.backgroundColor}`); 341 .setAttribute("style", `background-color: ${styleColor.backgroundColor}`);
340 - const { data } = await queryFormAPI({ form_code: $route.query.code, page_type, data_id, flow_node_code: formSetting.value.flow_node_code }); // flow_node_code 表示随机选择的流程节点的ID 342 + const { data } = await queryFormAPI({ form_code: $route.query.code, page_type, data_id, flow_node_code }); // flow_node_code 表示随机选择的流程节点的ID
341 const form_data = data; 343 const form_data = data;
342 // 缓存表单信息 344 // 缓存表单信息
343 store.changeFormInfo(data); 345 store.changeFormInfo(data);
...@@ -682,7 +684,6 @@ onMounted(async () => { ...@@ -682,7 +684,6 @@ onMounted(async () => {
682 setTimeout(() => { 684 setTimeout(() => {
683 // 审核操作列表数据 685 // 审核操作列表数据
684 approval_actions.value = formSetting.value.flow_node_action_list?.map((item) => { return { name: item.btnText, id: item.id } }); 686 approval_actions.value = formSetting.value.flow_node_action_list?.map((item) => { return { name: item.btnText, id: item.id } });
685 - console.log("🚀 ~ file: index.vue:683 ~ setTimeout ~ formSetting.value:", formSetting.value);
686 }, 1000); 687 }, 1000);
687 }); 688 });
688 689
...@@ -1054,7 +1055,7 @@ const onSubmit = async (values) => { ...@@ -1054,7 +1055,7 @@ const onSubmit = async (values) => {
1054 form_code: $route.query.code, 1055 form_code: $route.query.code,
1055 data: postData.value, 1056 data: postData.value,
1056 data_id, 1057 data_id,
1057 - flow_node_code: formSetting.value.flow_node_code, 1058 + flow_node_code,
1058 flow_node_action_id: flow_node_action_id.value, 1059 flow_node_action_id: flow_node_action_id.value,
1059 flow_content: approval_note.value 1060 flow_content: approval_note.value
1060 }); 1061 });
......