flat: expose file
This commit is contained in:
@@ -190,33 +190,7 @@ export default {
|
|||||||
tempWorkType: [],
|
tempWorkType: [],
|
||||||
worktypeDic: {},
|
worktypeDic: {},
|
||||||
arr: [],//////
|
arr: [],//////
|
||||||
excelOption: {
|
|
||||||
submitBtn: false,
|
|
||||||
emptyBtn: false,
|
|
||||||
column: [
|
|
||||||
{
|
|
||||||
label: "文件上传",
|
|
||||||
prop: "excelFile",
|
|
||||||
type: "upload",
|
|
||||||
drag: true,
|
|
||||||
loadText: "文件上传中,请稍等",
|
|
||||||
span: 24,
|
|
||||||
propsHttp: {
|
|
||||||
res: "data",
|
|
||||||
},
|
|
||||||
tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
||||||
accept: excelAccept,
|
|
||||||
showFileList: false,
|
|
||||||
action: upload(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "模板下载",
|
|
||||||
prop: "excelTemplate",
|
|
||||||
formslot: true,
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
excelBox: false,
|
excelBox: false,
|
||||||
data: [],
|
data: [],
|
||||||
obj: {},
|
obj: {},
|
||||||
@@ -420,6 +394,36 @@ export default {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
excelOption() {
|
||||||
|
const url = this.tenantId ? `${upload()}&id=${this.tenantId}` : upload()
|
||||||
|
return {
|
||||||
|
submitBtn: false,
|
||||||
|
emptyBtn: false,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: "文件上传",
|
||||||
|
prop: "excelFile",
|
||||||
|
type: "upload",
|
||||||
|
drag: true,
|
||||||
|
loadText: "文件上传中,请稍等",
|
||||||
|
span: 24,
|
||||||
|
propsHttp: {
|
||||||
|
res: "data",
|
||||||
|
},
|
||||||
|
tip: "请上传 .xls,.xlsx 标准格式文件",
|
||||||
|
accept: excelAccept,
|
||||||
|
showFileList: false,
|
||||||
|
action: url,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "模板下载",
|
||||||
|
prop: "excelTemplate",
|
||||||
|
formslot: true,
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
selectedWorkTypes: {
|
selectedWorkTypes: {
|
||||||
get() {
|
get() {
|
||||||
if (!this.obj.labelsBase) {
|
if (!this.obj.labelsBase) {
|
||||||
@@ -801,6 +805,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/*导入人才库*/
|
/*导入人才库*/
|
||||||
beforeAvatarUpload(file, done, loading) {
|
beforeAvatarUpload(file, done, loading) {
|
||||||
|
console.log(file)
|
||||||
if (!isExcel(file)) {
|
if (!isExcel(file)) {
|
||||||
loading();
|
loading();
|
||||||
this.$message.error("上传人才库信息只能是 .xls,.xlsx 标准格式文件!");
|
this.$message.error("上传人才库信息只能是 .xls,.xlsx 标准格式文件!");
|
||||||
|
|||||||
Reference in New Issue
Block a user