|
@@ -23,76 +23,107 @@
|
|
|
get-container="#appStoreCon"
|
|
|
position="left"
|
|
|
:overlay-style="{ opacity: 0 }"
|
|
|
- :style="{ height: '92vh', transform: 'translate3d(0,0%, 0)', width: '45%', minWidth: '150px', opacity: 0.9 }"
|
|
|
+ :style="{ height: '92vh', transform: 'translate3d(0,0%, 0)', width: '45%', minWidth: '150px', opacity: .95}"
|
|
|
>
|
|
|
<div class="popupCon">
|
|
|
<div class="popTop">
|
|
|
<div style="color: #0663FE;">【{{ userinfo.orgName }}】</div>
|
|
|
- <div>CocoFlow</div>
|
|
|
+ <!-- <div>CocoFlow</div> -->
|
|
|
<div @click="comShow = true">使用电脑端</div>
|
|
|
- <div>关注公众号</div>
|
|
|
+ <!-- <div>关注公众号</div> -->
|
|
|
</div>
|
|
|
<div class="popupBot" @click="goInfo">
|
|
|
- <img style="width: 24px;height: 100%;" src="../../assets/images/appStoreCopy/popimg.svg" alt="" />
|
|
|
- <div>
|
|
|
- <div>李老师</div>
|
|
|
- <div>cococlass341683</div>
|
|
|
+ <img style="width: 40px;height: 100%;object-fit: contain;color: #000;" src="../../assets/images/appStoreCopy/toux.png" alt="" />
|
|
|
+ <div style="flex: 1;display: flex;flex-direction: column;gap: 5px;">
|
|
|
+ <div style="font-size: 16px;font-weight: 600;">{{ userinfo.name }}</div>
|
|
|
+ <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ userSuffix() }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
|
|
|
- <van-tabs
|
|
|
+ <van-tabs
|
|
|
@change="getData"
|
|
|
@touchmove.stop="handleTouchMove"
|
|
|
background="#F9F8F8"
|
|
|
:line-height="0"
|
|
|
title-active-color="#0663FE"
|
|
|
v-model="tabType"
|
|
|
+ style="position: relative"
|
|
|
>
|
|
|
- <van-tab v-for="(i, index) in typeList" class="appBlocks" :key="index" :name="i.id" :title="i.name">
|
|
|
- <template v-if="dataList.length">
|
|
|
- <div v-for="(i, ind) in dataList" @click="openUrl(i.url)" :key="ind + 'a'" class="appBlock">
|
|
|
- <div class="appBlockTop">
|
|
|
- <img class="appBlockTopImg" :src="i.json.icon" alt="" />
|
|
|
- <div class="appBlockTopTit">{{ i.name }}</div>
|
|
|
- <div style="display: flex;align-items: center;">
|
|
|
- <img src="../../assets/images/appStoreCopy/appde.svg" alt="" />
|
|
|
- <div style="display: flex;gap: 5px;margin-left: 8px;">
|
|
|
- <span class="ATag">{{ i.label == 'workflow' ? '工作流' :'智能体' }}</span>
|
|
|
+ <img @click="openSel" style="position: absolute;right: 10px;top: 15px;" src="../../assets/images/appStoreCopy/arrowup.svg" alt="">
|
|
|
+ <div v-if="selXia" class="xiaH">
|
|
|
+ <div class="xiaHCon" @click="CutTab(i.id)" v-for="(i,index) in typeList" :key="index">
|
|
|
+ {{ i.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-tab v-for="(i, index) in typeList" class="appBlocks" :key="index" :name="i.id" :title="i.name">
|
|
|
+ <template v-if="dataList.length">
|
|
|
+ <div v-for="(i, ind) in dataList" @click="openUrl(i.url)" :key="ind + 'a'" class="appBlock">
|
|
|
+ <div class="appBlockTop">
|
|
|
+ <img class="appBlockTopImg" :src="i.json.icon" alt="" />
|
|
|
+ <div class="appBlockTopTit">{{ i.name }}</div>
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <img src="../../assets/images/appStoreCopy/appde.svg" alt="" />
|
|
|
+ <div style="display: flex;gap: 5px;margin-left: 8px;">
|
|
|
+ <span class="ATag">{{ i.label == 'workflow' ? '工作流' :'智能体' }}</span>
|
|
|
+ <span class="ATag">
|
|
|
+ <img :src="i.tag == 1 || !i.tag ?
|
|
|
+ require('../../assets/images/appStoreCopy/dul.svg')
|
|
|
+ : require('../../assets/images/appStoreCopy/hz.svg')"
|
|
|
+ alt=""> {{ i.tag == '1' || !i.tag ? '官方' :'精选' }}
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ class="ATag"
|
|
|
+ v-if="
|
|
|
+ ['agent'].includes(i.label) ||
|
|
|
+ (['workflow'].includes(i.label) && i.json.modes)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <template v-if="i.label === 'agent'">聊天式</template>
|
|
|
+ <template v-else-if="i.json.modes">{{
|
|
|
+ wayList[i.json.modes[0]]
|
|
|
+ }}</template>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="appBlockBot">
|
|
|
- <span>{{ i.username }}</span>
|
|
|
- <div class="appBlockBotCol">
|
|
|
- <div @click.stop="addLike(i.id)" style="display: flex;align-items: center;">
|
|
|
- <img src="../../assets/images/appStoreCopy/star.svg" alt="" />
|
|
|
- {{ i.likeCount }}
|
|
|
- </div>
|
|
|
- <div @click.stop="addColl(i.id)" style="display: flex;align-items: center;">
|
|
|
- <img src="../../assets/images/appStoreCopy/xin.svg" alt="" />
|
|
|
- {{ i.collectCount }}
|
|
|
+ <div class="appBlockBot">
|
|
|
+ <span>{{ i.username }}</span>
|
|
|
+ <div class="appBlockBotCol">
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <img @click.stop="delAllOP(i.id,0)" v-if="collList.some(item => item.id === i.id)" src="../../assets/images/appStoreCopy/star1.svg" alt="" />
|
|
|
+ <img @click.stop="addAllOP(i,0)" v-else src="../../assets/images/appStoreCopy/star.svg" alt="" />
|
|
|
+ {{ i.collectCount }}
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <img @click.stop="delAllOP(i.id,2)" v-if="likeList.some(item => item.id === i.id)" src="../../assets/images/appStoreCopy/xin1.svg" alt="" />
|
|
|
+ <img @click.stop="addAllOP(i,2)" v-else src="../../assets/images/appStoreCopy/xin.svg" alt="" />
|
|
|
+ {{ i.likeCount }}
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </template>
|
|
|
+ <div v-else style="position: absolute;left: 50%;top: 30%;transform: translate(-50%,-50%);">
|
|
|
+ 暂无数据哦~
|
|
|
</div>
|
|
|
- </template>
|
|
|
- <div v-else style="position: absolute;left: 50%;top: 30%;transform: translate(-50%,-50%);">
|
|
|
- 暂无数据哦~
|
|
|
- </div>
|
|
|
- <div v-if="isShow"
|
|
|
- class="zzcl"
|
|
|
- >
|
|
|
- 加载中...
|
|
|
- </div>
|
|
|
- </van-tab>
|
|
|
- </van-tabs>
|
|
|
+ <!-- <div v-if="isShow"
|
|
|
+ class="zzcl"
|
|
|
+ >
|
|
|
+ 加载中...
|
|
|
+ </div> -->
|
|
|
+ </van-tab>
|
|
|
+ </van-tabs>
|
|
|
+ <div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
<!-- 侧边栏遮罩层 -->
|
|
|
<div
|
|
|
- v-if="CeShow"
|
|
|
+ v-if="ZeShow"
|
|
|
@click="openCeY"
|
|
|
style="position: fixed;top: 0;left: 0;width: 100%;height: 100%;background-color: #000;opacity: 0"
|
|
|
></div>
|
|
@@ -119,98 +150,12 @@
|
|
|
复制网址,去电脑端浏览器访问吧
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
- <!-- <div class="as_header">
|
|
|
- <div class="as_h_top">
|
|
|
- <span>应用管理</span>
|
|
|
- <div class="exit" @click="exitLogin">退出</div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="as_h_bottom">
|
|
|
- <el-input v-model="searchText" style="width:40%;" placeholder="请输入应用名称" size="small"></el-input>
|
|
|
- <el-select v-model="selectJuri" placeholder="请选择权限" size="small" style="width:39%;margin-left:10px;font-size: 16px;" @change="getData()">
|
|
|
- <el-option v-for="item in selectList" :key="item.index" :label="item.label" :value="item.index"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- @click="getData()"
|
|
|
- icon="el-icon-search"
|
|
|
- style="margin-left: 10px;"
|
|
|
- ></el-button>
|
|
|
- </div>
|
|
|
- <div class="as_h_typeList">
|
|
|
- <span :class="{'typeActive':showType==''}" @click="changeType('')">全部</span>
|
|
|
- <span v-for="(item,index) in typeList" :key="item.id" :class="{'typeActive':item.id==showType}" @click="changeType(item.id)">{{item.name}}</span>
|
|
|
-
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="as_content">
|
|
|
- <div class="as_c_item" v-for="(item, index) in dataList" :key="item.id" @click="closeCard()">
|
|
|
- <div class="as_c_i_top">
|
|
|
- <div class="as_c_i_t_icon">
|
|
|
- <svg
|
|
|
- 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"
|
|
|
- v-if="!item.json.icon"
|
|
|
- >
|
|
|
- <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>
|
|
|
- <img :src="item.json.icon" alt="" v-else>
|
|
|
- </div>
|
|
|
- <div class="as_c_i_t_message">
|
|
|
- <div>{{ item.name }}</div>
|
|
|
- <span v-if="item.label==='agent'">智能体</span>
|
|
|
- <span v-if="item.label==='workflow'">工作流</span>
|
|
|
- </div>
|
|
|
- <div class="ac_c_i_t_popover" v-if="showMenu(item)">
|
|
|
- <svg t="1732786015570" @click.stop="showCard(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 class="popoverBox" v-if="showCardId===item.id">
|
|
|
- <div v-if="item.userid===userinfo.userid" @click="editAppFn(item)">
|
|
|
- <img src="../../assets/images/appStore/edit.svg">
|
|
|
- <span>编辑</span>
|
|
|
- </div>
|
|
|
- <div v-if="item.json && item.json.copy==='1'" @click="copyAppFn(item)">
|
|
|
- <img src="../../assets/images/appStore/copy.svg">
|
|
|
- <span>复制</span>
|
|
|
- </div>
|
|
|
- <div v-if="item.userid===userinfo.userid" @click="deleteAppFn(item)">
|
|
|
- <img src="../../assets/images/appStore/del.svg">
|
|
|
- <span>删除</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="as_c_i_bottom">
|
|
|
- <div>{{ item.detail }}</div>
|
|
|
- <span @click="openUrl(item.url)">{{ item.url }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <span class="as_c_empty" v-if="dataList.length === 0">
|
|
|
- 暂无应用...
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <appStorePopup ref="appStorePopupRef" :typeList="typeList" @success="appStorePopupSuccess"/> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
-import { getStoreType, getStore, addApp, editApp, insertSave, deleteApp } from '@/api/appStore'
|
|
|
+import { getStoreType, getStore, insert_appStoreSave,select_appStoreSave,delete_appStoreSave,select_appStorJuri } from '@/api/appStore'
|
|
|
import appStorePopup from './components/appStorePopup.vue'
|
|
|
import { Dialog, Toast } from 'vant'
|
|
|
const clickOutside = {
|
|
@@ -249,16 +194,29 @@ export default {
|
|
|
CeShow: false,
|
|
|
isShow: false, //loading
|
|
|
comShow:false, //电脑端链接
|
|
|
- dataList: [],
|
|
|
- typeList: [],
|
|
|
- showType: '',
|
|
|
- searchText: '',
|
|
|
- selectJuri: 3,
|
|
|
- selectList: [
|
|
|
- { index: 1, label: '我的' },
|
|
|
- { index: 2, label: '组织' },
|
|
|
- { index: 3, label: '所有人' }
|
|
|
- ],
|
|
|
+ dataList: [], //应用列表
|
|
|
+ typeList: [], //tab栏
|
|
|
+ // showType: '',
|
|
|
+ searchText: '', //查询框文字
|
|
|
+ selectJuri: 3,
|
|
|
+ collList:[], //用户收藏
|
|
|
+ likeList:[], //用户喜欢
|
|
|
+ tabPage:'',
|
|
|
+ ZeShow:false,
|
|
|
+ selXia:false,
|
|
|
+ // selectList: [
|
|
|
+ // { index: 1, label: '我的' },
|
|
|
+ // { index: 2, label: '组织' },
|
|
|
+ // { index: 3, label: '所有人' }
|
|
|
+ // ],
|
|
|
+ wayList: [
|
|
|
+ '聊天室',
|
|
|
+ '卡片式',
|
|
|
+ '沉浸式',
|
|
|
+ ],
|
|
|
+ // 权限标签
|
|
|
+ juriListData:[],
|
|
|
+ tagList:[],
|
|
|
showCardId: null
|
|
|
}
|
|
|
},
|
|
@@ -275,7 +233,32 @@ export default {
|
|
|
|
|
|
return _result
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ userSuffix() {
|
|
|
+ let yym = "";
|
|
|
+ return function () {
|
|
|
+ // this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1 &&
|
|
|
+ yym = this.userinfo;
|
|
|
+
|
|
|
+ let val = yym.accountNumber;
|
|
|
+
|
|
|
+ let userName = JSON.parse(JSON.stringify(val));
|
|
|
+
|
|
|
+ const regEmail = new RegExp(
|
|
|
+ "^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
|
|
|
+ );
|
|
|
+
|
|
|
+ // // 判断用户输入账户带不带后缀
|
|
|
+ if (!regEmail.test(userName)) {
|
|
|
+ console.log("111");
|
|
|
+ } else {
|
|
|
+ const parts = userName.split("@");
|
|
|
+ userName = parts[0];
|
|
|
+ }
|
|
|
+
|
|
|
+ return userName;
|
|
|
+ };
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
@@ -310,14 +293,20 @@ export default {
|
|
|
// 打开与关闭侧边栏
|
|
|
openCe() {
|
|
|
this.CeShow = !this.CeShow
|
|
|
+ this.ZeShow = !this.ZeShow
|
|
|
},
|
|
|
// 点击遮罩层关闭侧边栏
|
|
|
openCeY() {
|
|
|
+ this.ZeShow = false
|
|
|
this.CeShow = false
|
|
|
+ this.selXia = false
|
|
|
},
|
|
|
|
|
|
// 查询应用数据
|
|
|
getData(val = '') {
|
|
|
+ this.getAllOP(0)
|
|
|
+ this.getAllOP(2)
|
|
|
+ this.tabPage = val
|
|
|
this.isShow = true
|
|
|
let params = {
|
|
|
uid: this.userinfo.userid,
|
|
@@ -325,7 +314,10 @@ export default {
|
|
|
label: '',
|
|
|
type: val,
|
|
|
juri: this.selectJuri,
|
|
|
- stand: 'cn'
|
|
|
+ stand: this.userinfo.orgArea,
|
|
|
+ status:'',
|
|
|
+ model:'',
|
|
|
+ exportType:''
|
|
|
}
|
|
|
|
|
|
getStore(params)
|
|
@@ -342,6 +334,8 @@ export default {
|
|
|
} else {
|
|
|
this.dataList = []
|
|
|
}
|
|
|
+ this.getAppStoreJuri()
|
|
|
+
|
|
|
this.isShow = false
|
|
|
})
|
|
|
.catch(err => {
|
|
@@ -349,21 +343,85 @@ export default {
|
|
|
this.$toast.error('获取应用数据失败')
|
|
|
})
|
|
|
},
|
|
|
- // 喜欢
|
|
|
- addLike(){
|
|
|
+ // 添加收藏0 喜欢2
|
|
|
+ addAllOP(val,typeL){
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ uid: this.userinfo.userid,
|
|
|
+ type: typeL,
|
|
|
+ aid: val.id,
|
|
|
+ json: '',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ insert_appStoreSave(params)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res);
|
|
|
+ this.getData(this.tabPage)
|
|
|
+ // this.getAllOP(0)
|
|
|
+ // this.getAllOP(2)
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error('添加失败')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 删除收藏0 喜欢2
|
|
|
+ delAllOP(val,type){
|
|
|
+ let kD = ''
|
|
|
+ if (type == 0) {
|
|
|
+ kD = this.collList.find(e => val === e.id )
|
|
|
+ } else {
|
|
|
+ kD = this.likeList.find(e => val === e.id )
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ sid: kD.sid
|
|
|
+ }
|
|
|
+ ]
|
|
|
+
|
|
|
+ delete_appStoreSave(params)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res);
|
|
|
+ this.getData(this.tabPage)
|
|
|
+ // this.getAllOP(0)
|
|
|
+ // this.getAllOP(2)
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error('操作失败')
|
|
|
+ })
|
|
|
},
|
|
|
- // 收藏
|
|
|
- addColl(){
|
|
|
-
|
|
|
+ // 获取点赞 与收藏
|
|
|
+ getAllOP(val){
|
|
|
+ let params = {
|
|
|
+ uid: this.userinfo.userid,
|
|
|
+ type: val,
|
|
|
+ limit: 0,
|
|
|
+ }
|
|
|
+ select_appStoreSave(params)
|
|
|
+ .then(res => {
|
|
|
+ if (val == 0) {
|
|
|
+ // console.log('111');
|
|
|
+ this.collList = res[0];
|
|
|
+ }else{
|
|
|
+ // console.log('222');
|
|
|
+ this.likeList = res[0];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ this.$toast.error('获取用户点赞应用失败')
|
|
|
+ })
|
|
|
},
|
|
|
-
|
|
|
getAllStoreType() {
|
|
|
let params = {
|
|
|
suserid: this.userinfo.userid,
|
|
|
sorg: this.userinfo.org,
|
|
|
soid: this.userinfo.organizeid,
|
|
|
- sstand: 'cn'
|
|
|
+ sstand: this.userinfo.orgArea,
|
|
|
+ exportType:''
|
|
|
}
|
|
|
|
|
|
getStoreType(params)
|
|
@@ -384,192 +442,59 @@ export default {
|
|
|
openUrl(url) {
|
|
|
window.open(url, '_blank')
|
|
|
},
|
|
|
- addAppFn() {
|
|
|
- this.$refs.appStorePopupRef.open({ type: 1 })
|
|
|
+ setDataTag(_list) {
|
|
|
+ let _result = _list;
|
|
|
+ _result.forEach((item) => {
|
|
|
+ if (
|
|
|
+ this.juriListData.find(
|
|
|
+ (i) => i.jid === item[i.type] && i.utype === "1"
|
|
|
+ ) &&
|
|
|
+ item.juri == "3"
|
|
|
+ ) {
|
|
|
+ item.tag = "1"; //官方
|
|
|
+ } else if (
|
|
|
+ this.juriListData.find(
|
|
|
+ (i) => i.jid === item[i.type] && i.utype === "2"
|
|
|
+ ) &&
|
|
|
+ item.juri == "3"
|
|
|
+ ) {
|
|
|
+ item.tag = "2"; //精选
|
|
|
+ } else if (item.role === 1 && item.juri == "2") {
|
|
|
+ item.tag = "3"; //专属
|
|
|
+ } else if (item.juri === "2") {
|
|
|
+ item.tag = "4"; //组织
|
|
|
+ } else if (item.userid === this.userinfo.userid && item.juri === "1") {
|
|
|
+ item.tag = "5"; //个人
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return _result;
|
|
|
+ },
|
|
|
+ openSel(){
|
|
|
+ this.selXia = true
|
|
|
+ this.ZeShow = true
|
|
|
},
|
|
|
- editAppFn(data) {
|
|
|
- this.$refs.appStorePopupRef.open({
|
|
|
- type: 2,
|
|
|
- form: {
|
|
|
- id: data.id,
|
|
|
- nname: data.name,
|
|
|
- nlabel: data.label,
|
|
|
- ndetail: data.detail,
|
|
|
- nurl: data.url,
|
|
|
- ntype: data.type,
|
|
|
- njuri: data.juri,
|
|
|
- nstand: data.stand,
|
|
|
- njson: data.json
|
|
|
- }
|
|
|
- })
|
|
|
+ CutTab(val){
|
|
|
+ this.tabType = val
|
|
|
+ this.selXia = false
|
|
|
+ this.ZeShow = false
|
|
|
+ this.getData(val)
|
|
|
},
|
|
|
- copyAppFn(item) {
|
|
|
- Dialog.confirm({
|
|
|
- title: '复制应用',
|
|
|
- message: `确定复制《${item.name}》这个应用吗?`
|
|
|
- })
|
|
|
- .then(_ => {
|
|
|
- let params = [
|
|
|
- {
|
|
|
- name: `${item.name}_copy`,
|
|
|
- userid: this.userinfo.userid,
|
|
|
- label: item.label,
|
|
|
- detail: item.detail,
|
|
|
- url: item.url,
|
|
|
- type: item.type,
|
|
|
- juri: '1',
|
|
|
- stand: 'cn',
|
|
|
- json: JSON.stringify(item.json)
|
|
|
- }
|
|
|
- ]
|
|
|
|
|
|
- addApp(params)
|
|
|
- .then(res => {
|
|
|
- if (res == 1) {
|
|
|
- this.insertSaveFn(item, 3)
|
|
|
- Toast.success('已复制到我的列表')
|
|
|
- } else {
|
|
|
- this.$toast.fail('复制失败')
|
|
|
- }
|
|
|
- this.getData()
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e)
|
|
|
- this.$toast.fail('复制失败')
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(_ => {})
|
|
|
- },
|
|
|
- deleteAppFn(item) {
|
|
|
- Dialog.confirm({
|
|
|
- title: '删除应用',
|
|
|
- message: `确定删除《${item.name}》这个应用吗?`
|
|
|
- })
|
|
|
- .then(_ => {
|
|
|
- let params = [
|
|
|
- {
|
|
|
- uid: this.userinfo.userid,
|
|
|
- aid: item.id
|
|
|
- }
|
|
|
- ]
|
|
|
- deleteApp(params)
|
|
|
- .then(res => {
|
|
|
- if (res == 1) {
|
|
|
- this.$toast.success('删除应用成功')
|
|
|
- } else {
|
|
|
- this.$toast.fail('删除应用失败')
|
|
|
- }
|
|
|
- this.getData()
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e)
|
|
|
- this.$toast.fail('删除应用失败')
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(_ => {
|
|
|
- console.log('取消删除')
|
|
|
- })
|
|
|
- },
|
|
|
- insertSaveFn(item, type) {
|
|
|
- return new Promise(resolve => {
|
|
|
- let params = [
|
|
|
- {
|
|
|
- uid: this.userinfo.userid,
|
|
|
- type: type,
|
|
|
- aid: item.id,
|
|
|
- json: ''
|
|
|
- }
|
|
|
- ]
|
|
|
- insertSave(params)
|
|
|
- .then(res => {
|
|
|
- if (res) {
|
|
|
- resolve(1)
|
|
|
- } else {
|
|
|
- resolve(0)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e)
|
|
|
- resolve(0)
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- appStorePopupSuccess(data, type) {
|
|
|
- if (type === 1) {
|
|
|
- //添加
|
|
|
- let params = [
|
|
|
- {
|
|
|
- nname: data.nname, //app名称
|
|
|
- nuserid: this.userinfo.userid, //创建的用户ID
|
|
|
- nlabel: data.nlabel, //app标签
|
|
|
- ndetail: data.ndetail, //app简介
|
|
|
- nurl: data.nurl, //app链接
|
|
|
- ntype: data.ntype, //app类型
|
|
|
- njuri: data.njuri, //app权限 1:我的 2:组织 3:所有人
|
|
|
- nstand: 'cn', //语言
|
|
|
- njson: '' //其他信息
|
|
|
- }
|
|
|
- ]
|
|
|
- addApp(params)
|
|
|
- .then(res => {
|
|
|
- if (res == 1) {
|
|
|
- this.$message.success('添加成功')
|
|
|
- this.$refs.appStorePopupRef.close(true)
|
|
|
- this.getData()
|
|
|
- } else {
|
|
|
- this.$message.error('添加失败')
|
|
|
- this.$refs.appStorePopupRef.loading = false
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err)
|
|
|
- this.$message.error('添加失败')
|
|
|
- })
|
|
|
- } else if (type === 2) {
|
|
|
- let params = [
|
|
|
- {
|
|
|
- aid: data.id,
|
|
|
- nname: data.nname, //app名称
|
|
|
- nuserid: this.userinfo.userid, //创建的用户ID
|
|
|
- nlabel: data.nlabel, //app标签
|
|
|
- ndetail: data.ndetail, //app简介
|
|
|
- nurl: data.nurl, //app链接
|
|
|
- ntype: data.ntype, //app类型
|
|
|
- njuri: data.njuri, //app权限 1:我的 2:组织 3:所有人
|
|
|
- nstand: 'cn', //语言
|
|
|
- njson: data.njson //其他信息
|
|
|
- }
|
|
|
- ]
|
|
|
- editApp(params)
|
|
|
+ //获取显示标权限
|
|
|
+ getAppStoreJuri() {
|
|
|
+ select_appStorJuri({})
|
|
|
.then(res => {
|
|
|
- if (res == 1) {
|
|
|
- this.$message.success('修改成功')
|
|
|
- this.$refs.appStorePopupRef.close(true)
|
|
|
- this.getData()
|
|
|
- } else {
|
|
|
- this.$message.error('修改失败')
|
|
|
- this.$refs.appStorePopupRef.loading = false
|
|
|
- }
|
|
|
+ this.juriListData = res[0];
|
|
|
+ if (this.dataList.length > 0) {
|
|
|
+ this.dataList = JSON.parse(JSON.stringify(this.setDataTag(this.dataList)));
|
|
|
+ }
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.log(err)
|
|
|
- this.$message.error('修改失败')
|
|
|
})
|
|
|
- }
|
|
|
- },
|
|
|
- showCard(id) {
|
|
|
- if (this.showCardId == id) return (this.showCardId = null)
|
|
|
- this.showCardId = id
|
|
|
- },
|
|
|
- changeType(id) {
|
|
|
- if (this.showType !== id) {
|
|
|
- this.showType = id
|
|
|
- this.getData()
|
|
|
- }
|
|
|
- },
|
|
|
- closeCard() {
|
|
|
- this.showCardId = null
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getData()
|
|
@@ -608,7 +533,7 @@ export default {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
|
- padding: 20px 20px 40px 20px;
|
|
|
+ padding: 20px 12px 30px;
|
|
|
height: 100%;
|
|
|
box-sizing: border-box;
|
|
|
.popTop {
|
|
@@ -625,6 +550,9 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 10px;
|
|
|
+ background: #F3F3F3;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 5px 8px;
|
|
|
}
|
|
|
}
|
|
|
.appBlocks {
|
|
@@ -640,9 +568,11 @@ export default {
|
|
|
overflow: auto;
|
|
|
.appBlock {
|
|
|
min-width: 100px;
|
|
|
- max-height: 145px;
|
|
|
+ height: 100%;
|
|
|
background: #f8f8f8;
|
|
|
border-radius: 10px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
box-shadow: 0px 4px 10px 0px #00000033;
|
|
|
.appBlockTop {
|
|
|
border-radius: 10px;
|
|
@@ -678,12 +608,19 @@ export default {
|
|
|
padding: 2px;
|
|
|
border-radius: 2px;
|
|
|
box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ img{
|
|
|
+ margin-right: 2px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.appBlockBot {
|
|
|
background: #f8f8f8;
|
|
|
display: flex;
|
|
|
padding: 10px;
|
|
|
+ flex: 1;
|
|
|
+ align-items: center;
|
|
|
border-radius: 0 0 10px 10px;
|
|
|
justify-content: space-between;
|
|
|
box-sizing: border-box;
|
|
@@ -716,6 +653,9 @@ export default {
|
|
|
background: rgba(158, 152, 152, 0.4);
|
|
|
backdrop-filter: blur(3px);
|
|
|
}
|
|
|
+/deep/ .van-tabs__wrap{
|
|
|
+ padding-right: 30px !important;
|
|
|
+}
|
|
|
.Vpop{
|
|
|
padding: 20px 30px;
|
|
|
box-sizing: border-box;
|
|
@@ -762,4 +702,26 @@ export default {
|
|
|
font-size: 16px;
|
|
|
color: #000;
|
|
|
}
|
|
|
+.xiaH{
|
|
|
+ position: absolute;left: 0;top: 44px;
|
|
|
+ z-index: 999;width: 100%;
|
|
|
+ background-color: rgb(232, 232, 233);
|
|
|
+ border-radius: 0 0 15px 15px;
|
|
|
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
|
+ padding: 15px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 10px;
|
|
|
+ min-height: 100px;
|
|
|
+ .xiaHCon{
|
|
|
+ // flex-shrink: 0;
|
|
|
+ width: auto;
|
|
|
+ height: 30px;
|
|
|
+ background: #fff;display: flex;
|
|
|
+ align-items: center;
|
|
|
+ border-radius: 5px;
|
|
|
+ padding: 0 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|