Browse Source

!25 bug修改

Merge pull request !25 from 高森/feature/gs
pull/12/head
ThinkEnergy Gitee 4 years ago
parent
commit
b32d887f47
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 40 deletions
  1. +1
    -30
      webapp/src/views/algorithm/utils.js
  2. +2
    -10
      webapp/src/views/labelGroup/index.vue

+ 1
- 30
webapp/src/views/algorithm/utils.js View File

@@ -15,7 +15,6 @@
*/

import { getEmptyFormatter, ALGORITHM_RESOURCE_ENUM } from '@/utils';
import { algList } from '@/config';

export function getColumns({
doEdit,
@@ -27,12 +26,6 @@ export function getColumns({
allAlgorithmUsageList,
isAdmin,
}) {
const data = JSON.parse(JSON.stringify(algList));
data.forEach((item) => {
item.label = item.auxInfo;
item.value = item.id;
});
const dropdownList = data;
const isPreset = active === String(ALGORITHM_RESOURCE_ENUM.PRESET);
return [
{
@@ -54,29 +47,7 @@ export function getColumns({
prop: 'algorithmUsage',
formatter: getEmptyFormatter(),
width: '100px',
// dropdownList: allAlgorithmUsageList,
dropdownList: [
{
label: '全部',
value: '',
},
{
label: '健康状态',
value: '健康状态',
},
{
label: '安全预警',
value: '安全预警',
},
{
label: '异常检测',
value: '异常检测',
},
{
label: '其他',
value: '其他',
},
],
dropdownList: allAlgorithmUsageList,
},
// {
// label: '是否支持推理',


+ 2
- 10
webapp/src/views/labelGroup/index.vue View File

@@ -199,7 +199,6 @@ import DropdownHeader from '@/components/DropdownHeader';
import BaseModal from '@/components/BaseModal';
import LabelGroupAction from './labelGroupAction';
import '@/views/dataset/style/list.scss';
import { algList } from '@/config';

const defaultForm = {
id: null,
@@ -282,14 +281,6 @@ export default {
},

labelGroupTypeList() {
// const data = JSON.parse(JSON.stringify(algList));
// data.forEach((item) => {
// item.label = item.auxInfo;
// item.value = item.id;
// });
// return data;
// return [{ label: '全部', value: null }].concat(data);
// return [{ label: '全部', value: null }].concat(Object.values(labelGroupTypeMap));
return [{ label: '全部', value: null }].concat(this.$store.state.app.labelType);
},

@@ -322,8 +313,9 @@ export default {

// 根据值获取标签值
getLabelGroupLabel(value) {
const algList = this.$store.state.app.labelType;
// return (Object.values(labelGroupTypeMap).find((d) => d.value === value) || {}).label;
return (Object.values(algList).find((d) => d.id === value) || {}).auxInfo;
return (Object.values(algList).find((d) => d.value === value) || {}).label;
},

onResetQuery() {


Loading…
Cancel
Save