Commit 52681289 authored by “yiyousong”'s avatar “yiyousong”

feat: 系统参数新增文件上传

parent 07ad815e
...@@ -6,8 +6,21 @@ ...@@ -6,8 +6,21 @@
@cancel="handleCancel" @cancel="handleCancel"
:maskClosable="false" :maskClosable="false"
> >
<a-button slot="footer" @click="handleReset">重置</a-button> <template slot="footer">
<a-button slot="footer" type="primary" @click="handleOk">确定</a-button> <a-space>
<a-button @click="handleReset">重置</a-button>
<a-upload
name="file"
:show-upload-list="false"
:action="api + 'base/file/commonupload'"
@change="handleUpload"
>
<a-button type="primary">文件上传</a-button>
</a-upload>
<a-button type="primary" @click="handleOk">确定</a-button>
</a-space>
</template>
<a-form-model <a-form-model
:model="form" :model="form"
ref="form" ref="form"
...@@ -99,6 +112,7 @@ export default { ...@@ -99,6 +112,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/",
form: { form: {
name: "", // 参数名称 name: "", // 参数名称
firstOrganize: "", // 一级组织 firstOrganize: "", // 一级组织
...@@ -166,6 +180,15 @@ export default { ...@@ -166,6 +180,15 @@ export default {
} }
}); });
}, },
// 文件上传
handleUpload({ file }) {
if (file.status === "done") {
let { code, url } = file.response;
if (code == 1) {
this.form.paramValue = url;
}
}
},
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment