luojun %!s(int64=2) %!d(string=hai) anos
pai
achega
f37e87839e

+ 8 - 1
src/api/resumption/plan.js

@@ -12,7 +12,14 @@ export function list(query) {
 // 查询【请填写功能名称】详细
 export function itemfind(id) {
   return request({
-    url: '/core/api/plan/item/find' + id,
+    url: '/core/api/plan/item/find/' + id,
+    method: 'get'
+  })
+}
+// 查询【请填写功能名称】详细
+export function cheHui(id) {
+  return request({
+    url: '/core/api/plan/cheHui/' + id,
     method: 'get'
   })
 }

+ 17 - 15
src/views/resumption/plan/dialog.edit.vue

@@ -75,8 +75,8 @@
                 </el-form-item>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
-              <el-form-item prop="planStatus" label="计划状态:">
+            <!-- <el-col :span="6">
+              <el-form-item prop="planStatus" label="计划状态:"> -->
                 <!-- <el-select
                   :disabled="getDistributePlanStatus()"
                   prop="planStatus"
@@ -93,11 +93,22 @@
                   >
                   </el-option>
                 </el-select> -->
-                <el-switch
+                <!-- <el-switch
                   v-model="formData.planStatus"
                   active-value="1"
                   inactive-value="0"
-                ></el-switch>
+                ></el-switch> -->
+              <!-- </el-form-item> -->
+            <!-- </el-col> -->
+            <el-col :span="6">
+              <el-form-item prop="buildTaskNow" label="立即生效:">
+                <el-checkbox
+                  :disabled="id ? true : false"
+                  v-model="formData.buildTaskNow"
+                  size="medium"
+                  @change="handleCheckboxChange"
+                  >默认从下个周期生成任务,<br>勾选后从当前周期立即生成任务</el-checkbox
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -164,17 +175,7 @@
               </el-form-item>
             </el-col>
 
-            <el-col :span="6">
-              <el-form-item prop="buildTaskNow" label="立即生效:">
-                <el-checkbox
-                  :disabled="id ? true : false"
-                  v-model="formData.buildTaskNow"
-                  size="medium"
-                  @change="handleCheckboxChange"
-                  >勾选后当前周期开始生效</el-checkbox
-                >
-              </el-form-item>
-            </el-col>
+
 
             <el-col :span="6">
               <el-form-item prop="count" label="履职次数:" v-if="false">
@@ -689,6 +690,7 @@ export default {
     },
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {
+        this.formData.planStatus=0;
         this.isSubmitting = true;
         // this.formData.note = this.formData.description;
         this.formData.planCreateOrgId = this.orgId;

+ 25 - 7
src/views/resumption/plan/index.vue

@@ -308,6 +308,15 @@
                 v-hasPermi="['system:user:remove']"
                 >下发</el-button
               >
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-arrow-down"
+                v-if="chehui(r.row)"
+                @click="chhuile(r.row)"
+                v-hasPermi="['system:user:remove']"
+                >撤回</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -334,7 +343,7 @@
 <script>
 import DialogDistribute from "@/views/resumption/plan/distribute.vue";
 import OrgTree from "@/components/orgTree";
-import { mapState, mapMutations,mapGetters } from "vuex";
+import { mapState, mapMutations, mapGetters } from "vuex";
 import DialogEdit from "./dialog.edit";
 import * as api from "@/api/resumption/plan";
 import { statusOptions, getLabel } from "./../../commonOption";
@@ -411,11 +420,7 @@ export default {
     eqOrg(row) {
       // console.log(row.planCreateOrgId,"row.planCreateOrgId");
       // console.log(this.orgId,"this.orgId");
-      if (
-        row != null &&
-        row != undefined &&
-        row.planOfOrgId == this.orgId
-      ) {
+      if (row != null && row != undefined && row.planOfOrgId == this.orgId) {
         return true;
       }
       return false;
@@ -423,7 +428,20 @@ export default {
     //已完成下发的计划不显示下发按钮
     checkCanPublish(row) {
       // console.log(row.planOfOrgType,"row.planOfOrgType")
-      if (row.planOfOrgType == "1" && row.distribute==null) {
+      if (row.planOfOrgType == "1" && row.distribute == null) {
+        return true;
+      }
+      return false;
+    },
+    chhuile(row) {
+      this.loading = true;
+      api.cheHui(row.id).then((response) => {
+        this.getList();
+        this.loading = false;
+      });
+    },
+    chehui(row) {
+      if (row.planOfOrgType == "1" && row.distribute == 1) {
         return true;
       }
       return false;