成润页面修改
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://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') {
|
||||||
|
|||||||
@ -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);
|
||||||
|
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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()
|
||||||
|
|||||||
@ -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);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user