<template>
        <div class="dialog-content dialog-seal-batch">
            <div class="p-16">
                <div class="flex-row align-items-center justify-content-between mb-16 case-batch-num">
                    <span>系统将对当前案件中，符合签字条件（已经完成在线签字）的调解协议文书发起电子签章！</span>
                </div>
                <el-collapse-transition>
                    <el-row :gutter="56">
                        <el-col :span="24">
                            <div class="flex-row-center align-items-center height-40 mb-8">
                                <span class="tabs__search-criteria-title flex-shrink-0 pr-16 f18">完成签章后，是否进行文书的自动送达</span>
                            </div>
                        </el-col>
                        <el-col :span="24">
                            <div class="mb-24 officelist">
                                <el-radio-group v-model="ObjectInfo.autoServed">
                                    <el-radio :label="1" border>自动送达</el-radio>
                                    <el-radio :label="0" border>不自动送达(后续可单独发起送达)</el-radio>
                                </el-radio-group>

                            </div>
                            <!-- :disabled="item.documentStaus.code != 2 ? true : false" -->
                        </el-col>
                    </el-row>
                </el-collapse-transition>
            </div>
            <span class="dialog-footer">
                <el-button size="small" @click="handleClose()">取消</el-button>
                <el-button size="small" type="primary" @click="handleSubmit()">发起签章</el-button>
            </span>
        </div>
</template>
<script>
import api from "@/services/caseManagement";
    export default {
        components: {
        },
        props: {
            eventTraDialog: {
                type: Object,
                default: () => {
                    return {}
                },
            },
            caseId: {
                type: String,
                default: () => {},
            },
        },
        data() {
            return {
                officeOptions:[],
                ObjectInfo:{
                    ids:[],
                    autoServed:0
                },
                tableData:[]
            };
        },
        mounted () {
            
        },
        methods: {
            handleSubmit(){
                if(!this.$clickThrottle()) { return }//防止重复点击

                this.ObjectInfo.ids.push(this.caseId)
                api.traceSeal_launch(this.ObjectInfo).then((res) => {
                    this.$message.success("发起签章成功");
                    this.handleClose()
                    this.$parent.getWritCaseList()
                });
            },

            handleClose() {
                this.$emit('update:singlesealvisible', false)
            },
        }
    };
</script>

<style scoped lang="scss">
.dialog-seal-batch {
  width: 495px;
  max-height: 330px;

  .tabs__search-criteria-title {
    width: 100%;
  }

  .case-batch-num {
    background-color: rgba(236, 238, 241, 0.8196078431);
    padding: 15px 20px;
    border-radius: 4px;

    a {
      font-size: 16px;
      font-weight: 500;
      color: #C66A5B;
    }
  }

  .officelist {
    background-color: rgba(236, 238, 241, 0.8196078431);
    padding: 20px 20px;

    .el-checkbox {
      width: 180px;
      margin: 10px;
    }
  }
  .dialog-footer{
    display: inline-block;
    width: 500px;
    text-align: right;
    border-top: solid 1px #E5E6EB;
    padding: 10px;
  }
}
</style>