Commit 2eb7c304 by bingobo

漏洞扫描修复

1 parent 61df6dc7
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
* 系统配置文件(打包后也可进行更改) * 系统配置文件(打包后也可进行更改)
*/ */
const SystemConfig = { const SystemConfig = {
PUBLIC_PATH: '/api', PUBLIC_PATH: '/api',
// VUE_APP_BASE_URL: "http://25.66.210.41/tools", VUE_APP_GET_USER: 'http://25.66.215.209/gateway/getUser', // 南瑞获取userinfo
VUE_APP_OPEN_OTHER_URL: 'http://10.4.34.182/isc_sso/login?service=http%3A%2F%2F20.1.39.51%3A20888%2Fpmp_irs%2F%23%2F',
// VUE_APP_BASE_URL: "http://25.66.215.209/tools", // 南瑞新ip // VUE_APP_BASE_URL: "http://25.66.215.209/tools", // 南瑞新ip
VUE_APP_BASE_URL: "http://192.168.0.106:18088/tools",
// VUE_APP_ZJ_IFRAME: "http://25.66.210.41/arch"
// VUE_APP_ZJ_IFRAME: "http://25.66.215.209/arch" // 南瑞新ip // VUE_APP_ZJ_IFRAME: "http://25.66.215.209/arch" // 南瑞新ip
VUE_APP_ZJ_IFRAME: "http://localhost:30478/arch" VUE_APP_BASE_URL: "http://192.168.0.112:18088/tools",
VUE_APP_ZJ_IFRAME: "http://localhost:30478/arch",
VUE_APP_MESSAGE_URL: "http://25.66.215.209", // 跳转其他中心 postmessage 智捷项目需要
VUE_APP_MENUAUTH_FLAG: true, // 智捷项目需要
}; };
// import request from '@/utils/request' // import request from '@/utils/request'
// let mainURL="192.168.8.248:18101"
// var qs = require('qs') // var qs = require('qs')
import { ARCH_EVALUATION } from '@/config/micromodule' import { ARCH_EVALUATION } from '@/config/micromodule'
...@@ -15,7 +14,7 @@ export function evalBatchInfo(params) { ...@@ -15,7 +14,7 @@ export function evalBatchInfo(params) {
// 获取里程碑数据列表 // 获取里程碑数据列表
export function milestonesGetList(params) { export function milestonesGetList(params) {
// milestones/getList // milestones/getList
return get(`${ARCH_EVALUATION}/milestones/getList`, params) return post(`${ARCH_EVALUATION}/milestones/getList`, params)
} }
...@@ -31,7 +30,7 @@ export function updateMessageApi(params) { ...@@ -31,7 +30,7 @@ export function updateMessageApi(params) {
// 一键已读 已读所有msg // 一键已读 已读所有msg
export function readWholwMsg() { export function readWholwMsg() {
return get(`${ARCH_EVALUATION}/messageReminder/batchRead`) return post(`${ARCH_EVALUATION}/messageReminder/batchRead`)
} }
......
// onlyoffice 文档url // onlyoffice 文档url
// export const documentServerUrl = 'http://192.168.0.120/'
// export const documentServerUrl2 = 'http://192.168.0.120:18050/'
// 元素颜色配置 // 元素颜色配置
// '业务架构元素': '#d2edfd', '应用架构元素': '#a0ce62', '数据架构元素': '#fbe8d0', '技术架构元素': '#e4d3fc', '安全架构元素': '#fffe55' // '业务架构元素': '#d2edfd', '应用架构元素': '#a0ce62', '数据架构元素': '#fbe8d0', '技术架构元素': '#e4d3fc', '安全架构元素': '#fffe55'
......
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm('ruleForm')"> <el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('ruleForm')"> <el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<!-- <el-button @click="downFiles()"> <!-- <el-button @click="downFiles()">
<i class="el-icon-download"></i> &nbsp;&nbsp;归档材料下载</el-button <i class="el-icon-download"></i> &nbsp;&nbsp;归档材料下载</el-button
...@@ -588,17 +588,32 @@ export default { ...@@ -588,17 +588,32 @@ export default {
fileId: scope.fileId * 1, fileId: scope.fileId * 1,
}) })
let blob = new Blob([response]) // let blob = new Blob([response])
// if ('download' in document.createElement('a')) {
// let elink = document.createElement('a')
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = scope.fileName
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// URL.revokeObjectURL(elink.href) // 释放URL 对象
// document.body.removeChild(elink)
// }
let blob = new Blob([response]);
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
let elink = document.createElement('a') let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = scope.fileName elink.style.display = 'none';
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob) // 使用 File 对象创建 URL
document.body.appendChild(elink) const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.click() elink.href = URL.createObjectURL(file);
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink) document.body.appendChild(elink);
elink.click();
// 不再使用 URL.revokeObjectURL
document.body.removeChild(elink);
} }
}, },
async downFiles() { async downFiles() {
......
...@@ -58,13 +58,13 @@ ...@@ -58,13 +58,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm('ruleForm')"> <el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('ruleForm')"> <el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button <el-button
@click="inspectNexts()" @click="inspectNexts()"
...@@ -908,17 +908,32 @@ export default { ...@@ -908,17 +908,32 @@ export default {
let response = await downloadObject({ let response = await downloadObject({
fileId: fileId * 1, fileId: fileId * 1,
}) })
let blob = new Blob([response]) // let blob = new Blob([response])
// if ('download' in document.createElement('a')) {
// let elink = document.createElement('a')
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = fileName
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// URL.revokeObjectURL(elink.href) // 释放URL 对象
// document.body.removeChild(elink)
// }
let blob = new Blob([response]);
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
let elink = document.createElement('a') let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = fileName elink.style.display = 'none';
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob) // 使用 File 对象创建 URL
document.body.appendChild(elink) const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.click() elink.href = URL.createObjectURL(file);
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink) document.body.appendChild(elink);
elink.click();
// 不再使用 URL.revokeObjectURL
document.body.removeChild(elink);
} }
}, },
//主列表选中行信息 //主列表选中行信息
......
...@@ -41,22 +41,22 @@ ...@@ -41,22 +41,22 @@
</el-form-item> </el-form-item>
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm()"> <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button @click="add()"> <el-button @click="add()">
<img class="buttonIcon" src="../../assets/xz.png" /> 新增 <img alt="img" class="buttonIcon" src="../../assets/xz.png" /> 新增
</el-button> </el-button>
<el-button @click="edit()"> <el-button @click="edit()">
<img class="buttonIcon" src="../../assets/bj.png" /> 编辑 <img alt="img" class="buttonIcon" src="../../assets/bj.png" /> 编辑
</el-button> </el-button>
<el-button @click="deletes()"> <el-button @click="deletes()">
<img class="buttonIcon" src="../../assets/sc.png" /> 删除 <img alt="img" class="buttonIcon" src="../../assets/sc.png" /> 删除
</el-button> </el-button>
<el-button @click="sendMsg()"><i class="el-icon-position"></i> 发起 </el-button> <el-button @click="sendMsg()"><i class="el-icon-position"></i> 发起 </el-button>
<el-button @click="withdraw()"> <i class="el-icon-folder-delete"></i>撤回 </el-button> <el-button @click="withdraw()"> <i class="el-icon-folder-delete"></i>撤回 </el-button>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
:class="dialogFullScreen ? 'iframeDivBig' : 'iframeDiv'" :class="dialogFullScreen ? 'iframeDivBig' : 'iframeDiv'"
></iframe> ></iframe>
<div v-else-if="blobType == 'png' || blobType == 'jpg'" class="blobImg"> <div v-else-if="blobType == 'png' || blobType == 'jpg'" class="blobImg">
<img :src="iframeUrl" alt="" /> <img :src="iframeUrl" alt="img" />
</div> </div>
<div class="docDiv" v-else-if="blobType == 'docx' && options.length > 0"> <div class="docDiv" v-else-if="blobType == 'docx' && options.length > 0">
<div :ref="`word`" :id="`word${item.typeCode}`"></div> <div :ref="`word`" :id="`word${item.typeCode}`"></div>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<img <img
class="resimg" class="resimg"
:src="resimg" :src="resimg"
alt="" alt="img"
v-if="item.znfxList[0].projectStage == '14' && resimg" v-if="item.znfxList[0].projectStage == '14' && resimg"
/> />
<div v-else> <div v-else>
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
</el-button> </el-button>
<!-- 上传后显示 --> <!-- 上传后显示 -->
<div slot="file" slot-scope="{ file }"> <div slot="file" slot-scope="{ file }">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" /> <img class="el-upload-list__item-thumbnail" :src="file.url" alt="img" />
<span class="el-upload-list__item-actions"> <span class="el-upload-list__item-actions">
<!-- 图片放大 --> <!-- 图片放大 -->
<span <span
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
</el-form-item> </el-form-item>
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm()"> <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button @click="configs()"><i class="el-icon-position"></i> 确认项目评估 </el-button> <el-button @click="configs()"><i class="el-icon-position"></i> 确认项目评估 </el-button>
<el-button @click="withdraw()"> <i class="el-icon-folder-delete"></i>撤回 </el-button> <el-button @click="withdraw()"> <i class="el-icon-folder-delete"></i>撤回 </el-button>
......
...@@ -66,13 +66,13 @@ ...@@ -66,13 +66,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img class="buttonIcon" src="../../assets/cx.png" alt="img" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img class="buttonIcon" src="../../assets/cz.png" alt="img" />重置</el-button
> >
<el-button @click="detailsForm()"> <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img class="buttonIcon" src="../../assets/ck.png" alt="img" />详情</el-button
> >
<el-button <el-button
...@@ -558,8 +558,7 @@ export default { ...@@ -558,8 +558,7 @@ export default {
// const queryString = Object.keys(params) // const queryString = Object.keys(params)
// .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`) // .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
// .join('&') // .join('&')
// window.open(`https://www.bilibili.com?${queryString}`, '_blank') window.open(`${SystemConfig.VUE_APP_OPEN_OTHER_URL}`, '_blank', 'noopener,noreferrer')
window.open(`http://10.4.34.182/isc_sso/login?service=http%3A%2F%2F20.1.39.51%3A20888%2Fpmp_irs%2F%23%2F`, '_blank')
}, },
timeChange(time) { timeChange(time) {
if (time) { if (time) {
...@@ -1080,17 +1079,32 @@ export default { ...@@ -1080,17 +1079,32 @@ export default {
let response = await downloadObject({ let response = await downloadObject({
fileId: scope.fileId * 1, fileId: scope.fileId * 1,
}) })
let blob = new Blob([response]) // let blob = new Blob([response])
// if ('download' in document.createElement('a')) {
// let elink = document.createElement('a')
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = scope.fileName
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// URL.revokeObjectURL(elink.href) // 释放URL 对象
// document.body.removeChild(elink)
// }
let blob = new Blob([response]);
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
let elink = document.createElement('a') let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = scope.fileName elink.style.display = 'none';
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob) // 使用 File 对象创建 URL
document.body.appendChild(elink) const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.click() elink.href = URL.createObjectURL(file);
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink) document.body.appendChild(elink);
elink.click();
// 不再使用 URL.revokeObjectURL
document.body.removeChild(elink);
} }
}, },
handleMouseEnter(msg) { handleMouseEnter(msg) {
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
// module: 0, // module: 0,
// }) // })
try { try {
let res = await axios.post(`http://25.66.215.209/gateway/getUser`, null, { let res = await axios.post(SystemConfig.VUE_APP_GET_USER, null, {
timeout: 5000, timeout: 5000,
}); });
// let res = await getIscInfo(); // let res = await getIscInfo();
...@@ -156,12 +156,8 @@ export default { ...@@ -156,12 +156,8 @@ export default {
code: 200, code: 200,
message: "OK", message: "OK",
content: { content: {
id: "FA84A11538656BBCE0430100007F9766", loginName: "weizheng",
loginName: "lhb", name: "魏征",
name: "实物ID运维",
password: "",
mobile: "",
email: "",
department: "数据运营中心", department: "数据运营中心",
departmentId: "", departmentId: "",
funcList: [], funcList: [],
......
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm('ruleForm')"> <el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('ruleForm')"> <el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<!-- <el-button @click="downFiles()"> <!-- <el-button @click="downFiles()">
<i class="el-icon-download"></i> &nbsp;&nbsp;归档材料下载</el-button <i class="el-icon-download"></i> &nbsp;&nbsp;归档材料下载</el-button
...@@ -590,17 +590,32 @@ export default { ...@@ -590,17 +590,32 @@ export default {
fileId: scope.fileId * 1, fileId: scope.fileId * 1,
}) })
let blob = new Blob([response]) // let blob = new Blob([response])
// if ('download' in document.createElement('a')) {
// let elink = document.createElement('a')
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = scope.fileName
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// URL.revokeObjectURL(elink.href) // 释放URL 对象
// document.body.removeChild(elink)
// }
let blob = new Blob([response]);
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
let elink = document.createElement('a') let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = scope.fileName elink.style.display = 'none';
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob) // 使用 File 对象创建 URL
document.body.appendChild(elink) const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.click() elink.href = URL.createObjectURL(file);
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink) document.body.appendChild(elink);
elink.click();
// 不再使用 URL.revokeObjectURL
document.body.removeChild(elink);
} }
}, },
async downFiles() { async downFiles() {
......
...@@ -58,13 +58,13 @@ ...@@ -58,13 +58,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm('ruleForm')"> <el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('ruleForm')"> <el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button <el-button
@click="inspectNexts()" @click="inspectNexts()"
...@@ -907,17 +907,32 @@ export default { ...@@ -907,17 +907,32 @@ export default {
let response = await downloadObject({ let response = await downloadObject({
fileId: fileId * 1, fileId: fileId * 1,
}) })
let blob = new Blob([response]) // let blob = new Blob([response])
// if ('download' in document.createElement('a')) {
// let elink = document.createElement('a')
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = fileName
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// URL.revokeObjectURL(elink.href) // 释放URL 对象
// document.body.removeChild(elink)
// }
let blob = new Blob([response]);
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
let elink = document.createElement('a') let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = fileName elink.style.display = 'none';
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob) // 使用 File 对象创建 URL
document.body.appendChild(elink) const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.click() elink.href = URL.createObjectURL(file);
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink) document.body.appendChild(elink);
elink.click();
// 不再使用 URL.revokeObjectURL
document.body.removeChild(elink);
} }
}, },
//主列表选中行信息 //主列表选中行信息
......
...@@ -70,22 +70,22 @@ ...@@ -70,22 +70,22 @@
</el-form-item> </el-form-item>
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm()"> <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button @click="add()"> <el-button @click="add()">
<img class="buttonIcon" src="../../assets/xz.png" /> 新增 <img alt="img" class="buttonIcon" src="../../assets/xz.png" /> 新增
</el-button> </el-button>
<el-button @click="edit()"> <el-button @click="edit()">
<img class="buttonIcon" src="../../assets/bj.png" /> 编辑 <img alt="img" class="buttonIcon" src="../../assets/bj.png" /> 编辑
</el-button> </el-button>
<el-button @click="deletes()"> <el-button @click="deletes()">
<img class="buttonIcon" src="../../assets/sc.png" /> 删除 <img alt="img" class="buttonIcon" src="../../assets/sc.png" /> 删除
</el-button> </el-button>
<el-button v-debounce:click="sendMsg" <el-button v-debounce:click="sendMsg"
><i class="el-icon-position"></i> 发起 ><i class="el-icon-position"></i> 发起
......
...@@ -41,22 +41,22 @@ ...@@ -41,22 +41,22 @@
</el-form-item> </el-form-item>
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm()"> <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button @click="add()"> <el-button @click="add()">
<img class="buttonIcon" src="../../assets/xz.png" /> 新增 <img alt="img" class="buttonIcon" src="../../assets/xz.png" /> 新增
</el-button> </el-button>
<el-button @click="edit()"> <el-button @click="edit()">
<img class="buttonIcon" src="../../assets/bj.png" /> 编辑 <img alt="img" class="buttonIcon" src="../../assets/bj.png" /> 编辑
</el-button> </el-button>
<el-button @click="deletes()"> <el-button @click="deletes()">
<img class="buttonIcon" src="../../assets/sc.png" /> 删除 <img alt="img" class="buttonIcon" src="../../assets/sc.png" /> 删除
</el-button> </el-button>
<el-button v-debounce:click="sendMsg"><i class="el-icon-position"></i> 发起 </el-button> <el-button v-debounce:click="sendMsg"><i class="el-icon-position"></i> 发起 </el-button>
<el-button v-debounce:click="withdraw"> <el-button v-debounce:click="withdraw">
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
v-else-if="blobType == 'png' || blobType == 'jpg'" v-else-if="blobType == 'png' || blobType == 'jpg'"
class="blobImg" class="blobImg"
> >
<img :src="iframeUrl" alt="" /> <img :src="iframeUrl" alt="img" />
</div> </div>
<div <div
class="docDiv" class="docDiv"
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<img <img
class="resimg" class="resimg"
:src="resimg" :src="resimg"
alt="" alt="img"
v-if="item.znfxList[0].projectStage == '14' && resimg" v-if="item.znfxList[0].projectStage == '14' && resimg"
/> />
<div v-else> <div v-else>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
<img <img
class="el-upload-list__item-thumbnail" class="el-upload-list__item-thumbnail"
:src="file.url" :src="file.url"
alt="" alt="img"
/> />
<span class="el-upload-list__item-actions"> <span class="el-upload-list__item-actions">
<!-- 图片放大 --> <!-- 图片放大 -->
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
v-else-if="blobType == 'png' || blobType == 'jpg'" v-else-if="blobType == 'png' || blobType == 'jpg'"
class="blobImg" class="blobImg"
> >
<img :src="iframeUrl" alt="" /> <img :src="iframeUrl" alt="img" />
</div> </div>
<div <div
class="docDiv" class="docDiv"
......
...@@ -73,13 +73,13 @@ ...@@ -73,13 +73,13 @@
</el-form-item> </el-form-item>
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm()"> <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button @click="configs()" <el-button @click="configs()"
><i class="el-icon-position"></i> 确认项目评估 ><i class="el-icon-position"></i> 确认项目评估
......
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button> <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button>
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button> <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button>
<el-popover placement="bottom"> <el-popover placement="bottom">
<el-button slot="reference" type="primary" style="margin:0 10px; font-size: 14px; "> <el-button slot="reference" type="primary" style="margin:0 10px; font-size: 14px; ">
<span style="font-size: 14px; width: 14px; height: 12px;"> <span style="font-size: 14px; width: 14px; height: 12px;">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</div> </div>
</el-popover> </el-popover>
<el-button @click="detailsForm()"> <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button> <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button>
<el-button @click="confirm()" :disabled="confirmdisabled" :class="confirmdisabled ? 'noclick' : ''"> <el-button @click="confirm()" :disabled="confirmdisabled" :class="confirmdisabled ? 'noclick' : ''">
<i class="el-icon-chat-dot-square"></i>&nbsp;&nbsp;&nbsp;问题整改</el-button> <i class="el-icon-chat-dot-square"></i>&nbsp;&nbsp;&nbsp;问题整改</el-button>
...@@ -1012,8 +1012,7 @@ export default { ...@@ -1012,8 +1012,7 @@ export default {
// const queryString = Object.keys(params) // const queryString = Object.keys(params)
// .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`) // .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
// .join('&') // .join('&')
// window.open(`https://www.bilibili.com?${queryString}`, '_blank') window.open(`${SystemConfig.VUE_APP_OPEN_OTHER_URL}`, '_blank', 'noopener,noreferrer')
window.open(`http://10.4.34.182/isc_sso/login?service=http%3A%2F%2F20.1.39.51%3A20888%2Fpmp_irs%2F%23%2F`, '_blank')
}, },
timeChange(time) { timeChange(time) {
if (time) { if (time) {
...@@ -1531,17 +1530,32 @@ export default { ...@@ -1531,17 +1530,32 @@ export default {
let response = await downloadObject({ let response = await downloadObject({
fileId: scope.fileId * 1, fileId: scope.fileId * 1,
}) })
let blob = new Blob([response]) // let blob = new Blob([response])
// if ('download' in document.createElement('a')) {
// let elink = document.createElement('a')
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = scope.fileName
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// URL.revokeObjectURL(elink.href) // 释放URL 对象
// document.body.removeChild(elink)
// }
let blob = new Blob([response]);
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
let elink = document.createElement('a') let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = scope.fileName elink.style.display = 'none';
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob) // 使用 File 对象创建 URL
document.body.appendChild(elink) const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.click() elink.href = URL.createObjectURL(file);
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink) document.body.appendChild(elink);
elink.click();
// 不再使用 URL.revokeObjectURL
document.body.removeChild(elink);
} }
}, },
handleMouseEnter(msg) { handleMouseEnter(msg) {
......
...@@ -68,10 +68,10 @@ ...@@ -68,10 +68,10 @@
</el-form-item> --> </el-form-item> -->
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button <el-button
@click="changeLX(ruleFormdialog)" @click="changeLX(ruleFormdialog)"
...@@ -373,7 +373,7 @@ ...@@ -373,7 +373,7 @@
" "
class="blobImg" class="blobImg"
> >
<img :src="imageUrl" alt="" /> <img :src="imageUrl" alt="img" />
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
......
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<!-- <el-button @click="detailsForm()"> <!-- <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> --> > -->
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -63,16 +63,16 @@ ...@@ -63,16 +63,16 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<!-- <el-button @click="detailsForm()"> <!-- <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> --> > -->
<el-button @click="add()"> <el-button @click="add()">
<img class="buttonIcon" src="../../assets/xz.png" /> 添加 <img alt="img" class="buttonIcon" src="../../assets/xz.png" /> 添加
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -59,14 +59,14 @@ ...@@ -59,14 +59,14 @@
</el-form-item> --> </el-form-item> -->
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm('ruleForm')"> <el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="add()"> <el-button @click="add()">
<img class="buttonIcon" src="../../assets/xz.png" /> 新增 <img alt="img" class="buttonIcon" src="../../assets/xz.png" /> 新增
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
let auto = sessionStorage.getItem("author"); let auto = sessionStorage.getItem("author");
const iFrame = document.getElementById("iframezj"); const iFrame = document.getElementById("iframezj");
iFrame.onload = function () { iFrame.onload = function () {
iFrame.contentWindow.postMessage(auto, "\*"); iFrame.contentWindow.postMessage(auto, SystemConfig.VUE_APP_ZJ_IFRAME);
// iFrame.contentWindow.postMessage( // iFrame.contentWindow.postMessage(
// // TODO 该逻辑实现iframe父级页面传递数据到iframe子级页面,子级页面接收数据代码示例在这个文件中 => /Users/bingo/worksapce/zhijie-web/src/views/panorama/projectScale/requirement/index.vue // // TODO 该逻辑实现iframe父级页面传递数据到iframe子级页面,子级页面接收数据代码示例在这个文件中 => /Users/bingo/worksapce/zhijie-web/src/views/panorama/projectScale/requirement/index.vue
// { // {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div v-if="false" class="head-container"> <div v-if="false" class="head-container">
<div class="logo" style="z-index: 10"> <div class="logo" style="z-index: 10">
<div class="logo-inner"> <div class="logo-inner">
<img src="../../assets/logo.png" alt="" /> <img src="../../assets/logo.png" alt="img" />
</div> </div>
<div class="logo-right"></div> <div class="logo-right"></div>
</div> </div>
...@@ -353,7 +353,7 @@ export default { ...@@ -353,7 +353,7 @@ export default {
}).then(async () => { }).then(async () => {
let res = await readWholwMsg() let res = await readWholwMsg()
// console.log('res', res); // console.log('res', res);
if (res.data.code == 0) { if (res.code == 200) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '已读所有消息成功!', message: '已读所有消息成功!',
...@@ -406,7 +406,7 @@ export default { ...@@ -406,7 +406,7 @@ export default {
// module: 0, // module: 0,
// }) // })
try { try {
let res = await axios.post(`http://25.66.215.209/gateway/getUser`, null, { let res = await axios.post(SystemConfig.VUE_APP_GET_USER, null, {
timeout: 5000, timeout: 5000,
}); });
// let res = await getIscInfo(); // let res = await getIscInfo();
...@@ -422,15 +422,13 @@ export default { ...@@ -422,15 +422,13 @@ export default {
code: 200, code: 200,
message: "OK", message: "OK",
content: { content: {
id: "FA84A11538656BBCE0430100007F9766", loginName: "weizheng",
loginName: "lhb", name: "魏征",
name: "实物ID运维", mobile: "",
password: "", email: "",
mobile: "", department: "数据运营中心",
email: "", departmentId: "",
department: "数据运营中心", funcList: [],
departmentId: "",
funcList: [],
}, },
}; };
if (res.code === 200) { if (res.code === 200) {
......
<template>
<div class="navbar">
<!-- <el-scrollbar style="height: 800px" ref="scroll"> -->
<el-menu
router
ref="kzMenu"
class="el-menu-vertical-demo"
:unique-opened="true"
@open="handleOpen"
@close="handleClose"
:default-active="activeIndex"
>
<el-menu-item
v-if="wholeRoutes.souYeRoute && wholeRoutes.souYeRoute[0]"
:index="wholeRoutes.souYeRoute[0].url"
class="classmain"
@click="allClose()"
><span class=""></span>
<!-- 首页 -->
{{ wholeRoutes.souYeRoute[0].name }}
</el-menu-item
>
<!-- TODO -->
<!-- 其他菜单项 -->
<template v-for="(item, index) in wholeRoutes.restRoutes">
<!-- 无子菜单的菜单项 -->
<!-- <el-menu-item
v-if="!item.children || item.children.length === 0"
:key="index"
:index="item.url"
>
<i class="el-icon-document"></i>
<span slot="title">{{ item.name }}</span>
</el-menu-item> -->
<!-- 有子菜单的菜单项 -->
<el-submenu :key="index" :index="index + ''" class="submenu1">
<template slot="title">
<span class="iconfont treeIcon1">&#xe644;</span>
<span>{{ item.name }}</span>
</template>
<!-- 二级子菜单 -->
<template v-for="(subItem, subIndex) in item.children">
<!-- 无下级的菜单项 -->
<el-menu-item
v-if="!subItem.children || subItem.children.length === 0"
:key="`${index}-${subIndex}`"
:index="subItem.url"
class="submenu3"
>
<span class="title3"></span>
<span>{{ subItem.name }}</span>
</el-menu-item>
<!-- 有下级的子菜单 -->
<el-submenu
v-else
:key="`${index}-${subIndex}`"
:index="`${index}-${subIndex}`"
class="submenu2"
>
<template slot="title">
<span class="iconfont treeIcon2">&#xe644;</span>
{{ subItem.name }}
</template>
<!-- 三级菜单项 -->
<el-menu-item
v-for="(thirdItem, thirdIndex) in subItem.children"
:key="`${index}-${subIndex}-${thirdIndex}`"
:index="thirdItem.url"
class="submenu3"
>
<span class="title3"></span>
<span>{{ thirdItem.name }}</span>
</el-menu-item>
</el-submenu>
</template>
</el-submenu>
</template>
<!-- TODO -->
</el-menu>
<!-- </el-scrollbar> -->
</div>
</template>
<script>
import { trendsRules } from "@/utils/leftBarRules";
// import { getIscInfo, evaluationMaterials } from "@/api/index";
// import Cookies from 'js-cookie';
export default {
data() {
return {
souYeRoute: [],
menuList: [],
// menuList: trendsRules(99),
isOpen: false,
openeds: ["0"], //默认展开导航栏
activeIndex: "",
routerTabs: [],
keyIndex: " ",
};
},
props: {
wholeRoutes: {
type: Object,
default: () => ({
souYeRoute: [],
restRoutes: []
})
},
// wholeRoutes: {
// type: Object,
// default: () => {}
// },
authority: {
type: Number,
default: "",
},
autho: {
type: String,
default: "",
},
},
watch: {
// wholeRoutes(newVale, oldVale) {
// // console.log('newVale', newVale);
// this.souYeRoute = newVale.souYeRoute
// this.menuList = newVale.restRoutes
// console.log(111, this.menuList);
// },
$route: {
immediate: true,
handler(n, o) {
if (
this.$route.path == "/mainLayout/Compliancefz" ||
this.$route.path == "/mainLayout/Compliance"
) {
this.activeIndex = "/mainLayout/auxiliaryInspection";
} else if (
this.$route.path == "/assesszc/Compliancefz" ||
this.$route.path == "/assesszc/Compliance"
) {
this.activeIndex = "/assesszc/auxiliaryInspection";
} else {
this.activeIndex = this.$route.path;
this.$nextTick(() => {
this.$refs.kzMenu.activeIndex = this.$route.path;
});
}
if (!this.routerTabs.includes(this.$route.meta.title)) {
this.routerTabs.push(this.$route.meta.title);
}
},
},
autho(newVal, oldVal) {
if (newVal == "liyiming") {
this.$router.push({
path: "/mainLayout/confirmRelease",
query: {
madata: newVal,
},
});
} else if (newVal == "wangmeiling") {
this.$router.push({
path: "/mainLayout/confirmRelease",
query: {
madata: newVal,
},
});
} else if (newVal == "mengdejian") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
} else if (newVal == "liwenbo") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
} else if (newVal == "zhangke") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
}
this.$refs.kzMenu.activeIndex = this.$route.path;
},
authority(newVal, oldVal) {
this.menuList = [];
if (newVal == 1) {
this.menuList = trendsRules(1);
this.$router.push({
path: "/mainLayout/auxiliarySelection",
});
this.activeIndex = "/mainLayout/auxiliarySelection";
} else if (newVal == 2) {
this.menuList = trendsRules(2);
this.$router.push({
path: "/mainLayout/confirmRelease",
});
this.activeIndex = "/mainLayout/confirmRelease";
} else if (newVal == 3) {
this.menuList = trendsRules(3);
this.$router.push({
path: "/mainLayout/materialAcquisition",
});
this.activeIndex = "/mainLayout/materialAcquisition";
} else if (newVal == 99) {
this.menuList = trendsRules(99);
// console.log("this.menuList", this.menuList);
this.$router.push({
path: "/mainLayout/auxiliarySelection",
});
this.activeIndex = "/mainLayout/auxiliarySelection";
}
},
},
mounted() {
// console.log(
// "获取父元素的local数据0",
// JSON.parse(window.sessionStorage.getItem("user"))
// );
// console.log(
// "获取父元素的local数据",
// JSON.parse(window.top.sessionStorage.getItem("user"))
// );
// this.handleOpen(0, ["0"]);
if (
this.$route.path == "/mainLayout/Compliancefz" ||
this.$route.path == "/mainLayout/Compliance"
) {
this.activeIndex = "/mainLayout/auxiliaryInspection";
} else {
this.activeIndex = this.$route.path;
}
},
methods: {
handleOpen(e, a) {
// console.log("打开", e, a);
this.keyIndex = e.charAt(0);
// this.$nextTick(() => {
// this.$refs.scroll.update();
// });
if (a.length == 1) {
let treeIcon1 = document.getElementsByClassName("treeIcon1");
for (var i = 0; i < treeIcon1.length; i++) {
treeIcon1[i].style.transform = "rotate(0deg)";
}
treeIcon1[e].style.transform = "rotate(90deg)";
} else if (a.length == 2) {
let opened = document.getElementsByClassName("is-opened");
let treeIcon2 = opened[0].querySelectorAll(".treeIcon2");
for (var i = 0; i < treeIcon2.length; i++) {
treeIcon2[i].style.transform = "rotate(0deg)";
}
treeIcon2[e.slice(2)].style.transform = "rotate(90deg)";
}
},
allClose() {
this.$refs.kzMenu.close(this.keyIndex);
this.handleClose(this.keyIndex, [this.keyIndex]);
},
handleClose(e, a) {
// console.log("关闭", e, a);
if (a.length == 1) {
let treeIcon1 = document.getElementsByClassName("treeIcon1");
treeIcon1[e].style.transform = "rotate(0deg)";
let treeIcon2 = document.getElementsByClassName("treeIcon2");
let treARR = [...treeIcon2];
treARR.forEach((element) => {
element.style.transform = "rotate(0deg)";
});
// console.log(treeIcon2,'treeIcon2treeIcon2treeIcon2treeIcon2')
} else if (a.length == 2) {
let opened = document.getElementsByClassName("is-opened");
let treeIcon2 = opened[0].querySelectorAll(".treeIcon2");
treeIcon2[e.slice(2)].style.transform = "rotate(0deg)";
}
},
handleMenuClick(e, a) {},
},
};
</script>
<style lang="scss" scoped>
.navbar {
width: 235px;
height: 100%;
padding-top: 10px;
overflow-y: auto;
margin-left: 10px;
}
::v-deep.el-menu {
border: none !important;
box-sizing: border-box;
}
.submenu1 {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
}
.submenu1 ::v-deep .el-submenu__title {
height: 40px;
line-height: 40px;
box-shadow: 1px 2px 4px 0px #0068624c;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
}
.submenu2 {
background-color: #effbfa;
margin-top: 8px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
}
.submenu2 ::v-deep .el-submenu__title {
height: 40px;
line-height: 40px;
box-shadow: 1px 2px 4px 0px #0068624c;
font-size: 15px;
font-weight: bold;
color: grey;
text-align: left;
padding-left: 20px !important;
}
::v-deep .el-icon-arrow-down {
display: none;
}
::v-deep .el-submenu__title:hover {
background: transparent;
}
.seticon1 {
display: inline-block;
font-size: 24px;
color: #fff;
border-radius: 50px;
}
.treeIcon1 {
display: inline-block;
color: #ffffff;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
transform: rotate(0deg);
}
.treeIcon2 {
display: inline-block;
color: #000;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
transform: rotate(0deg);
}
.roleICon1 {
display: inline-block;
color: #ffffff;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
}
.title3 {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
margin-right: 5px;
vertical-align: middle;
background-color: #63a4a6;
text-align: left;
}
.submenu3 {
border-radius: 5px;
height: 40px;
line-height: 40px;
font-size: 15px;
font-weight: bold;
color: grey;
text-align: left;
padding-left: 40px !important;
background-color: #effbfa;
margin-top: 8px;
box-shadow: 1px 2px 4px 0px #0068624c;
padding-right: 0;
}
.submenu2 ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.xiangmu {
margin: 0;
}
.xiangmu ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.xuanzhong ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.menu-scrollbar ::v-deep .el-scrollbar__view {
height: 100%; /* 设置高度以填满父容器 */
}
::v-deep.el-scrollbar__thumb {
background-color: #6bcfde; /* 滑块的颜色 */
}
::v-deep
.el-scrollbar__view
> ul:first-child
> li:first-child
> ul
> li:first-child
> .el-submenu__title:first-child
> .treeIcon2 {
transform: rotate(90deg);
}
.classmain {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
height: 40px;
line-height: 40px;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
span {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
background: #fff;
margin-right: 25px;
margin-left: 4px;
vertical-align: middle;
}
}
.sou_ye_style {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
height: 40px;
line-height: 40px;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
span {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
background: #fff;
margin-right: 25px;
margin-left: 4px;
vertical-align: middle;
}
}
</style>
<template>
<div class="navbar">
<!-- <el-scrollbar style="height: 800px" ref="scroll"> -->
<el-menu
router
ref="kzMenu"
class="el-menu-vertical-demo"
:unique-opened="true"
@open="handleOpen"
@close="handleClose"
:default-active="activeIndex"
>
<el-menu-item
index="/mainLayout/mianHome"
class="classmain"
@click="allClose()"
><span class=""></span>首页</el-menu-item
>
<!-- <el-menu-item index="/assesszc/projectView" class="classmain"><span></span>项目知识文档库</el-menu-item> -->
<el-submenu
v-for="(item, index) in menuList"
:key="index"
:index="index + ''"
class="submenu1"
>
<!-- <el-menu-item index="/assesszc/projectView" class="classmain"><span></span>项目档案库</el-menu-item> -->
<template slot="title">
<span class="iconfont treeIcon1">&#xe644;</span>
<span>{{ item.name }}</span>
</template>
<p class="xiangmu">
<el-menu-item
index="/assesszc/projectView"
class="submenu3"
v-if="item.erji"
><span class="title3"></span>项目档案库</el-menu-item
>
</p>
<el-submenu
v-for="(item2, index2) in item.children"
:key="index2"
:index="index + '-' + index2 + ''"
class="submenu2"
>
<template slot="title">
<span class="iconfont treeIcon2">&#xe644;</span>
<span>{{ item2.name }}</span>
</template>
<el-menu-item
v-for="(item3, index3) in item2.children"
:key="index3"
:index="item3.url"
class="submenu3"
>
<span class="title3"></span> {{ item3.name }}
</el-menu-item>
</el-submenu>
</el-submenu>
</el-menu>
<!-- </el-scrollbar> -->
</div>
</template>
<script>
import { trendsRules } from "@/utils/leftBarRules";
export default {
data() {
return {
menuList: trendsRules(99),
isOpen: false,
openeds: ["0"], //默认展开导航栏
activeIndex: "",
routerTabs: [],
keyIndex: " ",
};
},
props: {
authority: {
type: Number,
default: "",
},
autho: {
type: String,
default: "",
},
},
watch: {
$route: {
immediate: true,
handler(n, o) {
if (
this.$route.path == "/mainLayout/Compliancefz" ||
this.$route.path == "/mainLayout/Compliance"
) {
this.activeIndex = "/mainLayout/auxiliaryInspection";
} else if (
this.$route.path == "/assesszc/Compliancefz" ||
this.$route.path == "/assesszc/Compliance"
) {
this.activeIndex = "/assesszc/auxiliaryInspection";
} else {
this.activeIndex = this.$route.path;
this.$nextTick(() => {
this.$refs.kzMenu.activeIndex = this.$route.path;
});
}
if (!this.routerTabs.includes(this.$route.meta.title)) {
this.routerTabs.push(this.$route.meta.title);
}
},
},
autho(newVal, oldVal) {
if (newVal == "liyiming") {
this.$router.push({
path: "/mainLayout/confirmRelease",
query: {
madata: newVal,
},
});
} else if (newVal == "wangmeiling") {
this.$router.push({
path: "/mainLayout/confirmRelease",
query: {
madata: newVal,
},
});
} else if (newVal == "mengdejian") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
} else if (newVal == "liwenbo") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
} else if (newVal == "zhangke") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
}
this.$refs.kzMenu.activeIndex = this.$route.path;
},
authority(newVal, oldVal) {
this.menuList = [];
if (newVal == 1) {
this.menuList = trendsRules(1);
this.$router.push({
path: "/mainLayout/auxiliarySelection",
});
this.activeIndex = "/mainLayout/auxiliarySelection";
} else if (newVal == 2) {
this.menuList = trendsRules(2);
this.$router.push({
path: "/mainLayout/confirmRelease",
});
this.activeIndex = "/mainLayout/confirmRelease";
} else if (newVal == 3) {
this.menuList = trendsRules(3);
this.$router.push({
path: "/mainLayout/materialAcquisition",
});
this.activeIndex = "/mainLayout/materialAcquisition";
} else if (newVal == 99) {
this.menuList = trendsRules(99);
// console.log('this.menuList', this.menuList);
this.$router.push({
path: "/mainLayout/auxiliarySelection",
});
this.activeIndex = "/mainLayout/auxiliarySelection";
}
},
},
mounted() {
// console.log(
// "获取父元素的local数据0",
// JSON.parse(window.sessionStorage.getItem("user"))
// );
// console.log(
// "获取父元素的local数据",
// JSON.parse(window.top.sessionStorage.getItem("user"))
// );
// this.handleOpen(0, ["0"]);
if (
this.$route.path == "/mainLayout/Compliancefz" ||
this.$route.path == "/mainLayout/Compliance"
) {
this.activeIndex = "/mainLayout/auxiliaryInspection";
} else {
this.activeIndex = this.$route.path;
}
},
methods: {
handleOpen(e, a) {
// console.log("打开", e);
this.keyIndex = e.charAt(0);
// this.$nextTick(() => {
// this.$refs.scroll.update();
// });
if (a.length == 1) {
let treeIcon1 = document.getElementsByClassName("treeIcon1");
for (var i = 0; i < treeIcon1.length; i++) {
treeIcon1[i].style.transform = "rotate(0deg)";
}
treeIcon1[e].style.transform = "rotate(90deg)";
} else if (a.length == 2) {
let opened = document.getElementsByClassName("is-opened");
let treeIcon2 = opened[0].querySelectorAll(".treeIcon2");
for (var i = 0; i < treeIcon2.length; i++) {
treeIcon2[i].style.transform = "rotate(0deg)";
}
treeIcon2[e.slice(2)].style.transform = "rotate(90deg)";
}
},
allClose() {
this.$refs.kzMenu.close(this.keyIndex);
this.handleClose(this.keyIndex, [this.keyIndex]);
},
handleClose(e, a) {
// console.log("关闭", e, a);
if (a.length == 1) {
let treeIcon1 = document.getElementsByClassName("treeIcon1");
treeIcon1[e].style.transform = "rotate(0deg)";
let treeIcon2 = document.getElementsByClassName("treeIcon2");
let treARR = [...treeIcon2];
treARR.forEach((element) => {
element.style.transform = "rotate(0deg)";
});
// console.log(treeIcon2,'treeIcon2treeIcon2treeIcon2treeIcon2')
} else if (a.length == 2) {
let opened = document.getElementsByClassName("is-opened");
let treeIcon2 = opened[0].querySelectorAll(".treeIcon2");
treeIcon2[e.slice(2)].style.transform = "rotate(0deg)";
}
},
handleMenuClick(e, a) {},
},
};
</script>
<style lang="scss" scoped>
.navbar {
width: 235px;
height: 100%;
padding-top: 10px;
overflow-y: auto;
margin-left: 10px;
}
::v-deep.el-menu {
border: none !important;
box-sizing: border-box;
}
.submenu1 {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
}
.submenu1 ::v-deep .el-submenu__title {
height: 40px;
line-height: 40px;
box-shadow: 1px 2px 4px 0px #0068624c;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
}
.submenu2 {
background-color: #effbfa;
margin-top: 8px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
}
.submenu2 ::v-deep .el-submenu__title {
height: 40px;
line-height: 40px;
box-shadow: 1px 2px 4px 0px #0068624c;
font-size: 15px;
font-weight: bold;
color: grey;
text-align: left;
padding-left: 20px !important;
}
::v-deep .el-icon-arrow-down {
display: none;
}
::v-deep .el-submenu__title:hover {
background: transparent;
}
.seticon1 {
display: inline-block;
font-size: 24px;
color: #fff;
border-radius: 50px;
}
.treeIcon1 {
display: inline-block;
color: #ffffff;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
transform: rotate(0deg);
}
.treeIcon2 {
display: inline-block;
color: #000;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
transform: rotate(0deg);
}
.roleICon1 {
display: inline-block;
color: #ffffff;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
}
.title3 {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
margin-right: 5px;
vertical-align: middle;
background-color: #63a4a6;
text-align: left;
}
.submenu3 {
border-radius: 5px;
height: 40px;
line-height: 40px;
font-size: 15px;
font-weight: bold;
color: grey;
text-align: left;
padding-left: 40px !important;
background-color: #effbfa;
margin-top: 8px;
box-shadow: 1px 2px 4px 0px #0068624c;
padding-right: 0;
}
.submenu2 ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.xiangmu {
margin: 0;
}
.xiangmu ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.xuanzhong ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.menu-scrollbar ::v-deep .el-scrollbar__view {
height: 100%; /* 设置高度以填满父容器 */
}
::v-deep.el-scrollbar__thumb {
background-color: #6bcfde; /* 滑块的颜色 */
}
::v-deep
.el-scrollbar__view
> ul:first-child
> li:first-child
> ul
> li:first-child
> .el-submenu__title:first-child
> .treeIcon2 {
transform: rotate(90deg);
}
.classmain {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
height: 40px;
line-height: 40px;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
span {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
background: #fff;
margin-right: 25px;
margin-left: 4px;
vertical-align: middle;
}
}
</style>
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
try { try {
let res = await axios.post(`http://25.66.215.209/gateway/getUser`, null, { let res = await axios.post(SystemConfig.VUE_APP_GET_USER, null, {
timeout: 1000, timeout: 1000,
}); });
console.log('gateway/getUser=>res', res); console.log('gateway/getUser=>res', res);
...@@ -343,12 +343,8 @@ export default { ...@@ -343,12 +343,8 @@ export default {
code: 200, code: 200,
message: "OK", message: "OK",
content: { content: {
id: "FA84A11538656BBCE0430100007F9766", loginName: "weizheng",
loginName: "lhb", name: "魏征",
name: "实物ID运维",
password: "",
mobile: "",
email: "",
department: "数据运营中心", department: "数据运营中心",
departmentId: "", departmentId: "",
menuList: [ menuList: [
......
...@@ -68,13 +68,13 @@ ...@@ -68,13 +68,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm()"> <el-button @click="submitForm()">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm('ruleForm')"> <el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('ruleForm')"> <el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<!-- <el-button @click="uploadForm('ruleForm')"> <!-- <el-button @click="uploadForm('ruleForm')">
<img class="buttonIcon" src="../../assets/dr.png" />项目辅助检查上传</el-button <img class="buttonIcon" src="../../assets/dr.png" />项目辅助检查上传</el-button
...@@ -243,32 +243,37 @@ export default { ...@@ -243,32 +243,37 @@ export default {
this.$set(item, 'RectificationText', '未整改') this.$set(item, 'RectificationText', '未整改')
} }
if (item.projectPhase == '' || item.projectPhase == null) { // if (item.projectPhase == '' || item.projectPhase == null) {
} else if (item.projectPhase == '1') { // console.log(111, item.projectPhase);
this.$set(item, 'projectPhase', '项目验收') // } else if (item.projectPhase == '1') {
} else if (item.projectPhase == '2') { // console.log(222, item.projectPhase);
this.$set(item, 'projectPhase', '项目建设') // this.$set(item, 'projectPhase', '项目验收')
} else { // } else if (item.projectPhase == '2') {
this.$set(item, 'projectPhase', '项目前期') // console.log(333, item.projectPhase);
} // this.$set(item, 'projectPhase', '项目建设')
// } else {
// console.log(444, item.projectPhase);
// this.$set(item, 'projectPhase', '项目前期')
// }
}), }),
this.tableData.forEach((item) => { this.tableData.forEach((item) => {
if (item.projectLink == '' || item.projectLink == null) { // if (item.projectLink == '' || item.projectLink == null) {
} else if (item.projectLink == '1') { // console.log(123, item.projectLink);
this.$set(item, 'projectLink', '可研') // } else if (item.projectLink == '1') {
} else if (item.projectLink == '2') { // this.$set(item, 'projectLink', '可研')
this.$set(item, 'projectLink', '计划') // } else if (item.projectLink == '2') {
} else if (item.projectLink == '3') { // this.$set(item, 'projectLink', '计划')
this.$set(item, 'projectLink', '采购') // } else if (item.projectLink == '3') {
} else if (item.projectLink == '4') { // this.$set(item, 'projectLink', '采购')
this.$set(item, 'projectLink', '合同') // } else if (item.projectLink == '4') {
} else if (item.projectLink == '5') { // this.$set(item, 'projectLink', '合同')
this.$set(item, 'projectLink', '执行') // } else if (item.projectLink == '5') {
} else if (item.projectLink == '6') { // this.$set(item, 'projectLink', '执行')
this.$set(item, 'projectLink', '结决算') // } else if (item.projectLink == '6') {
} else { // this.$set(item, 'projectLink', '结决算')
this.$set(item, 'projectLink', '转资') // } else {
} // this.$set(item, 'projectLink', '转资')
// }
}) })
this.total = res.data.total * 1 this.total = res.data.total * 1
} }
......
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm()"> <el-button @click="submitForm()">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm('ruleForm')"> <el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('ruleForm')"> <el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="handleClick()"> <el-button @click="handleClick()">
<img class="buttonIcon" src="../../assets/ck.png" />批量下发</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />批量下发</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -71,13 +71,13 @@ ...@@ -71,13 +71,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm()"> <el-button @click="submitForm()">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('xq')"> <el-button @click="detailsForm('xq')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<!-- <el-button @click="confirm()"> <!-- <el-button @click="confirm()">
<i class="el-icon-chat-dot-square"></i <i class="el-icon-chat-dot-square"></i
......
...@@ -75,13 +75,13 @@ ...@@ -75,13 +75,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<!-- <el-button @click="detailsForm('xq')"> <!-- <el-button @click="detailsForm('xq')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button @click="zgqdauditTasks('xf')" <el-button @click="zgqdauditTasks('xf')"
:disabled="confirmdisabled" :disabled="confirmdisabled"
...@@ -643,16 +643,31 @@ export default { ...@@ -643,16 +643,31 @@ export default {
let response = await downloadObject({ let response = await downloadObject({
fileId: fileId * 1, fileId: fileId * 1,
}); });
// let blob = new Blob([response]);
// if ("download" in document.createElement("a")) {
// let elink = document.createElement("a");
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = fileName;
// elink.style.display = "none";
// elink.href = URL.createObjectURL(blob);
// document.body.appendChild(elink);
// elink.click();
// URL.revokeObjectURL(elink.href); // 释放URL 对象
// document.body.removeChild(elink);
// }
let blob = new Blob([response]); let blob = new Blob([response]);
if ("download" in document.createElement("a")) { if ('download' in document.createElement('a')) {
let elink = document.createElement("a"); let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = fileName; elink.style.display = 'none';
elink.style.display = "none";
elink.href = URL.createObjectURL(blob); // 使用 File 对象创建 URL
const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.href = URL.createObjectURL(file);
document.body.appendChild(elink); document.body.appendChild(elink);
elink.click(); elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象 // 不再使用 URL.revokeObjectURL
document.body.removeChild(elink); document.body.removeChild(elink);
} }
}, },
......
...@@ -72,13 +72,13 @@ ...@@ -72,13 +72,13 @@
<el-form-item class="button"> <el-form-item class="button">
<el-button @click="submitForm('999')"> <el-button @click="submitForm('999')">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button <img alt="img" class="buttonIcon" src="../../assets/cx.png" />查询</el-button
> >
<el-button @click="resetForm()"> <el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button <img alt="img" class="buttonIcon" src="../../assets/cz.png" />重置</el-button
> >
<el-button @click="detailsForm('xq')"> <el-button @click="detailsForm('xq')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button <img alt="img" class="buttonIcon" src="../../assets/ck.png" />详情</el-button
> >
<el-button @click="questionXF()" <el-button @click="questionXF()"
:disabled="inspectdisabled" :disabled="inspectdisabled"
...@@ -512,16 +512,31 @@ this.dialog = true; ...@@ -512,16 +512,31 @@ this.dialog = true;
let response = await downloadObject({ let response = await downloadObject({
fileId: fileId * 1, fileId: fileId * 1,
}); });
// let blob = new Blob([response]);
// if ("download" in document.createElement("a")) {
// let elink = document.createElement("a");
// elink.download = safeFileName // 使用经过净化的文件名
// // elink.download = fileName;
// elink.style.display = "none";
// elink.href = URL.createObjectURL(blob);
// document.body.appendChild(elink);
// elink.click();
// URL.revokeObjectURL(elink.href); // 释放URL 对象
// document.body.removeChild(elink);
// }
let blob = new Blob([response]); let blob = new Blob([response]);
if ("download" in document.createElement("a")) { if ('download' in document.createElement('a')) {
let elink = document.createElement("a"); let elink = document.createElement('a');
elink.download = safeFileName // 使用经过净化的文件名 elink.download = safeFileName; // 使用经过净化的文件名
// elink.download = fileName; elink.style.display = 'none';
elink.style.display = "none";
elink.href = URL.createObjectURL(blob); // 使用 File 对象创建 URL
const file = new File([blob], safeFileName, { type: 'application/octet-stream' });
elink.href = URL.createObjectURL(file);
document.body.appendChild(elink); document.body.appendChild(elink);
elink.click(); elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象 // 不再使用 URL.revokeObjectURL
document.body.removeChild(elink); document.body.removeChild(elink);
} }
}, },
......
const { defineConfig } = require('@vue/cli-service') const { defineConfig } = require('@vue/cli-service')
// const ip = '43.143.211.42';
// const ip = '172.20.10.3';
// const ip = '172.20.10.9'; // 何鹏
// const ip = '192.168.0.120';
// const ip = '192.168.50.1';
// const ip = '192.168.145.116';
// const ip = '192.168.27.116';
module.exports = defineConfig({ module.exports = defineConfig({
transpileDependencies: true, transpileDependencies: true,
//如果是hash模式, publicPath:"";如果是history, publicPath:"/" //如果是hash模式, publicPath:"";如果是history, publicPath:"/"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!