提交1
This commit is contained in:
parent
50de9f5794
commit
3287695f52
@ -31,12 +31,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<template #bottom>
|
<template #bottom>
|
||||||
<view class="flex-row items-center pb-10 pt-5">
|
<view class="flex-row items-center pb-10 pt-5">
|
||||||
<u-button
|
|
||||||
text="测试计算"
|
|
||||||
class="ml-15 mr-7"
|
|
||||||
:plain="true"
|
|
||||||
@click="calculateAllPositionYears"
|
|
||||||
/>
|
|
||||||
<u-button
|
<u-button
|
||||||
text="上一步"
|
text="上一步"
|
||||||
class="ml-15 mr-7"
|
class="ml-15 mr-7"
|
||||||
@ -124,7 +118,10 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
const years = calculatePositionYears(e.value, endTime);
|
const years = calculatePositionYears(e.value, endTime);
|
||||||
// 更新任岗年限
|
// 更新任岗年限
|
||||||
education.xl[formIndex].value.gwrznx = years;
|
education.xl[formIndex].value.gwrznx = years;
|
||||||
console.log("更新后的任岗年限:", education.xl[formIndex].value.gwrznx);
|
console.log(
|
||||||
|
"更新后的任岗年限:",
|
||||||
|
education.xl[formIndex].value.gwrznx
|
||||||
|
);
|
||||||
// 强制重新渲染
|
// 强制重新渲染
|
||||||
forceUpdateKey.value++;
|
forceUpdateKey.value++;
|
||||||
}
|
}
|
||||||
@ -149,7 +146,10 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
const years = calculatePositionYears(startTime, e.value);
|
const years = calculatePositionYears(startTime, e.value);
|
||||||
// 更新任岗年限
|
// 更新任岗年限
|
||||||
education.xl[formIndex].value.gwrznx = years;
|
education.xl[formIndex].value.gwrznx = years;
|
||||||
console.log("更新后的任岗年限:", education.xl[formIndex].value.gwrznx);
|
console.log(
|
||||||
|
"更新后的任岗年限:",
|
||||||
|
education.xl[formIndex].value.gwrznx
|
||||||
|
);
|
||||||
// 强制重新渲染
|
// 强制重新渲染
|
||||||
forceUpdateKey.value++;
|
forceUpdateKey.value++;
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ if (getFile.rgqkList && getFile.rgqkList.length > 0) {
|
|||||||
gwrzkstime: item.value.gwrzkstime,
|
gwrzkstime: item.value.gwrzkstime,
|
||||||
gwrzjstime: item.value.gwrzjstime,
|
gwrzjstime: item.value.gwrzjstime,
|
||||||
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
||||||
来源: "数据库回显"
|
来源: "数据库回显",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// 强制重新渲染确保界面更新
|
// 强制重新渲染确保界面更新
|
||||||
@ -239,7 +239,7 @@ const calculateAllPositionYears = () => {
|
|||||||
gwrzkstime: item.value.gwrzkstime,
|
gwrzkstime: item.value.gwrzkstime,
|
||||||
gwrzjstime: item.value.gwrzjstime,
|
gwrzjstime: item.value.gwrzjstime,
|
||||||
gwrznx: years,
|
gwrznx: years,
|
||||||
是否为0: years === "0"
|
是否为0: years === "0",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 没有开始时间时,清空任岗年限
|
// 没有开始时间时,清空任岗年限
|
||||||
@ -284,7 +284,7 @@ onMounted(() => {
|
|||||||
gwrzkstime: item.value.gwrzkstime,
|
gwrzkstime: item.value.gwrzkstime,
|
||||||
gwrzjstime: item.value.gwrzjstime,
|
gwrzjstime: item.value.gwrzjstime,
|
||||||
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
||||||
来源: "数据库回显-挂载后"
|
来源: "数据库回显-挂载后",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
forceUpdateKey.value++;
|
forceUpdateKey.value++;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user