|
@@ -28,7 +28,7 @@
|
|
|
import { ref, watch } from 'vue';
|
|
|
import { Message } from 'element-ui';
|
|
|
import { acceptTypeList, useUpload } from '@/utils/upload';
|
|
|
-import { getUserInfo } from '@/utils/auth';
|
|
|
+import { GetFileResource } from '@/api/app';
|
|
|
|
|
|
const props = defineProps({
|
|
|
visible: {
|
|
@@ -41,8 +41,12 @@ const emits = defineEmits(['update:visible', 'batchRegister']);
|
|
|
|
|
|
let file_id = ref('');
|
|
|
let file_name = ref('');
|
|
|
-const { session_id, user_code, user_type } = getUserInfo();
|
|
|
-const templateURL = `${process.env.VUE_APP_BASE_API}/GCLSFileServer/WebFileDownload?UserCode=${user_code}&UserType=${user_type}&SessionID=${session_id}&FileID=00201-20220923-15-N7RMJGP1`;
|
|
|
+const templateURL = ref('');
|
|
|
+
|
|
|
+GetFileResource({ resource_key_list: ['batch_register_student_template'] }).then(({ file_list }) => {
|
|
|
+ if (file_list.length <= 0) return;
|
|
|
+ templateURL.value = file_list[0].file_url;
|
|
|
+});
|
|
|
|
|
|
watch(
|
|
|
() => props.visible,
|