diff --git a/.env.dev b/.env.dev index 6289ff3..869bae5 100644 --- a/.env.dev +++ b/.env.dev @@ -7,11 +7,11 @@ NODE_ENV = development #VUE_APP_BASE_API =http://60.217.22.153:9001/api #VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001 -VUE_APP_BASE_API =http://60.217.22.153:9001/api -VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001 +# VUE_APP_BASE_API =http://60.217.22.153:9001/api +# VUE_APP_BASE_IMG_URL =http://60.217.22.153:9001 -# VUE_APP_BASE_API =http://192.168.10.134:85/api -# VUE_APP_BASE_IMG_URL =http://192.168.10.134:85 +VUE_APP_BASE_API =http://192.168.10.121:83/api +VUE_APP_BASE_IMG_URL =http://192.168.10.121:83 diff --git a/src/views/personnelmanage/index.vue b/src/views/personnelmanage/index.vue index 4010ed3..8d962a9 100644 --- a/src/views/personnelmanage/index.vue +++ b/src/views/personnelmanage/index.vue @@ -20,7 +20,19 @@ 添加 编辑 删除 - + + 导入 + + 模板下载 +
@@ -156,6 +168,7 @@ export default { }, data() { return { + baseURL: process.env.VUE_APP_BASE_IMG_URL, // tableKey: 0, titleStr: "添加", tableData: [], @@ -169,6 +182,7 @@ export default { username: null, }, detailInfo: [], + fileList: [] }; }, computed: {}, @@ -237,6 +251,41 @@ export default { this.editServiceVisible = true; this.titleStr = "编辑"; }, + // 上传 + handlePictureCardPreview(file) { + console.log('aaa',file) + }, + handleExceed(files, fileList) { + this.$message.warning(`只能选择一个文件`); + }, + + UploadImage(param){ + let formData = new FormData() + formData.append('files', param.file) + let url = 'http://192.168.10.121:83/api/Files/Upload' + postMethodCommon("/Files/Upload",formData).then(res =>{ + console.log('asddsa',res) + let item = { + file_path :res.result[0].filePath + } + postMethodCommon("/FireCodeApp/BatchExportUser",item).then(response=>{ + + if(response.code == 200){ + this.$message({ + message: response.msg, + type: 'success' + }); + } + }) + }) + }, + handleSuccess(response,file,fileList){ + + }, + downfiles(){ + let url = this.baseURL + "/excel/人员信息模板.xlsx" + window.open(url) + }, rowClick(row) { this.$refs.mainTable.clearSelection(); this.$refs.mainTable.toggleRowSelection(row);