<!--
 * @Author: gtz
 * @Date: 2022-03-12 14:17:55
 * @LastEditors: gtz
 * @LastEditTime: 2022-03-12 14:23:43
 * @Description: file content
 * @FilePath: \mt-ck-wms-ui\src\views\basicData\Warehouse\components\PublishTask.vue
-->
<template>
  <el-dialog
    :title="'btn.see' | i18nFilter"
    :visible.sync="visible"
  >
    <el-row :gutter="10">
      <el-form
        ref="dataForm"
        :model="dataForm"
        :rules="dataRule"
        size="medium"
        label-width="110px"
        label-position="left"
      >
        <el-form-item :label="$t('module.basicData.Warehouse.startPosition')" prop="startPosition">
          <el-input v-model="dataForm.startPosition" readonly :style="{width: '100%'}" />
        </el-form-item>
        <el-form-item :label="$t('module.basicData.Warehouse.endPosition')" prop="endPosition">
          <el-input v-model="dataForm.endPosition" readonly :style="{width: '100%'}" />
        </el-form-item>
        <el-form-item :label="$t('module.basicData.Warehouse.taskType')" prop="taskType">
          <el-input v-model="dataForm.taskType" readonly :style="{width: '100%'}" />
        </el-form-item>
      </el-form>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
      <el-button type="primary" @click="visible = false">{{ 'btn.submit' | i18nFilter }} </el-button>
    </span>
  </el-dialog>
</template>

<script>
// import { CurrentTaskDetail } from '@/api/basicData/Warehouse/HistoricalTask'

export default {
  data() {
    return {
      visible: false,
      dataForm: {
        startPosition: null,
        endPosition: null,
        taskType: null
      },
      dataRule: {
        startPosition: [
          { required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.Warehouse.startPosition')]), trigger: 'blur' }
        ],
        endPosition: [
          { required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.Warehouse.endPosition')]), trigger: 'blur' }
        ],
        taskType: [
          { required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.basicData.Warehouse.taskType')]), trigger: 'blur' }
        ]
      }
    }
  },
  methods: {
    init() {
      this.visible = true
      this.$nextTick(() => {
        this.$refs['dataForm'].resetFields()
      })
    }
  }
}
</script>
