فهرست منبع

feat: 处理、仓库账号、预警管理多添加一层谨慎操作提示

Damon 9 ماه پیش
والد
کامیت
5abc277a42
39فایلهای تغییر یافته به همراه761 افزوده شده و 443 حذف شده
  1. 1 1
      src/views/content/article/index.vue
  2. 2 2
      src/views/content/video/index.vue
  3. 1 1
      src/views/device/class/index.vue
  4. 2 2
      src/views/device/function/index.vue
  5. 1 1
      src/views/device/version/index.vue
  6. 122 68
      src/views/device/warning/index.vue
  7. 1 1
      src/views/goods/list/index.vue
  8. 1 1
      src/views/music/album/index.vue
  9. 2 2
      src/views/music/anchor/index.vue
  10. 2 2
      src/views/music/blog/index.vue
  11. 1 1
      src/views/music/blogclass/index.vue
  12. 1 1
      src/views/music/choiceness/detail.vue
  13. 2 2
      src/views/music/choiceness/index.vue
  14. 1 1
      src/views/music/list/index.vue
  15. 1 1
      src/views/music/menu/index.vue
  16. 2 2
      src/views/music/program/index.vue
  17. 2 2
      src/views/music/radio/index.vue
  18. 1 1
      src/views/music/radioclass/index.vue
  19. 2 2
      src/views/music/singer/index.vue
  20. 135 80
      src/views/ohplay/operation/index.vue
  21. 21 17
      src/views/operation/activity/index.vue
  22. 1 1
      src/views/operation/agreement/index.vue
  23. 1 1
      src/views/operation/channel/index.vue
  24. 3 3
      src/views/operation/channels/index.vue
  25. 1 1
      src/views/operation/feedbacktype/index.vue
  26. 1 1
      src/views/operation/map/index.vue
  27. 181 93
      src/views/operation/module/index.vue
  28. 2 2
      src/views/operation/recommend/index.vue
  29. 135 73
      src/views/operation/sceneTime/index.vue
  30. 2 2
      src/views/operation/startPage/index.vue
  31. 2 2
      src/views/operation/tag/index.vue
  32. 2 2
      src/views/operation/waken/index.vue
  33. 1 1
      src/views/push/dialog/index.vue
  34. 2 2
      src/views/push/update/index.vue
  35. 2 2
      src/views/registration/content/index.vue
  36. 2 2
      src/views/registration/exchange/index.vue
  37. 2 2
      src/views/registration/regConfig/index.vue
  38. 1 1
      src/views/service/package/index.vue
  39. 116 61
      src/views/user/store/index.vue

+ 1 - 1
src/views/content/article/index.vue

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

+ 2 - 2
src/views/content/video/index.vue

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

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

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

+ 2 - 2
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",
@@ -209,4 +209,4 @@ export default {
     },
   },
 };
-</script>
+</script>

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

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

+ 122 - 68
src/views/device/warning/index.vue

@@ -1,5 +1,6 @@
+<!-- 设备管理 预警管理 -->
 <template>
-  <div class='app-container'>
+  <div class="app-container">
     <!-- 搜索 -->
     <el-form inline size="mini">
       <el-form-item label="手机号:">
@@ -9,9 +10,18 @@
         <el-input v-model="form.email" placeholder="请输入邮箱" clearable />
       </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="getDialog()" v-hasPermi="['device:warning:add']">新增</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          plain
+          @click="getDialog()"
+          v-hasPermi="['device:warning:add']"
+          >新增</el-button
+        >
       </el-form-item>
     </el-form>
     <!-- 列表 -->
@@ -23,14 +33,34 @@
       <el-table-column label="创建时间" prop="createTime" align="center" />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDialog(scope.row.id)" v-hasPermi="['device:warning:edit']">编辑</el-button>
-          <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['device:warning:delete']">删除</el-button>
+          <el-button
+            type="text"
+            @click="getDialog(scope.row.id)"
+            v-hasPermi="['device:warning:edit']"
+            >编辑</el-button
+          >
+          <el-button
+            type="delete"
+            @click="getDelete(scope.row)"
+            v-hasPermi="['device:warning:delete']"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
     <!-- 弹出 -->
-    <el-dialog :visible.sync="dialogVisible" :title="form.id ? '编辑' : '新增'" width="500px" :before-close="getClose">
-      <el-form :model="dialogForm" ref="dialogForm" :rules="rules" label-width="auto">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="form.id ? '编辑' : '新增'"
+      width="500px"
+      :before-close="getClose"
+    >
+      <el-form
+        :model="dialogForm"
+        ref="dialogForm"
+        :rules="rules"
+        label-width="auto"
+      >
         <el-form-item label="联系人:" prop="username">
           <el-input v-model="dialogForm.username" placeholder="请输入联系人" />
         </el-form-item>
@@ -50,26 +80,27 @@
 </template>
 
 <script>
