Browse Source

管理端-规范代码格式;

pull/96/head
wenlong92 3 weeks ago
parent
commit
0066c19017
49 changed files with 234 additions and 223 deletions
  1. +1
    -1
      admin-portal/src/components/search/index.vue
  2. +1
    -1
      admin-portal/src/components/upload/index.vue
  3. +0
    -2
      admin-portal/src/permission.js
  4. +1
    -2
      admin-portal/src/store/modules/user.js
  5. +1
    -1
      admin-portal/src/utils/request.js
  6. +1
    -0
      admin-portal/src/utils/requestLog.js
  7. +1
    -1
      admin-portal/src/views/clusterMonitor/clusterMonitor.vue
  8. +1
    -1
      admin-portal/src/views/clusterMonitor/groupMonitor.vue
  9. +7
    -8
      admin-portal/src/views/clusterMonitor/index.vue
  10. +6
    -3
      admin-portal/src/views/dataManager/components/newVersion.vue
  11. +2
    -2
      admin-portal/src/views/dataManager/components/preDatasetCreation.vue
  12. +3
    -3
      admin-portal/src/views/dataManager/components/preview.vue
  13. +2
    -2
      admin-portal/src/views/dataManager/components/reuploadDataset.vue
  14. +5
    -5
      admin-portal/src/views/dataManager/components/versionList.vue
  15. +2
    -2
      admin-portal/src/views/dataManager/index.vue
  16. +9
    -9
      admin-portal/src/views/dataManager/templateList.vue
  17. +7
    -7
      admin-portal/src/views/dataManager/userList.vue
  18. +2
    -2
      admin-portal/src/views/devManager/algorithmManager.vue
  19. +2
    -2
      admin-portal/src/views/devManager/components/algorithm/preAlgorithmCreation.vue
  20. +7
    -4
      admin-portal/src/views/devManager/components/algorithm/preAlgorithmVersionCreation.vue
  21. +3
    -3
      admin-portal/src/views/devManager/components/algorithm/reuploadAlgorithm.vue
  22. +10
    -10
      admin-portal/src/views/devManager/components/algorithm/templateList.vue
  23. +6
    -6
      admin-portal/src/views/devManager/components/algorithm/userList.vue
  24. +8
    -8
      admin-portal/src/views/devManager/components/algorithm/versionList.vue
  25. +3
    -3
      admin-portal/src/views/devManager/components/notebook/notebookList.vue
  26. +13
    -13
      admin-portal/src/views/imageManager/Image.vue
  27. +4
    -3
      admin-portal/src/views/imageManager/components/dialogForm.vue
  28. +2
    -2
      admin-portal/src/views/imageManager/index.vue
  29. +17
    -13
      admin-portal/src/views/modelManager/Model.vue
  30. +9
    -6
      admin-portal/src/views/modelManager/components/createDialog.vue
  31. +4
    -7
      admin-portal/src/views/modelManager/components/previewDialog.vue
  32. +5
    -7
      admin-portal/src/views/modelManager/components/versionList.vue
  33. +2
    -2
      admin-portal/src/views/modelManager/index.vue
  34. +1
    -1
      admin-portal/src/views/resourceManager/components/nodeList.vue
  35. +3
    -3
      admin-portal/src/views/resourceManager/components/poolManager.vue
  36. +10
    -5
      admin-portal/src/views/resourceManager/components/resource.vue
  37. +2
    -2
      admin-portal/src/views/resourceManager/resourceMsg.vue
  38. +2
    -2
      admin-portal/src/views/timeManager/index.vue
  39. +14
    -15
      admin-portal/src/views/timeManager/time.vue
  40. +1
    -1
      admin-portal/src/views/traningManager/components/index.vue
  41. +2
    -2
      admin-portal/src/views/traningManager/components/taskInfo.vue
  42. +1
    -1
      admin-portal/src/views/traningManager/components/taskLoad.vue
  43. +3
    -3
      admin-portal/src/views/traningManager/components/taskLog.vue
  44. +1
    -1
      admin-portal/src/views/traningManager/components/taskProfile.vue
  45. +2
    -3
      admin-portal/src/views/traningManager/traningTaskList.vue
  46. +8
    -7
      admin-portal/src/views/userManager/components/addDialog.vue
  47. +12
    -11
      admin-portal/src/views/userManager/components/operateDialog.vue
  48. +2
    -2
      admin-portal/src/views/userManager/index.vue
  49. +23
    -23
      admin-portal/src/views/userManager/user.vue

+ 1
- 1
admin-portal/src/components/search/index.vue View File

