This commit is contained in:
lideqin
2024-07-12 19:03:08 +08:00
parent c166bfecdf
commit 0d604515ed
2 changed files with 91 additions and 3 deletions
+3
View File
@@ -39,6 +39,8 @@ const regulatoryComplianceCheckTurnTo = (params) => postAction('/process/standar
const regulatoryComplianceCheckAgree = (params) => postAction('/process/standardComplianceCheck/agree', params)
// 驳回
const regulatoryComplianceCheckReject = (params) => postAction('/process/standardComplianceCheck/reject', params)
// 提交
const regulatoryComplianceCheckSubmit = (params) => postAction('/process/standardComplianceCheck/submit', params)
// 根据id查询流程数据--办理
const regulatoryComplianceCheckGetDataById = (taskId, params) => getAction(`/process/standardComplianceCheck/handle/${taskId}`, params)
// 草稿的办理回显数据
@@ -123,6 +125,7 @@ export {
regulatoryComplianceCheckTurnTo,
regulatoryComplianceCheckAgree,
regulatoryComplianceCheckReject,
regulatoryComplianceCheckSubmit,
regulatoryComplianceCheckGetDataById,
regulatoryComplianceCheckGetDataDraft,
selectStandardFromSplit,
@@ -116,6 +116,8 @@ import { getMarketRegulationListById } from '../../../api/standardRegulationLibr
import JTable from '../../../components/jero/JTable'
import { mapGetters } from 'vuex'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { getAction } from '../../../api/manage'
import Vue from 'vue'
export default {
name: 'MarketRegulationsDetailPage',
@@ -145,6 +147,11 @@ export default {
return {
loading: false,
model: {},
/* 排序参数 */
isorter: {
column: 'standardNumber',
order: 'desc'
},
columns: [
{ // 序号
title: this.$t('serialNumber'),
@@ -161,21 +168,57 @@ export default {
align: 'center',
width: 180,
dataIndex: 'standardNumber',
scopedSlots: { customRender: 'toDetail' }
customRender: (text, row, index) => {
return {
children: <a-tooltip overlay-class-name="tooltip-style">
<template slot={'title'}>{ text || text === 0 ? text : global.emptyLine }</template>
<a class="link-a" onClick={() => this.toDetail(row)}>{{ text }}</a>
</a-tooltip>,
attrs: {
// 合并行 含col字段则合并,其他的必须设置为0!!
rowSpan: row.col ? row.col : 0,
}
}
}
// scopedSlots: { customRender: 'toDetail' }
},
{ // 标准编号
title: this.$t('standardName'),
align: 'center',
width: 180,
dataIndex: 'standardName',
scopedSlots: { customRender: 'toDetail' }
customRender: (text, row, index) => {
return {
children: <a-tooltip overlay-class-name="tooltip-style">
<template slot={'title'}>{ text || text === 0 ? text : global.emptyLine }</template>
<a class="link-a" onClick={() => this.toDetail(row)}>{{ text }}</a>
</a-tooltip>,
attrs: {
// 合并行 含col字段则合并,其他的必须设置为0!!
rowSpan: row.col ? row.col : 0,
}
}
}
// scopedSlots: { customRender: 'toDetail' }
},
{ // 标准英文名称
title: this.$t('standardRegulationLibrary.marketListField.standardEnglishName'),
align: 'center',
width: 180,
dataIndex: 'standardEnglishName',
scopedSlots: { customRender: 'text' }
customRender: (text, row, index) => {
return {
children: <a-tooltip overlay-class-name="tooltip-style">
<template slot={'title'}>{text || text === 0 ? text : Vue.prototype.global.emptyLine}</template>
<div class="table-text">{text || text === 0 ? text : Vue.prototype.global.emptyLine}</div>
</a-tooltip>,
attrs: {
// 合并行 含col字段则合并,其他的必须设置为0!!
rowSpan: row.col ? row.col : 0,
}
}
}
// scopedSlots: { customRender: 'text' }
},
{ // 新生产车实施日期
title: this.$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate'),
@@ -340,6 +383,48 @@ export default {
this.loading = false
})
},
loadData (arg) {
// 加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1
}
const params = this.getQueryParams()// 查询条件
console.log(params)
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
const result = res.result.records || res.result
this.dataSource = result.map(item => {
const arr = this.indexcount(result, item.standardNumber)
return {
...item,
col: item.id === arr[0] ? arr.length : 0
}
})
if (res.result.total) {
this.ipagination.total = res.result.total
} else {
this.ipagination.total = 0
}
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
// 出现次数
indexcount (arr, item) {
const arr1 = []
for (var i = 0; i < arr.length; i++) {
if (arr[i].standardNumber == item) {
arr1.push(arr[i].id)
}
}
return arr1
},
toDetail (record) {
const path = '/standardRegulationLibrary/foreignStandardDetailPage'
this.$openPageNewSheet({