| | |
| | | export function postAction(url,parameter) { |
| | | let sign = signMd5Utils.getSign(url, parameter); |
| | | //å°ç¾ååæ¶é´æ³ï¼æ·»å å¨è¯·æ±æ¥å£ Header |
| | | let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getDateTimeToString()}; |
| | | // update-begin--author:taoyan---date:20220421--for: VUEN-410ãç¾åæ¹é ã X-TIMESTAMPçµæ¯ |
| | | let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() }; |
| | | // update-end--author:taoyan---date:20220421--for: VUEN-410ãç¾åæ¹é ã X-TIMESTAMPçµæ¯ |
| | | |
| | | return axios({ |
| | | url: url, |
| | |
| | | export function httpAction(url,parameter,method) { |
| | | let sign = signMd5Utils.getSign(url, parameter); |
| | | //å°ç¾ååæ¶é´æ³ï¼æ·»å å¨è¯·æ±æ¥å£ Header |
| | | let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getDateTimeToString()}; |
| | | // update-begin--author:taoyan---date:20220421--for: VUEN-410ãç¾åæ¹é ã X-TIMESTAMPçµæ¯ |
| | | let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() }; |
| | | // update-end--author:taoyan---date:20220421--for: VUEN-410ãç¾åæ¹é ã X-TIMESTAMPçµæ¯ |
| | | |
| | | return axios({ |
| | | url: url, |
| | |
| | | export function getAction(url,parameter) { |
| | | let sign = signMd5Utils.getSign(url, parameter); |
| | | //å°ç¾ååæ¶é´æ³ï¼æ·»å å¨è¯·æ±æ¥å£ Header |
| | | let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getDateTimeToString()}; |
| | | // update-begin--author:taoyan---date:20220421--for: VUEN-410ãç¾åæ¹é ã X-TIMESTAMPçµæ¯ |
| | | let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() }; |
| | | // update-end--author:taoyan---date:20220421--for: VUEN-410ãç¾åæ¹é ã X-TIMESTAMPçµæ¯ |
| | | |
| | | return axios({ |
| | | url: url, |
| | |
| | | enhanced: { |
| | | aopEvents: { |
| | | editActived(event) { |
| | | // ãissues/3854ãé表æ§ä»¶ç±»å为popupå¿
å¡«æ¶æªéæ©å¼æäº¤è¡¨å伿¥é |
| | | if (event.$event && event.$event.type === 'valid-error') { |
| | | return; |
| | | } |
| | | dispatchEvent.call(this, event, 'ant-input') |
| | | }, |
| | | }, |
| | |
| | | } |
| | | }, |
| | | mixins: [VxeWebSocketMixins], |
| | | components: {JVxeToolbar, JVxeSubPopover, JVxeDetailsModal, JVxePagination}, |
| | | components: { JVxeToolbar, JVxeSubPopover, JVxeDetailsModal, JVxePagination }, |
| | | props: { |
| | | rowKey: PropTypes.string.def('id'), |
| | | // åä¿¡æ¯ |
| | |
| | | // prefix åç¼ï¼suffix åç¼ï¼ |
| | | slots: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé®ï¼collapse å±å¼æ¶èµ· |
| | | btns: ['add', 'remove', 'clearSelection'], |
| | | btns: ['add', 'remove', 'clearSelection'] |
| | | })), |
| | | // æ¯å¦æ¾ç¤ºè¡å· |
| | | rowNumber: PropTypes.bool.def(false), |
| | |
| | | // æå¤§é«åº¦ |
| | | maxHeight: { |
| | | type: Number, |
| | | default: () => null, |
| | | default: () => null |
| | | }, |
| | | // è¦ç¦ç¨çè¡ TODO æªå®ç° |
| | | disabledRows: PropTypes.object.def(() => ({})), |
| | |
| | | // 注ï¼è¯¥åæ°ä¸è½å¨æä¿®æ¹ï¼å¦æè¡ãååæ®µå¤çæ
åµä¸ï¼ä¼æ ¹æ®æºå¨æ§è½é æä¸åç¨åº¦çå¡é¡¿ã |
| | | alwaysEdit: PropTypes.bool.def(false), |
| | | // èå¨é
ç½®ï¼æ°ç»ï¼è¯¦æ
é
ç½®è§ææ¡£ |
| | | linkageConfig: PropTypes.array.def(() => []), |
| | | linkageConfig: PropTypes.array.def(() => []) |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | // å
ç½® EditRules |
| | | innerEditRules: [], |
| | | // è®°å½æ»å¨æ¡ä½ç½® |
| | | scroll: {top: 0, left: 0}, |
| | | scroll: { top: 0, left: 0 }, |
| | | // å½åæ¯å¦æ£å¨æ»å¨ |
| | | scrolling: false, |
| | | // vxe é»è®¤é
ç½® |
| | |
| | | 'show-header-overflow': true, |
| | | 'show-footer-overflow': true, |
| | | // å¯ç¼è¾é
ç½® |
| | | 'edit-config': {trigger: 'click', mode: 'cell', showStatus: true}, |
| | | 'edit-config': { trigger: 'click', mode: 'cell', showStatus: true }, |
| | | 'expand-config': { |
| | | iconClose: 'ant-table-row-expand-icon ant-table-row-collapsed', |
| | | iconOpen: 'ant-table-row-expand-icon ant-table-row-expanded' |
| | |
| | | // 'scroll-x': { |
| | | // gt: 15 |
| | | // }, |
| | | 'radio-config': {highlight: true}, |
| | | 'checkbox-config': {highlight: true}, |
| | | 'radio-config': { highlight: true }, |
| | | 'checkbox-config': { highlight: true } |
| | | }, |
| | | // ç»å®å·¦ä¾§éæ©æ¡ |
| | | selectedRows: [], |
| | |
| | | statistics: { |
| | | has: false, |
| | | sum: [], |
| | | average: [], |
| | | average: [] |
| | | }, |
| | | // å
许æ§è¡å·æ°ç¹æçè¡ID |
| | | reloadEffectRowKeysMap: {}, |
| | | //é
ç½®äºä½æ¯æ²¡æææçæé®åå éå |
| | | excludeCode:[], |
| | | excludeCode: [], |
| | | // èå¨ä¸æé项ï¼ç¨äºé离ä¸åç䏿éé¡¹ï¼ |
| | | // å
é¨èå¨é
ç½®ï¼map |
| | | innerLinkageConfig: null, |
| | | innerLinkageConfig: null |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | scrolling: this.scrolling, |
| | | reloadEffect: this.reloadEffect, |
| | | reloadEffectRowKeysMap: this.reloadEffectRowKeysMap, |
| | | listeners: this.cellListeners, |
| | | listeners: this.cellListeners |
| | | } |
| | | if (column.$type === JVXETypes.rowDragSort) { |
| | | renderOptions.dragSortKey = this.dragSortKey |
| | |
| | | config: this.innerLinkageConfig.get(column.key), |
| | | getLinkageOptionsSibling: this.getLinkageOptionsSibling, |
| | | getLinkageOptionsAsync: this.getLinkageOptionsAsync, |
| | | linkageSelectChange: this.linkageSelectChange, |
| | | linkageSelectChange: this.linkageSelectChange |
| | | } |
| | | } |
| | | } |
| | |
| | | // update--begin--autor:lvdandan-----date:20201019------for:LOWCOD-882 ãæ°è¡ç¼è¾ãå表ä¸å¸¦æé®ç鮿¡é®é¢ |
| | | if (column.$type === JVXETypes.file || column.$type === JVXETypes.image) { |
| | | if (column.width && column.width.endsWith('px')) { |
| | | column.width = Number.parseInt(column.width.substr(0,column.width.length-2))+Number.parseInt(1)+'px'; |
| | | column.width = Number.parseInt(column.width.substr(0, column.width.length - 2)) + Number.parseInt(1) + 'px' |
| | | } |
| | | } |
| | | // update--begin--autor:lvdandan-----date:20201019------for:LOWCOD-882 ãæ°è¡ç¼è¾ãå表ä¸å¸¦æé®ç鮿¡é®é¢ |
| | | |
| | | // update--begin--autor:lvdandan-----date:20201211------for:JT-118 ãonlineã æ¥æãæ¶é´æ§ä»¶é¿åº¦è¾å° |
| | | if (column.$type === JVXETypes.datetime || column.$type === JVXETypes.userSelect || column.$type === JVXETypes.departSelect) { |
| | | let width = column.width && column.width.endsWith('px')?Number.parseInt(column.width.substr(0,column.width.length-2)):0; |
| | | if(width <= 190){ |
| | | let width = column.width && column.width.endsWith('px') ? Number.parseInt(column.width.substr(0, column.width.length - 2)) : 0 |
| | | if (width <= 190) { |
| | | column.width = '190px' |
| | | } |
| | | } |
| | | if (column.$type === JVXETypes.date) { |
| | | let width = column.width && column.width.endsWith('px')?Number.parseInt(column.width.substr(0,column.width.length-2)):0; |
| | | if(width <= 135){ |
| | | let width = column.width && column.width.endsWith('px') ? Number.parseInt(column.width.substr(0, column.width.length - 2)) : 0 |
| | | if (width <= 135) { |
| | | column.width = '135px' |
| | | } |
| | | } |
| | |
| | | let expandConfig = Object.assign({}, this.defaultVxeProps['expand-config'], this.expandConfig) |
| | | |
| | | return Object.assign({}, this.defaultVxeProps, { |
| | | showFooter: this.statistics.has, |
| | | showFooter: this.statistics.has |
| | | }, this.$attrs, { |
| | | loading: this.loading, |
| | | columns: this.vxeColumns, |
| | |
| | | maxHeight: this.maxHeight, |
| | | border: this.bordered, |
| | | expandConfig: expandConfig, |
| | | footerMethod: this.handleFooterMethod, |
| | | footerMethod: this.handleFooterMethod |
| | | // footerSpanMethod: this.handleFooterSpanMethod, |
| | | }) |
| | | }, |
| | |
| | | 'edit-actived': this.handleEditActived, |
| | | 'radio-change': this.handleVxeRadioChange, |
| | | 'checkbox-all': this.handleVxeCheckboxAll, |
| | | 'checkbox-change': this.handleVxeCheckboxChange, |
| | | 'checkbox-change': this.handleVxeCheckboxChange |
| | | } |
| | | // ç¨æ·ä¼ éçäºä»¶ï¼è¿è¡åå¹¶æä½ |
| | | Object.keys(this.$listeners).forEach(key => { |
| | |
| | | /** å½åè¡åä¸ç§»ä¸ä½ */ |
| | | rowMoveDown: rowIndex => this.rowResort(rowIndex, rowIndex + 1), |
| | | /** å¨å½åè¡ä¸é¢æå
¥ä¸è¡ */ |
| | | rowInsertDown: rowIndex => this.insertRows({}, rowIndex + 1), |
| | | rowInsertDown: rowIndex => this.insertRows({}, rowIndex + 1) |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | watch: { |
| | | dataSource: { |
| | |
| | | // } |
| | | // } |
| | | // }) |
| | | }, |
| | | } |
| | | }, |
| | | columns: { |
| | | immediate: true, |
| | |
| | | this.loadExcludeCode() |
| | | let innerColumns = [] |
| | | let innerEditRules = {} |
| | | let {rowNumber, rowSelection, rowExpand, dragSort} = this |
| | | let { rowNumber, rowSelection, rowExpand, dragSort } = this |
| | | let expandColumn, seqColumn, checkboxColumn, radioColumn, dragSortColumn |
| | | if (Array.isArray(columns)) { |
| | | this.statistics.has = false |
| | |
| | | |
| | | // å¤çævxeå¯è¯å«çcolumns |
| | | columns.forEach(column => { |
| | | if(this.excludeCode.indexOf(column.key)>=0){ |
| | | if (this.excludeCode.indexOf(column.key) >= 0) { |
| | | return false |
| | | } |
| | | let col = {...column} |
| | | let {type} = col |
| | | let col = { ...column } |
| | | let { type } = col |
| | | const enhanced = getEnhancedMixins(type) |
| | | if (type === JVXETypes.rowNumber) { |
| | | seqColumn = col |
| | |
| | | // 鲿¢åvxeTableèªå¸¦çtypeèµ·å²çª |
| | | col.$type = col.type |
| | | delete col.type |
| | | let renderName = 'cellRender', renderOptions = {name: JVXETypes._prefix + type} |
| | | let renderName = 'cellRender', renderOptions = { name: JVXETypes._prefix + type } |
| | | if (type) { |
| | | // hidden æ¯ç¹æ®çç»ä»¶ |
| | | if (type === JVXETypes.hidden) { |
| | |
| | | } |
| | | // 夿æ¯å¦å¼å¯äºåºå· |
| | | if (rowNumber) { |
| | | let col = {type: 'seq', title: '#', width: 60, fixed: 'left', align: 'center'} |
| | | let col = { type: 'seq', title: '#', width: 60, fixed: 'left', align: 'center' } |
| | | if (seqColumn) { |
| | | col = Object.assign(col, seqColumn, {type: 'seq'}) |
| | | col = Object.assign(col, seqColumn, { type: 'seq' }) |
| | | } |
| | | innerColumns.unshift(col) |
| | | } |
| | |
| | | if (this.statistics.has && !rowExpand && !dragSort) { |
| | | width = 60 |
| | | } |
| | | let col = {type: this.rowSelectionType, width, fixed: 'left', align: 'center'} |
| | | let col = { type: this.rowSelectionType, width, fixed: 'left', align: 'center' } |
| | | // radio |
| | | if (this.rowSelectionType === 'radio' && radioColumn) { |
| | | col = Object.assign(col, radioColumn, {type: 'radio'}) |
| | | col = Object.assign(col, radioColumn, { type: 'radio' }) |
| | | } |
| | | // checkbox |
| | | if (this.rowSelectionType === 'checkbox' && checkboxColumn) { |
| | | col = Object.assign(col, checkboxColumn, {type: 'checkbox'}) |
| | | col = Object.assign(col, checkboxColumn, { type: 'checkbox' }) |
| | | } |
| | | innerColumns.unshift(col) |
| | | } |
| | |
| | | if (this.statistics.has && !dragSort) { |
| | | width = 60 |
| | | } |
| | | let col = {type: 'expand', title: '', width, fixed: 'left', align: 'center', slots: {content: 'expandContent'}} |
| | | let col = { |
| | | type: 'expand', |
| | | title: '', |
| | | width, |
| | | fixed: 'left', |
| | | align: 'center', |
| | | slots: { content: 'expandContent' } |
| | | } |
| | | if (expandColumn) { |
| | | col = Object.assign(col, expandColumn, {type: 'expand'}) |
| | | col = Object.assign(col, expandColumn, { type: 'expand' }) |
| | | } |
| | | innerColumns.unshift(col) |
| | | } |
| | |
| | | if (this.statistics.has) { |
| | | width = 60 |
| | | } |
| | | let col = {type: JVXETypes.rowDragSort, title: '', width, fixed: 'left', align: 'center', cellRender: {name: JVXETypes._prefix + JVXETypes.rowDragSort}} |
| | | let col = { |
| | | type: JVXETypes.rowDragSort, |
| | | title: '', |
| | | width, |
| | | fixed: 'left', |
| | | align: 'center', |
| | | cellRender: { name: JVXETypes._prefix + JVXETypes.rowDragSort } |
| | | } |
| | | if (dragSortColumn) { |
| | | col = Object.assign(col, dragSortColumn, {type: JVXETypes.rowDragSort}) |
| | | col = Object.assign(col, dragSortColumn, { type: JVXETypes.rowDragSort }) |
| | | } |
| | | innerColumns.unshift(col) |
| | | } |
| | |
| | | this.innerLinkageConfig = null |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | |
| | | }, |
| | | |
| | | handleVxeScroll(event) { |
| | | let {$refs, scroll} = this |
| | | let { $refs, scroll } = this |
| | | |
| | | // è®°å½æ»å¨æ¡çä½ç½® |
| | | scroll.top = event.scrollTop |
| | |
| | | |
| | | // ç¹å»åå
æ ¼æ¶è§¦åçäºä»¶ |
| | | handleCellClick(event) { |
| | | let {row, column, $event, $table} = event |
| | | let {$refs} = this |
| | | let { row, column, $event, $table } = event |
| | | let { $refs } = this |
| | | |
| | | // ç¹å»äºå¯ç¼è¾ç |
| | | if (column.editRender) { |
| | |
| | | }, |
| | | |
| | | // åå
æ ¼ç¼è¾ç¶æä¸è¢«å
³éæ¶ä¼è§¦å该äºä»¶ |
| | | handleEditClosed({column}) { |
| | | handleEditClosed({ column }) { |
| | | // æ§è¡å¢å¼º |
| | | getEnhancedMixins(column.own.$type, 'aopEvents').editClosed.apply(this, arguments) |
| | | }, |
| | | |
| | | // åå
æ ¼è¢«æ¿æ´»ç¼è¾æ¶ä¼è§¦å该äºä»¶ |
| | | handleEditActived({column}) { |
| | | handleEditActived({ column }) { |
| | | // æ§è¡å¢å¼º |
| | | getEnhancedMixins(column.own.$type, 'aopEvents').editActived.apply(this, arguments) |
| | | }, |
| | | |
| | | /** è¡¨å°¾æ°æ®å¤çæ¹æ³ï¼ç¨äºæ¾ç¤ºç»è®¡ä¿¡æ¯ */ |
| | | handleFooterMethod({columns, data}) { |
| | | const {statistics} = this |
| | | handleFooterMethod({ columns, data }) { |
| | | const { statistics } = this |
| | | let footers = [] |
| | | if (statistics.has) { |
| | | if (statistics.sum.length > 0) { |
| | |
| | | return footers |
| | | }, |
| | | |
| | | getFooterStatisticsMap({columns, title, checks, method}) { |
| | | getFooterStatisticsMap({ columns, title, checks, method }) { |
| | | return columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return title |
| | |
| | | /** 表尾åå
æ ¼åå¹¶æ¹æ³ */ |
| | | handleFooterSpanMethod(event) { |
| | | if (event.columnIndex === 0) { |
| | | return {colspan: 2} |
| | | return { colspan: 2 } |
| | | } |
| | | }, |
| | | |
| | |
| | | this.scrollTo(null, (top == null || top === '') ? this.scroll.top : top) |
| | | }, |
| | | clearAllData() { |
| | | let {xTable} = this.$refs.vxe.$refs |
| | | // issues/2784 |
| | | // å
æ¸
ç©ºæææ°æ® |
| | | xTable.loadData([]) |
| | | let { xTable } = this.$refs.vxe.$refs |
| | | // issues/2784 |
| | | // å
æ¸
ç©ºæææ°æ® |
| | | xTable.loadData([]) |
| | | }, |
| | | /** |
| | | * å è½½æ°æ°æ®ï¼å loadData ä¸åçæ¯ï¼ç¨è¯¥æ¹æ³å è½½çæ°æ®é½æ¯ç¸å½äºç¹æ°å¢æé®æ°å¢çæ°æ®ã |
| | |
| | | */ |
| | | async loadNewData(dataSource) { |
| | | if (Array.isArray(dataSource)) { |
| | | let {xTable} = this.$refs.vxe.$refs |
| | | let { xTable } = this.$refs.vxe.$refs |
| | | // issues/2784 |
| | | // å
æ¸
ç©ºæææ°æ® |
| | | xTable.loadData([]) |
| | |
| | | // æ¯å¦æ´æ°äºæ°æ® |
| | | let updated = false |
| | | values.forEach((item, idx) => { |
| | | let {rowKey, values: record} = item |
| | | let {row} = this.getIfRowById(rowKey) |
| | | let { rowKey, values: record } = item |
| | | let { row } = this.getIfRowById(rowKey) |
| | | if (!row) { |
| | | return |
| | | } |
| | |
| | | oldValue: oldValue, |
| | | col: column.own, |
| | | column: column, |
| | | isSetValues: true, |
| | | isSetValues: true |
| | | }) |
| | | } |
| | | } else { |
| | |
| | | // ãissues/3828ãæ°æ®æ´æ°åï¼éæ°è®¡ç®ç»è®¡å |
| | | if (updated && this.statistics.has) { |
| | | this.$nextTick(async () => { |
| | | let {xTable} = this.$refs.vxe.$refs; |
| | | await xTable.updateCache(true); |
| | | await xTable.updateData(); |
| | | }); |
| | | let { xTable } = this.$refs.vxe.$refs |
| | | await xTable.updateCache(true) |
| | | await xTable.updateData() |
| | | }) |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | /** è·åè¡¨æ ¼è¡¨åéçå¼ */ |
| | | getValues(callback, rowIds) { |
| | | let tableData = this.getTableData({rowIds: rowIds}) |
| | | let tableData = this.getTableData({ rowIds: rowIds }) |
| | | callback('', tableData) |
| | | }, |
| | | /** è·åè¡¨æ ¼æ°æ® */ |
| | | getTableData(options = {}) { |
| | | let {rowIds} = options |
| | | let { rowIds } = options |
| | | let tableData |
| | | // ä»
æ¥è¯¢æå®idçè¡ |
| | | if (Array.isArray(rowIds) && rowIds.length > 0) { |
| | | tableData = [] |
| | | rowIds.forEach(rowId => { |
| | | let {row} = this.getIfRowById(rowId) |
| | | let { row } = this.getIfRowById(rowId) |
| | | if (row) { |
| | | tableData.push(row) |
| | | } |
| | |
| | | row = this.getNewRowById(id) |
| | | if (!row) { |
| | | console.warn(`JVxeTable.getIfRowByIdï¼æ²¡ææ¾å°id为"${id}"çè¡`) |
| | | return {row: null} |
| | | return { row: null } |
| | | } |
| | | isNew = true |
| | | } |
| | | return {row, isNew} |
| | | return { row, isNew } |
| | | }, |
| | | /** éè¿ä¸´æ¶IDè·åæ°å¢çè¡ */ |
| | | getNewRowById(id) { |
| | |
| | | * @param isOnlJs æ¯å¦æ¯onlineJSå¢å¼ºè§¦åç |
| | | * @return |
| | | */ |
| | | /* async addRows(rows = {}, isOnlJs) { |
| | | async addRows(rows = {}, isOnlJs) { |
| | | return this._addOrInsert(rows, -1, 'added', isOnlJs) |
| | | }, */ |
| | | }, |
| | | |
| | | /** |
| | | * æ·»å ä¸è¡æå¤è¡ |
| | |
| | | * @param options.setActive æ¯å¦æ¿æ´»æåä¸è¡çç¼è¾æ¨¡å¼ |
| | | */ |
| | | async pushRows(rows = {}, options = {}) { |
| | | let {xTable} = this.$refs.vxe.$refs |
| | | let {setActive, index} = options |
| | | let { xTable } = this.$refs.vxe.$refs |
| | | let { setActive, index } = options |
| | | setActive = setActive == null ? false : !!setActive |
| | | index = index == null ? -1 : index |
| | | index = index === -1 ? index : xTable.tableFullData[index] |
| | |
| | | |
| | | /** æ¸
ç©ºéæ©è¡ */ |
| | | clearSelection() { |
| | | let event = {$table: this.$refs.vxe, target: this} |
| | | let event = { $table: this.$refs.vxe, target: this } |
| | | if (this.rowSelectionType === JVXETypes.rowRadio) { |
| | | this.$refs.vxe.clearRadioRow() |
| | | this.handleVxeRadioChange(event) |
| | |
| | | rowIds = [rowId] |
| | | } |
| | | let rows = rowIds.map((id) => { |
| | | let {row} = this.getIfRowById(id) |
| | | let { row } = this.getIfRowById(id) |
| | | if (!row) { |
| | | return |
| | | } |
| | |
| | | values[config.keys[i]] = '' |
| | | } |
| | | // æ¸
空åå åçæ°æ® |
| | | this.setValues([{rowKey: row.id, values}]) |
| | | this.setValues([{ rowKey: row.id, values }]) |
| | | } |
| | | }, |
| | | |
| | |
| | | }) |
| | | }, |
| | | //optionsèªå®ä¹èµå¼ å·æ° |
| | | virtualRefresh(){ |
| | | virtualRefresh() { |
| | | this.scrolling = true |
| | | this.closeScrolling() |
| | | }, |
| | | // 设置 this.scrolling é²ææ¨¡å¼ |
| | | closeScrolling: simpleDebounce(function () { |
| | | closeScrolling: simpleDebounce(function() { |
| | | this.scrolling = false |
| | | }, 100), |
| | | |
| | |
| | | for (let row of rows) { |
| | | let item = cloneObject(row) |
| | | if (insertRecords.includes(row)) { |
| | | handler ? handler({item, row, insertRecords}) : null |
| | | handler ? handler({ item, row, insertRecords }) : null |
| | | |
| | | if (remove) { |
| | | continue |
| | |
| | | _remove(rows) { |
| | | const xTable = this.$refs.vxe.$refs.xTable |
| | | |
| | | const {afterFullData, tableFullData, tableSourceData, editStore, treeConfig, checkboxOpts, selection, isInsertByRow, scrollYLoad} = xTable |
| | | const {actived, removeList, insertList} = editStore |
| | | const {checkField: property} = checkboxOpts |
| | | const { |
| | | afterFullData, |
| | | tableFullData, |
| | | tableSourceData, |
| | | editStore, |
| | | treeConfig, |
| | | checkboxOpts, |
| | | selection, |
| | | isInsertByRow, |
| | | scrollYLoad |
| | | } = xTable |
| | | const { actived, removeList, insertList } = editStore |
| | | const { checkField: property } = checkboxOpts |
| | | let rest = [] |
| | | const nowData = afterFullData |
| | | if (treeConfig) { |
| | |
| | | } |
| | | return xTable.$nextTick().then(() => { |
| | | xTable.recalculate() |
| | | return {row: rest.length ? rest[rest.length - 1] : null, rows: rest} |
| | | return { row: rest.length ? rest[rest.length - 1] : null, rows: rest } |
| | | }) |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | async _addOrInsert(rows = {}, index, triggerName, isOnlJs) { |
| | | let {xTable} = this.$refs.vxe.$refs |
| | | let { xTable } = this.$refs.vxe.$refs |
| | | let records |
| | | if (Array.isArray(rows)) { |
| | | records = rows |
| | |
| | | } |
| | | // éåæ·»å é»è®¤å¼ |
| | | records.forEach(record => this._createRow(record)) |
| | | let result = await this.pushRows(records, {index: index, setActive: true}) |
| | | let result = await this.pushRows(records, { index: index, setActive: true }) |
| | | // éåæå
¥çè¡ |
| | | // update--begin--autor:lvdandan-----date:20201117------for:LOWCOD-987 ãæ°è¡ç¼è¾ãjså¢å¼ºé表å
ç½®æ¹æ³è°ç¨é®é¢ #1819 |
| | | // online jså¢å¼ºæ¶ä»¥ä¼ è¿æ¥å¼ä¸ºåï¼ä¸åèµé»è®¤å¼ |
| | |
| | | this.trigger(triggerName, { |
| | | row: row, |
| | | $table: xTable, |
| | | target: this, |
| | | target: this |
| | | }) |
| | | } |
| | | } |
| | |
| | | }, |
| | | // å建æ°è¡ï¼èªå¨æ·»å é»è®¤å¼ |
| | | _createRow(record = {}) { |
| | | let {xTable} = this.$refs.vxe.$refs |
| | | let { xTable } = this.$refs.vxe.$refs |
| | | // æ·»å é»è®¤å¼ |
| | | xTable.tableFullColumn.forEach(column => { |
| | | let col = column.own |
| | | if (col.key && (record[col.key] == null || record[col.key] === '')) { |
| | | // 设置é»è®¤å¼ |
| | | let createValue = getEnhancedMixins(col.$type || col.type, 'createValue') |
| | | record[col.key] = createValue({row: record, column, $table: xTable}) |
| | | record[col.key] = createValue({ row: record, column, $table: xTable }) |
| | | } |
| | | // update-begin--author:sunjianlei---date:20210819------for: å¤çèå¨åï¼èå¨ååªè½ä½ç¨äº select ç»ä»¶ |
| | | if (col.$type === JVXETypes.select && this.innerLinkageConfig != null) { |
| | |
| | | props: this.vxeProps, |
| | | on: this.vxeEvents, |
| | | // ä½ç¨åææ§½çæ ¼å¼ä¸º |
| | | scopedSlots: this.$scopedSlots, |
| | | scopedSlots: this.$scopedSlots |
| | | }) |
| | | }, |
| | | // 渲æå·¥å
·æ |
| | |
| | | size: this.size, |
| | | disabled: this.disabled, |
| | | disabledRows: this.disabledRows, |
| | | selectedRowIds: this.selectedRowIds, |
| | | selectedRowIds: this.selectedRowIds |
| | | }, |
| | | on: { |
| | | // æ°å¢äºä»¶ |
| | |
| | | // ä¿åäºä»¶ |
| | | save: () => this.trigger('save', { |
| | | $table: this.$refs.vxe, |
| | | target: this, |
| | | target: this |
| | | }), |
| | | // å é¤äºä»¶ |
| | | remove: () => { |
| | |
| | | let deleteRows = this.filterNewRows(this.selectedRows) |
| | | // 触åå é¤äºä»¶ |
| | | if (deleteRows.length > 0) { |
| | | let removeEvent = {deleteRows, $table, target: this} |
| | | let removeEvent = { deleteRows, $table, target: this } |
| | | if (this.asyncRemove) { |
| | | // 确认å é¤ï¼åªæè°ç¨è¿ä¸ªæ¹æ³æä¼çå é¤ |
| | | removeEvent.confirmRemove = () => this.removeSelection() |
| | |
| | | }, |
| | | scopedSlots: { |
| | | toolbarPrefix: this.$scopedSlots.toolbarPrefix, |
| | | toolbarSuffix: this.$scopedSlots.toolbarSuffix, |
| | | }, |
| | | toolbarSuffix: this.$scopedSlots.toolbarSuffix |
| | | } |
| | | }) |
| | | } |
| | | return null |
| | |
| | | return h('j-vxe-sub-popover', { |
| | | ref: 'subPopover', |
| | | scopedSlots: { |
| | | subForm: this.$scopedSlots.subForm, |
| | | subForm: this.$scopedSlots.subForm |
| | | } |
| | | }) |
| | | } |
| | |
| | | }, |
| | | on: { |
| | | change: (e) => this.trigger('pageChange', e) |
| | | }, |
| | | } |
| | | }) |
| | | } |
| | | return null |
| | | }, |
| | | loadExcludeCode(){ |
| | | if(!this.authPre || this.authPre.length==0){ |
| | | loadExcludeCode() { |
| | | if (!this.authPre || this.authPre.length == 0) { |
| | | this.excludeCode = [] |
| | | }else{ |
| | | } else { |
| | | let pre = this.authPre |
| | | if(!pre.endsWith(':')){ |
| | | if (!pre.endsWith(':')) { |
| | | pre += ':' |
| | | } |
| | | this.excludeCode = getNoAuthCols(pre) |
| | |
| | | this.renderToolbar(h), |
| | | this.renderToolbarAfterSlot(), |
| | | this.renderVxeGrid(h), |
| | | this.renderPagination(h), |
| | | this.renderPagination(h) |
| | | ]) |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | |
| | | // å
¼å®¹ online çè§å |
| | | const fooPatterns = [ |
| | | {title: 'é空', value: '*', pattern: /^.+$/}, |
| | | {title: '6å°16使°å', value: 'n6-16', pattern: /^\d{6,16}$/}, |
| | | {title: '6å°16ä½ä»»æå符', value: '*6-16', pattern: /^.{6,16}$/}, |
| | | {title: '6å°18ä½åæ¯', value: 's6-18', pattern: /^[a-z|A-Z]{6,18}$/}, |
| | | {title: 'ç½å', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/}, |
| | | {title: 'çµåé®ä»¶', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/}, |
| | | {title: 'ææºå·ç ', value: 'm', pattern: /^1[3456789]\d{9}$/}, |
| | | {title: '鮿¿ç¼ç ', value: 'p', pattern: /^[0-9]{6}$/}, |
| | | {title: '忝', value: 's', pattern: /^[A-Z|a-z]+$/}, |
| | | {title: 'æ°å', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/}, |
| | | {title: 'æ´æ°', value: 'z', pattern: /^-?\d+$/}, |
| | | {title: 'éé¢', value: 'money', pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,5}))$/}, |
| | | { title: 'é空', value: '*', pattern: /^.+$/ }, |
| | | { title: '6å°16使°å', value: 'n6-16', pattern: /^\d{6,16}$/ }, |
| | | { title: '6å°16ä½ä»»æå符', value: '*6-16', pattern: /^.{6,16}$/ }, |
| | | { title: '6å°18ä½åæ¯', value: 's6-18', pattern: /^[a-z|A-Z]{6,18}$/ }, |
| | | { |
| | | title: 'ç½å', |
| | | value: 'url', |
| | | pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/ |
| | | }, |
| | | { title: 'çµåé®ä»¶', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/ }, |
| | | { title: 'ææºå·ç ', value: 'm', pattern: /^1[3456789]\d{9}$/ }, |
| | | { title: '鮿¿ç¼ç ', value: 'p', pattern: /^[0-9]{6}$/ }, |
| | | { title: '忝', value: 's', pattern: /^[A-Z|a-z]+$/ }, |
| | | { title: 'æ°å', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/ }, |
| | | { title: 'æ´æ°', value: 'z', pattern: /^-?\d+$/ }, |
| | | { title: 'éé¢', value: 'money', pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,5}))$/ } |
| | | ] |
| | | |
| | | /** æ§çhandler转为æ°çValidator */ |
| | | function handlerConvertToValidator(event) { |
| | | const {column, rule} = event |
| | | const { column, rule } = event |
| | | return new Promise((resolve, reject) => { |
| | | rule.handler(event, (flag, msg) => { |
| | | let message = rule.message |
| | |
| | | |
| | | /** å¯ä¸æ ¡éªå¨ */ |
| | | function uniqueValidator(event) { |
| | | const {cellValue, column, rule} = event |
| | | const { cellValue, column, rule } = event |
| | | let tableData = this.getTableData() |
| | | let findCount = 0 |
| | | for (let rowData of tableData) { |
| | |
| | | console.warn('ç±äºä½ 没æå¨ data ä¸å®ä¹ addDefaultRowNum æ addDefaultRowNum 䏿¯æ°åï¼æä»¥é»è®¤æ·»å 䏿¡ç©ºæ°æ®ï¼å¦æä¸æ³é»è®¤æ·»å ç©ºæ°æ®ï¼è¯·å°å®ä¹ addDefaultRowNum 为 0') |
| | | } |
| | | //update-begin-author:taoyan date:20210315 for: ä¸å¯¹å¤jvex é»è®¤å è¡ä¸å¥½ä½¿äº LOWCOD-1349 |
| | | this.eachAllTable((item) => { |
| | | setTimeout(()=>{ |
| | | /* item.addRows() */ |
| | | }, 30) |
| | | }) |
| | | if (rowNum > 0) { |
| | | let newRows = new Array(rowNum).fill({}) |
| | | this.eachAllTable((item) => { |
| | | setTimeout(()=>{ |
| | | item.addRows(newRows) |
| | | }, 30) |
| | | }) |
| | | } |
| | | //update-end-author:taoyan date:20210315 for: ä¸å¯¹å¤jvex é»è®¤å è¡ä¸å¥½ä½¿äº LOWCOD-1349 |
| | | if (typeof this.addAfter === 'function') this.addAfter(this.model) |
| | | this.edit({}) |
| | |
| | | rowNum = 1 |
| | | console.warn('ç±äºä½ 没æå¨ data ä¸å®ä¹ addDefaultRowNum æ addDefaultRowNum 䏿¯æ°åï¼æä»¥é»è®¤æ·»å 䏿¡ç©ºæ°æ®ï¼å¦æä¸æ³é»è®¤æ·»å ç©ºæ°æ®ï¼è¯·å°å®ä¹ addDefaultRowNum 为 0') |
| | | } |
| | | this.eachAllTable((item) => { |
| | | //update-begin-author:taoyan date:20210315 for: ä¸å¯¹å¤jvex é»è®¤å è¡ä¸å¥½ä½¿äº LOWCOD-1349 |
| | | setTimeout(()=>{ |
| | | /* item.addRows() */ |
| | | }, 30) |
| | | //update-end-author:taoyan date:20210315 for: ä¸å¯¹å¤jvex é»è®¤å è¡ä¸å¥½ä½¿äº LOWCOD-1349 |
| | | }) |
| | | if (rowNum > 0) { |
| | | let newRows = new Array(rowNum).fill({}) |
| | | this.eachAllTable((item) => { |
| | | //update-begin-author:taoyan date:20210315 for: ä¸å¯¹å¤jvex é»è®¤å è¡ä¸å¥½ä½¿äº LOWCOD-1349 |
| | | setTimeout(()=>{ |
| | | item.addRows(newRows) |
| | | }, 30) |
| | | //update-end-author:taoyan date:20210315 for: ä¸å¯¹å¤jvex é»è®¤å è¡ä¸å¥½ä½¿äº LOWCOD-1349 |
| | | }) |
| | | } |
| | | if (typeof this.addAfter === 'function') this.addAfter(this.model) |
| | | this.edit(this.model) |
| | | }, |
| | |
| | | return paramStr; |
| | | }; |
| | | |
| | | static getDateTimeToString() { |
| | | const date_ = new Date() |
| | | const year = date_.getFullYear() |
| | | let month = date_.getMonth() + 1 |
| | | let day = date_.getDate() |
| | | if (month < 10) month = '0' + month |
| | | if (day < 10) day = '0' + day |
| | | let hours = date_.getHours() |
| | | let mins = date_.getMinutes() |
| | | let secs = date_.getSeconds() |
| | | const msecs = date_.getMilliseconds() |
| | | if (hours < 10) hours = '0' + hours |
| | | if (mins < 10) mins = '0' + mins |
| | | if (secs < 10) secs = '0' + secs |
| | | if (msecs < 10) secs = '0' + msecs |
| | | return year + '' + month + '' + day + '' + hours + '' + mins + '' + secs |
| | | /** |
| | | * æ¥å£ç¾åç¨ çæheaderä¸çæ¶é´æ³ |
| | | * @returns {number} |
| | | */ |
| | | static getTimestamp(){ |
| | | return new Date().getTime() |
| | | } |
| | | |
| | | // /** |
| | | // * è·å客æ·ç«¯æ¶é´ï¼ç¾ååæ° X_TIMESTAMPï¼ |
| | | // * @returns {string} |
| | | // */ |
| | | // static getDateTimeToString() { |
| | | // const date_ = new Date() |
| | | // const year = date_.getFullYear() |
| | | // let month = date_.getMonth() + 1 |
| | | // let day = date_.getDate() |
| | | // if (month < 10) month = '0' + month |
| | | // if (day < 10) day = '0' + day |
| | | // let hours = date_.getHours() |
| | | // let mins = date_.getMinutes() |
| | | // let secs = date_.getSeconds() |
| | | // const msecs = date_.getMilliseconds() |
| | | // if (hours < 10) hours = '0' + hours |
| | | // if (mins < 10) mins = '0' + mins |
| | | // if (secs < 10) secs = '0' + secs |
| | | // if (msecs < 10) secs = '0' + msecs |
| | | // return year + '' + month + '' + day + '' + hours + '' + mins + '' + secs |
| | | // } |
| | | // true:æ°å¼åçï¼falseï¼éæ°å¼å |
| | | static myIsNaN(value) { |
| | | return typeof value === 'number' && !isNaN(value); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥ç¼å·" v-model="queryParam.num"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å
容"> |
| | | <a-input placeholder="请è¾å
¥å
容" v-model="queryParam.content"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ°"> |
| | | <a-input placeholder="请è¾å
¥åæ°" v-model="queryParam.deductionScore"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('æä½è®¡åè§å')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <deduction-item-modal ref="modalForm" @ok="modalFormOk"></deduction-item-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DeductionItemModal from './modules/deductionItem/DeductionItemModal' |
| | | |
| | | export default { |
| | | name: 'DeductionItemList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | DeductionItemModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'æä½è®¡åè§å管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title:'å
容', |
| | | align:"center", |
| | | dataIndex: 'content' |
| | | }, |
| | | { |
| | | title:'åæ°', |
| | | align:"center", |
| | | dataIndex: 'deductionScore' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/deductionItem/list", |
| | | delete: "/eam/deductionItem/delete", |
| | | deleteBatch: "/eam/deductionItem/deleteBatch", |
| | | exportXlsUrl: "/eam/deductionItem/exportXls", |
| | | importExcelUrl: "eam/deductionItem/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'num',text:'ç¼å·',dictCode:''}) |
| | | fieldList.push({type:'string',value:'content',text:'å
容',dictCode:''}) |
| | | fieldList.push({type:'int',value:'deductionScore',text:'åæ°',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç³è¯·åç¼å·"> |
| | | <a-input placeholder="请è¾å
¥ç³è¯·åç¼å·" v-model="queryParam.num"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç±»å"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç±»å" v-model="queryParam.type" dictCode="apply_type"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å®¡æ ¸ç¶æ"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©å®¡æ ¸ç¶æ" v-model="queryParam.auditStatus" dictCode="certificate_apply_status"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('æä½è¯ç³è¯·è¡¨')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <operation-certificate-apply-modal ref="modalForm" @ok="modalFormOk"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import OperationCertificateApplyModal from './modules/operationCertificateApply/OperationCertificateApplyModal' |
| | | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
| | | import '@/assets/less/TableExpand.less' |
| | | |
| | | export default { |
| | | name: "OperationCertificateApplyList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | OperationCertificateApplyModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'æä½è¯ç³è¯·è¡¨ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'ç³è¯·åç¼å·', |
| | | align:"center", |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title:'ç±»å', |
| | | align:"center", |
| | | dataIndex: 'type_dictText' |
| | | }, |
| | | { |
| | | title:'æå¨åä½', |
| | | align:"center", |
| | | dataIndex: 'departId_dictText' |
| | | }, |
| | | { |
| | | title:'ç³è¯·åä½èç³»çµè¯', |
| | | align:"center", |
| | | dataIndex: 'contactNumber' |
| | | }, |
| | | { |
| | | title:'ç³è¯·äºº', |
| | | align:"center", |
| | | dataIndex: 'applicant_dictText' |
| | | }, |
| | | { |
| | | title:'å®¡æ ¸ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'auditStatus_dictText' |
| | | }, |
| | | { |
| | | title:'夿³¨', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/operationCertificateApply/list", |
| | | delete: "/eam/operationCertificateApply/delete", |
| | | deleteBatch: "/eam/operationCertificateApply/deleteBatch", |
| | | exportXlsUrl: "/eam/operationCertificateApply/exportXls", |
| | | importExcelUrl: "eam/operationCertificateApply/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'num',text:'ç³è¯·åç¼å·',dictCode:''}) |
| | | fieldList.push({type:'string',value:'type',text:'ç±»å',dictCode:'apply_type'}) |
| | | fieldList.push({type:'sel_depart',value:'departId',text:'æå¨åä½'}) |
| | | fieldList.push({type:'string',value:'contactNumber',text:'ç³è¯·åä½èç³»çµè¯',dictCode:''}) |
| | | fieldList.push({type:'string',value:'applicant',text:'ç³è¯·äºº',dictCode:"sys_user,realname,id"}) |
| | | fieldList.push({type:'string',value:'auditStatus',text:'å®¡æ ¸ç¶æ',dictCode:'certificate_apply_status'}) |
| | | fieldList.push({type:'string',value:'remark',text:'夿³¨',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æä½è¯ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥æä½è¯ç¼å·" v-model="queryParam.num"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç¨æ·ID"> |
| | | <j-select-user-by-dep placeholder="è¯·éæ©ç¨æ·ID" v-model="queryParam.userId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åè¯æ¥æ"> |
| | | <j-date placeholder="è¯·éæ©åè¯æ¥æ" v-model="queryParam.issueDate"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ç»ä¸ç¼ç "> |
| | | <j-multi-select-tag placeholder="è¯·éæ©è®¾å¤ç»ä¸ç¼ç " dictCode="mom_eam_equipment,num,id" v-model="queryParam.equipmentIds"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('æä½è¯ä¹¦ç®¡ç')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
| | | <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
| | | <!-- <a-menu slot="overlay">--> |
| | | <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item>--> |
| | | <!-- </a-menu>--> |
| | | <!-- <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button>--> |
| | | <!-- </a-dropdown>--> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <operation-certificate-modal ref="modalForm" @ok="modalFormOk"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import OperationCertificateModal from './modules/operationCertificate/OperationCertificateModal' |
| | | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
| | | import '@/assets/less/TableExpand.less' |
| | | |
| | | export default { |
| | | name: "OperationCertificateList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | OperationCertificateModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'æä½è¯ä¹¦ç®¡ç管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'æä½è¯ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title:'ç¨æ·ID', |
| | | align:"center", |
| | | dataIndex: 'userId_dictText' |
| | | }, |
| | | { |
| | | title:'åè¯æ¥æ', |
| | | align:"center", |
| | | dataIndex: 'issueDate', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'å¼å§æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'startTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'ç»ææ¶é´', |
| | | align:"center", |
| | | dataIndex: 'endTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'å½å卿忰', |
| | | align:"center", |
| | | dataIndex: 'currentCycleScore' |
| | | }, |
| | | { |
| | | title:'设å¤ç»ä¸ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'equipmentIds_dictText' |
| | | }, |
| | | { |
| | | title:'夿³¨', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title:'ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/operationCertificate/list", |
| | | delete: "/eam/operationCertificate/delete", |
| | | deleteBatch: "/eam/operationCertificate/deleteBatch", |
| | | exportXlsUrl: "/eam/operationCertificate/exportXls", |
| | | importExcelUrl: "eam/operationCertificate/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'num',text:'æä½è¯ç¼å·',dictCode:''}) |
| | | fieldList.push({type:'sel_user',value:'userId',text:'ç¨æ·ID'}) |
| | | fieldList.push({type:'date',value:'issueDate',text:'åè¯æ¥æ'}) |
| | | fieldList.push({type:'date',value:'startTime',text:'å¼å§æ¶é´'}) |
| | | fieldList.push({type:'date',value:'endTime',text:'ç»ææ¶é´'}) |
| | | fieldList.push({type:'int',value:'currentCycleScore',text:'å½å卿忰',dictCode:''}) |
| | | fieldList.push({type:'list_multi',value:'equipmentIds',text:'设å¤ç»ä¸ç¼ç ',dictTable:"mom_eam_equipment", dictText:'num', dictCode:'id'}) |
| | | fieldList.push({type:'string',value:'remark',text:'夿³¨',dictCode:''}) |
| | | fieldList.push({type:'string',value:'status',text:'ç¶æ',dictCode:'certificate_status'}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ç¼å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> |
| | | <a-input v-model="model.num" placeholder="请è¾å
¥ç¼å·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="å
容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="content"> |
| | | <a-input v-model="model.content" placeholder="请è¾å
¥å
容" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="åæ°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deductionScore"> |
| | | <a-input-number v-model="model.deductionScore" placeholder="请è¾å
¥åæ°" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: 'DeductionItemForm', |
| | | components: { |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/eam/deductionItem/add", |
| | | edit: "/eam/deductionItem/edit", |
| | | queryById: "/eam/deductionItem/queryById" |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.edit(this.modelDefault); |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <deduction-item-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></deduction-item-form> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import DeductionItemForm from './DeductionItemForm' |
| | | export default { |
| | | name: 'DeductionItemModal', |
| | | components: { |
| | | DeductionItemForm |
| | | }, |
| | | data () { |
| | | return { |
| | | title:'', |
| | | width:800, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.add(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.submitForm(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <!-- 主表ååºå --> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="æä½è¯ç¼å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> |
| | | <a-input v-model="model.num" placeholder="请è¾å
¥æä½è¯ç¼å·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="ç¨æ·ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId"> |
| | | <j-select-user-by-dep v-model="model.userId" :multi="true" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="åè¯æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="issueDate"> |
| | | <j-date placeholder="è¯·éæ©åè¯æ¥æ" v-model="model.issueDate" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="å¼å§æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> |
| | | <j-date placeholder="è¯·éæ©å¼å§æ¶é´" v-model="model.startTime" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="ç»ææ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime"> |
| | | <j-date placeholder="è¯·éæ©ç»ææ¶é´" v-model="model.endTime" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="å½å卿忰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentCycleScore"> |
| | | <a-input-number v-model="model.currentCycleScore" placeholder="请è¾å
¥å½å卿忰" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="设å¤ç»ä¸ç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentIds"> |
| | | <j-multi-select-tag type="list_multi" v-model="model.equipmentIds" dictCode="mom_eam_equipment,num,id" placeholder="è¯·éæ©è®¾å¤ç»ä¸ç¼ç " /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
| | | <j-dict-select-tag type="list" v-model="model.status" dictCode="certificate_status" placeholder="è¯·éæ©ç¶æ" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24" > |
| | | <a-form-model-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-textarea v-model="model.remark" placeholder="请è¾å
¥å¤æ³¨" ></a-textarea> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | <!-- å表ååºå --> |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="æä½è¯ç®¡çæç»" :key="refKeys[0]" :forceRender="true"> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref="refKeys[0]" |
| | | :loading="operationCertificateDetailTable.loading" |
| | | :columns="operationCertificateDetailTable.columns" |
| | | :dataSource="operationCertificateDetailTable.dataSource" |
| | | :maxHeight="300" |
| | | :disabled="formDisabled" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="true" |
| | | /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | |
| | | export default { |
| | | name: 'OperationCertificateForm', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer, |
| | | }, |
| | | data() { |
| | | return { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | model:{ |
| | | }, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 1, |
| | | validatorRules: { |
| | | num: [ |
| | | { required: true, message: '请è¾å
¥æä½è¯ç¼å·!'}, |
| | | ], |
| | | currentCycleScore: [ |
| | | { required: true, message: '请è¾å
¥å½å卿忰!'}, |
| | | { pattern: /^-?\d+\.?\d*$/, message: '请è¾å
¥æ°å!'}, |
| | | ], |
| | | }, |
| | | refKeys: ['operationCertificateDetail', ], |
| | | tableKeys:['operationCertificateDetail', ], |
| | | activeKey: 'operationCertificateDetail', |
| | | // æä½è¯ç®¡çæç» |
| | | operationCertificateDetailTable: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'è¯ä¹¦ID', |
| | | key: 'operationCertificateId', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'ç±»å', |
| | | key: 'type', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: '设å¤id', |
| | | key: 'equipmentId', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'æ£å项', |
| | | key: 'deductionItem', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'æ£å卿', |
| | | key: 'period', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/operationCertificate/add", |
| | | edit: "/eam/operationCertificate/edit", |
| | | queryById: "/eam/operationCertificate/queryById", |
| | | operationCertificateDetail: { |
| | | list: '/eam/operationCertificate/queryOperationCertificateDetailByMainId' |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | addBefore(){ |
| | | this.operationCertificateDetailTable.dataSource=[] |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.operationCertificateDetail.list, params, this.operationCertificateDetailTable) |
| | | } |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | validateSubForm(allValues){ |
| | | return new Promise((resolve,reject)=>{ |
| | | Promise.all([ |
| | | ]).then(() => { |
| | | resolve(allValues) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // å¦æææªéè¿è¡¨åéªè¯çå表ï¼å°±èªå¨è·³è½¬å°å®æå¨çtab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | /** æ´çæformData */ |
| | | classifyIntoFormData(allValues) { |
| | | let main = Object.assign(this.model, allValues.formValue) |
| | | return { |
| | | ...main, // å±å¼ |
| | | operationCertificateDetailList: allValues.tablesValue[0].tableData, |
| | | } |
| | | }, |
| | | validateError(msg){ |
| | | this.$message.error(msg) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel"> |
| | | <operation-certificate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import OperationCertificateForm from './OperationCertificateForm' |
| | | |
| | | export default { |
| | | name: 'OperationCertificateModal', |
| | | components: { |
| | | OperationCertificateForm |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | width:800, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods:{ |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.add(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.handleOk(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning='confirmLoading'> |
| | | <j-form-container :disabled='formDisabled'> |
| | | <!-- 主表ååºå --> |
| | | <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'> |
| | | <a-row> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='ç³è¯·åç¼å·' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder='请è¾å
¥ç³è¯·åç¼å·'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='ç±»å' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='type'> |
| | | <j-dict-select-tag type='radio' v-model='model.type' dictCode='apply_type' placeholder='è¯·éæ©ç±»å' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='æå¨åä½' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='departId'> |
| | | <j-select-depart v-model='model.departId' :multi='true' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='èç³»çµè¯' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='contactNumber'> |
| | | <a-input v-model='model.contactNumber' placeholder='请è¾å
¥èç³»çµè¯'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='ç³è¯·äºº' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='applicant'> |
| | | <j-dict-select-tag type='list' v-model='model.applicant' dictCode='sys_user,realname,id' |
| | | placeholder='è¯·éæ©ç³è¯·äºº' disabled /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='å®¡æ ¸ç¶æ' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='auditStatus'> |
| | | <j-dict-select-tag type='list' v-model='model.auditStatus' dictCode='certificate_apply_status' |
| | | placeholder='è¯·éæ©å®¡æ ¸ç¶æ' disabled /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='24'> |
| | | <a-form-model-item label='夿³¨' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> |
| | | <a-input v-model='model.remark' placeholder='请è¾å
¥å¤æ³¨'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | <!-- å表ååºå --> |
| | | <a-tabs v-model='activeKey' @change='handleChangeTabs'> |
| | | <a-tab-pane tab='æä½è¯ç³è¯·æç»è¡¨' :key='refKeys[0]' :forceRender='true'> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref='refKeys[0]' |
| | | :loading='operationCertificateApplyDetailTable.loading' |
| | | :columns='operationCertificateApplyDetailTable.columns' |
| | | :dataSource='operationCertificateApplyDetailTable.dataSource' |
| | | :maxHeight='300' |
| | | :disabled='formDisabled' |
| | | :rowNumber='true' |
| | | :rowSelection='true' |
| | | :toolbar='true' |
| | | /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import store from '@/store' |
| | | |
| | | export default { |
| | | name: 'OperationCertificateApplyForm', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer |
| | | }, |
| | | data() { |
| | | return { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | model: { |
| | | auditStatus: 'created', |
| | | type: 'normal', |
| | | applicant: store.getters.userInfo.id, |
| | | }, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 1, |
| | | validatorRules: { |
| | | num: [ |
| | | { required: true, message: '请è¾å
¥ç³è¯·åç¼å·!' } |
| | | ], |
| | | auditStatus: [ |
| | | { required: true, message: '请è¾å
¥å®¡æ ¸ç¶æ!' } |
| | | ] |
| | | }, |
| | | refKeys: ['operationCertificateApplyDetail'], |
| | | tableKeys: ['operationCertificateApplyDetail'], |
| | | activeKey: 'operationCertificateApplyDetail', |
| | | // æä½è¯ç³è¯·æç»è¡¨ |
| | | operationCertificateApplyDetailTable: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ç¨æ·', |
| | | key: 'userId', |
| | | type: JVXETypes.userSelect, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '', |
| | | validateRules: [{ required: true, message: '${title}ä¸è½ä¸ºç©º' }] |
| | | }, |
| | | // { |
| | | // title: '设å¤ç»ä¸ç¼ç ', |
| | | // key: 'equipmentIds', |
| | | // type: JVXETypes.input, |
| | | // dictCode: 'mom_eam_equipment,num,id ', |
| | | // width: '200px', |
| | | // placeholder: '请è¾å
¥${title}', |
| | | // defaultValue: '', |
| | | // validateRules: [{ required: true, message: '${title}ä¸è½ä¸ºç©º' }] |
| | | // }, |
| | | { |
| | | title: '设å¤ç»ä¸ç¼ç ', |
| | | key: 'equipmentIds', |
| | | type: JVXETypes.selectSearch, |
| | | dictCode: 'mom_eam_equipment,num,id ', |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '', |
| | | validateRules: [{ required: true, message: '${title}ä¸è½ä¸ºç©º' }] |
| | | }, |
| | | { |
| | | title: 'ä¸å²è¯å·', |
| | | key: 'appointmentCardNum', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '', |
| | | validateRules: [{ required: true, message: '${title}ä¸è½ä¸ºç©º' }] |
| | | }, |
| | | { |
| | | title: 'è¡¥ååå ', |
| | | key: 'replaceReason', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | key: 'remark', |
| | | type: JVXETypes.textarea, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: 'ç论æç»©', |
| | | key: 'theoreticalResults', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '宿æç»©', |
| | | key: 'actualPerformance', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: 'èè¯ç»è®º', |
| | | key: 'examinationConclusion', |
| | | type: JVXETypes.checkbox, |
| | | customValue: ['Y', 'N'], |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | key: 'status', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/operationCertificateApply/add', |
| | | edit: '/eam/operationCertificateApply/edit', |
| | | queryById: '/eam/operationCertificateApply/queryById', |
| | | operationCertificateApplyDetail: { |
| | | list: '/eam/operationCertificateApply/queryOperationCertificateApplyDetailByMainId' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | addBefore() { |
| | | this.operationCertificateApplyDetailTable.dataSource = [] |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.operationCertificateApplyDetail.list, params, this.operationCertificateApplyDetailTable) |
| | | } |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | validateSubForm(allValues) { |
| | | return new Promise((resolve, reject) => { |
| | | Promise.all([]).then(() => { |
| | | resolve(allValues) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // å¦æææªéè¿è¡¨åéªè¯çå表ï¼å°±èªå¨è·³è½¬å°å®æå¨çtab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | /** æ´çæformData */ |
| | | classifyIntoFormData(allValues) { |
| | | let main = Object.assign(this.model, allValues.formValue) |
| | | return { |
| | | ...main, // å±å¼ |
| | | operationCertificateApplyDetailList: allValues.tablesValue[0].tableData |
| | | } |
| | | }, |
| | | validateError(msg) { |
| | | this.$message.error(msg) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1400" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel"> |
| | | <operation-certificate-apply-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import OperationCertificateApplyForm from './OperationCertificateApplyForm' |
| | | |
| | | export default { |
| | | name: 'OperationCertificateApplyModal', |
| | | components: { |
| | | OperationCertificateApplyForm |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | width:800, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods:{ |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.add(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.handleOk(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |