zhangzengfei
2022-07-20 4a800a8fc83c6bd1f86a8e847b079a51a7532c09
src/pages/ai/index/App.vue
@@ -26,7 +26,8 @@
                <span class="icon iconfont all-scene">&#xe703;</span>
                <el-input
                  placeholder="搜索"
                  v-model="input3"
                  v-model="inputText"
                  @change="searchAll"
                  class="input-with-select"
                >
                  <i class="el-icon-search" slot="prepend"></i>
@@ -84,7 +85,12 @@
                    <img v-else :src="item.icon" alt />
                  </div>
                  <div class="desc">
                    <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    <el-tooltip
                      :content="item.sdk_name || item.name"
                      effect="light"
                    >
                      <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    </el-tooltip>
                    <div class="desc-2">版本 {{ item.version }}</div>
                  </div>
                  <div class="right-icon">
@@ -164,7 +170,12 @@
                    <img v-else :src="item.icon" alt />
                  </div>
                  <div class="desc">
                    <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    <el-tooltip
                      :content="item.sdk_name || item.name"
                      effect="light"
                    >
                      <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    </el-tooltip>
                    <div class="desc-2">版本 {{ item.version }}</div>
                  </div>
                  <div class="right-btn">
@@ -300,7 +311,12 @@
                    <img v-else :src="item.icon" alt />
                  </div>
                  <div class="desc">
                    <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    <el-tooltip
                      :content="item.sdk_name || item.name"
                      effect="light"
                    >
                      <div class="desc-1">{{ item.sdk_name || item.name }}</div>
                    </el-tooltip>
                    <div class="desc-2">版本 {{ item.version }}</div>
                  </div>
                  <div class="right-btn">
@@ -350,7 +366,7 @@
                  tip
                  :sourceType="3"
                  :isDrag="true"
                  :attrs="{accept:'.zip,.tar,.gz,.tar.gz'}"
                  :attrs="{ accept: '.zip,.tar,.gz,.tar.gz' }"
                  tipWords="点击上传"
                  uploadPlaceholder="算法软件"
                  url="/data/api-v/sdk/upload"
@@ -500,7 +516,7 @@
      isSDKDialog: true,
      actType: "",
      actId: "",
      input3: "",
      inputText: "",
      tempList: [],
      select: "",
      activedSdkOrApp: {
@@ -553,6 +569,12 @@
    this.autoRefresh = false;
  },
  methods: {
    searchAll() {
      this.getAllApps();
      this.getAllSdk();
      this.getUnActivedList(1);
      this.getUnActivedAppList();
    },
    goback() {
      this.inDetail = false;
    },
@@ -674,7 +696,7 @@
        })
        .catch((e) => {
          this.isInstall = false;
          this.$message.error(e.data);
          this.$message.error(e.msg);
        });
    },
    downloadApp(app, action) {
@@ -709,7 +731,7 @@
      let iArry = [];
      let sArry = [];
      let nArry = [];
      let rsp = await getApps();
      let rsp = await getApps({ appName: this.inputText });
      if (rsp && rsp.success) {
        // 遍历app的过程重置
        this.appUpgreading = false;
@@ -773,7 +795,7 @@
      };
    },
    getUnActivedList(v) {
      getUnActivedSdk().then((res) => {
      getUnActivedSdk({ sdkName: this.inputText }).then((res) => {
        if (res.code == 200) {
          this.unActivedSDKList = res.data;
          const len = this.unActivedSDKList.length;
@@ -796,7 +818,7 @@
      });
    },
    getUnActivedAppList() {
      getUnActivedApp().then((res) => {
      getUnActivedApp({ appName: this.inputText }).then((res) => {
        if (res.code == 200) {
          this.unActivedAppList = res.data;
          this.pickTab();
@@ -823,9 +845,7 @@
              _this.$notify.error(res.data.failMsg.failMsg);
            }
          })
          .catch((e) => {
            console.log(e);
          });
          .catch((e) => {});
      } else if (this.activeTab == "app") {
        //激活应用
        actApp(item.id, "")
@@ -841,9 +861,7 @@
              _this.$notify.error(res.data.failMsg.failMsg);
            }
          })
          .catch((e) => {
            console.log(e);
          });
          .catch((e) => {});
      }
    },
    onFileUpload(file) {
@@ -888,7 +906,7 @@
      let installedList = [];
      let unInstalledList = [];
      let hasNewVersionList = [];
      let res = await findAllSdk();
      let res = await findAllSdk({ sdkName: this.inputText });
      if (res && res.success) {
        this.sdkUpgreading = false;
@@ -982,6 +1000,7 @@
<style lang="scss">
.s-task-manage {
  width: 100% !important;
  min-width: 754px !important;
  height: 100%;
  box-sizing: border-box;
  text-align: left;
@@ -1558,5 +1577,14 @@
    }
  }
}
@media screen and (max-width: 800px) {
  .quick-path .left-items .quick-item:last-child {
    display: none !important;
  }
  .quick-path .left-items .quick-item:nth-child(2) {
    border: none !important;
  }
}
</style>