Browse Source

Merge branch 'pre' of http://git.bjzxtw.org.cn:3000/zxt/admin_home into pre

LiuJ 2 weeks ago
parent
commit
e0e6dad9f2

+ 30 - 12
src/views/news/addBook.vue

@@ -506,13 +506,22 @@ export default {
           this.$store.dispatch('news/addBook', this.form).then(res => {
             if (res.code == 200) {
               //汇报结果
-              this.$message({
-                type: 'success',
-                message: '已成功添加书刊音像!'
-              });
+              if (this.userType == 10000) {
+                this.$message({
+                  type: 'success',
+                  message: '已成功添加书刊音像!'
+                });
+                //返回列表页
+                this.returnPage()
+              } else {
+                this.$message({
+                  type: 'success',
+                  message: '待管理员审核!'
+                });
+                //返回列表页
+                this.returnPage()
+              }
               this.cleatForm();
-              //返回列表页
-              this.returnPage()
             } else {
               this.$message({
                 type: 'error',
@@ -670,13 +679,22 @@ export default {
               this.$message.error("修改失败,请稍后再试!");
             } else {
               //汇报结果
-              this.$message({
-                type: 'success',
-                message: '已成功编辑书刊音像!'
-              });
+              if (this.userType == 10000) {
+                this.$message({
+                  type: 'success',
+                  message: '已成功编辑书刊音像!'
+                });
+                //返回列表页
+                this.returnPage()
+              } else {
+                this.$message({
+                  type: 'success',
+                  message: '待管理员审核!'
+                });
+                //返回列表页
+                this.returnPage()
+              }
               this.cleatForm();
-              //返回列表页
-              this.returnPage()
             }
           }).catch(() => {
             this.$message({

+ 18 - 7
src/views/news/addGood.vue

@@ -575,13 +575,24 @@ export default {
           this.$store.dispatch('news/addGood', this.form).then(res => {
             if (res.code == 200) {
               //汇报结果
-              this.$message({
-                type: 'success',
-                message: '已成功添加商品!'
-              });
-              this.cleatForm();
-              //返回列表页
-              this.returnPage()
+              if (this.type_id == 10000) {
+                this.$message({
+                  type: 'success',
+                  message: '已成功添加商品!'
+                });
+                this.cleatForm();
+                //返回列表页
+                this.returnPage()
+              } else {
+                this.$message({
+                  type: 'success',
+                  message: '待管理员审核!'
+                });
+                this.cleatForm();
+                //返回列表页
+                this.returnPage()
+              }
+
             } else {
               this.$message({
                 type: 'error',

+ 16 - 2
src/views/news/bookList.vue

@@ -78,9 +78,11 @@
 
             <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
@@ -158,6 +160,17 @@ export default {
         this.allCount = res.data.count; //给与总条数
       })
     },
+    // 1.2.1 撤回
+    returnRow(id) {
+      this.$confirm('确定要撤回吗?', '提示', {
+        confirmButtonText: '撤回',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        //撤回,把文章状态修改为0,重新进行审核
+        this.upRow(id, 1)
+      })
+    },
     //1.2 删除内容
     deleteRow(id) {
       this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', {
@@ -195,8 +208,9 @@ export default {
         if (res.code == 200) {
           this.$message({
             type: 'success',
-            message: '通知状态已修改!'
+            message: '审核状态已修改!'
           });
+          this.getData();
         }
       }).catch(() => {
         this.$message({

+ 2 - 2
src/views/news/bookListApply.vue

@@ -185,7 +185,7 @@ export default {
             if (res.code == 200) {
               this.$message({
                 type: 'success',
-                message: '操作成功!'
+                message: '审核状态已修改!'
               });
               this.getData();
               this.form.reason = "";//清空上一次的输入
@@ -287,7 +287,7 @@ export default {
         if (res.code == 200) {
           this.$message({
             type: 'success',
-            message: '通知状态已修改!'
+            message: '审核状态已修改!'
           });
           this.getData();
         }

+ 45 - 29
src/views/news/creatNews.vue

@@ -7,8 +7,8 @@
           <el-form-item label="资讯题目:" prop="title" class="custom-align-right">
             <el-input v-model="form.title" autocomplete="off" placeholder="请输入资讯标题"></el-input>
             <!-- <el-checkbox v-model="form.islink">是否使用外链</el-checkbox> -->
-            <el-checkbox v-model="form.islink" v-if="creatNews_user_type == 10000">是否使用外链</el-checkbox> 
-             
+            <el-checkbox v-model="form.islink" v-if="creatNews_user_type == 10000">是否使用外链</el-checkbox>
+
           </el-form-item>
           <div v-if="form.islink == true">
             <el-form-item label="站点名称:" prop="web_site_id" class="custom-align-right">
@@ -605,23 +605,32 @@ export default {
 
           this.$store.dispatch('news/addArticle', formData).then(res => {//
             if (res.code == 200) {
-               console.log("资讯发布成功!200")   
+              console.log("资讯发布成功!200")
               //汇报结果
-              this.$message({
-                type: 'success',
-                message: '已成功添加资讯!'
-              });
-              this.cleatForm(2);
-              //返回列表页
-              this.returnPage()
+              if (this.creatNews_user_type == 10000) {
+                this.$message({
+                  type: 'success',
+                  message: '已成功添加资讯!'
+                });
+                this.cleatForm(2);
+                //返回列表页
+                this.returnPage()
+              } else {
+                this.$message({
+                  type: 'success',
+                  message: '待管理员审核!'
+                });
+                this.cleatForm(2);
+                //返回列表页
+                this.returnPage()
+              }
             } else {
-              
               this.$message({
-                       type: 'error',
-                        message: res.message 
-                     }); 
+                type: 'error',
+                message: res.message
+              });
+
 
- 
             }
           }).catch(() => {
             this.$message({
@@ -905,24 +914,31 @@ export default {
           //console.log(this.form)
           this.$store.dispatch('news/updateArticle', formData).then(res => {
             if (res.code != 200) {
- 
-               this.$message({
-                       type: 'error',
-                        message: res.message 
-                     }); 
 
-            } else {
-              //汇报结果
               this.$message({
-                type: 'success',
-                message: '已成功编辑资讯!'
+                type: 'error',
+                message: res.message
               });
-              this.cleatForm(2);
-              //返回列表页
-              this.returnPage()
-              console.log(this.form);
 
-              // this.form.level=JSON.parse(this.form.level);
+            } else {
+              //汇报结果
+              if (this.creatNews_user_type == 10000) {
+                this.$message({
+                  type: 'success',
+                  message: '已成功编辑资讯!'
+                });
+                this.cleatForm(2);
+                //返回列表页
+                this.returnPage()
+              } else {
+                this.$message({
+                  type: 'success',
+                  message: '待管理员审核!'
+                });
+                this.cleatForm(2);
+                //返回列表页
+                this.returnPage()
+              }
             }
           }).catch(() => {
             this.$message({