wangxinhui
4 天以前 9ec715d2deb18a269dd49c48da91a36632d08c81
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<template>
    <!-- 弹出框一 -->
    <vol-box :lazy="true" v-model="model1" title="检验信息" :width="500" :padding="5" :onModelClose="onModelClose">
        <div style="height:350px;">
            <div style="width:450px;margin: 10px auto;">
                <el-descriptions column="1">
                    <el-descriptions-item label="检验结果:">
                        <el-tag size="small" :type="!model1Rows?'success':'error'">
                            {{!model1Rows?"合格":"报废" }}
                        </el-tag>
                    </el-descriptions-item>
                    <el-descriptions-item :label="!model1Rows?'':'缺陷代码:'" >
                        {{!model1Rows?"":model1Rows.defectCode}}
                    </el-descriptions-item>
                    <el-descriptions-item :label="!model1Rows?'':'检验数量:'">
                        {{!model1Rows?"":model1Rows.checkquantity}}
                    </el-descriptions-item>
                    <el-descriptions-item :label="!model1Rows?'':'抽样数量:'">
                        {{!model1Rows?"":model1Rows.sampleCount}}
                    </el-descriptions-item>
                    <el-descriptions-item :label="!model1Rows?'':'报废数量:'">
                        {{!model1Rows?"":model1Rows.quantity}}
                    </el-descriptions-item>
                    <el-descriptions-item :label="!model1Rows?'':'检验员工:'">
                        {{!model1Rows?"":model1Rows.creater}}
                    </el-descriptions-item>
                    <el-descriptions-item :label="!model1Rows?'':'检验备注:'">
                        {{!model1Rows?"":model1Rows.note}}
                    </el-descriptions-item>
                </el-descriptions>
            </div>
        </div>
        <template #footer>
            <div>
                <!-- <el-button type="primary" plain size="small" @click="callParent">调用生成(父)页面对象</el-button> -->
                <!-- <el-button type="primary" size="small" @click="closeModel1">确认</el-button> -->
                <el-button type="default" size="small" @click="model1 = false">关闭</el-button>
            </div>
        </template>
    </vol-box>
</template>
<script>
import VolBox from '@/components/basic/VolBox.vue';
//这里使用的vue2语法,也可以写成vue3语法
export default {
    components: { 'vol-box': VolBox },
    methods: {},
    data() {
        return {
            model1: false,
            model1Rows: null, 
        };
    },
    methods: {
        open(info) { //弹出框1
            this.model1Rows = info;
            this.model1 = true;
            console.log(info);
        },
        closeModel1() {
            this.model1 = false;
            this.model1Rows=null;
        },
        // callParent() {
        //     this.$emit('parentCall', $parent => {
        //         //$parent就是生成页面的对象,比如可以调用页面刷新,可获取的属性与方法见【生成页面文档】,$parent.xxx直接调用
        //         //调用刷新
        //         $parent.search();
        //         //获取所有选中的行数据
        //         // $parent.getSelectRows();
        //         this.$message.success('调用了刷新')
        //     })
        // },
        onModelClose() {
            this.model1 = false;
            this.model1Rows=null;
        }
    }
};
</script>