Browse Source

Merge branch 'master' into initInfo

tags/v4.1.0-dev.12
wenlong92 3 weeks ago
parent
commit
2d88bbd920
98 changed files with 1683 additions and 1792 deletions
  1. +36
    -36
      admin-portal/src/api/dataManager.js
  2. +5
    -2
      admin-portal/src/api/globalVariable.js
  3. +46
    -46
      admin-portal/src/api/modelDev.js
  4. +5
    -5
      admin-portal/src/api/modelManager.js
  5. +7
    -8
      admin-portal/src/api/resourceManager.js
  6. +4
    -4
      admin-portal/src/api/trainingManager.js
  7. +1
    -1
      admin-portal/src/components/Breadcrumb/index.vue
  8. +27
    -22
      admin-portal/src/components/search/index.vue
  9. +31
    -33
      admin-portal/src/components/upload/index.vue
  10. +2
    -3
      admin-portal/src/layout/components/Navbar.vue
  11. +1
    -2
      admin-portal/src/layout/components/Sidebar/index.vue
  12. +3
    -3
      admin-portal/src/layout/index.vue
  13. +2
    -2
      admin-portal/src/main.js
  14. +3
    -7
      admin-portal/src/permission.js
  15. +3
    -3
      admin-portal/src/router/index.js
  16. +1
    -2
      admin-portal/src/store/modules/user.js
  17. +3
    -11
      admin-portal/src/utils/index.js
  18. +1
    -1
      admin-portal/src/utils/request.js
  19. +1
    -4
      admin-portal/src/utils/requestLog.js
  20. +0
    -1
      admin-portal/src/utils/requestMinIO.js
  21. +27
    -17
      admin-portal/src/views/Home/login.vue
  22. +3
    -4
      admin-portal/src/views/clusterMonitor/clusterMonitor.vue
  23. +6
    -7
      admin-portal/src/views/clusterMonitor/groupMonitor.vue
  24. +16
    -9
      admin-portal/src/views/clusterMonitor/index.vue
  25. +22
    -20
      admin-portal/src/views/dataManager/components/newVersion.vue
  26. +30
    -31
      admin-portal/src/views/dataManager/components/preDatasetCreation.vue
  27. +11
    -11
      admin-portal/src/views/dataManager/components/preview.vue
  28. +19
    -20
      admin-portal/src/views/dataManager/components/reuploadDataset.vue
  29. +46
    -46
      admin-portal/src/views/dataManager/components/versionList.vue
  30. +5
    -5
      admin-portal/src/views/dataManager/index.vue
  31. +53
    -56
      admin-portal/src/views/dataManager/templateList.vue
  32. +34
    -35
      admin-portal/src/views/dataManager/userList.vue
  33. +4
    -4
      admin-portal/src/views/devManager/algorithmManager.vue
  34. +15
    -16
      admin-portal/src/views/devManager/components/algorithm/preAlgorithmCreation.vue
  35. +25
    -23
      admin-portal/src/views/devManager/components/algorithm/preAlgorithmVersionCreation.vue
  36. +17
    -18
      admin-portal/src/views/devManager/components/algorithm/reuploadAlgorithm.vue
  37. +56
    -59
      admin-portal/src/views/devManager/components/algorithm/templateList.vue
  38. +29
    -30
      admin-portal/src/views/devManager/components/algorithm/userList.vue
  39. +60
    -60
      admin-portal/src/views/devManager/components/algorithm/versionList.vue
  40. +44
    -44
      admin-portal/src/views/devManager/components/notebook/notebookList.vue
  41. +3
    -3
      admin-portal/src/views/devManager/notebook.vue
  42. +51
    -47
      admin-portal/src/views/imageManager/Image.vue
  43. +34
    -40
      admin-portal/src/views/imageManager/components/dialogForm.vue
  44. +6
    -6
      admin-portal/src/views/imageManager/index.vue
  45. +55
    -46
      admin-portal/src/views/modelManager/Model.vue
  46. +55
    -60
      admin-portal/src/views/modelManager/components/createDialog.vue
  47. +15
    -19
      admin-portal/src/views/modelManager/components/previewDialog.vue
  48. +34
    -49
      admin-portal/src/views/modelManager/components/versionList.vue
  49. +4
    -4
      admin-portal/src/views/modelManager/index.vue
  50. +40
    -52
      admin-portal/src/views/resourceManager/components/ResourceSpec.vue
  51. +21
    -30
      admin-portal/src/views/resourceManager/components/nodeList.vue
  52. +48
    -75
      admin-portal/src/views/resourceManager/components/poolManager.vue
  53. +43
    -58
      admin-portal/src/views/resourceManager/components/resource.vue
  54. +6
    -7
      admin-portal/src/views/resourceManager/nodeManager.vue
  55. +6
    -7
      admin-portal/src/views/resourceManager/resPoolManager.vue
  56. +2
    -3
      admin-portal/src/views/resourceManager/resSpecManager.vue
  57. +3
    -3
      admin-portal/src/views/resourceManager/resourceMsg.vue
  58. +3
    -3
      admin-portal/src/views/timeManager/index.vue
  59. +70
    -62
      admin-portal/src/views/timeManager/time.vue
  60. +17
    -11
      admin-portal/src/views/traningManager/components/index.vue
  61. +12
    -12
      admin-portal/src/views/traningManager/components/taskInfo.vue
  62. +18
    -19
      admin-portal/src/views/traningManager/components/taskLoad.vue
  63. +43
    -47
      admin-portal/src/views/traningManager/components/taskLog.vue
  64. +30
    -40
      admin-portal/src/views/traningManager/components/taskProfile.vue
  65. +3
    -3
      admin-portal/src/views/traningManager/index.vue
  66. +32
    -29
      admin-portal/src/views/traningManager/traningTaskList.vue
  67. +52
    -66
      admin-portal/src/views/userManager/components/addDialog.vue
  68. +38
    -52
      admin-portal/src/views/userManager/components/operateDialog.vue
  69. +3
    -3
      admin-portal/src/views/userManager/index.vue
  70. +60
    -91
      admin-portal/src/views/userManager/user.vue
  71. +45
    -32
      deploy/charts/octopus/values.yaml
  72. +34
    -16
      openai-portal/src/components/upload/index.vue
  73. +0
    -3
      openai-portal/src/store/modules/user.js
  74. +1
    -2
      openai-portal/src/utils/requestMinIO.js
  75. +2
    -2
      openai-portal/src/views/imageManager/components/dialogForm.vue
  76. +3
    -3
      openai-portal/src/views/modelDev/algorithmManager.vue
  77. +3
    -3
      openai-portal/src/views/modelDev/components/algorithm/algorithmCopy.vue
  78. +1
    -1
      openai-portal/src/views/modelDev/components/algorithm/myAlgorithmCreation.vue
  79. +8
    -9
      openai-portal/src/views/modelDev/components/algorithm/myList.vue
  80. +7
    -7
      openai-portal/src/views/modelDev/components/algorithm/presetList.vue
  81. +7
    -7
      openai-portal/src/views/modelDev/components/algorithm/publicList.vue
  82. +1
    -1
      openai-portal/src/views/modelDev/components/algorithm/reuploadAlgorithm.vue
  83. +8
    -8
      openai-portal/src/views/modelDev/components/algorithm/versionList.vue
  84. +6
    -6
      openai-portal/src/views/modelDev/components/notebook/notebookCreation.vue
  85. +1
    -1
      openai-portal/src/views/modelDev/components/notebook/notebookInfo.vue
  86. +2
    -2
      openai-portal/src/views/modelDev/components/notebook/notebookList.vue
  87. +8
    -8
      openai-portal/src/views/modelManager/Model.vue
  88. +6
    -6
      openai-portal/src/views/modelManager/components/versionList.vue
  89. +3
    -3
      openai-portal/src/views/modelManager/index.vue
  90. +1
    -1
      openai-portal/src/views/trainingManager/components/createDialog/index.vue
  91. +2
    -2
      openai-portal/src/views/trainingManager/components/createDialog/traningList.vue
  92. +14
    -3
      openai-portal/src/views/trainingManager/components/detailDialog/taskInfo.vue
  93. +1
    -1
      openai-portal/src/views/trainingManager/components/editeDialog/index.vue
  94. +2
    -2
      openai-portal/src/views/trainingManager/components/editeDialog/traningList.vue
  95. +2
    -2
      openai-portal/src/views/trainingManager/index.vue
  96. +2
    -2
      openai-portal/src/views/trainingManager/taskTemplate.vue
  97. +1
    -1
      openai-portal/src/views/trainingManager/traningTask.vue
  98. +1
    -0
      server/openai-server/internal/service/image.go

