浏览代码

2025_5_7_bookListApply

CaoGQ123 2 周之前
父节点
当前提交
1f988b54f4
共有 3 个文件被更改,包括 37 次插入13 次删除
  1. 11 5
      src/views/news/bookListApply.vue
  2. 17 5
      src/views/news/creatNews.vue
  3. 9 3
      src/views/news/examine.vue

+ 11 - 5
src/views/news/bookListApply.vue

@@ -81,8 +81,8 @@
             <el-table-column fixed="right" label="操作" width="300" header-align="center">
               <template slot-scope="scope">
                 <div class="listBtnBox">
-                  <div class="listMainBtn" v-if="type_id == 10000" @click="getUpRow(scope.row.id, tableData)"><i
-                      class="el-icon-check"></i>审核
+                  <div class="listMainBtn" v-if="type_id == 10000" @click="getUpRow(scope.row.id, tableData)">
+                    <i class="el-icon-check"></i>审核
                   </div>
 
                   <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
@@ -204,14 +204,20 @@ export default {
       this.$confirm('将此通过审核吗?', '提示', {
         confirmButtonText: '通过',
         cancelButtonText: '拒绝',
+        distinguishCancelAndClose: true,  // 关键配置项,用于区分取消和关闭按钮的行为
         type: 'warning'
       }).then(() => {
         this.upRow(id, 2)
         this.getData();
-      }).catch(() => {
+      }).catch((the_reback) => {
         //输入驳回理由
-        console.log("驳回")
-        this.examineWindow = true;
+        console.log("val=",the_reback)
+        if (the_reback == "cancel") {
+          //输入驳回理由
+          // console.log("驳回" )
+          this.examineWindow = true;
+        }
+
       })
     },
     upRow(id, status) {

+ 17 - 5
src/views/news/creatNews.vue

@@ -605,12 +605,24 @@ 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: '已成功添加资讯!'
-              });
+
+              //判断用户身份
+               
+              if (this.creatNews_user_type == 10000) {
+                  this.$message({
+                    type: 'success',
+                    message: '已成功添加资讯!'
+                  });
+              } else {
+                this.$message({
+                  type: 'success',
+                  message: '待管理员审核!'
+                });
+              }
+
+
               this.cleatForm(2);
               //返回列表页
               this.returnPage()

+ 9 - 3
src/views/news/examine.vue

@@ -313,13 +313,19 @@ export default {
       this.$confirm('将此文章通过审核吗?', '提示', {
         confirmButtonText: '通过',
         cancelButtonText: '拒绝',
+        distinguishCancelAndClose: true,  // 关键配置项,用于区分取消和关闭按钮
         type: 'warning'
       }).then(() => {
         this.upRow(id, 1)
-      }).catch(() => {
+      }).catch((the_reback) => {
         //输入驳回理由
-        console.log("驳回")
-        this.examineWindow = true;
+        
+        if (the_reback == "cancel") {
+          //输入驳回理由
+          // console.log("驳回" )
+          this.examineWindow = true;
+        }
+
       })
     },
     //1.5 修改文章状态