|
@@ -9,8 +9,9 @@
|
|
|
<div class="ac_right">
|
|
|
<div class="ac_header">
|
|
|
<div class="ac_h_top">
|
|
|
- <span>应用管理</span>
|
|
|
- <!-- <span>知识库</span> -->
|
|
|
+ <span>应用管理</span>
|
|
|
+ <!-- <span class="ac_h_t_active">应用管理</span>
|
|
|
+ <span @click="changeShowPage(1)">工作空间</span> -->
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
@@ -20,11 +21,28 @@
|
|
|
>添加应用</el-button
|
|
|
>
|
|
|
</div>
|
|
|
+ <!-- <div class="ac_h_banner">
|
|
|
+ <img src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2Fae42534d-ee90-4bb1-8ef9-d344ee27b8241733733277828.jpg" alt="banner图">
|
|
|
+ </div> -->
|
|
|
<div class="ac_h_bottom">
|
|
|
- <div class="ac_h_b_selectList">
|
|
|
+ <div class="ac_h_b_typeList">
|
|
|
+ <span
|
|
|
+ :class="{ ac_h_b_typeList_active: showType === '' }"
|
|
|
+ @click="changeType('')"
|
|
|
+ >全部</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ v-for="item in typeList"
|
|
|
+ :key="item.id"
|
|
|
+ :class="{ ac_h_b_typeList_active: showType === item.id }"
|
|
|
+ @click="changeType(item.id)"
|
|
|
+ >{{ item.name }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="ac_h_b_selectList">
|
|
|
<el-input
|
|
|
v-model="searchText"
|
|
|
- style="width: 200px;"
|
|
|
+ style="width: 200px;margin-right: 10px;"
|
|
|
placeholder="请输入应用名称"
|
|
|
@keyup.enter.native="getData"
|
|
|
/>
|
|
@@ -48,21 +66,6 @@
|
|
|
></el-button>
|
|
|
<el-button type="primary" @click="resetData">重置</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="ac_h_b_typeList">
|
|
|
- <span
|
|
|
- :class="{ ac_h_b_typeList_active: showType === '' }"
|
|
|
- @click="changeType('')"
|
|
|
- >全部</span
|
|
|
- >
|
|
|
- <span
|
|
|
- v-for="item in typeList"
|
|
|
- :key="item.id"
|
|
|
- :class="{ ac_h_b_typeList_active: showType === item.id }"
|
|
|
- @click="changeType(item.id)"
|
|
|
- >{{ item.name }}</span
|
|
|
- >
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -121,7 +124,9 @@
|
|
|
|
|
|
<div @click.stop="cancelCollectApp(item)" v-if="collect.map(i=>i.id).includes(item.id)">取消收藏</div>
|
|
|
<div @click.stop="collectApp(item)" v-else>收藏</div>
|
|
|
- <div @click.stop="updateApp(item)" v-if="item.userid == userId">修改</div>
|
|
|
+ <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"
|
|
@@ -301,6 +306,44 @@ export default {
|
|
|
this.editAppCard = null;
|
|
|
this.insertSave(item,0)
|
|
|
},
|
|
|
+ //复制app
|
|
|
+ copyApp(item){
|
|
|
+ this.$confirm(`确定复制《${item.name}》这个应用吗?`,"复制",{
|
|
|
+ confirmButtonText:"确定",
|
|
|
+ cancelButtonText:"取消",
|
|
|
+ type:"warning"
|
|
|
+ }).then(()=>{
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ name: `${item.name}_copy`, //app名称
|
|
|
+ userid: this.userId, //创建的用户ID
|
|
|
+ label: item.label, //app标签
|
|
|
+ detail: item.detail, //app简介
|
|
|
+ url: item.url, //app链接
|
|
|
+ type: item.type, //app类型
|
|
|
+ juri: "1", //app权限 1:我的 2:组织 3:所有人
|
|
|
+ stand: "cn", //语言
|
|
|
+ json: JSON.stringify(item.json) //其他信息
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "insert_appStore", params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data == 1) {
|
|
|
+ this.$message.success("复制成功");
|
|
|
+ this.getData();
|
|
|
+ } else {
|
|
|
+ this.$message.error("复制失败");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err);
|
|
|
+ this.$message.error("复制失败");
|
|
|
+ });
|
|
|
+ }).catch(_=>{
|
|
|
+ console.log("取消复制")
|
|
|
+ })
|
|
|
+ },
|
|
|
// 取消收藏
|
|
|
cancelCollectApp(item){
|
|
|
this.editAppCard = null;
|
|
@@ -502,6 +545,34 @@ export default {
|
|
|
if(type===0)this.$message.error("收藏失败")
|
|
|
})
|
|
|
|
|
|
+ },
|
|
|
+ delApp(item){
|
|
|
+ this.$confirm(`确定要删除《${item.name}》这个应用吗,删除后无法找回!`, `确定删除应用`, {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ 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("删除失败");
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err);
|
|
|
+ this.$message.error("删除失败");
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ console.log("取消删除");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeShowPage(newPage){
|
|
|
+ this.$emit("changeShowCard",newPage)
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -569,21 +640,54 @@ export default {
|
|
|
|
|
|
.ac_h_top > span {
|
|
|
font-size: 26px;
|
|
|
+ position: relative;
|
|
|
+ margin-right: 25px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_h_t_active::after{
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ height: 3px;
|
|
|
+ border-radius: 4px;
|
|
|
+ background-color: #409EFF;
|
|
|
+ left: 0;
|
|
|
+ bottom: -5px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_h_banner{
|
|
|
+ width: 100%;
|
|
|
+ height: 200px;
|
|
|
+ border-radius: 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_h_banner>img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit:cover;
|
|
|
+ border-radius: 5px;
|
|
|
}
|
|
|
|
|
|
.ac_h_bottom {
|
|
|
width: 100%;
|
|
|
height: auto;
|
|
|
- padding: 10px 0 20px 0;
|
|
|
+ padding: 10px 15px 10px 15px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
.ac_h_b_typeList {
|
|
|
- width: 100%;
|
|
|
+ width: calc(100% - 400px);
|
|
|
height: auto;
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 0 15px;
|
|
|
}
|
|
|
|
|
|
.ac_h_b_typeList > span {
|
|
@@ -601,6 +705,8 @@ export default {
|
|
|
.ac_h_b_selectList {
|
|
|
margin-left: 15px;
|
|
|
margin-bottom: 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
.ac_content {
|