From 0d604515edcd7c5762d1ab07c2cf08723b96027d Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 12 Jul 2024 19:03:08 +0800 Subject: [PATCH] [update] --- src/api/workCenter.js | 3 + .../MarketRegulationsDetailPage.vue | 91 ++++++++++++++++++- 2 files changed, 91 insertions(+), 3 deletions(-) diff --git a/src/api/workCenter.js b/src/api/workCenter.js index 5ce1396..6b3eaad 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -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, diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue index b785f15..c280131 100644 --- a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue +++ b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsDetailPage.vue @@ -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: + + this.toDetail(row)}>{{ text }} + , + 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: + + this.toDetail(row)}>{{ text }} + , + 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: + +
{text || text === 0 ? text : Vue.prototype.global.emptyLine}
+
, + 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({