DESKTOP-SVI9JE1\muzen před 2 roky
rodič
revize
14e9abfcaf

+ 4 - 4
src/views/device/music/index.vue

@@ -31,13 +31,13 @@
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getDialog('查看', scope.row.id)">查看</el-button>
-          <el-button type="text" v-if="scope.row.status === 0" @click="getChange('禁用', scope.row, 1)"
-            v-hasPermi="['device:music:down']">禁用</el-button>
+          <el-button type="text" v-if="scope.row.status === 0" @click="getChange('下架', scope.row, 1)"
+            v-hasPermi="['device:music:down']">下架</el-button>
           <span v-else>
             <el-button type="text" style="margin-left: 10px" @click="getDialog('编辑', scope.row.id)"
               v-hasPermi="['device:music:edit']">编辑</el-button>
-            <el-button type="text" @click="getChange('启用', scope.row, 0)"
-              v-hasPermi="['device:music:up']">启用</el-button>
+            <el-button type="text" @click="getChange('上架', scope.row, 0)"
+              v-hasPermi="['device:music:up']">上架</el-button>
             <el-button type="delete" @click="getChange('删除', scope.row, 2)"
               v-hasPermi="['device:music:delete']">删除</el-button>
           </span>

+ 4 - 4
src/views/operation/dialog/index.vue

@@ -32,13 +32,13 @@
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getDialog('查看', scope.row.id)">查看</el-button>
-          <el-button v-if="scope.row.status === 0" type="text" @click="getChange(scope.row, 1, '禁用')"
-            v-hasPermi="['operation:dialog:down']">禁用</el-button>
+          <el-button v-if="scope.row.status === 0" type="text" @click="getChange(scope.row, 1, '下架')"
+            v-hasPermi="['operation:dialog:down']">下架</el-button>
           <span v-else style="margin-left: 10px">
             <el-button type="text" @click="getDialog('编辑', scope.row.id)"
               v-hasPermi="['operation:dialog:edit']">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row, 0, '启用')"
-              v-hasPermi="['operation:dialog:up']">启用</el-button>
+            <el-button type="text" @click="getChange(scope.row, 0, '上架')"
+              v-hasPermi="['operation:dialog:up']">上架</el-button>
             <el-button type="delete" @click="getChange(scope.row, 2, '删除')"
               v-hasPermi="['operation:dialog:delete']">删除</el-button>
           </span>

+ 2 - 2
src/views/operation/scene/detail.vue

@@ -35,10 +35,10 @@
           <el-table-column label="操作" align="center">
             <template slot-scope="scope">
               <el-button type="text" @click="getDialog(scope.row.id, '查看')">查看</el-button>
-              <el-button v-if="scope.row.status === 0" type="text" @click="getChange(scope.row, 1, '禁用')">禁用</el-button>
+              <el-button v-if="scope.row.status === 0" type="text" @click="getChange(scope.row, 1, '下架')">下架</el-button>
               <span v-else style="margin-left: 10px">
                 <el-button type="text" @click="getDialog(scope.row.id, '编辑')">编辑</el-button>
-                <el-button type="text" @click="getChange(scope.row, 0, '启用')">启用</el-button>
+                <el-button type="text" @click="getChange(scope.row, 0, '上架')">上架</el-button>
                 <el-button type="delete" @click="getChange(scope.row, 2, '删除')">删除</el-button>
               </span>
             </template>

+ 4 - 4
src/views/operation/scene/index.vue

@@ -14,12 +14,12 @@
       <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 === 0" type="text" @click="getChange(scope.row, 1, '禁用')"
-            v-hasPermi="['operation:scene:down']">禁用</el-button>
+          <el-button v-if="scope.row.status === 0" type="text" @click="getChange(scope.row, 1, '下架')"
+            v-hasPermi="['operation:scene:down']">下架</el-button>
           <span v-else style="margin-left: 10px">
             <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['operation:scene:edit']">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row, 0, '启用')"
