Explorar el Código

feat: 处理标签分类、设备大类、歌手、多添加一层谨慎操作提示

Damon hace 9 meses
padre
commit
07b194b566

+ 198 - 77
src/views/device/class/index.vue

@@ -1,75 +1,189 @@
+<!-- 设备管理 设备大类˝ -->
 <template>
-  <div class='app-container'>
+  <div class="app-container">
     <!-- 搜索 -->
     <el-form inline size="mini">
       <el-form-item label="大类名称:">
         <el-input v-model="form.name" placeholder="请输入大类名称" clearable />
       </el-form-item>
       <el-form-item label="设备分类:">
-        <el-select v-model="form.categoryId" placeholder="请选择设备分类" clearable>
-          <el-option v-for="item in categoryOptions" :key="item.value" :value="item.value" :label="item.label" />
+        <el-select
+          v-model="form.categoryId"
+          placeholder="请选择设备分类"
+          clearable
+        >
+          <el-option
+            v-for="item in categoryOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="当前状态:">
         <el-select v-model="form.status" placeholder="请选择当前状态" clearable>
-          <el-option v-for="item in onOrOffOptions" :key="item.value" :value="item.value" :label="item.label" />
+          <el-option
+            v-for="item in onOrOffOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="是否热门:">
         <el-select v-model="form.isHot" placeholder="请选择是否热门" clearable>
-          <el-option v-for="item in yesOrNoOptions" :key="item.value" :value="item.value" :label="item.label" />
+          <el-option
+            v-for="item in yesOrNoOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="getSearch"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" icon="el-icon-plus" plain @click="getDetail()"
-          v-hasPermi="['device:class:add']">新增</el-button>
-        <el-button type="primary" :disabled="ids === ''" @click="getChange(ids, 1, '批量上架')"
-          v-hasPermi="['device:class:up']">批量上架</el-button>
-        <el-button type="primary" :disabled="ids === ''" @click="getChange(ids, 2, '批量下架')"
-          v-hasPermi="['device:class:down']">批量下架</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          plain
+          @click="getDetail()"
+          v-hasPermi="['device:class:add']"
+          >新增</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="ids === ''"
+          @click="getChange(ids, 1, '批量上架')"
+          v-hasPermi="['device:class:up']"
+          >批量上架</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="ids === ''"
+          @click="getChange(ids, 2, '批量下架')"
+          v-hasPermi="['device:class:down']"
+          >批量下架</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
-    <el-table :data="tableData" v-loading="loading" @selection-change="handleSelection">
+    <el-table
+      :data="tableData"
+      v-loading="loading"
+      @selection-change="handleSelection"
+    >
       <el-table-column type="selection" align="center" />
-      <el-table-column label="大类Id" prop="id" align="center" show-overflow-tooltip />
+      <el-table-column
+        label="大类Id"
+        prop="id"
+        align="center"
+        show-overflow-tooltip
+      />
       <el-table-column label="大类名称" prop="name" align="center" />
       <el-table-column label="设备图片" align="center" width="100px">
-        <template slot-scope="scope"><el-image :src="scope.row.img" /></template>
+        <template slot-scope="scope"
+          ><el-image :src="scope.row.img"
+        /></template>
       </el-table-column>
-      <el-table-column label="设备分类" prop="categoryId" align="center" :formatter="categoryIdFormatter" />
-      <el-table-column label="设备类型" prop="type" align="center" :formatter="typeFormatter" />
-      <el-table-column label="是否热门" prop="isHot" align="center" :formatter="isHotFormatter" />
-      <el-table-column label="关联设备" prop="deviceIds" align="center" :formatter="deviceFormatter" show-overflow-tooltip />
-      <el-table-column label="当前状态" prop="status" align="center" :formatter="statusFormatter" />
+      <el-table-column
+        label="设备分类"
+        prop="categoryId"
+        align="center"
+        :formatter="categoryIdFormatter"
+      />
+      <el-table-column
+        label="设备类型"
+        prop="type"
+        align="center"
+        :formatter="typeFormatter"
+      />
+      <el-table-column
+        label="是否热门"
+        prop="isHot"
+        align="center"
+        :formatter="isHotFormatter"
+      />
+      <el-table-column
+        label="关联设备"
+        prop="deviceIds"
+        align="center"
+        :formatter="deviceFormatter"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        label="当前状态"
+        prop="status"
+        align="center"
+        :formatter="statusFormatter"
+      />
       <el-table-column label="更新时间" prop="updateTime" align="center" />
       <el-table-column label="创建时间" prop="createTime" align="center" />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
-          <el-button v-if="scope.row.status === 1" type="text" @click="getChange(scope.row.id, 2, '下架')"
-            v-hasPermi="['device:class:down']">下架</el-button>
-          <span v-else style="margin-left: 10px;">
-            <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['device:class:edit']">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row.id, 1, '上架')"
-              v-hasPermi="['device:class:up']">上架</el-button>
-            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['device:class:delete']">删除</el-button>
+          <el-button type="text" @click="getDetail(scope.row.id, true)"
+            >查看</el-button
+          >
+          <el-button
+            v-if="scope.row.status === 1"
+            type="text"
+            @click="getChange(scope.row.id, 2, '下架')"
+            v-hasPermi="['device:class:down']"
+            >下架</el-button
+          >
+          <span v-else style="margin-left: 10px">
+            <el-button
+              type="text"
+              @click="getDetail(scope.row.id)"
+              v-hasPermi="['device:class:edit']"
+              >编辑</el-button
+            >
+            <el-button
+              type="text"
+              @click="getChange(scope.row.id, 1, '上架')"
+              v-hasPermi="['device:class:up']"
+              >上架</el-button
+            >
+            <el-button
+              type="delete"
+              @click="getDelete(scope.row)"
+              v-hasPermi="['device:class: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" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="form.pageNum"
+      :limit.sync="form.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
 <script>
