[update] 零部件名称修改

This commit is contained in:
lideqin
2024-01-19 16:34:06 +08:00
parent da81933e11
commit eddbaa02ae
7 changed files with 13 additions and 12 deletions
+7 -6
View File
@@ -31,13 +31,14 @@
<div class="modal-content"> <div class="modal-content">
<a-table <a-table
:columns="columns" :columns="columns"
rowKey="itemValue" rowKey="code"
bordered bordered
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:pagination="ipagination" :pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: type }"
:loading="confirmLoading" :loading="confirmLoading"
:childrenColumnName="['childPartNameList']"
@change="handleTableChange"> @change="handleTableChange">
<template slot="text" slot-scope="text"> <template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style"> <a-tooltip overlay-class-name="tooltip-style">
@@ -49,7 +50,7 @@
</div> </div>
<p class="modal-content-title">{{ $t('treeSelection.selectedData') }}</p> <p class="modal-content-title">{{ $t('treeSelection.selectedData') }}</p>
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content"> <div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
<div v-for="(item, index) in dataSourceRight" :key="item.itemValue" class="name-div"> <div v-for="(item, index) in dataSourceRight" :key="item.code" class="name-div">
{{ item.itemText }} {{ item.itemText }}
<a-icon type="close" @click="handleDelete(item, index)" /> <a-icon type="close" @click="handleDelete(item, index)" />
</div> </div>
@@ -117,7 +118,7 @@ export default {
columns: [ columns: [
{ {
title: this.$t('system.tag.name'), title: this.$t('system.tag.name'),
dataIndex: 'title' dataIndex: 'name'
} }
], ],
dataSource: [], dataSource: [],
@@ -186,7 +187,7 @@ export default {
if (selectedRowKeys.length > this.dataSourceRight.length) { if (selectedRowKeys.length > this.dataSourceRight.length) {
// 说明是增加了数据 // 说明是增加了数据
for (const rowIndex in selectedRows) { for (const rowIndex in selectedRows) {
if (!this.dataSourceRight.find(item => item.itemValue === selectedRows[rowIndex].itemValue)) { if (!this.dataSourceRight.find(item => item.code === selectedRows[rowIndex].code)) {
// 右侧不存在,追加到右侧表格 // 右侧不存在,追加到右侧表格
this.dataSourceRight.push(selectedRows[rowIndex]) this.dataSourceRight.push(selectedRows[rowIndex])
} }
@@ -196,7 +197,7 @@ export default {
if (selectedRowKeys && selectedRowKeys.length > 0) { if (selectedRowKeys && selectedRowKeys.length > 0) {
// 没有选中数据,说明这一页没有选中数据了 // 没有选中数据,说明这一页没有选中数据了
for (let i = 0; i < this.dataSourceRight.length; i++) { for (let i = 0; i < this.dataSourceRight.length; i++) {
if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].itemValue)) { if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].code)) {
// 表格选中中没有找到这一条数据,说明已经被删了 // 表格选中中没有找到这一条数据,说明已经被删了
this.dataSourceRight.splice(i, 1) this.dataSourceRight.splice(i, 1)
i-- i--
@@ -217,7 +218,7 @@ export default {
// 名字列表的删除 // 名字列表的删除
handleDelete (record, index) { handleDelete (record, index) {
this.dataSourceRight.splice(index, 1) this.dataSourceRight.splice(index, 1)
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.itemValue) this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.code)
}, },
handleOk () { handleOk () {
if (this.checkRequired && (!this.selectedRowKeys || this.selectedRowKeys.length === 0)) { if (this.checkRequired && (!this.selectedRowKeys || this.selectedRowKeys.length === 0)) {
@@ -412,7 +412,7 @@
filedName="componentName" filedName="componentName"
type="checkbox" type="checkbox"
:nameStr="formInline.componentName_dictText" :nameStr="formInline.componentName_dictText"
dict-id="1696007957666533377" options-href="/laws/standard/partName/"
:disabled="disabled" /> :disabled="disabled" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -391,7 +391,7 @@
filedName="componentName" filedName="componentName"
type="checkbox" type="checkbox"
:nameStr="formInline.componentName_dictText" :nameStr="formInline.componentName_dictText"
dict-id="1696007957666533377" options-href="/laws/standard/partName/"
:disabled="disabled" /> :disabled="disabled" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -207,7 +207,7 @@
filedName="partName" filedName="partName"
type="checkbox" type="checkbox"
:nameStr="formInline.partName_dictText" :nameStr="formInline.partName_dictText"
dict-id="1696007957666533377" options-href="/laws/standard/partName/"
:disabled="disabled" /> :disabled="disabled" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -362,7 +362,7 @@
filedName="componentName" filedName="componentName"
type="checkbox" type="checkbox"
:nameStr="formInline.componentName_dictText" :nameStr="formInline.componentName_dictText"
dict-id="1696007957666533377" options-href="/laws/standard/partName/"
:disabled="disabled" /> :disabled="disabled" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -366,7 +366,7 @@
filedName="componentName" filedName="componentName"
type="checkbox" type="checkbox"
:nameStr="formInline.componentName_dictText" :nameStr="formInline.componentName_dictText"
dict-id="1696007957666533377" options-href="/laws/standard/partName/"
:disabled="disabled" /> :disabled="disabled" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -175,7 +175,7 @@
:filedName="item.dbFieldName" :filedName="item.dbFieldName"
type="checkbox" type="checkbox"
:nameStr="formInline[item.dbFieldName + '_dictText']" :nameStr="formInline[item.dbFieldName + '_dictText']"
:dict-id="item.dictId" :options-href="item.fieldHref"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" /> :disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
</a-form-model-item> </a-form-model-item>
</div> </div>