Browse Source

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

lsc 7 months ago
parent
commit
18dd82139d

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.1e616562acb93da135a3ef498ae346a5.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.de15001ce66f032e9274.js></script><script type=text/javascript src=./static/js/app.7a93c10c245f05df64a7.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.41fdbf1778d520db6eb0491624eff94b.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.de15001ce66f032e9274.js></script><script type=text/javascript src=./static/js/app.de4a5c861ba1cf40378b.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.41fdbf1778d520db6eb0491624eff94b.css


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


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


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


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


File diff suppressed because it is too large
+ 1 - 0
src/assets/icon/appStore/agent.svg


+ 3 - 0
src/assets/icon/appStore/collect_active.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M8 2L10.0086 5.95016L14.5 6.58359L11.25 9.65836L12.0172 14L8 11.9502L3.98278 14L4.75 9.65836L1.5 6.58359L5.99139 5.95016L8 2Z" fill="#FFD324"/>
+</svg>

+ 3 - 0
src/assets/icon/appStore/collect_default.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 1.5C8.1894 1.5 8.36253 1.61128 8.44723 1.78745L10.3276 5.69853L14.062 6.18401C14.2515 6.20865 14.411 6.34338 14.4729 6.53124C14.5349 6.71909 14.4886 6.92726 14.3536 7.06769L11.5537 9.9795L12.4851 13.8539C12.5302 14.0413 12.4715 14.2393 12.3329 14.368C12.1942 14.4967 11.9984 14.5347 11.8245 14.4669L8.00001 12.9754L4.17558 14.4669C4.0016 14.5347 3.80578 14.4967 3.66714 14.368C3.52849 14.2393 3.46988 14.0413 3.51494 13.8539L4.44628 9.9795L1.64646 7.06769C1.51143 6.92726 1.4651 6.71909 1.52708 6.53124C1.58905 6.34338 1.7485 6.20865 1.938 6.18401L5.67247 5.69853L7.5528 1.78745C7.6375 1.61128 7.81063 1.5 8.00001 1.5ZM8.00001 3.18275L6.44723 6.41255C6.37246 6.56806 6.22792 6.67442 6.06203 6.69598L3.07646 7.08411L5.35357 9.4523C5.47776 9.58146 5.52768 9.76891 5.48509 9.94611L4.71603 13.1454L7.82445 11.9331C7.93764 11.889 8.06238 11.889 8.17558 11.9331L11.284 13.1454L10.5149 9.94611C10.4723 9.76891 10.5223 9.58146 10.6465 9.4523L12.9236 7.08411L9.938 6.69598C9.77211 6.67442 9.62756 6.56806 9.5528 6.41255L8.00001 3.18275Z" fill="black" fill-opacity="0.6"/>
+</svg>

+ 3 - 0
src/assets/icon/appStore/praise_active.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+  <path d="M10 6H13.2192C13.8698 6 14.3472 6.61139 14.1894 7.24254L12.6894 13.2425C12.5781 13.6877 12.1781 14 11.7192 14H3C2.44772 14 2 13.5523 2 13V8C2 7.44772 2.44772 7 3 7H5L7 2H9C9.55228 2 10 2.44772 10 3V6ZM6 7H9V13H6Z" fill="#FFD324" fill-rule="nonzero"/>
+</svg>

+ 3 - 0
src/assets/icon/appStore/praise_default.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10 6H13.2192C13.8698 6 14.3472 6.61139 14.1894 7.24254L12.6894 13.2425C12.5781 13.6877 12.1781 14 11.7192 14H3C2.44772 14 2 13.5523 2 13V8C2 7.44772 2.44772 7 3 7H5L7 2H9C9.55228 2 10 2.44772 10 3V6ZM6 7.19258V13H11.7192L13.2192 7H9V3H7.67703L6 7.19258ZM5 8H3V13H5V8Z" fill="black" fill-opacity="0.6"/>
+</svg>

File diff suppressed because it is too large
+ 1 - 0
src/assets/icon/appStore/user_copy.svg


+ 4 - 0
src/assets/icon/appStore/workflow.svg

@@ -0,0 +1,4 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5 2.5C5 2.22386 5.22386 2 5.5 2H13.5C13.7761 2 14 2.22386 14 2.5V4.5C14 4.77614 13.7761 5 13.5 5H5.5C5.22386 5 5 4.77614 5 4.5V4H3V7H5.5C5.77614 7 6 7.22386 6 7.5C6 7.77614 5.77614 8 5.5 8H2.5C2.22386 8 2 7.77614 2 7.5V3.5C2 3.22386 2.22386 3 2.5 3H5V2.5ZM6 4H13V3H6V4ZM10 8.5C10 8.22386 10.2239 8 10.5 8H13.5C13.7761 8 14 8.22386 14 8.5V12.5C14 12.7761 13.7761 13 13.5 13H11V13.5C11 13.7761 10.7761 14 10.5 14H4.5C4.22386 14 4 13.7761 4 13.5V11.5C4 11.2239 4.22386 11 4.5 11H10.5C10.7761 11 11 11.2239 11 11.5V12H13V9H10.5C10.2239 9 10 8.77614 10 8.5ZM10 12H5V13H10V12Z" fill="black" fill-opacity="0.4"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M7.3 6.1C7.14849 5.98637 6.94579 5.96809 6.77639 6.05279C6.607 6.13749 6.5 6.31062 6.5 6.5V9.5C6.5 9.68939 6.607 9.86252 6.77639 9.94722C6.94579 10.0319 7.14849 10.0136 7.3 9.9L9.3 8.4C9.4259 8.30558 9.5 8.15738 9.5 8C9.5 7.84262 9.4259 7.69443 9.3 7.6L7.3 6.1Z" fill="#0354D7"/>
+</svg>