-import { list, change } from '@/api/device/class'
-import { devCategoryMixin, devMixin, onOrOffMixin, devTypeMixin, yesOrNoMixin } from '@/mixin/index'
+import { change, list } from "@/api/device/class";
+import {
+devCategoryMixin,
+devMixin,
+devTypeMixin,
+onOrOffMixin,
+yesOrNoMixin,
+} from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
-  mixins: [devCategoryMixin, devMixin, onOrOffMixin, devTypeMixin, yesOrNoMixin],
+  mixins: [
+    devCategoryMixin,
+    devMixin,
+    onOrOffMixin,
+    devTypeMixin,
+    yesOrNoMixin,
+  ],
   data() {
     return {
       // 遮罩层
@@ -77,108 +191,115 @@ export default {
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 总数据
       total: 0,
       // 列表
       tableData: [],
       // 批量上下架
-      ids: ''
-    }
+      ids: "",
+    };
   },
   mounted() {
-    this.getDevList()
-    this.getCateGory(1)
-    this.getList()
+    this.getDevList();
+    this.getCateGory(1);
+    this.getList();
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list(this.form).then(res => {
+      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
+          this.tableData = res.data.records;
+          this.total = res.data.total;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 搜索
     getSearch() {
-      this.form.pageNum = 1
-      this.getList()
+      this.form.pageNum = 1;
+      this.getList();
     },
 
     // 重置
     getRefresh() {
       this.form = {
         pageNum: 1,
-        pageSize: 10
-      }
-      this.getList()
+        pageSize: 10,
+      };
+      this.getList();
     },
 
     // 新增
     getDetail(id, boolean) {
       this.$router.push({
-        path: '/device/class/detail',
+        path: "/device/class/detail",
         query: {
           id: id,
-          boolean: boolean
-        }
-      })
+          boolean: boolean,
+        },
+      });
     },
 
     // 多选
     handleSelection(e) {
       if (e.length > 0) {
-        let arr = []
-        e.filter(i => {
-          arr.push(i.id)
-          this.ids = arr.join(',')
-        })
+        let arr = [];
+        e.filter((i) => {
+          arr.push(i.id);
+          this.ids = arr.join(",");
+        });
       } else {
-        this.ids = ''
+        this.ids = "";
       }
     },
 
     // 上架 下架 删除
     getChange(ids, status, title) {
-      change(ids, status).then(res => {
+      change(ids, status).then((res) => {
         if (res.code === 0) {
-          this.$message.success(`${title}成功!`)
-          this.getList()
+          this.$message.success(`${title}成功!`);
+          this.getList();
         }
-      })
+      });
     },
 
     // 删除
     getDelete(e) {
-      this.$confirm(`是否删除${e.name}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        this.getChange(e.id, 0, '删除')
-      })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${e.name}?`, "提示", {
+            type: "warning",
+          })
+          .then(() => {
+            that.getChange(e.id, 0, "删除");
+          });
+      });
     },
 
     // 字典翻译
     categoryIdFormatter(row) {
-      return this.selectDictLabel(this.categoryOptions, row.categoryId)
+      return this.selectDictLabel(this.categoryOptions, row.categoryId);
     },
     typeFormatter(row) {
-      return this.selectDictLabel(this.devTypeOptions, row.type)
+      return this.selectDictLabel(this.devTypeOptions, row.type);
     },
     isHotFormatter(row) {
-      return this.selectDictLabel(this.yesOrNoOptions, row.isHot)
+      return this.selectDictLabel(this.yesOrNoOptions, row.isHot);
     },
     deviceFormatter(row) {
-      return row.deviceIds.split(',').map(i => this.selectDictLabel(this.devOptions, i))
+      return row.deviceIds
+        .split(",")
+        .map((i) => this.selectDictLabel(this.devOptions, i));
     },
     statusFormatter(row) {
-      return this.selectDictLabel(this.onOrOffOptions, row.status)
-    }
-  }
-}
+      return this.selectDictLabel(this.onOrOffOptions, row.status);
+    },
+  },
+};
 </script>

+ 1 - 1
src/views/device/function/index.vue

@@ -190,7 +190,7 @@ export default {
       var that = this;
       dialogCallBack(that, function () {
         that
-          .$confirm(`是否删除${row.name}?`, "提示:", {
+          .$confirm(`是否删除${row.name}?`, "提示:", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning",

+ 135 - 67
src/views/music/anchor/index.vue

@@ -1,27 +1,52 @@
+<!-- 音频管理 主播 -->
 <template>
   <div class="app-container">
     <!-- 搜索 -->
     <el-form inline size="mini">
       <el-form-item label="主播名称:">
-        <el-input v-model="form.nickname" placeholder="请输入主播名称" clearable />
+        <el-input
+          v-model="form.nickname"
+          placeholder="请输入主播名称"
+          clearable
+        />
       </el-form-item>
       <el-form-item label="资源平台:">
-        <el-select v-model="form.platformId" placeholder="请选择资源平台" clearable>
-          <el-option v-for="item in platformOptions" :key="item.value" :value="item.value"
-            :label="item.label" />
+        <el-select
+          v-model="form.platformId"
+          placeholder="请选择资源平台"
+          clearable
+        >
+          <el-option
+            v-for="item in platformOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="当前状态:">
         <el-select v-model="form.status" placeholder="请选择当前状态" clearable>
-          <el-option v-for="item in onOrOffOptions" :key="item.value" :value="item.value"
-            :label="item.label" />
+          <el-option
+            v-for="item in onOrOffOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="getSearch"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" @click="getDetail()"
-          v-hasPermi="['music:anchor:add']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          @click="getDetail()"
+          v-hasPermi="['music:anchor:add']"
+          >新增</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
@@ -33,32 +58,68 @@
           <el-image v-if="scope.row.avatar" :src="scope.row.avatar" />
         </template>
       </el-table-column>
-      <el-table-column label="资源平台" prop="platformId" align="center" :formatter="platformFormatter" />
-      <el-table-column label="当前状态" prop="status" align="center" :formatter="statusFormatter" />
+      <el-table-column
+        label="资源平台"
+        prop="platformId"
+        align="center"
+        :formatter="platformFormatter"
+      />
+      <el-table-column
+        label="当前状态"
+        prop="status"
+        align="center"
+        :formatter="statusFormatter"
+      />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
+          <el-button type="text" @click="getDetail(scope.row.id, true)"
+            >查看</el-button
+          >
           <span v-if="scope.row.status === 2">
-            <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['music:anchor:edit']"
-              style="margin-left: 10px">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row, 1)" v-hasPermi="['music:anchor:up']">上架
+            <el-button
+              type="text"
+              @click="getDetail(scope.row.id)"
+              v-hasPermi="['music:anchor:edit']"
+              style="margin-left: 10px"
+              >编辑</el-button
+            >
+            <el-button
+              type="text"
+              @click="getChange(scope.row, 1)"
+              v-hasPermi="['music:anchor:up']"
+              >上架
             </el-button>
-            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['music:anchor:delete']">删除
+            <el-button
+              type="delete"
+              @click="getDelete(scope.row)"
+              v-hasPermi="['music:anchor:delete']"
+              >删除
             </el-button>
           </span>
-          <el-button v-else type="text" @click="getChange(scope.row, 2)" v-hasPermi="['music:anchor:down']">下架
+          <el-button
+            v-else
+            type="text"
+            @click="getChange(scope.row, 2)"
+            v-hasPermi="['music:anchor:down']"
+            >下架
           </el-button>
         </template>
       </el-table-column>
     </el-table>
-    <pagination v-show="total>0" :total="total" :page.sync="form.pageNum" :limit.sync="form.pageSize"
-      @pagination="getList" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="form.pageNum"
+      :limit.sync="form.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
 <script>
-import { list, change, remove } from '@/api/music/anchor'
-import { platformMixin, onOrOffMixin } from '@/mixin/index'
+import { change, list, remove } from "@/api/music/anchor";
+import { onOrOffMixin, platformMixin } from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [platformMixin, onOrOffMixin],
   data() {
@@ -68,47 +129,47 @@ export default {
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 总数据
       total: 0,
       // 列表
-      tableData: []
-    }
+      tableData: [],
+    };
   },
   mounted() {
     // 获取资源平台
     this.getPlatform({
-      audioType: 12
-    })
-    this.getList()
+      audioType: 12,
+    });
+    this.getList();
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list(this.form).then(res => {
+      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
+          this.tableData = res.data.records;
+          this.total = res.data.total;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 搜索
     getSearch() {
-      this.form.pageNum = 1
-      this.getList()
+      this.form.pageNum = 1;
+      this.getList();
     },
 
     // 重置
     getRefresh() {
       this.form = {
         pageNum: 1,
-        pageSize: 10
-      }
-      this.getList()
+        pageSize: 10,
+      };
+      this.getList();
     },
 
     // 新增 查看 编辑
@@ -117,51 +178,58 @@ export default {
         path: `/music/anchor/detail`,
         query: {
           id: id,
-          disabled: boolean
-        }
-      })
+          disabled: boolean,
+        },
+      });
     },
 
     // 上下架
     getChange(row, status) {
-      let title = status === 1 ? '上架' : '下架'
-      this.$confirm(`是否${title}${row.nickname}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        change(row.id, status).then(res => {
-          if (res.code === 0) {
-            this.$message.success(`${title}成功!`)
-            this.getList()
-          }
+      let title = status === 1 ? "上架" : "下架";
+      this.$confirm(`是否${title}${row.nickname}?`, "提示", {
+        type: "warning",
+      })
+        .then(() => {
+          change(row.id, status).then((res) => {
+            if (res.code === 0) {
+              this.$message.success(`${title}成功!`);
+              this.getList();
+            }
+          });
         })
-      }).catch(() => { })
+        .catch(() => {});
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.nickname}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        remove(row.id).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      }).catch(() => { })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${row.nickname}?`, "提示", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.id).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
     },
 
