|
|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config manufacturing-structures" tabindex="-1" ref="pageRoot"> |
|
|
|
<div class="mod-config manufacturing-structures" ref="pageRoot"> |
|
|
|
<el-form |
|
|
|
:inline="true" |
|
|
|
label-position="top" |
|
|
|
@ -56,6 +56,8 @@ |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
:cell-class-name="tableCellClassName" |
|
|
|
:row-style="rowStyle" |
|
|
|
@row-click="onRowClick" |
|
|
|
@cell-click="onTableCellClick" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
@ -167,6 +169,7 @@ export default { |
|
|
|
saveLoading: false, |
|
|
|
dataListLoading: false, |
|
|
|
dataList: [], |
|
|
|
currentRow: null, |
|
|
|
chooselistStatusTarget: 'component', |
|
|
|
activeFindColumn: null, |
|
|
|
lastFindRowIndex: -1, |
|
|
|
@ -246,9 +249,6 @@ export default { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 170 |
|
|
|
}) |
|
|
|
if (this.$refs.pageRoot && this.$refs.pageRoot.focus) { |
|
|
|
this.$refs.pageRoot.focus() |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
isEditableProp (prop) { |
|
|
|
@ -261,7 +261,7 @@ export default { |
|
|
|
} |
|
|
|
if (this.lastFindRowIndex >= 0 && this.lastFindRowIndex < this.dataList.length) { |
|
|
|
const val = this.dataList[this.lastFindRowIndex][this.activeFindColumn] |
|
|
|
this.frFindWhat = val === null || val === undefined ? '' : String(val) |
|
|
|
this.frFindWhat = val === null || val === undefined ? '' : String(this.formatNumber(val)) |
|
|
|
} |
|
|
|
this.findReplaceVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -274,6 +274,15 @@ export default { |
|
|
|
this.frFindWhat = '' |
|
|
|
this.frReplaceWith = '' |
|
|
|
}, |
|
|
|
rowStyle ({ row }) { |
|
|
|
if (this.currentRow === row) { |
|
|
|
return { 'background-color': '#E8F7F6', cursor: 'pointer' } |
|
|
|
} |
|
|
|
return { cursor: 'pointer' } |
|
|
|
}, |
|
|
|
onRowClick (row) { |
|
|
|
this.currentRow = row |
|
|
|
}, |
|
|
|
tableCellClassName ({ row, column, rowIndex }) { |
|
|
|
if (rowIndex === this.findHighlightRowIndex && column.property === this.findHighlightColumnProp) { |
|
|
|
return 'ms-find-highlight' |
|
|
|
@ -461,7 +470,7 @@ export default { |
|
|
|
if (value === null || value === undefined || value === '') return value |
|
|
|
let numStr = String(value) |
|
|
|
if (numStr.includes('e') || numStr.includes('E')) { |
|
|
|
return Number(value).toLocaleString('fullwide', { useGrouping: false, maximumFractionDigits: 10 }) |
|
|
|
return Number(value).toLocaleString('fullwide', { useGrouping: false, maximumFractionDigits: 20 }) |
|
|
|
} |
|
|
|
return value |
|
|
|
}, |
|
|
|
@ -658,7 +667,7 @@ export default { |
|
|
|
|
|
|
|
<style> |
|
|
|
.manufacturing-structures .ms-find-highlight { |
|
|
|
background-color: #fff3cd !important; |
|
|
|
background-color: #ffc107 !important; |
|
|
|
} |
|
|
|
.ms-find-replace-dialog .el-dialog__body { |
|
|
|
padding: 15px 20px 20px; |
|
|
|
|