|
@@ -119,7 +119,7 @@
|
|
icon="el-icon-search"
|
|
icon="el-icon-search"
|
|
@click="getData"
|
|
@click="getData"
|
|
></el-button>
|
|
></el-button>
|
|
- <!-- <el-button type="primary" @click="releaseApp()">发布应用</el-button> -->
|
|
|
|
|
|
+ <!-- <el-button type="primary" @click="selectApp()">发布应用</el-button> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -154,8 +154,16 @@
|
|
</div>
|
|
</div>
|
|
<div class="ac_c_i_t_right">
|
|
<div class="ac_c_i_t_right">
|
|
<div class="ac_c_i_t_r_top">
|
|
<div class="ac_c_i_t_r_top">
|
|
- <span>{{ item.name }}</span>
|
|
|
|
- <div class="ac_c_i_t_popover">
|
|
|
|
|
|
+ <el-tooltip
|
|
|
|
+ class="item"
|
|
|
|
+ effect="light"
|
|
|
|
+ :content="item.name"
|
|
|
|
+ placement="top"
|
|
|
|
+ >
|
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+
|
|
|
|
+ <div class="ac_c_i_t_popover" v-if="showMenu(item)">
|
|
<div
|
|
<div
|
|
class="ac_c_i_t_p_box"
|
|
class="ac_c_i_t_p_box"
|
|
v-if="editAppCard === item.id"
|
|
v-if="editAppCard === item.id"
|
|
@@ -223,46 +231,71 @@
|
|
</div>
|
|
</div>
|
|
<div class="ac_c_i_bottom">
|
|
<div class="ac_c_i_bottom">
|
|
<div class="ac_c_i_b_left">
|
|
<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>
|
|
|
|
|
|
+ <el-tooltip
|
|
|
|
+ class="item"
|
|
|
|
+ effect="light"
|
|
|
|
+ content="被复制数"
|
|
|
|
+ placement="top"
|
|
|
|
+ >
|
|
|
|
+ <div>
|
|
|
|
+ <img src="../../../../assets/icon/appStore/user_copy.svg" />
|
|
|
|
+ <span>{{ item.copyCount }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <el-tooltip
|
|
|
|
+ class="item"
|
|
|
|
+ effect="light"
|
|
|
|
+ :content="item.likeId ? '取消点赞' : '点赞'"
|
|
|
|
+ placement="top"
|
|
|
|
+ >
|
|
|
|
+ <div>
|
|
|
|
+ <img
|
|
|
|
+ :src="
|
|
|
|
+ require('../../../../assets/icon/appStore/praise_default.svg')
|
|
|
|
+ "
|
|
|
|
+ v-if="!item.likeId"
|
|
|
|
+ style="cursor: pointer;"
|
|
|
|
+ @click="praiseFn(item, 0)"
|
|
|
|
+ />
|
|
|
|
+ <img
|
|
|
|
+ :src="
|
|
|
|
+ require('../../../../assets/icon/appStore/praise_active.svg')
|
|
|
|
+ "
|
|
|
|
+ v-else
|
|
|
|
+ style="cursor: pointer;"
|
|
|
|
+ @click="praiseFn(item, 1)"
|
|
|
|
+ />
|
|
|
|
+ <span>{{ item.likeCount }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <el-tooltip
|
|
|
|
+ class="item"
|
|
|
|
+ effect="light"
|
|
|
|
+ :content="item.collectId ? '取消收藏' : '收藏'"
|
|
|
|
+ placement="top"
|
|
|
|
+ >
|
|
|
|
+ <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>
|
|
|
|
+ </el-tooltip>
|
|
</div>
|
|
</div>
|
|
<div class="ac_c_i_b_right" v-if="item.json.status">
|
|
<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 class="ac_c_i_b_r_type2" v-if="item.json.status === '1'"
|
|
>测试</span
|
|
>测试</span
|
|
>
|
|
>
|
|
- <span class="ac_c_i_b_r_type1" v-if="item.json.status === '1'"
|
|
|
|
|
|
+ <span class="ac_c_i_b_r_type1" v-if="item.json.status === '2'"
|
|
>稳定</span
|
|
>稳定</span
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -387,9 +420,12 @@
|
|
:typeList="typeList"
|
|
:typeList="typeList"
|
|
@success="addAppSuccess"
|
|
@success="addAppSuccess"
|
|
/>
|
|
/>
|
|
- <selectAppDialog
|
|
|
|
- ref="selectAppDialogRef"
|
|
|
|
- @success="selectAppSuccess"/>
|
|
|
|
|
|
+ <selectAppDialog ref="selectAppDialogRef" @success="selectAppSuccess" />
|
|
|
|
+ <releaseAppDialog
|
|
|
|
+ ref="releaseAppDialogRef"
|
|
|
|
+ :typeList="typeList"
|
|
|
|
+ @success="releaseAppSuccess"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -415,13 +451,15 @@ const clickOutside = {
|
|
import addAppDialog from "../dialog/addAppDialog.vue";
|
|
import addAppDialog from "../dialog/addAppDialog.vue";
|
|
import saveCard from "../components/saveCard.vue";
|
|
import saveCard from "../components/saveCard.vue";
|
|
import selectAppDialog from "../dialog/selectAppDialog.vue";
|
|
import selectAppDialog from "../dialog/selectAppDialog.vue";
|
|
|
|
+import releaseAppDialog from "../dialog/releaseAppDialog.vue";
|
|
// import collectCard from "./dialog/collectCard.vue";
|
|
// import collectCard from "./dialog/collectCard.vue";
|
|
// import recentUseCard from "./dialog/recentUseCard.vue";
|
|
// import recentUseCard from "./dialog/recentUseCard.vue";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
addAppDialog,
|
|
addAppDialog,
|
|
saveCard,
|
|
saveCard,
|
|
- selectAppDialog
|
|
|
|
|
|
+ selectAppDialog,
|
|
|
|
+ releaseAppDialog
|
|
// collectCard,
|
|
// collectCard,
|
|
// recentUseCard
|
|
// recentUseCard
|
|
},
|
|
},
|
|
@@ -438,9 +476,7 @@ export default {
|
|
selectList: [
|
|
selectList: [
|
|
{ index: 3, label: "所有组织" },
|
|
{ index: 3, label: "所有组织" },
|
|
{ index: 2, label: "组织内" },
|
|
{ index: 2, label: "组织内" },
|
|
- // { index: 1, label: "我的" }
|
|
|
|
- // { index: 2, label: "组织" },
|
|
|
|
- // { index: 3, label: "所有人" }
|
|
|
|
|
|
+ { index: 1, label: "我的" }
|
|
],
|
|
],
|
|
labelSelect: [
|
|
labelSelect: [
|
|
{ value: "", label: "全部类型" },
|
|
{ value: "", label: "全部类型" },
|
|
@@ -475,6 +511,20 @@ export default {
|
|
}
|
|
}
|
|
return _result;
|
|
return _result;
|
|
};
|
|
};
|
|
|
|
+ },
|
|
|
|
+ showMenu() {
|
|
|
|
+ return data => {
|
|
|
|
+ let _result = false;
|
|
|
|
+ if (data && this.userId) {
|
|
|
|
+ if (
|
|
|
|
+ data.userid === this.userId ||
|
|
|
|
+ (data.json && data.json.copy === "1")
|
|
|
|
+ ) {
|
|
|
|
+ _result = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return _result;
|
|
|
|
+ };
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -524,9 +574,27 @@ export default {
|
|
addApp() {
|
|
addApp() {
|
|
this.$refs.addAppDialogRef.open({ type: 1 });
|
|
this.$refs.addAppDialogRef.open({ type: 1 });
|
|
},
|
|
},
|
|
- releaseApp() {
|
|
|
|
|
|
+ selectApp() {
|
|
this.$refs.selectAppDialogRef.open();
|
|
this.$refs.selectAppDialogRef.open();
|
|
},
|
|
},
|
|
|
|
+ selectAppSuccess(data) {
|
|
|
|
+ if (data) {
|
|
|
|
+ this.$refs.selectAppDialogRef.close();
|
|
|
|
+ this.$refs.releaseAppDialogRef.open({
|
|
|
|
+ form: {
|
|
|
|
+ id: data.id,
|
|
|
|
+ name: data.name,
|
|
|
|
+ label: data.label,
|
|
|
|
+ detail: data.detail,
|
|
|
|
+ url: data.url,
|
|
|
|
+ type: data.type,
|
|
|
|
+ juri: data.juri,
|
|
|
|
+ stand: data.stand,
|
|
|
|
+ json: data.json
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
updateApp(data) {
|
|
updateApp(data) {
|
|
this.$refs.addAppDialogRef.open({
|
|
this.$refs.addAppDialogRef.open({
|
|
type: 2,
|
|
type: 2,
|
|
@@ -575,6 +643,7 @@ export default {
|
|
if (res.data == 1) {
|
|
if (res.data == 1) {
|
|
this.$message.success("复制成功");
|
|
this.$message.success("复制成功");
|
|
this.getData();
|
|
this.getData();
|
|
|
|
+ this.insertSave(item, 3);
|
|
} else {
|
|
} else {
|
|
this.$message.error("复制失败");
|
|
this.$message.error("复制失败");
|
|
}
|
|
}
|
|
@@ -688,8 +757,38 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- selectAppSuccess(item){
|
|
|
|
- console.log(item)
|
|
|
|
|
|
+ releaseAppSuccess(data) {
|
|
|
|
+ this.$refs.releaseAppDialogRef.loading = true;
|
|
|
|
+ let params = [
|
|
|
|
+ {
|
|
|
|
+ aid: data.id,
|
|
|
|
+ name: data.name, //app名称
|
|
|
|
+ userid: this.userId, //创建的用户ID
|
|
|
|
+ label: data.label, //app标签
|
|
|
|
+ detail: data.detail, //app简介
|
|
|
|
+ url: data.url, //app链接
|
|
|
|
+ type: data.type, //app类型
|
|
|
|
+ juri: data.juri, //app权限 1:我的 2:组织 3:所有人
|
|
|
|
+ stand: "cn", //语言
|
|
|
|
+ json: JSON.stringify(data.json) //其他信息
|
|
|
|
+ }
|
|
|
|
+ ];
|
|
|
|
+ this.ajax
|
|
|
|
+ .post(this.$store.state.api + "update_appStore", params)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data == 1) {
|
|
|
|
+ this.$message.success("发布成功");
|
|
|
|
+ this.$refs.releaseAppDialogRef.close(true);
|
|
|
|
+ this.getData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("发布失败");
|
|
|
|
+ this.$refs.releaseAppDialogRef.loading = false;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(err => {
|
|
|
|
+ console.log(err);
|
|
|
|
+ this.$message.error("修改失败");
|
|
|
|
+ });
|
|
},
|
|
},
|
|
getTypeList() {
|
|
getTypeList() {
|
|
let params = {
|
|
let params = {
|
|
@@ -783,38 +882,37 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
insertSave(item, type) {
|
|
insertSave(item, type) {
|
|
- let params = [
|
|
|
|
- {
|
|
|
|
- uid: this.userId,
|
|
|
|
- type: type,
|
|
|
|
- aid: item.id,
|
|
|
|
- json: ""
|
|
|
|
- }
|
|
|
|
- ];
|
|
|
|
|
|
+ return new Promise(resolve => {
|
|
|
|
+ let params = [
|
|
|
|
+ {
|
|
|
|
+ uid: this.userId,
|
|
|
|
+ type: type,
|
|
|
|
+ aid: item.id,
|
|
|
|
+ json: ""
|
|
|
|
+ }
|
|
|
|
+ ];
|
|
|
|
|
|
- this.ajax
|
|
|
|
- .post(this.$store.state.api + "insert_appStoreSave", params)
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.data) {
|
|
|
|
- if (type === 1) {
|
|
|
|
- this.getRecentUse();
|
|
|
|
|
|
+ this.ajax
|
|
|
|
+ .post(this.$store.state.api + "insert_appStoreSave", params)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data) {
|
|
|
|
+ if (type === 1) {
|
|
|
|
+ resolve(1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- })
|
|
|
|
- .catch(err => {
|
|
|
|
- console.log(err);
|
|
|
|
- });
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch(err => {
|
|
|
|
+ resolve(0);
|
|
|
|
+ console.log(err);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
},
|
|
},
|
|
delApp(item) {
|
|
delApp(item) {
|
|
- this.$confirm(
|
|
|
|
- `确定要删除《${item.name}》这个应用吗,删除后无法找回!`,
|
|
|
|
- `确定删除应用`,
|
|
|
|
- {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
|
|
+ this.$confirm(`确定要删除《${item.name}》这个应用吗!`, `确定删除应用`, {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ })
|
|
.then(() => {
|
|
.then(() => {
|
|
let params = [
|
|
let params = [
|
|
{
|
|
{
|