928 lines
30 KiB
Java
928 lines
30 KiB
Java
<template>
|
|
<a-card :bordered="false">
|
|
<div class="header-text">
|
|
文档标准
|
|
</div>
|
|
<div class="table-page-search-wrapper">
|
|
<a-row :gutter="24">
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" :title="$t('standard')">
|
|
<span>{{$t('standard')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
|
v-model="queryParam.serialNumber"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" :title="$t('title')">
|
|
<span>{{$t('title')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
|
v-model="queryParam.title"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" style="width: 44px" :title="$t('subtitle')">
|
|
<span>{{$t('subtitle')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('subtitle')"
|
|
v-model="queryParam.subtitle"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
|
</a-col>
|
|
</span>
|
|
</a-row>
|
|
</div>
|
|
<div class="table-operator">
|
|
<div style="float: left;margin-bottom: 19px;margin-left: 20px" v-if="isDisplay">
|
|
<div class="operator-text" @click="initiateListConfirmationcClick">
|
|
<a-icon type="solution"/>
|
|
{{$t('initiateListConfirmation')}}
|
|
</div>
|
|
<div class="operator-text">
|
|
<a-icon type="file-protect"/>
|
|
{{$t('initiateTaskConfirmation')}}
|
|
</div>
|
|
<div class="operator-text">
|
|
<a-icon type="file-search"/>
|
|
{{$t('alteration')}}
|
|
</div>
|
|
<div class="operator-text">
|
|
<a-icon type="bulb"/>
|
|
{{$t('fixedPlate')}}
|
|
</div>
|
|
</div>
|
|
<div style="float: right;margin-top: 1px" v-if="isDisplay">
|
|
<div class="operator-text" v-has="'document:importZip'">
|
|
<ImportFile :url="url"/>
|
|
</div>
|
|
<div @click="handleModule" class="operator-text">
|
|
<a-icon type="download"/>
|
|
{{$t('templateDownload')}}
|
|
</div>
|
|
<div @click="handleExport" class="operator-text">
|
|
<a-icon type="export" :rotate="-90"/>
|
|
{{$t('export')}}
|
|
</div>
|
|
<div @click="copyClick" class="operator-text">
|
|
<a-icon type="copy"/>
|
|
{{$t('copy')}}
|
|
</div>
|
|
<div @click="batSettingClick" class="operator-text">
|
|
<a-icon type="profile"/>
|
|
{{$t('Transfer')}}
|
|
</div>
|
|
<div @click="handleAdd" class="operator-text">
|
|
<a-icon type="plus"/>
|
|
{{$t('add')}}
|
|
</div>
|
|
<div @click="handleDel" class="operator-text">
|
|
<a-icon type="delete"/>
|
|
{{$t('BatchDelete')}}
|
|
</div>
|
|
<div class="operator-text" @click="batSettingClick">
|
|
<a-icon type="setting"/>
|
|
{{$t('batSetting')}}
|
|
</div>
|
|
<div class="operator-text" @click="bringInRelevantPersonnelClick">
|
|
<a-icon type="user"/>
|
|
{{$t('bringInRelevantPersonnel')}}
|
|
</div>
|
|
</div>
|
|
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 19px">
|
|
<div class="operator-text" @click="submitClick(0)">
|
|
<a-icon type="check-circle"/>
|
|
{{$t('submit')}}
|
|
</div>
|
|
<div class="operator-text" @click="submitClick(1)">
|
|
<a-icon type="close-circle"/>
|
|
{{$t('overrule')}}
|
|
</div>
|
|
<div class="operator-text" @click="batSettingClick">
|
|
<a-icon type="setting"/>
|
|
{{$t('batSetting')}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width: 100%">
|
|
<a-table
|
|
ref="table"
|
|
:loading="loading"
|
|
:pagination="false"
|
|
:scroll="{x: true}"
|
|
rowKey="id"
|
|
:data-source="dataSource"
|
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
:columns="columns"
|
|
>
|
|
<span slot="operation" slot-scope="text,record">
|
|
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
|
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
|
</span>
|
|
<span slot="titleName" slot-scope="text,record" :title="text">
|
|
{{text && text.length > 20 ? text.slice(0,19)+'...':text}}
|
|
</span>
|
|
<span slot="designDeliverableTemplateName" slot-scope="text,record">
|
|
<span>{{record.designDeliverableType_dictText}}</span><br v-if="record.designDeliverableType_dictText">
|
|
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
|
|
@click="pdfPreviewClick(record.designDeliverableTemplateName,record.designDeliverableTemplate)">
|
|
{{record.designDeliverableTemplateName}}
|
|
</a>
|
|
<a v-else-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length > 1"
|
|
@click="clickButtonToUpload(record.designDeliverableTemplate)">{{$t('viewFile')}}</a>
|
|
<span v-else>--</span>
|
|
</span>
|
|
<span slot="prehomoDeliverableTemplateName" slot-scope="text,record">
|
|
<span>{{record.prehomoDeliverableType_dictText}}</span><br v-if="record.prehomoDeliverableType_dictText">
|
|
<a v-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1"
|
|
@click="pdfPreviewClick(record.prehomoDeliverableTemplateName,record.prehomoDeliverableTemplate)">
|
|
{{record.prehomoDeliverableTemplateName}}
|
|
</a>
|
|
<a v-else-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length > 1"
|
|
@click="clickButtonToUpload(record.prehomoDeliverableTemplate)">{{$t('viewFile')}}</a>
|
|
<span v-else>--</span>
|
|
</span>
|
|
<span slot="verifyDeliverableTemplateName" slot-scope="text,record">
|
|
<span>{{record.verifyDeliverableType_dictText}}</span><br v-if="record.verifyDeliverableType_dictText">
|
|
<a v-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"
|
|
@click="pdfPreviewClick(record.verifyDeliverableTemplateName,record.verifyDeliverableTemplate)">
|
|
{{record.verifyDeliverableTemplateName}}
|
|
</a>
|
|
<a v-else-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length > 1"
|
|
@click="clickButtonToUpload(record.verifyDeliverableTemplate)">{{$t('viewFile')}}</a>
|
|
<span v-else>--</span>
|
|
</span>
|
|
</a-table>
|
|
</div>
|
|
<listAddModel :url="url" @addModelList="addModelList" ref="addModelRef"/>
|
|
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
|
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
|
<a-modal
|
|
:title="$t('ListConfirmationDeadline')"
|
|
:width="500"
|
|
:visible="visible"
|
|
:confirm-loading="confirmLoading"
|
|
:maskClosable="false"
|
|
@ok="handleOk"
|
|
@cancel="handleCancel"
|
|
>
|
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
|
<a-row :gutter="24">
|
|
<a-col :span="24">
|
|
<div class="box-title-text-index">
|
|
<div class="title-text-index">
|
|
<span class="Required">*</span>
|
|
<span class="title-text-text"
|
|
:title="$t('TaskCutOffTime')">{{$t('TaskCutOffTime')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="inventoryAffirmDueDate">
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
|
|
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
|
|
format="YYYY-MM-DD"
|
|
v-model="formInline.inventoryAffirmDueDate"
|
|
style="width: 100%"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-modal>
|
|
<a-modal
|
|
:title="$t('deliverableTemplate')"
|
|
:width="600"
|
|
:visible="visibleFile"
|
|
:maskClosable="false"
|
|
@ok="visibleFile = false"
|
|
@cancel="visibleFile = false"
|
|
>
|
|
<a-table
|
|
class="table"
|
|
:columns="columnsFile"
|
|
:pagination="false"
|
|
:scroll="{x:500,y: 400}"
|
|
:data-source="dataSourceFile"
|
|
:loading="loading"
|
|
>
|
|
<span slot="fileOperation" slot-scope="record">
|
|
<a class="text" @click="pdfPreview(record)">
|
|
{{$t('See')}}
|
|
</a>
|
|
<a class="text" @click="download(record)">
|
|
{{$t('download')}}
|
|
</a>
|
|
</span>
|
|
</a-table>
|
|
</a-modal>
|
|
</a-card>
|
|
</template>
|
|
|
|
<script>
|
|
import ImportFile from '@/components/ImportFile/index'
|
|
import listAddModel from './listAddModel'
|
|
import listEditModel from './listEditModel'
|
|
import batSetting from './batSetting'
|
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
|
import moment from 'moment'
|
|
import { mapGetters } from 'vuex'
|
|
import { Base64 } from 'js-base64'
|
|
|
|
export default {
|
|
name: 'listOfRegulations',
|
|
components: {
|
|
ImportFile,
|
|
listAddModel,
|
|
listEditModel,
|
|
batSetting
|
|
},
|
|
data() {
|
|
return {
|
|
columns: [
|
|
{
|
|
title: 'WVTA ID',
|
|
align: 'center',
|
|
dataIndex: 'wvtaId',
|
|
width: 100,
|
|
ellipsis: true,
|
|
fixed: 'left'
|
|
},
|
|
{
|
|
title: this.$t('standard'),
|
|
align: 'center',
|
|
dataIndex: 'serialNumber',
|
|
width: 180,
|
|
fixed: 'left',
|
|
scopedSlots: { customRender: 'titleName' }
|
|
},
|
|
{
|
|
title: this.$t('title'),
|
|
align: 'center',
|
|
dataIndex: 'title',
|
|
width: 180,
|
|
fixed: 'left',
|
|
scopedSlots: { customRender: 'titleName' }
|
|
},
|
|
{
|
|
title: this.$t('subtitle'),
|
|
align: 'center',
|
|
dataIndex: 'subtitle',
|
|
width: 180,
|
|
fixed: 'left',
|
|
scopedSlots: { customRender: 'titleName' }
|
|
},
|
|
{
|
|
title: this.$t('listConfirmationStatus'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'inventoryAffirmStatusName'
|
|
},
|
|
{
|
|
title: this.$t('taskAffirmStatus'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'taskAffirmStatusName'
|
|
},
|
|
// {
|
|
// title: this.$t('taskReleaseStatus'),
|
|
// align: 'center',
|
|
// dataIndex: 'taskReleaseStatus'
|
|
// },
|
|
{
|
|
title: this.$t('correspondingStandard'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'correspondingStandard'
|
|
},
|
|
{
|
|
title: this.$t('implementationCategory'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'implementType_dictText'
|
|
},
|
|
{
|
|
title: this.$t('ImplementationDate'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1'
|
|
},
|
|
{
|
|
title: this.$t('vehicleInProductionDate'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'implementTime'
|
|
},
|
|
{
|
|
title: this.$t('certificationType'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'attestationType_dictText'
|
|
},
|
|
{
|
|
title: this.$t('certificationLevel'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'attestationRank_dictText'
|
|
},
|
|
//
|
|
{
|
|
title: this.$t('areaOfResponsibility'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'dutyTerritory_dictText'
|
|
},
|
|
{
|
|
title: this.$t('regulatoryEngineer'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'regulationOwnerName'
|
|
},
|
|
{
|
|
title: this.$t('certifiedEngineer'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'homologationEngineerName'
|
|
},
|
|
{
|
|
title: this.$t('engineeringInterfacePerson'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'engineeringInterfacePersonName'
|
|
},
|
|
{
|
|
title: this.$t('remarks'),
|
|
align: 'center',
|
|
ellipsis: true,
|
|
dataIndex: 'remark'
|
|
},
|
|
{
|
|
title: this.$t('confirmationOfDesignConformity'),
|
|
children: [
|
|
{
|
|
title: this.$t('Deliverables'),
|
|
dataIndex: 'designDeliverableTemplateName',
|
|
align: 'center',
|
|
scopedSlots: { customRender: 'designDeliverableTemplateName' }
|
|
},
|
|
{
|
|
title: this.$t('Sponsor'),
|
|
dataIndex: 'designInitiator_dictText',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: this.$t('personLiable'),
|
|
dataIndex: 'designDuty_dictText',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: this.$t('TaskCutOffTime'),
|
|
dataIndex: 'designDueDate',
|
|
align: 'center'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: this.$t('PrehomoConfirmation'),
|
|
children: [
|
|
{
|
|
title: this.$t('Deliverables'),
|
|
dataIndex: 'prehomoDeliverableTemplateName',
|
|
align: 'center',
|
|
scopedSlots: { customRender: 'prehomoDeliverableTemplateName' }
|
|
},
|
|
{
|
|
title: this.$t('Sponsor'),
|
|
dataIndex: 'prehomoInitiator_dictText',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: this.$t('personLiable'),
|
|
dataIndex: 'prehomoDuty_dictText',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: this.$t('TaskCutOffTime'),
|
|
dataIndex: 'prehomoDueDate',
|
|
align: 'center'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: this.$t('verificationAndConformityconfirmation'),
|
|
children: [
|
|
{
|
|
title: this.$t('Deliverables'),
|
|
dataIndex: 'verifyDeliverableTemplateName',
|
|
align: 'center',
|
|
scopedSlots: { customRender: 'verifyDeliverableTemplateName' }
|
|
},
|
|
{
|
|
title: this.$t('Sponsor'),
|
|
dataIndex: 'verifyInitiator_dictText',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: this.$t('personLiable'),
|
|
dataIndex: 'verifyDuty_dictText',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: this.$t('TaskCutOffTime'),
|
|
dataIndex: 'verifyDueDate',
|
|
align: 'center'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: this.$t('operation'),
|
|
align: 'center',
|
|
fixed: 'right',
|
|
width: 140,
|
|
scopedSlots: { customRender: 'operation' }
|
|
}
|
|
],
|
|
columnsFile: [
|
|
{
|
|
title: this.$t('deliverableTemplate'),
|
|
dataIndex: 'fileName',
|
|
align: 'center',
|
|
width: 260,
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('operation'),
|
|
align: 'center',
|
|
width: 130,
|
|
scopedSlots: { customRender: 'fileOperation' }
|
|
}
|
|
],
|
|
visibleFile: false,
|
|
dataSourceFile: [],
|
|
confirmLoading: false,
|
|
isDisplay: true,
|
|
selectedRowKeys: [],
|
|
visible: false,
|
|
formInline: {},
|
|
rules: {
|
|
inventoryAffirmDueDate: [
|
|
{
|
|
required: true,
|
|
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
]
|
|
},
|
|
queryParam: {},
|
|
url: {
|
|
addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy',
|
|
list: '/project/projectLawsInventoryEO/list',
|
|
addModel: 'project/projectLawsInventoryEO/add',
|
|
editModel: '/project/projectLawsInventoryEO/edit',
|
|
deleteBatch: '/project/projectLawsInventoryEO/deleteBatch',
|
|
deleteOne: '/project/projectLawsInventoryEO/delete',
|
|
updateStatusBatch: '/project/projectLawsInventoryEO/updateStatusBatch',
|
|
matchRelevantPeople: '/project/projectLawsInventoryEO/matchRelevantPeople',
|
|
queryPersonByProject: '/project/projectRelatedPersonnel/queryPersonByProjectId',
|
|
setBatch: ''
|
|
},
|
|
loading: false,
|
|
dataSource: []
|
|
}
|
|
},
|
|
|
|
mounted() {
|
|
if (this.$route.query.studioEngineer == this.userInfo().id) {
|
|
this.isDisplay = true
|
|
} else {
|
|
this.isDisplay = false
|
|
}
|
|
this.getList()
|
|
},
|
|
methods: {
|
|
...mapGetters(['userInfo']),
|
|
handleModule() {
|
|
|
|
},
|
|
handleExport() {
|
|
|
|
},
|
|
copyClick() {
|
|
|
|
},
|
|
batSettingClick() {
|
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
|
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
|
|
} else {
|
|
this.$message.warning(this.$t('selectLeastOne'))
|
|
}
|
|
},
|
|
handleAdd() {
|
|
this.$refs.addModelRef.addModel()
|
|
},
|
|
handleDel() {
|
|
if (this.selectedRowKeys.length > 0) {
|
|
let _this = this
|
|
this.$confirm({
|
|
content: _this.$t('ConfirmBatchDeletion'),
|
|
onOk() {
|
|
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
|
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
|
if (res.success) {
|
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
|
_this.selectedRowKeys = []
|
|
_this.getList()
|
|
} else {
|
|
_this.$message.warning(_this.$t('operationFailed'))
|
|
}
|
|
})
|
|
}
|
|
})
|
|
} else {
|
|
this.$message.warning(this.$t('selectLeastOne'))
|
|
}
|
|
},
|
|
edit(item) {
|
|
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
|
},
|
|
deleteLib(val) {
|
|
let _this = this
|
|
this.$confirm({
|
|
content: _this.$t('ConfirmDelete'),
|
|
onOk() {
|
|
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
|
|
if (res.success) {
|
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
|
_this.getList()
|
|
} else {
|
|
_this.$message.warning(_this.$t('operationFailed'))
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
onSelectChange(value) {
|
|
this.selectedRowKeys = value
|
|
},
|
|
searchQuery() {
|
|
this.getList()
|
|
},
|
|
searchReset() {
|
|
this.queryParam = {}
|
|
this.getList()
|
|
},
|
|
addModelList() {
|
|
this.getList()
|
|
},
|
|
getList() {
|
|
let query = {
|
|
...this.queryParam,
|
|
projectLibraryId: this.$route.query.id
|
|
}
|
|
this.loading = true
|
|
getAction(this.url.list, query).then((res) => {
|
|
if (res.success) {
|
|
this.dataSource = res.result
|
|
this.loading = false
|
|
} else {
|
|
this.loading = false
|
|
}
|
|
})
|
|
},
|
|
initiateListConfirmationcClick() {
|
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
|
this.dataSource.forEach(res => {
|
|
selectedRowKeys.forEach(val => {
|
|
if (res.id == val) {
|
|
if ((res.inventoryAffirmStatus == 'Not started' || res.inventoryAffirmStatus == 'rejected') &&
|
|
res.homologationEngineerId && res.regulationOwnerId) {
|
|
this.visible = true
|
|
this.formInline = {}
|
|
} else {
|
|
this.$message.warning(this.$t('dataConfirmation'))
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
this.$message.warning(this.$t('selectLeastOne'))
|
|
}
|
|
},
|
|
handleOk() {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
|
let query = {
|
|
operatorType: 0,
|
|
ids: selectedRowKeys.join(','),
|
|
projectLibraryId: this.$route.query.id,
|
|
...this.formInline
|
|
}
|
|
this.confirmLoading = true
|
|
getAction(this.url.updateStatusBatch, query).then((res) => {
|
|
if (res.success) {
|
|
this.$message.success(this.$t('OperationSuccessful'))
|
|
this.visible = false
|
|
this.selectedRowKeys = []
|
|
this.confirmLoading = false
|
|
this.getList()
|
|
} else {
|
|
this.$message.warning(this.$t('operationFailed'))
|
|
this.confirmLoading = false
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
getRowKeys(value, callBack) {
|
|
let isTrue = true
|
|
for (let i = 0; i < this.dataSource.length; i++) {
|
|
for (let j = 0; j < value.length; j++) {
|
|
if (this.dataSource[i].id == value[j]) {
|
|
if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) {
|
|
isTrue = false
|
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
|
break
|
|
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
|
|
isTrue = false
|
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
|
break
|
|
} else if (this.dataSource[i].roleCode == 4 && (this.dataSource[i].homologationEngineerSubmitStatus && this.dataSource[i].regulationOwnerSubmitStatus)) {
|
|
isTrue = false
|
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (isTrue) {
|
|
callBack()
|
|
}
|
|
},
|
|
updateStatusBatch(num, selectedRowKeys) {
|
|
let _this = this
|
|
let query = {
|
|
operatorType: 1,
|
|
ids: selectedRowKeys.join(','),
|
|
projectLibraryId: _this.$route.query.id,
|
|
operatorResult: num
|
|
}
|
|
getAction(_this.url.updateStatusBatch, query).then((res) => {
|
|
if (res.success) {
|
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
|
_this.visible = false
|
|
this.selectedRowKeys = []
|
|
_this.confirmLoading = false
|
|
_this.getList()
|
|
} else {
|
|
_this.$message.warning(_this.$t('operationFailed'))
|
|
_this.confirmLoading = false
|
|
}
|
|
})
|
|
},
|
|
submitClick(num) {
|
|
let _this = this
|
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
|
this.$confirm({
|
|
content: num == 0 ? _this.$t('confirmSubmit') : _this.$t('confirmOverrule'),
|
|
onOk() {
|
|
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
|
_this.getRowKeys(selectedRowKeys, function() {
|
|
_this.updateStatusBatch(num, selectedRowKeys)
|
|
})
|
|
}
|
|
})
|
|
} else {
|
|
this.$message.warning(this.$t('selectLeastOne'))
|
|
}
|
|
},
|
|
handleCancel() {
|
|
this.formInline = {}
|
|
this.visible = false
|
|
},
|
|
dateChange(item) {
|
|
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
|
},
|
|
pdfPreview(fileQuery) {
|
|
let fileName = fileQuery.fileName
|
|
let index1 = fileName.lastIndexOf('.')
|
|
let index2 = fileName.length
|
|
let fileSuffix = fileName.substring(index1, index2)
|
|
if (fileSuffix == '.pdf') {
|
|
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
|
} else if (fileSuffix == '.docx') {
|
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
|
window.open(url, '_blank')
|
|
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
|
window.open(url, '_blank')
|
|
} else {
|
|
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
|
}
|
|
},
|
|
pdfPreviewClick(name, id) {
|
|
let fileName = name
|
|
let index1 = fileName.lastIndexOf('.')
|
|
let index2 = fileName.length
|
|
let fileSuffix = fileName.substring(index1, index2)
|
|
if (fileSuffix == '.pdf') {
|
|
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id))
|
|
} else if (fileSuffix == '.docx') {
|
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
|
|
window.open(url, '_blank')
|
|
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
|
|
window.open(url, '_blank')
|
|
} else {
|
|
downloadFile('/sys/common/downLoadFile', name, { id: id })
|
|
}
|
|
},
|
|
download(item) {
|
|
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
|
},
|
|
clickButtonToUpload(item) {
|
|
this.loading = true
|
|
this.visibleFile = true
|
|
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
|
if (res.success) {
|
|
this.dataSourceFile = res.result
|
|
this.loading = false
|
|
} else {
|
|
this.dataSourceFile = []
|
|
this.loading = false
|
|
}
|
|
})
|
|
},
|
|
bringInRelevantPersonnelClick() {
|
|
let _this = this
|
|
this.$confirm({
|
|
content: _this.$t('confirmBringInRelevantPersonnel'),
|
|
onOk() {
|
|
getAction(_this.url.matchRelevantPeople, { projectLibraryId: _this.$route.query.id }).then((res) => {
|
|
if (res.success) {
|
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
|
_this.getList()
|
|
} else {
|
|
_this.$message.warning(_this.$t('operationFailed'))
|
|
}
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@assets/less/common.less';
|
|
|
|
.doc-detail {
|
|
background: #fff;
|
|
height: 100%;
|
|
|
|
.Virtual-detail-header {
|
|
width: 100%;
|
|
height: 68px;
|
|
line-height: 68px;
|
|
padding: 0 32px 0 32px;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
border-bottom: 2px #eff1f3 solid;
|
|
background: #fff;
|
|
|
|
.Virtual-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;
|
|
}
|
|
}
|
|
|
|
.Virtual-detail-content {
|
|
padding: 0 38px 0 38px;
|
|
box-sizing: border-box;
|
|
font-size: 16px;
|
|
|
|
.box-title-text-add {
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.title-text-add {
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
margin-right: 16px;
|
|
height: 42px;
|
|
line-height: 42px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.header-text {
|
|
font-size: 16px;
|
|
font-weight: 400;
|
|
height: 60px;
|
|
color: #000F16;
|
|
line-height: 40px;
|
|
}
|
|
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.box-title-text-index {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
}
|
|
|
|
.title-text {
|
|
width: 32px;
|
|
color: #000F16;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
margin-top: 3px;
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.title-text-index {
|
|
width: 110px;
|
|
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;
|
|
line-height: 40px;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
width: 70%;
|
|
height: 38px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.Required {
|
|
color: red;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.box-button {
|
|
height: 38px;
|
|
}
|
|
|
|
.text-operation {
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.page {
|
|
text-align: right;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.operator-text-left {
|
|
font-size: 14px;
|
|
margin-right: 20px;
|
|
background: #eff1f3;
|
|
padding: 8px 8px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
}
|
|
</style>
|
|
<style>
|
|
.box-input .ant-select-selection {
|
|
height: 38px !important;
|
|
}
|
|
|
|
.box-input .ant-select-selection__rendered {
|
|
line-height: 38px;
|
|
}
|
|
</style> |