gasCylinderArchivesDialog.vue
2.65 KB
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
81
82
83
84
85
86
<template>
<el-dialog
title="气瓶档案详情"
:visible.sync="dialogVisible"
width="1000px"
:before-close="handleClose">
<el-row class="gasCylinderDialogSty">
<el-col :span="24">
<el-radio-group v-model="form.infoType">
<el-radio-button v-for="(item,index) in infoTypeList" :label="item" :key="item"></el-radio-button>
</el-radio-group>
</el-col>
<el-col :span="24" style="margin-top: 15px;" >
<component v-for="(item,index) in infoComponentsList" :rowData="rowData" :form="form" v-if="form.infoType === item.name" v-show="form.infoType === item.name" :key="item.name" :is='item.component' :ref='item.component'></component>
</el-col>
</el-row>
<!-- <span slot="footer" class="dialog-footer">-->
<!-- <el-button @click="dialogVisible = false">取 消</el-button>-->
<!-- <el-button type="primary" @click="handleSubmit">确 定</el-button>-->
<!-- </span>-->
</el-dialog>
</template>
<script>
import basicInfo from "./components/basicInfo";
import photoInfo from "./components/photoInfo";
import flowInfo from "./components/flowInfo";
export default {
components: {
basicInfo,
photoInfo,
flowInfo
},
data() {
return {
infoComponentsList:[
{name: '基本信息', component: 'basicInfo'},
{name: '照片信息', component: 'photoInfo'},
{name: '充装信息', component: 'basicInfo'},
{name: '充前检查信息', component: 'basicInfo'},
{name: '充后检查信息', component: 'basicInfo'},
{name: '检验信息', component: 'basicInfo'},
{name: '流转信息', component: 'flowInfo'},
],
dialogVisible: false,
form:{
infoType:'基本信息',
dialogType:''
},
rowData:{},
infoTypeList:['基本信息','照片信息','充装信息','充前检查信息','充后检查信息','检验信息','流转信息']
}
},
methods: {
open(type,row) {
console.log('打印详情部分row===>',row)
this.rowData ={
...row
}
this.dialogVisible = true;
this.form.dialogType = type;
},
handleClose(done) {
this.form.infoType = '基本信息';
this.dialogVisible = false;
// this.$confirm('确认关闭?')
// .then(_ => {
// done();
// })
// .catch(_ => {});
},
handleSubmit() {
this.form.infoType = '基本信息';
this.dialogVisible = false
this.$emit('handleRefresh')
}
}
}
</script>
<style lang="scss" >
.gasCylinderDialogSty{
el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #5875eb!important;
}
}
</style>