This commit is contained in:
2025-08-14 02:26:01 +08:00
parent 8f26476c9b
commit 71c1bdcf1c
2 changed files with 30 additions and 2 deletions

View File

@ -149,6 +149,7 @@
<el-button
type="primary"
size="large"
v-if="routeParams.type != 'view'"
@click="submitForm"
class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
>确认</el-button
@ -162,7 +163,7 @@
<script setup name="Leave" lang="ts">
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
import { useUserStoreHook } from '@/store/modules/user';
import { addDesignChange } from '@/api/design/designChange';
import { addDesignChange, getDesignChange } from '@/api/design/designChange';
import { listVolumeCatalog } from '@/api/design/volumeCatalog';
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
const route = useRoute();
@ -280,10 +281,25 @@ const handleSelect = (val) => {
form.value.specialty = obj.specialty;
form.value.extendDetail.subName = obj.designSubitem;
};
/** 获取详情 */
const getInfo = () => {
buttonLoading.value = false;
nextTick(async () => {
const res = await getDesignChange(routeParams.value.id);
Object.assign(form.value, res.data);
if (form.value.changeReason.length > 0) {
form.value.changeReason = form.value.changeReason.split(',');
}
buttonLoading.value = false;
});
};
onMounted(() => {
nextTick(async () => {
routeParams.value = proxy.$route.query;
reset();
getList();
getInfo();
});
});
</script>