From 8e15aaf3e3c1309ce214139ee2fa1eb111c444b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E5=A6=8D?= <3096114695@qq.com> Date: Wed, 12 Jul 2023 15:26:10 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/api/doc.js | 5 +++- src/components/account.vue | 5 +++- src/views/companyAdmin/docManage.vue | 24 +++++++++++++------ .../projectFront/highModulus/planConfig.vue | 10 ++++---- .../projectFront/laborManage/Payoff/index.vue | 6 +++-- 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/assets/js/api/doc.js b/src/assets/js/api/doc.js index 52d5da2c..168c2608 100644 --- a/src/assets/js/api/doc.js +++ b/src/assets/js/api/doc.js @@ -1,7 +1,7 @@ /** * api接口统一管理 */ -import {post} from '../http' +import {post,get} from '../http' export const addCompanyFileApi = data => post('xmgl/companyFile/add', data); //添加企业文件资料信息 export const editCompanyFileApi = data => post('xmgl/companyFile/edit', data); //编辑企业文件资料信息 @@ -9,3 +9,6 @@ export const deleteCompanyFileApi = data => post('xmgl/companyFile/delete', data export const getCompanyFileListApi = data => post('xmgl/companyFile/list', data); //分页查询企业的文件资料记录 export const updateFileDownloadNumApi = data => post('xmgl/companyFile/updateFileDownloadNum', data); //增加文件资料下载次数 export const updateFileDownloadNameApi = data => post('xmgl/companyFile/getFile', data); // 更改文件名后同步下载后的文件名 +export const updateFileDownloadReNameApi = params => get('xmgl/upload/getRenameFile', params); // 下载后同步文件名 + + diff --git a/src/components/account.vue b/src/components/account.vue index 016d8ba5..ece36ca3 100644 --- a/src/components/account.vue +++ b/src/components/account.vue @@ -177,7 +177,10 @@ export default { this.equipmentChina = this.loginData.equipmentChina } if (this.loginData.dataCenter != '') { - this.dataCenter1 = this.loginData.dataCenter + this.dataCenter = this.loginData.dataCenter + } + if (this.loginData.enterpriseFront != '') { + this.enterpriseFront = this.loginData.enterpriseFront } // console.log('项目后台',this.projectBackground) // console.log('企业后台',this.enterpriseBackground) diff --git a/src/views/companyAdmin/docManage.vue b/src/views/companyAdmin/docManage.vue index 4f4d2708..2b41161c 100644 --- a/src/views/companyAdmin/docManage.vue +++ b/src/views/companyAdmin/docManage.vue @@ -233,7 +233,7 @@ import { deleteCompanyFileApi, editCompanyFileApi, updateFileDownloadNumApi, - updateFileDownloadNameApi + updateFileDownloadReNameApi } from '@/assets/js/api/doc.js' export default { @@ -354,8 +354,8 @@ export default { if (valid) { console.log(this.editForm) editCompanyFileApi(this.editForm).then((res) => { - updateFileDownloadNameApi({ fileUrl: this.$store.state.FILEURL + this.editForm.filePath,fileName: this.editForm.fileName}).then((res) => { - }) + // updateFileDownloadReNameApi({ fileUrl: this.$store.state.FILEURL + this.editForm.filePath,fileName: this.editForm.fileName}).then((res) => { + // }) this.editDialog = false this.getListData() this.$message.success( @@ -386,11 +386,21 @@ export default { this.getListData() }, //下载文件 - downFn(item) { + async downFn(item) { // console.log('http://182.90.224.147:30262/image/'+item.id); // console.log(item) - console.log(this.$store.state.FILEURL+item.filePath,'下载') - window.location.href = this.$store.state.FILEURL+item.filePath; + + let url = this.$http.defaults.baseURL + 'xmgl/upload/getRenameFile?fileUrl=' + this.$store.state.FILEURL+item.filePath + '&fileName=' + item.fileName + // window.location.href + window.open(url) + // await updateFileDownloadReNameApi( + // { fileUrl: this.$store.state.FILEURL+item.filePath,fileName: item.fileName} + // ).then((res) => { + // console.log('更名后下载',res) + // }) + + // console.log(this.$store.state.FILEURL+item.filePath,'下载') + // window.location.href = this.$store.state.FILEURL+item.filePath; // if (item) { // let arr = [] // arr = JSON.parse(item) @@ -399,7 +409,7 @@ export default { // } else { // this.$message.success('未查询到附件') // } - updateFileDownloadNumApi({ id: item.id }).then((res) => { + await updateFileDownloadNumApi({ id: item.id }).then((res) => { // window.open(this.$store.state.FILEURL+item.filePath) // var a = document.createElement("a"); // a.href = this.$store.state.FILEURL + item.filePath diff --git a/src/views/projectFront/highModulus/planConfig.vue b/src/views/projectFront/highModulus/planConfig.vue index 54a7425d..27cf7c7c 100644 --- a/src/views/projectFront/highModulus/planConfig.vue +++ b/src/views/projectFront/highModulus/planConfig.vue @@ -286,9 +286,9 @@ export default { imageUrl: this.testPointImgForm.fileList[0].url, projectSn: this.$store.state.projectSn } - console.log(data) + // console.log(data) addHighFormworkPlaneFigureApi(data).then(res=>{ - console.log(res) + // console.log(res) if(res.code == 200){ // '添加成功!' this.$message.success(this.$t('message.highModulus.addSuccessMsg')) @@ -323,7 +323,7 @@ export default { // this.selectDeepExcavationAllMeasurePointList() }, checkImg(val,index){ - console.log(val) + // console.log('移动',val) this.imgZoom = 1 this.activeImgIndex = index this.activeImgUrl = val.imageUrl @@ -521,10 +521,10 @@ export default { if(this.ratio != 1){ this.$refs['pointFixed'].style.transform = 'translate(0px, -75px)' this.pointTop = ((target.pageY)/this.ratio - (b*0.5)/this.ratio) + 55 - this.pointLeft = ((target.pageX)/this.ratio - (a*0.5)/this.ratio) - 5 + this.pointLeft = ((target.pageX)/this.ratio - (a*0.5)/this.ratio) - 55 } else{ this.pointTop = target.pageY - this.pointLeft = target.pageX - 60 + this.pointLeft = target.pageX } this.pointStatus = 'block' }, diff --git a/src/views/projectFront/laborManage/Payoff/index.vue b/src/views/projectFront/laborManage/Payoff/index.vue index cbe74c6c..bdd5ef7e 100644 --- a/src/views/projectFront/laborManage/Payoff/index.vue +++ b/src/views/projectFront/laborManage/Payoff/index.vue @@ -511,7 +511,8 @@ export default { projectSn: this.projectSn, teamId: this.queryParams.teamId, departmentId: this.queryParams.departmentId, - payStatus:this.queryParams.payStatus + payStatus:this.queryParams.payStatus, + payMonth: this.queryParams.payMonth } exportSalaryPdf(params) }, @@ -521,7 +522,8 @@ export default { projectSn: this.projectSn, teamId: this.queryParams.teamId, departmentId: this.queryParams.departmentId, - payStatus:this.queryParams.payStatus + payStatus:this.queryParams.payStatus, + payMonth: this.queryParams.payMonth } exportSalaryExcel(params) },