scan.vue
2.94 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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<template>
<div class="content">
<div style="width: 100%;text-align: center;font-weight: 600;">可燃气体暂存间巡查</div>
<table>
<tr>
<td colspan="5">
巡查情况记录:
<button @click="ww()">清空</button>
<br/>
<textarea style="width: 98%;" name="" id="" cols="30" rows="10" v-model="record"> </textarea>
</td>
</tr>
<tr>
<td colspan="3">巡查结果:
<j-search-select-tag placeholder="请选择" v-model="result" :dictOptions="searchOptions">
</j-search-select-tag>
</td>
</tr>
<tr>
<td colspan="3">巡查人:
<a-input v-model="recorder" style="width: 40%"></a-input>
</td>
</tr>
<tr style="height: 5px;">
<td colspan="5" style="text-align: center;">
<button style="width: 20rem;height: 3rem;" @click="submit">提交</button>
</td>
</tr>
</table>
</div>
</template>
<script>
import {addInspectDetail} from '@/api/api'
export default {
data() {
return {
record: '',
recorder: '',
recordDate: '',
result: '',
dynamicModels: {},
dictModel: [],
searchOptions: [{
text: "正常",
value: "正常"
}, {
text: "异常",
value: "异常"
}],
}
},
created() {
},
methods: {
ww() {
this.record = '';
},
submit() {
if (this.result == '') {
this.$message.error("请选择巡查结果!!")
return false;
}
let params = {
'remark': this.record,
'headerId': '1820649883849764866',
'name': this.recorder,
'result': this.result,
}
addInspectDetail(params).then((res) => {
if (res.success) {
this.$message.success("提交成功!")
this.record = '';
this.recorder = '';
} else {
this.$message.error(res.message)
}
})
},
}
,
mounted() {
}
,
}
</script>
<style scoped>
.app-body {
width: 100%;
height: 100%;
}
.content {
width: 99.1%;
height: 100%;
border: 1px solid yellowgreen;
margin: 0 auto;
overflow: auto;
}
body {
font-size: 1rem;
}
table,
td,
th {
border-collapse: collapse;
border-spacing: 0;
}
table {
width: 100%;
margin-top: 10px;
}
td,
th {
border: 2px solid #000000;
padding: 5px 10px;
}
th {
background: #42b983;
font-size: 3vw;
font-weight: 400;
color: #fff;
cursor: pointer;
}
.font {
font-size: 2.8vw;
}
tr:nth-of-type(odd) {
background: #fff;
}
tr:nth-of-type(even) {
background: #eee;
}
button {
outline: none;
padding: 5px 8px;
color: #fff;
border: 1px solid #bcbcbc;
border-radius: 3px;
background-color: #009a61;
cursor: pointer;
}
button:hover {
opacity: 0.8;
}
.text-center {
text-align: center;
}
</style>
<style lang="less">
.app_container {
width: 100%;
height: 100%;
background: #ffff !important;
}
</style>