diff --git a/mindinsight/ui/src/assets/images/icon-down.svg b/mindinsight/ui/src/assets/images/icon-down.svg new file mode 100644 index 0000000000000000000000000000000000000000..ce40f45cb464fc133e9fa13bfad6dcc58f68c7bf --- /dev/null +++ b/mindinsight/ui/src/assets/images/icon-down.svg @@ -0,0 +1,10 @@ + + + + 10备份 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/mindinsight/ui/src/views/train-manage/data-traceback.vue b/mindinsight/ui/src/views/train-manage/data-traceback.vue index e8d12a744d108615663ff37276c23ef80b39863c..469f52445ffde2226b123351685057fc4b6a9425 100644 --- a/mindinsight/ui/src/views/train-manage/data-traceback.vue +++ b/mindinsight/ui/src/views/train-manage/data-traceback.vue @@ -195,14 +195,12 @@ limitations under the License. - - + :class="'img' + scope.$index" + :src="require('@/assets/images/icon-down.svg')"> @@ -289,14 +287,14 @@ limitations under the License. {{ $t('public.sure')}} {{ $t('public.clear')}} @@ -587,20 +585,21 @@ export default { /** * Save the modification of the icon - * @param {Object} row + * @param {Object} scope */ - iconChangeSave(row) { + iconChangeSave(scope) { this.tagDialogShow = false; - if (row.tag === this.iconValue || this.iconValue === 0) { + if (scope.row.tag === this.iconValue || this.iconValue === 0) { return; } this.tagScope.row.tag = this.iconValue; - const id = row.summary_dir; - const img = document.getElementById(id); - img.src = require('@/assets/images/icon' + this.iconValue + '.svg'); - + const imgDom = document.querySelectorAll('.img' + scope.$index); + imgDom.forEach((item) => { + item.src = require('@/assets/images/icon' + this.iconValue + '.svg'); + }); + this.$forceUpdate(); const params = { - train_id: row.summary_dir, + train_id: scope.row.summary_dir, body: { tag: this.tagScope.row.tag, }, @@ -610,9 +609,9 @@ export default { /** * clear icon - * @param {Object} row + * @param {Object} scope */ - clearIcon(row) { + clearIcon(scope) { const classWrap = event.path.find((item) => { return item.className === 'icon-dialog'; }); @@ -623,10 +622,12 @@ export default { this.tagDialogShow = false; this.iconValue = 0; this.tagScope.row.tag = 0; - const img = document.getElementById(row.summary_dir); - img.src = ''; + const imgDom = document.querySelectorAll('.img' + scope.$index); + imgDom.forEach((item) => { + item.src = require('@/assets/images/icon-down.svg'); + }); const params = { - train_id: row.summary_dir, + train_id: scope.row.summary_dir, body: { tag: 0, }, @@ -1588,6 +1589,12 @@ export default { this.selectArrayValue = []; this.basearr = []; this.pagination.currentPage = 1; + this.summaryDirList = this.$store.state.summaryDirList; + if (this.summaryDirList) { + this.tableFilter.summary_dir = {in: this.summaryDirList}; + } else { + this.tableFilter.summary_dir = undefined; + } params.body = Object.assign({}, tempParam, this.tableFilter); this.queryLineagesData(params); }, @@ -1992,10 +1999,9 @@ export default { margin: 16px 10px 18px; } .tag-icon-container { - width: 22px; - height: 22px; + width: 21px; + height: 21px; border: 1px solid #e6e6e6; - background-color: white; cursor: pointer; border-radius: 2px; } diff --git a/mindinsight/ui/src/views/train-manage/model-traceback.vue b/mindinsight/ui/src/views/train-manage/model-traceback.vue index 342f477e9453f60b0b0dfa98e49bbc3d91e1db8c..b14adbfa815f086eb596e61d885c027117336a7b 100644 --- a/mindinsight/ui/src/views/train-manage/model-traceback.vue +++ b/mindinsight/ui/src/views/train-manage/model-traceback.vue @@ -254,14 +254,12 @@ limitations under the License. - - - + @@ -318,14 +316,14 @@ limitations under the License. {{$t('public.sure')}} {{$t('public.clear')}} @@ -526,19 +524,21 @@ export default { }, /** * Save the modification of the icon. - * @param {Object} row + * @param {Object} scope */ - iconChangeSave(row) { + iconChangeSave(scope) { this.tagDialogShow = false; - if (row.tag === this.iconValue || this.iconValue === 0) { + if (scope.row.tag === this.iconValue || this.iconValue === 0) { return; } this.tagScope.row.tag = this.iconValue; - const id = row.summary_dir; - const img = document.getElementById(id); - img.src = require('@/assets/images/icon' + this.iconValue + '.svg'); + const imgDom = document.querySelectorAll('.img' + scope.$index); + imgDom.forEach((item) => { + item.src = require('@/assets/images/icon' + this.iconValue + '.svg'); + }); + this.$forceUpdate(); const params = { - train_id: row.summary_dir, + train_id: scope.row.summary_dir, body: { tag: this.tagScope.row.tag, }, @@ -548,9 +548,9 @@ export default { /** * clear icon - * @param {Object} row + * @param {Object} scope */ - clearIcon(row) { + clearIcon(scope) { const classWrap = event.path.find((item) => { return item.className === 'icon-dialog'; }); @@ -561,10 +561,12 @@ export default { this.tagDialogShow = false; this.iconValue = 0; this.tagScope.row.tag = 0; - const img = document.getElementById(row.summary_dir); - img.src = ''; + const imgDom = document.querySelectorAll('.img' + scope.$index); + imgDom.forEach((item) => { + item.src = require('@/assets/images/icon-down.svg'); + }); const params = { - train_id: row.summary_dir, + train_id: scope.row.summary_dir, body: { tag: 0, }, @@ -2058,10 +2060,9 @@ export default { width: 140px; } .tag-icon-container { - width: 22px; - height: 22px; + width: 21px; + height: 21px; border: 1px solid #e6e6e6; - background-color: white; cursor: pointer; border-radius: 2px; }