Commit 3cadd990 by 史敦盼

问题修复

1 parent a2effeee
......@@ -24,8 +24,7 @@ export const base64ToBlob = function (base64Data) {
export const getAllBreadcrumbList = (menuList, parent = [], result = {}) => {
for (const item of menuList) {
result[item.path] = [...parent, item]
if (item.children)
getAllBreadcrumbList(item.children, result[item.path], result)
if (item.children) getAllBreadcrumbList(item.children, result[item.path], result)
}
return result
}
......@@ -53,13 +52,13 @@ export async function getDictTypeOptions(key) {
}
/**
* @description: svg字符串转base64
* @param {String} svgCode
* @param {String} svgCode
* @return {String} base64
* @author: pan
*/
export function svgToBase64(svgCode) {
const utf8Bytes = new TextEncoder().encode(svgCode);
return 'data:image/svg+xml;base64,' + btoa(String.fromCharCode.apply(null, utf8Bytes));
export function svgToBase64(svgCode) {
const utf8Bytes = new TextEncoder().encode(svgCode)
return 'data:image/svg+xml;base64,' + btoa(String.fromCharCode.apply(null, utf8Bytes))
}
export function deepClone(source) {
......@@ -67,7 +66,7 @@ export function deepClone(source) {
throw new Error('error arguments', 'deepClone')
}
const targetObj = source.constructor === Array ? [] : {}
Object.keys(source).forEach(keys => {
Object.keys(source).forEach((keys) => {
if (source[keys] && typeof source[keys] === 'object') {
targetObj[keys] = deepClone(source[keys])
} else {
......@@ -75,4 +74,18 @@ export function deepClone(source) {
}
})
return targetObj
}
\ No newline at end of file
}
/**
* @description: 数组对象指定对象字段排序, 相同字段排列一起
* @param {Array} array
* @param {String} key
* @return {Array}
*/
export function sortByKey(array, key) {
return array.sort(function (a, b) {
var x = a[key]
var y = b[key]
return x > y ? -1 : x < y ? 1 : 0
})
}
......@@ -190,8 +190,8 @@
>
<el-table-column label="序号" width="55" type="index"> </el-table-column>
<el-table-column label="材料类别" prop="batchtype"> </el-table-column>
<el-table-column prop="typeText" label="资料类型"> </el-table-column>
<!-- <el-table-column label="材料类别" prop="batchtype"> </el-table-column> -->
<el-table-column prop="materialname" label="资料类型"> </el-table-column>
<el-table-column prop="fileName" label="资料名称">
<template slot-scope="scope" v-if="scope.row.fileName">
{{ scope.row.fileName }}&nbsp;&nbsp;<el-button
......@@ -397,20 +397,21 @@ export default {
Promise.all([fzcxXqselect(params), clqdselect(params2)]).then((res) => {
this.listData = res[0].data.records[0]
this.listData.constructionForm = constructionFormText(this.listData.constructionForm)
this.qdtableData = JSON.parse(JSON.stringify(this.tableDataNew))
if (res[1].data.records.length > 0) {
this.qdtableData = this.qdtableData
.concat(res[1].data.records)
.reduce((accumulator, currentObj) => {
const existingObj = accumulator.find((obj) => obj.typeCode == currentObj.typeCode)
if (existingObj) {
Object.assign(existingObj, currentObj)
} else {
accumulator.push(currentObj)
}
return accumulator
}, [])
}
this.qdtableData = res[1].data.records
// this.qdtableData = JSON.parse(JSON.stringify(this.tableDataNew))
// if (res[1].data.records.length > 0) {
// this.qdtableData = this.qdtableData
// .concat(res[1].data.records)
// .reduce((accumulator, currentObj) => {
// const existingObj = accumulator.find((obj) => obj.typeCode == currentObj.typeCode)
// if (existingObj) {
// Object.assign(existingObj, currentObj)
// } else {
// accumulator.push(currentObj)
// }
// return accumulator
// }, [])
// }
})
},
//表格颜色
......@@ -552,7 +553,7 @@ export default {
let blob = new Blob([response])
if ('download' in document.createElement('a')) {
let elink = document.createElement('a')
elink.download = fileName
elink.download = scope.fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
......
......@@ -147,7 +147,7 @@
<el-dialog
title="复核情况"
:visible.sync="dialogQR"
width="91%"
width="95%"
:modal-append-to-body="false"
:append-to-body="false"
@close="closed"
......@@ -168,19 +168,19 @@
:data="tableDataQR"
height="100%"
tooltip-effect="dark myTooltips"
style="width: 100%"
header-cell-class-name="custom-th-background"
class="eltable"
:row-class-name="tableRowClassName"
:span-method="arraySpanMethod"
border
ref="tableDataQR"
>
<el-table-column label="项目环节" prop="pprojectStage" min-width="100">
<el-table-column label="项目环节" prop="projectStage" min-width="100">
<template v-slot="scope">
{{ projectStageOptions[scope.row.pprojectStage] }}
{{ projectStageOptions[scope.row.projectStage] }}
</template>
</el-table-column>
<el-table-column label="序号" width="40" type="index"> </el-table-column>
<el-table-column label="序号" min-width="40" type="index"> </el-table-column>
<el-table-column
label="问题检查项"
......@@ -203,7 +203,7 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="问题截图" width="auto">
<el-table-column label="问题截图" min-width="100">
<template slot-scope="scope">
<el-image
class="imgList"
......@@ -428,6 +428,7 @@ import {
} from '@/api/index'
import { generateYearOptions, constructionFormText } from '@/utils/cache'
import tableMixin from '@/mixins/table.mixin.js'
import { sortByKey } from '@/utils/index'
export default {
mixins: [tableMixin],
data() {
......@@ -480,7 +481,7 @@ export default {
tableDataQR: [],
confirmdisabled: false,
inspectdisabled: false,
projectStageOptions: [null, '可研', '采购', '合同', '执行', '结决算及转资'],
projectStageOptions: [null, '可研', '计划', '采购', '合同', '执行', '结决算及转资'],
}
},
mounted() {
......@@ -613,6 +614,7 @@ export default {
this.tableDataQR.forEach((val) => {
this.$set(val, 'prob', Array.from(new Set(arrs)))
})
this.tableDataQR = sortByKey(this.tableDataQR, 'projectStage').reverse()
this.dataPretreatment()
}
},
......@@ -954,11 +956,14 @@ export default {
if (!this.form.evalQues) {
return this.$message.warning('请填写问题描述')
}
const obj =
this.quesoptions.find((item) => item.quesCheckItem == this.form.quesCheckItem) || {}
let params = {
...this.form,
isProblem: '1',
batchId: this.checkedList[0].batchId,
projectId: this.checkedList[0].projectCode,
projectStage: obj.questionId,
}
let res = await xzwtpostEvalQuesInfo(params)
if (res.code == 200) {
......
<template>
<div class="main">
<div class="main flex-column">
<div class="close"><i class="el-icon-circle-close" @click="cancel()"></i></div>
<p class="title" :class="dialogFullScreen ? 'noShow' : ''">{{ projectName }}</p>
<div class="continer">
<div class="continer flex-column">
<div class="top" :class="dialogFullScreen ? 'noShow' : ''">
<el-steps :active="active" align-center finish-status="success">
<el-step
......@@ -14,7 +14,7 @@
</el-steps>
</div>
<div class="content">
<div class="left">
<div class="left flex-column">
<p class="tableTitle">
检查内容
<i class="el-icon-full-screen" @click="dialogFullScreen = !dialogFullScreen"></i>
......@@ -59,7 +59,7 @@
</el-tab-pane>
</el-tabs>
</div>
<div class="right">
<div class="right flex-column">
<p class="tableTitle">检查项</p>
<div :class="dialogFullScreen ? 'rightscollBig' : 'rightscoll'">
<div class="rightContent" v-for="item in questionList" :key="item.questionId">
......@@ -712,6 +712,8 @@ export default {
position: relative;
box-sizing: border-box;
padding-top: 5px;
padding-bottom: 0;
min-height: 0;
.top {
width: 70%;
margin: 0 auto;
......@@ -723,14 +725,35 @@ export default {
margin-top: 10px;
display: flex;
position: relative;
flex: 1;
min-height: 0;
padding-bottom: 50px;
}
.left {
width: 49%;
min-height: 100px;
background: #fff;
margin-bottom: 50px;
// margin-bottom: 50px;
// color: #fff;
/deep/ .el-tabs {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
.el-tabs__content {
flex: 1;
.el-tab-pane {
display: flex;
flex-direction: column;
height: 100%;
.iframeDiv {
flex: 1;
}
}
}
}
}
.right {
width: 50%;
......@@ -796,6 +819,7 @@ export default {
padding-left: 20px;
font-weight: 600;
font-size: 15px;
margin: 0;
}
.rightContent {
......@@ -863,7 +887,7 @@ export default {
right: 0;
z-index: 100;
background-color: #f5f5f6;
line-height: 70px;
line-height: 50px;
box-sizing: border-box;
margin: 0;
span {
......
......@@ -296,7 +296,7 @@
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" min-width="110"> </el-table-column>
<el-table-column label="操作" min-width="130">
<el-table-column label="操作" min-width="130" fixed="right">
<template slot-scope="scope">
<el-button
@click="handleClick(scope.row, scope.$index, addtableData)"
......@@ -750,7 +750,12 @@ export default {
this.addtableData = [...this.addtableData, ...this.addZJList]
this.addtableData = this.addtableData.filter((obj, index, self) => {
return index == self.findIndex((t) => t.projectCode == obj.projectCode)
return (
index ==
self.findIndex(
(t) => t.projectCode == obj.projectCode && t.contractNumber == obj.contractNumber,
)
)
})
this.addtotal = this.addtableData.length
this.dialogAddzj = false
......@@ -1240,13 +1245,13 @@ export default {
.eltable {
box-sizing: border-box;
text-align: center;
width: 190%;
min-width: 190%;
// width: 190%;
// min-width: 190%;
}
/deep/.el-table--scrollable-x .el-table__body-wrapper {
overflow-x: hidden !important;
}
// /deep/.el-table--scrollable-x .el-table__body-wrapper {
// overflow-x: hidden !important;
// }
}
// .setscrolldialogx {
// width: 100%;
......@@ -1273,9 +1278,9 @@ export default {
width: 190%;
min-width: 190%;
}
/deep/.el-table--scrollable-x .el-table__body-wrapper {
overflow-x: hidden !important;
}
// /deep/.el-table--scrollable-x .el-table__body-wrapper {
// overflow-x: hidden !important;
// }
}
::v-deep.el-table::before {
display: none !important;
......@@ -1292,9 +1297,9 @@ export default {
width: 190%;
min-width: 190%;
}
/deep/.el-table--scrollable-x .el-table__body-wrapper {
overflow-x: hidden !important;
}
// /deep/.el-table--scrollable-x .el-table__body-wrapper {
// overflow-x: hidden !important;
// }
}
.tipred {
color: red;
......
......@@ -437,6 +437,7 @@ import {
} from '@/api/index'
import { generateYearOptions, constructionFormText } from '@/utils/cache'
import tableMixin from '@/mixins/table.mixin.js'
import { sortByKey } from '@/utils/index'
export default {
mixins: [tableMixin],
data() {
......@@ -635,7 +636,7 @@ export default {
this.tableDataQR.forEach((val) => {
this.$set(val, 'prob', Array.from(new Set(arr)))
})
this.tableDataQR = sortByKey(this.tableDataQR, 'projectStage').reverse()
this.dataPretreatment()
}
},
......
......@@ -190,8 +190,8 @@
>
<el-table-column label="序号" width="55" type="index"> </el-table-column>
<el-table-column label="材料类别" prop="batchtype"> </el-table-column>
<el-table-column prop="typeText" label="资料类型"> </el-table-column>
<!-- <el-table-column label="材料类别" prop="batchtype"> </el-table-column> -->
<el-table-column prop="materialname" label="资料类型"> </el-table-column>
<el-table-column prop="fileName" label="资料名称">
<template slot-scope="scope" v-if="scope.row.fileName">
{{ scope.row.fileName }}&nbsp;&nbsp;<el-button
......@@ -397,20 +397,21 @@ export default {
Promise.all([fzcxXqselect(params), clqdselect(params2)]).then((res) => {
this.listData = res[0].data.records[0]
this.listData.constructionForm = constructionFormText(this.listData.constructionForm)
this.qdtableData = JSON.parse(JSON.stringify(this.tableDataNew))
if (res[1].data.records.length > 0) {
this.qdtableData = this.qdtableData
.concat(res[1].data.records)
.reduce((accumulator, currentObj) => {
const existingObj = accumulator.find((obj) => obj.typeCode == currentObj.typeCode)
if (existingObj) {
Object.assign(existingObj, currentObj)
} else {
accumulator.push(currentObj)
}
return accumulator
}, [])
}
this.qdtableData = res[1].data.records
// this.qdtableData = JSON.parse(JSON.stringify(this.tableDataNew))
// if (res[1].data.records.length > 0) {
// this.qdtableData = this.qdtableData
// .concat(res[1].data.records)
// .reduce((accumulator, currentObj) => {
// const existingObj = accumulator.find((obj) => obj.typeCode == currentObj.typeCode)
// if (existingObj) {
// Object.assign(existingObj, currentObj)
// } else {
// accumulator.push(currentObj)
// }
// return accumulator
// }, [])
// }
})
},
//表格颜色
......@@ -552,7 +553,7 @@ export default {
let blob = new Blob([response])
if ('download' in document.createElement('a')) {
let elink = document.createElement('a')
elink.download = fileName
elink.download = scope.fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
......
......@@ -175,9 +175,9 @@
:span-method="arraySpanMethod"
border
>
<el-table-column label="项目环节" prop="pprojectStage" min-width="100">
<el-table-column label="项目环节" prop="projectStage" min-width="100">
<template v-slot="scope">
{{ projectStageOptions[scope.row.pprojectStage] }}
{{ projectStageOptions[scope.row.projectStage] }}
</template>
</el-table-column>
<el-table-column label="序号" width="40" type="index"> </el-table-column>
......@@ -428,6 +428,7 @@ import {
} from '@/api/indexzc'
import { generateYearOptions, constructionFormText } from '@/utils/cache'
import tableMixin from '@/mixins/table.mixin.js'
import { sortByKey } from '@/utils/index'
export default {
mixins: [tableMixin],
data() {
......@@ -480,7 +481,7 @@ export default {
tableDataQR: [],
confirmdisabled: false,
inspectdisabled: false,
projectStageOptions: [null, '可研', '采购', '合同', '执行', '结决算及转资'],
projectStageOptions: [null, '可研', '计划', '采购', '合同', '执行', '结决算及转资'],
}
},
mounted() {
......@@ -613,6 +614,7 @@ export default {
this.tableDataQR.forEach((val) => {
this.$set(val, 'prob', Array.from(new Set(arrs)))
})
this.tableDataQR = sortByKey(this.tableDataQR, 'projectStage').reverse()
this.dataPretreatment()
}
},
......@@ -953,11 +955,14 @@ export default {
if (!this.form.evalQues) {
return this.$message.warning('请填写问题描述')
}
const obj =
this.quesoptions.find((item) => item.quesCheckItem == this.form.quesCheckItem) || {}
let params = {
...this.form,
isProblem: '1',
batchId: this.checkedList[0].batchId,
projectId: this.checkedList[0].projectCode,
projectStage: obj.questionId,
}
let res = await xzwtpostEvalQuesInfo(params)
if (res.code == 200) {
......
<template>
<div class="main">
<div class="main flex-column">
<div class="close">
<i class="el-icon-circle-close" @click="cancel()"></i>
</div>
<p class="title" :class="dialogFullScreen ? 'noShow' : ''">
{{ projectName }}
</p>
<div class="continer">
<div class="continer flex-column">
<div class="top" :class="dialogFullScreen ? 'noShow' : ''">
<el-steps :active="active" align-center finish-status="success">
<el-step
......@@ -18,7 +18,7 @@
</el-steps>
</div>
<div class="content">
<div class="left">
<div class="left flex-column">
<p class="tableTitle">
检查内容
<i class="el-icon-full-screen" @click="dialogFullScreen = !dialogFullScreen"></i>
......@@ -63,7 +63,7 @@
</el-tab-pane>
</el-tabs>
</div>
<div class="right">
<div class="right flex-column">
<p class="tableTitle">检查项</p>
<div :class="dialogFullScreen ? 'rightscollBig' : 'rightscoll'">
<div class="rightContent" v-for="item in questionList" :key="item.questionId">
......@@ -758,6 +758,8 @@ export default {
position: relative;
box-sizing: border-box;
padding-top: 5px;
padding-bottom: 0;
min-height: 0;
.top {
width: 70%;
margin: 0 auto;
......@@ -769,14 +771,34 @@ export default {
margin-top: 10px;
display: flex;
position: relative;
flex: 1;
min-height: 0;
padding-bottom: 50px;
}
.left {
width: 49%;
min-height: 100px;
background: #fff;
margin-bottom: 50px;
// margin-bottom: 50px;
// color: #fff;
/deep/ .el-tabs {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
.el-tabs__content {
flex: 1;
.el-tab-pane {
display: flex;
flex-direction: column;
height: 100%;
.iframeDiv {
flex: 1;
}
}
}
}
}
.right {
width: 50%;
......@@ -842,6 +864,7 @@ export default {
padding-left: 20px;
font-weight: 600;
font-size: 15px;
margin: 0;
}
.rightContent {
......@@ -909,7 +932,7 @@ export default {
right: 0;
z-index: 100;
background-color: #f5f5f6;
line-height: 70px;
line-height: 50px;
box-sizing: border-box;
margin: 0;
span {
......
......@@ -292,7 +292,7 @@
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" min-width="110"> </el-table-column>
<el-table-column label="操作" min-width="130">
<el-table-column label="操作" min-width="130" fixed="right">
<template slot-scope="scope">
<el-button
@click="handleClick(scope.row, scope.$index, addtableData)"
......@@ -745,7 +745,12 @@ export default {
this.addtableData = [...this.addtableData, ...this.addZJList]
this.addtableData = this.addtableData.filter((obj, index, self) => {
return index == self.findIndex((t) => t.projectCode == obj.projectCode)
return (
index ==
self.findIndex(
(t) => t.projectCode == obj.projectCode && t.contractNumber == obj.contractNumber,
)
)
})
this.addtotal = this.addtableData.length
this.dialogAddzj = false
......@@ -1217,8 +1222,8 @@ export default {
.eltable {
box-sizing: border-box;
text-align: center;
width: 190%;
min-width: 190%;
// width: 190%;
// min-width: 190%;
}
/deep/.el-table--scrollable-x .el-table__body-wrapper {
......@@ -1235,13 +1240,13 @@ export default {
.eltable {
box-sizing: border-box;
text-align: center;
width: 190%;
min-width: 190%;
// width: 190%;
// min-width: 190%;
}
/deep/.el-table--scrollable-x .el-table__body-wrapper {
overflow-x: hidden !important;
}
// /deep/.el-table--scrollable-x .el-table__body-wrapper {
// overflow-x: hidden !important;
// }
}
// .setscrolldialogx {
// width: 100%;
......@@ -1268,9 +1273,9 @@ export default {
width: 190%;
min-width: 190%;
}
/deep/.el-table--scrollable-x .el-table__body-wrapper {
overflow-x: hidden !important;
}
// /deep/.el-table--scrollable-x .el-table__body-wrapper {
// overflow-x: hidden !important;
// }
}
::v-deep.el-table::before {
display: none !important;
......
......@@ -436,6 +436,7 @@ import {
} from '@/api/indexzc'
import { generateYearOptions, constructionFormText } from '@/utils/cache'
import tableMixin from '@/mixins/table.mixin.js'
import { sortByKey } from '@/utils/index'
export default {
mixins: [tableMixin],
data() {
......@@ -634,7 +635,7 @@ export default {
this.tableDataQR.forEach((val) => {
this.$set(val, 'prob', Array.from(new Set(arr)))
})
this.tableDataQR = sortByKey(this.tableDataQR, 'projectStage').reverse()
this.dataPretreatment()
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!