|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div>
|
|
|
3
|
+ <el-card :body-style="cardBodyStyle">
|
|
|
4
|
+ <el-form :model="query" label-width="auto" label-position="right">
|
|
|
5
|
+ <el-row :gutter="10">
|
|
|
6
|
+ <el-col :span="5">
|
|
|
7
|
+ <el-form-item label="库房名称" style="margin-bottom: 0px;" >
|
|
|
8
|
+ <el-input v-model="query.wareNm" clearable placeholder="请输入库房名称" style="width:100%;"></el-input>
|
|
|
9
|
+ </el-form-item>
|
|
|
10
|
+ </el-col>
|
|
|
11
|
+ <el-col :span="4">
|
|
|
12
|
+ <el-form-item label="" style="margin-bottom: 0px; margin-top: 5px;">
|
|
|
13
|
+ <el-button type="primary" @click="handleSearch">查询</el-button>
|
|
|
14
|
+ <el-button type="success" @click="insertDialog">新增</el-button>
|
|
|
15
|
+ </el-form-item>
|
|
|
16
|
+ </el-col>
|
|
|
17
|
+ </el-row>
|
|
|
18
|
+ </el-form>
|
|
|
19
|
+ </el-card>
|
|
|
20
|
+ <ButtonBox @search="handleSearch" @add="insertDialog"></ButtonBox>
|
|
|
21
|
+ <el-card :body-style="cardBodyStyle">
|
|
|
22
|
+ <el-table :data="tableData" border highlight-current-row @selection-change="handleSelectionChange" :height="height" >
|
|
|
23
|
+ <el-table-column type="selection" fixed></el-table-column>
|
|
|
24
|
+ <el-table-column type="index" label="序号" align="center" width="60">
|
|
|
25
|
+ <template #default="scope">
|
|
|
26
|
+ <span>{{ scope.$index + (currentPage - 1) * pageSize + 1 }}</span>
|
|
|
27
|
+ </template>
|
|
|
28
|
+ </el-table-column>
|
|
|
29
|
+ <el-table-column v-if="true" prop="wareNm" label="库房名称" width="150" header-align="center"
|
|
|
30
|
+ align="center" show-overflow-tooltip>
|
|
|
31
|
+ </el-table-column>
|
|
|
32
|
+ <el-table-column v-if="true" prop="wareCode" label="库房编码" width="150" header-align="center"
|
|
|
33
|
+ align="center" show-overflow-tooltip>
|
|
|
34
|
+ </el-table-column>
|
|
|
35
|
+ <el-table-column v-if="true" prop="wareLength" label="库房长度" width="150" header-align="center"
|
|
|
36
|
+ align="center" show-overflow-tooltip>
|
|
|
37
|
+ </el-table-column>
|
|
|
38
|
+ <el-table-column v-if="true" prop="wareWidth" label="库房宽度" width="150" header-align="center"
|
|
|
39
|
+ align="center" show-overflow-tooltip>
|
|
|
40
|
+ </el-table-column>
|
|
|
41
|
+ <el-table-column label="操作" header-align="center" align="center" width="200px" fixed="right">
|
|
|
42
|
+ <template #default="scope">
|
|
|
43
|
+ <el-button plain type="warning" @click="handleEdit(scope.row)">编辑</el-button>
|
|
|
44
|
+ <el-button plain type="danger" @click="handleRemove(scope.row )">删除</el-button>
|
|
|
45
|
+ </template>
|
|
|
46
|
+ </el-table-column>
|
|
|
47
|
+ </el-table>
|
|
|
48
|
+ </el-card>
|
|
|
49
|
+ <el-card :body-style="cardBodyStyle">
|
|
|
50
|
+ <el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="pageSizes" :total="totalRows"
|
|
|
51
|
+ background="background" layout="total, sizes, prev, pager, next, jumper"
|
|
|
52
|
+ @size-change="handleSizeChange"
|
|
|
53
|
+ @current-change="handleCurrentChange">
|
|
|
54
|
+ </el-pagination>
|
|
|
55
|
+ </el-card>
|
|
|
56
|
+
|
|
|
57
|
+ <el-dialog class="diaClass" :close-on-click-modal="false" draggable title="新增" v-model="dialogVisible" width="40%" top="5vh"
|
|
|
58
|
+ @open="openDialog">
|
|
|
59
|
+ <el-card >
|
|
|
60
|
+ <el-form :model="form" label-width="120px" label-position="right" inline ref="ruleFormRef" :rules="rules">
|
|
|
61
|
+ <el-row>
|
|
|
62
|
+ <el-col :span="12">
|
|
|
63
|
+ <el-form-item label="库房名称" prop="wareNm">
|
|
|
64
|
+ <el-input v-model="form.wareNm" maxlength="100" placeholder="请输入库房名称"></el-input>
|
|
|
65
|
+ </el-form-item>
|
|
|
66
|
+ </el-col>
|
|
|
67
|
+ <el-col :span="12">
|
|
|
68
|
+ <el-form-item label="库房编码" prop="wareCode">
|
|
|
69
|
+ <el-input v-model="form.wareCode" maxlength="100" placeholder="请输入库房编码"></el-input>
|
|
|
70
|
+ </el-form-item>
|
|
|
71
|
+ </el-col>
|
|
|
72
|
+ <el-col :span="12">
|
|
|
73
|
+ <el-form-item label="库房长度" prop="wareLength">
|
|
|
74
|
+ <el-input v-model="form.wareLength" maxlength="50" placeholder="请输入库房长度"></el-input>
|
|
|
75
|
+ </el-form-item>
|
|
|
76
|
+ </el-col>
|
|
|
77
|
+ <el-col :span="12">
|
|
|
78
|
+ <el-form-item label="库房宽度" prop="wareWidth">
|
|
|
79
|
+ <el-input v-model="form.wareWidth" maxlength="50" placeholder="请输入库房宽度"></el-input>
|
|
|
80
|
+ </el-form-item>
|
|
|
81
|
+ </el-col>
|
|
|
82
|
+ </el-row>
|
|
|
83
|
+ </el-form>
|
|
|
84
|
+
|
|
|
85
|
+ </el-card>
|
|
|
86
|
+ <template #footer>
|
|
|
87
|
+ <div class="dialog-footer">
|
|
|
88
|
+ <el-button type="success" plain @click="handleInsert(ruleFormRef)">保存</el-button>
|
|
|
89
|
+ <el-button type="danger" plain @click="handleCancelSave">取消</el-button>
|
|
|
90
|
+ </div>
|
|
|
91
|
+ </template>
|
|
|
92
|
+ </el-dialog>
|
|
|
93
|
+ <el-dialog class="diaClass" :close-on-click-modal="false" draggable title="编辑" v-model="dialogVisibleEdit" width="40%" top="5vh"
|
|
|
94
|
+ @open="openDialog">
|
|
|
95
|
+ <el-card :body-style="cardBodyStyle">
|
|
|
96
|
+ <el-form :model="form" label-width="120px" label-position="right" inline ref="ruleFormRef" :rules="rules">
|
|
|
97
|
+ <el-row>
|
|
|
98
|
+ <el-col :span="12">
|
|
|
99
|
+ <el-form-item label="库房名称" prop="wareNm">
|
|
|
100
|
+ <el-input v-model="form.wareNm" placeholder="请输入库房名称"></el-input>
|
|
|
101
|
+ </el-form-item>
|
|
|
102
|
+ </el-col>
|
|
|
103
|
+ <el-col :span="12">
|
|
|
104
|
+ <el-form-item label="库房编码" prop="wareCode">
|
|
|
105
|
+ <el-input v-model="form.wareCode" placeholder="请输入库房编码"></el-input>
|
|
|
106
|
+ </el-form-item>
|
|
|
107
|
+ </el-col>
|
|
|
108
|
+ <el-col :span="12">
|
|
|
109
|
+ <el-form-item label="库房长度" prop="wareLength">
|
|
|
110
|
+ <el-input v-model="form.wareLength" placeholder="请输入库房长度"></el-input>
|
|
|
111
|
+ </el-form-item>
|
|
|
112
|
+ </el-col>
|
|
|
113
|
+ <el-col :span="12">
|
|
|
114
|
+ <el-form-item label="库房宽度" prop="wareWidth">
|
|
|
115
|
+ <el-input v-model="form.wareWidth" placeholder="请输入库房宽度"></el-input>
|
|
|
116
|
+ </el-form-item>
|
|
|
117
|
+ </el-col>
|
|
|
118
|
+ </el-row>
|
|
|
119
|
+ </el-form>
|
|
|
120
|
+
|
|
|
121
|
+ </el-card>
|
|
|
122
|
+ <template #footer>
|
|
|
123
|
+ <div class="dialog-footer">
|
|
|
124
|
+ <el-button type="success" plain @click="handleSave(ruleFormRef)">保存</el-button>
|
|
|
125
|
+ <el-button type="danger" plain @click="handleCancelSave2">取消</el-button>
|
|
|
126
|
+ </div>
|
|
|
127
|
+ </template>
|
|
|
128
|
+ </el-dialog>
|
|
|
129
|
+ </div>
|
|
|
130
|
+
|
|
|
131
|
+</template>
|
|
|
132
|
+
|
|
|
133
|
+<script setup>
|
|
|
134
|
+import {getCurrentInstance, onMounted, reactive, ref} from 'vue'
|
|
|
135
|
+import tools from '@/tools'
|
|
|
136
|
+import ButtonBox from "@/components/ButtonBox.vue";
|
|
|
137
|
+
|
|
|
138
|
+const {
|
|
|
139
|
+ proxy
|
|
|
140
|
+} = getCurrentInstance()
|
|
|
141
|
+
|
|
|
142
|
+const cardBodyStyle = ref(tools.style.card)
|
|
|
143
|
+const inputStyle = ref(tools.style.input)
|
|
|
144
|
+
|
|
|
145
|
+
|
|
|
146
|
+
|
|
|
147
|
+const url = ref('sto/Ware/query')
|
|
|
148
|
+
|
|
|
149
|
+/**
|
|
|
150
|
+ * 查询
|
|
|
151
|
+ */
|
|
|
152
|
+
|
|
|
153
|
+const form = ref({
|
|
|
154
|
+ wareNm: '',
|
|
|
155
|
+ wareCode: '',
|
|
|
156
|
+ wareLength: '',
|
|
|
157
|
+ wareWidth: ''
|
|
|
158
|
+});
|
|
|
159
|
+
|
|
|
160
|
+const query = ref({
|
|
|
161
|
+ wareNm: '',
|
|
|
162
|
+ wareCode: '',
|
|
|
163
|
+ wareLength: '',
|
|
|
164
|
+ wareWidth: ''
|
|
|
165
|
+})
|
|
|
166
|
+const tableData = ref([])
|
|
|
167
|
+const TableBoxRef = ref(null)
|
|
|
168
|
+const handleSearch = () => {
|
|
|
169
|
+ // TableBoxRef.value.search()
|
|
|
170
|
+ getTableData()
|
|
|
171
|
+}
|
|
|
172
|
+
|
|
|
173
|
+
|
|
|
174
|
+
|
|
|
175
|
+
|
|
|
176
|
+/**
|
|
|
177
|
+ * 分页
|
|
|
178
|
+ */
|
|
|
179
|
+const currentPage = ref(1)
|
|
|
180
|
+const totalRows = ref(0)
|
|
|
181
|
+const pageSizes = ref([ 10, 20, 30, 40])
|
|
|
182
|
+const pageSize = ref(10)
|
|
|
183
|
+const handleSizeChange = (val) => {
|
|
|
184
|
+ pageSize.value = val
|
|
|
185
|
+ getTableData()
|
|
|
186
|
+}
|
|
|
187
|
+const handleCurrentChange = (val) => {
|
|
|
188
|
+ currentPage.value = val
|
|
|
189
|
+ getTableData()
|
|
|
190
|
+}
|
|
|
191
|
+/**
|
|
|
192
|
+ * 分页
|
|
|
193
|
+ */
|
|
|
194
|
+
|
|
|
195
|
+
|
|
|
196
|
+/**
|
|
|
197
|
+ * 新增
|
|
|
198
|
+ */
|
|
|
199
|
+const dialogVisible = ref(false)
|
|
|
200
|
+const dialogVisibleEdit = ref(false)
|
|
|
201
|
+
|
|
|
202
|
+const ruleFormRef = ref()
|
|
|
203
|
+
|
|
|
204
|
+const rules = reactive({
|
|
|
205
|
+ wareNm: [
|
|
|
206
|
+ {required: true, message: '不允许为空', trigger: 'blur'},
|
|
|
207
|
+ ],
|
|
|
208
|
+ wareCode: [
|
|
|
209
|
+ {required: true, message: '不允许为空', trigger: 'blur'},
|
|
|
210
|
+ ],
|
|
|
211
|
+ wareLength: [
|
|
|
212
|
+ {required: true, message: '不允许为空', trigger: 'blur'},
|
|
|
213
|
+ ],
|
|
|
214
|
+ wareWidth: [
|
|
|
215
|
+ {required: true, message: '不允许为空', trigger: 'blur'},
|
|
|
216
|
+ ],
|
|
|
217
|
+
|
|
|
218
|
+})
|
|
|
219
|
+
|
|
|
220
|
+const insertDialog = () => {
|
|
|
221
|
+ form.value = {
|
|
|
222
|
+ wareNm: '',
|
|
|
223
|
+ wareCode: '',
|
|
|
224
|
+ wareLength: '',
|
|
|
225
|
+ wareWidth: ''
|
|
|
226
|
+ }
|
|
|
227
|
+ dialogVisible.value = true
|
|
|
228
|
+}
|
|
|
229
|
+/**
|
|
|
230
|
+ * 新增
|
|
|
231
|
+ */
|
|
|
232
|
+
|
|
|
233
|
+
|
|
|
234
|
+/**
|
|
|
235
|
+ * 保存、修改、删除
|
|
|
236
|
+ */
|
|
|
237
|
+const refUpload = ref()
|
|
|
238
|
+
|
|
|
239
|
+const openDialog = () => {
|
|
|
240
|
+
|
|
|
241
|
+}
|
|
|
242
|
+
|
|
|
243
|
+
|
|
|
244
|
+const handleSave = (ruleFormRef) => {
|
|
|
245
|
+ if (!ruleFormRef) return
|
|
|
246
|
+ ruleFormRef.validate((valid) => {
|
|
|
247
|
+ if (valid) {
|
|
|
248
|
+ console.log('submit!')
|
|
|
249
|
+ var url = 'sto/Ware/save'
|
|
|
250
|
+ var param = {
|
|
|
251
|
+ json: JSON.stringify(form.value),
|
|
|
252
|
+
|
|
|
253
|
+ }
|
|
|
254
|
+ proxy.$axios.post(url, param).then(response => {
|
|
|
255
|
+ if (response.data.code == 0) {
|
|
|
256
|
+ ElMessage({
|
|
|
257
|
+ message: '保存成功',
|
|
|
258
|
+ type: 'success',
|
|
|
259
|
+ })
|
|
|
260
|
+ dialogVisibleEdit.value = false
|
|
|
261
|
+ handleSearch()
|
|
|
262
|
+ } else {
|
|
|
263
|
+ ElMessage({
|
|
|
264
|
+ type: 'error',
|
|
|
265
|
+ message: '操作失败' + response.data.msg
|
|
|
266
|
+ })
|
|
|
267
|
+ }
|
|
|
268
|
+ });
|
|
|
269
|
+ } else {
|
|
|
270
|
+ console.log('error submit!')
|
|
|
271
|
+ return false
|
|
|
272
|
+ }
|
|
|
273
|
+ })
|
|
|
274
|
+};
|
|
|
275
|
+const handleInsert = (ruleFormRef) => {
|
|
|
276
|
+ if (!ruleFormRef) return
|
|
|
277
|
+ ruleFormRef.validate((valid) => {
|
|
|
278
|
+ if (valid) {
|
|
|
279
|
+ console.log('submit!')
|
|
|
280
|
+ var url = 'sto/Ware/save'
|
|
|
281
|
+ var param = {
|
|
|
282
|
+ json: JSON.stringify(form.value),
|
|
|
283
|
+
|
|
|
284
|
+ }
|
|
|
285
|
+ console.log('form.value!' ,form.value)
|
|
|
286
|
+ proxy.$axios.post(url, param).then(response => {
|
|
|
287
|
+ if (response.data.code == 0) {
|
|
|
288
|
+ ElMessage({
|
|
|
289
|
+ message: '保存成功',
|
|
|
290
|
+ type: 'success',
|
|
|
291
|
+ })
|
|
|
292
|
+ dialogVisible.value = false
|
|
|
293
|
+ handleSearch()
|
|
|
294
|
+ } else {
|
|
|
295
|
+ ElMessage({
|
|
|
296
|
+ type: 'error',
|
|
|
297
|
+ message: '操作失败' + response.data.msg
|
|
|
298
|
+ })
|
|
|
299
|
+ }
|
|
|
300
|
+ });
|
|
|
301
|
+ } else {
|
|
|
302
|
+ console.log('error submit!')
|
|
|
303
|
+ return false
|
|
|
304
|
+ }
|
|
|
305
|
+ })
|
|
|
306
|
+};
|
|
|
307
|
+
|
|
|
308
|
+const handleCancelSave = () => {
|
|
|
309
|
+ dialogVisible.value = false
|
|
|
310
|
+}
|
|
|
311
|
+const handleCancelSave2 = () => {
|
|
|
312
|
+ dialogVisibleEdit.value = false
|
|
|
313
|
+}
|
|
|
314
|
+
|
|
|
315
|
+const handleEdit = (row) => {
|
|
|
316
|
+ var url = 'sto/Ware/queryByPK'
|
|
|
317
|
+ var param = {
|
|
|
318
|
+ id: row.id
|
|
|
319
|
+ }
|
|
|
320
|
+ proxy.$axios.get(url, param).then(response => {
|
|
|
321
|
+ if (response.data.code == '0') {
|
|
|
322
|
+ form.value = response.data.data
|
|
|
323
|
+ console.log(form.value)
|
|
|
324
|
+ dialogVisibleEdit.value = true
|
|
|
325
|
+ } else {
|
|
|
326
|
+ ElMessage.error('操作失败!' + response.data.msg)
|
|
|
327
|
+ }
|
|
|
328
|
+ })
|
|
|
329
|
+}
|
|
|
330
|
+
|
|
|
331
|
+const handleRemove = (row) => {
|
|
|
332
|
+ var url = 'sto/Ware/remove'
|
|
|
333
|
+ var param = {
|
|
|
334
|
+ id: row.id
|
|
|
335
|
+ }
|
|
|
336
|
+ ElMessageBox.confirm(
|
|
|
337
|
+ '确定删除本条记录?',
|
|
|
338
|
+ '提示', {
|
|
|
339
|
+ confirmButtonText: '确认',
|
|
|
340
|
+ cancelButtonText: '取消',
|
|
|
341
|
+ type: 'warning',
|
|
|
342
|
+ draggable: true,
|
|
|
343
|
+ }
|
|
|
344
|
+ )
|
|
|
345
|
+ .then(() => {
|
|
|
346
|
+ proxy.$axios.get(url, param).then(response => {
|
|
|
347
|
+ if (response.data.code == '0') {
|
|
|
348
|
+ console.log(response.data.data)
|
|
|
349
|
+ ElMessage({
|
|
|
350
|
+ type: 'success',
|
|
|
351
|
+ message: '删除成功!',
|
|
|
352
|
+ });
|
|
|
353
|
+ getTableData()
|
|
|
354
|
+ } else {
|
|
|
355
|
+ ElMessage.error('操作失败!' + response.data.msg)
|
|
|
356
|
+ }
|
|
|
357
|
+ })
|
|
|
358
|
+ })
|
|
|
359
|
+ .catch(() => {
|
|
|
360
|
+ ElMessage({
|
|
|
361
|
+ type: 'info',
|
|
|
362
|
+ message: '已取消',
|
|
|
363
|
+ })
|
|
|
364
|
+ })
|
|
|
365
|
+
|
|
|
366
|
+
|
|
|
367
|
+}
|
|
|
368
|
+
|
|
|
369
|
+
|
|
|
370
|
+/**
|
|
|
371
|
+ * 保存、修改、删除
|
|
|
372
|
+ */
|
|
|
373
|
+
|
|
|
374
|
+const multipleSelection = ref([])
|
|
|
375
|
+const handleSelectionChange = (val) => {
|
|
|
376
|
+ multipleSelection.value = val
|
|
|
377
|
+}
|
|
|
378
|
+
|
|
|
379
|
+const handleRemoveBatch = () => {
|
|
|
380
|
+ console.log('handleRemoveBatch')
|
|
|
381
|
+
|
|
|
382
|
+ if (multipleSelection.value.length < 1) {
|
|
|
383
|
+ ElMessage({
|
|
|
384
|
+ type: 'warning',
|
|
|
385
|
+ message: '请选择要删除的数据!'
|
|
|
386
|
+ })
|
|
|
387
|
+ return
|
|
|
388
|
+ }
|
|
|
389
|
+
|
|
|
390
|
+ ElMessageBox.confirm('此操作将删除该数据, 是否继续?', '提示', {
|
|
|
391
|
+ confirmButtonText: '确定',
|
|
|
392
|
+ cancelButtonText: '取消',
|
|
|
393
|
+ type: 'warning'
|
|
|
394
|
+ }).then(() => {
|
|
|
395
|
+ var ids = []
|
|
|
396
|
+ multipleSelection.value.forEach((item, index) => {
|
|
|
397
|
+ ids.push(item.id)
|
|
|
398
|
+ })
|
|
|
399
|
+ /* var url = 'cot/SignRequest/removeBatch'*/
|
|
|
400
|
+ var param = {
|
|
|
401
|
+ ids: JSON.stringify(ids)
|
|
|
402
|
+ }
|
|
|
403
|
+ proxy.$axios.post(url, param).then(response => {
|
|
|
404
|
+ if (response.data.code == '0') {
|
|
|
405
|
+ ElMessage({
|
|
|
406
|
+ type: 'success',
|
|
|
407
|
+ message: '操作成功!',
|
|
|
408
|
+ });
|
|
|
409
|
+ getTableData()
|
|
|
410
|
+ dialogVisible.value = false
|
|
|
411
|
+ } else {
|
|
|
412
|
+ ElMessage({
|
|
|
413
|
+ type: 'error',
|
|
|
414
|
+ message: '操作失败!' + response.data.msg
|
|
|
415
|
+ });
|
|
|
416
|
+ }
|
|
|
417
|
+ })
|
|
|
418
|
+ }).catch(() => {
|
|
|
419
|
+ ElMessage({
|
|
|
420
|
+ type: 'info',
|
|
|
421
|
+ message: '已取消删除'
|
|
|
422
|
+ })
|
|
|
423
|
+ })
|
|
|
424
|
+}
|
|
|
425
|
+
|
|
|
426
|
+const handleEditBatch = () => {
|
|
|
427
|
+ console.log('handleEditBatch')
|
|
|
428
|
+ if (multipleSelection.value.length != 1) {
|
|
|
429
|
+ ElMessage({
|
|
|
430
|
+ type: 'warning',
|
|
|
431
|
+ message: '请选择一条数据编辑!'
|
|
|
432
|
+ })
|
|
|
433
|
+ return
|
|
|
434
|
+ }
|
|
|
435
|
+ handleEdit(multipleSelection.value[0])
|
|
|
436
|
+}
|
|
|
437
|
+
|
|
|
438
|
+const handleUpload = () => {
|
|
|
439
|
+ console.log('handleUpload')
|
|
|
440
|
+}
|
|
|
441
|
+
|
|
|
442
|
+const handleDownload = () => {
|
|
|
443
|
+ console.log('handleDownload')
|
|
|
444
|
+}
|
|
|
445
|
+
|
|
|
446
|
+const handleImport = () => {
|
|
|
447
|
+ console.log('handleImport')
|
|
|
448
|
+}
|
|
|
449
|
+
|
|
|
450
|
+const handleExport = () => {
|
|
|
451
|
+ console.log('handleExport')
|
|
|
452
|
+}
|
|
|
453
|
+const getTableData = () => {
|
|
|
454
|
+ var url = 'sto/Ware/query'
|
|
|
455
|
+ var param = {
|
|
|
456
|
+ page: currentPage.value,
|
|
|
457
|
+ rows: pageSize.value,
|
|
|
458
|
+ wareNm: query.value.wareNm,
|
|
|
459
|
+ wareCode: query.value.wareCode,
|
|
|
460
|
+ wareLength: query.value.wareLength,
|
|
|
461
|
+ wareWidth: query.value.wareWidth,
|
|
|
462
|
+ json: JSON.stringify(query.value)
|
|
|
463
|
+ }
|
|
|
464
|
+ proxy.$axios.get(url, param).then(response => {
|
|
|
465
|
+ if (response.data.code == '0') {
|
|
|
466
|
+ tableData.value = response.data.data.records
|
|
|
467
|
+ totalRows.value = response.data.data.total
|
|
|
468
|
+ } else {
|
|
|
469
|
+ ElMessage.error('操作失败!' + response.data.msg)
|
|
|
470
|
+ }
|
|
|
471
|
+ })
|
|
|
472
|
+}
|
|
|
473
|
+const height = ref(600)
|
|
|
474
|
+const updateViewportHeight = () => {
|
|
|
475
|
+ height.value = window.innerHeight * 0.65
|
|
|
476
|
+ console.log( window.innerHeight);
|
|
|
477
|
+};
|
|
|
478
|
+onMounted(() => {
|
|
|
479
|
+ getTableData()
|
|
|
480
|
+ updateViewportHeight()
|
|
|
481
|
+})
|
|
|
482
|
+</script>
|
|
|
483
|
+
|
|
|
484
|
+<style scoped>
|
|
|
485
|
+::v-deep .diaClass .el-form-item {
|
|
|
486
|
+ width: 100%
|
|
|
487
|
+}
|
|
|
488
|
+::v-deep .el-autocomplete{
|
|
|
489
|
+ width: 100%;
|
|
|
490
|
+}
|
|
|
491
|
+::v-deep .el-dialog__body {
|
|
|
492
|
+ background-color: #F2F6FC;
|
|
|
493
|
+}
|
|
|
494
|
+</style>
|
|
|
495
|
+
|