-
     // 字典翻译
     platformFormatter(row) {
-      return this.selectDictLabel(this.platformOptions, row.platformId)
+      return this.selectDictLabel(this.platformOptions, row.platformId);
     },
 
     statusFormatter(row) {
-      return this.selectDictLabel(this.onOrOffOptions, row.status)
-    }
-  }
-}
+      return this.selectDictLabel(this.onOrOffOptions, row.status);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 18 - 12
src/views/music/blog/index.vue

@@ -1,3 +1,4 @@
+<!-- 音频管理 播客专辑 -->
 <template>
   <div class="app-container">
     <!-- 搜索 -->
@@ -217,6 +218,7 @@ onOrOffMixin,
 payTypeMixin,
 platformMixin,
 } from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [payTypeMixin, onOrOffMixin, platformMixin, blogClassMixin],
   data() {
@@ -304,18 +306,22 @@ export default {
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.name}?`, "提示", {
-        type: "warning",
-      })
-        .then(() => {
-          remove(row.id).then((res) => {
-            if (res.code === 0) {
-              this.$message.success("删除成功!");
-              this.getList();
-            }
-          });
-        })
-        .catch(() => {});
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${row.name}?`, "提示", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.id).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
     },
 
     // 多选

+ 124 - 61
src/views/music/choiceness/index.vue

@@ -1,3 +1,4 @@
+<!-- 音频管理 猫王精选电台 -->
 <template>
   <div class="app-container">
     <!-- 搜索 -->
@@ -7,59 +8,116 @@
       </el-form-item>
       <el-form-item label="当前状态:">
         <el-select v-model="form.status" placeholder="请选择当前状态">
-          <el-option v-for="item in onOrOffOptions" :key="item.value" :label="item.label" :value="item.value" clearable />
+          <el-option
+            v-for="item in onOrOffOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+            clearable
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="getSearch"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refrash" @click="getRefrash">重置</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" @click="getDetail()"
-          v-hasPermi="['music:choiceness:add']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          @click="getDetail()"
+          v-hasPermi="['music:choiceness:add']"
+          >新增</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
     <el-table :data="tableData" v-loading="loading">
       <el-table-column type="index" label="序号" align="center" />
-      <el-table-column label="电台ID" prop="id" align="center" show-overflow-tooltip />
+      <el-table-column
+        label="电台ID"
+        prop="id"
+        align="center"
+        show-overflow-tooltip
+      />
       <el-table-column label="电台名称" prop="name" align="center" />
       <el-table-column label="电台封面" align="center" width="100px">
         <template slot-scope="scope">
           <el-image v-if="scope.row.thumb" :src="scope.row.thumb" />
         </template>
       </el-table-column>
