Merge branch 'feature_dev_20230105_ZDYBT'

# Conflicts:
#	jero-boot/db/蔚来标准sql/dev_2nd_period.sql
#	jero-web/src/common/lang/en-us.js
#	jero-web/src/common/lang/zh-cn.js
#	jero-web/src/views/projectManagement/components/customizeList.vue
#	jero-web/src/views/projectManagement/components/listOfRegulations.vue
This commit is contained in:
高嵩
2023-02-11 22:10:12 +08:00
14 changed files with 1364 additions and 238 deletions
+1
View File
@@ -1378,4 +1378,5 @@ module.exports = {
columnforced:'Confirm a forced retraction?',
customize:'Customize the header',
customColumn:'Custom column',
}
+1 -1
View File
@@ -1476,7 +1476,7 @@ module.exports = {
columnforced:'确认强制撤回?',
brand:'品牌',
allsubitemsitem:'该项目下拥有子项目是否全部删除',
contactTheFounder:'联系作者',
contactTheFounder:'联系创建人',
customize:'自定义表头',
customColumn:'自定义列',
}
+7 -2
View File
@@ -94,7 +94,7 @@ const ResizeHeaderOne = function(val, name) {
// 处理多级表头
col = getRenderCoL(key, val)
let content = [].concat(children)
if (col) {
if (col ) {
const handlerVNode = h(DragHandler, {
props: {
width: col.width,
@@ -106,10 +106,15 @@ const ResizeHeaderOne = function(val, name) {
handlerVNode
)
}
console.log(restProps)
let className = ''
if ((restProps.attrs && restProps.attrs.colSpan && restProps.attrs.colSpan == 1) || (restProps.attrs && restProps.attrs.colSpan && restProps.attrs.colSpan > 0)){
className = ' second'
}
return h('th', {
key,
props: { col },
...Object.assign({}, restProps, { class: (restProps.class || '') + ' nio-header-th' })
...Object.assign({}, restProps, { class: (restProps.class || '') + ' nio-header-th' + className})
}, content)
}
}
@@ -11,26 +11,26 @@
<div style="margin-bottom: 60px">
<a-table
:columns="columns"
rowKey="id"
:rowKey="record=> record.key"
:scroll="{x: 800}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ',getCheckboxProps: getCheckboxProps }"
: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 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">
@@ -41,235 +41,538 @@
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { getAction, postAction } from '@/api/manage'
export default {
name: 'transferList',
components: {},
props: ['url'],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('customColumn'),
dataIndex: 'name',
align: 'left',
ellipsis: true
},
],
dataList: [
{
orderBy: '1',
name: '1',
id: '1',
status:1,
},
{
orderBy: '2',
name: '2',
id: '12',
status:2,
},
{
orderBy: '3',
name: '3',
id: '13',
},
{
orderBy: '4',
name: '4',
id: '15',
},
{
orderBy: '5',
name: '4',
id: '16',
},
{
orderBy: '6',
name: '4',
id: '17',
},
{
orderBy: '7',
name: '4',
id: '18',
},
{
orderBy: '8',
name: '4',
id: '19',
status:2,
},
],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0
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
}
},
mounted() {
},
methods: {
transferModel() {
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
// this.replacePage()
},
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) {
this.selectedRowKeys = value
// if (this.selectedRowKeys.length > 1) {
// this.selectedRowKeys.shift()
// }
},
getCheckboxProps(record) {
console.log(record.status, 'status');
return ({
props: {
//当状态是1或者2的时候执行disable
disabled: record.status === 1 || record.status === 2
}
})
},
handleCancel() {
this.visible = false
},
handleSubmit(flag) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.confirmLoading = false
this.$emit('transferListForm',selectedRowKeys.join(','))
this.selectedRowKeys = []
// postAction(this.url.addModel, {
// dummyInventoryBaseId: selectedRowKeys.join(','),
// projectLibraryId: this.$route.query.id,
// flag: flag
// }).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
// }
// })
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.$message.warning(this.$t('selectLeastOne'))
this.loading = false
}
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit('1')
})
},
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;
}
.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;
}
.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;
}
.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;
}
.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-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.box-button {
height: 38px;
}
</style>
@@ -215,7 +215,7 @@
<a-table
ref="table"
:components="drag(columns,'columnsAll')"
class="tableList"
class="customizetable"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 356px)'}"
@@ -510,7 +510,7 @@
listTitle: '',
orderBy: '1',
orderByField: '',
columnsAll: [
column: [
{
title: this.$t('standard'),
align: 'left',
@@ -798,6 +798,7 @@
scopedSlots: { customRender: 'operationOne' }
}
],
columnsAll:[],
columnsFileAll: [
{
title: this.$t('deliverableTemplate'),
@@ -1032,6 +1033,7 @@
mounted() {
// if (this.$route.query.studioEngineer == this.userInfo().id) {
this.JLoading = true
this.getHeader()
// this.getAndUserId()
this.getRoleByUserId(() => {
this.getAndUserId()
@@ -1523,6 +1525,9 @@
this.selectedRowKeys = []
this.getList()
},
customizeListForm(val){
this.getHeader()
},
transferListForm(id){
this.$refs.transferListvirtalRef.transferModel(id)
},
@@ -1554,6 +1559,58 @@
}
this.getList()
},
getHeader(){
getAction('head/headCustomEO/list', {
moduleFlag:'法规清单'
}).then((res) => {
if (res.success) {
console.log(res.result)
if(res.result.length != 0){
this.columnsAll = res.result
}else{
this.columnsAll = this.column
}
this.columnsAll.forEach((item,index) => {
if(item.title != '设计符合性确认' && item.title != 'Pre-Homo确认' && item.title != '验证符合性确认'){
item.width = 180
item.align = 'left'
if(item.title == '操作'){
item.scopedSlots = {
customRender: 'operationOne'
}
}else if(item.title == '编号'){
item.sorter = true
item.scopedSlots = {
customRender: 'standard'
}
}else if(item.title == '标题'){
item.scopedSlots = {
customRender: 'titleName'
}
}
else if(item.title == '清单确认状态' || item.title == '任务确认状态' || item.title == '认证级别' || item.title == 'WVTA ID' ||
item.title == '责任领域' || item.title == '法规工程师' || item.title == '认证工程师' || item.title == '工程接口人'){
item.sorter = true
}
}else {
delete item.dataIndex
delete item.fixed
item.children.forEach((val,index) => {
val.width = 180
val.align = 'left'
val.ellipsis = true
})
}
})
console.log(this.columnsAll)
this.loading = false
this.JLoading = false
} else {
this.JLoading = false
this.loading = false
}
})
},
getList() {
let roleCode
if (this.isDisplay) {
@@ -2269,7 +2326,7 @@
})
},
customizeClick(){
this.$refs.customizeListRef.transferModel()
this.$refs.customizeListRef.transferModel(this.columnsAll)
},
bringInRelevantPersonnelClick() {
let _this = this
@@ -2615,12 +2672,18 @@
width: 100% !important;
}
.tableList .ant-table-thead > tr > th {
padding: 0px 16px !important;
//.customizetable .ant-table-thead > tr > th {
// height: 46px !important;
//padding: 8px 8px !important;
//font-weight: bold;
//background: #f3f6f6;
//}
.ant-table-row-cell-ellipsis{
padding: 0!important;
}
.second{
padding: 0!important;
}
//.tableList .ant-table-tbody > tr > td{
// color: #040B29 ;
//}