From bd33e306b44b99a541d12a0b262022cead55fdd5 Mon Sep 17 00:00:00 2001 From: ph Date: Thu, 28 May 2020 14:58:29 +0800 Subject: [PATCH] fix issue --- .../ui/src/components/multiselectGroup.vue | 17 +-- mindinsight/ui/src/store.js | 4 + .../src/views/train-manage/data-traceback.vue | 124 +++++++++++------- .../views/train-manage/model-traceback.vue | 104 +++++++++------ 4 files changed, 158 insertions(+), 91 deletions(-) diff --git a/mindinsight/ui/src/components/multiselectGroup.vue b/mindinsight/ui/src/components/multiselectGroup.vue index ab54c3e..b23973f 100644 --- a/mindinsight/ui/src/components/multiselectGroup.vue +++ b/mindinsight/ui/src/components/multiselectGroup.vue @@ -171,7 +171,7 @@ export default { break; } const listItem = this.checkListArr[i]; - if (listItem.show) { + if (listItem.show && !listItem.checked) { listItem.checked = true; this.multiSelectedItemNames[listItem.label] = true; this.selectedNumber++; @@ -309,23 +309,24 @@ export default { const loopCount = this.checkListArr.length; for (let i = 0; i < loopCount; i++) { const listItem = this.checkListArr[i]; - if (reg.test(listItem.label)) { - listItem.show = true; + if (listItem.checked) { if (this.selectedNumber >= this.limitNum) { listItem.checked = false; - itemSelectAll = false; - } else if (listItem.checked) { + } else { this.multiSelectedItemNames[listItem.label] = true; this.selectedNumber++; - } else { - itemSelectAll = false; } + } + if (reg.test(listItem.label)) { + listItem.show = true; } else { listItem.show = false; } } - if (!itemSelectAll && this.selectedNumber >= this.limitNum) { + if (this.selectedNumber >= this.limitNum) { itemSelectAll = true; + } else { + itemSelectAll = false; } } else { this.checkListArr.forEach((listItem) => { diff --git a/mindinsight/ui/src/store.js b/mindinsight/ui/src/store.js index c503c30..4d990f2 100644 --- a/mindinsight/ui/src/store.js +++ b/mindinsight/ui/src/store.js @@ -32,6 +32,7 @@ export default new Vuex.Store({ : 3, // multiSelevtGroup component count multiSelectedGroupCount: 0, + tableId: 0, }, mutations: { // set cancelTokenArr @@ -72,6 +73,9 @@ export default new Vuex.Store({ multiSelectedGroupComponentNum(state) { state.multiSelectedGroupCount++; }, + increaseTableId(state) { + state.tableId++; + }, }, actions: {}, }); diff --git a/mindinsight/ui/src/views/train-manage/data-traceback.vue b/mindinsight/ui/src/views/train-manage/data-traceback.vue index db0b552..1105558 100644 --- a/mindinsight/ui/src/views/train-manage/data-traceback.vue +++ b/mindinsight/ui/src/views/train-manage/data-traceback.vue @@ -24,11 +24,12 @@ limitations under the License. type="primary" size="mini" plain - v-show="(summaryDirList&&!summaryDirList.length)||(totalSeries&&totalSeries.length)"> + v-show="(summaryDirList && !summaryDirList.length)||(totalSeries && totalSeries.length)"> {{ $t('modelTraceback.showAllData') }}
+ v-show="totalSeries && totalSeries.length && + (!summaryDirList || (summaryDirList && summaryDirList.length))">
{{$t('modelTraceback.displayColumn')}}
@@ -50,17 +51,17 @@ limitations under the License.
@@ -69,7 +70,7 @@ limitations under the License. :label="item.label" :value="item.value" :disabled="item.disabled" - :title="item.disabled?$t('modelTraceback.mustExist'):''"> + :title="item.disabled ? $t('modelTraceback.mustExist') : ''"> @@ -79,7 +80,8 @@ limitations under the License.
+ v-show="!showEchartPic && showTable && !(summaryDirList && !summaryDirList.length)"> +
@@ -116,8 +118,8 @@ limitations under the License. :key="key" :prop="key" :label="table.columnOptions[key].label" - :sortable="sortArray.includes(table.columnOptions[key].label)?'custom':false" - :fixed="table.columnOptions[key].label===text?true:false" + :sortable="sortArray.includes(table.columnOptions[key].label) ? 'custom' : false" + :fixed="table.columnOptions[key].label === text?true:false" min-width="200" show-overflow-tooltip>