coys hace 2 años
padre
commit
2ee64e88fb

+ 2 - 2
.env.development

@@ -10,12 +10,12 @@ ENV = 'development'
 #罗俊
 # VUE_APP_BASE_API = 'http://10.87.10.49:8080'
 #罗伟
-#VUE_APP_BASE_API = 'http://10.87.10.47:8080'
+VUE_APP_BASE_API = 'http://10.87.10.47:8080'
 #高雄
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
 # VUE_APP_BASE_API = 'http://localhost:8080'
 # 55环境
-VUE_APP_BASE_API = 'http://10.87.10.55:8080'
+# VUE_APP_BASE_API = 'http://10.87.10.55:8080'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 7 - 0
src/api/resumption/outsourcing.js

@@ -56,3 +56,10 @@ export function publishEvaluate(id) {
     method: "get",
   });
 }
+// 取消发布计划
+export function withdraw(id) {
+  return request({
+    url: `/core/evaluatePlan/withdraw/${id}`,
+    method: "get",
+  });
+}

+ 25 - 4
src/views/resumptionEvaluate/evaluate/index.vue

@@ -143,7 +143,7 @@
             </el-table-column>
             <el-table-column
               label="操作"
-              width="180"
+              width="200"
               fixed="right"
               class-name="small-padding fixed-width"
             >
@@ -154,7 +154,7 @@
                   @click="publishHandler(row)"
                   type="text"
                   icon="el-icon-plus"
-                  >发布</el-button
+                  >{{row.isDistribute=='0'? '':'取消'}}发布</el-button
                 >
                 <el-button
                   size="mini"
@@ -194,6 +194,7 @@ import {
   swtichHandler,
   delelteEvaluate,
   publishEvaluate,
+  withdraw,
 } from "@/api/resumption/outsourcing.js";
 import OrgTree from "@/components/orgTree";
 import editEvaluate from "./editDialog.vue";
@@ -270,8 +271,24 @@ export default {
     },
     //发布
     publishHandler(row) {
-      // publishEvaluate
-      this.$modal
+       //0未 //1已
+      if(row.isDistribute=='1'){
+        this.$modal
+        .confirm("是否取消发布?")
+        .then(function () {})
+        .then(() => {
+          withdraw(row.id).then((res) => {
+            let { code, msg } = res;
+            if (code == 200) {
+              this.getList();
+              this.$modal.msgSuccess("取消发布成功");
+            } else {
+              this.$modal.msgSuccess(msg);
+            }
+          });
+        });
+      }else{
+        this.$modal
         .confirm("是否确认发布?")
         .then(function () {})
         .then(() => {
@@ -285,6 +302,10 @@ export default {
             }
           });
         });
+      }
+      
+    
+      
     },
     deleteHandler(row) {
       this.$modal

+ 1 - 1
src/views/resumptionEvaluate/evaluatePlan/index.vue

@@ -157,7 +157,7 @@ export default {
       queryParams: {
         orgId: null,
         checkSub: true,
-        status: null,
+        status: '',
         dataTime: [],
         evaluateName:'',
         pageNum: 1,