@@ -48,7 +48,7 @@
<script>
export default {
props: {
searchForm: { type: Array, default: [] },
searchForm: { type: Array, default: () => [] },
blurName: { type: String, default: '' }
},
data() {


+ 1
- 1
admin-portal/src/components/upload/index.vue View File

@@ -11,7 +11,7 @@
:accept="accept"
>
<el-button size="small" type="primary" :disabled="loadingShow" :loading="loadingShow">点击上传</el-button>
<div class="tipText">{{ this.tipText }}</div>
<div class="tipText">{{ tipText }}</div>
</el-upload>
<el-button v-if="!showUpload" :loading="loadingShow" size="small" type="primary">上传中</el-button>
<el-progress v-if="(progress!='0'||!showUpload)&&(progress!='100'||!showUpload)" :text-inside="true" :stroke-width="18" :percentage="progress" class="progress" />


+ 0
- 2
admin-portal/src/permission.js View File

@@ -1,6 +1,4 @@
import router from './router'
import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import { getToken } from '@/utils/auth' // get token from cookie


+ 1
- 2
admin-portal/src/store/modules/user.js View File

@@ -1,6 +1,5 @@
import { login } from '@/api/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { resetRouter } from '@/router'
import { getToken, setToken } from '@/utils/auth'
import { Message } from 'element-ui'
const getDefaultState = () => {
return {


+ 1
- 1
admin-portal/src/utils/request.js View File

@@ -1,5 +1,5 @@
import axios from 'axios'
import { MessageBox, Message } from 'element-ui'
import { Message } from 'element-ui'
import store from '@/store'
import { getToken, removeToken } from '@/utils/auth'
import router from '../router'


+ 1
- 0
admin-portal/src/utils/requestLog.js View File

@@ -70,6 +70,7 @@ service.interceptors.response.use(
type: 'warning',
duration: 5 * 1000
})
console.log("error:", error)
// return Promise.reject(error)
}
)


+ 1
- 1
admin-portal/src/views/clusterMonitor/clusterMonitor.vue View File

@@ -10,7 +10,7 @@

<script>
export default {
name: "clusterMonitor",
name: "ClusterMonitor",
components: {

},


+ 1
- 1
admin-portal/src/views/clusterMonitor/groupMonitor.vue View File

@@ -7,7 +7,7 @@
<script>

export default {
name: "groupMonitor",
name: "GroupMonitor",
components: {

},


+ 7
- 8
admin-portal/src/views/clusterMonitor/index.vue View File

@@ -1,5 +1,5 @@
<template>
<div class="wrapper">
<div class="wrapper">
<iframe
:src="grafanaUri"
:height="iFrameHeight"
@@ -11,14 +11,13 @@
</div>
</template>
<script>
import clusterMonitor from "./clusterMonitor.vue";
import groupMonitor from "./groupMonitor.vue";
// import clusterMonitor from "./clusterMonitor.vue";
// import groupMonitor from "./groupMonitor.vue";
export default {
components: {
clusterMonitor,
groupMonitor

},
// components: {
// clusterMonitor,
// groupMonitor
// },
data() {
return {
activeName: 'first',


+ 6
- 3
admin-portal/src/views/dataManager/components/newVersion.vue View File

@@ -29,7 +29,7 @@
<el-form-item v-if="showUpload" label="数据集上传" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
:uploadData="uploadData"
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
@@ -44,12 +44,15 @@ import upload from '@/components/upload/index.vue'
import { createNewVersion } from "@/api/dataManager.js";
import { getErrorMsg } from '@/error/index'
export default {
name: "newVersion",
name: "NewVersion",
components: {
upload
},
props: {
row: {}
row: {
type: Object,
default: () => {}
}
},
data() {
return {


+ 2
- 2
admin-portal/src/views/dataManager/components/preDatasetCreation.vue View File

@@ -35,7 +35,7 @@
<el-form-item v-if="showUpload" label="数据集上传" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
:uploadData="uploadData"
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
@@ -50,7 +50,7 @@ import upload from '@/components/upload/index.vue'
import { createPreDataset } from "@/api/dataManager"
import { getErrorMsg } from '@/error/index'
export default {
name: "preDatasetCreation",
name: "PreDatasetCreation",
components: {
upload
},


+ 3
- 3
admin-portal/src/views/dataManager/components/preview.vue View File

@@ -18,9 +18,9 @@
import { previewDataset } from '@/api/dataManager.js'
import { getErrorMsg } from '@/error/index'
export default {
name: "preview",
name: "Preview",
props: {
row: { type: Object }
row: { type: Object, default: () => {} }
},
data() {
return {
@@ -30,7 +30,7 @@ export default {
}
},
created() {
this.data = this.row,
this.data = this.row
this.getPreList()
},
methods: {


+ 2
- 2
admin-portal/src/views/dataManager/components/reuploadDataset.vue View File

@@ -27,7 +27,7 @@
<el-form-item label="数据集上传" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
:uploadData="uploadData"
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
@@ -40,7 +40,7 @@
<script>
import upload from '@/components/upload/index.vue'
export default {
name: "reuploadDataset",
name: "ReuploadDataset",
components: {
upload
},


+ 5
- 5
admin-portal/src/views/dataManager/components/versionList.vue View File

@@ -80,8 +80,8 @@
<preview v-if="preVisible" :row="versionData" @close="close" />
<reuploadDataset
v-if="myDatasetVisible"
:data="this.data"
:versionData="this.versionData"
:data="data"
:version-data="versionData"
@close="close"
@cancel="cancel"
@confirm="confirm"
@@ -96,16 +96,16 @@ import preview from './preview.vue'
import reuploadDataset from "./reuploadDataset.vue"
import { getErrorMsg } from '@/error/index'
export default {
name: "versionList",
name: "VersionList",
components: {
preview,
reuploadDataset
},
props: {
versionListType: { type: Number },
versionListType: { type: Number, default: undefined },
data: {
type: Object,
default: {}
default: () => {}
}
},
data() {


+ 2
- 2
admin-portal/src/views/dataManager/index.vue View File

@@ -2,10 +2,10 @@
<div>
<el-tabs v-model="activeName" class="Wrapper" style="margin:20px 0px 0px 20px" @tab-click="handleClick">
<el-tab-pane label="用户数据集" name="userDataset">
<userList v-if="tabRefresh.userMenu" :Type="1" />
<userList v-if="tabRefresh.userMenu" :data-tab-type="1" />
</el-tab-pane>
<el-tab-pane label="预置数据集" name="preDataset">
<templateList v-if="tabRefresh.templateMenu" :Type="2" />
<templateList v-if="tabRefresh.templateMenu" :data-tab-type="2" />
</el-tab-pane>
</el-tabs>
</div>


+ 9
- 9
admin-portal/src/views/dataManager/templateList.vue View File

@@ -2,8 +2,8 @@
<div>
<div class="searchForm">
<searchForm
:searchForm="searchForm"
:blurName="'数据集名称 搜索'"
:search-form="searchForm"
:blur-name="'数据集名称 搜索'"
@searchData="getSearchData"
/>
</div>
@@ -76,13 +76,13 @@
/>
<versionList
v-if="versionListVisible"
:data="this.data"
:versionListType="versionListType"
:data="data"
:version-list-type="versionListType"
@close="close"
/>
<newVersion
v-if="newVersionVisible"
:row="this.data"
:row="data"
@cancel="cancel"
@confirm="confirm"
@close="close"
@@ -99,7 +99,7 @@
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "templateList",
name: "TemplateList",
components: {
versionList,
newVersion,
@@ -107,8 +107,8 @@
searchForm
},
props: {
payload: { datasets: [] },
Type: { type: Number, default: undefined }
payload: { type: Array, default: () => [] },
dataTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -147,7 +147,7 @@
this.getDataList(this.searchData)
},
getDataList(param) {
this.typeChange = this.Type
this.typeChange = this.dataTabType
getPresetDatasetList(param).then(response => {
if (response.success) {
this.datasetList = response.data.datasets;


+ 7
- 7
admin-portal/src/views/dataManager/userList.vue View File

@@ -2,8 +2,8 @@
<div>
<div class="searchForm">
<searchForm
:searchForm="searchForm"
:blurName="'数据集名称 搜索'"
:search-form="searchForm"
:blur-name="'数据集名称 搜索'"
@searchData="getSearchData"
/>
</div>
@@ -72,7 +72,7 @@
<versionList
v-if="versionListVisible"
:data="row"
:versionListType="versionListType"
:version-list-type="versionListType"
@close="close"
/>
</div>
@@ -85,14 +85,14 @@
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "userList",
name: "UserList",
components: {
versionList,
searchForm
},
props: {
payload: { datasets: [] },
Type: { type: Number, default: undefined }
payload: { type: Array, default: () => [] },
dataTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -129,7 +129,7 @@
this.getDataList(this.searchData)
},
getDataList(param) {
this.typeChange = this.Type
this.typeChange = this.dataTabType
getUserDatasetList(param).then(response => {
if (response.success) {
this.datasetList = response.data.datasets;


+ 2
- 2
admin-portal/src/views/devManager/algorithmManager.vue View File

@@ -2,10 +2,10 @@
<div>
<el-tabs v-model="activeName" class="Wrapper" @tab-click="handleClick">
<el-tab-pane label="用户算法" name="userAlgorithm">
<userList v-if="tabRefresh.userMenu" :Type="1" />
<userList v-if="tabRefresh.userMenu" :algorithm-tab-type="1" />
</el-tab-pane>
<el-tab-pane label="预置算法" name="preAlgorithm">
<templateList v-if="tabRefresh.templateMenu" :Type="2" />
<templateList v-if="tabRefresh.templateMenu" :algorithm-tab-type="2" />
</el-tab-pane>
</el-tabs>
</div>


+ 2
- 2
admin-portal/src/views/devManager/components/algorithm/preAlgorithmCreation.vue View File

@@ -30,7 +30,7 @@
<el-form-item v-if="showUpload" label="上传代码包" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
:uploadData="uploadData"
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
@@ -45,7 +45,7 @@ import upload from '@/components/upload/index.vue'
import { addPreAlgorithm } from "@/api/modelDev";
import { getErrorMsg } from '@/error/index'
export default {
name: "preAlgorithmCreation",
name: "PreAlgorithmCreation",
components: {
upload
},


+ 7
- 4
admin-portal/src/views/devManager/components/algorithm/preAlgorithmVersionCreation.vue View File

@@ -25,7 +25,7 @@
<el-form-item v-if="showUpload" label="代码包上传" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
:uploadData="uploadData"
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
@@ -40,16 +40,19 @@ import upload from '@/components/upload/index.vue'
import { addPreAlgorithmVersion } from "@/api/modelDev.js";
import { getErrorMsg } from '@/error/index'
export default {
name: "preAlgorithmVersionCreation",
name: "PreAlgorithmVersionCreation",
components: {
upload
},
props: {
row: {
type: Object,
default: {}
default: () => {}
},
dialogType: ""
dialogType: {
type: String,
default: ""
}
},
data() {
return {


+ 3
- 3
admin-portal/src/views/devManager/components/algorithm/reuploadAlgorithm.vue View File

@@ -20,7 +20,7 @@
<el-form-item label="上传代码包" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
:uploadData="uploadData"
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
@@ -33,14 +33,14 @@
<script>
import upload from '@/components/upload/index.vue'
export default {
name: "reuploadAlgorithm",
name: "ReuploadAlgorithm",
components: {
upload
},
props: {
data: {
type: Object,
default: {}
default: () => {}
}
},
data() {


+ 10
- 10
admin-portal/src/views/devManager/components/algorithm/templateList.vue View File

@@ -2,8 +2,8 @@
<div>
<div class="searchForm">
<searchForm
:searchForm="searchForm"
:blurName="'算法名称/描述 搜索'"
:search-form="searchForm"
:blur-name="'算法名称/描述 搜索'"
@searchData="getSearchData"
/>
</div>
@@ -45,7 +45,7 @@
<template slot-scope="scope">
<el-button type="text" @click="getAlgorithmVersionList(scope.row)">版本列表</el-button>
<el-button type="text" style="padding-right:10px" @click="createNewVersion(scope.row)">创建新版本</el-button>
<!-- <el-button type="text" @click="editAlgorithm(scope.row)" v-if="Type === 1 ? false : true">编辑</el-button> -->
<!-- <el-button type="text" @click="editAlgorithm(scope.row)" v-if="algorithmTabType === 1 ? false : true">编辑</el-button> -->
<el-button slot="reference" type="text" @click="confirmDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
@@ -65,13 +65,13 @@
<versionList
v-if="versionListVisible"
:row="row"
:Type="this.typeChange"
:algorithm-type="typeChange"
@close="close"
/>
<preAlgorithmVersionCreation
v-if="standardDialogVisible"
:row="this.row"
:dialogType="dialogType"
:row="row"
:dialog-type="dialogType"
@close="close"
@cancel="cancel"
@confirm="confirm"
@@ -86,7 +86,7 @@
</template>

<script>
import { getPresetAlgorithmList, getAlgorithmVersionList, deletePreAlgorithm } from "@/api/modelDev"
import { getPresetAlgorithmList, deletePreAlgorithm } from "@/api/modelDev"
import versionList from "./versionList.vue"
import preAlgorithmVersionCreation from "./preAlgorithmVersionCreation.vue"
import preAlgorithmCreation from './preAlgorithmCreation.vue'
@@ -94,7 +94,7 @@ import searchForm from '@/components/search/index.vue'
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "templateList",
name: "TemplateList",
components: {
versionList,
preAlgorithmVersionCreation,
@@ -102,7 +102,7 @@ export default {
searchForm
},
props: {
Type: { type: Number, default: undefined }
algorithmTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -140,7 +140,7 @@ export default {
this.getAlgorithmList(this.searchData)
},
getAlgorithmList(param) {
this.typeChange = this.Type
this.typeChange = this.algorithmTabType
getPresetAlgorithmList(param).then(response => {
if (response.success) {
this.algorithmList = response.data.algorithms;


+ 6
- 6
admin-portal/src/views/devManager/components/algorithm/userList.vue View File

@@ -2,8 +2,8 @@
<div>
<div class="searchForm">
<searchForm
:searchForm="searchForm"
:blurName="'算法名称/描述 搜索'"
:search-form="searchForm"
:blur-name="'算法名称/描述 搜索'"
@searchData="getSearchData"
/>
</div>
@@ -64,7 +64,7 @@
<versionList
v-if="versionListVisible"
:row="row"
:Type="this.typeChange"
:algorithm-type="typeChange"
@close="close"
/>
</div>
@@ -77,13 +77,13 @@ import searchForm from '@/components/search/index.vue'
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "userList",
name: "UserList",
components: {
versionList,
searchForm
},
props: {
Type: { type: Number, default: undefined }
algorithmTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -118,7 +118,7 @@ export default {
this.getAlgorithmList(this.searchData)
},
getAlgorithmList(param) {
this.typeChange = this.Type
this.typeChange = this.algorithmTabType
getUserAlgorithmList(param).then(response => {
if (response.success) {
this.algorithmList = response.data.algorithms;


+ 8
- 8
admin-portal/src/views/devManager/components/algorithm/versionList.vue View File

@@ -43,7 +43,7 @@
<!-- <el-button type="text" style="padding-right:10px">预览</el-button> -->
<el-button
v-if="(scope.row.fileStatus === 1 ) || (scope.row.fileStatus === 4 ) ? true : false"
v-show="Type === 2 ? true : false"
v-show="algorithmType === 2 ? true : false"
type="text"
@click="reupload(scope.row)"
>
@@ -58,7 +58,7 @@
下载
</el-button>
<el-button
v-if="Type === 2 ? true : false"
v-if="algorithmType === 2 ? true : false"
slot="reference"
type="text"
@click="confirmDelete(scope.row)"
@@ -84,7 +84,7 @@
</el-dialog>
<reuploadAlgorithm
v-if="myAlgorithmVisible"
:data="this.row"
:data="row"
@close="close"
@cancel="cancel"
@confirm="confirm"
@@ -98,16 +98,16 @@ import { parseTime } from '@/utils/index'
import reuploadAlgorithm from "./reuploadAlgorithm.vue"
import { getErrorMsg } from '@/error/index'
export default {
name: "versionList",
name: "VersionList",
components: {
reuploadAlgorithm
},
props: {
payload: {},
Type: { Type: Number, default: undefined },
payload: { type: Object, default: () => {} },
algorithmType: { type: Number, default: undefined },
row: {
type: Object,
default: {}
default: () => {}
}
},
data() {
@@ -141,7 +141,7 @@ export default {
this.getVersionList()
},
getVersionList(param) {
this.typeChange = this.Type
this.typeChange = this.algorithmType
if (!param) {
param = { pageIndex: this.pageIndex, pageSize: this.pageSize }
}


+ 3
- 3
admin-portal/src/views/devManager/components/notebook/notebookList.vue View File

@@ -2,8 +2,8 @@
<div>
<div>
<searchForm
:searchForm="searchForm"
:blurName="'NoteBook名称 搜索'"
:search-form="searchForm"
:blur-name="'NoteBook名称 搜索'"
@searchData="getSearchData"
/>
</div>
@@ -80,7 +80,7 @@ import { getNotebookList, stopNotebook } from "@/api/modelDev"
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "notebookList",
name: "NotebookList",
components: {
searchForm
},


+ 13
- 13
admin-portal/src/views/imageManager/Image.vue View File

@@ -1,6 +1,6 @@
<template>
<div>
<searchForm :searchForm="searchForm" class="searchForm" :blurName="'镜像名称/标签/描述 搜索'" @searchData="getSearchData" />
<searchForm :search-form="searchForm" class="searchForm" :blur-name="'镜像名称/标签/描述 搜索'" @searchData="getSearchData" />
<el-button v-if="!flag" type="primary" class="create" @click="create">创建</el-button>
<el-table
:data="tableData"
@@ -79,31 +79,31 @@
/>
</div>
<!-- 镜像对话框 -->
<dialogForm
v-if="FormVisible"
:flag="Logo"
:row="row"
@cancel="cancel"
@confirm="confirm"
@close="close"
<dialogForm
v-if="FormVisible"
:flag="Logo"
:row="row"
@cancel="cancel"
@confirm="confirm"
@close="close"
/>
</div>
</template>
<script>
import dialogForm from "./components/dialogForm.vue";
import { getUserImage, getPreImage, deletePreImage, editePreImage } from '@/api/imageManager.js'
import { groupDetail } from '@/api/userManager.js'
// import { groupDetail } from '@/api/userManager.js'
import searchForm from '@/components/search/index.vue'
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "preImage",
name: "PreImage",
components: {
dialogForm,
searchForm
},
props: {
Type: { type: Number, default: undefined }
imageTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -137,7 +137,7 @@
},
created() {
this.getImage(this.searchData)
if (this.Type !== 1) {
if (this.imageTabType !== 1) {
this.flag = false
} else {
this.searchForm.push(
@@ -152,7 +152,7 @@
return getErrorMsg(code)
},
getImage(data) {
this.type = this.Type
this.type = this.imageTabType
if (this.type === 1) {
getUserImage(data).then(response => {
if (response.success) {


+ 4
- 3
admin-portal/src/views/imageManager/components/dialogForm.vue View File

@@ -30,7 +30,7 @@
</el-select>
<upload
v-if="showUpload && ruleForm.sourceType===1"
:uploadData="uploadData"
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
@@ -55,7 +55,7 @@
import upload from '@/components/upload/index.vue'
import { getErrorMsg } from '@/error/index'
export default {
name: "dialogCreateForm",
name: "DialogCreateForm",
components: {
upload
},
@@ -122,7 +122,8 @@
// 新建镜像
// 编辑镜像
if (!this.flag) {
this.id = this.row.id, this.ruleForm = { imageType: this.row.imageType, imageDesc: this.row.imageDesc, imageName: this.row.imageName, imageVersion: this.row.imageVersion, imageAddr: this.row.imageAddr, sourceType: this.row.sourceType, imageStatus: this.row.imageStatus }
this.id = this.row.id
this.ruleForm = { imageType: this.row.imageType, imageDesc: this.row.imageDesc, imageName: this.row.imageName, imageVersion: this.row.imageVersion, imageAddr: this.row.imageAddr, sourceType: this.row.sourceType, imageStatus: this.row.imageStatus }
if (this.ruleForm.imageStatus === 1 || this.ruleForm.imageStatus === 4) {
this.uploadData.data.id = this.id
this.uploadData.type = "imageManager"


+ 2
- 2
admin-portal/src/views/imageManager/index.vue View File

@@ -1,10 +1,10 @@
<template>
<el-tabs v-model="activeName" class="Wrapper" @tab-click="handleTabClick">
<el-tab-pane label="用户镜像" name="menu1">
<mirror v-if="tabRefresh.menu1" :Type="1" />
<mirror v-if="tabRefresh.menu1" :image-tab-type="1" />
</el-tab-pane>
<el-tab-pane label="预置镜像" name="menu2">
<mirror v-if="tabRefresh.menu2" :Type="2" />
<mirror v-if="tabRefresh.menu2" :image-tab-type="2" />
</el-tab-pane>
</el-tabs>
</template>


+ 17
- 13
admin-portal/src/views/modelManager/Model.vue View File

@@ -1,9 +1,9 @@
<template>
<div>
<div class="searchForm">
<searchForm :searchForm="searchForm" :blurName="'模型名称/描述 搜索'" @searchData="getSearchData" />
<searchForm :search-form="searchForm" :blur-name="'模型名称/描述 搜索'" @searchData="getSearchData" />
</div>
<el-button v-if="Type===3" type="primary" class="create" @click="createModel">创建</el-button>
<el-button v-if="modelTabType===3" type="primary" class="create" @click="createModel">创建</el-button>
<div class="index">
<el-table
:data="tableData"
@@ -21,7 +21,7 @@
<span>{{ scope.row.spaceName===''?'默认群组':scope.row.spaceName }}</span>
</template>
</el-table-column>
<el-table-column v-if="Type===1" prop="userName" label="提供者" />
<el-table-column v-if="modelTabType===1" prop="userName" label="提供者" />
<el-table-column label="创建时间">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdAt) }}</span>
@@ -30,8 +30,8 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="getVersionList(scope.row)">版本列表</el-button>
<el-button v-if="Type===3" type="text" @click="createList(scope.row)">创建新版本</el-button>
<el-button v-if="Type===3" type="text" @click="open(scope.row)">删除</el-button>
<el-button v-if="modelTabType===3" type="text" @click="createList(scope.row)">创建新版本</el-button>
<el-button v-if="modelTabType===3" type="text" @click="open(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -50,9 +50,9 @@
<!-- 版本列表对话框 -->
<versionList
v-if="FormVisible"
:modelId="modelId"
:modelName="modelName"
:Type="type"
:model-id="modelId"
:model-name="modelName"
:model-type="type"
@close="close"
@cancel="cancel"
@confirm="confirm"
@@ -61,7 +61,7 @@
<createDialog
v-if="CreateVisible"
:row="row"
:isList="isList"
:is-list="isList"
@close="close"
@cancel="cancel"
@confirm="confirm"
@@ -77,14 +77,14 @@
import searchForm from '@/components/search/index.vue'
import { getErrorMsg } from '@/error/index'
export default {
name: "myModel",
name: "MyModel",
components: {
versionList,
searchForm,
createDialog
},
props: {
Type: { type: Number, default: undefined }
modelTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -145,7 +145,11 @@
this.CreateVisible = val;
this.getModel(this.searchData)
},
getVersionList(val) { this.FormVisible = true; this.modelId = val.modelId, this.modelName = val.modelName },
getVersionList(val) {
this.FormVisible = true
this.modelId = val.modelId
this.modelName = val.modelName
},
handledDelete(row) {
const data = JSON.parse(JSON.stringify(row));
data.version = row.modelVersion
@@ -166,7 +170,7 @@
},
getModel(data) {
if (!data) { data = { pageIndex: this.pageIndex, pageSize: this.pageSize } }
this.type = this.Type
this.type = this.modelTabType
if (this.type === 1) {
getMyModel(data).then(response => {
if (response.success) {


+ 9
- 6
admin-portal/src/views/modelManager/components/createDialog.vue View File

@@ -38,7 +38,7 @@
<el-input v-model="ruleForm.modelDescript" autocomplete="off" :disabled="showUpload" />
</el-form-item>
<el-form-item v-if="showUpload" label="模型上传" :label-width="formLabelWidth">
<upload :uploadData="uploadData" @confirm="confirm" @cancel="cancel" />
<upload :upload-data="uploadData" @confirm="confirm" @cancel="cancel" />
</el-form-item>
</el-form>
<div v-if="createSuccess" slot="footer" class="dialog-footer">
@@ -55,7 +55,7 @@
import upload from '@/components/upload/index.vue'
import { getErrorMsg } from '@/error/index'
export default {
name: "createDialog",
name: "CreateDialog",
components: {
upload
},
@@ -76,7 +76,7 @@
isList: {
type: Boolean
},
row: { type: Object }
row: { type: Object, default: () => {} }
},
data() {
return {
@@ -115,9 +115,12 @@
},
created() {
// 新增模型
if (!this.isList) { this.flag = true; this.getPresetAlgorithmList(); this.createSuccess = true }
// 新增模型版本
else { this.flag = false }
if (!this.isList) {
this.flag = true; this.getPresetAlgorithmList(); this.createSuccess = true
} else {
// 新增模型版本
this.flag = false
}
this.ruleForm.algorithmName = this.row.algorithmName
this.ruleForm.algorithmVersion = this.row.algorithmVersion
this.ruleForm.modelName = this.row.modelName


+ 4
- 7
admin-portal/src/views/modelManager/components/previewDialog.vue View File

@@ -25,9 +25,9 @@
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "previewDialog",
name: "PreviewDialog",
props: {
row: { type: Object }
row: { type: Object, default: () => {} }
},
data() {
return {
@@ -38,8 +38,8 @@
}
},
created() {
this.data = this.row,
this.getPreList()
this.data = this.row
this.getPreList()
},
beforeDestroy() {

@@ -49,9 +49,6 @@
getErrorMsg(code) {
return getErrorMsg(code)
},
handleDialogClose() {
this.$emit('close', false)
},
getPreList() {
preview(this.row).then(response => {
if (response.success) {


+ 5
- 7
admin-portal/src/views/modelManager/components/versionList.vue View File

@@ -29,7 +29,7 @@
<el-button type="text" :disabled="scope.row.fileStatus!==2" @click="handlePreview(scope.row)">
预览
</el-button>
<el-button v-if="Type===3" type="text" @click="open(scope.row)">删除</el-button>
<el-button v-if="modelType===3" type="text" @click="open(scope.row)">删除</el-button>
<el-button type="text" :disabled="scope.row.fileStatus!==2" @click="handledDownload(scope.row)">
下载
</el-button>
@@ -62,17 +62,15 @@
import { parseTime } from '@/utils/index'
import { getErrorMsg } from '@/error/index'
export default {
name: "versionList",
name: "VersionList",
components: {

previewDialog
},
props: {
modelId: {
type: String
},
Type: { type: Number, default: undefined },
modelName: { type: String }
modelId: { type: String, default: "" },
modelType: { type: Number, default: undefined },
modelName: { type: String, default: "" }
},
data() {
return {


+ 2
- 2
admin-portal/src/views/modelManager/index.vue View File

@@ -1,10 +1,10 @@
<template>
<el-tabs v-model="activeName" class="Wrapper" @tab-click="handleClick">
<el-tab-pane label="用户模型" name="first">
<Model :Type="1" />
<Model :model-tab-type="1" />
</el-tab-pane>
<el-tab-pane label="预置模型" name="third">
<Model :Type="3" />
<Model :model-tab-type="3" />
</el-tab-pane>
</el-tabs>
</template>


+ 1
- 1
admin-portal/src/views/resourceManager/components/nodeList.vue View File

@@ -76,7 +76,7 @@
import { formatSize } from '@/utils/index.js'
import { getErrorMsg } from '@/error/index'
export default {
name: "nodeList",
name: "NodeList",
components: {

},


+ 3
- 3
admin-portal/src/views/resourceManager/components/poolManager.vue View File

@@ -110,7 +110,7 @@
import { getResourcePool, deleteResourcePool, createResourcePool, updateResourcePool, getNodeList, getResource } from '@/api/resourceManager.js'
import { getErrorMsg } from '@/error/index'
export default {
name: "resourcePool",
name: "ResourcePool",
data() {
var checkName = (rule, value, callback) => {
const regName = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/;
@@ -210,8 +210,8 @@
},
add() {
this.ruleForm = { name: "", desc: "", bindingNodes: [], mapResourceSpecIdList: { debug: [], train: [], deploy: [] }}
this.flag = true,
this.editeDialog = true
this.flag = true
this.editeDialog = true
this.disabled = false
},
handleEdit(val) {


+ 10
- 5
admin-portal/src/views/resourceManager/components/resource.vue View File

@@ -74,9 +74,9 @@
import { getResourceList, deleteResource, updateResource, getNodeList, createCustomizeResource } from '@/api/resourceManager.js'
import { getErrorMsg } from '@/error/index'
export default {
name: "resource",
name: "Resource",
props: {
Type: { type: Number, default: undefined }
resourceTabType: { type: Number, default: undefined }
},
data() {
var checkName = (rule, value, callback) => {
@@ -116,7 +116,12 @@
}
},
created() {
if (this.Type === 1) { this.system = true; this.customize = false, this.disabled = true; this.rules = {} } else {
if (this.resourceTabType === 1) {
this.system = true
this.customize = false
this.disabled = true
this.rules = {}
} else {
this.customize = true
this.system = false
}
@@ -194,8 +199,8 @@
})
},
add() {
this.ruleForm = {},
this.flag = true
this.ruleForm = {}
this.flag = true
this.dialogVisible = true
},
getResourceList() {


+ 2
- 2
admin-portal/src/views/resourceManager/resourceMsg.vue View File

@@ -1,10 +1,10 @@
<template>
<el-tabs v-model="activeName" class="Wrapper" @tab-click="handleClick">
<el-tab-pane label="系统资源" name="first">
<resource :Type="1" />
<resource :resource-tab-type="1" />
</el-tab-pane>
<el-tab-pane label="自定义资源" name="second">
<resource :Type="2" />
<resource :resource-tab-type="2" />
</el-tab-pane>
</el-tabs>
</template>


+ 2
- 2
admin-portal/src/views/timeManager/index.vue View File

@@ -1,10 +1,10 @@
<template>
<el-tabs v-model="activeName" class="Wrapper" @tab-click="handleTabClick">
<el-tab-pane label="用户机时列表" name="menu1">
<Time v-if="tabRefresh.menu1" :Type="1" />
<Time v-if="tabRefresh.menu1" :time-tab-type="1" />
</el-tab-pane>
<el-tab-pane label="群组机时列表" name="menu2">
<Time v-if="tabRefresh.menu2" :Type="2" />
<Time v-if="tabRefresh.menu2" :time-tab-type="2" />
</el-tab-pane>
</el-tabs>
</template>


+ 14
- 15
admin-portal/src/views/timeManager/time.vue View File

@@ -44,10 +44,10 @@
<!-- 对话框 -->
<el-dialog :title="title" :visible.sync="dialogFormVisible" width="25%" :close-on-click-modal="false">
<el-form :model="form">
<el-form-item v-if="Type===1" label="用户名称" :label-width="formLabelWidth">
<el-form-item v-if="timeTabType===1" label="用户名称" :label-width="formLabelWidth">
<span>{{ form.userName }}</span>
</el-form-item>
<el-form-item v-if="Type===2" label="群组名称" :label-width="formLabelWidth">
<el-form-item v-if="timeTabType===2" label="群组名称" :label-width="formLabelWidth">
<span>{{ form.spaceName }}</span>
</el-form-item>
<el-form-item v-if="flag===0" label="增加机时" :label-width="formLabelWidth">
@@ -78,16 +78,15 @@
</template>
<script>
import { groupList, userList, groupRecharge, userRecharge } from '@/api/machineManager.js'
import searchForm from '@/components/search/index.vue'
// import searchForm from '@/components/search/index.vue'
import { getErrorMsg } from '@/error/index'
export default {
name: "userMachineTime",
components: {

searchForm
},
name: "UserMachineTime",
// components: {
// searchForm
// },
props: {
Type: { type: Number, default: undefined }
timeTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -117,7 +116,7 @@
},
created() {
this.getTime()
if (this.Type === 1) {
if (this.timeTabType === 1) {
this.type = 'user'
} else {
this.type = 'group'
@@ -143,7 +142,7 @@
},
getTime(data) {
if (!data) { data = { pageIndex: this.pageIndex, pageSize: this.pageSize } }
if (this.Type === 1) {
if (this.timeTabType === 1) {
userList(data).then(response => {
if (response.success) {
this.total = parseInt(response.data.totalSize)
@@ -172,7 +171,7 @@
getSearchData(val) {
let data = {}
data = Object.assign(val, { pageIndex: this.pageIndex, pageSize: this.pageSize })
if (this.Type === 1) {
if (this.timeTabType === 1) {
data.userId = data.id
} else {
data.spaceId = data.id
@@ -183,7 +182,7 @@
addTime(val) {
this.dialogFormVisible = true
this.form.amount = ''
if (this.Type === 1) {
if (this.timeTabType === 1) {
this.form.userName = val.userName; this.form.userId = val.userId
} else {
this.form.spaceName = val.spaceName; this.form.spaceId = val.spaceId
@@ -193,7 +192,7 @@
deleteTime(val) {
this.dialogFormVisible = true
this.form.amount = ''
if (this.Type === 1) {
if (this.timeTabType === 1) {
this.form.userName = val.userName; this.form.userId = val.userId
} else {
this.form.spaceName = val.spaceName; this.form.spaceId = val.spaceId
@@ -208,7 +207,7 @@
} else {
data.amount = +data.amount
}
if (this.Type === 1) {
if (this.timeTabType === 1) {
delete data.userName
delete data.spaceName
delete data.spaceId


+ 1
- 1
admin-portal/src/views/traningManager/components/index.vue View File

@@ -32,7 +32,7 @@
import taskProfile from './taskProfile.vue'
import taskInfo from './taskInfo.vue'
export default {
name: "detailDialog",
name: "DetailDialog",
components: { taskLoad, taskLog, taskProfile, taskInfo },
props: {
data: {


+ 2
- 2
admin-portal/src/views/traningManager/components/taskInfo.vue View File

@@ -1,12 +1,12 @@
<template>
<div>
<div v-html="this.initInfo"></div>
<div v-html="initInfo"></div>
</div>
</template>

<script>
export default {
name: "taskInfo",
name: "TaskInfo",
props: {
row: {
type: Object,


+ 1
- 1
admin-portal/src/views/traningManager/components/taskLoad.vue View File

@@ -31,7 +31,7 @@
</template>
<script>
export default {
name: "taskLoad",
name: "TaskLoad",
components: {
},
props: {


+ 3
- 3
admin-portal/src/views/traningManager/components/taskLog.vue View File

@@ -55,7 +55,7 @@
import { showLog, trainingDetail } from '@/api/trainingManager.js'
import { getErrorMsg } from '@/error/index'
export default {
name: "taskLog",
name: "TaskLog",
props: {
row: {
type: Object,
@@ -104,8 +104,8 @@
}
},
destroyed() {
this.flag = false,
clearInterval(this.timer2);
this.flag = false
clearInterval(this.timer2);
this.timer2 = null;
clearTimeout(this.timer);
this.timer = null;


+ 1
- 1
admin-portal/src/views/traningManager/components/taskProfile.vue View File

@@ -90,7 +90,7 @@

<script>
export default {
name: "taskProfile",
name: "TaskProfile",
props: {
row: {
type: Object,


+ 2
- 3
admin-portal/src/views/traningManager/traningTaskList.vue View File

@@ -1,6 +1,6 @@
<template>
<div>
<searchForm :searchForm="searchForm" :blurName="'任务名称 搜索'" @searchData="getSearchData" />
<searchForm :search-form="searchForm" :blur-name="'任务名称 搜索'" @searchData="getSearchData" />
<el-table
:data="tableData"
style="width: 100%;font-size: 15px;"
@@ -80,12 +80,11 @@
<script>
import detailDialog from "./components/index.vue";
import { getTraining, stopTraining, trainingDetail } from '@/api/trainingManager.js'
import { getResource } from '@/api/resourceManager.js'
import { parseTime, formatDuring } from '@/utils/index'
import searchForm from '@/components/search/index.vue'
import { getErrorMsg } from '@/error/index'
export default {
name: "traningTask",
name: "TraningTask",
components: {
detailDialog,
searchForm


+ 8
- 7
admin-portal/src/views/userManager/components/addDialog.vue View File

@@ -56,7 +56,7 @@
import { getResourcePool } from '@/api/resourceManager.js'
import { getErrorMsg } from '@/error/index'
export default {
name: "createDialog",
name: "CreateDialog",
directives: {
loadmore: {
inserted: function(el, binding) {
@@ -72,7 +72,8 @@
},
props: {
flag: {
type: String
type: String,
default: ""
}
},
data() {
@@ -140,12 +141,12 @@
},
mounted() {
if (this.flag === 'user') {
this.user = true,
this.group = false
this.user = true
this.group = false
} else {
this.group = true,
this.user = false,
this.getResourcePool()
this.group = true
this.user = false
this.getResourcePool()
this.getUserList()
}
},


+ 12
- 11
admin-portal/src/views/userManager/components/operateDialog.vue View File

@@ -1,7 +1,7 @@
<template>
<div>
<el-dialog
:title="Type==='user'?'重置密码':'编辑群组信息'"
:title="userType==='user'?'重置密码':'编辑群组信息'"
width="35%"
:visible.sync="CreateFormVisible"
:before-close="handleDialogClose"
@@ -53,9 +53,9 @@
import { getResourcePool } from '@/api/resourceManager.js'
import { getErrorMsg } from '@/error/index'
export default {
name: "operateDialog",
name: "OperateDialog",
props: {
Type: {
userType: {
type: String,
default: 'user'
},
@@ -64,7 +64,8 @@
default: () => { }
},
flag: {
type: String
type: String,
default: ""
}
},
data() {
@@ -111,15 +112,15 @@
}
},
mounted() {
if (this.Type === 'user') {
this.user = true,
this.group = false,
if (this.userType === 'user') {
this.user = true
this.group = false
this.ruleForm.fullName = this.row.fullName
this.id = this.row.id
} else {
this.group = true,
this.user = false,
this.id = this.row.id
this.group = true
this.user = false
this.id = this.row.id
groupDetail(this.id).then(
response => {
if (response.success) {
@@ -172,7 +173,7 @@
confirm() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
if (this.Type === 'user') {
if (this.userType === 'user') {
if (this.ruleForm.confirm === this.ruleForm.password) {
const data = { fullname: this.ruleForm.fullname, password: this.ruleForm.password, id: this.id }
editeUser(data).then(response => {


+ 2
- 2
admin-portal/src/views/userManager/index.vue View File

@@ -1,10 +1,10 @@
<template>
<el-tabs v-model="activeName" class="Wrapper" @tab-click="handleTabClick">
<el-tab-pane label="用户列表" name="menu1">
<user v-if="tabRefresh.menu1" :Type="1" />
<user v-if="tabRefresh.menu1" :user-tab-type="1" />
</el-tab-pane>
<el-tab-pane label="群组列表" name="menu2">
<user v-if="tabRefresh.menu2" :Type="2" />
<user v-if="tabRefresh.menu2" :user-tab-type="2" />
</el-tab-pane>
</el-tabs>
</template>


+ 23
- 23
admin-portal/src/views/userManager/user.vue View File

@@ -1,9 +1,9 @@
<template>
<div>
<searchForm
:searchForm="searchForm"
:search-form="searchForm"
class="searchForm"
:blurName="user?'用户名称/邮箱 搜索':'群组名称 搜索'"
:blur-name="user?'用户名称/邮箱 搜索':'群组名称 搜索'"
@searchData="getSearchData"
/>
<div class="create">
@@ -81,7 +81,7 @@
<operateDialog
v-if="operateVisible"
:row="row"
:Type="change"
:user-type="change"
@cancel="cancel"
@confirm="confirm"
@close="close"
@@ -117,7 +117,7 @@
import searchForm from '@/components/search/index.vue'
import { getErrorMsg } from '@/error/index'
export default {
name: "userList",
name: "UserList",
components: {
operateDialog,
addDialog,
@@ -125,7 +125,7 @@

},
props: {
Type: { type: Number, default: undefined }
userTabType: { type: Number, default: undefined }
},
data() {
return {
@@ -154,22 +154,22 @@
}
},
created() {
if (this.Type === 1) {
this.user = true; this.group = false,
this.change = 'user'
if (this.userTabType === 1) {
this.user = true; this.group = false
this.change = 'user'
this.searchForm = [
{
type: 'Select', label: '状态', prop: 'status', placeholder: '请选择状态',
options: [{ label: '已冻结', value: 1 }, { label: '已激活', value: 2 }]
}
],
this.flag = 'user'
]
this.flag = 'user'
} else {
this.user = false;
this.group = true,
this.change = 'group'
this.flag = 'group',
this.searchForm = []
this.user = false
this.group = true
this.change = 'group'
this.flag = 'group'
this.searchForm = []
}
this.getList(this.searchData)
// this.timer = setInterval(this.getList, 1000);
@@ -276,25 +276,25 @@
this.getList(this.searchData)
},
cancel(val) {
this.CreateVisible = val,
this.operateVisible = val
this.CreateVisible = val
this.operateVisible = val
this.getList(this.searchData)
},
confirm(val) {
this.CreateVisible = val,
this.operateVisible = val
this.CreateVisible = val
this.operateVisible = val
this.getList(this.searchData)
},
close(val) {
this.CreateVisible = val,
this.operateVisible = val,
this.getList(this.searchData)
this.CreateVisible = val
this.operateVisible = val
this.getList(this.searchData)
},
create() {
this.CreateVisible = true
},
getList(data) {
if (this.Type === 1) {
if (this.userTabType === 1) {
getUserList(data).then(response => {
if (response.success) {
this.total = response.data.totalSize


Loading…
Cancel
Save