th.vue 3.28 KB
<template>
  <dialogBox title="退回" @submitForm="submitForm" :saveloding="saveloding" saveButton="确认退回" width="80%" 
     @closeDialog="closeDialog" v-model="value">
    <div class="from-clues">
      <!-- 表单部分 -->
      <div class="from-clues-header">
        <el-form ref="queryForm" label-width="120px">
        <div v-for='(item,index) in tableData' :key='item.bdcdyid'>
          <el-form-item label="不动产单元号:">
            <p>{{item.bdcdyh}}</p>
          </el-form-item>
          <lb-table :column="columns" border  :heightNum="390"  :pagination="false" heightNumSetting
          :data="item.nodeList">
        </lb-table>
        <el-form-item label="退回意见:">
          <el-input class="textArea" type="textarea" v-model="outstepopinion"></el-input>
        </el-form-item>
        </div>
        </el-form>
      </div>
    </div>
  </dialogBox>
</template>

<script>
   import { getTaskBackNode,sendBackTask } from "@/api/fqsq.js"
export default {
  components: {
  },
  props: {
    value: { type: Boolean, default: false },
    queryForm:{type:Object}
  },
  data () {
    const columns=[
      // {
      //   label: '',
      //   align: 'center',
      //   render: (h, scope) => {
      //     return   <el-radio label={scope.row.taskid} v-model={this.radioVal} >{''}</el-radio>
      //   }
      // },
      {
        label: "",
        width: "36px",
        render: (h, scope) => {
          return (
            <div class="orgColumn">
              <el-radio v-model={this.radioVal} label={scope.row.taskid}  onChange={() => {this.radioClick(scope.row);
                    }}>
                {" "}
                &ensp;
              </el-radio>
            </div>
          );
        },
      },
      {
        prop: "fromstepname",
        label: "退回环节名称",
      },
      {
        prop: "username",
        label: "办理人",
      },
     
    ];
    return {
    saveloding:false,
    columns,
    radioVal:"",
    outstepopinion:"",
    tableData:[],
    list:{
      bsmSlsq:"",
      backNodeList:[],
    },
    }
  },
  mounted(){
    if(this.$route.query.bsmSlsq){
        this.list.bsmSlsq = this.$route.query.bsmSlsq
    }
  },
  methods: {
    tablelistFn(){
      getTaskBackNode(this.queryForm).then(res => {
        if (res.code === 200) {
            this.tableData = res.result 
        }
      })
    },
    radioClick(scope){
      this.taskid = scope.taskid
     
    },
    submitForm () {
      if(this.taskid==undefined){
        this.$message.error('请至少选择一条数据');
        return
      }
      this.list.backNodeList = this.tableData.map((item,index)=>{
        return {
          id:item.id,
          taskid:this.taskid,
          processInstanceId:item.processInstanceId,
          outstepopinion:this.outstepopinion
        }
      })
      sendBackTask(this.list).then(res => {
        console.log(res,11)
        if (res.code === 200) {
          window.opener = null;
          window.open("about:blank", "_self");
          window.close();
           this.$emit('input', false)
        }
      })
    },
    closeDialog () {
      this.$emit("input", false);
    },
  
  }
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
.textArea {
  /deep/.el-textarea__inner {
    min-height: 90px !important;
  }
}
</style>