From 66bdbc1df92e8ec4a5108a4e0323e25a7b9ff8f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:37:16 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/custom/popview/index.jsx | 46 ++++++++++++++++++++++++++++------------------ 1 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index 935f765..4213bf9 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -2,6 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { notification, Spin, Row, Col, Modal } from 'antd' +import moment from 'moment' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -61,7 +62,7 @@ * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅 */ async loadconfig () { - const { Tab } = this.props + const { Tab, param } = this.props let config = Tab.config || '' @@ -105,9 +106,18 @@ // 鏉冮檺杩囨护 let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID let balMap = new Map() - let param = this.props.param || {} // url鍙傛暟 + let urlparam = {} // url鍙傛暟 + if (param) { + Object.keys(param).forEach(key => { + if (/^\$/.test(key)) { + urlparam[key] = param[key] + } else { + urlparam[key.toLowerCase()] = param[key] + } + }) + } - window.GLOB.CacheData.set(Tab.uuid, param) + window.GLOB.CacheData.set(Tab.uuid, urlparam) let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' @@ -129,7 +139,7 @@ regs.push({ reg: /@works_flow_code@/ig, value: `'${flow.flow_code || ''}'` }) } - config.components = this.filterComponent(config.components, roleId, balMap, param, Tab, Tab.uuid, Tab.uuid) + config.components = this.filterComponent(config.components, roleId, balMap, urlparam, Tab, Tab.uuid, Tab.uuid) // 鑾峰彇涓绘悳绱㈡潯浠� config.components.forEach(component => { @@ -143,7 +153,7 @@ }) let params = [] - let BID = param.$BID || '' + let BID = urlparam.$BID || '' config.components = this.formatSetting(config.components, params, regs, balMap) @@ -226,12 +236,7 @@ if (item.setting.supModule === 'preview') { item.setting.supModule = '' - let val = '' - Object.keys(urlparam).forEach(key => { - if (key.toLowerCase() === item.setting.controlField) { - val = urlparam[key] - } - }) + let val = urlparam[item.setting.controlField] || '' item.subtabs = item.subtabs.filter(tab => { if (tab.$pass) return true @@ -244,12 +249,7 @@ if (item.setting.selectField) { item.setting.selectField = item.setting.selectField.toLowerCase() - let val = '' - Object.keys(urlparam).forEach(key => { - if (key.toLowerCase() === item.setting.selectField) { - val = urlparam[key] - } - }) + let val = urlparam[item.setting.selectField] || '' let activeKey = '' @@ -361,7 +361,10 @@ col.type = 'custom' } - if (col.type === 'number') { + if (col.type === 'index') { + col.field = '$Index' + col.type = 'text' + } else if (col.type === 'number') { if (typeof(col.decimal) === 'number') { col.round = Math.pow(10, col.decimal) if (col.format === 'percent') { @@ -412,6 +415,13 @@ item.cols = getCols(item.cols) + if (item.hasExtend) { + item.setting.hasExtend = true + item.setting.tableMode = 'compatible' + item.setting.extendTime = moment().format('YYYY-MM-DD HH:mm:ss') + item.colsCtrls = null + } + if (item.subtype === 'editable') { item.submit.logLabel = item.$menuname + '-鎻愪氦' item.submit.$menuId = item.uuid -- Gitblit v1.8.0