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: [], 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 标准格式文件!");
@@ -839,7 +844,7 @@ export default {
/*下载人才库模板 */ /*下载人才库模板 */
handleTemplate() { handleTemplate() {
this.templateLoading = true; this.templateLoading = true;
getTemplate("trc") getTemplate("rqkdr")
.then((rep) => { .then((rep) => {
this.templateLoading = false; this.templateLoading = false;
window.open(rep.data.data); window.open(rep.data.data);

View File

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

View File

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

View File

@@ -23,9 +23,7 @@ module.exports = {
port: 1888, port: 1888,
proxy: { proxy: {
"/api": { "/api": {
// target: 'http://192.168.3.120:8000', target: 'http://localhost:8000',
target: 'http://10.165.0.173:8000', //内网
// target: 'http://localhost:8000',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {