diff --git a/src/api/file/file.js b/src/api/file/file.js new file mode 100644 index 0000000..c05fc66 --- /dev/null +++ b/src/api/file/file.js @@ -0,0 +1,14 @@ +import request from '/@/utils/request'; + +const moduleName = 'biz-vordm' + +export const uploadFile = (row) => { + return request({ + url: '/api/' + moduleName + '/ui/upload/uploadFile', + method: 'post', + headers: { + 'Content-Type': 'multipart/form-data' + }, + data: row, + }) + } \ No newline at end of file diff --git a/src/views/dataService/disasterPartners/component/upload.vue b/src/views/dataService/disasterPartners/component/upload.vue index a847588..dbb82ce 100644 --- a/src/views/dataService/disasterPartners/component/upload.vue +++ b/src/views/dataService/disasterPartners/component/upload.vue @@ -3,12 +3,12 @@ - - + + @@ -33,6 +33,9 @@ import { reactive, ref } from "vue"; import { saveWebsites } from '/@/api/websites/websites.js'; import { ElMessage } from "element-plus"; +import { getDictionary } from '/@/api/system/dictbiz'; + + const upFileRef = ref(); const emit = defineEmits(['callback']); const adminAddFormRef = ref(); @@ -42,6 +45,7 @@ const state = reactive({ ruleForm: { title: null, }, + disasterReductionPartnersList:[] }) //校验规则 @@ -66,6 +70,7 @@ const resetField = () => { // 打开弹窗 const openDialog = (row) => { + initDic() state.isShowDialog = true; state.ruleForm.disasterId = row; }; @@ -93,7 +98,12 @@ const onSubmit = () => { } }) }; - +const initDic = ()=>{ + getDictionary({ code: 'DisasterReductionPartners' }).then((res) => { + state.disasterReductionPartnersList = res; + console.log(state.disasterReductionPartnersList) + }); +} // 暴露变量 defineExpose({ diff --git a/src/views/system/dic/dialog.vue b/src/views/system/dic/dialog.vue index 829753f..b047a54 100644 --- a/src/views/system/dic/dialog.vue +++ b/src/views/system/dic/dialog.vue @@ -1,6 +1,6 @@