<template>
  <div class="common-dialog">
    <el-dialog
      @close="close"
      center
      :model-value="visible"
      title="添加"
      size="32px"
      width="30%"
      :close-on-click-modal="false"
    >
      <div style="border: 1px solid #ccc; margin-bottom: 10px"></div>
      <div class="inpDialog">
        <span style="font-size: 16px">责任人:</span>
        <el-form ref="formRef" :model="data" label-width="18px" class="demo-dynamic">
          <el-form-item prop="handleMsg">
            <el-input v-model="data.handleMsg" type="text" />
          </el-form-item>
        </el-form>
      </div>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="$emit('update:visible')">取消</el-button>
          <el-button type="primary" @click="confim">确认</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue'
const $emit = defineEmits(['update:visible', 'confim', 'fail'])
const props = defineProps({
  visible: {
    type: Boolean,
  },
})
const data = reactive({
  // handleMsg: '',
  // handleResultStr: ''
})

const confim = () => {
  $emit('update:visible')
}
const close = () => {
  $emit('update:visible')
}
</script>

<style lang="scss" scoped>
:deep(.el-dialog__title) {
  font-size: 26px;
}
.common-dialog {
  display: flex;
  justify-content: center;
  align-items: Center;
  overflow: hidden;

  :deep(.el-dialog) {
    margin: 0 !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.inpDialog {
  margin-top: 10px;
  height: 50px;
  display: flex;
  :deep(.el-input__inner) {
    width: 260px;
  }
}
</style>
