|
|
|
@ -151,7 +151,28 @@
|
|
|
|
|
width="1000px"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
drag
|
|
|
|
|
:limit="1"
|
|
|
|
|
:action="uploadUrl"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
:headers="headers"
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
name="multipartFile"
|
|
|
|
|
:multiple="false"
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
<el-form
|
|
|
|
|
ref="form"
|
|
|
|
|
:model="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
label-width="130px"
|
|
|
|
|
style="margin-top: 20px"
|
|
|
|
|
>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="表名" prop="name">
|
|
|
|
@ -253,6 +274,7 @@ import {
|
|
|
|
|
getOtherPage,
|
|
|
|
|
exportOtherExcel,
|
|
|
|
|
} from "@/api/accounting/other";
|
|
|
|
|
import { getAccessToken } from "@/utils/auth";
|
|
|
|
|
// import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
|
|
|
|
export default {
|
|
|
|
|
name: "Other",
|
|
|
|
@ -303,6 +325,10 @@ export default {
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {},
|
|
|
|
|
fileList: [], // 文件列表
|
|
|
|
|
uploadUrl:
|
|
|
|
|
process.env.VUE_APP_BASE_API + "/admin-api//accounting/other/upload", // 上传地址地址
|
|
|
|
|
headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -339,6 +365,7 @@ export default {
|
|
|
|
|
company: undefined,
|
|
|
|
|
note: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
fileUrl: null,
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
@ -354,10 +381,16 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加其他资料";
|
|
|
|
|
},
|
|
|
|
|
// 上传成功的函数
|
|
|
|
|
handleSuccess(res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.form.fileUrl = res.data.url;
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|