Browse Source

2026-04-09

新增【Manufacturing Structures】功能
master
fengyuan_yang 7 days ago
parent
commit
3d91228d27
  1. 23
      src/views/modules/part/manufacturingStructures.vue

23
src/views/modules/part/manufacturingStructures.vue

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

Loading…
Cancel
Save