-import { list, detail, submit, change } from '@/api/device/warning'
+import { change, detail, list, submit } from "@/api/device/warning";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   data() {
-    var reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
+    var reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
     var checkPhone = (rule, value, callback) => {
       if (value) {
         if (!reg.test(value)) {
-          callback(new Error('请输入正确的手机号'))
+          callback(new Error("请输入正确的手机号"));
         } else {
-          callback()
+          callback();
         }
       }
-    }
+    };
     return {
       // 遮罩层
       loading: false,
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 列表
       tableData: [],
@@ -81,100 +112,123 @@ export default {
       dialogForm: {},
       // 校验
       rules: {
-        username: [{
-          required: true, message: '请输入联系人', trigger: 'blur'
-        }],
-        phone: [{
-          required: true, message: '请输入手机号', trigger: 'blur'
-        }, {
-          validator: checkPhone, trigger: 'blur'
-        }],
-        email: [{
-          required: true, message: '请输入邮箱', trigger: 'blur'
-        }, {
-          type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur'
-        }]
-      }
-    }
+        username: [
+          {
+            required: true,
+            message: "请输入联系人",
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          {
+            required: true,
+            message: "请输入手机号",
+            trigger: "blur",
+          },
+          {
+            validator: checkPhone,
+            trigger: "blur",
+          },
+        ],
+        email: [
+          {
+            required: true,
+            message: "请输入邮箱",
+            trigger: "blur",
+          },
+          {
+            type: "email",
+            message: "请输入正确的邮箱地址",
+            trigger: "blur",
+          },
+        ],
+      },
+    };
   },
   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();
     },
 
     // 弹窗
     getDialog(id) {
-      this.dialogVisible = true
+      this.dialogVisible = true;
       if (id) {
-        detail(id).then(res => {
+        detail(id).then((res) => {
           if (res.code === 0) {
-            this.dialogForm = res.data
+            this.dialogForm = res.data;
           }
-        })
+        });
       }
     },
 
     getClose() {
-      this.dialogForm = {}
-      this.$refs.dialogForm.resetFields()
-      this.dialogVisible = false
+      this.dialogForm = {};
+      this.$refs.dialogForm.resetFields();
+      this.dialogVisible = false;
     },
 
     getSubmit() {
       this.$refs.dialogForm.validate((valid) => {
         if (valid) {
-          submit(this.dialogForm).then(res => {
+          submit(this.dialogForm).then((res) => {
             if (res.code === 0) {
-              this.$message.success('提交成功!')
-              this.getClose()
-              this.getList()
+              this.$message.success("提交成功!");
+              this.getClose();
+              this.getList();
             }
-          })
+          });
         } else {
-          return false
+          return false;
         }
-      })
+      });
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.username}的信息?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        change(row.id, 2).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      }).catch(() => { })
-    }
-  }
-}
-</script>
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否删除${row.username}的信息?`, "提示:", {
+            type: "warning",
+          })
+          .then(() => {
+            change(row.id, 2).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
+    },
+  },
+};
+</script>

+ 1 - 1
src/views/goods/list/index.vue

@@ -204,4 +204,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 1 - 1
src/views/music/album/index.vue

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

+ 2 - 2
src/views/music/anchor/index.vue

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

+ 2 - 2
src/views/music/blog/index.vue

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

+ 1 - 1
src/views/music/blogclass/index.vue

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

+ 1 - 1
src/views/music/choiceness/detail.vue

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

+ 2 - 2
src/views/music/choiceness/index.vue

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

+ 1 - 1
src/views/music/list/index.vue

@@ -312,4 +312,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 1 - 1
src/views/music/menu/index.vue

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

+ 2 - 2
src/views/music/program/index.vue

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

+ 2 - 2
src/views/music/radio/index.vue

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

+ 1 - 1
src/views/music/radioclass/index.vue

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

+ 2 - 2
src/views/music/singer/index.vue

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

+ 135 - 80
src/views/ohplay/operation/index.vue

@@ -2,40 +2,76 @@
   <div class="app-container">
     <div style="width: 400px">
       <el-image :src="require('@/assets/images/ohplay/search.png')" />
-      <el-image :class="['border', active === item.id ? 'active' : '']" v-for="item in img" :key="item.id"
-        :src="item.url" @click="getActive(item.id)" />
+      <el-image
+        :class="['border', active === item.id ? 'active' : '']"
+        v-for="item in img"
+        :key="item.id"
+        :src="item.url"
+        @click="getActive(item.id)"
+      />
       <el-image :src="require('@/assets/images/ohplay/comment.png')" />
     </div>
 
     <keep-alive>
       <div class="isShow">
-        <el-button v-if="isShow()" type="primary" icon="el-icon-plus" @click="getAdd"
-          v-hasPermi="['ohplay:operation:add']">添加</el-button>
+        <el-button
+          v-if="isShow()"
+          type="primary"
+          icon="el-icon-plus"
+          @click="getAdd"
+          v-hasPermi="['ohplay:operation:add']"
+          >添加</el-button
+        >
         <el-form label-width="100px" v-for="(item, index) in list" :key="index">
-          <el-link :underline="false" class="close" icon="el-icon-close" @click="getDelete(item.id, index)" />
+          <el-link
+            :underline="false"
+            class="close"
+            icon="el-icon-close"
+            @click="getDelete(item.id, index)"
+          />
           <el-form-item :label="label + (index + 1)" />
           <el-form-item v-if="active === 3" label="文字:">
             <el-input v-model="item.script" placeholder="请输入快捷按钮文字" />
           </el-form-item>
           <el-form-item v-else label="Banner:">
-            <Upload listType="picture-card" :url="item.banner" :width="343" :height="140" @upload="getUpload($event, index)" />
+            <Upload
+              listType="picture-card"
+              :url="item.banner"
+              :width="343"
+              :height="140"
+              @upload="getUpload($event, index)"
+            />
           </el-form-item>
           <el-form-item label="选择日期:">
-            <el-date-picker v-model="item.date" size="small" type="datetimerange" start-placeholder="开始时间"
-              end-placeholder="结束时间" value-format="yyyy-MM-dd HH:mm:ss" />
+            <el-date-picker
+              v-model="item.date"
+              size="small"
+              type="datetimerange"
+              start-placeholder="开始时间"
+              end-placeholder="结束时间"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            />
           </el-form-item>
           <el-form-item label="跳转:">
             <el-select v-model="item.skip" placeholder="请选择跳转页面">
-              <el-option v-for="item in typeOptions" :key="item.value" :label="item.label"
-                :value="Number(item.value)" />
+              <el-option
+                v-for="item in typeOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="Number(item.value)"
+              />
             </el-select>
           </el-form-item>
           <el-form-item label="网址:">
             <el-input v-model="item.skipUrl" placeholder="请输入网址" />
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" @click="getSubmit(item, index)"
-              v-hasPermi="['ohplay:operation:submit']">确定</el-button>
+            <el-button
+              type="primary"
+              @click="getSubmit(item, index)"
+              v-hasPermi="['ohplay:operation:submit']"
+              >确定</el-button
+            >
           </el-form-item>
         </el-form>
       </div>
@@ -44,100 +80,119 @@
 </template>
 
 <script>
-import { create, edit, list, remove } from '@/api/ohplay/operation';
+import { create, edit, list, remove } from "@/api/ohplay/operation";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   data() {
     return {
-      img: [{
-        id: 1,
-        url: require('@/assets/images/ohplay/banner.png')
-      }, {
-        id: 2,
-        url: require('@/assets/images/ohplay/pop.png')
-      }, {
-        id: 3,
-        url: require('@/assets/images/ohplay/shortcut.png')
-      }],
+      img: [
+        {
+          id: 1,
+          url: require("@/assets/images/ohplay/banner.png"),
+        },
+        {
+          id: 2,
+          url: require("@/assets/images/ohplay/pop.png"),
+        },
+        {
+          id: 3,
+          url: require("@/assets/images/ohplay/shortcut.png"),
+        },
+      ],
       active: 1,
-      label: '广告位',
+      label: "广告位",
       // 列表
       list: [],
       // 跳转类型
-      typeOptions: [{
-        value: 0,
-        label: '指定页面'
-      }, {
-        value: 1,
-        label: '指定URL'
-      }]
-    }
+      typeOptions: [
+        {
+          value: 0,
+          label: "指定页面",
+        },
+        {
+          value: 1,
+          label: "指定URL",
+        },
+      ],
+    };
   },
   mounted() {
-    this.getList()
+    this.getList();
   },
   methods: {
     // 切换选中位置
     getActive(id) {
       if (this.active !== id) {
-        this.active = id
-        this.label = id === 1 ? '广告位' : id === 2 ? '推广位' : '快捷位'
-        this.getList()
+        this.active = id;
+        this.label = id === 1 ? "广告位" : id === 2 ? "推广位" : "快捷位";
+        this.getList();
       }
     },
 
     // 添加
     getAdd() {
-      this.list.push({})
+      this.list.push({});
     },
 
     // 隐藏添加按钮
     isShow() {
-      return this.active === 3 ? this.list.length < 4 ? true : false : this.list.length < 6 ? true : false
+      return this.active === 3
+        ? this.list.length < 4
+          ? true
+          : false
+        : this.list.length < 6
+        ? true
+        : false;
     },
 
     // 删除
     getDelete(id, index) {
-      if (id) {
-        this.$confirm('是否删除?', '提示', {
-          'confirmButtonText': '确定',
-          'cancelButtonText': '取消',
-          type: 'warning'
-        }).then(() => {
-          remove(id).then(res => {
-            if (res.code === 0) {
-              this.$message.success('删除成功!')
-              this.getList()
-            }
-          })
-        })
-      } else {
-        this.list.splice(index, 1)
-      }
+      var that = this;
+      dialogCallBack(that, function () {
+        if (id) {
+          that
+            .$confirm("是否删除?", "提示:", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+            })
+            .then(() => {
+              remove(id).then((res) => {
+                if (res.code === 0) {
+                  that.$message.success("删除成功!");
+                  that.getList();
+                }
+              });
+            });
+        } else {
+          that.list.splice(index, 1);
+        }
+      });
     },
 
     // 列表
     getList() {
-      let type = this.active === 1 ? 2 : this.active === 2 ? 0 : 1
-      this.list = []
+      let type = this.active === 1 ? 2 : this.active === 2 ? 0 : 1;
+      this.list = [];
       list({
-        type: type
-      }).then(res => {
+        type: type,
+      }).then((res) => {
         if (res.code === 0) {
           if (res.data) {
-            res.data.map(i => {
+            res.data.map((i) => {
               this.list.push({
                 date: [i.startCreateTime, i.endCreateTime],
-                ...i
-              })
-            })
+                ...i,
+              });
+            });
           }
         }
-      })
+      });
     },
 
     // 上传图片
     getUpload(e, index) {
-      this.list[index].banner = e.file 
+      this.list[index].banner = e.file;
     },
 
     // 新增 编辑
@@ -150,27 +205,27 @@ export default {
         skip: item.skip,
         skipUrl: item.skipUrl,
         script: item.script,
-        banner: item.banner
-      }
+        banner: item.banner,
+      };
       if (item.id) {
-        form.id = item.id
-        edit(form).then(res => {
+        form.id = item.id;
+        edit(form).then((res) => {
           if (res.code === 0) {
-            this.$message.success('修改成功!')
-            this.getList()
+            this.$message.success("修改成功!");
+            this.getList();
           }
-        })
+        });
       } else {
-        create(form).then(res => {
+        create(form).then((res) => {
           if (res.code === 0) {
-            this.$message.success('创建成功!')
-            this.getList()
+            this.$message.success("创建成功!");
+            this.getList();
           }
-        })
+        });
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -216,7 +271,7 @@ export default {
 }
 
 .active::after {
-  content: '';
+  content: "";
   background: rgba(255, 255, 0, 0.3);
   position: absolute;
   top: 0;
@@ -224,4 +279,4 @@ export default {
   width: 100%;
   height: 100%;
 }
-</style>
+</style>

+ 21 - 17
src/views/operation/activity/index.vue

@@ -1,4 +1,4 @@
-<!-- 活动管理ß -->
+<!-- 运营管理 活动管理 -->
 <template>
   <div class="app-container">
     <!-- 搜索 -->
@@ -199,8 +199,6 @@
               :value="item.value"
               :label="item.label"
             />
-
-            
           </el-select>
         </el-form-item>
       </el-form>
@@ -214,12 +212,13 @@
 
 <script>
 import {
-allNoDeleteList,
-change,
-doExchange,
-list,
+  allNoDeleteList,
+  change,
+  doExchange,
+  list,
 } from "@/api/operation/activity";
 import { currentMixin, devMixin, disabledMixin } from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [devMixin, currentMixin, disabledMixin],
   data() {
@@ -361,15 +360,20 @@ export default {
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.name}?`, "提示", {
-        type: "warning",
-      }).then(() => {
-        change(row.id, 2).then((res) => {
-          if (res.code === 0) {
-            this.$message.success("删除成功!");
-            this.getList();
-          }
-        });
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否删除${row.name}?`, "提示:", {
+            type: "warning",
+          })
+          .then(() => {
+            change(row.id, 2).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          });
       });
     },
 
@@ -388,4 +392,4 @@ export default {
     },
   },
 };
-</script>
+</script>

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

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

+ 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(() => {

+ 3 - 3
src/views/operation/channels/index.vue

@@ -370,7 +370,7 @@ export default {
     getRemove(row) {
       var that = this;
       dialogCallBack(that, function () {
-        that.$confirm(`是否删除${row.name}?`, "提示").then(() => {
+        that.$confirm(`是否删除${row.name}?`, "提示").then(() => {
           remove(row.id).then((res) => {
             if (res.code === 0) {
               that.$message.success("删除成功!");
@@ -510,7 +510,7 @@ export default {
       var that = this;
       dialogCallBack(that, function () {
         that
-          .$confirm(`是否删除${item.channelTypeName}?`, "提示")
+          .$confirm(`是否删除${item.channelTypeName}?`, "提示")
           .then(() => {
             classRemove(item.channelTypeId).then((res) => {
               if (res.code === 0) {
@@ -558,4 +558,4 @@ export default {
     margin: 0 10px 10px 0;
   }
 }
-</style>
+</style>

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

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

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

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

+ 181 - 93
src/views/operation/module/index.vue

@@ -1,46 +1,109 @@
+<!-- 运营管理 首页推荐 模块配置 -->
 <template>
   <div class="app-container">
-    <el-button type="primary" icon="el-icon-plus" size="mini" @click="getDialog('新增')"
-      v-hasPermi="['operation:module:add']">新增</el-button>
+    <el-button
+      type="primary"
+      icon="el-icon-plus"
+      size="mini"
+      @click="getDialog('新增')"
+      v-hasPermi="['operation:module:add']"
+      >新增</el-button
+    >
+
     <!-- 列表 -->
     <el-table :data="tableData">
-      <el-table-column label="序号" type="index" align="center"></el-table-column>
-      <el-table-column label="模块类型" prop="typeName" align="center"></el-table-column>
-      <el-table-column label="模块组件" align="center" :formatter="elementIdsFormatter" />
+      <el-table-column
+        label="序号"
+        type="index"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        label="模块类型"
+        prop="typeName"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        label="模块组件"
+        align="center"
+        :formatter="elementIdsFormatter"
+      />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDialog('查看', scope.row.typeId, true)">查看</el-button>
-          <el-button type="text" @click="getDialog('编辑', scope.row.typeId)"
-            v-hasPermi="['operation:module:edit']">编辑</el-button>
-          <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['operation:module:delete']">删除</el-button>
+          <el-button
+            type="text"
+            @click="getDialog('查看', scope.row.typeId, true)"
+            >查看</el-button
+          >
+          <el-button
+            type="text"
+            @click="getDialog('编辑', scope.row.typeId)"
+            v-hasPermi="['operation:module:edit']"
+            >编辑</el-button
+          >
+          <el-button
+            type="delete"
+            @click="getDelete(scope.row)"
+            v-hasPermi="['operation:module: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"
+    />
     <!-- 弹窗 -->
-    <el-dialog :visible.sync="dialogVisible" :title="title" width="500px" :before-close="cancel">
-      <el-form :model="dialogForm" :rules="rules" ref="dialogForm" label-width="100px" :disabled="disabled">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="title"
+      width="500px"
+      :before-close="cancel"
+    >
+      <el-form
+        :model="dialogForm"
+        :rules="rules"
+        ref="dialogForm"
+        label-width="100px"
+        :disabled="disabled"
+      >
         <el-form-item label="模块类型:" prop="typeName">
-          <el-input v-model="dialogForm.typeName" placeholder="请输入模块类型名称" />
+          <el-input
+            v-model="dialogForm.typeName"
+            placeholder="请输入模块类型名称"
+          />
         </el-form-item>
         <el-form-item label="模块组件:" prop="elementIds">
-          <el-select v-model="dialogForm.elementIds" multiple placeholder="请选择模块组件">
-            <el-option v-for="item in mouldOptions" :key="item.value" :value="item.value.toString()"
-              :label="item.label" />
+          <el-select
+            v-model="dialogForm.elementIds"
+            multiple
+            placeholder="请选择模块组件"
+          >
+            <el-option
+              v-for="item in mouldOptions"
+              :key="item.value"
+              :value="item.value.toString()"
+              :label="item.label"
+            />
           </el-select>
         </el-form-item>
       </el-form>
       <div slot="footer">
         <el-button @click="cancel">取消</el-button>
-        <el-button v-if="!disabled" type="primary" @click="getSubmit">确定</el-button>
+        <el-button v-if="!disabled" type="primary" @click="getSubmit"
+          >确定</el-button
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { list, submit, detail, remove } from '@/api/operation/module'
+import { detail, list, remove, submit } from "@/api/operation/module";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   data() {
     return {
@@ -49,7 +112,7 @@ export default {
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 列表
       tableData: [],
@@ -58,124 +121,149 @@ export default {
       // 弹窗
       dialogVisible: false,
       // 弹窗标题
-      title: '新增',
+      title: "新增",
       // 弹窗表单
       dialogForm: {
-        elementIds: []
+        elementIds: [],
       },
       // 模块选择
-      mouldOptions: [{
-        value: 1,
-        label: '标题'
-      }, {
-        value: 3,
-        label: '简介'
-      }, {
-        value: 4,
-        label: '内容'
-      }, {
-        value: 5,
-        label: '跳转方式'
-      }, {
-        value: 6,
-        label: '封面模式'
-      }, {
-        value: 7,
-        label: '图片'
-      }, {
-        value: 8,
-        label: '排序'
-      }, {
-        value: 9,
-        label: '列表'
-      }],
+      mouldOptions: [
+        {
+          value: 1,
+          label: "标题",
+        },
+        {
+          value: 3,
+          label: "简介",
+        },
+        {
+          value: 4,
+          label: "内容",
+        },
+        {
+          value: 5,
+          label: "跳转方式",
+        },
+        {
+          value: 6,
+          label: "封面模式",
+        },
+        {
+          value: 7,
+          label: "图片",
+        },
+        {
+          value: 8,
+          label: "排序",
+        },
+        {
+          value: 9,
+          label: "列表",
+        },
+      ],
       // 校验
       rules: {
-        typeName: [{
-          required: true, message: '请输入模块类型名称', trigger: 'blur'
-        }],
-        elementIds: [{
-          required: true, message: '请选择模块组件', trigger: 'change'
-        }]
+        typeName: [
+          {
+            required: true,
+            message: "请输入模块类型名称",
+            trigger: "blur",
+          },
+        ],
+        elementIds: [
+          {
+            required: true,
+            message: "请选择模块组件",
+            trigger: "change",
+          },
+        ],
       },
       // 只读
-      disabled: false
-    }
+      disabled: false,
+    };
   },
   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;
         }
-      })
+      });
     },
 
     // 弹窗
     getDialog(title, id, boolean) {
-      this.dialogVisible = true
-      this.title = title
+      this.dialogVisible = true;
+      this.title = title;
       if (id) {
-        detail(id).then(res => {
+        detail(id).then((res) => {
           if (res.code === 0) {
-            this.dialogForm = res.data
+            this.dialogForm = res.data;
           }
-        })
+        });
       }
-      this.disabled = boolean
+      this.disabled = boolean;
     },
 
     // 取消
     cancel() {
-      this.dialogVisible = false
-      this.$refs.dialogForm.resetFields()
-      this.dialogForm = {}
+      this.dialogVisible = false;
+      this.$refs.dialogForm.resetFields();
+      this.dialogForm = {};
     },
 
     // 提交
     getSubmit() {
       this.$refs.dialogForm.validate((valid) => {
         if (valid) {
-          submit(this.dialogForm).then(res => {
+          submit(this.dialogForm).then((res) => {
             if (res.code === 0) {
-              this.getList()
-              this.$message.success(`${this.title}成功!`)
-              this.cancel()
+              this.getList();
+              this.$message.success(`${this.title}成功!`);
+              this.cancel();
             }
-          })
+          });
         } else {
-          return false
+          return false;
         }
-      })
+      });
     },
 
     // 删除
     getDelete(row) {
-      this.$confirm(`是否删除${row.typeName}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        remove(row.typeId).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      }).catch(() => { })
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否删除${row.typeName}?`, "提示:", {
+            type: "warning",
+          })
+          .then(() => {
+            remove(row.typeId).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          })
+          .catch(() => {});
+      });
     },
 
     // 字典翻译
     elementIdsFormatter(row) {
-      return row.elementIds.map(i => this.selectDictLabel(this.mouldOptions, i)).join(',')
-    }
-  }
-}
+      return row.elementIds
+        .map((i) => this.selectDictLabel(this.mouldOptions, i))
+        .join(",");
+    },
+  },
+};
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped></style>

+ 2 - 2
src/views/operation/recommend/index.vue

@@ -446,7 +446,7 @@ export default {
       var that = this;
       dialogCallBack(that, function () {
         that
-          .$confirm(`是否有删除?`, "提醒", {
+          .$confirm(`是否删除?`, "提示:", {
             type: "warning",
           })
           .then(() => {
@@ -543,4 +543,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 135 - 73
src/views/operation/sceneTime/index.vue

@@ -1,7 +1,13 @@
 <template>
   <div class="app-container">
-    <el-button type="primary" size="mini" icon="el-icon-plus" @click="getDialog('新增')"
-      v-hasPermi="['operation:sceneTime:add']">新增</el-button>
+    <el-button
+      type="primary"
+      size="mini"
+      icon="el-icon-plus"
+      @click="getDialog('新增')"
+      v-hasPermi="['operation:sceneTime:add']"
+      >新增</el-button
+    >
     <!-- 列表 -->
     <el-table :data="tableData" v-loading="loading">
       <el-table-column type="index" label="序号" align="center" />
@@ -13,45 +19,81 @@
       <el-table-column label="时间段文案" prop="name" align="center" />
       <el-table-column label="时间Icon" width="100px" align="center">
         <template slot-scope="scope">
-          <el-image :src="scope.row.pic" style="background: #000;" />
+          <el-image :src="scope.row.pic" style="background: #000" />
         </template>
       </el-table-column>
       <el-table-column label="创建时间" prop="createtTime" align="center" />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="text" @click="getDialog('查看', scope.row)">查看</el-button>
-          <el-button type="text" @click="getDialog('编辑', scope.row)"
-            v-hasPermi="['operation:sceneTime:edit']">编辑</el-button>
-          <el-button type="delete" @click="getDelete(scope.row, 2)"
-            v-hasPermi="['operation:sceneTime:delete']">删除</el-button>
+          <el-button type="text" @click="getDialog('查看', scope.row)"
+            >查看</el-button
+          >
+          <el-button
+            type="text"
+            @click="getDialog('编辑', scope.row)"
+            v-hasPermi="['operation:sceneTime:edit']"
+            >编辑</el-button
+          >
+          <el-button
+            type="delete"
+            @click="getDelete(scope.row, 2)"
+            v-hasPermi="['operation:sceneTime:delete']"
+            >删除</el-button
+          >
         </template>
       </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="110px" :disabled="disabled">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="title"
+      width="500px"
+      :before-close="cancel"
+    >
+      <el-form
+        :model="dialogForm"
+        ref="dialogForm"
+        :rules="rules"
+        label-width="110px"
+        :disabled="disabled"
+      >
         <el-form-item label="时间段:" prop="date">
-          <el-time-picker is-range v-model="dialogForm.date" start-placeholder="开始时间" end-placeholder="结束时间"
-            value-format="HH:mm:ss" format="HH:mm:ss" placeholder="选择时间范围" />
+          <el-time-picker
+            is-range
+            v-model="dialogForm.date"
+            start-placeholder="开始时间"
+            end-placeholder="结束时间"
+            value-format="HH:mm:ss"
+            format="HH:mm:ss"
+            placeholder="选择时间范围"
+          />
         </el-form-item>
         <el-form-item label="时间段文案:" prop="name">
           <el-input v-model="dialogForm.name" placeholder="请输入时间段文案" />
         </el-form-item>
         <el-form-item label="时间段Icon:" prop="pic">
-          <Upload listType="picture-card" :url="dialogForm.pic" @upload="upload" style="background: #000;"
-            :disabled="disabled" />
+          <Upload
+            listType="picture-card"
+            :url="dialogForm.pic"
+            @upload="upload"
+            style="background: #000"
+            :disabled="disabled"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer">
         <el-button @click="cancel">取消</el-button>
-        <el-button v-if="!disabled" type="primary" @click="getSubmit">确定</el-button>
+        <el-button v-if="!disabled" type="primary" @click="getSubmit"
+          >确定</el-button
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { list, submit, change, detail } from '@/api/operation/sceneTime'
+import { change, detail, list, submit } from "@/api/operation/sceneTime";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   data() {
     return {
@@ -62,108 +104,128 @@ export default {
       // 弹窗
       dialogVisible: false,
       // 弹窗title
-      title: '',
+      title: "",
       // 弹窗表单
       dialogForm: {},
       // 校验
       rules: {
-        date: [{
-          required: true, message: '请选择时间段', trigger: 'change'
-        }],
-        name: [{
-          required: true, message: '请输入时间段文案', trigger: 'blur'
-        }],
-        pic: [{
-          required: true, message: '请上传图片', trigger: 'change'
-        }]
+        date: [
+          {
+            required: true,
+            message: "请选择时间段",
+            trigger: "change",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message: "请输入时间段文案",
+            trigger: "blur",
+          },
+        ],
+        pic: [
+          {
+            required: true,
+            message: "请上传图片",
+            trigger: "change",
+          },
+        ],
       },
       // 只读
-      disabled: false
-    }
+      disabled: false,
+    };
   },
   mounted() {
-    this.getList()
+    this.getList();
   },
   methods: {
     // 列表
     getList() {
-      this.loading = true
-      list().then(res => {
+      this.loading = true;
+      list().then((res) => {
         if (res.code === 0) {
-          this.tableData = res.data
-          this.loading = false
+          this.tableData = res.data;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 弹窗
     getDialog(title, row) {
-      this.dialogVisible = true
-      this.title = title
-      this.disabled = title === '查看' ? true : false
+      this.dialogVisible = true;
+      this.title = title;
+      this.disabled = title === "查看" ? true : false;
       if (row) {
-        this.getDetail(row.id)
+        this.getDetail(row.id);
       }
     },
 
     // 详情
     getDetail(id) {
-      detail(id).then(res => {
+      detail(id).then((res) => {
         if (res.code === 0) {
-          this.dialogForm = res.data
-          this.$set(this.dialogForm, 'date', [res.data.startTime, res.data.endTime])
+          this.dialogForm = res.data;
+          this.$set(this.dialogForm, "date", [
+            res.data.startTime,
+            res.data.endTime,
+          ]);
         }
-      })
+      });
     },
 
     // 上传icon
     upload(e) {
-      this.dialogForm.pic = e.file
+      this.dialogForm.pic = e.file;
     },
 
     // 取消
     cancel() {
-      this.dialogVisible = false
+      this.dialogVisible = false;
       this.dialogForm = {
-        date: ['', ''],
-        name: '',
-        pic: ''
-      }
-      this.$refs.dialogForm.resetFields()
+        date: ["", ""],
+        name: "",
+        pic: "",
+      };
+      this.$refs.dialogForm.resetFields();
     },
 
     // 确定
     getSubmit() {
       this.$refs.dialogForm.validate((valid) => {
         if (valid) {
-          this.dialogForm.startTime = this.dialogForm.date[0]
-          this.dialogForm.endTime = this.dialogForm.date[1]
-          delete this.dialogForm.date
-          submit(this.dialogForm).then(res => {
+          this.dialogForm.startTime = this.dialogForm.date[0];
+          this.dialogForm.endTime = this.dialogForm.date[1];
+          delete this.dialogForm.date;
+          submit(this.dialogForm).then((res) => {
             if (res.code === 0) {
-              this.$message.success('提交成功!')
-              this.getList()
-              this.cancel()
+              this.$message.success("提交成功!");
+              this.getList();
+              this.cancel();
             }
-          })
+          });
         } else {
-          return false
+          return false;
         }
-      })
+      });
     },
 
     getDelete(row, status) {
-      this.$confirm(`是否删除${row.name}?`, '提示', {
-        type: 'warning'
-      }).then(() => {
-        change(row.id, status).then(res => {
-          if (res.code === 0) {
-            this.$message.success('删除成功!')
-            this.getList()
-          }
-        })
-      })
-    }
-  }
-}
-</script>
+      var that = this;
+      dialogCallBack(that, function () {
+        that
+          .$confirm(`是否删除${row.name}?`, "提示:", {
+            type: "warning",
+          })
+          .then(() => {
+            change(row.id, status).then((res) => {
+              if (res.code === 0) {
+                that.$message.success("删除成功!");
+                that.getList();
+              }
+            });
+          });
+      });
+    },
+  },
+};
+</script>

+ 2 - 2
src/views/operation/startPage/index.vue

@@ -176,7 +176,7 @@ export default {
       var that = this;
       dialogCallBack(that, function () {
         that
-          .$confirm(`是否删除${row.name}`, "提示", {
+          .$confirm(`是否删除${row.name}`, "提示", {
             confirmButtonText: "确认",
             cancelButtonText: "取消",
             type: "warning",
@@ -206,4 +206,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 2 - 2
src/views/operation/tag/index.vue

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

+ 2 - 2
src/views/operation/waken/index.vue

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

+ 1 - 1
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(() => {

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

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

+ 2 - 2
src/views/registration/content/index.vue

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

+ 2 - 2
src/views/registration/exchange/index.vue

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

+ 2 - 2
src/views/registration/regConfig/index.vue

@@ -345,7 +345,7 @@ export default {
       dialogCallBack(that, function () {
         let title = scope.row.signDay ? scope.row.signDay : "空";
         that
-          .$confirm(`是否删除 连续签到天数为${title} 的数据?`, "提示", {
+          .$confirm(`是否删除 连续签到天数为${title} 的数据?`, "提示", {
             type: "warning",
           })
           .then(() => {
@@ -369,7 +369,7 @@ export default {
       dialogCallBack(that, function () {
         let title = scope.row.listenTime ? scope.row.listenTime : "空";
         that
-          .$confirm(`是否删除 播放时间为${title} 的数据?`, "提示", {
+          .$confirm(`是否删除 播放时间为${title} 的数据?`, "提示", {
             type: "warning",
           })
           .then(() => {

+ 1 - 1
src/views/service/package/index.vue

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

+ 116 - 61
src/views/user/store/index.vue

@@ -1,25 +1,57 @@
+<!-- 用户管理 仓库账号 -->
 <template>
-  <div class='app-container'>
-    <el-button type="primary" icon="el-icon-plus" size="mini" @click="dialogVisible = true"
-      v-hasPermi="['user:store:add']">新增</el-button>
+  <div class="app-container">
+    <el-button
+      type="primary"
+      icon="el-icon-plus"
+      size="mini"
+      @click="dialogVisible = true"
+      v-hasPermi="['user:store:add']"
+      >新增</el-button
+    >
     <!-- 列表 -->
     <el-table :data="tableData" v-loading="loading">
       <el-table-column label="账号ID" align="center" prop="id" />
       <el-table-column label="账号名称" align="center" prop="name" />
       <el-table-column label="手机号" align="center" prop="phone" />
-      <el-table-column label="性别" align="center" prop="sex" :formatter="sexFormatter" />
+      <el-table-column
+        label="性别"
+        align="center"
+        prop="sex"
+        :formatter="sexFormatter"
+      />
       <el-table-column label="创建时间" align="center" prop="createTime" />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['user:store:delete']">删除</el-button>
+          <el-button
+            type="delete"
+            @click="getDelete(scope.row)"
+            v-hasPermi="['user:store: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"
+    />
     <!-- 弹窗 -->
-    <el-dialog :visible.sync="dialogVisible" title="新增" width="500px" :before-close="cancel">
-      <el-form :model="dialogForm" ref="dialogForm" :rules="rules" label-width="100px">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      title="新增"
+      width="500px"
+      :before-close="cancel"
+    >
+      <el-form
+        :model="dialogForm"
+        ref="dialogForm"
+        :rules="rules"
+        label-width="100px"
+      >
         <el-form-item label="账号名称:" prop="name">
           <el-input v-model="dialogForm.name" placeholder="请输入账号名称" />
         </el-form-item>
@@ -28,7 +60,11 @@
         </el-form-item>
         <el-form-item label="性别:" prop="sex">
           <el-radio-group v-model="dialogForm.sex">
-            <el-radio v-for="item in sexOptions.slice(0, 2)" :key="item.value" :label="item.value">
+            <el-radio
+              v-for="item in sexOptions.slice(0, 2)"
+              :key="item.value"
+              :label="item.value"
+            >
               {{ item.label }}
             </el-radio>
           </el-radio-group>
@@ -43,30 +79,31 @@
 </template>
 
 <script>
-import { list, submit, remove } from '@/api/user/store'
-import { sexMixin } from '@/mixin/index'
+import { list, remove, submit } from "@/api/user/store";
+import { sexMixin } from "@/mixin/index";
+import { dialogCallBack } from "@/utils/DialogUtil";
 export default {
   mixins: [sexMixin],
   data() {
     const checkPhone = (rule, value, callback) => {
       if (!value) {
-        return callback(new Error('请输入手机号'))
+        return callback(new Error("请输入手机号"));
       } else {
-        const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
+        const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
         if (reg.test(value)) {
-          callback()
+          callback();
         } else {
-          return callback(new Error('请输入正确的手机号'))
+          return callback(new Error("请输入正确的手机号"));
         }
       }
-    }
+    };
     return {
       // 遮罩层
       loading: false,
       // 表单
       form: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
       },
       // 列表
       tableData: [],
@@ -78,76 +115,94 @@ export default {
       dialogForm: {},
       // 校验
       rules: {
-        name: [{
-          required: true, message: '请输入账户名称', trigger: 'blur'
-        }],
-        phone: [{
-          required: true, validator: checkPhone, trigger: 'blur'
-        }],
-        sex: [{
-          required: true, message: '请选择性别', trigger: 'change'
-        }]
-      }
-    }
+        name: [
+          {
+            required: true,
+            message: "请输入账户名称",
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          {
+            required: true,
+            validator: checkPhone,
+            trigger: "blur",
+          },
+        ],
+        sex: [
+          {
+            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.records
-          this.total = res.data.total
-          this.loading = false
+          this.tableData = res.data.records;
+          this.total = res.data.total;
+          this.loading = false;
         }
-      })
+      });
     },
 
     // 取消
     cancel() {
-      this.$refs.dialogForm.resetFields()
-      this.dialogForm = {}
-      this.dialogVisible = false
+      this.$refs.dialogForm.resetFields();
+      this.dialogForm = {};
+      this.dialogVisible = false;
     },
 
     // 提交
     getSubmit() {
       this.$refs.dialogForm.validate((valid) => {
         if (valid) {
-          submit(this.dialogForm).then(res => {
+          submit(this.dialogForm).then((res) => {
             if (res.code === 0) {
-              this.$message.success('提交成功!')
-              this.cancel()
-              this.getList()
+              this.$message.success("提交成功!");
+              this.cancel();
+              this.getList();
             }
-          })
+          });
         } else {
-          return false
+          return false;
         }
-      })
+      });
     },
 
     // 删除
     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)
-    }
-  }
-}
-</script>
+      return this.selectDictLabel(this.sexOptions, row.sex);
+    },
+  },
+};
+</script>