-      <el-table-column label="资源平台" prop="platformId" align="center" :formatter="platformFormatter" />
-      <el-table-column label="当前状态" prop="status" align="center" :formatter="statusFormatter" />
+      <el-table-column
+        label="资源平台"
+        prop="platformId"
+        align="center"
+        :formatter="platformFormatter"
+      />
+      <el-table-column
+        label="当前状态"
+        prop="status"
+        align="center"
+        :formatter="statusFormatter"
+      />
       <el-table-column label="更新时间" align="center">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+          <span>{{
+            parseTime(scope.row.updateTime, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
-          <el-button v-if="scope.row.status === 1" type="text" @click="getChange(scope.row, 2)"
-            v-hasPermi="['music:choiceness:down']">下架</el-button>
+          <el-button type="text" @click="getDetail(scope.row.id, true)"
+            >查看</el-button
+          >
+          <el-button
+            v-if="scope.row.status === 1"
+            type="text"
+            @click="getChange(scope.row, 2)"
+            v-hasPermi="['music:choiceness:down']"
+            >下架</el-button
+          >
           <span v-else>
-            <el-button type="text" style="margin-left: 10px" @click="getDetail(scope.row.id)"
-              v-hasPermi="['music:choiceness:edit']">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row, 1)" v-hasPermi="['music:choiceness:up']">
+            <el-button
+              type="text"
+              style="margin-left: 10px"
+              @click="getDetail(scope.row.id)"
+              v-hasPermi="['music:choiceness:edit']"
+              >编辑</el-button
+            >
+            <el-button
+              type="text"
+              @click="getChange(scope.row, 1)"
+              v-hasPermi="['music:choiceness:up']"
+            >
               上架
             </el-button>
-            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['music:choiceness:delete']">
+            <el-button
+              type="delete"
+              @click="getDelete(scope.row)"
+              v-hasPermi="['music:choiceness: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" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="form.pageNum"
+      :limit.sync="form.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
 <script>
-import { list, change, remove } from '@/api/music/choiceness'
-import { onOrOffMixin, platformMixin } from '@/mixin/index'
+import { change, list, remove } from "@/api/music/choiceness";
+import { onOrOffMixin, platformMixin } from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [onOrOffMixin, platformMixin],
   data() {
@@ -69,43 +127,43 @@ export default {
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       total: 0,
       // 列表
-      tableData: []
-    }
+      tableData: [],
+    };
   },
   mounted() {
-    this.getList()
-    this.getPlatform({})
+    this.getList();
+    this.getPlatform({});
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list(this.form).then(res => {
+      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
+          this.tableData = res.data.records;
+          this.total = res.data.total;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 搜索
     getSearch() {
-      this.form.pageNum = 1
-      this.getList()
+      this.form.pageNum = 1;
+      this.getList();
     },
 
     // 重置
     getRefrash() {
       this.form = {
         pageNum: 1,
-        pageSize: 10
-      }
-      this.getList()
+        pageSize: 10,
+      };
+      this.getList();
     },
 
     // 详情
@@ -114,49 +172,54 @@ export default {
         path: `/music/choiceness/detail`,
         query: {
           id: id,
-          disabled: boolean
-        }
-      })
+          disabled: boolean,
+        },
+      });
     },
 
     // 上下架
     getChange(row, status) {
-      let title = status === 1 ? '上架' : '下架'
-      this.$confirm(`是否${title}${row.name}?`, '提示', {
-        type: 'warning'
+      let title = status === 1 ? "上架" : "下架";
+      this.$confirm(`是否${title}${row.name}?`, "提示", {
+        type: "warning",
       }).then(() => {
-        change(row.id, status).then(res => {
+        change(row.id, status).then((res) => {
           if (res.code === 0) {
-            this.$message.success(`${title}成功!`)
-            this.getList()
+            this.$message.success(`${title}成功!`);
+            this.getList();
           }
-        })
-      })
+        });
+      });
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.name}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        remove(row.id).then(res => {
-          if (res.code === 0) {
-            this.$message.success(`删除成功!`)
-            this.getList()
-          }
-        })
-      })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${row.name}?`, "提示", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.id).then((res) => {
+              if (res.code === 0) {
+                that.$message.success(`删除成功!`);
+                that.getList();
+              }
+            });
+          });
+      });
     },
 
     // 字典翻译
     platformFormatter(row) {
-      return this.selectDictLabel(this.platformTypeOptions, row.platformId)
+      return this.selectDictLabel(this.platformTypeOptions, row.platformId);
     },
     statusFormatter(row) {
-      return this.selectDictLabel(this.onOrOffOptions, row.status)
-    }
-  }
-}
+      return this.selectDictLabel(this.onOrOffOptions, row.status);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped></style>

+ 192 - 79
src/views/music/program/index.vue

@@ -1,3 +1,4 @@
+<!-- 音频管理 节目 -->
 <template>
   <div class="app-container">
     <!-- 搜索 -->
@@ -9,75 +10,177 @@
         <el-input v-model="form.name" placeholder="请选择节目名称" clearable />
       </el-form-item>
       <el-form-item label="资源平台:">
-        <el-select v-model="form.platformId" placeholder="请选择资源平台" clearable>
-          <el-option v-for="item in platformOptions" :key="item.value" :value="item.value" :label="item.label" />
+        <el-select
+          v-model="form.platformId"
+          placeholder="请选择资源平台"
+          clearable
+        >
+          <el-option
+            v-for="item in platformOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="付费类型:">
         <el-select v-model="form.isFree" placeholder="请选择付费类型" clearable>
-          <el-option v-for="item in freeOptions" :key="item.value" :value="item.value" :label="item.label" />
+          <el-option
+            v-for="item in freeOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="当前状态:">
         <el-select v-model="form.status" placeholder="请选择当前状态" clearable>
-          <el-option v-for="item in onOrOffOptions" :key="item.value" :label="item.label" :value="item.value" />
+          <el-option
+            v-for="item in onOrOffOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="getSearch"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" @click="getDetail()"
-          v-hasPermi="['music:program:add']">新增</el-button>
-        <el-button type="primary" :disabled="obj.id === ''" @click="getChange(obj, 1)"
-          v-hasPermi="['music:program:up']">批量上架</el-button>
-        <el-button type="primary" :disabled="obj.id === ''" @click="getChange(obj, 2)"
-          v-hasPermi="['music:program:down']">批量下架</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          @click="getDetail()"
+          v-hasPermi="['music:program:add']"
+          >新增</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="obj.id === ''"
+          @click="getChange(obj, 1)"
+          v-hasPermi="['music:program:up']"
+          >批量上架</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="obj.id === ''"
+          @click="getChange(obj, 2)"
+          v-hasPermi="['music:program:down']"
+          >批量下架</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
-    <el-table :data="tableData" v-loading="loading" @selection-change="handleSelect">
+    <el-table
+      :data="tableData"
+      v-loading="loading"
+      @selection-change="handleSelect"
+    >
       <el-table-column type="selection" align="center" />
-      <el-table-column label="节目Id" prop="id" align="center" show-overflow-tooltip />
-      <el-table-column label="节目名称" prop="name" align="center" show-overflow-tooltip />
-      <el-table-column label="付费类型" prop="isFree" align="center" :formatter="freeFormatter" width="100px" />
+      <el-table-column
+        label="节目Id"
+        prop="id"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        label="节目名称"
+        prop="name"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        label="付费类型"
+        prop="isFree"
+        align="center"
+        :formatter="freeFormatter"
+        width="100px"
+      />
       <el-table-column label="原价 / 元" prop="price" align="center" />
-      <el-table-column label="折扣价 / 元" prop="discountedPrice" align="center" />
+      <el-table-column
+        label="折扣价 / 元"
+        prop="discountedPrice"
+        align="center"
+      />
       <el-table-column label="所属专辑" prop="podcastName" align="center" />
-      <el-table-column label="资源平台" prop="platformId" align="center" :formatter="platformFormatter" />
-      <el-table-column label="当前状态" prop="status" align="center" :formatter="statusFormatter" width="100px" />
+      <el-table-column
+        label="资源平台"
+        prop="platformId"
+        align="center"
+        :formatter="platformFormatter"
+      />
+      <el-table-column
+        label="当前状态"
+        prop="status"
+        align="center"
+        :formatter="statusFormatter"
+        width="100px"
+      />
       <el-table-column label="更新时间" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+          <span>{{
+            parseTime(scope.row.updateTime, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
+          <el-button type="text" @click="getDetail(scope.row.id, true)"
+            >查看</el-button
+          >
           <span v-if="scope.row.status === 2">
-            <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['music:program:edit']"
-              style="margin-left: 10px">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row, 1)" v-hasPermi="['music:program:up']">上架</el-button>
-            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['music:program:delete']">删除</el-button>
+            <el-button
+              type="text"
+              @click="getDetail(scope.row.id)"
+              v-hasPermi="['music:program:edit']"
+              style="margin-left: 10px"
+              >编辑</el-button
+            >
+            <el-button
+              type="text"
+              @click="getChange(scope.row, 1)"
+              v-hasPermi="['music:program:up']"
+              >上架</el-button
+            >
+            <el-button
+              type="delete"
+              @click="getDelete(scope.row)"
+              v-hasPermi="['music:program:delete']"
+              >删除</el-button
+            >
           </span>
-          <el-button type="text" v-else @click="getChange(scope.row, 2)"
-            v-hasPermi="['music:program:down']">下架</el-button>
+          <el-button
+            type="text"
+            v-else
+            @click="getChange(scope.row, 2)"
+            v-hasPermi="['music:program:down']"
+            >下架</el-button
+          >
           <Audio :src="scope.row.fullUrl" style="margin-left: 10px" />
         </template>
       </el-table-column>
     </el-table>
-    <pagination v-show="total > 0" :total="total" :page.sync="form.pageNum" :limit.sync="form.pageSize"
-      @pagination="getList" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="form.pageNum"
+      :limit.sync="form.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
 <script>
-import Audio from '@/components/Audio/index.vue'
-import { list, change, remove } from '@/api/music/program'
-import { platformMixin, onOrOffMixin, isFreeMixin } from '@/mixin/index'
+import { change, list, remove } from "@/api/music/program";
+import Audio from "@/components/Audio/index.vue";
+import { isFreeMixin, onOrOffMixin, platformMixin } from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [platformMixin, onOrOffMixin, isFreeMixin],
   components: {
-    Audio
+    Audio,
   },
   data() {
     return {
@@ -86,7 +189,7 @@ export default {
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 总数据
       total: 0,
@@ -94,44 +197,44 @@ export default {
       tableData: [],
       // 批量上下架
       obj: {
-        id: '',
-        name: '已选数据'
-      }
+        id: "",
+        name: "已选数据",
+      },
     };
   },
   mounted() {
     // 获取资源平台
     this.getPlatform({
-      audioType: 6
-    })
-    this.getList()
+      audioType: 6,
+    });
+    this.getList();
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list(this.form).then(res => {
+      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
+          this.tableData = res.data.records;
+          this.total = res.data.total;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 搜索
     getSearch() {
-      this.form.pageNum = 1
-      this.getList()
+      this.form.pageNum = 1;
+      this.getList();
     },
 
     // 重置
     getRefresh() {
       this.form = {
         pageNum: 1,
-        pageSize: 10
-      }
-      this.getList()
+        pageSize: 10,
+      };
+      this.getList();
     },
 
     // 新增 / 查看 / 编辑
@@ -140,57 +243,67 @@ export default {
         path: `/music/program/detail`,
         query: {
           id: id,
-          disabled: boolean
+          disabled: boolean,
         },
       });
     },
 
     // 上下架
     getChange(row, status) {
-      let title = status === 1 ? '上架' : '下架'
-      this.$confirm(`是否${title}${row.name}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        change(row.id, status).then(res => {
-          if (res.code === 0) {
-            this.$message.success(`${title}成功!`)
-            this.getList()
-          }
+      let title = status === 1 ? "上架" : "下架";
+      this.$confirm(`是否${title}${row.name}?`, "提示", {
+        type: "warning",
+      })
+        .then(() => {
+          change(row.id, status).then((res) => {
+            if (res.code === 0) {
+              this.$message.success(`${title}成功!`);
+              this.getList();
+            }
+          });
         })
-      }).catch(() => { })
+        .catch(() => {});
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.name}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        remove(row.id).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      }).catch(() => { })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${row.name}?`, "提示", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.id).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
     },
 
-
     // 多选
     handleSelect(e) {
-      this.obj.id = ''
-      e.map((item, index) => this.obj.id += item.id + ((index + 1) < e.length ? ',' : ''))
+      this.obj.id = "";
+      e.map(
+        (item, index) =>
+          (this.obj.id += item.id + (index + 1 < e.length ? "," : ""))
+      );
     },
 
     // 字典翻译
     freeFormatter(row) {
-      return this.selectDictLabel(this.freeOptions, row.isFree)
+      return this.selectDictLabel(this.freeOptions, row.isFree);
     },
     platformFormatter(row) {
-      return this.selectDictLabel(this.platformOptions, row.platformId)
+      return this.selectDictLabel(this.platformOptions, row.platformId);
     },
     statusFormatter(row) {
-      return this.selectDictLabel(this.onOrOffOptions, row.status)
-    }
-  }
+      return this.selectDictLabel(this.onOrOffOptions, row.status);
+    },
+  },
 };
 </script>

+ 175 - 69
src/views/music/singer/index.vue

@@ -1,3 +1,4 @@
+<!-- 音频管理 歌手 -->
 <template>
   <div class="app-container">
     <!-- 搜索 -->
@@ -6,69 +7,166 @@
         <el-input v-model="form.name" placeholder="请输入歌手名称" clearable />
       </el-form-item>
       <el-form-item label="资源平台:">
-        <el-select v-model="form.platformId" placeholder="请选择资源平台" clearable>
-          <el-option v-for="item in platformOptions" :key="item.value" :value="item.value" :label="item.label" />
+        <el-select
+          v-model="form.platformId"
+          placeholder="请选择资源平台"
+          clearable
+        >
+          <el-option
+            v-for="item in platformOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="歌手性别:">
         <el-select v-model="form.sex" placeholder="请选择歌手性别" clearable>
-          <el-option v-for="item in sexOptions" :key="item.value" :value="item.value" :label="item.label" />
+          <el-option
+            v-for="item in sexOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="所属地区:">
-        <el-select v-model="form.singerArea" placeholder="请选择所属地区" clearable>
-          <el-option v-for="item in regionOptions" :key="item.value" :value="item.value" :label="item.label" />
+        <el-select
+          v-model="form.singerArea"
+          placeholder="请选择所属地区"
+          clearable
+        >
+          <el-option
+            v-for="item in regionOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="当前状态:">
         <el-select v-model="form.status" placeholder="请选择当前状态" clearable>
-          <el-option v-for="item in onOrOffOptions" :key="item.value" :value="item.value" :label="item.label" />
+          <el-option
+            v-for="item in onOrOffOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="getSearch"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" @click="getDetail()"
-          v-hasPermi="['music:singer:add']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          @click="getDetail()"
+          v-hasPermi="['music:singer:add']"
+          >新增</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
     <el-table :data="tableData" v-loading="loading">
-      <el-table-column label="ID" prop="id" align="center" show-overflow-tooltip />
-      <el-table-column label="歌手名称" prop="name" align="center" show-overflow-tooltip />
+      <el-table-column
+        label="ID"
+        prop="id"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        label="歌手名称"
+        prop="name"
+        align="center"
+        show-overflow-tooltip
+      />
       <el-table-column label="歌手头像" align="center" width="100px">
         <template slot-scope="scope">
           <el-image v-if="scope.row.coverUrl" :src="scope.row.coverUrl" />
         </template>
       </el-table-column>
-      <el-table-column label="歌手性别" prop="sex" align="center" :formatter="sexFormatter" />
-      <el-table-column label="所属地区" prop="singerArea" align="center" :formatter="areaFormatter" />
-      <el-table-column label="资源平台" prop="platformId" align="center" :formatter="platformFormatter" />
-      <el-table-column label="当前状态" prop="status" align="center" :formatter="statusFormatter" />
+      <el-table-column
+        label="歌手性别"
+        prop="sex"
+        align="center"
+        :formatter="sexFormatter"
+      />
+      <el-table-column
+        label="所属地区"
+        prop="singerArea"
+        align="center"
+        :formatter="areaFormatter"
+      />
+      <el-table-column
+        label="资源平台"
+        prop="platformId"
+        align="center"
+        :formatter="platformFormatter"
+      />
+      <el-table-column
+        label="当前状态"
+        prop="status"
+        align="center"
+        :formatter="statusFormatter"
+      />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
+          <el-button type="text" @click="getDetail(scope.row.id, true)"
+            >查看</el-button
+          >
           <span v-if="scope.row.status === 2">
-            <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['music:singer:edit']"
-              style="margin-left: 10px">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row, 1)" v-hasPermi="['music:singer:up']">上架
+            <el-button
+              type="text"
+              @click="getDetail(scope.row.id)"
+              v-hasPermi="['music:singer:edit']"
+              style="margin-left: 10px"
+              >编辑</el-button
+            >
+            <el-button
+              type="text"
+              @click="getChange(scope.row, 1)"
+              v-hasPermi="['music:singer:up']"
+              >上架
             </el-button>
-            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['music:singer:delete']">删除
+            <el-button
+              type="delete"
+              @click="getDelete(scope.row)"
+              v-hasPermi="['music:singer:delete']"
+              >删除
             </el-button>
           </span>
-          <el-button type="text" v-else @click="getChange(scope.row, 2)" v-hasPermi="['music:singer:down']">下架
+          <el-button
+            type="text"
+            v-else
+            @click="getChange(scope.row, 2)"
+            v-hasPermi="['music:singer:down']"
+            >下架
           </el-button>
         </template>
       </el-table-column>
     </el-table>
-    <pagination v-show="total > 0" :total="total" :page.sync="form.pageNum" :limit.sync="form.pageSize"
-      @pagination="getList" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="form.pageNum"
+      :limit.sync="form.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
 <script>
-import { list, remove, change } from '@/api/music/singer'
-import { platformMixin, sexMixin, regionMixin, onOrOffMixin } from '@/mixin/index'
+import { change, list, remove } from "@/api/music/singer";
+import {
+onOrOffMixin,
+platformMixin,
+regionMixin,
+sexMixin,
+} from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [platformMixin, sexMixin, regionMixin, onOrOffMixin],
   data() {
@@ -78,47 +176,47 @@ export default {
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 总数据
       total: 0,
       // 列表
-      tableData: []
+      tableData: [],
     };
   },
   mounted() {
     // 获取资源平台
     this.getPlatform({
-      audioType: 9
-    })
-    this.getList()
+      audioType: 9,
+    });
+    this.getList();
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list(this.form).then(res => {
+      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
+          this.tableData = res.data.records;
+          this.total = res.data.total;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 搜索
     getSearch() {
-      this.form.pageNum = 1
-      this.getList()
+      this.form.pageNum = 1;
+      this.getList();
     },
 
     // 重置
     getRefresh() {
       this.form = {
         pageNum: 1,
-        pageSize: 10
-      }
-      this.getList()
+        pageSize: 10,
+      };
+      this.getList();
     },
 
     // 新增 编辑
@@ -127,56 +225,64 @@ export default {
         path: `/music/singer/detail`,
         query: {
           id: id,
-          disabled: boolean
-        }
-      })
+          disabled: boolean,
+        },
+      });
     },
 
     // 上下架
     getChange(row, status) {
-      let title = status === 1 ? '上架' : '下架'
-      this.$confirm(`是否${title}${row.name}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        change(row.id, status).then(res => {
-          if (res.code === 0) {
-            this.$message.success(`${title}成功!`)
-            this.getList()
-          }
+      let title = status === 1 ? "上架" : "下架";
+      this.$confirm(`是否${title}${row.name}?`, "提示", {
+        type: "warning",
+      })
+        .then(() => {
+          change(row.id, status).then((res) => {
+            if (res.code === 0) {
+              this.$message.success(`${title}成功!`);
+              this.getList();
+            }
+          });
         })
-      }).catch(() => { })
+        .catch(() => {});
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.name}`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        remove(row.id).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      }).catch(() => { })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${row.name}`, "提示", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.id).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
     },
 
     // 字典翻译
     sexFormatter(row) {
-      return this.selectDictLabel(this.sexOptions, row.sex)
+      return this.selectDictLabel(this.sexOptions, row.sex);
     },
 
     areaFormatter(row) {
-      return this.selectDictLabel(this.regionOptions, row.singerArea)
+      return this.selectDictLabel(this.regionOptions, row.singerArea);
     },
 
     platformFormatter(row) {
-      return this.selectDictLabel(this.platformOptions, row.platformId)
+      return this.selectDictLabel(this.platformOptions, row.platformId);
     },
 
     statusFormatter(row) {
-      return this.selectDictLabel(this.onOrOffOptions, row.status)
-    }
+      return this.selectDictLabel(this.onOrOffOptions, row.status);
+    },
   },
 };
 </script>