+ 36
- 36
admin-portal/src/api/dataManager.js View File

@@ -1,62 +1,62 @@
import request from '@/utils/request'

export function judgeParam(params) {
let conditions = []
params.pageSize?conditions.push(`pageSize=`+params.pageSize):null;
params.pageIndex?conditions.push(`pageIndex=`+params.pageIndex):null;
params.orderBy?conditions.push(`orderBy=`+params.orderBy):null;
params.sortBy?conditions.push(`sortBy=`+params.sortBy):null;
params.searchKey?conditions.push(`searchKey=`+params.searchKey):null;
params.createdAtGte?conditions.push(`createdAtGte=`+params.createdAtGte):null;
params.createdAtLt?conditions.push(`createdAtLt=`+params.createdAtLt):null;
params.path?conditions.push(`path=`+params.path):null;
const conditions = []
params.pageSize ? conditions.push(`pageSize=` + params.pageSize) : null;
params.pageIndex ? conditions.push(`pageIndex=` + params.pageIndex) : null;
params.orderBy ? conditions.push(`orderBy=` + params.orderBy) : null;
params.sortBy ? conditions.push(`sortBy=` + params.sortBy) : null;
params.searchKey ? conditions.push(`searchKey=` + params.searchKey) : null;
params.createdAtGte ? conditions.push(`createdAtGte=` + params.createdAtGte) : null;
params.createdAtLt ? conditions.push(`createdAtLt=` + params.createdAtLt) : null;
params.path ? conditions.push(`path=` + params.path) : null;
return conditions
}

export async function getUserDatasetList(payload){
let conditions = judgeParam(payload)
export async function getUserDatasetList(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: "/v1/datasetmanage/userdataset?" + conditions.join("&"),
method: "get",
method: "get"
})
return res
}

export async function getPresetDatasetList(payload){
let conditions = judgeParam(payload)
export async function getPresetDatasetList(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: "/v1/datasetmanage/predataset?" + conditions.join("&"),
method: "get",
method: "get"
})
return res
}

export async function getVersionList(payload){
let conditions = judgeParam(payload)
export async function getVersionList(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.id}/version?` + conditions.join("&"),
method: "get",
method: "get"
})
return res
}

export async function deleteDatasetVersion(payload){
export async function deleteDatasetVersion(payload) {
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.datasetId}/version/${payload.version}`,
method: "delete",
method: "delete"
})
return res
}

