Browse Source

算法发布

wangyi 3 years ago
parent
commit
b06f4aa9cd

+ 1 - 1
config/index.js

@@ -10,7 +10,7 @@ module.exports = {
 
     // Paths
     assetsSubDirectory: 'static',
-    assetsPublicPath: './',
+    assetsPublicPath: '/',
     // 代理列表, 是否开启代理通过[./dev.env.js]配置
     proxyTable: devEnv.OPEN_PROXY === false ? {} : {
       '/proxyApi': {

+ 30 - 4
src/views/modules/alg/alg-publish.vue

@@ -61,7 +61,7 @@
     </el-form>
     <span slot="footer" class="dialog-footer">
       <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary" @click="visible = false,algPublish()">确定</el-button>
+      <el-button type="primary" @click="algPublish()">确定</el-button>
     </span>
   </el-dialog>
 </template>
@@ -138,8 +138,34 @@ export default {
         });
     },
     algPublish(){
-        this.visible=false
-        MessageBox.confirm(`是否发布该算法?`, '提示', {
+      let formData=new FormData();
+        formData.append("missName",this.dataForm.missName);
+        formData.append("categoryId",this.dataForm.categoryId);
+        formData.append("uid",this.$store.state.user.id);
+        formData.append("algorithmTrainingId",this.dataForm.id);
+        formData.append("models",this.modelSelected);
+        formData.append("pythonFiles",this.pythonFileSelected);
+        formData.append("appFile",this.appFileSelected);
+        formData.append("imageFile",this.imageFileSelected);
+        this.$http({
+                url:this.$http.adornUrl('/algstrain/algorithmPublish'),
+                method:'post',
+                data:formData,
+            }).then(({data})=>{
+              if(data&&data.code===0){
+                Message({
+                    type: 'success',
+                    message: '申请发布成功',
+                });
+                this.visible=false;
+              }else{
+                Message.error(data.msg);
+              }
+
+                this.$parent.getDataList();
+        });
+        
+        /* MessageBox.confirm(`是否发布该算法?`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
@@ -169,7 +195,7 @@ export default {
 
                 this.$parent.getDataList();
         });
-      }).catch(() => {})
+      }).catch(() => {}) */
 
         
 

+ 1 - 1
static/config/index-prod.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {};
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'http://localhost:8082/renren-fast';
+  window.SITE_CONFIG['baseUrl'] = 'http://150.158.138.99:8082/renren-fast';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名

+ 1 - 1
static/config/index-qa.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {};
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'http://localhost:8082/renren-fast';
+  window.SITE_CONFIG['baseUrl'] = 'http://150.158.138.99:8082/renren-fast';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名

+ 1 - 1
static/config/index-uat.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {};
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'http://localhost:8082/renren-fast';
+  window.SITE_CONFIG['baseUrl'] = 'http://150.158.138.99:8082/renren-fast';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名

+ 1 - 1
static/config/index.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {};
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'http://localhost:8082/renren-fast';
+  window.SITE_CONFIG['baseUrl'] = 'http://150.158.138.99:8082/renren-fast';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名