+ 1 - 1
src/views/operation/channel/index.vue

@@ -269,7 +269,7 @@ export default {
       var that = this;
       dialogCallBack(that, function () {
         that
-          .$confirm(`是否删除${row.name}?`, "提示:", {
+          .$confirm(`是否删除${row.name}?`, "提示:", {
             type: "warning",
           })
           .then(() => {

+ 220 - 109
src/views/operation/tag/index.vue

@@ -8,58 +8,108 @@
       </el-form-item>
       <el-form-item label="当前状态:">
         <el-select v-model="form.status" placeholder="请选择当前状态" clearable>
-          <el-option v-for="item in disabledOptions" :key="item.value" :value="item.value" :label="item.label" />
+          <el-option
+            v-for="item in disabledOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="getList">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="getList"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" plain icon="el-icon-plus" @click="getDialog('新增')"
-          v-hasPermi="['operation:tag:add']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          @click="getDialog('新增')"
+          v-hasPermi="['operation:tag:add']"
+          >新增</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
-    <el-table :data="tableData" row-key="id" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
-      v-loading="loading">
+    <el-table
+      :data="tableData"
+      row-key="id"
+      :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+      v-loading="loading"
+    >
       <el-table-column label="标签名称" prop="label" show-overflow-tooltip />
-      <el-table-column label="标签Id" prop="id" align="center" show-overflow-tooltip>
+      <el-table-column
+        label="标签Id"
+        prop="id"
+        align="center"
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
-          <span>{{ scope.row.level === 3 ? scope.row.id : '-' }}</span>
+          <span>{{ scope.row.level === 3 ? scope.row.id : "-" }}</span>
         </template>
       </el-table-column>
       <el-table-column label="标签排序" prop="sort" align="center" />
       <el-table-column label="当前状态" prop="status" align="center">
         <template slot-scope="scope">
           <el-tag :type="scope.row.status === 1 ? 'danger' : ''">
-            {{ selectDictLabel(disabledOptions, scope.row.status) }}</el-tag>
+            {{ selectDictLabel(disabledOptions, scope.row.status) }}</el-tag
+          >
         </template>
       </el-table-column>
       <el-table-column label="菜单路径" align="center">
-        <template slot-scope="scope">{{ scope.row.meanWay ? scope.row.meanWay : '-' }}</template>
+        <template slot-scope="scope">{{
+          scope.row.meanWay ? scope.row.meanWay : "-"
+        }}</template>
       </el-table-column>
       <el-table-column label="创建时间" align="center">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+          <span>{{
+            parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDialog('查看', scope.row, true)">查看</el-button>
-          <el-button v-if="scope.row.level !== 3" type="text" @click="getDialog('新增', scope.row)"
-            v-hasPermi="['operation:tag:add']">
+          <el-button type="text" @click="getDialog('查看', scope.row, true)"
+            >查看</el-button
+          >
+          <el-button
+            v-if="scope.row.level !== 3"
+            type="text"
+            @click="getDialog('新增', scope.row)"
+            v-hasPermi="['operation:tag:add']"
+          >
             新增
           </el-button>
-          <el-button type="text" v-if="scope.row.status === 0" @click="getChange(scope.row, 1)"
-            v-hasPermi="['operation:tag:down']">下架</el-button>
+          <el-button
+            type="text"
+            v-if="scope.row.status === 0"
+            @click="getChange(scope.row, 1)"
+            v-hasPermi="['operation:tag:down']"
+            >下架</el-button
+          >
           <span v-else>
-            <el-button type="text" @click="getDialog('编辑', scope.row)" style="margin-left: 10px"
-              v-hasPermi="['operation:tag:edit']">
+            <el-button
+              type="text"
+              @click="getDialog('编辑', scope.row)"
+              style="margin-left: 10px"
+              v-hasPermi="['operation:tag:edit']"
+            >
               编辑
             </el-button>
-            <el-button type="text" @click="getChange(scope.row, 0)" v-hasPermi="['operation:tag:up']">
+            <el-button
+              type="text"
+              @click="getChange(scope.row, 0)"
+              v-hasPermi="['operation:tag:up']"
+            >
               上架
             </el-button>
-            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['operation:tag:delete']">
+            <el-button
+              type="delete"
+              @click="getDelete(scope.row)"
+              v-hasPermi="['operation:tag:delete']"
+            >
               删除
             </el-button>
           </span>
@@ -67,19 +117,49 @@
       </el-table-column>
     </el-table>
     <!-- 弹窗 -->
-    <el-dialog :visible.sync="dialogVisible" :title="title" width="500px" :before-close="cancel">
-      <el-form :model="dialogForm" ref="dialogForm" :rules="rules" label-width="auto"
-        :disabled="title === '查看' ? true : false">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="title"
+      width="500px"
+      :before-close="cancel"
+    >
+      <el-form
+        :model="dialogForm"
+        ref="dialogForm"
+        :rules="rules"
+        label-width="auto"
+        :disabled="title === '查看' ? true : false"
+      >
         <el-form-item label="标签名称:" prop="name">
-          <el-input v-model="dialogForm.name" placeholder="请输入标签名称" maxlength="100" show-word-limit
-            :disabled="dialogForm.isEmpty === 0" />
+          <el-input
+            v-model="dialogForm.name"
+            placeholder="请输入标签名称"
+            maxlength="100"
+            show-word-limit
+            :disabled="dialogForm.isEmpty === 0"
+          />
         </el-form-item>
-        <el-form-item label="标签状态:" prop="isEmpty" v-if="createLevelTwo() || editLevelTwo()">
-          <el-checkbox v-model="dialogForm.isEmpty" :true-label="0" :false-label="1" @change="handleChange">
-            允许为空</el-checkbox>
+        <el-form-item
+          label="标签状态:"
+          prop="isEmpty"
+          v-if="createLevelTwo() || editLevelTwo()"
+        >
+          <el-checkbox
+            v-model="dialogForm.isEmpty"
+            :true-label="0"
+            :false-label="1"
+            @change="handleChange"
+          >
+            允许为空</el-checkbox
+          >
         </el-form-item>
         <el-form-item label="标签排序:" prop="sort">
-          <el-input-number v-model="dialogForm.sort" :min="1" :step="1" step-strictly />
+          <el-input-number
+            v-model="dialogForm.sort"
+            :min="1"
+            :step="1"
+            step-strictly
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" v-if="title !== '查看'">
@@ -91,8 +171,16 @@
 </template>
 
 <script>
-import { change, detail, list, remove, submitFirst, submitSecond } from '@/api/operation/tag';
-import { disabledMixin } from '@/mixin/index';
+import {
+change,
+detail,
+list,
+remove,
+submitFirst,
+submitSecond,
+} from "@/api/operation/tag";
+import { disabledMixin } from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [disabledMixin],
   data() {
@@ -106,77 +194,92 @@ export default {
       // 弹窗
       dialogVisible: false,
       // 弹窗标题
-      title: '新增',
+      title: "新增",
       // 当前层级
       level: 0,
       // 弹窗表单
       dialogForm: {},
       // 校验
       rules: {
-        sort: [{
-          required: true, message: '请选择标签排序', trigger: 'change'
-        }]
-      }
-    }
+        sort: [
+          {
+            required: true,
+            message: "请选择标签排序",
+            trigger: "change",
+          },
+        ],
+      },
+    };
   },
   mounted() {
-    this.getList()
+    this.getList();
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list(this.form).then(res => {
+      this.loading = true;
+      list(this.form).then((res) => {
         if (res.code === 0) {
-          this.tableData = res.data
-          this.loading = false
+          this.tableData = res.data;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 重置
     getRefresh() {
-      this.form = {}
-      this.getList()
+      this.form = {};
+      this.getList();
     },
 
     // 弹窗
     getDialog(title, row, boolean) {
-      this.title = title
-      this.level = row ? row.level : 0
-      if (this.detailLevelThree() || this.createLevelThree() || this.editLevelThree()) {
+      this.title = title;
+      this.level = row ? row.level : 0;
+      if (
+        this.detailLevelThree() ||
+        this.createLevelThree() ||
+        this.editLevelThree()
+      ) {
         this.$router.push({
-          path: '/operation/tag/detail',
-          query: this.createLevelThree() ? {
-            pid: row.id
-          } : {
-            id: row.id,
-            disabled: boolean
-          }
-        })
+          path: "/operation/tag/detail",
+          query: this.createLevelThree()
+            ? {
+                pid: row.id,
+              }
+            : {
+                id: row.id,
+                disabled: boolean,
+              },
+        });
       } else {
-        this.dialogVisible = true
+        this.dialogVisible = true;
       }
 
       // 查看 / 编辑获取详情
-      if (this.detailLevelOne() || this.detailLeveLTwo() || this.editLevelOne() || this.editLevelTwo()) {
-        detail(row.id).then(res => {
+      if (
+        this.detailLevelOne() ||
+        this.detailLeveLTwo() ||
+        this.editLevelOne() ||
+        this.editLevelTwo()
+      ) {
+        detail(row.id).then((res) => {
           if (res.code === 0) {
-            this.dialogForm = res.data
+            this.dialogForm = res.data;
           }
-        })
+        });
       }
 
       // 新增二级标签需传一级标签Id
       if (this.createLevelTwo()) {
-        this.dialogForm.pid = row.id
+        this.dialogForm.pid = row.id;
       }
     },
 
     // 当二级标签选择为空 清空标签名称
     handleChange(e) {
       if (e === 0) {
-        this.dialogForm.name = ''
+        this.dialogForm.name = "";
       }
     },
 
@@ -185,107 +288,115 @@ export default {
       this.$refs.dialogForm.validate((valid) => {
         if (valid) {
           if (this.createLevelOne() || this.editLevelOne()) {
-            submitFirst(this.dialogForm).then(res => {
+            submitFirst(this.dialogForm).then((res) => {
               if (res.code === 0) {
-                this.$message.success(`${this.title}成功!`)
-                this.dialogVisible = false
-                this.getList()
+                this.$message.success(`${this.title}成功!`);
+                this.dialogVisible = false;
+                this.getList();
               }
-            })
+            });
           } else if (this.createLevelTwo() || this.editLevelTwo()) {
-            submitSecond(this.dialogForm).then(res => {
+            submitSecond(this.dialogForm).then((res) => {
               if (res.code === 0) {
-                this.$message.success(`${this.title}成功!`)
-                this.dialogVisible = false
-                this.getList()
+                this.$message.success(`${this.title}成功!`);
+                this.dialogVisible = false;
+                this.getList();
               }
-            })
+            });
           }
         } else {
-          return false
+          return false;
         }
-      })
+      });
     },
 
     // 上下架
     getChange(row, status) {
-      let title = status === 0 ? '上架' : '下架'
-      this.$confirm(`是否${title}${row.label}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        change(row.id, status).then(res => {
-          if (res.code === 0) {
-            this.$message.success(`${title}成功!`)
-            this.getList()
-          }
+      let title = status === 0 ? "上架" : "下架";
+      this.$confirm(`是否${title}${row.label}?`, "提示", {
+        type: "warning",
+      })
+        .then(() => {
+          change(row.id, status).then((res) => {
+            if (res.code === 0) {
+              this.$message.success(`${title}成功!`);
+              this.getList();
+            }
+          });
         })
-      }).catch(() => { })
+        .catch(() => {});
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.label}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        remove(row.id).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      }).catch(() => { })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${row.label}?`, "提示", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.id).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
     },
 
     // 取消
     cancel() {
-      this.dialogVisible = false
-      this.$refs.dialogForm.resetFields()
+      this.dialogVisible = false;
+      this.$refs.dialogForm.resetFields();
     },
 
     // 新增一级标签
     createLevelOne() {
-      return this.title === '新增' && this.level === 0 ? true : false
+      return this.title === "新增" && this.level === 0 ? true : false;
     },
 
     // 编辑一级标签
     editLevelOne() {
-      return this.title === '编辑' && this.level === 1 ? true : false
+      return this.title === "编辑" && this.level === 1 ? true : false;
     },
 
     // 查看一级标签
     detailLevelOne() {
-      return this.title === '查看' && this.level === 1 ? true : false
+      return this.title === "查看" && this.level === 1 ? true : false;
     },
 
     // 新增二级标签
     createLevelTwo() {
-      return this.title === '新增' && this.level === 1 ? true : false
+      return this.title === "新增" && this.level === 1 ? true : false;
     },
 
     // 编辑二级标签
     editLevelTwo() {
-      return this.title === '编辑' && this.level === 2 ? true : false
+      return this.title === "编辑" && this.level === 2 ? true : false;
     },
 
     // 查看二级标签
     detailLeveLTwo() {
-      return this.title === '查看' && this.level === 2 ? true : false
+      return this.title === "查看" && this.level === 2 ? true : false;
     },
 
     // 新增三级标签
     createLevelThree() {
-      return this.title === '新增' && this.level === 2 ? true : false
+      return this.title === "新增" && this.level === 2 ? true : false;
     },
 
     // 编辑三级标签
     editLevelThree() {
-      return this.title === '编辑' && this.level === 3 ? true : false
+      return this.title === "编辑" && this.level === 3 ? true : false;
     },
 
     // 查看三级标签
     detailLevelThree() {
-      return this.title === '查看' && this.level === 3 ? true : false
-    }
-  }
-}
+      return this.title === "查看" && this.level === 3 ? true : false;
+    },
+  },
+};
 </script>

+ 2 - 2
src/views/push/dialog/index.vue

@@ -212,7 +212,7 @@ export default {
       var that = this;
       dialogCallBack(that, function () {
         that
-          .$confirm(`是否删除${row.name}?`, "提示", {
+          .$confirm(`是否删除${row.name}?`, "提示", {
             type: "warning",
           })
           .then(() => {
@@ -237,4 +237,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 127 - 56
src/views/push/update/index.vue

@@ -1,46 +1,108 @@
+
+<!-- App升级 -->
 <template>
   <div class="app-container">
     <!-- 搜索 -->
     <el-form size="mini" inline>
       <el-form-item label="版本号:">
-        <el-input v-model="form.lastVersion" placeholder="请输入版本号" clearable />
+        <el-input
+          v-model="form.lastVersion"
+          placeholder="请输入版本号"
+          clearable
+        />
       </el-form-item>
       <el-form-item label="升级系统:">
-        <el-select v-model="form.appType" placeholder="请选择升级系统" clearable>
-          <el-option v-for="item in systemOptions" :key="item.value" :value="item.value" :label="item.label" />
+        <el-select
+          v-model="form.appType"
+          placeholder="请选择升级系统"
+          clearable
+        >
+          <el-option
+            v-for="item in systemOptions"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="getSearch"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
-        <el-button type="primary" icon="el-icon-plus" plain @click="getDetail()" v-hasPermi="['push:update:add']">新增</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          plain
+          @click="getDetail()"
+          v-hasPermi="['push:update:add']"
+          >新增</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
     <el-table :data="tableData" v-loading="loading">
       <el-table-column type="index" label="序号" align="center" />
-      <el-table-column label="升级标题" prop="updateTitle" align="center" show-overflow-tooltip />
+      <el-table-column
+        label="升级标题"
+        prop="updateTitle"
+        align="center"
+        show-overflow-tooltip
+      />
       <el-table-column label="版本号" prop="lastVersion" align="center" />
-      <el-table-column label="下载路径" prop="downUrl" align="center" show-overflow-tooltip />
-      <el-table-column label="是否强制升级" prop="isForceUpdate" align="center" :formatter="typeFormatter" />
-      <el-table-column label="升级系统" prop="appType" align="center" :formatter="appTypeFormatter" />
+      <el-table-column
+        label="下载路径"
+        prop="downUrl"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        label="是否强制升级"
+        prop="isForceUpdate"
+        align="center"
+        :formatter="typeFormatter"
+      />
+      <el-table-column
+        label="升级系统"
+        prop="appType"
+        align="center"
+        :formatter="appTypeFormatter"
+      />
       <el-table-column label="更新时间" prop="updateTime" align="center" />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
-          <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['push:update:edit']">编辑</el-button>
-          <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['push:update:delete']">删除</el-button>
+          <el-button type="text" @click="getDetail(scope.row.id, true)"
+            >查看</el-button
+          >
+          <el-button
+            type="text"
+            @click="getDetail(scope.row.id)"
+            v-hasPermi="['push:update:edit']"
+            >编辑</el-button
+          >
+          <el-button
+            type="delete"
+            @click="getDelete(scope.row)"
+            v-hasPermi="['push:update:delete']"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    <pagination v-show="total > 0" :total="total" :page.sync="form.pageNum" :limit.sync="form.pageSize"
-      @pagination="getList" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="form.pageNum"
+      :limit.sync="form.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
 <script>
-import { list, remove } from '@/api/push/update'
-import { systemMixin } from '@/mixin'
+import { list, remove } from "@/api/push/update";
+import { systemMixin } from "@/mixin";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [systemMixin],
   data() {
@@ -50,87 +112,96 @@ export default {
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 列表
       tableData: [],
       // 总数据
       total: 0,
       // 是否强制
-      typeOptions: [{
-        value: 0,
-        label: '否'
-      }, {
-        value: 1,
-        label: '是'
-      }]
-    }
+      typeOptions: [
+        {
+          value: 0,
+          label: "否",
+        },
+        {
+          value: 1,
+          label: "是",
+        },
+      ],
+    };
   },
   mounted() {
-    this.getList()
+    this.getList();
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list(this.form).then(res => {
+      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
+          this.tableData = res.data.records;
+          this.total = res.data.total;
+          this.loading = false;
         }
-      })
+      });
     },
     // 搜索
     getSearch() {
-      this.form.pageNum = 1
-      this.getList()
+      this.form.pageNum = 1;
+      this.getList();
     },
 
     // 重置
     getRefresh() {
       this.form = {
         pageNum: 1,
-        pageSize: 10
-      }
-      this.getList()
+        pageSize: 10,
+      };
+      this.getList();
     },
 
     // 新增 编辑
     getDetail(id, boolean) {
       this.$router.push({
-        path: '/push/update/detail',
+        path: "/push/update/detail",
         query: {
           id: id,
-          boolean: boolean
-        }
-      })
+          boolean: boolean,
+        },
+      });
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.updateTitle}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        remove(row.id, 1).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      }).catch(() => { })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否有删除${row.updateTitle}?`, "提示:", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.id, 1).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
     },
 
     // 字典翻译
     typeFormatter(row) {
-      return this.selectDictLabel(this.typeOptions, row.isForceUpdate)
+      return this.selectDictLabel(this.typeOptions, row.isForceUpdate);
     },
 
     appTypeFormatter(row) {
-      return this.selectDictLabel(this.systemOptions, row.appType)
-    }
-  }
-}
+      return this.selectDictLabel(this.systemOptions, row.appType);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped></style>