433 lines
12 KiB
Java
433 lines
12 KiB
Java
<template>
|
||
<div class="doc-detail">
|
||
<div class="doc-detail-wrap">
|
||
<div class="doc-detail-header" style="position: fixed;top: 0">
|
||
<div class="doc-detail-title">
|
||
<!-- <span style="line-height: 66px;display: inline-block;float: left">-->
|
||
<!-- <a-icon type="home" style="margin-right: 6px;"/>-->
|
||
<!-- </span>-->
|
||
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
|
||
</div>
|
||
<div class="doc-detail-right">
|
||
<div @click="CurrentStandard" class="operator-text-text" :title="$t('initiateSupplementaryProcess')">
|
||
<a-icon type="profile"/>
|
||
{{$t('initiateSupplementaryProcess')}}
|
||
</div>
|
||
<div @click="endProcessClick"
|
||
v-if="this.$route.query.createBy == this.userInfoQuery.username
|
||
&& this.$route.query.flowStatus == 'Underway'"
|
||
class="operator-text-text" :title="$t('endProcess')">
|
||
<a-icon type="profile"/>
|
||
{{$t('endProcess')}}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div style="padding-top: 68px;background: #fff">
|
||
<div class="detail-content">
|
||
<div class="content-box">
|
||
<!-- <div class="header-text">-->
|
||
<!-- <a-button class="box-button-top" type="primary" @click="CurrentStandard">-->
|
||
<!-- {{$t('initiateSupplementaryProcess')}}-->
|
||
<!-- </a-button>-->
|
||
<!-- </div>-->
|
||
<div class="processBackground-text">
|
||
<span style="font-size: 16px;font-weight: 400;color: #000F16;"> {{$t('processBackground')}}:</span>
|
||
{{$route.query.processBackground}}
|
||
</div>
|
||
<!-- <div class="header-text">-->
|
||
<!-- {{$t('engineerFeedbackResults')}}-->
|
||
<!-- </div>-->
|
||
<a-card :bordered="false" class="box-clause" style="margin-top: 20px"
|
||
v-for="(item,index) in dataSource">
|
||
<!-- <div class="table-operator-admin">-->
|
||
<!-- <div class="operator-text" v-if="item.id" :class="{'operator-text-feed':index == 0 ? true:false}"-->
|
||
<!-- style="font-size: 16px">-->
|
||
<!-- {{$t('engineer')+item.createBy+$t('feedbackResults')}}-->
|
||
<!-- </div>-->
|
||
<!-- <div class="text-results" v-if="item.id">-->
|
||
<!-- {{$t('complianceResults')}}:{{item.complianceResultName}}-->
|
||
<!-- </div>-->
|
||
<!-- </div>-->
|
||
<div class="table-operator-admin-right">
|
||
<div @click="fileExportClick" v-if="index == 0" class="operator-text-index">
|
||
<a-icon type="export" :rotate="-90"/>
|
||
{{$t('fileExport')}}
|
||
</div>
|
||
<!-- style="margin-left: 18px"-->
|
||
<a-table
|
||
ref="table"
|
||
size="middle"
|
||
:loading="loading"
|
||
:pagination="false"
|
||
:scroll="{x: '100%',y:350}"
|
||
:data-source="item.lawsTechnologyEvaluationResultEOList"
|
||
:columns="columns"
|
||
>
|
||
<span slot="accessoryFile" slot-scope="text,result">
|
||
<a v-if="text" @click="accessoryFileClick(text)">
|
||
{{ $t('viewFile') }}
|
||
</a>
|
||
<span v-else>--</span>
|
||
</span>
|
||
</a-table>
|
||
</div>
|
||
</a-card>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<viewFileModel ref="viewFileModelRef"/>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||
import viewFileModel from '@/components/viewFileModel/index'
|
||
import { mapGetters } from 'vuex'
|
||
|
||
export default {
|
||
name: 'evaluationResultsWhole',
|
||
components: {
|
||
PersonnelSelection,
|
||
viewFileModel
|
||
},
|
||
data() {
|
||
return {
|
||
queryParam: {},
|
||
dataSource: [],
|
||
userInfoQuery: {},
|
||
administrators: false,
|
||
url: {
|
||
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list',
|
||
exportData: 'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip'
|
||
},
|
||
selectedRowKeys: [],
|
||
loading: false,
|
||
|
||
columns: [
|
||
{
|
||
title: this.$t('engineer'),
|
||
dataIndex: 'createBy',
|
||
align: 'center',
|
||
width: 160,
|
||
ellipsis: true,
|
||
customRender: (value, row, index) => {
|
||
const obj = {
|
||
children: value,
|
||
attrs: {}
|
||
}
|
||
if (index === 0) {
|
||
obj.attrs.rowSpan = row.indexData
|
||
} else {
|
||
obj.attrs.rowSpan = 0
|
||
}
|
||
return obj
|
||
}
|
||
},
|
||
{
|
||
title: this.$t('complianceResults'),
|
||
dataIndex: 'complianceResultName',
|
||
align: 'center',
|
||
width: 160,
|
||
ellipsis: true,
|
||
customRender: (value, row, index) => {
|
||
const obj = {
|
||
children: value,
|
||
attrs: {}
|
||
}
|
||
if (index === 0) {
|
||
obj.attrs.rowSpan = row.indexData
|
||
} else {
|
||
obj.attrs.rowSpan = 0
|
||
}
|
||
return obj
|
||
}
|
||
},
|
||
{
|
||
title: this.$t('relevantSections'),
|
||
dataIndex: 'relatedSection',
|
||
align: 'center',
|
||
width: 160,
|
||
ellipsis: true
|
||
},
|
||
{
|
||
title: this.$t('problemDescription'),
|
||
dataIndex: 'issueOrSuggest',
|
||
align: 'center',
|
||
ellipsis: true
|
||
},
|
||
{
|
||
title: this.$t('enclosure'),
|
||
dataIndex: 'accessoryFile',
|
||
align: 'center',
|
||
width: 160,
|
||
ellipsis: true,
|
||
scopedSlots: { customRender: 'accessoryFile' }
|
||
}
|
||
]
|
||
}
|
||
},
|
||
mounted() {
|
||
this.userInfoQuery = this.userInfo()
|
||
document.title = this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults')
|
||
this.getList()
|
||
this.administrators = false
|
||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||
this.userInfo().userRoleList.forEach(res => {
|
||
if (res.roleCode == 'admin') {
|
||
this.administrators = true
|
||
}
|
||
})
|
||
}
|
||
},
|
||
methods: {
|
||
...mapGetters(['userInfo']),
|
||
endProcessClick() {
|
||
let query = {
|
||
ids: this.$route.query.id
|
||
}
|
||
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/batchCompleteTask', query).then((res) => {
|
||
if (res.success) {
|
||
this.$message.success(this.$t('OperationSuccessful'))
|
||
this.getList()
|
||
} else {
|
||
this.$message.warning(this.$t('operationFailed'))
|
||
}
|
||
})
|
||
},
|
||
CurrentStandard() {
|
||
let query = {
|
||
firstInitiation: '2',
|
||
whetherTobring: '2',
|
||
processBackground: this.$route.query.processBackground || '',
|
||
remark: this.$route.query.remark || '',
|
||
standId: this.$route.query.standId,
|
||
lawsTechnologyEvaluationId: this.$route.query.lawsTechnologyEvaluationId
|
||
}
|
||
let newUrl = this.$router.resolve({
|
||
path: '/evaluationInitiationProcess',
|
||
query: query
|
||
})
|
||
window.open(newUrl.href, '_blank')
|
||
},
|
||
onSelectChange(value) {
|
||
|
||
},
|
||
fileExportClick() {
|
||
let query = {
|
||
lawsTechnologyEvaluationId: this.$route.query.id
|
||
}
|
||
downloadFile(this.url.exportData, this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults') + '.zip', query)
|
||
},
|
||
getList() {
|
||
let query = {
|
||
lawsTechnologyEvaluationId: this.$route.query.id
|
||
}
|
||
this.loading = true
|
||
getAction(this.url.list, query).then((res) => {
|
||
if (res.success) {
|
||
this.dataSource = res.result || []
|
||
if (this.dataSource && this.dataSource.length > 0) {
|
||
this.dataSource.forEach(val => {
|
||
if (val.lawsTechnologyEvaluationResultEOList && val.lawsTechnologyEvaluationResultEOList.length > 0) {
|
||
val.lawsTechnologyEvaluationResultEOList.forEach(ol => {
|
||
ol.indexData = val.lawsTechnologyEvaluationResultEOList.length
|
||
ol.complianceResultName = val.complianceResultName
|
||
ol.createBy = val.createBy
|
||
})
|
||
}
|
||
})
|
||
}
|
||
console.log(this.dataSource)
|
||
if (this.dataSource.length == 0) {
|
||
this.dataSource.push({
|
||
name: ''
|
||
})
|
||
}
|
||
this.loading = false
|
||
} else {
|
||
this.dataSource = []
|
||
this.loading = false
|
||
}
|
||
})
|
||
},
|
||
accessoryFileClick(item) {
|
||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="less" scoped>
|
||
@import '~@assets/less/common.less';
|
||
|
||
.doc-detail {
|
||
background: #fff;
|
||
height: 100%;
|
||
|
||
.doc-detail-wrap {
|
||
.doc-detail-header {
|
||
width: 100%;
|
||
height: 68px;
|
||
z-index: 1000;
|
||
line-height: 68px;
|
||
padding: 0 0 0 32px;
|
||
box-sizing: border-box;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
border-bottom: 2px #eff1f3 solid;
|
||
background: #fff;
|
||
|
||
.doc-detail-title {
|
||
display: inline-block;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
font-size: 20px;
|
||
font-weight: 400;
|
||
color: #040B29;
|
||
line-height: 68px;
|
||
}
|
||
|
||
.doc-detail-right {
|
||
/*width: 800px;*/
|
||
line-height: 68px;
|
||
display: flex;
|
||
|
||
.doc-detail-btn {
|
||
margin-left: 10px;
|
||
}
|
||
}
|
||
}
|
||
|
||
.content-box {
|
||
padding: 0 32px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.header-text {
|
||
font-size: 16px;
|
||
font-weight: 400;
|
||
height: 80px;
|
||
color: #000F16;
|
||
line-height: 80px;
|
||
}
|
||
|
||
.processBackground-text {
|
||
font-size: 16px;
|
||
color: #000F16;
|
||
margin-top: 16px;
|
||
}
|
||
}
|
||
}
|
||
|
||
.box-button-top {
|
||
float: right;
|
||
margin-top: 28px;
|
||
height: 38px;
|
||
}
|
||
|
||
.page {
|
||
text-align: right;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
.box-title-text {
|
||
line-height: 1.4;
|
||
display: flex;
|
||
align-items: center;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.title-text {
|
||
width: 70px;
|
||
color: #000F16;
|
||
display: inline-block;
|
||
font-weight: 500;
|
||
font-size: 14px;
|
||
margin-right: 16px;
|
||
margin-top: 3px;
|
||
text-align: right;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.box-input {
|
||
display: inline-block;
|
||
width: 70%;
|
||
height: 38px;
|
||
margin-top: 2px;
|
||
}
|
||
|
||
.box-button {
|
||
height: 38px;
|
||
/*margin-top: 2px;*/
|
||
}
|
||
|
||
.text-operation {
|
||
margin-right: 8px;
|
||
}
|
||
|
||
.itemModel {
|
||
width: calc(100% - 130px);
|
||
display: inline-block;
|
||
margin-top: 2px;
|
||
}
|
||
|
||
.text-results {
|
||
font-size: 14px;
|
||
margin-top: 10px;
|
||
display: inline-block;
|
||
}
|
||
|
||
.operator-text-text {
|
||
cursor: pointer;
|
||
margin-right: 23px;
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
color: #040B29;
|
||
display: inline-block;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-align: right;
|
||
}
|
||
|
||
.table-operator-admin {
|
||
width: 240px;
|
||
float: left;
|
||
padding: 0.1px;
|
||
}
|
||
|
||
.table-operator-admin-right {
|
||
float: left;
|
||
width: 100%;
|
||
text-align: right;
|
||
margin-bottom: 20px;
|
||
/*border-left: 1px solid #e8e8e8;*/
|
||
}
|
||
|
||
.operator-text-index {
|
||
cursor: pointer;
|
||
margin-right: 13px;
|
||
font-size: 14px;
|
||
font-weight: 400;
|
||
color: #040B29;
|
||
display: inline-block;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-align: right;
|
||
}
|
||
|
||
.operator-text-feed {
|
||
margin-top: 27px;
|
||
}
|
||
</style>
|
||
<style>
|
||
.box-clause .ant-card-body {
|
||
padding: 0;
|
||
}
|
||
</style> |