成润页面修改

This commit is contained in:
jxj_yjl 2023-05-15 21:48:02 +08:00
parent 0f6b5c0c11
commit 8e12e0fdd4
7 changed files with 60 additions and 38 deletions

View File

@ -87,7 +87,9 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新 // axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新
// axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址 // axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址
// axios.defaults.baseURL = 'http://101.43.164.214:12350'//中建五局线上 // axios.defaults.baseURL = 'http://101.43.164.214:12350'//中建五局线上
axios.defaults.baseURL = 'http://182.90.224.147:15551/'//港投(成润)项目线上 // axios.defaults.baseURL = 'http://182.90.224.147:15551/'//港投(成润)项目线上
axios.defaults.baseURL = 'http://182.90.224.147:30262/'//港投(成润)项目线上
} else if (process.env.NODE_ENV == 'debug') { } else if (process.env.NODE_ENV == 'debug') {
axios.defaults.baseURL = 'https://www.ceshi.com' axios.defaults.baseURL = 'https://www.ceshi.com'
} else if (process.env.NODE_ENV == 'production') { } else if (process.env.NODE_ENV == 'production') {

View File

@ -277,7 +277,7 @@ Vue.prototype.getViewFilePath = function(row) {
//路由监听 //路由监听
router.beforeEach((to, form, next) => { router.beforeEach((to, form, next) => {
const whitepage = ["/authentication", "/test", "/videoLearning",'/pages/projectEnd/safetyEducation/authentication']; const whitepage = ["/authentication", "/test", "/videoLearning",'/pages/projectEnd/safetyEducation/authentication','/companyAdmin/docManage'];
console.log('白名单跳转生效了嘛==============11111111111 :',to); console.log('白名单跳转生效了嘛==============11111111111 :',to);

View File

@ -92,14 +92,20 @@
<el-table-column <el-table-column
:label="$t('message.docManage.table.operation')" :label="$t('message.docManage.table.operation')"
align="center" align="center"
width="250" width="270"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="tableBtns">
<div @click="downFn(scope.row)" class="operationText"> <el-button
<!-- <el-link class="downfn" type="primary">{{$t('message.docManage.table.download')}}</el-link> --> class="operationText"
@click="downFn(scope.row.filePath)"
type="text"
size="small"
>下载附件</el-button
>
<!-- <div @click="downFn(scope.row)" class="operationText">
<a :href="downloadUrl" class="downfn">下载</a> <a :href="downloadUrl" class="downfn">下载</a>
</div> </div> -->
<div @click="editFn(scope.row)" class="operationText"> <div @click="editFn(scope.row)" class="operationText">
<img <img
src="@/assets/images/icon-edit.png" src="@/assets/images/icon-edit.png"
@ -376,14 +382,26 @@ export default {
}, },
// //
downFn(item) { downFn(item) {
updateFileDownloadNumApi({ id: item.id }).then((res) => { // console.log('http://182.90.224.147:30262/image/'+item);
// window.open(this.$store.state.FILEURL+item.filePath) // if (item) {
// var a = document.createElement("a"); // let arr = []
// a.href = this.$store.state.FILEURL + item.filePath // arr = JSON.parse(item)
// a.download = item.fileName; // arr.forEach(element => {
// a.click(); window.location.href = this.$store.state.FILEURL+item;
this.downloadUrl = this.$store.state.FILEURL + item.filePath // });
}) // } else {
// this.$message.success('')
// }
// 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
// // a.download = item.fileName;
// // a.click();
// this.$message.error(res.message);
// this.downloadUrl = this.$store.state.FILEURL + item.filePath
// })
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {

View File

@ -152,9 +152,9 @@ export default {
data() { data() {
return { return {
navigationList: [ navigationList: [
{ name: '产品服务', id: 1 }, // { name: '', id: 1 },
{ name: 'SDK&工具', id: 2 }, // { name: 'SDK&', id: 2 },
{ name: '文档', id: 3 } // { name: '', id: 3 }
], ],
checked: 1, checked: 1,
LOGO_white: LOGO_white, LOGO_white: LOGO_white,

View File

@ -46,7 +46,7 @@
{{ item.fileName }} {{ item.fileName }}
</div> </div>
<div class="right"> <div class="right">
<img src="@/assets/images/eye.png" @click="viewFn(item)" /> <!-- <img src="@/assets/images/eye.png" @click="viewFn(item)" /> -->
<img src="@/assets/images/download.png" @click="downFn(item)" /> <img src="@/assets/images/download.png" @click="downFn(item)" />
</div> </div>
</div> </div>
@ -140,24 +140,25 @@ export default {
}, },
// //
downFn(item) { downFn(item) {
updateFileDownloadNumApi({ id: item.id }).then((res) => { window.location.href = this.$store.state.FILEURL+item.filePath;
let blob = new Blob([this.$store.state.FILEURL + item.filePath], { // updateFileDownloadNumApi({ id: item.id }).then((res) => {
type: 'application/octet-stream' // let blob = new Blob([this.$store.state.FILEURL + item.filePath], {
}) // type: 'application/octet-stream'
// application/octet-stream // // })
if (window.navigator.msSaveBlob) { // // application/octet-stream //
window.navigator.msSaveBlob(blob, item.fileName) //IE // if (window.navigator.msSaveBlob) {
} else { // window.navigator.msSaveBlob(blob, item.fileName) //IE
let downloadElement = document.createElement('a') // } else {
let href = window.URL.createObjectURL(blob) // // let downloadElement = document.createElement('a')
downloadElement.href = href // let href = window.URL.createObjectURL(blob) //
downloadElement.download = item.fileName // // downloadElement.href = href
document.body.appendChild(downloadElement) // downloadElement.download = item.fileName //
downloadElement.click() // // document.body.appendChild(downloadElement)
document.body.removeChild(downloadElement) // // downloadElement.click() //
window.URL.revokeObjectURL(href) //blob // document.body.removeChild(downloadElement) //
} // window.URL.revokeObjectURL(href) //blob
}) // }
// })
}, },
resetForm() { resetForm() {
this.$refs['searchForm'].resetFields() this.$refs['searchForm'].resetFields()

View File

@ -292,7 +292,7 @@
console.log('编辑', obj); console.log('编辑', obj);
this.addEditForm = JSON.parse(JSON.stringify(obj)); this.addEditForm = JSON.parse(JSON.stringify(obj));
if (typeof obj.alarmPushWorkerId === 'string'&& obj.alarmPushWorkerId != '') { if (typeof obj.alarmPushWorkerId === 'string'&& obj.alarmPushWorkerId != '') {
this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId.split(',').map(Number); this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId.split(',')
} }
this.handle('edit', true); this.handle('edit', true);
}, },

View File

@ -525,7 +525,8 @@ export default {
element.discernCode = "100" + index; element.discernCode = "100" + index;
}); });
this.tableData = res.result; this.tableData = res.result;
} else { }
else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}); });