diff --git a/web_src/vuepages/apis/modules/modelmanage.js b/web_src/vuepages/apis/modules/modelmanage.js index 62c782405..7124dcfc9 100644 --- a/web_src/vuepages/apis/modules/modelmanage.js +++ b/web_src/vuepages/apis/modules/modelmanage.js @@ -62,7 +62,7 @@ export const deleteModelFile = (params) => { // return: uploadID, uuid, uploaded, chunks, attachID, modeluuid, modelName, fileName export const getChunks = (params) => { return service({ - url: `/attachments/get_chunks`, + url: `/attachments/model/get_chunks`, method: 'get', params, data: {}, @@ -74,7 +74,7 @@ export const getChunks = (params) => { // return: uploadID, uuid export const getNewMultipart = (params) => { return service({ - url: `/attachments/new_multipart`, + url: `/attachments/model/new_multipart`, method: 'get', params, data: {}, @@ -86,7 +86,7 @@ export const getNewMultipart = (params) => { // return: url export const getMultipartUrl = (params) => { return service({ - url: `/attachments/get_multipart_url`, + url: `/attachments/model/get_multipart_url`, method: 'get', params, data: {}, @@ -97,7 +97,7 @@ export const getMultipartUrl = (params) => { // data: { uuid, uploadID, size, type, file_name, dataset_id, description, scene=model, modeluuid=xxxx } export const setCompleteMultipart = (data) => { return service({ - url: `/attachments/complete_multipart`, + url: `/attachments/model/complete_multipart`, method: 'post', headers: { 'Content-type': 'application/x-www-form-urlencoded' }, params: {}, diff --git a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue index d3cb3d866..badd5a057 100644 --- a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue +++ b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue @@ -164,7 +164,7 @@
- + @@ -259,10 +259,12 @@ export default { item.SizeShow = item.IsDir ? '' : transFileSize(item.Size); item.ModTimeNum = new Date(item.ModTime).getTime(); }) + list.sort((a, b) => b.ModTimeNum - a.ModTimeNum); this.filesList = list; + this.$refs['tableRef']?.clearSort(); }).catch(err => { console.log(err); - }) + }); }, goNextDir(item) { this.filePath.push({ diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index 0a106531c..815b5368d 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -23,7 +23,7 @@
+ @click="state.type = 0; state.engine = '0'"> @@ -39,7 +39,7 @@
+ @click="state.type = 1; state.engine = '2'"> @@ -54,10 +54,11 @@
-
+
- +
@@ -80,8 +81,8 @@
- +
@@ -95,7 +96,9 @@
- {{ type == '1' ? $t('modelManage.confirm') : $t('modelManage.createModel') }} + {{ type == '1' ? $t('modelManage.confirm') : + $t('modelManage.createModel') + }} {{ $t('modelManage.cancel') }}
@@ -127,23 +130,28 @@ export default { label: '', description: '', }, + nameErr: false, isShowVersion: false, engineList: MODEL_ENGINES, }; }, components: {}, methods: { + checkName() { + this.nameErr = !this.state.name; + return !this.nameErr; + }, labelInput() { const hasEndSpace = this.state.label[this.state.label.length - 1] == ' '; const list = this.state.label.trim().split(' ').filter(label => label != ''); this.state.label = list.slice(0, MAX_LABEL_COUNT).join(' ') + (hasEndSpace && list.length < MAX_LABEL_COUNT ? ' ' : ''); }, submit() { - if (!this.state.name) { - this.$message({ - type: 'info', - message: this.$t('modelManage.pleaseInputModelName'), - }); + if (!this.checkName()) { + // this.$message({ + // type: 'info', + // message: this.$t('modelManage.pleaseInputModelName'), + // }); return; } const submintApi = this.type == '1' ? modifyModel : saveLocalModel; @@ -161,6 +169,11 @@ export default { list.pop(); list.push('create_local_model_2'); window.location.href = list.join('/') + '?type=0&name=' + this.state.name + '&id=' + res.id; + } if (res && res.code == '-1') { + this.$message({ + type: 'error', + message: res.msg, + }); } else { this.$message({ type: 'error', @@ -325,6 +338,24 @@ export default { } } + &.error { + .r-title { + color: #9f3a38; + } + + .r-content { + /deep/.el-input__inner { + color: #9f3a38; + background: #fff6f6; + border-color: #e0b4b4; + + &::placeholder { + color: #e0b4b4; + } + } + } + } + .r-content { flex: 1;