法规清单 自定义表头
This commit is contained in:
@@ -1376,4 +1376,7 @@ module.exports = {
|
||||
Updateparametercolumn:'Update The Parameter Column',
|
||||
columnfirst:'Reference the parameter column first',
|
||||
columnforced:'Confirm a forced retraction?',
|
||||
customize:'Customize the header',
|
||||
customColumn:'Custom column',
|
||||
|
||||
}
|
||||
@@ -1477,4 +1477,6 @@ module.exports = {
|
||||
brand:'品牌',
|
||||
allsubitemsitem:'该项目下拥有子项目,是否全部删除',
|
||||
contactTheFounder:'联系创建人',
|
||||
customize:'自定义表头',
|
||||
customColumn:'自定义列',
|
||||
}
|
||||
@@ -0,0 +1,572 @@
|
||||
<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="id"
|
||||
: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',
|
||||
id: '1',
|
||||
moduleFlag:'法规清单',
|
||||
status:1,
|
||||
},
|
||||
{
|
||||
sort: '2',
|
||||
name: this.$t('title'),
|
||||
headFieldCn:'标题',
|
||||
headFieldEn:'title',
|
||||
field: 'title',
|
||||
id: '2',
|
||||
moduleFlag:'法规清单',
|
||||
status:2,
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('subtitle'),
|
||||
headFieldCn:'子标题',
|
||||
headFieldEn:'Sub-title',
|
||||
field: 'subtitle',
|
||||
id: '3',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('listConfirmationStatus'),
|
||||
headFieldCn:'清单确认状态',
|
||||
headFieldEn:'List Confirmation Status',
|
||||
field: 'inventoryAffirmStatusName',
|
||||
id: '4',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('taskAffirmStatus'),
|
||||
headFieldCn:'任务确认状态',
|
||||
headFieldEn:'Task Confirmation Status',
|
||||
field: 'taskAffirmStatusName',
|
||||
id: '5',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('zoneOfApplication'),
|
||||
headFieldCn:'适用地区',
|
||||
headFieldEn:'Area',
|
||||
field: 'region_dictText',
|
||||
id: '6',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('correspondingStandard'),
|
||||
headFieldCn:'对应标准',
|
||||
headFieldEn:'Compare EU/CN',
|
||||
field: 'correspondingStandard',
|
||||
id: '7',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('implementationCategory'),
|
||||
headFieldCn:'实施类别',
|
||||
headFieldEn:'Usage',
|
||||
field: 'implementType_dictText',
|
||||
id: '8',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('ImplementationDate'),
|
||||
headFieldCn:'标准实施日期',
|
||||
headFieldEn:'New Type Execution Date',
|
||||
field: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
|
||||
id: '9',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('vehicleInProductionDate'),
|
||||
headFieldCn:'在产车实施日期',
|
||||
headFieldEn:'New Vehicle Execution Date',
|
||||
field: 'implementTime',
|
||||
id: '10',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('certificationType'),
|
||||
headFieldCn:'认证类型',
|
||||
headFieldEn:'Certification Type',
|
||||
field: 'attestationType_dictText',
|
||||
id: '11',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('certificationLevel'),
|
||||
headFieldCn:'认证级别',
|
||||
headFieldEn:'Certification Level',
|
||||
field: 'attestationRank_dictText',
|
||||
id: '12',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('applicableSupplement'),
|
||||
headFieldCn:'适用增补件',
|
||||
headFieldEn:'Applicable Supplement',
|
||||
field: 'applicableSupplement',
|
||||
id: '13',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: 'WVTA ID',
|
||||
headFieldCn:'WVTA ID',
|
||||
headFieldEn:'WVTA ID',
|
||||
field: 'wvtaId',
|
||||
id: '14',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('areaOfResponsibility'),
|
||||
headFieldCn:'责任领域',
|
||||
headFieldEn:'Responsible Field',
|
||||
field: 'dutyTerritory_dictText',
|
||||
id: '15',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('regulatoryEngineer'),
|
||||
headFieldCn:'法规工程师',
|
||||
headFieldEn:'Regulation Engineer',
|
||||
field: 'regulationOwnerName',
|
||||
id: '16',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('certifiedEngineer'),
|
||||
headFieldCn:'认证工程师',
|
||||
headFieldEn:'Homo Engineer',
|
||||
field: 'homologationEngineerName',
|
||||
id: '17',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('engineeringInterfacePerson'),
|
||||
headFieldCn:'工程接口人',
|
||||
headFieldEn:'Eng. Interface',
|
||||
field: 'engineeringInterfacePersonName',
|
||||
id: '18',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('remarks'),
|
||||
headFieldCn:'备注',
|
||||
headFieldEn:'Comments',
|
||||
field: 'remark',
|
||||
id: '19',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('Deliverables'),
|
||||
headFieldCn:'交付物',
|
||||
headFieldEn:'Deliverables',
|
||||
field: 'designDeliverableTemplateName',
|
||||
affirmFlag:'1',
|
||||
id: '20',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('Sponsor'),
|
||||
headFieldCn:'发起人',
|
||||
headFieldEn:'Creator',
|
||||
field: 'designInitiatorName',
|
||||
affirmFlag:'1',
|
||||
id: '21',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('personLiable'),
|
||||
headFieldCn:'责任人',
|
||||
headFieldEn:'Assignee',
|
||||
field: 'designDutyName',
|
||||
affirmFlag:'1',
|
||||
id: '22',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('TaskCutOffTime'),
|
||||
headFieldCn:'截止时间',
|
||||
headFieldEn:'Due Date',
|
||||
field: 'designDueDate',
|
||||
affirmFlag:'1',
|
||||
id: '23',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('descriptionDeliverables'),
|
||||
headFieldCn:'交付物说明',
|
||||
headFieldEn:'Instruction',
|
||||
field: 'designRemark',
|
||||
affirmFlag:'1',
|
||||
id: '24',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('PrehomoConfirmation') + '/' + this.$t('Deliverables'),
|
||||
headFieldCn:'交付物',
|
||||
headFieldEn:'Deliverables',
|
||||
field: 'prehomoDeliverableTemplateName',
|
||||
affirmFlag:'2',
|
||||
id: '25',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('PrehomoConfirmation') + '/' + this.$t('Sponsor'),
|
||||
headFieldCn:'发起人',
|
||||
headFieldEn:'Creator',
|
||||
field: 'prehomoInitiatorName',
|
||||
affirmFlag:'2',
|
||||
id: '26',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('PrehomoConfirmation') + '/' + this.$t('personLiable'),
|
||||
headFieldCn:'责任人',
|
||||
headFieldEn:'Assignee',
|
||||
field: 'prehomoDutyName',
|
||||
affirmFlag:'2',
|
||||
id: '27',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('PrehomoConfirmation') + '/' + this.$t('TaskCutOffTime'),
|
||||
headFieldCn:'截止时间',
|
||||
headFieldEn:'Due Date',
|
||||
field: 'prehomoDueDate',
|
||||
affirmFlag:'2',
|
||||
id: '28',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('PrehomoConfirmation') + '/' + this.$t('descriptionDeliverables'),
|
||||
headFieldCn:'交付物说明',
|
||||
headFieldEn:'Instruction',
|
||||
field: 'prehomoRemark',
|
||||
affirmFlag:'2',
|
||||
id: '29',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('Deliverables'),
|
||||
headFieldCn:'交付物',
|
||||
headFieldEn:'Deliverables',
|
||||
field: 'verifyDeliverableTemplateName',
|
||||
affirmFlag:'3',
|
||||
id: '30',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('Sponsor'),
|
||||
headFieldCn:'发起人',
|
||||
headFieldEn:'Creator',
|
||||
field: 'verifyInitiatorName',
|
||||
affirmFlag:'3',
|
||||
id: '31',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('personLiable'),
|
||||
headFieldCn:'责任人',
|
||||
headFieldEn:'Assignee',
|
||||
field: 'verifyDutyName',
|
||||
affirmFlag:'3',
|
||||
id: '32',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('TaskCutOffTime'),
|
||||
headFieldCn:'截止时间',
|
||||
headFieldEn:'Due Date',
|
||||
field: 'verifyDueDate',
|
||||
affirmFlag:'3',
|
||||
id: '33',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('descriptionDeliverables'),
|
||||
headFieldCn:'交付物说明',
|
||||
headFieldEn:'Instruction',
|
||||
field: 'verifyRemark',
|
||||
affirmFlag:'3',
|
||||
id: '34',
|
||||
moduleFlag:'法规清单',
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('operation'),
|
||||
headFieldCn:'操作',
|
||||
headFieldEn:'Operation',
|
||||
id: '35',
|
||||
moduleFlag:'法规清单',
|
||||
status:2,
|
||||
},
|
||||
],
|
||||
content: [],
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
transferModel() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
// 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) {
|
||||
console.log(record.id, 'status');
|
||||
return ({
|
||||
props: {
|
||||
//当状态是1或者2的时候执行disable
|
||||
disabled: record.status === 1 || record.status === 2,
|
||||
defaultChecked: ['1','2','35'].includes(record.id)
|
||||
}
|
||||
})
|
||||
},
|
||||
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
|
||||
delete item.status
|
||||
delete item.name
|
||||
delete item.id
|
||||
})
|
||||
postAction('head/headCustomEO/add', this.selectedRows).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.selectedRowKeys = []
|
||||
// this.$emit('transferListForm')
|
||||
} else {
|
||||
// if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
|
||||
// this.confirmLoading = false
|
||||
// this.getAdd()
|
||||
// return
|
||||
// }
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
// } else {
|
||||
// this.$message.warning(this.$t('selectLeastOne'))
|
||||
// }
|
||||
},
|
||||
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>
|
||||
@@ -161,6 +161,10 @@
|
||||
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
||||
</div>
|
||||
</a-popconfirm>
|
||||
<div class="operator-text" @click="customizeClick">
|
||||
<a-icon type="setting"/>
|
||||
{{ $t('customize') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="bringInRelevantPersonnelClick">
|
||||
<a-icon type="user"/>
|
||||
{{ $t('bringInRelevantPersonnel') }}
|
||||
@@ -311,6 +315,7 @@
|
||||
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
||||
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
||||
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
|
||||
<customizeList :url="url" @customizeListForm="customizeListForm" ref="customizeListRef"/>
|
||||
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
|
||||
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
|
||||
<a-modal
|
||||
@@ -467,6 +472,7 @@
|
||||
import listEditModel from './listEditModel'
|
||||
import batSetting from './batSetting'
|
||||
import transferList from './transferList'
|
||||
import customizeList from './customizeList'
|
||||
import transferListvirtal from './transferListvirtal'
|
||||
import fixedPlate from './fixedPlateForm'
|
||||
import resultReportedUpload from './resultReportedUpload'
|
||||
@@ -488,6 +494,7 @@
|
||||
listEditModel,
|
||||
batSetting,
|
||||
transferList,
|
||||
customizeList,
|
||||
transferListvirtal,
|
||||
globalAdvancedQuery,
|
||||
fixedPlate,
|
||||
@@ -1216,6 +1223,9 @@
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
customizeListForm(){
|
||||
|
||||
},
|
||||
batchSettingPersonnelClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
@@ -2261,7 +2271,9 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
customizeClick(){
|
||||
this.$refs.customizeListRef.transferModel()
|
||||
},
|
||||
bringInRelevantPersonnelClick() {
|
||||
let _this = this
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user