export async function deleteDataset(id){
export async function deleteDataset(id) {
const res = await request({
url: `/v1/datasetmanage/dataset/${id}`,
method: "delete",
method: "delete"
})
return res
}

export async function createPreDataset(payload){
export async function createPreDataset(payload) {
const res = await request({
url: "/v1/datasetmanage/dataset",
method: "post",
@@ -65,10 +65,10 @@ export async function createPreDataset(payload){
return res
}

export async function uploadPreDataset(payload){
export async function uploadPreDataset(payload) {
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.id}/version/${payload.version}/upload`,
method: "post",
method: "post",
data: {
fileName: payload.fileName,
domain: payload.domain
@@ -77,18 +77,18 @@ export async function uploadPreDataset(payload){
return res
}

export async function preDatasetFinishUpload(payload){
export async function preDatasetFinishUpload(payload) {
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.id}/version/${payload.version}/uploadconfirm`,
method: "put",
data:{
data: {
fileName: payload.fileName
}
})
return res
}

export async function createNewVersion(payload){
export async function createNewVersion(payload) {
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.datasetId}/version`,
method: "post",
@@ -99,10 +99,10 @@ export async function createNewVersion(payload){
return res
}

export async function uploadNewVersion(payload){
export async function uploadNewVersion(payload) {
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.datasetId}/version/${payload.version}/upload`,
method: "post",
method: "post",
data: {
fileName: payload.fileName,
domain: payload.domain
@@ -111,22 +111,22 @@ export async function uploadNewVersion(payload){
return res
}

export async function newVersionFinishUpload(payload){
export async function newVersionFinishUpload(payload) {
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.datasetId}/version/${payload.version}/uploadconfirm`,
method: "put",
data:{
data: {
fileName: payload.fileName
}
})
return res
}

export async function previewDataset(payload){
let conditions = judgeParam(payload)
export async function previewDataset(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: `/v1/datasetmanage/dataset/${payload.datasetId}/version/${payload.version}/file?`+ conditions.join("&"),
method: "get",
url: `/v1/datasetmanage/dataset/${payload.datasetId}/version/${payload.version}/file?` + conditions.join("&"),
method: "get"
})
return res
}

+ 5
- 2
admin-portal/src/api/globalVariable.js View File

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

let DOMAIN
if (process.env.NODE_ENV === 'development') { DOMAIN = 'http://192.168.202.73' }
else { DOMAIN = window.location.protocol + '//' + document.domain }
if (process.env.NODE_ENV === 'development') {
DOMAIN = 'http://192.168.202.73'
} else {
DOMAIN = window.location.protocol + '//' + document.domain
}
export default {
DOMAIN
}

+ 46
- 46
admin-portal/src/api/modelDev.js View File

@@ -1,60 +1,60 @@
import request from '@/utils/request'

export function judgeParam(params) {
let conditions = []
params.pageSize?conditions.push(`pageSize=` + params.pageSize):null;
params.pageIndex?conditions.push(`pageIndex=` + params.pageIndex):null;
params.orderBy?conditions.push(`orderBy=` + params.orderBy):null;
params.sortBy?conditions.push(`sortBy=` + params.sortBy):null;
params.searchKey?conditions.push(`searchKey=` + params.searchKey):null;
params.createdAtGte?conditions.push(`createdAtGte=` + params.createdAtGte):null;
params.createdAtLt?conditions.push(`createdAtLt=` + params.createdAtLt):null;
params.status?conditions.push(`status=` + params.status):null;
params.fileStatus?conditions.push(`fileStatus=` + params.fileStatus):null;
params.algorithmVersion?conditions.push(`algorithmVersion=` + params.algorithmVersion):null;
const conditions = []
params.pageSize ? conditions.push(`pageSize=` + params.pageSize) : null;
params.pageIndex ? conditions.push(`pageIndex=` + params.pageIndex) : null;
params.orderBy ? conditions.push(`orderBy=` + params.orderBy) : null;
params.sortBy ? conditions.push(`sortBy=` + params.sortBy) : null;
params.searchKey ? conditions.push(`searchKey=` + params.searchKey) : null;
params.createdAtGte ? conditions.push(`createdAtGte=` + params.createdAtGte) : null;
params.createdAtLt ? conditions.push(`createdAtLt=` + params.createdAtLt) : null;
params.status ? conditions.push(`status=` + params.status) : null;
params.fileStatus ? conditions.push(`fileStatus=` + params.fileStatus) : null;
params.algorithmVersion ? conditions.push(`algorithmVersion=` + params.algorithmVersion) : null;
return conditions
}

export async function getNotebookList(payload){
let conditions = judgeParam(payload)
export async function getNotebookList(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: "/v1/developmanage/notebook?" + conditions.join("&"),
method: "get",
method: "get"
})
return res
}

export async function stopNotebook(id){
export async function stopNotebook(id) {
const res = await request({
url: `/v1/developmanage/notebook/${id}/stop`,
method: "post",
method: "post"
})
return res
}

export async function getUserAlgorithmList(payload){
let conditions = judgeParam(payload)
export async function getUserAlgorithmList(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: `/v1/algorithmmanage/allalgorithm?` + conditions.join("&"),
method: "get",
method: "get"
})
return res
}

export async function getPresetAlgorithmList(payload){
let conditions = judgeParam(payload)
export async function getPresetAlgorithmList(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: "/v1/algorithmmanage/prealgorithm?" + conditions.join("&"),
method: "get",
method: "get"
})
return res
}

export async function getAlgorithmVersionList(payload){
let conditions = judgeParam(payload)
export async function getAlgorithmVersionList(payload) {
const conditions = judgeParam(payload)
const res = await request({
url: `/v1/algorithmmanage/algorithm/${payload.algorithmId}?` + conditions.join("&"),
method: "get",
method: "get"
})
return res
}
@@ -62,42 +62,42 @@ export async function getAlgorithmVersionList(payload){
export async function queryAlgorithmVersion(payload) {
const res = await request({
url: `/v1/algorithmmanage/algorithm/${payload.algorithmId}/version/${payload.version}`,
method: 'get',
method: 'get'
})
return res
}

export async function addPreAlgorithm(payload){
export async function addPreAlgorithm(payload) {
const res = await request({
url: `/v1/algorithmmanage/prealgorithm`,
method: "post",
data: payload
method: "post",
data: payload
})
return res
}

export async function addPreAlgorithmVersion(payload){
export async function addPreAlgorithmVersion(payload) {
const res = await request({
url: `/v1/algorithmmanage/prealgorithm/${payload.algorithmId}`,
method: "post",
method: "post",
data: {
oriVersion : payload.oriVersion,
algorithmDescript : payload.algorithmDescript
}
oriVersion: payload.oriVersion,
algorithmDescript: payload.algorithmDescript
}
})
return res
}

export async function uploadPreAlgorithm(payload){
export async function uploadPreAlgorithm(payload) {
const res = await request({
url: `/v1/algorithmmanage/prealgorithm/${payload.algorithmId}/version/${payload.version}/upload`,
method: "post",
data: payload
method: "post",
data: payload
})
return res
}

export async function preAlgorithmFinishUpload(payload){
export async function preAlgorithmFinishUpload(payload) {
const res = await request({
url: `/v1/algorithmmanage/prealgorithm/${payload.algorithmId}/version/${payload.version}/uploadconfirm`,
method: "put",
@@ -106,34 +106,34 @@ export async function preAlgorithmFinishUpload(payload){
return res
}

export async function compressAlgorithm(payload){
export async function compressAlgorithm(payload) {
const res = await request({
url: `/v1/algorithmmanage/algorithm/${payload.algorithmId}/version/${payload.version}/downloadcompress`,
method: "post",
method: "post"
})
return res
}

export async function downloadAlgorithmVersion(payload){
export async function downloadAlgorithmVersion(payload) {
const res = await request({
url: `/v1/algorithmmanage/algorithm/${payload.algorithmId}/version/${payload.version}/download?domain=${payload.domain}&compressAt=${payload.compressAt}`,
method: "get",
method: "get"
})
return res
}

export async function deletePreAlgorithmVersion(payload){
export async function deletePreAlgorithmVersion(payload) {
const res = await request({
url: `/v1/algorithmmanage/prealgorithm/${payload.algorithmId}/version/${payload.version}`,
method: "delete",
method: "delete"
})
return res
}

export async function deletePreAlgorithm(algorithmId){
export async function deletePreAlgorithm(algorithmId) {
const res = await request({
url: `/v1/algorithmmanage/prealgorithm/${algorithmId}`,
method: "delete",
method: "delete"
})
return res
}

+ 5
- 5
admin-portal/src/api/modelManager.js View File

@@ -14,7 +14,7 @@ export function getPreModel(params) {
})
}

//查询模型版本列表
// 查询模型版本列表
export function getModelList(params) {
return request({
url: `/v1/modelmanage/model/${params.modelId}`,
@@ -22,25 +22,25 @@ export function getModelList(params) {
params: { pageIndex: params.pageIndex, pageSize: params.pageSize }
})
}
//删除预置模型
// 删除预置模型
export function deletePreModel(params) {
return request({
url: `/v1/modelmanage/premodel/${params.modelId}`,
method: 'delete',
method: 'delete'
})
}
// 删除预置模型版本
export function deletePreModelVersion(params) {
return request({
url: `/v1/modelmanage/premodel/${params.modelId}/version/${params.version}`,
method: 'delete',
method: 'delete'
})
}
// 模型版本下载
export function downloadModel(params) {
return request({
url: `/v1/modelmanage/model/${params.modelId}/version/${params.version}/download?domain=${params.domain}`,
method: 'get',
method: 'get'
})
}
// 模型管理预览


+ 7
- 8
admin-portal/src/api/resourceManager.js View File

@@ -3,7 +3,7 @@ import request from '@/utils/request'
export function getResourcePool() {
return request({
url: '/v1/resourcemanage/resourcepool',
method: 'get',
method: 'get'

})
}
@@ -46,8 +46,7 @@ export function updateResourcePool(data) {
return request({
url: `/v1/resourcemanage/resourcepool/${data.id}`,
method: 'put',
data: { desc:data.desc, bindingNodes:data.bindingNodes, mapResourceSpecIdList:data.mapResourceSpecIdList }

data: { desc: data.desc, bindingNodes: data.bindingNodes, mapResourceSpecIdList: data.mapResourceSpecIdList }

})
}
@@ -55,7 +54,7 @@ export function updateResourcePool(data) {
export function getNodeList() {
return request({
url: '/v1/resourcemanage/node',
method: 'get',
method: 'get'
})
}
// 创建自定义资源
@@ -71,7 +70,7 @@ export function updateResource(data) {
return request({
url: `/v1/resourcemanage/resource/${data.id}`,
method: 'put',
data:{desc:data.desc,resourceRef:data.resourceRef,bindingNodes:data.bindingNodes}
data: { desc: data.desc, resourceRef: data.resourceRef, bindingNodes: data.bindingNodes }

})
}
@@ -79,7 +78,7 @@ export function updateResource(data) {
export function deleteSpecification(params) {
return request({
url: `/v1/resourcemanage/resourcespec/${params}`,
method: 'delete',
method: 'delete'

})
}
@@ -87,7 +86,7 @@ export function deleteSpecification(params) {
export function getResourceList() {
return request({
url: '/v1/resourcemanage/resource',
method: 'get',
method: 'get'

})
}
@@ -95,7 +94,7 @@ export function getResourceList() {
export function deleteResource(params) {
return request({
url: `/v1/resourcemanage/resource/${params}`,
method: 'delete',
method: 'delete'

})
}

+ 4
- 4
admin-portal/src/api/trainingManager.js View File

@@ -12,24 +12,24 @@ export function getTraining(params) {
export function stopTraining(params) {
return request({
url: `/v1/trainmanage/trainjob/${params}/stop`,
method: 'post',
method: 'post'
})
}
//获取训练任务详情
// 获取训练任务详情
export function trainingDetail(params) {
return request({
url: `/v1/trainmanage/trainjob/${params}`,
method: 'get'
})
}
//任务日志访问
// 任务日志访问
export function showLog(params) {
return requestLog({
url: `/log/user/trainjob/${params.jobId}/${params.subName}/index.log`,
method: 'get'
})
}
//下载训练任务日志
// 下载训练任务日志
export function downloadLog(params) {
return requestLog({
url: `/log/download/user/trainjob/${params.jobId}/${params.subName}/index.log`,


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

@@ -34,7 +34,7 @@
const first = matched[0]

if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: '' } }].concat(matched)
matched = [{ path: '/dashboard', meta: { title: '' }}].concat(matched)
}

this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)


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

@@ -1,27 +1,32 @@
<template>
<div>
<el-dialog title="高级搜索" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :inline="true" class="demo-form-inline" ref="searchForm" :label-position="labelPosition"
label-width="100px">
<el-form-item :label=item.label v-for="item in searchForm" :key="item.props">
<el-input v-model="searchData[item.prop]" :placeholder="item.placeholder"
v-if="item.type==='Input'">
</el-input>
<el-form
ref="searchForm"
:inline="true"
class="demo-form-inline"
:label-position="labelPosition"
label-width="100px"
>
<el-form-item v-for="item in searchForm" :key="item.props" :label="item.label">
<el-input
v-if="item.type==='Input'"
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
/>
<el-select v-if="item.type==='Select'" v-model="searchData[item.prop]">
<el-option v-for="op in item.options" :label="op.label" :value="op.value" :key="op.value">
</el-option>
<el-option v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value" />
</el-select>
<el-date-picker
v-if="item.type==='Time'"
v-model="searchData[item.prop]"
<el-date-picker
v-if="item.type==='Time'"
v-model="searchData[item.prop]"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="timestamp"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="timestamp"
class="data"
>
</el-date-picker>
/>
</el-form-item>
</el-form>
<div class="buttonWrapper">
@@ -31,7 +36,7 @@
</el-dialog>
<el-form :inline="true" class="demo-form-inline">
<el-form-item>
<el-input v-model.trim="searchData.searchKey" :placeholder=blurName></el-input>
<el-input v-model.trim="searchData.searchKey" :placeholder="blurName" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button>
@@ -43,7 +48,7 @@
<script>
export default {
props: {
searchForm: { type: Array, default: [] },
searchForm: { type: Array, default: () => [] },
blurName: { type: String, default: '' }
},
data() {
@@ -51,21 +56,21 @@
advanced: false,
searchData: { searchKey: '' },
dialogFormVisible: false,
labelPosition: 'left',
labelPosition: 'left'

}
},
methods: {
onSubmit() {
if (this.dialogFormVisible) { this.searchData.searchKey = "" }
if (!this.dialogFormVisible) {this.searchData = {searchKey:this.searchData.searchKey} }
if (!this.dialogFormVisible) { this.searchData = { searchKey: this.searchData.searchKey } }
if (this.dialogFormVisible) { this.dialogFormVisible = !this.dialogFormVisible }
this.$emit('searchData', this.searchData)
},
changeSearchType() {
this.dialogFormVisible = !this.dialogFormVisible
},
reset() { this.searchData = {searchKey:''} }
reset() { this.searchData = { searchKey: '' } }
}
}
</script>


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

@@ -1,21 +1,21 @@
<template>
<div>
<el-upload
v-if="showUpload"
class="upload-demo"
action="#"
:on-change="upload"
:file-list="fileList"
<el-upload
v-if="showUpload"
class="upload-demo"
action="#"
:on-change="upload"
:file-list="fileList"
:http-request="httpRequest"
multiple
multiple
: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 :loading="loadingShow" size="small" v-if="!showUpload" type="primary">上传中</el-button>
<el-progress :text-inside="true" :stroke-width="18" :percentage="progress" class="progress" v-if="(progress!='0'||!showUpload)&&(progress!='100'||!showUpload)"></el-progress>
<div slot="footer" v-if="show" class="dialog-footer">
<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" />
<div v-if="show" slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确 定</el-button>
</div>
@@ -45,7 +45,7 @@
show: false,
loadingShow: false,
showUpload: true,
accept:"application/zip",
accept: "application/zip",
tipText: '上传文件格式为 zip'
}
},
@@ -54,17 +54,17 @@
'progress'
])
},
created(){
if (this.uploadData.type === "imageManager") {
this.accept = "application/zip,.tar"
this.tipText = '上传文件格式为 zip 或 tar'
}
},
watch: {
showUpload() {
store.commit('user/CLEAR_PROGRESS')
}
},
created() {
if (this.uploadData.type === "imageManager") {
this.accept = "application/zip,.tar"
this.tipText = '上传文件格式为 zip 或 tar'
}
},
methods: {
getErrorMsg(code) {
return getErrorMsg(code)
@@ -75,8 +75,8 @@
// }
},
httpRequest() {
let fileName = this.fileList[0].name
let fileForm = fileName.slice(fileName.lastIndexOf(".") + 1).toLowerCase() //获取上传文件格式后缀
const fileName = this.fileList[0].name
const fileForm = fileName.slice(fileName.lastIndexOf(".") + 1).toLowerCase() // 获取上传文件格式后缀
if (this.uploadData.type === "imageManager") {
this.loadingShow = true
this.showUpload = false
@@ -181,7 +181,7 @@
version: this.uploadData.version,
domain: this.GLOBAL.DOMAIN
}
if (fileForm === 'zip') {
if (fileForm === 'zip') {
uploadNewVersion(param).then(response => {
if (response.success) {
const param = {
@@ -221,7 +221,7 @@
version: this.uploadData.version,
domain: this.GLOBAL.DOMAIN
}
if (fileForm === 'zip') {
if (fileForm === 'zip') {
uploadPreAlgorithm(param).then(response => {
if (response.success) {
const param = {
@@ -304,16 +304,14 @@
type: 'success'
});
this.$emit('confirm', false)
}
else {
} else {
this.$message({
message: this.getErrorMsg(response.error.subcode),
type: 'warning'
});
});
}
})
}
else if (this.uploadData.type === "modelManager") {
} else if (this.uploadData.type === "modelManager") {
modelFinishUpload({ fileName: this.fileList[0].name, modelId: this.uploadData.data.modelId, version: this.uploadData.data.version }).then(
response => {
if (response.success) {
@@ -322,14 +320,13 @@
type: 'success'
});
this.$emit('confirm', false)
}
else {
} else {
this.$message({
message: this.getErrorMsg(response.error.subcode),
type: 'warning'
});
});
}
},
}

)
} else if (this.uploadData.type === "preDatasetCreation") {
@@ -340,7 +337,8 @@
}
preDatasetFinishUpload(payload).then(response => {
if (response.success) {
this.$message.success("上传预置数据集成功"); } else {
this.$message.success("上传预置数据集成功");
} else {
this.$message({
message: this.getErrorMsg(response.error.subcode),
type: 'warning'
@@ -398,7 +396,7 @@
}
},
cancel() {
this.$confirm('此操作将被取消,是否继续?','提示',{
this.$confirm('此操作将被取消,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'


+ 2
- 3
admin-portal/src/layout/components/Navbar.vue View File

@@ -9,10 +9,9 @@
<a href="https://octopus.openi.org.cn/docs/management/intro" target="_blank" class="manual">管理手册</a>
<i class="el-icon-service" style="color:#666699 ;"></i>
<a href="https://git.openi.org.cn/OpenI/octopus/issues" target="_blank" class="manual">问题意见</a>
<el-dropdown-menu slot="dropdown">
</el-dropdown-menu>
<el-dropdown-menu slot="dropdown" />
</el-dropdown>
<el-avatar :src="circleUrl" :size="size"></el-avatar>
<el-avatar :src="circleUrl" :size="size" />
<el-dropdown>
<span class="el-dropdown-link">
管理员<i class="el-icon-arrow-down el-icon--right"></i>


+ 1
- 2
admin-portal/src/layout/components/Sidebar/index.vue View File

@@ -1,6 +1,6 @@
<template>
<div :class="{'has-logo':true}">
<logo :collapse="isCollapse" />
<logo :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
@@ -29,7 +29,6 @@ export default {
computed: {
...mapGetters([
'sidebar'
]),
routes() {
return this.$router.options.routes


+ 3
- 3
admin-portal/src/layout/index.vue View File

@@ -1,9 +1,9 @@
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
</div>
<app-main />


+ 2
- 2
admin-portal/src/main.js View File

@@ -3,7 +3,7 @@ import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
@@ -32,7 +32,7 @@ Vue.prototype.GLOBAL = globalVariable
Vue.use(ElementUI, { zhLocale })
// 如果想要中文版 element-ui,按如下方式声明
// Vue.use(ElementUI)
Vue.use(VueAwesomeSwiper, /* { default global options } */)
Vue.use(VueAwesomeSwiper /* { default global options } */)
Vue.config.productionTip = false

new Vue({


+ 3
- 7
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
@@ -10,7 +8,7 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration

const whiteList = ['/'] // no redirect whitelist

router.beforeEach(async (to, from, next) => {
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()

@@ -24,10 +22,8 @@ router.beforeEach(async (to, from, next) => {
// if is logged in, redirect to the home page
next('/index')
NProgress.done()
}
else { next() }
}
else {
} else { next() }
} else {
if (whiteList.indexOf(to.path) !== -1) {
// in the free login whitelist, go directly
next()


+ 3
- 3
admin-portal/src/router/index.js View File

@@ -33,7 +33,7 @@ import Layout from '@/layout'
export const constantRoutes = [
{
path: '/',
component: () => import('@/views/Home/login'),
component: () => import('@/views/Home/login')
},

{
@@ -125,7 +125,7 @@ export const constantRoutes = [
name: 'dataManager',
component: () => import('@/views/dataManager/index'),
meta: { title: '数据管理', icon: 'data' }
},
}
]
},
{
@@ -157,7 +157,7 @@ export const constantRoutes = [
name: '/',
component: () => import('@/views/devManager/algorithmManager'),
meta: { title: '算法管理', icon: 'dot' }
},
}
]
},
{


+ 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 {


+ 3
- 11
admin-portal/src/utils/index.js View File

@@ -120,25 +120,19 @@ export function formatSize(size) {
size = size.substring(0, size.length - 2)
size = size * 1024
return size
}
else if (size.indexOf('Mi') !== -1) {
} else if (size.indexOf('Mi') !== -1) {
size = size.substring(0, size.length - 2)
size = size * 1024 * 1024
return size
}
else if (size.indexOf('Gi') !== -1) {
} else if (size.indexOf('Gi') !== -1) {
size = size.substring(0, size.length - 2)
size = size * 1024 * 1024 * 1024
return size
}
else if (size.indexOf('Ti') !== -1) {
} else if (size.indexOf('Ti') !== -1) {
size = size.substring(0, size.length - 2)
size = size * 1024 * 1024 * 1024 * 1024
return size
}



}
export function formatDuring(mss) {
mss = mss * 1000
@@ -153,5 +147,3 @@ export function formatDuring(mss) {
return days + hours + minutes + seconds
}




+ 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
- 4
admin-portal/src/utils/requestLog.js View File

@@ -47,7 +47,6 @@ service.interceptors.response.use(
// duration: 5 * 1000
// })


// // if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
// // // to re-login
// // MessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {
@@ -66,15 +65,13 @@ service.interceptors.response.use(
// }
},
error => {

Message({
message: '没有找到日志',
type: 'warning',
duration: 5 * 1000
})
console.log("error:", error)
// return Promise.reject(error)


}
)



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

@@ -48,7 +48,6 @@ service.interceptors.response.use(
*/

response => {

// res = response.data
// res.data = response.data.payload
if (response.status === 200) {


+ 27
- 17
admin-portal/src/views/Home/login.vue View File

@@ -5,22 +5,35 @@
<div><img src="../../assets/logo.svg" alt="" class="logo"></div>
<div class="login-container">
<div class="grid-content">
<el-form :model="loginForm" :rules="rules" status-icon ref="loginForm" label-position="left"
label-width="0px" class="demo-ruleForm login-page">
<el-form
ref="loginForm"
:model="loginForm"
:rules="rules"
status-icon
label-position="left"
label-width="0px"
class="demo-ruleForm login-page"
>
<h3 class="title">系统登录</h3>
<el-form-item prop="email">
<el-input type="text" v-model="loginForm.email" auto-complete="off"
placeholder="请输入管理员账号">
</el-input>
<el-input
v-model="loginForm.email"
type="text"
auto-complete="off"
placeholder="请输入管理员账号"
/>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="loginForm.password" auto-complete="off"
placeholder="密码">
</el-input>
<el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
/>
</el-form-item>
<!-- <el-checkbox v-model="checked" class="rememberme">记住密码</el-checkbox> -->
<el-form-item style="width:100%;">
<el-button type="primary" style="width:100%;" @click="handleLogin" :loading="logining">
<el-button type="primary" style="width:100%;" :loading="logining" @click="handleLogin">
登录
</el-button>
</el-form-item>
@@ -38,15 +51,15 @@
<script>
export default {
data() {
// 邮箱类型验证
// 邮箱类型验证
return {
logining: false,
loginForm: {
email: undefined,
password: undefined,
password: undefined
},
rules: {
email: [{ required: true, message: "请输入管理员账号", trigger: "blur" },
email: [{ required: true, message: "请输入管理员账号", trigger: "blur" }
],
password: [{ required: true, message: '请输入管理员密码', trigger: 'blur' }]
},
@@ -55,7 +68,7 @@
},
watch: {
$route: {
handler: function (route) {
handler: function(route) {
this.redirect = route.query && route.query.redirect
},
immediate: true
@@ -74,14 +87,12 @@
message: '登录成功',
type: 'success'
});
}
else {
} else {
this.$message({
message: '账号密码错误',
type: 'warning'
});
}

}).catch(() => {
this.loading = false
})
@@ -145,7 +156,6 @@
margin: 0 auto;
border-radius: 10px;


}

label.el-checkbox.rememberme {


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

@@ -10,9 +10,9 @@

<script>
export default {
name: "clusterMonitor",
name: "ClusterMonitor",
components: {
},
data() {
return {
@@ -25,11 +25,10 @@
this.iFrameHeight = scrollHeight + "px"
},
methods: {

}
}
</script>
<style lang="scss" scoped>
</style>

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

@@ -1,27 +1,26 @@
<template>
<div>
</div>
</template>

<script>
export default {
name: "groupMonitor",
name: "GroupMonitor",
components: {
},
data() {
return {
}
},
methods: {

}
}
</script>
<style lang="scss" scoped>
</style>

+ 16
- 9
admin-portal/src/views/clusterMonitor/index.vue View File

@@ -1,16 +1,23 @@
<template>
<div class="wrapper"> <iframe :src="grafanaUri" :height="iFrameHeight" frameBorder="0" scrolling="no"
class="clusterDashboard"></iframe></div>
<div class="wrapper">
<iframe
:src="grafanaUri"
:height="iFrameHeight"
frameBorder="0"
scrolling="no"
class="clusterDashboard"
>
</iframe>
</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',


+ 22
- 20
admin-portal/src/views/dataManager/components/newVersion.vue View File

@@ -7,12 +7,12 @@
:before-close="handleDialogClose"
:close-on-click-modal="false"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px">
<el-form-item label="数据集名称" :label-width="formLabelWidth" prop="name">
<el-input v-model="ruleForm.name" :disabled="true"></el-input>
<el-input v-model="ruleForm.name" :disabled="true" />
</el-form-item>
<el-form-item label="数据类型" :label-width="formLabelWidth" prop="type">
<el-input v-model="ruleForm.type" :disabled="true"></el-input>
<el-input v-model="ruleForm.type" :disabled="true" />
</el-form-item>
<el-form-item label="版本描述" :label-width="formLabelWidth" prop="desc">
<el-input
@@ -21,19 +21,18 @@
placeholder="请输入数据集描述"
maxlength="300"
show-word-limit
></el-input>
/>
</el-form-item>
<el-form-item :label-width="formLabelWidth">
<el-button type="text" @click="nextStep('ruleForm')" v-show="!showUpload">下一步</el-button>
<el-button v-show="!showUpload" type="text" @click="nextStep('ruleForm')">下一步</el-button>
</el-form-item>
<el-form-item v-if="showUpload" label='数据集上传' :label-width="formLabelWidth" prop="path">
<upload
:uploadData="uploadData"
@confirm="confirm"
@cancel="cancel"
<el-form-item v-if="showUpload" label="数据集上传" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
>
</upload>
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
</el-form-item>
</el-form>
</el-dialog>
@@ -45,19 +44,22 @@ 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,
upload
},
props: {
row:{}
row: {
type: Object,
default: () => {}
}
},
data() {
return {
showUpload: false,
uploadData: { data: {}, type: undefined },
ruleForm: {
desc: "",
desc: ""
},
rules: {
path: [
@@ -72,9 +74,9 @@ export default {
formLabelWidth: "120px"
}
},
created(){
let {name,type} = this.row
this.ruleForm = {name,type}
created() {
const { name, type } = this.row
this.ruleForm = { name, type }
},
methods: {
getErrorMsg(code) {
@@ -92,7 +94,7 @@ export default {
datasetId: this.row.id
}
createNewVersion(param).then(response => {
if(response.success) {
if (response.success) {
this.uploadData.type = "newPreDatasetVersion"
this.uploadData.datasetId = response.data.datasetId
this.uploadData.version = response.data.version


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

@@ -1,45 +1,44 @@
<template>
<div>
<el-dialog
title="创建预置数据集"
width="35%"
:visible.sync="CreateFormVisible"
<el-dialog
title="创建预置数据集"
width="35%"
:visible.sync="CreateFormVisible"
:before-close="handleDialogClose"
:close-on-click-modal="false"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label='数据集名称' :label-width="formLabelWidth" prop="name">
<el-input v-model="ruleForm.name" :disabled="disabled" placeholder="请输入数据集名称"></el-input>
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px">
<el-form-item label="数据集名称" :label-width="formLabelWidth" prop="name">
<el-input v-model="ruleForm.name" :disabled="disabled" placeholder="请输入数据集名称" />
</el-form-item>
<el-form-item label='数据类型' :label-width="formLabelWidth" prop="type">
<el-form-item label="数据类型" :label-width="formLabelWidth" prop="type">
<el-select v-model="ruleForm.type" :disabled="disabled" placeholder="请选择数据集类型">
<el-option label="图片" value="picture"></el-option>
<el-option label="视频" value="video"></el-option>
<el-option label="文字" value="text"></el-option>
<el-option label="语音" value="voice"></el-option>
<el-option label="图片" value="picture" />
<el-option label="视频" value="video" />
<el-option label="文字" value="text" />
<el-option label="语音" value="voice" />
</el-select>
</el-form-item>
<el-form-item label='数据集描述' :label-width="formLabelWidth" prop="desc">
<el-form-item label="数据集描述" :label-width="formLabelWidth" prop="desc">
<el-input
v-model="ruleForm.desc"
:disabled="disabled"
:autosize="{ minRows: 2, maxRows: 4}"
placeholder="请输入数据集描述"
maxlength="300"
show-word-limit>
</el-input>
show-word-limit
/>
</el-form-item>
<el-form-item :label-width="formLabelWidth">
<el-button type="text" @click="nextStep('ruleForm')" v-show="!showUpload">下一步</el-button>
<el-button v-show="!showUpload" type="text" @click="nextStep('ruleForm')">下一步</el-button>
</el-form-item>
<el-form-item v-if="showUpload" label='数据集上传' :label-width="formLabelWidth" prop="path">
<upload
:uploadData="uploadData"
@confirm="confirm"
@cancel="cancel"
<el-form-item v-if="showUpload" label="数据集上传" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
>
</upload>
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
</el-form-item>
</el-form>
</el-dialog>
@@ -51,16 +50,16 @@ import upload from '@/components/upload/index.vue'
import { createPreDataset } from "@/api/dataManager"
import { getErrorMsg } from '@/error/index'
export default {
name: "preDatasetCreation",
props: {},
name: "PreDatasetCreation",
components: {
upload
},
props: {},
props: {
row: {
type: Object,
default: () => { }
},
}
},
data() {
return {
@@ -68,7 +67,7 @@ export default {
disabled: false,
uploadData: { data: {}, type: undefined },
ruleForm: {
},
rules: {
name: [
@@ -80,10 +79,10 @@ export default {
],
path: [
{ required: true, message: '请上传数据集', trigger: 'change' }
],
]
},
CreateFormVisible: true,
formLabelWidth: '120px',
formLabelWidth: '120px'
}
},
methods: {
@@ -94,7 +93,7 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
createPreDataset(this.ruleForm).then(response => {
if(response.success) {
if (response.success) {
this.showUpload = true
this.disabled = true
this.uploadData.id = response.data.id
@@ -120,7 +119,7 @@ export default {
},
confirm(val) {
this.$emit('confirm', val)
},
}
}
}
</script>

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

@@ -1,14 +1,14 @@
<template>
<div>
<el-dialog
title="预览"
:visible.sync="dialogTableVisible"
<el-dialog
title="预览"
:visible.sync="dialogTableVisible"
:before-close="handleDialogClose"
:close-on-click-modal="false"
>
<el-table :data="preList" height="300">
<el-table-column property="name" label="名称"></el-table-column>
<el-table-column property="type" label="类型"></el-table-column>
<el-table-column property="name" label="名称" />
<el-table-column property="type" label="类型" />
</el-table>
</el-dialog>
</div>
@@ -18,11 +18,11 @@
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(){
data() {
return {
dialogTableVisible: true,
data: undefined,
@@ -30,14 +30,14 @@ export default {
}
},
created() {
this.data = this.row,
this.data = this.row
this.getPreList()
},
methods: {
getErrorMsg(code) {
return getErrorMsg(code)
},
getPreList(){
getPreList() {
const param = {
datasetId: this.data.datasetId,
version: this.data.version
@@ -55,7 +55,7 @@ export default {
},
handleDialogClose() {
this.$emit('close', false)
},
}
}
}
</script>

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

@@ -7,31 +7,30 @@
:before-close="handleDialogClose"
:close-on-click-modal="false"
>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px">
<el-form-item label="数据集名称" :label-width="formLabelWidth" prop="name">
<el-input v-model="ruleForm.name" :disabled="true"></el-input>
<el-input v-model="ruleForm.name" :disabled="true" />
</el-form-item>
<el-form-item label="数据类型" :label-width="formLabelWidth" prop="type">
<el-input v-model="ruleForm.type" :disabled="true"></el-input>
<el-input v-model="ruleForm.type" :disabled="true" />
</el-form-item>
<el-form-item label="版本描述" :label-width="formLabelWidth" prop="desc">
<el-input
:disabled="true"
v-model="ruleForm.desc"
:disabled="true"
:autosize="{ minRows: 2, maxRows: 4}"
placeholder="请输入数据集描述"
maxlength="300"
show-word-limit
></el-input>
/>
</el-form-item>
<el-form-item label='数据集上传' :label-width="formLabelWidth" prop="path">
<upload
:uploadData="uploadData"
@confirm="confirm"
@cancel="cancel"
<el-form-item label="数据集上传" :label-width="formLabelWidth" prop="path">
<upload
v-model="ruleForm.path"
>
</upload>
:upload-data="uploadData"
@confirm="confirm"
@cancel="cancel"
/>
</el-form-item>
</el-form>
</el-dialog>
@@ -41,9 +40,9 @@
<script>
import upload from '@/components/upload/index.vue'
export default {
name: "reuploadDataset",
name: "ReuploadDataset",
components: {
upload,
upload
},
props: {
versionData: {
@@ -53,14 +52,14 @@ export default {
data: {
type: Object,
default: () => { }
},
}
},
data() {
return {
showUpload: false,
uploadData: { data: {}, type: undefined },
ruleForm: {
desc: "",
desc: ""
},
rules: {
path: [
@@ -75,10 +74,10 @@ export default {
formLabelWidth: "120px"
}
},
created(){
let {desc} = this.versionData
let {name,type} = this.data
this.ruleForm = {name,type,desc}
created() {
const { desc } = this.versionData
const { name, type } = this.data
this.ruleForm = { name, type, desc }
this.uploadData.id = this.versionData.datasetId
this.uploadData.type = "preDatasetCreation"
this.uploadData.version = this.versionData.version


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

@@ -8,24 +8,25 @@
:close-on-click-modal="false"
>
<el-table
v-loading.fullscreen.lock="loading"
label-width="100px"
:data="versionList"
v-loading.fullscreen.lock="loading"
style="width: 100%" height="350"
style="width: 100%"
height="350"
>
<el-table-column label="版本号" props="version">
<template slot-scope="scope">
<span >{{ scope.row.version }}</span>
<span>{{ scope.row.version }}</span>
</template>
</el-table-column>
<el-table-column label="版本描述" props="desc" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span >{{ scope.row.desc }}</span>
<span>{{ scope.row.desc }}</span>
</template>
</el-table-column>
<el-table-column label="创建时间" props="desc">
<template slot-scope="scope">
<span >{{ parseTime(scope.row.createdAt) }}</span>
<span>{{ parseTime(scope.row.createdAt) }}</span>
</template>
</el-table-column>
<el-table-column label="数据集状态" props="status">
@@ -35,27 +36,27 @@
</el-table-column>
<el-table-column label="操作" props="action">
<template slot-scope="scope">
<el-button
<el-button
v-if="(scope.row.status === 1 ) || (scope.row.status === 4 ) ? true : false"
@click="reupload(scope.row)"
type="text"
v-show="versionListType === 1 ? false : true"
type="text"
@click="reupload(scope.row)"
>
重新上传
</el-button>
<el-button
type="text"
<el-button
type="text"
style="padding-right:10px"
@click="handlePreview(scope.row)"
:disabled="scope.row.status === 3 ? false : true"
@click="handlePreview(scope.row)"
>
预览
</el-button>
<el-button
<el-button
v-if="versionListType === 1 ? false : true"
type="text"
slot="reference"
@click="confirmDelete(scope.row)"
slot="reference"
type="text"
@click="confirmDelete(scope.row)"
>
删除
</el-button>
@@ -63,29 +64,28 @@
</el-table-column>
</el-table>
<div class="block">
<el-pagination
<el-pagination
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 80]"
:page-size="pageSize"
:page-sizes="[10, 20, 50, 80]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
<div slot="footer">
</div>
</el-dialog>
<preview v-if="preVisible" :row="versionData" @close="close">
</preview>
<reuploadDataset
v-if="myDatasetVisible"
:data="this.data"
:versionData="this.versionData"
@close="close"
@cancel="cancel"
@confirm="confirm">
</reuploadDataset>
<preview v-if="preVisible" :row="versionData" @close="close" />
<reuploadDataset
v-if="myDatasetVisible"
:data="data"
:version-data="versionData"
@close="close"
@cancel="cancel"
@confirm="confirm"
/>
</div>
</template>

@@ -96,21 +96,21 @@ import preview from './preview.vue'
import reuploadDataset from "./reuploadDataset.vue"
import { getErrorMsg } from '@/error/index'
export default {
name: "versionList",
components: {
name: "VersionList",
components: {
preview,
reuploadDataset
},
props: {
versionListType:{ type: Number },
versionListType: { type: Number, default: undefined },
data: {
type: Object,
default: {}
},
default: () => {}
}
},
data() {
return {
title:'版本列表/' + this.data.name,
title: '版本列表/' + this.data.name,
versionListVisible: true,
myDatasetVisible: false,
preVisible: false,
@@ -145,9 +145,9 @@ export default {
this.pageIndex = val
this.getVersionList()
},
getVersionList(param){
if (!param) {
param = { pageIndex: this.pageIndex, pageSize: this.pageSize }
getVersionList(param) {
if (!param) {
param = { pageIndex: this.pageIndex, pageSize: this.pageSize }
}
param.id = this.data.id
getVersionList(param).then(response => {
@@ -162,13 +162,13 @@ export default {
}
});
},
confirmDelete(row){
this.$confirm('是否删除此版本数据集?','提示',{
confirmDelete(row) {
this.$confirm('是否删除此版本数据集?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
center: true
}).then(() =>{
}).then(() => {
this.handleDelete(row)
}).catch(() => {
this.$message({
@@ -180,7 +180,7 @@ export default {
handleDelete(row) {
this.loading = true
deleteDatasetVersion(row).then(response => {
if(response.success) {
if (response.success) {
this.$message.success("删除成功");
this.loading = false
this.getVersionList()
@@ -193,11 +193,11 @@ export default {
}
})
},
getDatasetStatus(value){
getDatasetStatus(value) {
switch (value) {
case 1:
return "等待解压中"
case 2:
case 2:
return "解压中"
case 3:
return "解压完成"
@@ -218,7 +218,7 @@ export default {
confirm(val) {
this.myDatasetVisible = val
},
//时间戳转换日期
// 时间戳转换日期
parseTime(val) {
return parseTime(val)
}


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

@@ -1,11 +1,11 @@
<template>
<div>
<el-tabs class="Wrapper" v-model="activeName" style="margin:20px 0px 0px 20px" @tab-click="handleClick" >
<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>
<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>
<templateList v-if="tabRefresh.templateMenu" :data-tab-type="2" />
</el-tab-pane>
</el-tabs>
</div>
@@ -23,7 +23,7 @@ export default {
activeName: 'userDataset',
tabRefresh: {
userMenu: true,
templateMenu: false,
templateMenu: false
}
};
},
@@ -46,7 +46,7 @@ export default {
this.tabRefresh[key] = false
}
}
},
}
}
};
</script>


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

@@ -1,26 +1,26 @@
<template>
<div >
<div>
<div class="searchForm">
<searchForm
:searchForm=searchForm
:blurName="'数据集名称 搜索'"
<searchForm
:search-form="searchForm"
:blur-name="'数据集名称 搜索'"
@searchData="getSearchData"
/>
</div>
<el-button
type="primary"
size="medium"
@click="create"
class="create"
<el-button
type="primary"