提交 19beccee authored 作者: CRS's avatar CRS

new

上级 197f3e84
......@@ -9,7 +9,9 @@ module.exports = {
],
"globals": {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
'SharedArrayBuffer': 'readonly',
'require': true
},
'parserOptions': {
'ecmaVersion': 2018,
......
差异被折叠。
......@@ -12,7 +12,9 @@
"core-js": "^3.6.4",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
"html2canvas": "^1.0.0-rc.5",
"jquery": "^3.4.1",
"jspdf": "^1.5.3",
"moment": "^2.24.0",
"node-sass": "^4.13.1",
"vue": "^2.6.11",
......
......@@ -13,6 +13,7 @@
<el-select v-model="classVal" @change="search('search')" placeholder="请选择" clearable>
<el-option
v-for="item in companyClass"
:key="typeCompany(item)"
:label="typeCompany(item)"
:value="typeCompany(item)">
</el-option>
......
......@@ -13,6 +13,7 @@
<el-select v-model="classVal" @change="search('search')" placeholder="请选择" clearable>
<el-option
v-for="item in companyClass"
:key="typeCompany(item)"
:label="typeCompany(item)"
:value="typeCompany(item)">
</el-option>
......@@ -194,7 +195,7 @@ export default {
},
// 单位准入状态转换
statusCompany (row) {
return row.status === 1 ? '已准入': '未准入'
return row.status === 1 ? '已准入' : '未准入'
},
// 单位类别转换
typeCompany (row) {
......
......@@ -164,7 +164,7 @@ export default {
},
// 准入状态转换
statusChange(row) {
return row.status === 1 ? '已准入': '未准入'
return row.status === 1 ? '已准入' : '未准入'
},
// 搜索
search(val) {
......
......@@ -12,7 +12,7 @@
</span>
<span class="addVal">
<span>产品组合:</span>
<span v-for="item in techNameList" style="color: #666;border: 1px solid rgba(8,104,157,.3); background-color: #f5f7fa; margin-left: 8px">{{formChange(item.form)}}</span>
<span v-for="item in techNameList" :key="item.form" style="color: #666;border: 1px solid rgba(8,104,157,.3); background-color: #f5f7fa; margin-left: 8px">{{formChange(item.form)}}</span>
</span>
</p>
</div>
......
This image diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
......@@ -127,7 +127,7 @@ export default {
for (let item of this.allData) {
item.startTime = this.timeC(item.startTime);
item.endTime = this.timeC(item.endTime);
item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' :item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : '';
item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' : item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : '';
}
} else {
this.$message.error(res.data.msg);
......@@ -145,7 +145,7 @@ export default {
for (let item of this.allData) {
item.startTime = this.timeC(item.startTime);
item.endTime = this.timeC(item.endTime);
item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' :item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : '';
item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' : item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : '';
}
} else {
this.$message.error(res.data.msg);
......
......@@ -76,7 +76,7 @@
<span>当前进度</span>
</p>
<div class="processAll">
<p class="process" v-for="item of marker">
<p class="process" v-for="item of marker" :key="item.name">
<span>{{item.name}}</span>
<span>{{item.time}}</span>
<span class="processList"></span>
......
......@@ -23,7 +23,7 @@
<div class="one">
<div class="oneTitle"> <i></i>概要</div>
<div class="lineTop">
<span>导出PDF格式</span>
<span @click="jump">导出PDF格式</span>
<span @click="reback">改造替换</span>
<span @click="goBackprev">关闭</span>
<!-- <div ><span @click="goBackprev">返回</span> -->
......@@ -882,6 +882,17 @@ export default {
},
// 方法集合
methods: {
jump() {
const {href} = this.$router.resolve({
path: 'otherPdf',
query: {
username: this.$route.query.username,
id: this.$route.query.id,
popp: this.popp.basic
}
});
window.open(href, '_blank');
},
goBackprev(){
this.$router.push({name:'evaluationReport', query:{
username: this.$route.query.username,
......@@ -1369,17 +1380,13 @@ export default {
top: -100px;
/*20200318*/
border-radius: 5px;
cursor: pointer;
}
.lineTop>span:hover {
/*background: #1E8255; */ /*20200318*/
/*20200318*/
background: #1c45a4;
}
/*20200309*/
.lineTop>span:first-child {
background: #cccccc;
color: #fff;
}
.lineTop>span:first-child {
right: 290px;
}
......
......@@ -62,11 +62,11 @@ export default {
mounted() {
console.log(this.detailData)
if (this.modalName === '修改规则') {
let row = JSON.stringify(this.detailData); //克隆影响原数据需要处理一下
let row = JSON.stringify(this.detailData); // 克隆影响原数据需要处理一下
let obj = JSON.parse(row)
obj.suffix = obj.suffix.split(",")
obj.suffix = obj.suffix.split(',')
this.oldRule = JSON.parse(row);
this.oldRule.suffix = this.oldRule.suffix.split(",")
this.oldRule.suffix = this.oldRule.suffix.split(',')
this.form = {
target:this.detailData.target,
suffix: obj.suffix,
......@@ -104,7 +104,7 @@ export default {
id: this.detailData.id,
oldRule: this.form
};
obj.suffix = obj.suffix.join(",")
obj.suffix = obj.suffix.join(',')
console.log(this.detailData.id)
if (this.modalName === '修改规则') {
this.$server.editConfigUpdate(obj).then(res => {
......
......@@ -12,7 +12,8 @@ Vue.prototype.$echarts = echarts;
Vue.prototype.$store = store;
Vue.prototype.$server = server;
Vue.config.productionTip = false;
import htmlToPdf from './tools/htmlToPdf' // 导出pdf npm install html2canvas jspdf --save
Vue.use(htmlToPdf)
new Vue({
router,
store,
......
......@@ -5,6 +5,11 @@ Vue.use(Router)
export default new Router({
routes:[
{
path: '/otherPdf',
name: 'otherPdf',
component: resolve => require(['../components/otherPdf/otherPdf.vue'], resolve)
},
{
path: '/mainView',
name: 'mainView',
......
......@@ -26,7 +26,6 @@ axios.interceptors.request.use(function (config) {
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
console.log(response.data)
if (response.data.code === 403) {
v.$message.error(response.data.msg);
setTimeout(function () {
......
......@@ -365,12 +365,12 @@ const server = {
})
},
pgName(name){
return axios( assess + '/evaluation/in/'+ name,{
return axios( assess + '/evaluation/in/' + name,{
method:'get',
})
},
getTechnology(data){
return axios( assess + '/evaluation/eva?id='+data.id+'&name='+data.name,{
return axios( assess + '/evaluation/eva?id=' + data.id + '&name=' + data.name,{
method:'get',
})
},
......@@ -388,6 +388,11 @@ const server = {
method:'post',
data:qs.stringify(data)
})
},
getExcel(id){
return axios( assess + '/evaluation/in/excel/' + id,{
method:'get'
})
}
}
export default server;
// 导出页面为PDF格式
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
export default {
install (Vue, options) {
Vue.prototype.getPdf = function () {
let title = this.htmlTitle
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
}).then(function (canvas) {
let contentWidth = canvas.width
let contentHeight = canvas.height
let pageHeight = contentWidth / 595 * 842
let leftHeight = contentHeight
let position = 0
let imgWidth = 595
let imgHeight = 595 / contentWidth * contentHeight
let pageData = canvas.toDataURL('image/jpeg', 1.0)
let PDF = new JsPDF('', 'pt', 'a4')
if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 842
if (leftHeight > 0) {
PDF.addPage()
}
}
}
PDF.save(title + '.pdf')
})
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论