-              v-hasPermi="['operation:scene:up']">启用</el-button>
+            <el-button type="text" @click="getChange(scope.row, 0, '上架')"
+              v-hasPermi="['operation:scene:up']">上架</el-button>
             <el-button type="delete" @click="getChange(scope.row, 2, '删除')"
               v-hasPermi="['operation:scene:delete']">删除</el-button>
           </span>

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

@@ -52,7 +52,7 @@
               编辑
             </el-button>
             <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']">
               删除
@@ -204,7 +204,7 @@ export default {
 
     // 上下架
     getChange(row, status) {
-      let title = status === 0 ? '启用' : '禁用'
+      let title = status === 0 ? '上架' : '下架'
       this.$confirm(`是否${title}${row.label}?`, '提示', {
         type: 'warning'
       }).then(() => {

+ 10 - 12
src/views/registration/content/index.vue

@@ -4,14 +4,13 @@
     <el-form inline size="mini">
       <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-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.audioType" placeholder="请选择音频类型" clearable>
-          <el-option v-for="item in form.platformId === '' ? audioOptions : audioTypeOptions" :key="item.value" :value="item.value"
-            :label="item.label" />
+          <el-option v-for="item in form.platformId === '' ? audioOptions : audioTypeOptions" :key="item.value"
+            :value="item.value" :label="item.label" />
         </el-select>
       </el-form-item>
       <el-form-item label="内容标题:">
@@ -19,8 +18,7 @@
       </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>
@@ -55,16 +53,16 @@
             <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['registration:content:edit']"
               style="margin-left: 10px">编辑</el-button>
             <el-button type="text" @click="getChange(scope.row, 0)" v-hasPermi="['registration:content:up']">
-              启用</el-button>
+              上架</el-button>
             <el-button type="delete" @click="getDelete(scope.row)"
               v-hasPermi="['registration:content:delete']">删除</el-button>
           </span>
           <el-button v-else type="delete" @click="getChange(scope.row, 1)"
-            v-hasPermi="['registration:content:down']">禁用</el-button>
+            v-hasPermi="['registration:content: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 v-show="total > 0" :total="total" :page.sync="form.pageNum" :limit.sync="form.pageSize"
       @pagination="getList" />
   </div>
 </template>
@@ -94,7 +92,7 @@ export default {
   watch: {
     'form.platformId': {
       handler(val) {
-        if(val && this.form.audioType == '') {
+        if (val && this.form.audioType == '') {
           this.form.audioType = ''
           this.getAudioType(val)
           this.getList()
@@ -104,7 +102,7 @@ export default {
     },
     'form.audioType': {
       handler(val) {
-        if(val && this.form.platformId == '') {
+        if (val && this.form.platformId == '') {
           this.form.platformId = ''
           this.getPlatform({
             audioType: val
@@ -162,7 +160,7 @@ export default {
 
     // 上下架
     getChange(row, status) {
-      let title = status === 0 ? '启用' : '禁用'
+      let title = status === 0 ? '上架' : '下架'
       this.$confirm(`是否${title}${row.audioName}?`, '提示', {
         type: 'warning'
       }).then(() => {

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

@@ -43,12 +43,12 @@
             <el-button type="text" @click="getDetail(scope.row.id)"
               v-hasPermi="['registration:exchange:edit']" style="margin-left: 10px">编辑</el-button>
             <el-button type="text" @click="getChange(scope.row, 0)" v-hasPermi="['registration:exchange:up']">
-              启用</el-button>
+              上架</el-button>
             <el-button type="delete" @click="getDelete(scope.row)"
               v-hasPermi="['registration:exchange:delete']">删除</el-button>
           </span>
           <el-button v-else type="delete" @click="getChange(scope.row, 1)"
-            v-hasPermi="['registration:exchange:down']">禁用</el-button>
+            v-hasPermi="['registration:exchange:down']">下架</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -132,7 +132,7 @@ export default {
 
     // 上下架
     getChange(row, status) {
-      let title = status === 0 ? '启用' : '禁用'
+      let title = status === 0 ? '上架' : '下架'
       this.$confirm(`是否${title}${row.name}?`, '提示', {
         type: 'warning'
       }).then(() => {

+ 32 - 10
src/views/registration/lottery/index.vue

@@ -2,29 +2,35 @@
   <div class="app-container">
     <el-form size="mini">
       <el-form-item>
-        <el-button type="primary" icon="el-icon-plus" @click="getDetail()" v-hasPermi="['registration:lottery:add']">新增</el-button>
+        <el-button type="primary" icon="el-icon-plus" @click="getDetail()"
+          v-hasPermi="['registration:lottery:add']">新增</el-button>
       </el-form-item>
     </el-form>
     <!-- 列表 -->
     <el-table :data="tableData">
       <el-table-column label="序号" type="index" align="center" />
       <el-table-column label="活动名称" prop="name" align="center" />
-      <el-table-column label="当前状态" prop="status" align="center" :formatter="statusFormatter" />
       <el-table-column label="活动时间" align="center">
         <template slot-scope="scope">
-          {{ scope.row.startTime }}  {{ scope.row.endTime }}
+          {{ scope.row.startTime }} - {{ scope.row.endTime }}
         </template>
       </el-table-column>
       <el-table-column label="活动状态" prop="currentStatus" align="center" :formatter="currentFormatter" />
+      <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>
-          <span v-if="scope.row.status === 1">
-            <el-button type="text" @click="getDetail(scope.row.id)" v-hasPermi="['registration:lottery:edit']" style="margin-left: 10px">编辑</el-button>
-            <el-button type="text" @click="getChange(scope.row, 0)" v-hasPermi="['registration:lottery:up']">启用</el-button>
-            <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['registration:lottery:delete']">删除</el-button>
+          <span v-if="scope.row.status === 1" style="margin: 0 10px;">
+            <el-button type="text" @click="getDetail(scope.row.id)"
+              v-hasPermi="['registration:lottery:edit']">编辑</el-button>
+            <el-button type="text" @click="getChange(scope.row, 0)"
+              v-hasPermi="['registration:lottery:up']">上架</el-button>
+            <el-button type="delete" @click="getDelete(scope.row)"
+              v-hasPermi="['registration:lottery:delete']">删除</el-button>
           </span>
-          <el-button v-else type="delete" @click="getChange(scope.row, 1)" v-hasPermi="['registration:lottery:down']">禁用</el-button>
+          <el-button v-else type="text" @click="getChange(scope.row, 1)"
+            v-hasPermi="['registration:lottery:down']">下架</el-button>
+          <el-button type="text" @click="getCopy(scope.row.id)">复制</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -32,7 +38,7 @@
 </template>
 
 <script>
-import { list, change, remove } from '@/api/registration/lottery'
+import { list, change, remove, copy } from '@/api/registration/lottery'
 import { disabledMixin, currentMixin } from '@/mixin/index'
 export default {
   mixins: [disabledMixin, currentMixin],
@@ -80,7 +86,7 @@ export default {
 
     // 上下架
     getChange(row, status) {
-      let title = status === 0 ? '启用' : '禁用'
+      let title = status === 0 ? '上架' : '下架'
       this.$confirm(`是否${title}${row.name}?`, '提示', {
         type: 'warning'
       }).then(() => {
@@ -112,6 +118,22 @@ export default {
       }).catch(() => { })
     },
 
+    // 复制
+    getCopy(id) {
+      this.$router.push({
+        path: `/registration/lotteryConfig/detail`,
+        query: {
+          copyId: id
+        }
+      })
+      // copy(id).then(res => {
+      //   if (res.code === 0) {
+      //     this.$message.success(`复制成功!`)
+      //     this.getList()
+      //   }
+      // })
+    },
+
     // 字典翻译
     statusFormatter(row) {
       return this.selectDictLabel(this.disabledOptions, row.status)