Skip to content

Commit

Permalink
Fix task list editing, second open information is not updated issue
Browse files Browse the repository at this point in the history
  • Loading branch information
v_xxzhou(周鑫) committed May 30, 2024
1 parent db33691 commit e9f3ee2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions web/src/pages/jobManagement/components/job_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</div>
</template>
<script>
import { defineComponent, reactive, ref, toRaw } from "vue";
import { defineComponent, reactive, ref, computed } from "vue";
import {
CopyOutlined,
DeleteOutlined,
Expand All @@ -63,6 +63,7 @@ import {
import { useI18n } from "@fesjs/fes";
import { message } from "ant-design-vue";
import { deleteJob } from "@/common/service";
import { cloneDeep } from 'lodash-es'
export default defineComponent({
components: {
Expand All @@ -77,8 +78,8 @@ export default defineComponent({
emits: ["showJobDetail", "handleJobCopy", "refreshList", "handleJobModify"],
setup(props, context) {
const { t } = useI18n({ useScope: "global" });
const jobData = toRaw(props.jobData);
const { engineType, id, projectId } = jobData;
const jobData = computed(() => cloneDeep(props.jobData));
const { engineType, id, projectId } = jobData.value;
const imageText = engineType.toUpperCase();
const imageName =
imageText === "DATAX"
Expand All @@ -105,18 +106,19 @@ export default defineComponent({
};
const gotoDetail = () => {
context.emit("showJobDetail", jobData);
context.emit("showJobDetail", jobData.value);
};
const handleJobCopy = () => {
context.emit("handleJobCopy", jobData);
context.emit("handleJobCopy", jobData.value);
};
const handleJobModify = () => {
context.emit("handleJobModify", jobData);
context.emit("handleJobModify", jobData.value);
}
return {
jobData,
imageSrc: imageName ? require(`../../../images/${imageName}`) : "",
imageText,
changeManagement,
Expand Down

0 comments on commit e9f3ee2

Please sign in to comment.