优化
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user