+ 0 - 0
src/components/pages/appStore/dialog/saveCard.vue → src/components/pages/appStore/components/saveCard.vue


+ 306 - 0
src/components/pages/appStore/dialog/selectAppDialog.vue

@@ -0,0 +1,306 @@
+<template>
+  <div>
+    <el-dialog
+      :center="true"
+      :visible.sync="show"
+      :close-on-click-modal="false"
+      width="500px"
+      class="addNewAppDialog"
+    >
+      <div class="a-d-top">
+        <div class="a-d-topTit">
+          <div>选择应用</div>
+        </div>
+        <div class="a-d-t-right">
+          <span @click="close()">×</span>
+        </div>
+      </div>
+      <div class="box" v-loading="loading">
+        <div class="b_search">
+          <el-input
+              v-model="search"
+              style="margin-right: 10px;"
+              placeholder="请输入应用名称"
+              @keyup.enter.native="getData"
+              clearable
+            />
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              @click="getData"
+            ></el-button>
+        </div>
+
+        <div class="b_list">
+          <div class="b_l_item" v-for="item in dataList" :key="item.id" @click="choseItem(item)">
+            <div class="b_l_i_icon">
+              <img v-if="item.json.icon" :src="item.json.icon" />
+              <svg
+                v-else
+                t="1732605901531"
+                class="icon"
+                viewBox="0 0 1024 1024"
+                version="1.1"
+                xmlns="http://www.w3.org/2000/svg"
+                p-id="4275"
+                width="200"
+                height="200"
+              >
+                <path
+                  d="M179.2 153.6a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V204.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V204.8a153.6 153.6 0 0 1 153.6-153.6z m0 614.4a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V716.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V716.8a153.6 153.6 0 0 1 153.6-153.6z m611.84-403.4048a51.2 51.2 0 0 0-72.3968 0L646.144 232.2432a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968L791.04 159.744z m72.3968-72.3968l72.3968 72.3968a153.6 153.6 0 0 1 0 217.2416l-72.3968 72.3968a153.6 153.6 0 0 1-217.2416 0l-72.3968-72.3968a153.6 153.6 0 0 1 0-217.2416l72.3968-72.3968a153.6 153.6 0 0 1 217.2416 0zM699.7504 896a51.2 51.2 0 0 1 0 102.4A162.1504 162.1504 0 0 1 537.6 836.2496v-110.8992A162.1504 162.1504 0 0 1 699.7504 563.2h110.8992a162.1504 162.1504 0 0 1 162.1504 162.1504v8.448a51.2 51.2 0 0 1-102.4 0v-8.448c0-33.024-26.7264-59.7504-59.7504-59.7504h-110.8992c-33.024 0-59.7504 26.7264-59.7504 59.7504v110.8992c0 33.024 26.7264 59.7504 59.7504 59.7504z"
+                  fill="#2C6DD2"
+                  p-id="4276"
+                ></path>
+                <path
+                  d="M791.4496 160a51.2 51.2 0 0 0-72.3968 0l-72.448 72.3968a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968l-72.3968-72.3968z"
+                  fill="#20C997"
+                  p-id="4277"
+                ></path>
+              </svg>
+            </div>
+            <div class="b_l_i_message">
+              <div>{{ item.name }}</div>
+              <span>{{ item.detail }}</span>
+            </div>
+          </div>
+        </div>
+
+      </div>
+      <div class="box_bottom">
+        <el-button @click="close()">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+
+  },
+  data() {
+    return {
+      loading: false,
+      show: false,
+      search:'',
+      userId: this.$route.query["userid"],
+      org: this.$route.query["org"],
+      oid: this.$route.query["oid"],
+      dataList:[],
+    };
+  },
+  methods: {
+    open(data) {
+      this.dataList = [];
+      this.loading = false;
+      this.getData();
+      this.show = true;
+    },
+    close(flag = false) {
+      this.show = false;
+      this.init();
+    },
+    init() {
+
+      this.loading = false;
+      this.dataList = [];
+    },
+    getData() {
+      this.loading = true;
+      let params = {
+        uid: this.userId, //用户ID
+        name: this.search, //应用名称搜索
+        label: "", //应用的标签搜索
+        type: "", //应用的类型
+        juri: 1, //应用权限 1:我的  2:组织内  3:所有人
+        stand: "cn" //cn站还是hk站
+      };
+
+      this.ajax
+        .get(this.$store.state.api + "select_appStore", params)
+        .then(res => {
+          let _data = res.data[0];
+          if (_data.length > 0) {
+            _data.forEach(i => {
+              if (i.json) {
+                i.json = JSON.parse(i.json);
+              }
+            });
+            this.dataList = _data;
+          } else {
+            this.dataList = [];
+          }
+          this.loading = false;
+        })
+        .catch(err => {
+          this.loading = false;
+          console.log(err);
+          this.$message.error("获取应用失败");
+        });
+    },
+    choseItem(item){
+      this.$emit("success",item)
+    }
+  }
+};
+</script>
+
+<style scoped>
+.addNewAppDialog >>> .el-dialog {
+  min-width: 500px;
+
+  height: 700px;
+	/* height: 780px; */
+  box-shadow: 0px 0 8px 0px #555555;
+  border-radius: 8px;
+  background-color: #fff;
+  /* top: 0px; */
+  /* margin: 0 auto; */
+  overflow: hidden;
+}
+.addNewAppDialog >>> .el-dialog__body {
+  height: 100%;
+  min-width: 500px;
+  flex-shrink: 0;
+  box-sizing: border-box;
+  padding-bottom: 50px;
+  padding-top: 10px;
+}
+.addNewAppDialog >>> .el-dialog__header {
+  display: none !important;
+}
+
+.a-d-top {
+  /* background: #adadad; */
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  justify-content: space-between;
+  height: 54px;
+  border-radius: 8px 8px 0 0;
+  user-select: none;
+  border-bottom: 1px #ccc solid;
+}
+.a-d-top >>> .el-input__inner {
+  width: 320px;
+  height: 32px;
+}
+.a-d-top >>> .el-input__icon {
+  line-height: 32px;
+}
+
+.a-d-topTit {
+  /* width: 171px; */
+  /* margin-left: 20px; */
+  height: 32px;
+  display: flex;
+  font-weight: bold;
+  font-size: 20px;
+  align-items: center;
+  font-family: PingFang SC;
+  box-sizing: border-box;
+  padding: 5px;
+  line-height: 22px;
+  justify-content: center;
+  /* text-align: left; */
+}
+
+.a-d-t-right > span {
+  font-size: 18px;
+  font-weight: bold;
+  cursor: pointer;
+}
+
+.box{
+  width: 100%;
+  height: calc(100% - 60px - 20px);
+  display: flex;
+  flex-direction: column;
+}
+
+.box_bottom{
+  width: 100%;
+  height: 60px;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.b_search{
+  display: flex;
+  height: 40px;
+  margin-top: 10px;
+}
+
+.b_list{
+  width: 100%;
+  height: calc(100% - 40px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px 0 10px 0;
+}
+
+.b_l_item{
+  width: 100%;
+  height: 100px;
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+  background-color: #fff;
+  transition: .2s;
+  border-radius: 4px;
+  cursor: pointer;
+}
+
+.b_l_item:hover{
+  background-color: #f2f4f7;
+}
+
+.b_l_item:hover .b_l_i_message>div{
+  color: #0354D7;
+}
+
+.b_l_i_icon{
+  width: 80px;
+  height: 80px;
+  margin-left: 10px;
+  box-sizing: border-box;
+  padding: 5px;
+  margin-right: 10px;
+}
+
+.b_l_i_icon>img{
+  width: 100%;
+  height: 100%;
+}
+
+.b_l_i_icon>svg{
+  width: 100%;
+  height: 100%;
+}
+
+.b_l_i_message{
+  width: calc(100% - 100px);
+  height: 80px;
+  box-sizing: border-box;
+  padding: 10px 0;
+}
+
+.b_l_i_message>div{
+  transition: .2s;
+  font-size: 1.4em;
+  color: #000;
+  /* font-weight: bold; */
+}
+
+.b_l_i_message>span{
+  font-size: 1.2em;
+  margin-top: 15px;
+  display: block;
+  max-width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+</style>

+ 566 - 80
src/components/pages/appStore/views/appManagement.vue

@@ -1,13 +1,19 @@
 <template>
   <div class="appManagement">
     <div class="ac_left">
-      <saveCard title="最近使用" :data="recentUse" :type="1" @saveClick="openApp"/>
-      <saveCard title="收藏" :data="collect" :type="0" @saveClick="openApp"/>
+      <saveCard
+        title="最近使用"
+        :data="recentUse"
+        :type="1"
+        @saveClick="openApp"
+      />
+      <saveCard title="收藏" :data="collect" :type="0" @saveClick="openApp" />
     </div>
     <div class="ac_right">
       <div class="ac_header">
         <div class="ac_h_top">
-          <span class="ac_h_t_active"> <!-- class="ac_h_t_active"-->
+          <span class="ac_h_t_active">
+            <!-- class="ac_h_t_active"-->
             <svg
               width="20"
               height="20"
@@ -45,20 +51,18 @@
             </svg>
             工作空间</span
           >
-          <!-- <el-button
+          <el-button
             type="primary"
             size="small"
             icon="el-icon-plus"
+            v-show="false"
             style="position: absolute;right: 15px;"
             @click="addApp"
             >添加应用</el-button
-          > -->
+          >
         </div>
         <div class="ac_h_banner" v-if="bannerObj">
-          <img
-            :src="bannerObj.poster"
-            alt="banner图"
-          />
+          <img :src="bannerObj.poster" alt="banner图" />
         </div>
         <div class="ac_h_bottom">
           <div class="ac_h_b_typeList">
@@ -76,12 +80,11 @@
             >
           </div>
           <div class="ac_h_b_selectList">
-
             <el-select
               v-model="selectJuri"
-              placeholder="请选择"
+              placeholder="请选择显示范围"
               @change="changeSelectType"
-							style="width: 150px;margin-right: 10px;"
+              style="width: 150px;margin-right: 10px;"
             >
               <el-option
                 v-for="item in selectList"
@@ -90,19 +93,31 @@
                 :value="item.index"
               ></el-option>
             </el-select>
-						<el-input
+            <el-select
+              v-model="selectLabel"
+              placeholder="请选择类型"
+              @change="changeSelectType"
+              style="width: 120px;margin-right: 10px;"
+            >
+              <el-option
+                v-for="item in labelSelect"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+            <el-input
               v-model="searchText"
               style="width: 200px;"
               placeholder="请输入应用名称"
               @keyup.enter.native="getData"
-							clearable
+              clearable
             />
             <el-button
               type="primary"
               style="margin-left: 10px;"
               icon="el-icon-search"
               @click="getData"
-              clearable
             ></el-button>
             <!-- <el-button type="primary" @click="releaseApp()">发布应用</el-button> -->
           </div>
@@ -110,7 +125,150 @@
       </div>
 
       <div class="ac_content">
-        <div
+        <div class="ac_c_item" v-for="(item, index) in dataList" :key="item.id">
+          <div class="ac_c_i_top">
+            <div class="ac_c_i_t_left">
+              <img v-if="item.json.icon" :src="item.json.icon" />
+              <svg
+                v-else
+                t="1732605901531"
+                class="icon"
+                viewBox="0 0 1024 1024"
+                version="1.1"
+                xmlns="http://www.w3.org/2000/svg"
+                p-id="4275"
+                width="200"
+                height="200"
+              >
+                <path
+                  d="M179.2 153.6a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V204.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V204.8a153.6 153.6 0 0 1 153.6-153.6z m0 614.4a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V716.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V716.8a153.6 153.6 0 0 1 153.6-153.6z m611.84-403.4048a51.2 51.2 0 0 0-72.3968 0L646.144 232.2432a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968L791.04 159.744z m72.3968-72.3968l72.3968 72.3968a153.6 153.6 0 0 1 0 217.2416l-72.3968 72.3968a153.6 153.6 0 0 1-217.2416 0l-72.3968-72.3968a153.6 153.6 0 0 1 0-217.2416l72.3968-72.3968a153.6 153.6 0 0 1 217.2416 0zM699.7504 896a51.2 51.2 0 0 1 0 102.4A162.1504 162.1504 0 0 1 537.6 836.2496v-110.8992A162.1504 162.1504 0 0 1 699.7504 563.2h110.8992a162.1504 162.1504 0 0 1 162.1504 162.1504v8.448a51.2 51.2 0 0 1-102.4 0v-8.448c0-33.024-26.7264-59.7504-59.7504-59.7504h-110.8992c-33.024 0-59.7504 26.7264-59.7504 59.7504v110.8992c0 33.024 26.7264 59.7504 59.7504 59.7504z"
+                  fill="#2C6DD2"
+                  p-id="4276"
+                ></path>
+                <path
+                  d="M791.4496 160a51.2 51.2 0 0 0-72.3968 0l-72.448 72.3968a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968l-72.3968-72.3968z"
+                  fill="#20C997"
+                  p-id="4277"
+                ></path>
+              </svg>
+            </div>
+            <div class="ac_c_i_t_right">
+              <div class="ac_c_i_t_r_top">
+                <span>{{ item.name }}</span>
+                <div class="ac_c_i_t_popover">
+                  <div
+                    class="ac_c_i_t_p_box"
+                    v-if="editAppCard === item.id"
+                    v-click-outside="handleBlur"
+                  >
+                    <div
+                      @click.stop="copyApp(item)"
+                      v-if="item.json && item.json.copy === '1'"
+                    >
+                      复制
+                    </div>
+                    <div
+                      @click.stop="updateApp(item)"
+                      v-if="item.userid === userId"
+                    >
+                      修改
+                    </div>
+                    <div
+                      @click.stop="delApp(item)"
+                      v-if="item.userid === userId"
+                    >
+                      删除
+                    </div>
+                  </div>
+                  <svg
+                    t="1732786015570"
+                    @click.stop="updateCard(item.id)"
+                    class="icon"
+                    viewBox="0 0 1024 1024"
+                    version="1.1"
+                    xmlns="http://www.w3.org/2000/svg"
+                    p-id="9199"
+                    width="200"
+                    height="200"
+                  >
+                    <path
+                      d="M192 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-29.866667-68.266667-68.266667-68.266667zM512 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-29.866667-68.266667-68.266667-68.266667zM832 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-34.133333-68.266667-68.266667-68.266667z"
+                      fill="#111111"
+                      p-id="9200"
+                    ></path>
+                  </svg>
+                </div>
+              </div>
+              <div class="ac_c_i_t_r_center">
+                <span>@{{ item.username }}</span>
+                <div v-if="item.label === 'workflow'">
+                  <img
+                    src="../../../../assets/icon/appStore/workflow.svg"
+                    alt=""
+                  />
+                  工作流
+                </div>
+                <div v-if="item.label === 'agent'">
+                  <img
+                    src="../../../../assets/icon/appStore/agent.svg"
+                    alt=""
+                  />
+                  智能体
+                </div>
+              </div>
+              <div class="ac_c_i_t_r_bottom">
+                {{ item.detail }}
+              </div>
+            </div>
+          </div>
+          <div class="ac_c_i_bottom">
+            <div class="ac_c_i_b_left">
+              <div>
+                <img src="../../../../assets/icon/appStore/user_copy.svg" />
+                <span>{{ item.copyCount }}</span>
+              </div>
+              <div>
+                <img
+                  src="../../../../assets/icon/appStore/praise_default.svg"
+                  v-if="!item.likeId"
+                  style="cursor: pointer;"
+                  @click="praiseFn(item, 0)"
+                />
+                <img
+                  src="../../../../assets/icon/appStore/praise_active.svg"
+                  v-else
+                  style="cursor: pointer;"
+                  @click="praiseFn(item, 1)"
+                />
+                <span>{{ item.likeCount }}</span>
+              </div>
+              <div>
+                <img
+                  src="../../../../assets/icon/appStore/collect_default.svg"
+                  v-if="!item.collectId"
+                  style="cursor: pointer;"
+                  @click="collectFn(item, 0)"
+                />
+                <img
+                  src="../../../../assets/icon/appStore/collect_active.svg"
+                  v-else
+                  style="cursor: pointer;"
+                  @click="collectFn(item, 1)"
+                />
+                <span>{{ item.collectCount }}</span>
+              </div>
+            </div>
+            <div class="ac_c_i_b_right" v-if="item.json.status">
+              <span class="ac_c_i_b_r_type2" v-if="item.json.status === '0'"
+                >测试</span
+              >
+              <span class="ac_c_i_b_r_type1" v-if="item.json.status === '1'"
+                >稳定</span
+              >
+            </div>
+          </div>
+        </div>
+        <!-- <div
           class="ac_c_item"
           v-for="(item, index) in dataList"
           :key="item.id"
@@ -166,7 +324,6 @@
             <div class="ac_c_i_t_right">
               <div>{{ item.name }}</div>
               <span>{{ item.label}}</span>
-              <!-- <span>@{{ item.username }}</span> -->
             </div>
             <div class="ac_c_i_t_popover">
               <div
@@ -218,9 +375,8 @@
           </div>
           <div class="ac_c_i_bottom">
             <div>{{ item.detail }}</div>
-            <!-- <span @click="openApp(item.url)">{{ item.url }}</span> -->
           </div>
-        </div>
+        </div> -->
         <div class="ac_c_empty" v-if="dataList.length === 0">
           <span>暂无数据...</span>
         </div>
@@ -231,6 +387,9 @@
       :typeList="typeList"
       @success="addAppSuccess"
     />
+    <selectAppDialog
+      ref="selectAppDialogRef"
+      @success="selectAppSuccess"/>
   </div>
 </template>
 
@@ -254,13 +413,15 @@ const clickOutside = {
   }
 };
 import addAppDialog from "../dialog/addAppDialog.vue";
-import saveCard from "../dialog/saveCard.vue";
+import saveCard from "../components/saveCard.vue";
+import selectAppDialog from "../dialog/selectAppDialog.vue";
 // import collectCard from "./dialog/collectCard.vue";
 // import recentUseCard from "./dialog/recentUseCard.vue";
 export default {
   components: {
     addAppDialog,
-    saveCard
+    saveCard,
+    selectAppDialog
     // collectCard,
     // recentUseCard
   },
@@ -272,11 +433,19 @@ export default {
       showType: "",
       searchText: "",
       selectJuri: 3,
+      selectLabel: "",
       typeList: [],
       selectList: [
-        { index: 1, label: "我的" },
-        { index: 2, label: "组织" },
-        { index: 3, label: "所有人" }
+        { index: 3, label: "所有组织" },
+        { index: 2, label: "组织内" },
+        // { index: 1, label: "我的" }
+        // { index: 2, label: "组织" },
+        // { index: 3, label: "所有人" }
+      ],
+      labelSelect: [
+        { value: "", label: "全部类型" },
+        { value: "agent", label: "智能体" },
+        { value: "workflow", label: "工作流" }
       ],
       userId: this.$route.query["userid"],
       org: this.$route.query["org"],
@@ -286,7 +455,7 @@ export default {
       recentUse: [],
       collect: [],
       editAppCard: null,
-      bannerObj:null
+      bannerObj: null
     };
   },
   computed: {
@@ -324,7 +493,7 @@ export default {
       let params = {
         uid: this.userId, //用户ID
         name: this.searchText, //应用名称搜索
-        label: "", //应用的标签搜索
+        label: this.selectLabel, //应用的标签搜索
         type: this.showType, //应用的类型
         juri: this.selectJuri, //应用权限 1:我的  2:组织内  3:所有人
         stand: "cn" //cn站还是hk站
@@ -355,8 +524,8 @@ export default {
     addApp() {
       this.$refs.addAppDialogRef.open({ type: 1 });
     },
-    releaseApp(){
-      this.$message.info("发布应用")
+    releaseApp() {
+      this.$refs.selectAppDialogRef.open();
     },
     updateApp(data) {
       this.$refs.addAppDialogRef.open({
@@ -375,10 +544,10 @@ export default {
       });
     },
     // 收藏APP
-    collectApp(item) {
-      this.editAppCard = null;
-      this.insertSave(item, 0);
-    },
+    // collectApp(item) {
+    //   this.editAppCard = null;
+    //   this.insertSave(item, 0);
+    // },
     //复制app
     copyApp(item) {
       this.$confirm(`确定复制《${item.name}》这个应用吗?`, "复制", {
@@ -519,6 +688,9 @@ export default {
           });
       }
     },
+    selectAppSuccess(item){
+      console.log(item)
+    },
     getTypeList() {
       let params = {
         suserid: this.userId, //用户ID
@@ -540,12 +712,16 @@ export default {
           this.$message.error("获取应用类型失败");
         });
     },
-    openApp(item,type=0) {
+    openApp(item, type = 0) {
       window.open(item.url, "_blank");
-      if (!(this.recentUse.length > 0 && item.id === this.recentUse[0].id) && type===0) {
+      if (
+        !(this.recentUse.length > 0 && item.id === this.recentUse[0].id) &&
+        type === 0
+      ) {
         this.insertSave(item, 1);
       }
     },
+
     resetData() {
       this.searchText = "";
       this.selectJuri = 3;
@@ -620,17 +796,13 @@ export default {
         .post(this.$store.state.api + "insert_appStoreSave", params)
         .then(res => {
           if (res.data) {
-            if (type === 0) {
-              this.$message.success("收藏成功");
-              this.getCollect();
-            } else if (type === 1) {
+            if (type === 1) {
               this.getRecentUse();
             }
           }
         })
         .catch(err => {
           console.log(err);
-          if (type === 0) this.$message.error("收藏失败");
         });
     },
     delApp(item) {
@@ -672,25 +844,130 @@ export default {
     changeShowPage(newPage) {
       this.$emit("changeShowCard", newPage);
     },
-    getBanner(){
+    getBanner() {
       let params = {
-        uid:this.userId,
-        oid:this.oid,
-        org:this.org,
-        type:4
-      }
+        uid: this.userId,
+        oid: this.oid,
+        org: this.org,
+        type: 4
+      };
 
-      this.ajax.get(this.$store.state.api+"select_bannerByoidORorg",params).then(res=>{
-        let _data = res.data[0];
-        if(_data[0]){
-          this.bannerObj = _data[0];
-        }else{
-          this.bannerObj = null
-        }
-      }).catch(e=>{
-        console.log("获取banner图失败")
-        console.log(e)
-      })
+      this.ajax
+        .get(this.$store.state.api + "select_bannerByoidORorg", params)
+        .then(res => {
+          let _data = res.data[0];
+          if (_data[0]) {
+            this.bannerObj = _data[0];
+          } else {
+            this.bannerObj = null;
+          }
+        })
+        .catch(e => {
+          console.log("获取banner图失败");
+          console.log(e);
+        });
+    },
+    praiseFn(item, type = 0) {
+      //点赞
+      if (type === 0) {
+        //点赞
+        let params = [
+          {
+            uid: this.userId,
+            type: 2,
+            aid: item.id,
+            json: ""
+          }
+        ];
+        this.ajax
+          .post(this.$store.state.api + "insert_appStoreSave", params)
+          .then(res => {
+            if (res.data) {
+              let _likeId = res.data[0][0].id;
+              this.dataList.find(i => i.id === item.id).likeCount += 1;
+              this.dataList.find(i => i.id === item.id).likeId = _likeId;
+              this.$message.success("点赞成功");
+            }
+          })
+          .catch(e => {
+            this.$message.error("点赞失败");
+          });
+      } else if (type === 1) {
+        //取消点赞
+        console.log("取消点赞👉:", item);
+        let params = [
+          {
+            sid: item.likeId
+          }
+        ];
+        this.ajax
+          .post(this.$store.state.api + "delete_appStoreSave", params)
+          .then(res => {
+            if (res.data) {
+              this.dataList.find(i => i.id === item.id).likeCount -= 1;
+              this.dataList.find(i => i.id === item.id).likeId = "";
+              this.$message.success("取消点赞成功");
+            }
+          })
+          .catch(e => {
+            console.log(e);
+            this.$message.error("取消点赞失败");
+          });
+      }
+    },
+    collectFn(item, type = 0) {
+      //收藏
+      if (type === 0) {
+        //收藏
+        console.log("收藏👉:", item);
+        let params = [
+          {
+            uid: this.userId,
+            type: 0,
+            aid: item.id,
+            json: ""
+          }
+        ];
+        this.ajax
+          .post(this.$store.state.api + "insert_appStoreSave", params)
+          .then(res => {
+            if (res.data) {
+              let _colletId = res.data[0][0].id;
+              this.dataList.find(i => i.id === item.id).collectCount += 1;
+              this.dataList.find(i => i.id === item.id).collectId = _colletId;
+              this.$message.success("收藏成功");
+            }
+            this.getCollect();
+          })
+          .catch(e => {
+            console.log(e);
+            this.getCollect();
+            this.$message.error("收藏失败");
+          });
+      } else if (type === 1) {
+        //取消收藏
+        console.log("取消收藏👉:", item);
+        let params = [
+          {
+            sid: item.collectId
+          }
+        ];
+        this.ajax
+          .post(this.$store.state.api + "delete_appStoreSave", params)
+          .then(res => {
+            if (res.data) {
+              this.dataList.find(i => i.id === item.id).collectCount -= 1;
+              this.dataList.find(i => i.id === item.id).collectId = "";
+              this.$message.success("取消收藏成功");
+            }
+            this.getCollect();
+          })
+          .catch(e => {
+            console.log(e);
+            this.$message.error("取消收藏失败");
+            this.getCollect();
+          });
+      }
     }
   },
   mounted() {
@@ -698,7 +975,7 @@ export default {
     this.getData();
     this.getCollect();
     this.getRecentUse();
-    this.getBanner()
+    this.getBanner();
   }
 };
 </script>
@@ -719,7 +996,7 @@ export default {
 .ac_left {
   /* width: 280px;
   min-width: 280px; */
-  width: clamp(150px,12vw,280px);
+  width: clamp(150px, 12vw, 280px);
   min-width: 150px;
   margin-right: 20px;
   height: 100%;
@@ -745,7 +1022,7 @@ export default {
   height: auto;
   border-radius: 5px;
   box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
-	background-color: #fff;
+  background-color: #fff;
 }
 
 .ac_h_top {
@@ -766,23 +1043,23 @@ export default {
   position: relative;
   margin-right: 25px;
   cursor: pointer;
-	display: flex;
-	align-items: center;
+  display: flex;
+  align-items: center;
 }
 
-.ac_h_top > span>svg{
-	width: 22px;
-	height: 22px;
-	fill: #1A1A1A;
-	margin-right: 10px;
+.ac_h_top > span > svg {
+  width: 22px;
+  height: 22px;
+  fill: #1a1a1a;
+  margin-right: 10px;
 }
 
-.ac_h_t_active{
-	color: #0354D7;
+.ac_h_t_active {
+  color: #0354d7;
 }
 
-.ac_h_t_active>svg{
-	fill: #0354D7 !important;
+.ac_h_t_active > svg {
+  fill: #0354d7 !important;
 }
 
 /* .ac_h_t_active::after {
@@ -798,7 +1075,7 @@ export default {
 
 .ac_h_banner {
   width: 100%;
-  height: clamp(100px,20vh,300px);
+  height: clamp(100px, 20vh, 300px);
   border-radius: 5px;
   overflow: hidden;
   box-sizing: border-box;
@@ -853,9 +1130,9 @@ export default {
   width: 100%;
   flex: 1;
   height: auto;
-  margin-top:10px;
+  margin-top: 10px;
   overflow: auto;
-	min-height: 200px;
+  min-height: 200px;
 }
 
 .ac_c_item {
@@ -869,7 +1146,7 @@ export default {
   margin-right: 15px;
   margin-bottom: 15px;
   float: left;
-  cursor: pointer;
+  /* cursor: pointer; */
 }
 
 @media screen and (min-width: 1400px) {
@@ -925,13 +1202,224 @@ export default {
 }
 
 .ac_c_i_top {
+  width: 100%;
+  display: flex;
+  height: calc(100% - 40px);
+}
+
+.ac_c_i_t_left {
+  width: 100px;
+  min-width: 100px;
+  height: 100%;
+  box-sizing: border-box;
+  display: flex;
+  align-items: flex-start;
+  box-sizing: border-box;
+  padding: 10px;
+}
+
+.ac_c_i_t_left > svg {
+  width: 100%;
+  height: auto;
+}
+
+.ac_c_i_t_left > img {
+  width: 100%;
+  object-fit: cover;
+  height: 80px;
+}
+
+.ac_c_i_t_right {
+  flex: 1;
+  width: calc(100% - 100px);
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+}
+
+.ac_c_i_t_right > div {
+  width: 100%;
+}
+
+.ac_c_i_t_r_top {
+  height: 40px;
+  display: flex;
+  align-items: flex-end;
+  position: relative;
+  font-size: 1.3em;
+  font-weight: bold;
+  box-sizing: border-box;
+  padding-bottom: 2px;
+}
+
+.ac_c_i_t_r_top > span {
+  display: block;
+  max-width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.ac_c_i_t_popover {
+  width: 30px;
+  height: 30px;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 3;
+}
+
+.ac_c_i_t_popover svg {
+  width: 25px;
+  height: 25px;
+  cursor: pointer;
+}
+
+.ac_c_i_t_p_box {
+  position: absolute;
+  height: auto;
+  top: 100%;
+  right: 0;
+  padding: 8px;
+  border-radius: 8px 0 8px 8px;
+  background-color: #fff;
+  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
+  width: auto;
+}
+
+.ac_c_i_t_p_box > div {
+  width: 80px;
+  height: 30px;
+  cursor: pointer;
+  transition: 0.3s;
+  font-size: 0.7em;
+  border-radius: 5px;
+  font-weight: 100;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  position: relative;
+  box-sizing: border-box;
+}
+
+.ac_c_i_t_p_box > div:hover {
+  background-color: #f2f4f7;
+}
+
+.ac_c_i_t_r_center {
+  height: 30px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.ac_c_i_t_r_center > span {
+  display: block;
+  max-width: calc(100% - 80px);
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.ac_c_i_t_r_center > div {
+  width: 75px;
+  height: 85%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 0.8em;
+  background-color: #f3f3f3;
+  color: #00000066;
+  border-radius: 3px;
+}
+
+.ac_c_i_t_r_center > div > img {
+  width: 16px;
+  height: 16px;
+  margin-right: 4px;
+}
+
+.ac_c_i_t_r_bottom {
+  max-width: 100%;
+  max-height: calc(100% - 30px - 40px - 20px);
+  margin-top: 10px;
+  margin-bottom: 10px;
+  color: #00000099;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 5;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.ac_c_i_bottom {
+  width: 100%;
+  height: 40px;
+  padding-top: 10px;
+  box-sizing: border-box;
+  border-top: solid 2px #e7e7e7;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.ac_c_i_b_left {
+  display: flex;
+  align-items: center;
+  flex: 1;
+  overflow: auto;
+  height: 100%;
+}
+
+.ac_c_i_b_left > div {
+  margin-right: 20px;
+  display: flex;
+  align-items: center;
+}
+
+.ac_c_i_b_left > div > img {
+  width: 22px;
+  height: 22px;
+}
+
+.ac_c_i_b_left > div > span {
+  margin-left: 5px;
+  color: #00000099;
+  cursor: default;
+}
+
+.ac_c_i_b_right {
+  display: flex;
+  align-items: center;
+  width: 70px;
+  height: 100%;
+  justify-content: flex-end;
+}
+
+.ac_c_i_b_right > span {
+  width: 60px;
+  height: 100%;
+  border-radius: 4px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.ac_c_i_b_r_type1 {
+  background-color: #17c469;
+  color: #fff;
+}
+
+.ac_c_i_b_r_type2 {
+  background-color: #ffcf33;
+  color: #000;
+}
+
+/* .ac_c_i_top {
   width: 100%;
   height: 50px;
   display: flex;
   position: relative;
-  /* flex-direction: column; */
-  /* justify-content: space-evenly; */
-  /* background-color: red */
 }
 
 .ac_c_i_t_popover {
@@ -1023,7 +1511,6 @@ export default {
 
 .ac_c_i_t_right > span {
   font-size: 1.1em;
-  /* font-weight: bold; */
   color: #8991a1;
   display: block;
   max-width: 100%;
@@ -1043,7 +1530,6 @@ export default {
   color: #8991a1;
   width: 100%;
   height: calc(100%);
-  /* 第四行溢出显示... */
   display: -webkit-box;
   display: block;
   overflow: hidden;
@@ -1061,5 +1547,5 @@ export default {
   text-overflow: ellipsis;
   white-space: nowrap;
   cursor: pointer;
-}
+} */
 </style>

+ 1 - 1
src/components/pages/appStore/views/workSpace.vue

@@ -205,7 +205,7 @@ const clickOutside = {
     document.removeEventListener("click", el.clickOutsideEvent);
   }
 };
-import saveCard from "../dialog/saveCard.vue";
+import saveCard from "../components/saveCard.vue";
 export default {
   components: {
     saveCard

+ 1 - 1
src/components/pages/classroomObservation/components/baseMessage.vue

@@ -722,7 +722,7 @@ ${this.data.editorBarData?this.data.editorBarData.content:""}
 `;			
 				const _uuid = uuidv4();
 				let params = {
-					model: "gpt-3.5-turbo",
+					// model: "gpt-3.5-turbo",
 					temperature: 0,
 					max_tokens: 4096,
 					top_p: 1,

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