# Conflicts:
#	js/public.js
This commit is contained in:
haozq 2024-11-18 10:01:24 +08:00
commit 73b98d2d22
3 changed files with 9 additions and 7 deletions

View File

@ -148,17 +148,18 @@ function getPartDetails() {
$('#codeValue').html(obj.code + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs(' + JSON.stringify(obj) + ')\'>查看概述</a>');
$('#type').html(obj.type === '0' ? '设备' : '工器具');
$('#applyNum').html(obj.applyNum);
let suffix = "data:image/jpeg;base64,"
if(obj.lyUrl){
$('#lyUrl').html('<img src="' + (signFileUrl + obj.lyUrl + '?token=' + sessionStorage.getItem('gz-token')) + '">');
$('#lyUrl').html('<img src="' + (suffix + obj.lyUrl) + '">');
}
if(obj.zdUrl){
$('#zdUrl').html('<img src="' + (signFileUrl + obj.zdUrl + '?token=' + sessionStorage.getItem('gz-token')) + '">');
$('#zdUrl').html('<img src="' + (suffix + obj.zdUrl) + '">');
}
if(obj.ckUrl){
$('#lyUrl').html('<img src="' + (signFileUrl + obj.ckUrl + '?token=' + sessionStorage.getItem('gz-token')) + '">');
$('#lyUrl').html('<img src="' + (suffix + obj.ckUrl) + '">');
}
if(obj.shUrl){
$('#shUrl').html('<img src="' + (signFileUrl + obj.shUrl + '?token=' + sessionStorage.getItem('gz-token')) + '">');
$('#shUrl').html('<img src="' + (suffix + obj.shUrl) + '">');
}
setFileTable(obj.fileList);
if (objParam.type === '0') { // 设备

View File

@ -82,6 +82,7 @@ function queryTable(type) {
// 刷新页面数据
function reloadData() {
reloadTable(1);
getStatistics();
}
// 重载表格

View File

@ -178,7 +178,7 @@ function getUrlParam(key) {
// 预览文件
function commonViewFile(params) {
let path = fileUrl + params;
let time = encrypt(Math.floor(Date.now()).toString())
window.open(viewFileUrl + path + '&token=' + encrypt(time));
    let path = fileUrl + params + "&auth=" + sessionStorage.getItem("gz-token");
    let time = encrypt(Math.floor(Date.now()).toString())
    window.open(viewFileUrl + path + '&token=' + encrypt(time));
}