578 lines
16 KiB
Java
578 lines
16 KiB
Java
<template>
|
|
<a-drawer
|
|
:title="$t('customize')"
|
|
:maskClosable="false"
|
|
:width="1000"
|
|
placement="right"
|
|
:closable="true"
|
|
@close="handleCancel"
|
|
:visible="visible"
|
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
|
<div style="margin-bottom: 60px">
|
|
<a-table
|
|
:columns="columns"
|
|
:rowKey="record=> record.key"
|
|
:scroll="{x: 800}"
|
|
:data-source="dataList"
|
|
:pagination="false"
|
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:'',getCheckboxProps: getCheckboxProps }"
|
|
:loading="loading">
|
|
|
|
</a-table>
|
|
<!-- <div class="page" v-if="dataList.length > 0">-->
|
|
<!-- <a-pagination-->
|
|
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
|
<!-- show-quick-jumper-->
|
|
<!-- show-size-changer-->
|
|
<!-- :page-size.sync="pageSize"-->
|
|
<!-- :total="total"-->
|
|
<!-- :current="pageNo"-->
|
|
<!-- @change="onChange"-->
|
|
<!-- @showSizeChange="SizeChange"-->
|
|
<!-- />-->
|
|
<!-- </div>-->
|
|
</div>
|
|
|
|
<div class="drawer-bootom-button">
|
|
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
|
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
|
|
</div>
|
|
</a-drawer>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction } from '@/api/manage'
|
|
|
|
export default {
|
|
name: 'transferList',
|
|
components: {},
|
|
props: ['url'],
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
queryParam: {},
|
|
confirmLoading: false,
|
|
selectedRowKeys: [],
|
|
selectedRows: [],
|
|
columns: [
|
|
{
|
|
title: this.$t('customColumn'),
|
|
dataIndex: 'name',
|
|
align: 'left',
|
|
ellipsis: true
|
|
},
|
|
],
|
|
dataList: [
|
|
{
|
|
sort: '1',
|
|
name: this.$t('standard'),
|
|
headFieldCn:'编号',
|
|
headFieldEn:'Number',
|
|
field: 'serialNumber',
|
|
key: 1,
|
|
moduleFlag:'法规清单',
|
|
status:1,
|
|
},
|
|
{
|
|
sort: '2',
|
|
name: this.$t('title'),
|
|
headFieldCn:'标题',
|
|
headFieldEn:'title',
|
|
field: 'title',
|
|
key: 2,
|
|
moduleFlag:'法规清单',
|
|
status:2,
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('subtitle'),
|
|
headFieldCn:'子标题',
|
|
headFieldEn:'Sub-title',
|
|
field: 'subtitle',
|
|
key: 3,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('listConfirmationStatus'),
|
|
headFieldCn:'清单确认状态',
|
|
headFieldEn:'List Confirmation Status',
|
|
field: 'inventoryAffirmStatusName',
|
|
key: 4,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('taskAffirmStatus'),
|
|
headFieldCn:'任务确认状态',
|
|
headFieldEn:'Task Confirmation Status',
|
|
field: 'taskAffirmStatusName',
|
|
key: 5,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('zoneOfApplication'),
|
|
headFieldCn:'适用地区',
|
|
headFieldEn:'Area',
|
|
field: 'region_dictText',
|
|
key: 6,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('correspondingStandard'),
|
|
headFieldCn:'对应标准',
|
|
headFieldEn:'Compare EU/CN',
|
|
field: 'correspondingStandard',
|
|
key: 7,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('implementationCategory'),
|
|
headFieldCn:'实施类别',
|
|
headFieldEn:'Usage',
|
|
field: 'implementType_dictText',
|
|
key: 8,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('ImplementationDate'),
|
|
headFieldCn:'标准实施日期',
|
|
headFieldEn:'New Type Execution Date',
|
|
field: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
|
|
key: 9,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('vehicleInProductionDate'),
|
|
headFieldCn:'在产车实施日期',
|
|
headFieldEn:'New Vehicle Execution Date',
|
|
field: 'implementTime',
|
|
key: 10,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('certificationType'),
|
|
headFieldCn:'认证类型',
|
|
headFieldEn:'Certification Type',
|
|
field: 'attestationType_dictText',
|
|
key: 11,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('certificationLevel'),
|
|
headFieldCn:'认证级别',
|
|
headFieldEn:'Certification Level',
|
|
field: 'attestationRank_dictText',
|
|
key: 12,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('applicableSupplement'),
|
|
headFieldCn:'适用增补件',
|
|
headFieldEn:'Applicable Supplement',
|
|
field: 'applicableSupplement',
|
|
key: 13,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: 'WVTA ID',
|
|
headFieldCn:'WVTA ID',
|
|
headFieldEn:'WVTA ID',
|
|
field: 'wvtaId',
|
|
key: 14,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('areaOfResponsibility'),
|
|
headFieldCn:'责任领域',
|
|
headFieldEn:'Responsible Field',
|
|
field: 'dutyTerritory_dictText',
|
|
key: 15,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('regulatoryEngineer'),
|
|
headFieldCn:'法规工程师',
|
|
headFieldEn:'Regulation Engineer',
|
|
field: 'regulationOwnerName',
|
|
key: 16,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('certifiedEngineer'),
|
|
headFieldCn:'认证工程师',
|
|
headFieldEn:'Homo Engineer',
|
|
field: 'homologationEngineerName',
|
|
key: 17,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('engineeringInterfacePerson'),
|
|
headFieldCn:'工程接口人',
|
|
headFieldEn:'Eng. Interface',
|
|
field: 'engineeringInterfacePersonName',
|
|
key: 18,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('remarks'),
|
|
headFieldCn:'备注',
|
|
headFieldEn:'Comments',
|
|
field: 'remark',
|
|
key: 19,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('Deliverables'),
|
|
headFieldCn:'交付物',
|
|
headFieldEn:'Deliverables',
|
|
field: 'designDeliverableTemplateName',
|
|
affirmFlag:'1',
|
|
key: 20,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('Sponsor'),
|
|
headFieldCn:'发起人',
|
|
headFieldEn:'Creator',
|
|
field: 'designInitiatorName',
|
|
affirmFlag:'1',
|
|
key: 21,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('personLiable'),
|
|
headFieldCn:'责任人',
|
|
headFieldEn:'Assignee',
|
|
field: 'designDutyName',
|
|
affirmFlag:'1',
|
|
key: 22,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('TaskCutOffTime'),
|
|
headFieldCn:'截止时间',
|
|
headFieldEn:'Due Date',
|
|
field: 'designDueDate',
|
|
affirmFlag:'1',
|
|
key: 23,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('descriptionDeliverables'),
|
|
headFieldCn:'交付物说明',
|
|
headFieldEn:'Instruction',
|
|
field: 'designRemark',
|
|
affirmFlag:'1',
|
|
key: 24,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('PrehomoConfirmation') + '/' + this.$t('Deliverables'),
|
|
headFieldCn:'交付物',
|
|
headFieldEn:'Deliverables',
|
|
field: 'prehomoDeliverableTemplateName',
|
|
affirmFlag:'2',
|
|
key: 25,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('PrehomoConfirmation') + '/' + this.$t('Sponsor'),
|
|
headFieldCn:'发起人',
|
|
headFieldEn:'Creator',
|
|
field: 'prehomoInitiatorName',
|
|
affirmFlag:'2',
|
|
key:26,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('PrehomoConfirmation') + '/' + this.$t('personLiable'),
|
|
headFieldCn:'责任人',
|
|
headFieldEn:'Assignee',
|
|
field: 'prehomoDutyName',
|
|
affirmFlag:'2',
|
|
key: 27,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('PrehomoConfirmation') + '/' + this.$t('TaskCutOffTime'),
|
|
headFieldCn:'截止时间',
|
|
headFieldEn:'Due Date',
|
|
field: 'prehomoDueDate',
|
|
affirmFlag:'2',
|
|
key: 28,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('PrehomoConfirmation') + '/' + this.$t('descriptionDeliverables'),
|
|
headFieldCn:'交付物说明',
|
|
headFieldEn:'Instruction',
|
|
field: 'prehomoRemark',
|
|
affirmFlag:'2',
|
|
key: 29,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('Deliverables'),
|
|
headFieldCn:'交付物',
|
|
headFieldEn:'Deliverables',
|
|
field: 'verifyDeliverableTemplateName',
|
|
affirmFlag:'3',
|
|
key: 30,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('Sponsor'),
|
|
headFieldCn:'发起人',
|
|
headFieldEn:'Creator',
|
|
field: 'verifyInitiatorName',
|
|
affirmFlag:'3',
|
|
key: 31,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('personLiable'),
|
|
headFieldCn:'责任人',
|
|
headFieldEn:'Assignee',
|
|
field: 'verifyDutyName',
|
|
affirmFlag:'3',
|
|
key: 32,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('TaskCutOffTime'),
|
|
headFieldCn:'截止时间',
|
|
headFieldEn:'Due Date',
|
|
field: 'verifyDueDate',
|
|
affirmFlag:'3',
|
|
key: 33,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('descriptionDeliverables'),
|
|
headFieldCn:'交付物说明',
|
|
headFieldEn:'Instruction',
|
|
field: 'verifyRemark',
|
|
affirmFlag:'3',
|
|
key: 34,
|
|
moduleFlag:'法规清单',
|
|
},
|
|
{
|
|
sort: '',
|
|
name: this.$t('operation'),
|
|
headFieldCn:'操作',
|
|
headFieldEn:'Operation',
|
|
key: 35,
|
|
moduleFlag:'法规清单',
|
|
status:2,
|
|
},
|
|
],
|
|
content: [],
|
|
columnsAll:[],
|
|
loading: false,
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
total: 0
|
|
}
|
|
},
|
|
mounted() {
|
|
},
|
|
methods: {
|
|
transferModel(val) {
|
|
this.visible = true
|
|
this.queryParam = {}
|
|
this.columnsAll = val
|
|
// this.$nextTick(() => {
|
|
// this.selectedRowKeys = []
|
|
// this.selectedRows = []
|
|
// })
|
|
//
|
|
// this.getCheckboxProps()
|
|
},
|
|
searchQuery() {
|
|
this.pageNo = 1
|
|
this.replacePage()
|
|
},
|
|
searchReset() {
|
|
this.pageNo = 1
|
|
this.queryParam = {}
|
|
this.replacePage()
|
|
},
|
|
onChange(page, pageSize) {
|
|
this.pageNo = page
|
|
this.replacePage()
|
|
},
|
|
SizeChange(page, pageSize) {
|
|
this.pageNo = 1
|
|
this.pageSize = pageSize
|
|
this.replacePage()
|
|
},
|
|
replacePage() {
|
|
let query = {
|
|
pageNo: this.pageNo,
|
|
pageSize: this.pageSize,
|
|
...this.queryParam
|
|
}
|
|
this.loading = true
|
|
postAction(this.url.transferUrl, query).then((res) => {
|
|
if (res.success) {
|
|
this.dataList = res.result.records || []
|
|
this.total = res.result.total
|
|
this.loading = false
|
|
} else {
|
|
this.loading = false
|
|
}
|
|
})
|
|
},
|
|
onSelectChange(value, rows) {
|
|
this.selectedRowKeys = value
|
|
this.selectedRows = rows
|
|
// if (this.selectedRowKeys.length > 1) {
|
|
// this.selectedRowKeys.shift()
|
|
// }
|
|
},
|
|
getCheckboxProps(record) {
|
|
let titleList = []
|
|
this.columnsAll.forEach((item) => {
|
|
if(item.children){
|
|
item.children.forEach((val) => {
|
|
titleList.push(item.dataIndex,val.dataIndex)
|
|
})
|
|
}else {
|
|
titleList.push(item.dataIndex)
|
|
}
|
|
})
|
|
console.log(titleList)
|
|
return ({
|
|
props: {
|
|
//当状态是1或者2的时候执行disable
|
|
disabled: record.status === 1 || record.status === 2,
|
|
defaultChecked: titleList.includes(record.field)
|
|
}
|
|
})
|
|
},
|
|
handleCancel() {
|
|
this.visible = false
|
|
},
|
|
handleSubmit(flag) {
|
|
// if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
|
this.confirmLoading = true
|
|
// let selectedRows = JSON.parse(JSON.stringify(this.selectedRows))
|
|
// this.confirmLoading = false
|
|
// this.$emit('transferListForm',selectedRowKeys.join(','))
|
|
// this.selectedRowKeys = []
|
|
this.selectedRows.forEach((item,index) => {
|
|
item.sort = index + 1
|
|
})
|
|
let headCustomEOList = JSON.parse(JSON.stringify(this.selectedRows))
|
|
let query ={
|
|
headCustomEOList :headCustomEOList
|
|
}
|
|
postAction('head/headCustomEO/add', query).then((res) => {
|
|
if (res.success) {
|
|
this.confirmLoading = false
|
|
this.visible = false
|
|
this.$message.success(this.$t('OperationSuccessful'))
|
|
this.$emit('customizeListForm')
|
|
} else {
|
|
this.$message.warning(this.$t('operationFailed'))
|
|
this.confirmLoading = false
|
|
this.visible = false
|
|
}
|
|
})
|
|
},
|
|
getAdd() {
|
|
let _this = this
|
|
this.$confirm({
|
|
content: _this.$t('TheDoesNotContainData'),
|
|
onOk() {
|
|
_this.handleSubmit('1')
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page {
|
|
text-align: right;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.drawer-bootom-button {
|
|
position: absolute;
|
|
bottom: 0;
|
|
z-index: 100;
|
|
width: 100%;
|
|
border-top: 1px solid #e8e8e8;
|
|
padding: 10px 16px;
|
|
text-align: right;
|
|
left: 0;
|
|
background: #fff;
|
|
border-radius: 0 0 2px 2px;
|
|
}
|
|
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.title-text {
|
|
width: 20%;
|
|
min-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;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
width: 70%;
|
|
height: 38px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.box-button {
|
|
height: 38px;
|
|
}
|
|
|
|
</style> |