LiuJ 2 hete
szülő
commit
ec44e3cdc4

+ 3 - 1
src/views/news/GoodList.vue

@@ -103,7 +103,7 @@
               <template slot-scope="scope">
                 <div class="listBtnBox">
 
-                  <div class="listUpBtn" @click="returnRow(scope.row.id, tableData)"><i
+                  <div class="listUpBtn" v-if="type_id == 10000" @click="returnRow(scope.row.id, tableData)"><i
                       class="el-icon-refresh-right"></i>撤回</div>
 
                   <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
@@ -152,6 +152,7 @@ export default {
       tableDivTitle: "商品列表",
       tableData: [],//内容
       editId: 0,//要修改的网站id
+      type_id: getUseType(),//发布类型
       getApiData: {
         name: "",//标题
         category_name: "",//导航池id
@@ -299,6 +300,7 @@ export default {
     //添加新闻 end ------------------------------------------------------------>
   },
   mounted() {
+    this.type_id = getUseType()
     //1.获得初始数据
     this.getData();
   }

+ 39 - 2
src/views/news/jobHuntingList.vue

@@ -44,9 +44,12 @@
             </el-table-column>
             <el-table-column prop="updated_at" label="更新时间" width=""></el-table-column>
 
-            <el-table-column fixed="right" label="操作" width="200" header-align="center">
+            <el-table-column fixed="right" label="操作" width="300" header-align="center">
               <template slot-scope="scope">
                 <div class="listBtnBox">
+
+                  <div class="listUpBtn" v-if="type_id == 10000" @click="returnRow(scope.row.id, tableData)"><i
+                      class="el-icon-refresh-right"></i>撤回</div>
                   <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
                       class="el-icon-delete"></i>删除</div>
                   <div class="listEditBtn" @click="goEdit(scope.row.id, tableData)"><i
@@ -79,6 +82,8 @@ import tableTitle from './components/tableTitle';
 //引入公用样式
 import '@/styles/global.less';
 
+import { getUseType } from '@/utils/auth'
+
 export default {
   components: {
     tableTitle,//表格标题
@@ -104,7 +109,38 @@ export default {
     }
   },
   methods: {
-    //1.列表和分页相关 start ------------------------------------------------------------>
+    //1.列表和分页相关 start ------------------------------------------------------------>  
+    returnRow(id) {
+      this.$confirm('确定要撤回吗?', '提示', {
+        confirmButtonText: '撤回',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        //撤回,把文章状态修改为0,重新进行审核
+        this.upRow(id, 1)
+      })
+    },
+    //1.3 修改网站状态
+    upRow(id, status) {
+      let data = {
+        id: id,
+        status: status
+      }
+      this.$store.dispatch('news/updateJobHuntingStatus', data).then(res => {
+        if (res.code == 200) {
+          this.$message({
+            type: 'success',
+            message: '商品状态已修改!'
+          });
+          this.getData();
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '已取消删除'
+        });
+      });
+    },
     //1.1 开始请求列表信息方法
     getData(type) {
       if (type == "search") {
@@ -206,6 +242,7 @@ export default {
   mounted() {
     //1.获得初始数据
     this.getData();
+    this.type_id = getUseType()
   }
 }
 </script>

+ 19 - 3
src/views/news/ncomplaintList.vue

@@ -93,9 +93,12 @@
             </el-table-column>
             <el-table-column prop="created_at" label="创建时间" width=""></el-table-column>
 
-            <el-table-column fixed="right" label="操作" width="200" header-align="center">
+            <el-table-column fixed="right" label="操作" width="300" header-align="center">
               <template slot-scope="scope">
                 <div class="listBtnBox">
+                  <div class="listUpBtn" v-if="type_id == 10000" @click="returnRow(scope.row.id, tableData)"><i
+                      class="el-icon-refresh-right"></i>撤回</div>
+
                   <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
                       class="el-icon-delete"></i>删除</div>
                   <div class="listEditBtn" @click="goEdit(scope.row.id, tableData)"><i
@@ -160,6 +163,18 @@ export default {
   },
   methods: {
     //1.列表和分页相关 start ------------------------------------------------------------>
+    returnRow(id) {
+      this.$confirm('确定要撤回吗?', '提示', {
+        confirmButtonText: '撤回',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        //撤回,把文章状态修改为0,重新进行审核
+        this.upRow(id, 1)
+      })
+    },
+    //1.3 修改网站状态
+
     //1.1 开始请求列表信息方法
     getData(type) {
       if (type == "search") {
@@ -211,9 +226,10 @@ export default {
       }
       this.$store.dispatch('news/updateComplaintStatus', data).then(res => {
         if (res.code == 200) {
+          this.getData();
           this.$message({
             type: 'success',
-            message: '通知状态已修改!'
+            message: '举报状态已修改!'
           });
         }
       }).catch(() => {
@@ -246,7 +262,7 @@ export default {
     },
     //列表和分页相关 end ------------------------------------------------------------>
     //2.添加新闻 start ------------------------------------------------------------>
-    //跳转到通知发布页面
+    //跳转到举报发布页面
     goCreat() {
       this.$router.push({
         path: '/addNcomplaint',

+ 24 - 3
src/views/news/noticeList.vue

@@ -91,9 +91,13 @@
             <el-table-column prop="end" label="到期时间" width=""></el-table-column>
             <el-table-column prop="created_at" label="创建时间" width=""></el-table-column>
 
-            <el-table-column fixed="right" label="操作" width="200" header-align="center">
+            <el-table-column fixed="right" label="操作" width="300" header-align="center">
               <template slot-scope="scope">
                 <div class="listBtnBox">
+
+                  <div class="listUpBtn" v-if="type_id == 10000" @click="returnRow(scope.row.id, tableData)"><i
+                      class="el-icon-refresh-right"></i>撤回</div>
+
                   <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
                       class="el-icon-delete"></i>删除</div>
                   <div class="listEditBtn" @click="goEdit(scope.row.id, tableData)"><i
@@ -124,7 +128,8 @@
 //表格标题
 import tableTitle from './components/tableTitle';
 //引入公用样式
-import '@/styles/global.less';
+import '@/styles/global.less'; import { getUseType } from '@/utils/auth'
+
 
 export default {
   components: {
@@ -152,6 +157,20 @@ export default {
   },
   methods: {
     //1.列表和分页相关 start ------------------------------------------------------------>
+
+    returnRow(id) {
+      this.$confirm('确定要撤回吗?', '提示', {
+        confirmButtonText: '撤回',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        //撤回,把文章状态修改为0,重新进行审核
+        this.upRow(id, 1);
+        this.getData();
+      })
+    },
+    //1.3 修改网站状态
+
     //1.1 开始请求列表信息方法
     getData(type) {
       if (type == "search") {
@@ -201,8 +220,9 @@ export default {
         id: id,
         status: status
       }
-      this.$store.dispatch('news/upArticleStatus', data).then(res => {
+      this.$store.dispatch('news/updateNoticeStatus', data).then(res => {
         if (res.code == 200) {
+          this.getData();
           this.$message({
             type: 'success',
             message: '通知状态已修改!'
@@ -258,6 +278,7 @@ export default {
   mounted() {
     //1.获得初始数据
     this.getData();
+    this.type_id = getUseType()
   }
 }
 </script>

+ 2 - 21
src/views/news/noticeListApply.vue

@@ -214,6 +214,7 @@ export default {
         cancelButtonText: '拒绝',
         type: 'warning'
       }).then(() => {
+
         this.upRow(id, 2)
       }).catch(() => {
         //输入驳回理由
@@ -221,27 +222,6 @@ export default {
         this.examineWindow = true;
       })
     },
-    upRow(id, status) {
-      let data = {
-        id: id,
-        status: status
-      }
-      this.$store.dispatch('news/updateNoticeStatus', data).then(res => {
-        if (res.code == 200) {
-          this.$message({
-            type: 'success',
-            message: '商品状态已修改!'
-          });
-          this.getData();
-        }
-      }).catch(() => {
-        this.$message({
-          type: 'warning',
-          message: '已取消删除'
-        });
-      });
-    },
-
 
     //1.列表和分页相关 start ------------------------------------------------------------>
     //1.1 开始请求列表信息方法
@@ -295,6 +275,7 @@ export default {
       }
       this.$store.dispatch('news/updateNoticeStatus', data).then(res => {
         if (res.code == 200) {
+          this.getData();
           this.$message({
             type: 'success',
             message: '通知状态已修改!'