|
@@ -0,0 +1,114 @@
|
|
|
|
+<!-- 运营管理 微信轮播图banner -->
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <!-- 搜索 -->
|
|
|
|
+ <el-form inline size="mini">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" icon="el-icon-plus" plain @click="getDetail(false, 0, 0)"
|
|
|
|
+ v-hasPermi="['operation:wxbanner:add']">新增</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <el-table :data="tableData" v-loading="loading">
|
|
|
|
+ <el-table-column label="序号" align="center" type="index" />
|
|
|
|
+ <el-table-column label="跳转方式" align="center" prop="name" show-overflow-tooltip />
|
|
|
|
+
|
|
|
|
+ <el-table-column label="当前状态" prop="categoryName" align="center" />
|
|
|
|
+
|
|
|
|
+ <el-table-column label="更新时间" align="center" prop="updateTimeStr" />
|
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTimeStr" />
|
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button type="text" @click="getDetail(true, 1, scope.row.id)"
|
|
|
|
+ v-hasPermi="['operation:wxbannber:check']">查看</el-button>
|
|
|
|
+
|
|
|
|
+ <span style="margin: 0 10px">
|
|
|
|
+ <el-button type="text" @click="getDetail(false, 2, scope.row.id)"
|
|
|
|
+ v-hasPermi="['operation:wxbannber:edit']">编辑</el-button>
|
|
|
|
+
|
|
|
|
+ <el-button type="delete" @click="getDelete(scope.row)"
|
|
|
|
+ v-hasPermi="['operation:wxbannber:delete']">删除</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <pagination v-show="total > 0" :total="total" :page.sync="form.pageNum" :limit.sync="form.pageSize"
|
|
|
|
+ @pagination="getList" />
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { deletes, list } from "@/api/operation/wxbanner";
|
|
|
|
+import { currentMixin, devMixin, disabledMixin } from "@/mixin/index";
|
|
|
|
+import { dialogCallBack } from "@/utils/DialogUtil";
|
|
|
|
+export default {
|
|
|
|
+ mixins: [devMixin, currentMixin, disabledMixin],
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ // 遮罩层
|
|
|
|
+ loading: false,
|
|
|
|
+ // 表单
|
|
|
|
+ form: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ },
|
|
|
|
+ // 总数据
|
|
|
|
+ total: 0,
|
|
|
|
+ // 列表
|
|
|
|
+ tableData: [],
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ watch: {},
|
|
|
|
+ mounted() {
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ methods: {
|
|
|
|
+ addData() { },
|
|
|
|
+ // 列表
|
|
|
|
+ getList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ list(this.form).then((res) => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ this.tableData = res.data.records;
|
|
|
|
+ this.total = res.data.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 轮播图详情
|
|
|
|
+ getDetail(boolean, state, id) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: `/operation/wxbanner/detail`,
|
|
|
|
+ query: {
|
|
|
|
+ id: id,
|
|
|
|
+ boolean: boolean,
|
|
|
|
+ state: state,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 删除
|
|
|
|
+ getDelete(row) {
|
|
|
|
+ var that = this;
|
|
|
|
+ dialogCallBack(that, function () {
|
|
|
|
+ that
|
|
|
|
+ .$confirm(`是否删除${row.name}?`, "提示:", {
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ deletes(row.id, 2).then((res) => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ that.$message.success("删除成功!");
|
|
|
|
+ that.getList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|