lyfO_o
2022-03-24 c251626c67a55dfa8305fd49a47a0a2aa00fc32f
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<template>
    <el-dialog :title="title" :visible.sync="dialogFormVisible"
               top="25px"
               :modal-append-to-body="false" :close-on-click-modal="false" width="800px">
        <el-form ref="dataForm"  :model="dataForm" label-position="right" label-width="140px"
                element-loading-text="保存中...">
 
            <el-form-item label="隐患级别:">
                <el-input v-model="dataForm.level" style="width: 205px" placeholder="请选择" :readonly="true"/>
            </el-form-item>
 
            <el-form-item label="整改人:">
                <el-input v-model="dataForm.rectifier" style="width: 205px" placeholder="请选择" :readonly="true"/>
            </el-form-item>
 
            <el-form-item label="整改期限:">
                <el-date-picker
                    v-model="dataForm.rectifydeadline"
                    type="datetime"
                    :readonly="true"
                    format="yyyy-MM-dd HH:mm"
                    value-format="yyyy-MM-dd HH:mm"
                    >
                </el-date-picker>
            </el-form-item>
 
            <el-form-item label="整改措施:" >
                <el-input
                    style="width: 400px"
                    type="textarea"
                    :rows="3"
                    :readonly="true"
                    v-model="dataForm.rectifymeasure">
                </el-input>
            </el-form-item>
 
            <el-form-item label="上报说明:" >
                <el-input
                    style="width: 400px"
                    type="textarea"
                    :rows="3"
                    :readonly="true"
                    v-model="dataForm.createnote">
                </el-input>
            </el-form-item>
 
 
            <el-form-item label="上报图片:" v-if="imgUrls.length > 0" >
                <el-image
                    class="upload-img img-wrapper"
                    v-for='item in imgUrls'
                    :key='item.id'
                    :src="item.url"
                    :preview-src-list="imgPreviewUrls"
                >
                </el-image>
            </el-form-item>
 
 
            <el-form-item label="整改说明:" v-if="this.dataForm.status !== '待整改'">
                <el-input
                    style="width: 400px"
                    type="textarea"
                    :rows="3"
                    :readonly="true"
                    v-model="dataForm.rectifynote">
                </el-input>
            </el-form-item>
 
 
            <el-form-item label="整改图片:"  v-if="this.dataForm.status !== '待整改'  && imgUrls2.length > 0">
                <el-image
                    class="upload-img img-wrapper"
                    v-for='item in imgUrls2'
                    :key='item.id'
                    :src="item.url"
                    :preview-src-list="imgPreviewUrls2"
                >
                </el-image>
 
            </el-form-item>
 
 
            <el-form-item label="驳回原因:"  v-if="this.dataForm.status === '驳回待整改'">
                <el-input
                    style="width: 400px"
                    type="textarea"
                    :rows="3"
                    :readonly="true"
                    v-model="dataForm.rejectnote">
                </el-input>
            </el-form-item>
 
 
        </el-form>
 
    </el-dialog>
</template>
 
<script>
  import {getToken} from "@/utils/auth";
  export default {
    name: 'reportView',
    data() {
      return {
        title:'',
        imgUrls:[],
        imgUrls2:[],
        imgPreviewUrls:[],
        imgPreviewUrls2:[],
        dialogFormVisible:false,
        listLoading: true,
        levels:[
          {"key":"URGENT","value":"紧急"},
          {"key":"COMMON","value":"普通"},
        ],
        dataForm: {
        },
 
      }
    },
    methods:{
      showDialog(title,row){
        this.title = title;
        this.dataForm.status = row.status
        this.dataForm.level = row.level
        this.imgUrls = row.reportResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}})
        this.imgPreviewUrls = row.reportResources.map(item=>{ return process.env.IMG_API + item.url })
        this.imgUrls2 = row.rectifyResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}})
        this.imgPreviewUrls2 = row.rectifyResources.map(item=>{ return process.env.IMG_API + item.url })
        this.dataForm.rectifynote = row.rectifynote
        this.dataForm.createnote = row.createnote;
        this.dataForm.rectifymeasure = row.rectifymeasure;
        this.dataForm.rectifydeadline = row.rectifydeadline;
        this.dataForm.rejectnote = row.rejectnote;
        this.dataForm.rectifier= row.rectifier;
        this.dialogFormVisible = true;
      },
 
    }
  }
</script>
 
<style scoped>
 
    .img-wrapper{
        width:100px;
        height: 100px;
        margin: 10px;
        border-radius: 2px
    }
    .img-wrapper:first-child{
        margin-left: unset !important;
    }
 
</style>