Blame view

src/views/djbworkflow/components/zc.vue 3.43 KB
1
<!--
2
 * @Description:
3
 * @Autor: renchao
renchao@pashanhoo.com committed
4
 * @LastEditTime: 2024-01-19 16:48:37
5 6
-->
<template>
xiaomiao committed
7 8 9 10 11 12 13 14 15 16 17 18
  <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
19
          此环节为流程最后环节,转出后流程将结束
xiaomiao committed
20 21
        </el-form-item>
      </el-form>
xiaomiao committed
22
      <div v-if="this.formData.showidea">
23 24 25 26 27 28 29 30 31 32 33
        <div class="invalid-reson">审批意见:</div>
        <el-input
          class="opinion"
          v-model="shyj"
          placeholder="请输入审批意见"
          type="textarea"
          :rows="4"></el-input>
      </div>
      <div style="text-align:center">
        <el-button @click="cancelBack">取消转出</el-button>
        <el-button type="primary" @click="submitForm">确定转出</el-button>
xiaomiao committed
34
      </div>
35
    </div>
xiaomiao committed
36
  </div>
37 38 39
</template>

<script>
40 41 42 43 44 45 46 47 48
  import { completeTask, getNextLinkInfo } from "@/api/workFlow.js";
  import { popupCacel } from "@/utils/popup.js";
  import { mapGetters } from "vuex";
  export default {
    props: {
      formData: {
        type: Object,
        default: {},
      },
49
    },
xiaomiao committed
50

51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
    data () {
      return {
        queryForm: {},
        shyj: "",
      };
    },
    methods: {
      /**
       * @description: submitForm
       * @author: renchao
       */
      commonOpinion () {
        this.$popup('常用意见', "workflow/components/dialog/commonOpinion", {
          title: "常用意见",
          width: '75%', // 初始化75% 不需要改的话 可以直接不要
          formData: {}, // 父组件传给子组件的参数
          cancel: function () { }, //取消事件的回调 没有按钮可以不需要
          confirm: function () { } //确认事件的回调 没有按钮可以不需要
        })
      },
      submitForm () {
renchao@pashanhoo.com committed
72
        let that = this
73 74 75 76 77 78 79 80
        this.queryForm = {
          bsmSlsq: this.formData.bsmSlsq,
          shyj: this.shyj,
          stepform: JSON.stringify(this.formData.tabList),
        };
        completeTask(this.queryForm).then((res) => {
          if (res.code === 200) {
            popupCacel();
renchao@pashanhoo.com committed
81
            that.$message.success("转件成功");
82
            setTimeout(() => {
renchao@pashanhoo.com committed
83 84
              window.close();
              that.$emit("input", false);
85 86 87 88 89
              if (window.opener && window.opener.getBpageList) {
                window.opener.getBpageList();
              } else {
                window.opener.frames[0].getBpageList();
              }
renchao@pashanhoo.com committed
90
            }, 360);
91 92 93
          } else {
            this.$message.error(res.message);
          }
renchao@pashanhoo.com committed
94 95 96
        }).catch((error) => {
          // 可以添加适当的错误处理
          this.$message.error("提交任务失败");
97 98 99 100 101 102 103 104 105
        });
      },
      /**
       * @description: closeDialog
       * @author: renchao
       */
      cancelBack () {
        popupCacel();
      },
106
    },
107
  };
108 109
</script>
<style scoped lang="scss">
110 111 112 113 114
  @import "~@/styles/mixin.scss";
  .el-button {
    margin-top: 20px;
    margin-right: 10px;
  }
xiaomiao committed
115

116 117 118 119
  .opinion {
    position: relative;
    font-size: 14px;
  }
xiaomiao committed
120

121 122 123 124 125
  .opinion_btn {
    position: absolute;
    right: 35px;
    bottom: 80px;
  }
126
</style>