成润页面修改
This commit is contained in:
parent
0f6b5c0c11
commit
8e12e0fdd4
@ -87,7 +87,9 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新
|
||||
// axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址
|
||||
// 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') {
|
||||
axios.defaults.baseURL = 'https://www.ceshi.com'
|
||||
} else if (process.env.NODE_ENV == 'production') {
|
||||
|
||||
@ -277,7 +277,7 @@ Vue.prototype.getViewFilePath = function(row) {
|
||||
|
||||
//路由监听
|
||||
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);
|
||||
|
||||
|
||||
@ -92,14 +92,20 @@
|
||||
<el-table-column
|
||||
:label="$t('message.docManage.table.operation')"
|
||||
align="center"
|
||||
width="250"
|
||||
width="270"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div @click="downFn(scope.row)" class="operationText">
|
||||
<!-- <el-link class="downfn" type="primary">{{$t('message.docManage.table.download')}}</el-link> -->
|
||||
<el-button
|
||||
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>
|
||||
</div>
|
||||
</div> -->
|
||||
<div @click="editFn(scope.row)" class="operationText">
|
||||
<img
|
||||
src="@/assets/images/icon-edit.png"
|
||||
@ -376,14 +382,26 @@ export default {
|
||||
},
|
||||
//下载文件
|
||||
downFn(item) {
|
||||
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.downloadUrl = this.$store.state.FILEURL + item.filePath
|
||||
})
|
||||
// console.log('http://182.90.224.147:30262/image/'+item);
|
||||
// if (item) {
|
||||
// let arr = []
|
||||
// arr = JSON.parse(item)
|
||||
// arr.forEach(element => {
|
||||
window.location.href = this.$store.state.FILEURL+item;
|
||||
// });
|
||||
// } 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) {
|
||||
|
||||
@ -152,9 +152,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
navigationList: [
|
||||
{ name: '产品服务', id: 1 },
|
||||
{ name: 'SDK&工具', id: 2 },
|
||||
{ name: '文档', id: 3 }
|
||||
// { name: '产品服务', id: 1 },
|
||||
// { name: 'SDK&工具', id: 2 },
|
||||
// { name: '文档', id: 3 }
|
||||
],
|
||||
checked: 1,
|
||||
LOGO_white: LOGO_white,
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
{{ item.fileName }}
|
||||
</div>
|
||||
<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)" />
|
||||
</div>
|
||||
</div>
|
||||
@ -140,24 +140,25 @@ export default {
|
||||
},
|
||||
//下载文件
|
||||
downFn(item) {
|
||||
updateFileDownloadNumApi({ id: item.id }).then((res) => {
|
||||
let blob = new Blob([this.$store.state.FILEURL + item.filePath], {
|
||||
type: 'application/octet-stream'
|
||||
})
|
||||
// application/octet-stream //下载文件的通用格式
|
||||
if (window.navigator.msSaveBlob) {
|
||||
window.navigator.msSaveBlob(blob, item.fileName) //处理IE下载的兼容性
|
||||
} else {
|
||||
let downloadElement = document.createElement('a')
|
||||
let href = window.URL.createObjectURL(blob) //创建下载的链接
|
||||
downloadElement.href = href
|
||||
downloadElement.download = item.fileName //下载后文件名
|
||||
document.body.appendChild(downloadElement)
|
||||
downloadElement.click() //点击下载
|
||||
document.body.removeChild(downloadElement) //下载完成移除元素
|
||||
window.URL.revokeObjectURL(href) //释放掉blob对象
|
||||
}
|
||||
})
|
||||
window.location.href = this.$store.state.FILEURL+item.filePath;
|
||||
// updateFileDownloadNumApi({ id: item.id }).then((res) => {
|
||||
// let blob = new Blob([this.$store.state.FILEURL + item.filePath], {
|
||||
// type: 'application/octet-stream'
|
||||
// })
|
||||
// // application/octet-stream //下载文件的通用格式
|
||||
// if (window.navigator.msSaveBlob) {
|
||||
// window.navigator.msSaveBlob(blob, item.fileName) //处理IE下载的兼容性
|
||||
// } else {
|
||||
// let downloadElement = document.createElement('a')
|
||||
// let href = window.URL.createObjectURL(blob) //创建下载的链接
|
||||
// downloadElement.href = href
|
||||
// downloadElement.download = item.fileName //下载后文件名
|
||||
// document.body.appendChild(downloadElement)
|
||||
// downloadElement.click() //点击下载
|
||||
// document.body.removeChild(downloadElement) //下载完成移除元素
|
||||
// window.URL.revokeObjectURL(href) //释放掉blob对象
|
||||
// }
|
||||
// })
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs['searchForm'].resetFields()
|
||||
|
||||
@ -292,7 +292,7 @@
|
||||
console.log('编辑', obj);
|
||||
this.addEditForm = JSON.parse(JSON.stringify(obj));
|
||||
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);
|
||||
},
|
||||
|
||||
@ -525,7 +525,8 @@ export default {
|
||||
element.discernCode = "100" + index;
|
||||
});
|
||||
this.tableData = res.result;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user