This commit is contained in:
dengxin
2024-03-26 17:11:51 +08:00
4 changed files with 36 additions and 33 deletions

View File

@@ -190,33 +190,7 @@ export default {
tempWorkType: [],
worktypeDic: {},
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,
data: [],
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: {
get() {
if (!this.obj.labelsBase) {
@@ -801,6 +805,7 @@ export default {
},
/*导入人才库*/
beforeAvatarUpload(file, done, loading) {
console.log(file)
if (!isExcel(file)) {
loading();
this.$message.error("上传人才库信息只能是 .xls,.xlsx 标准格式文件!");
@@ -839,7 +844,7 @@ export default {
/*下载人才库模板 */
handleTemplate() {
this.templateLoading = true;
getTemplate("trc")
getTemplate("rqkdr")
.then((rep) => {
this.templateLoading = false;
window.open(rep.data.data);

View File

@@ -419,7 +419,7 @@ export default {
/*下载任务模板 */
handleTemplate() {
this.templateLoading = true;
getTemplate("trc")
getTemplate("rwdr")
.then((rep) => {
this.templateLoading = false;
window.open(rep.data.data);

View File

@@ -449,7 +449,7 @@ export default {
/*下载任务模板 */
handleTemplate() {
this.templateLoading = true;
getTemplate("trc")
getTemplate("gwdr")
.then((rep) => {
this.templateLoading = false;
window.open(rep.data.data);