提交 42364432 authored 作者: liuluyu's avatar liuluyu

优化代码格式

上级 87ceb7a8
...@@ -521,8 +521,6 @@ ...@@ -521,8 +521,6 @@
{ {
label: '待办', label: '待办',
ifShow: () => { ifShow: () => {
console.log("-------------record['uid'] ", record['uid']);
console.log('-------------userStore.getUserInfo.id ', userStore.getUserInfo.id);
if (record['bpmStatus'] == '2' && record['uid'] == userStore.getUserInfo.id) return true; if (record['bpmStatus'] == '2' && record['uid'] == userStore.getUserInfo.id) return true;
else return false; else return false;
}, },
......
...@@ -130,9 +130,7 @@ ...@@ -130,9 +130,7 @@
watch( watch(
() => formData, () => formData,
(newVal) => { (newVal) => {},
console.log('[v0] formData 响应式更新触发:', JSON.stringify(newVal));
},
{ deep: true, immediate: true } { deep: true, immediate: true }
); );
...@@ -152,7 +150,6 @@ ...@@ -152,7 +150,6 @@
try { try {
// 检查是否已正在加载,避免重复请求 // 检查是否已正在加载,避免重复请求
if (loading.value && planId.value === (id || route.query.id)) { if (loading.value && planId.value === (id || route.query.id)) {
console.log('[v0] 表单已在加载中,跳过重复初始化');
return; return;
} }
...@@ -167,8 +164,6 @@ ...@@ -167,8 +164,6 @@
return; return;
} }
console.log('[v0] 开始初始化表单,ID:', targetId);
planId.value = targetId; planId.value = targetId;
planFormStore.setLastLoadedId(targetId); planFormStore.setLastLoadedId(targetId);
...@@ -197,7 +192,7 @@ ...@@ -197,7 +192,7 @@
await nextTick(); await nextTick();
planFormStore.updateFormDataCache(newFormData); planFormStore.updateFormDataCache(newFormData);
isInitialized.value = true; isInitialized.value = true;
console.log('[v0] 表单初始化成功,数据:', formData);
// Object.assign(formData, newFormData); // Object.assign(formData, newFormData);
// planFormStore.updateFormDataCache(newFormData); // planFormStore.updateFormDataCache(newFormData);
// isInitialized.value = true; // isInitialized.value = true;
...@@ -292,10 +287,9 @@ ...@@ -292,10 +287,9 @@
if (response) { if (response) {
// message.success('保存成功'); // message.success('保存成功');
console.log('保存成功:');
// 更新缓存 // 更新缓存
planFormStore.updateFormDataCache(formData); planFormStore.updateFormDataCache(formData);
console.log(response);
} }
} catch (error: any) { } catch (error: any) {
console.error('保存失败:', error); console.error('保存失败:', error);
...@@ -322,8 +316,6 @@ ...@@ -322,8 +316,6 @@
const idFromUrl = urlParams.get('id'); const idFromUrl = urlParams.get('id');
const targetId = idFromUrl || (route.query.id as string); const targetId = idFromUrl || (route.query.id as string);
console.log('[v0] StPlanExcuteForm mounted - idFromUrl:', idFromUrl, 'routeId:', route.query.id, 'finalId:', targetId);
// 如果从 URL 获取到 ID,直接初始化 // 如果从 URL 获取到 ID,直接初始化
if (idFromUrl) { if (idFromUrl) {
initFormData(idFromUrl); initFormData(idFromUrl);
...@@ -341,7 +333,6 @@ ...@@ -341,7 +333,6 @@
} }
planFormStore.registerSubmitCallback(submitForm); planFormStore.registerSubmitCallback(submitForm);
console.log('[StPlanExcuteForm] 已向 store 注册表单保存回调');
}); });
// 监听路由参数变化 // 监听路由参数变化
......
...@@ -137,7 +137,6 @@ ...@@ -137,7 +137,6 @@
const winurl = window.location.href; const winurl = window.location.href;
const params = new URLSearchParams(winurl.split('?')[1]); const params = new URLSearchParams(winurl.split('?')[1]);
console.log('winurl:', winurl);
return { return {
cctoken: params.get('Token') || '', cctoken: params.get('Token') || '',
WorkID: params.get('WorkID') || '', WorkID: params.get('WorkID') || '',
...@@ -152,7 +151,6 @@ ...@@ -152,7 +151,6 @@
const timestamp = new Date().getTime(); const timestamp = new Date().getTime();
let tid = toRaw(route.query).id; let tid = toRaw(route.query).id;
console.log('tid:', tid);
const queryByIdUrl = '/plan.main/stPlanMan/queryById'; const queryByIdUrl = '/plan.main/stPlanMan/queryById';
const data = await defHttp.get({ const data = await defHttp.get({
......
...@@ -347,7 +347,7 @@ ...@@ -347,7 +347,7 @@
resetForm(); resetForm();
closeModal(); closeModal();
} catch (e) { } catch (e) {
console.log(e);
} finally { } finally {
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论