<template>
    <a-modal :title="title" width="80%" wrapClassName="t20" v-model="visible" :destroyOnClose="true"
        :maskClosable="false" @cancel="handleCloseCancel">
        <div class="table-list-wrapper">
            <a-form-model ref="ruleForm" :model="form" class="form-descriptions-word">
                <a-descriptions size="small" bordered>
                    <a-descriptions-item label="风场名称" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.factoryName) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="经度" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.longitude) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="纬度" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.latitude) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="项目名称" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.projectName) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="合同编码" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.contractCode) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="到货时间" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.arrivalTime) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="工程人员" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.engineer) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="工程到场时间" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.engineerAttendanceTime) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="工程完成时间" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.engineerCompletionTime) }}</span>
                    </a-descriptions-item>
                    <a-descriptions-item label="项目详情" :span="1">
                        <span class="ml10">{{ $utils.isEffectiveCommon(form.projectContent) }}</span>
                    </a-descriptions-item>
                </a-descriptions>
            </a-form-model>
        </div>
    </a-modal>
</template>

<script>
import pick from 'lodash.pick'
export default {
    name: 'SinglePopup',
    data() {
        return {
            form: {},
            title:'',
            disableSubmit:false,
            visible:false
            
        };
    },
    methods: {
        view(data) {
            this.form = pick(
                data,
                'factoryName',
                'longitude',
                'latitude',
                'projectName',
                'contractCode',
                'saleDirector',
                'arrivalTime',
                'engineer',
                'engineerAttendanceTime',
                'engineerCompletionTime',
                'projectContent'
            )
            this.visible=true
        },
        // 清空当前页数据
        handleCloseCancel() {
            this.form = {}
            this.disableSubmit = false
            this.visible=false
        }
    },
};
</script>

<style scoped>
@import '../../../assets/less/word-old.css';
</style>