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

new

上级 197f3e84
...@@ -9,7 +9,9 @@ module.exports = { ...@@ -9,7 +9,9 @@ module.exports = {
], ],
"globals": { "globals": {
'Atomics': 'readonly', 'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly' 'SharedArrayBuffer': 'readonly',
'require': true
}, },
'parserOptions': { 'parserOptions': {
'ecmaVersion': 2018, 'ecmaVersion': 2018,
......
差异被折叠。
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
"core-js": "^3.6.4", "core-js": "^3.6.4",
"echarts": "^4.6.0", "echarts": "^4.6.0",
"element-ui": "^2.13.0", "element-ui": "^2.13.0",
"html2canvas": "^1.0.0-rc.5",
"jquery": "^3.4.1", "jquery": "^3.4.1",
"jspdf": "^1.5.3",
"moment": "^2.24.0", "moment": "^2.24.0",
"node-sass": "^4.13.1", "node-sass": "^4.13.1",
"vue": "^2.6.11", "vue": "^2.6.11",
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<el-select v-model="classVal" @change="search('search')" placeholder="请选择" clearable> <el-select v-model="classVal" @change="search('search')" placeholder="请选择" clearable>
<el-option <el-option
v-for="item in companyClass" v-for="item in companyClass"
:key="typeCompany(item)"
:label="typeCompany(item)" :label="typeCompany(item)"
:value="typeCompany(item)"> :value="typeCompany(item)">
</el-option> </el-option>
...@@ -140,7 +141,7 @@ export default { ...@@ -140,7 +141,7 @@ export default {
this.allData = res.data.data.rows; this.allData = res.data.data.rows;
this.totalLength = res.data.data.total; this.totalLength = res.data.data.total;
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}) })
}, },
// 点击分页 // 点击分页
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<el-select v-model="classVal" @change="search('search')" placeholder="请选择" clearable> <el-select v-model="classVal" @change="search('search')" placeholder="请选择" clearable>
<el-option <el-option
v-for="item in companyClass" v-for="item in companyClass"
:key="typeCompany(item)"
:label="typeCompany(item)" :label="typeCompany(item)"
:value="typeCompany(item)"> :value="typeCompany(item)">
</el-option> </el-option>
...@@ -194,7 +195,7 @@ export default { ...@@ -194,7 +195,7 @@ export default {
}, },
// 单位准入状态转换 // 单位准入状态转换
statusCompany (row) { statusCompany (row) {
return row.status === 1 ? '已准入': '未准入' return row.status === 1 ? '已准入' : '未准入'
}, },
// 单位类别转换 // 单位类别转换
typeCompany (row) { typeCompany (row) {
...@@ -216,7 +217,7 @@ export default { ...@@ -216,7 +217,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}) })
}, },
// 单位查看详情 // 单位查看详情
......
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}) })
}, },
// 产品分类转换 // 产品分类转换
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
}, },
// 准入状态转换 // 准入状态转换
statusChange(row) { statusChange(row) {
return row.status === 1 ? '已准入': '未准入' return row.status === 1 ? '已准入' : '未准入'
}, },
// 搜索 // 搜索
search(val) { search(val) {
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}) })
}, },
// 点击分页 // 点击分页
...@@ -253,7 +253,7 @@ export default { ...@@ -253,7 +253,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}) })
}, },
// 产品详情 // 产品详情
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</span> </span>
<span class="addVal"> <span class="addVal">
<span>产品组合:</span> <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> </span>
</p> </p>
</div> </div>
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}) })
} }
}, },
......
This image diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
...@@ -127,10 +127,10 @@ export default { ...@@ -127,10 +127,10 @@ export default {
for (let item of this.allData) { for (let item of this.allData) {
item.startTime = this.timeC(item.startTime); item.startTime = this.timeC(item.startTime);
item.endTime = this.timeC(item.endTime); 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 { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
for (let item of this.allData) { for (let item of this.allData) {
item.startTime = this.timeC(item.startTime); item.startTime = this.timeC(item.startTime);
item.endTime = this.timeC(item.endTime); 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 { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<span>当前进度</span> <span>当前进度</span>
</p> </p>
<div class="processAll"> <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.name}}</span>
<span>{{item.time}}</span> <span>{{item.time}}</span>
<span class="processList"></span> <span class="processList"></span>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="one"> <div class="one">
<div class="oneTitle"> <i></i>概要</div> <div class="oneTitle"> <i></i>概要</div>
<div class="lineTop"> <div class="lineTop">
<span>导出PDF格式</span> <span @click="jump">导出PDF格式</span>
<span @click="reback">改造替换</span> <span @click="reback">改造替换</span>
<span @click="goBackprev">关闭</span> <span @click="goBackprev">关闭</span>
<!-- <div ><span @click="goBackprev">返回</span> --> <!-- <div ><span @click="goBackprev">返回</span> -->
...@@ -882,6 +882,17 @@ export default { ...@@ -882,6 +882,17 @@ export default {
}, },
// 方法集合 // 方法集合
methods: { 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(){ goBackprev(){
this.$router.push({name:'evaluationReport', query:{ this.$router.push({name:'evaluationReport', query:{
username: this.$route.query.username, username: this.$route.query.username,
...@@ -1369,17 +1380,13 @@ export default { ...@@ -1369,17 +1380,13 @@ export default {
top: -100px; top: -100px;
/*20200318*/ /*20200318*/
border-radius: 5px; border-radius: 5px;
cursor: pointer;
} }
.lineTop>span:hover { .lineTop>span:hover {
/*background: #1E8255; */ /*20200318*/ /*background: #1E8255; */ /*20200318*/
/*20200318*/ /*20200318*/
background: #1c45a4; background: #1c45a4;
} }
/*20200309*/
.lineTop>span:first-child {
background: #cccccc;
color: #fff;
}
.lineTop>span:first-child { .lineTop>span:first-child {
right: 290px; right: 290px;
} }
......
...@@ -62,23 +62,23 @@ export default { ...@@ -62,23 +62,23 @@ export default {
mounted() { mounted() {
console.log(this.detailData) console.log(this.detailData)
if (this.modalName === '修改规则') { if (this.modalName === '修改规则') {
let row = JSON.stringify(this.detailData); //克隆影响原数据需要处理一下 let row = JSON.stringify(this.detailData); // 克隆影响原数据需要处理一下
let obj = JSON.parse(row) let obj = JSON.parse(row)
obj.suffix = obj.suffix.split(",") obj.suffix = obj.suffix.split(',')
this.oldRule = JSON.parse(row); this.oldRule = JSON.parse(row);
this.oldRule.suffix = this.oldRule.suffix.split(",") this.oldRule.suffix = this.oldRule.suffix.split(',')
this.form = { this.form = {
target:this.detailData.target, target:this.detailData.target,
suffix: obj.suffix, suffix: obj.suffix,
technologyId:this.detailData.technologyId, technologyId:this.detailData.technologyId,
id:this.detailData.id id:this.detailData.id
} }
// this.oldRule = { // this.oldRule = {
// target: this.detailData.target, // target: this.detailData.target,
// suffix: this.detailData.suffix, // suffix: this.detailData.suffix,
// technologyId: this.detailData.technologyId // technologyId: this.detailData.technologyId
// } // }
} }
this.getAll(); this.getAll();
}, },
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
id: this.detailData.id, id: this.detailData.id,
oldRule: this.form oldRule: this.form
}; };
obj.suffix = obj.suffix.join(",") obj.suffix = obj.suffix.join(',')
console.log(this.detailData.id) console.log(this.detailData.id)
if (this.modalName === '修改规则') { if (this.modalName === '修改规则') {
this.$server.editConfigUpdate(obj).then(res => { this.$server.editConfigUpdate(obj).then(res => {
...@@ -168,4 +168,4 @@ export default { ...@@ -168,4 +168,4 @@ export default {
.add-role .company-content>>>.el-input__inner, .add-role .company-content>>>.el-input{ .add-role .company-content>>>.el-input__inner, .add-role .company-content>>>.el-input{
width: 220px; width: 220px;
} }
</style> </style>
\ No newline at end of file
...@@ -12,7 +12,8 @@ Vue.prototype.$echarts = echarts; ...@@ -12,7 +12,8 @@ Vue.prototype.$echarts = echarts;
Vue.prototype.$store = store; Vue.prototype.$store = store;
Vue.prototype.$server = server; Vue.prototype.$server = server;
Vue.config.productionTip = false; Vue.config.productionTip = false;
import htmlToPdf from './tools/htmlToPdf' // 导出pdf npm install html2canvas jspdf --save
Vue.use(htmlToPdf)
new Vue({ new Vue({
router, router,
store, store,
......
...@@ -5,6 +5,11 @@ Vue.use(Router) ...@@ -5,6 +5,11 @@ Vue.use(Router)
export default new Router({ export default new Router({
routes:[ routes:[
{
path: '/otherPdf',
name: 'otherPdf',
component: resolve => require(['../components/otherPdf/otherPdf.vue'], resolve)
},
{ {
path: '/mainView', path: '/mainView',
name: 'mainView', name: 'mainView',
......
...@@ -26,7 +26,6 @@ axios.interceptors.request.use(function (config) { ...@@ -26,7 +26,6 @@ axios.interceptors.request.use(function (config) {
// 添加响应拦截器 // 添加响应拦截器
axios.interceptors.response.use(function (response) { axios.interceptors.response.use(function (response) {
console.log(response.data)
if (response.data.code === 403) { if (response.data.code === 403) {
v.$message.error(response.data.msg); v.$message.error(response.data.msg);
setTimeout(function () { setTimeout(function () {
......
...@@ -365,12 +365,12 @@ const server = { ...@@ -365,12 +365,12 @@ const server = {
}) })
}, },
pgName(name){ pgName(name){
return axios( assess + '/evaluation/in/'+ name,{ return axios( assess + '/evaluation/in/' + name,{
method:'get', method:'get',
}) })
}, },
getTechnology(data){ 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', method:'get',
}) })
}, },
...@@ -388,6 +388,11 @@ const server = { ...@@ -388,6 +388,11 @@ const server = {
method:'post', method:'post',
data:qs.stringify(data) data:qs.stringify(data)
}) })
},
getExcel(id){
return axios( assess + '/evaluation/in/excel/' + id,{
method:'get'
})
} }
} }
export default server; 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论