168 lines
7.0 KiB
HTML
168 lines
7.0 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" v-cloak>
|
|
<el-card shadow="never">
|
|
<search @search="doSearch">
|
|
<search-item label="名称" prop="name">
|
|
<el-input v-model="pageForm.name" clearable placeholder="请输入名称"></el-input>
|
|
</search-item>
|
|
</search>
|
|
</el-card>
|
|
<el-card shadow="never">
|
|
<el-table :data="tableData" header-align="center" border style="width: 100%">
|
|
<el-table-column label="序号" type="index" width="50px" :method="indexMethod"></el-table-column>
|
|
<el-table-column label="名称" prop="name"></el-table-column>
|
|
<el-table-column label="pc端链接" prop="url"></el-table-column>
|
|
<el-table-column label="h5端链接" prop="h5Url"></el-table-column>
|
|
<el-table-column label="封面" prop="cover" width="80px">
|
|
<template slot-scope="scope">
|
|
<el-image :src="scope.row.cover" v-if="scope.row.icon" style="width: 30px; height: 30px"></el-image>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="是否置顶" prop="top" width="100px">
|
|
<template slot-scope="scope">
|
|
<el-tag size="mini" v-if="scope.row.top" type="success">是</el-tag>
|
|
<el-tag size="mini" v-else type="info">否</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="推送大图" prop="push" width="100px">
|
|
<template slot-scope="scope">
|
|
<el-tag size="mini" v-if="scope.row.push" type="success">是</el-tag>
|
|
<el-tag size="mini" v-else type="info">否</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="关联类路径" prop="classPath" show-overflow-tooltip></el-table-column>
|
|
<el-table-column label="状态" prop="enable" width="80px">
|
|
<template slot-scope="scope">
|
|
<i v-if="!scope.row.enable" class="fa fa-circle text-danger ml5"></i>
|
|
<i v-else class="fa fa-circle text-success ml5"></i>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="250px">
|
|
<template slot-scope="scope">
|
|
<el-link type="danger" size="mini" @click="disable(scope.row.id)" v-if="scope.row.enable">关闭
|
|
</el-link>
|
|
<el-link type="primary" size="mini" @click="enable(scope.row.id)" v-if="!scope.row.enable">开启
|
|
</el-link>
|
|
<el-link type="primary" size="mini" @click="topUp(scope.row.id)" v-if="!scope.row.top">置顶
|
|
</el-link>
|
|
<el-link type="danger" size="mini" @click="cancelTopUp(scope.row.id)" v-if="scope.row.top">
|
|
取消置顶
|
|
</el-link>
|
|
<el-link type="primary" size="mini" @click="push(scope.row.id)" v-if="!scope.row.push">推送大图
|
|
</el-link>
|
|
<el-link type="danger" size="mini" @click="cancelPush(scope.row.id)" v-if="scope.row.push">
|
|
取消推送大图
|
|
</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</div>
|
|
|
|
<script nonce="${cspNonce!}">
|
|
new Vue({
|
|
el: "#app",
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {}
|
|
},
|
|
methods: {
|
|
disable(id) {
|
|
this.$confirm("您确定要关闭吗?", "提示", {
|
|
type: "warning",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消"
|
|
}).then(() => {
|
|
this.$axios.post(loc() + "/disable", {id}).then((resp) => {
|
|
if (resp.code === 0) {
|
|
this.$message.success(resp.msg)
|
|
this.pageData()
|
|
}
|
|
})
|
|
})
|
|
},
|
|
enable(id) {
|
|
this.$confirm("您确定要开启吗?", "提示", {
|
|
type: "warning",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消"
|
|
}).then(() => {
|
|
this.$axios.post(loc() + "/enable", {id}).then((resp) => {
|
|
if (resp.code === 0) {
|
|
this.$message.success(resp.msg)
|
|
this.pageData()
|
|
}
|
|
})
|
|
})
|
|
},
|
|
topUp(id) {
|
|
this.$confirm("您确定要置顶吗?", "提示", {
|
|
type: "warning",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消"
|
|
}).then(() => {
|
|
this.$axios.post(loc() + "/topUp", {id}).then((resp) => {
|
|
if (resp.code === 0) {
|
|
this.$message.success(resp.msg)
|
|
this.pageData()
|
|
}
|
|
})
|
|
})
|
|
},
|
|
cancelTopUp(id) {
|
|
this.$confirm("您确定要取消置顶吗?", "提示", {
|
|
type: "warning",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消"
|
|
}).then(() => {
|
|
this.$axios.post(loc() + "/cancelTopUp", {id}).then((resp) => {
|
|
if (resp.code === 0) {
|
|
this.$message.success(resp.msg)
|
|
this.pageData()
|
|
}
|
|
})
|
|
})
|
|
},
|
|
push(id) {
|
|
this.$confirm("您确定要推送大图吗?", "提示", {
|
|
type: "warning",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消"
|
|
}).then(() => {
|
|
this.$axios.post(loc() + "/push", {id}).then((resp) => {
|
|
if (resp.code === 0) {
|
|
this.$message.success(resp.msg)
|
|
this.pageData()
|
|
}
|
|
})
|
|
})
|
|
},
|
|
cancelPush(id) {
|
|
this.$confirm("您确定要取消推送大图吗?", "提示", {
|
|
type: "warning",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消"
|
|
}).then(() => {
|
|
this.$axios.post(loc() + "/cancelPush", {id}).then((resp) => {
|
|
if (resp.code === 0) {
|
|
this.$message.success(resp.msg)
|
|
this.pageData()
|
|
}
|
|
})
|
|
})
|
|
}
|
|
},
|
|
created() {
|
|
this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|