Blame view

src/views/djbworkflow/components/zc.vue 3.85 KB
1
<!--
2
 * @Description:
3 4 5 6
 * @Autor: renchao
 * @LastEditTime: 2023-05-17 10:42:01
-->
<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 24
      <div v-if="this.formData.showidea">
       <div class="invalid-reson">审批意见:</div>
xiaomiao committed
25
      <el-input
xiaomiao committed
26
        class="opinion"
xiaomiao committed
27
        v-model="shyj"
xiaomiao committed
28
        placeholder="请输入审批意见"
xiaomiao committed
29 30 31
        type="textarea"
        :rows="4"
      ></el-input>
xiaomiao committed
32 33
      </div>

xiaomiao committed
34
      <!-- <el-button class="opinion_btn" @click="commonOpinion">常用意见</el-button> -->
xiaomiao committed
35 36 37 38
      <el-button style="float: right" @click="cancelBack">取消转出</el-button>
      <el-button type="primary" @click="submitForm" style="float: right"
        >确定转出</el-button
      >
39
    </div>
xiaomiao committed
40
  </div>
41 42 43
</template>

<script>
xiaomiao committed
44 45
import { completeTask, getNextLinkInfo } from "@/api/workFlow.js";
import { popupCacel } from "@/utils/popup.js";
xiaomiao committed
46
import { mapGetters } from "vuex";
xiaomiao committed
47
export default {
xiaomiao committed
48 49
   computed: {
  },
xiaomiao committed
50 51 52 53
  props: {
    formData: {
      type: Object,
      default: {},
54
    },
xiaomiao committed
55
  },
xiaomiao committed
56

xiaomiao committed
57 58 59 60 61 62
  data() {
    return {
      queryForm: {},
      shyj: "",
    };
  },
xiaomiao committed
63 64 65 66 67 68 69 70 71 72

 watch: {
    yjsqOptions: {
      handler(val) {
        this.add(val);
      },
      deep: true,
      immediate: true,
    },
  },
xiaomiao committed
73 74 75 76 77 78 79 80
  mounted() {
    //  this.queryForm= this.queryForm.obj
  },
  methods: {
    /**
     * @description: submitForm
     * @author: renchao
     */
xiaomiao committed
81 82 83 84 85 86 87 88 89
    commonOpinion() {
      this.$popup('常用意见',"workflow/components/dialog/commonOpinion",{
        title:"常用意见",
  width: '75%', // 初始化75% 不需要改的话 可以直接不要
  formData:{}, // 父组件传给子组件的参数
  cancel: function () {}, //取消事件的回调 没有按钮可以不需要
  confirm: function () {} //确认事件的回调 没有按钮可以不需要
})
    },
xiaomiao committed
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
    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
105 106
          popupCacel();
          setTimeout(() => {
xiaomiao committed
107 108 109 110 111 112 113 114 115
            // 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
116
        } else {
xiaomiao committed
117 118 119
          this.$message.error(res.message);
        }
      });
120
    },
xiaomiao committed
121
    /**
xiaomiao committed
122 123 124 125 126 127 128 129 130 131 132
     * @description: add
     * @param {*} val
     * @author: renchao
     */
    add(val) {
      if (val != "") {
        this.shyj;
      }
    },

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

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

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