| | |
| | | <div class="algCard" v-for="(item, index) in payAlg" :key="index"> |
| | | <img :src="item.logoUrl" alt="" draggable="false" /> |
| | | <div class="name">{{ item.productName }}</div> |
| | | <span class="button pay">购买</span> |
| | | <span class="button pay" @click="toDetail(item.productName)" |
| | | >购买</span |
| | | > |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="label freeLabel"> |
| | | 免费算法 <span class="des">从此处拖拽算法图标安装到设备</span> |
| | | </div> |
| | | <div class="freeList"> |
| | | <div class="freeList scroll"> |
| | | <div |
| | | class="algCard" |
| | | v-for="(item, index) in freeAlg" |
| | |
| | | @dragstart="dragStart(item)" |
| | | /> |
| | | <div class="name">{{ item.productName }}</div> |
| | | <span class="button detail">查看详情</span> |
| | | <span class="button detail" @click="toDetail(item.productName)" |
| | | >查看详情</span |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | > |
| | | <img src="/images/hashrate/算法管理空页面.png" alt="" /> |
| | | <div class="des"> |
| | | 暂未安装算法,从左侧算法中心拖到算法到此处,即可安装 |
| | | 暂未安装算法,从左侧算法中心算法到此处,即可安装 |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | console.log(item); |
| | | } |
| | | |
| | | item.logoUrl = "/httpImage/" + item.logoUrl; |
| | | if ( |
| | | item.logoUrl.indexOf("http://apps.smartai.com/httpImage/") === -1 |
| | | ) { |
| | | item.logoUrl = "/httpImage/" + item.logoUrl; |
| | | } |
| | | |
| | | if (item.priceBase === 0) { |
| | | this.freeAlg.push(item); |
| | | } else { |
| | |
| | | async getEquipment() { |
| | | const res = await findAllSdk(); |
| | | if (res && res.success) { |
| | | this.equipmentArr = res.data; |
| | | this.equipmentArr = []; |
| | | res.data.forEach((item, index) => { |
| | | if (item.sdkList) { |
| | | this.equipmentArr.push(item); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | //拖拽开始 |
| | |
| | | sdk_name: this.dragAlg.productName, |
| | | }); |
| | | |
| | | const res = await downloadOrUpgrade({ |
| | | nodeId: devId, |
| | | path: this.dragAlg.productBaseId, |
| | | userId: JSON.parse(sessionStorage.getItem("userInfo")).id, |
| | | }); |
| | | if (res && res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "操作成功,请稍后", |
| | | try { |
| | | const res = await downloadOrUpgrade({ |
| | | nodeId: devId, |
| | | path: this.dragAlg.productBaseId, |
| | | userId: JSON.parse(sessionStorage.getItem("userInfo")).id, |
| | | inputText: this.dragAlg.productName, |
| | | }); |
| | | if (res && res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "操作成功,请稍后", |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | algArr.pop(); |
| | | } |
| | | |
| | | this.dragAlg = null; |
| | |
| | | if (res && res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "操作成功", |
| | | message: res.msg, |
| | | }); |
| | | } |
| | | }, |
| | | toDetail(productName) { |
| | | this.$router.push({ |
| | | path: "/productDetail", |
| | | query: { |
| | | name: productName, |
| | | }, |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |