Blame view

src/views/workflow/components/zc.vue 3.53 KB
1
<!--
2
 * @Description:
3 4 5
 * @Autor: renchao
 * @LastEditTime: 2023-05-17 10:42:01
-->
liangyifan committed
6
<template>
xiaomiao committed
7 8 9 10 11 12 13 14 15 16 17 18 19
  <div class="from-clues">
    <!-- 表单部分 -->
    <div class="from-clues-header">
      <el-form ref="queryForm" label-width="180px" v-if="this.formData.obj">
        <el-form-item label="下一环节名称:">
          {{ this.formData.obj.taskName }}
        </el-form-item>
        <el-form-item label="下一环节办理人:">
          {{ this.formData.obj.usernames.join(",") }}
        </el-form-item>
      </el-form>
      <el-form ref="queryForm" label-width="180px" v-else>
        <el-form-item label="">
xiaomiao committed
20
          此环节为流程最后环节,转出后流程将结束
xiaomiao committed
21 22
        </el-form-item>
      </el-form>
xiaomiao committed
23
      <div class="invalid-reson">审批意见:</div>
xiaomiao committed
24
      <el-input
xiaomiao committed
25
        class="opinion"
xiaomiao committed
26
        v-model="shyj"
xiaomiao committed
27
        placeholder="请输入审批意见"
xiaomiao committed
28 29 30
        type="textarea"
        :rows="4"
      ></el-input>
xiaomiao committed
31 32 33 34 35
      <!-- <el-button
        class="opinion_btn"
        @click="commonOpinion"
        >常用意见</el-button
      > -->
xiaomiao committed
36 37 38 39
      <el-button style="float: right" @click="cancelBack">取消转出</el-button>
      <el-button type="primary" @click="submitForm" style="float: right"
        >确定转出</el-button
      >
liangyifan committed
40
    </div>
xiaomiao committed
41
  </div>
liangyifan committed
42 43 44
</template>

<script>
xiaomiao committed
45 46
import { completeTask, getNextLinkInfo } from "@/api/workFlow.js";
import { popupCacel } from "@/utils/popup.js";
xiaomiao committed
47
import { mapGetters } from 'vuex'
xiaomiao committed
48 49
export default {
  components: {},
xiaomiao committed
50

xiaomiao committed
51 52 53 54
  props: {
    formData: {
      type: Object,
      default: {},
蔡俊立 committed
55
    },
xiaomiao committed
56
  },
xiaomiao committed
57 58 59
    computed: {
      ...mapGetters(['yjsqOptions'])
    },
xiaomiao committed
60 61 62 63 64 65
  data() {
    return {
      queryForm: {},
      shyj: "",
    };
  },
xiaomiao committed
66 67 68 69 70 71 72 73 74 75 76

   watch: {
      // yjsqOptions: {
      //   handler (val) {
      //      if(val){
      //          this.shyj = val
      //      }

      //   },
      // },
    },
xiaomiao committed
77 78 79 80 81 82 83 84
  mounted() {
    //  this.queryForm= this.queryForm.obj
  },
  methods: {
    /**
     * @description: submitForm
     * @author: renchao
     */
xiaomiao committed
85 86 87 88 89 90 91 92 93
      commonOpinion() {
      this.$popupDialog(
        "常用意见",
        "workflow/components/dialog/commonOpinion",
        {},
        "70%",
        true
      );
    },
xiaomiao committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
    submitForm() {
      this.queryForm = {
        bsmSlsq: this.formData.bsmSlsq,
        shyj: this.shyj,
        stepform: JSON.stringify(this.formData.tabList),
      };
      completeTask(this.queryForm).then((res) => {
        if (res.code === 200) {
          this.$message.success("转件成功");
          // setTimeout(() => {
          //   window.opener = null;
          //   window.open("about:blank", "_self");
          //   window.close();
          //   this.$emit("input", false);
          // }, 1000);
xiaomiao committed
109 110
          popupCacel();
          setTimeout(() => {
xiaomiao committed
111 112 113 114 115 116 117 118 119
            // window.opener.location.reload(); //刷新父窗口
            if (window.opener && window.opener.getBpageList) {
              window.opener.getBpageList();
            } else {
              window.opener.frames[0].getBpageList();
            }
            window.close();
            this.$emit("input", false);
          }, 1000);
xiaomiao committed
120
        } else {
xiaomiao committed
121 122 123
          this.$message.error(res.message);
        }
      });
liangyifan committed
124
    },
xiaomiao committed
125

xiaomiao committed
126 127 128 129 130 131
    /**
     * @description: closeDialog
     * @author: renchao
     */
    cancelBack() {
      popupCacel();
liangyifan committed
132
    },
xiaomiao committed
133 134
  },
};
liangyifan committed
135 136
</script>
<style scoped lang="scss">
xiaomiao committed
137 138 139 140 141
@import "~@/styles/mixin.scss";
.el-button {
  margin-top: 20px;
  margin-right: 10px;
}
xiaomiao committed
142 143 144 145 146 147 148 149 150 151 152 153 154

.opinion {
  position: relative;
  font-size: 14px;


}

.opinion_btn {
  position: absolute;
right: 35px;
    bottom: 80px;
}
liangyifan committed
155
</style>