SanHQin 2 weeks ago
parent
commit
d8c51553e2

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.a103d44c37c4e3414f19d247db172f8e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.dba9b343c4b2e55012e5.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.a74cd3f91072fcbf8705e6308ae4e142.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.2d1ab9512ed9294b517c.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.a74cd3f91072fcbf8705e6308ae4e142.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.a74cd3f91072fcbf8705e6308ae4e142.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.2d1ab9512ed9294b517c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.2d1ab9512ed9294b517c.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 108 - 33
src/components/pages/appStore/views/appManagement.vue

@@ -1020,13 +1020,20 @@ export default {
             .get(`https://appapi.cocorobo.cn/api/agents/muti_agent/${id}`)
             .then(async res => {
               let _data = res.data;
+
+              let _modes = 'wu';
+
+              if(item.json.modes){
+                _modes = item.json.modes[0];
+              }
+
               console.log(_data);
               let _idList = [];
-              if (_data["dialoguePublishDataId"])
+              if (_data["dialoguePublishDataId"] && (_modes=='wu' || _modes == '0'))
                 _idList.push(_data["dialoguePublishDataId"]);
-              if (_data["immersivePublishDataId"])
+              if (_data["immersivePublishDataId"] && (_modes=='wu' || _modes == '2'))
                 _idList.push(_data["immersivePublishDataId"]);
-              if (_data["cardPublishDataId"])
+              if (_data["cardPublishDataId"] && (_modes=='wu' || _modes == '1'))
                 _idList.push(_data["cardPublishDataId"]);
               if (_idList.length <= 0) {
                 resolve(3);
@@ -1362,35 +1369,101 @@ export default {
           type: "warning"
         }
       )
-        .then(() => {
-          let params = [
-            {
-              uid: this.userId,
-              aid: item.id
-            }
-          ];
-          this.ajax
-            .post(this.$store.state.api + "delete_appStore", params)
-            .then(res => {
-              if (res.data) {
-                this.$message.success("取消发布成功");
-                this.getData();
-              } else {
-                this.$message.error("取消发布失败");
-              }
-              if (this.collect.findIndex(i => i.id == item.id) != -1) {
-                this.getCollect();
-              }
-            })
-            .catch(err => {
-              console.log(err);
-              this.$message.error("取消发布失败");
-            });
+        .then(async() => {
+          console.log(item.json)
+          let status = await this.delAgentOrWorkflow(item);
+
+          if(status==0){
+            this.$message.success("取消发布成功");
+            this.getData();
+          }else if(status==1){
+            this.$message.error("取消发布失败");
+            this.getData();
+          }else if(status==2){
+  let params = [
+           {
+             uid: this.userId,
+             aid: item.id
+           }
+         ];
+         this.ajax
+           .post(this.$store.state.api + "delete_appStore", params)
+           .then(res => {
+             if (res.data) {
+               this.$message.success("取消发布成功");
+               this.getData();
+             } else {
+               this.$message.error("取消发布失败");
+             }
+             if (this.collect.findIndex(i => i.id == item.id) != -1) {
+               this.getCollect();
+             }
+           })
+           .catch(err => {
+             console.log(err);
+             this.$message.error("取消发布失败");
+           });
+          }
+
         })
         .catch(() => {
           console.log("取消发布失败");
         });
     },
+    async delAgentOrWorkflow(item){
+      return new Promise(async resolve => {
+        let url = item.url;
+        let id =
+          this.queryURLParams(url, "id") ||
+          item.url.split("/")[item.url.split("/").length - 1];
+        if (!id) {
+          console.log("该链接无对应id");
+          return resolve(3);
+          // return this.$message.error("复制失败,未找到对应id")
+        }
+        if (item.label == "workflow") {
+          //复制工作流
+          if(item.json.modes){
+            let params = {
+              status:0,
+              modes:item.json.modes
+            }
+            this.ajax.post(`https://appapi.cocorobo.cn/api/agents/cancelPublishMutiAgent/${id}`,params).then(res=>{
+              let _msg = res.data.message;
+              if(_msg="MutiAgent unpublished successfully"){
+                resolve(0)
+              }else{
+                resolve(1)
+              }
+            }).catch(e=>{
+              console.log(e);
+              resolve(1)
+            })
+          }else{
+            resolve(2);
+          }
+
+        } else if (item.label == "agent") {
+          //复制智能体
+          let params = {
+            status: 0,
+            modes: ["0"]
+          }
+          this.ajax.post(`https://appapi.cocorobo.cn/api/agents/cancelPublishAgent/${id}`,params).then(res=>{
+            let _msg = res.data.message;
+            if(_msg=='Agent unpublished successfully'){
+              resolve(0)
+            }else{
+              resolve(1)
+            }
+          }).catch(e=>{
+            console.log(e);
+            resolve(1)
+          })
+
+        }
+      });
+    },
     changeShowPage(newPage) {
       this.$emit("changeShowCard", newPage);
     },
@@ -1772,7 +1845,7 @@ export default {
 }
 
 .ac_h_b_typeList > span {
-  font-size: 18px;
+  font-size: 16px;
   margin-right: 30px;
   margin-top: 10px;
   margin-bottom: 5px;
@@ -1957,7 +2030,7 @@ export default {
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
-  font-size: 22px;
+  font-size: 18px;
 }
 
 .ac_c_i_t_popover {
@@ -2031,7 +2104,7 @@ export default {
   max-width: calc(100% - 80px);
   white-space: nowrap;
   overflow: hidden;
-  font-size: 18px;
+  font-size: 14px;
   color: #00000066;
   text-overflow: ellipsis;
 }
@@ -2042,7 +2115,7 @@ export default {
   display: flex;
   align-items: center;
   justify-content: center;
-  font-size: 16px;
+  font-size: 14px;
   background-color: #f3f3f3;
   color: #00000066;
   border-radius: 3px;
@@ -2066,6 +2139,7 @@ export default {
   -webkit-line-clamp: 4;
   overflow: hidden;
   text-overflow: ellipsis;
+  font-size: 14px;
 }
 
 .ac_c_i_bottom {
@@ -2076,7 +2150,7 @@ export default {
   display: flex;
   align-items: center;
   justify-content: space-between;
-  cursor:pointer;
+  cursor: pointer;
 }
 
 .ac_c_i_b_left {
@@ -2115,11 +2189,12 @@ export default {
 
 .ac_c_i_b_right > span {
   width: 60px;
-  height: 100%;
+  height: 80%;
   border-radius: 4px;
   display: flex;
   justify-content: center;
   align-items: center;
+  font-size: 14px;
 }
 
 .ac_c_i_b_r_type1 {

Some files were not shown because too many files changed in this diff