@gonsin/gview 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +2 -0
- package/README.md +26 -0
- package/babel.config.js +5 -0
- package/gonsin-gview-1.0.1.tgz +0 -0
- package/package.json +29 -0
- package/postcss.config.js +5 -0
- package/public/css/theme/animate.min.css +7 -0
- package/public/css/theme/brownishTheme.css +10 -0
- package/public/css/theme/coffeeTheme.css +10 -0
- package/public/css/theme/cyanTheme.css +10 -0
- package/public/css/theme/defaultTheme.css +10 -0
- package/public/css/theme/greenTheme.css +16 -0
- package/public/css/theme/greyTheme.css +10 -0
- package/public/css/theme/orangeTheme.css +10 -0
- package/public/css/theme/purpleTheme.css +10 -0
- package/public/css/theme/skyblueTheme.css +10 -0
- package/public/favicon.ico +0 -0
- package/public/imgs/antOutline-border.png +0 -0
- package/public/imgs/bg.png +0 -0
- package/public/imgs/logo.png +0 -0
- package/public/imgs/menu.png +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +143 -0
- package/src/api/api.js +28 -0
- package/src/api/index.js +31 -0
- package/src/api/request.js +210 -0
- package/src/assets/font/font.scss +12 -0
- package/src/assets/font/font_dev.scss +12 -0
- package/src/assets/font/icon.scss +179 -0
- package/src/assets/images/svg/color.svg +1 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/scss/common.scss +338 -0
- package/src/assets/scss/themeColor.scss +35 -0
- package/src/components/MyDialog.vue +251 -0
- package/src/components/MyForm.vue +324 -0
- package/src/components/MyFormAutocomplete.vue +135 -0
- package/src/components/MyFormCascader.vue +107 -0
- package/src/components/MyFormCheckBox.vue +67 -0
- package/src/components/MyFormEditor.vue +85 -0
- package/src/components/MyFormInput.vue +68 -0
- package/src/components/MyFormLine.vue +49 -0
- package/src/components/MyFormRadio.vue +92 -0
- package/src/components/MyFormSelect.vue +122 -0
- package/src/components/MyFormSelectDate.vue +72 -0
- package/src/components/MyFormSelectDateTime.vue +82 -0
- package/src/components/MyFormSelectTime.vue +84 -0
- package/src/components/MyFormSwitch.vue +60 -0
- package/src/components/MyFormTag.vue +67 -0
- package/src/components/MyFormTree.vue +137 -0
- package/src/components/MyFormUploads.vue +91 -0
- package/src/components/MyHeader.vue +176 -0
- package/src/components/MyMenus.vue +150 -0
- package/src/components/MyPageHeader.vue +344 -0
- package/src/components/MyTab.vue +69 -0
- package/src/components/MyTable.vue +244 -0
- package/src/components/Templatess.vue +630 -0
- package/src/index.js +23 -0
- package/src/main.js +86 -0
- package/src/router.js +52 -0
- package/src/store/index.js +71 -0
- package/src/utils/common.js +96 -0
- package/src/utils/permission.js +36 -0
- package/src/views/GView.vue +185 -0
- package/src/views/Home.vue +26 -0
- package/src/views/Login.vue +249 -0
- package/src/websocket/test.js +140 -0
- package/src/websocket/websocket.js +141 -0
- package/src/websocket/websocket1.js +117 -0
- package/src/websocket/websocket2.js +128 -0
- package/vue.config.js +42 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.top-title {
|
|
6
|
+
font-size: 20px;
|
|
7
|
+
color: #555;
|
|
8
|
+
font-weight: 700;
|
|
9
|
+
margin-bottom: 20px;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.mar-top-5 {
|
|
14
|
+
margin-top: 5px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mar-top-10 {
|
|
18
|
+
margin-top: 10px
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mar-top-20 {
|
|
22
|
+
margin-top: 20px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mar-bot-0 {
|
|
26
|
+
margin-bottom: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mar-bot-8 {
|
|
30
|
+
margin-bottom: 8px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mar-bot-10 {
|
|
34
|
+
margin-bottom: 10px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mar-bot-16 {
|
|
38
|
+
margin-bottom: 16px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.mar-bot-20 {
|
|
42
|
+
margin-bottom: 20px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mar-bot-24 {
|
|
46
|
+
margin-bottom: 24px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.mar-bot-30 {
|
|
50
|
+
margin-bottom: 30px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mar-bot-62 {
|
|
54
|
+
margin-bottom: 62px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.mar-ver-24 {
|
|
58
|
+
margin: 0 24px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.mar-hor-20 {
|
|
62
|
+
margin: 20px 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mar-left-12 {
|
|
66
|
+
margin-left: 12px
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.mar-left-14 {
|
|
70
|
+
margin-left: 14px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.mar-left-20 {
|
|
74
|
+
margin-left: 20px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.mar-left-30 {
|
|
78
|
+
margin-left: 30px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.mar-right-10 {
|
|
82
|
+
margin-right: 10px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.mar-rig-6 {
|
|
86
|
+
margin-right: 6px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mar-rig-10 {
|
|
90
|
+
margin-right: 10px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mar-rig-14 {
|
|
94
|
+
margin-right: 14px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mar-right-16 {
|
|
98
|
+
margin-right: 16px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.mar-rig-16 {
|
|
102
|
+
margin-right: 16px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mar-rig-18 {
|
|
106
|
+
margin-right: 18px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mar-rig-20 {
|
|
110
|
+
margin-right: 20px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.mar-rig-23 {
|
|
114
|
+
margin-right: 23px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.mar-rig-24 {
|
|
118
|
+
margin-right: 24px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.mar-rig-30 {
|
|
122
|
+
margin-right: 30px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.mar-rig-40 {
|
|
126
|
+
margin-right: 40px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.mar-left-32 {
|
|
130
|
+
margin-left: 32px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* padding */
|
|
134
|
+
.pad-left-10 {
|
|
135
|
+
padding-left: 10px
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.pad-ver-20 {
|
|
139
|
+
padding: 0 20px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.pad-30 {
|
|
143
|
+
padding: 30px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* color */
|
|
147
|
+
.primary-text {
|
|
148
|
+
color: #1989FA
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.danger-text {
|
|
152
|
+
color: #FF6160
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.success-text {
|
|
156
|
+
color: #26CA83
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.warning-text {
|
|
160
|
+
color: #E6A23C;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.info-text {
|
|
164
|
+
color: #909399;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.primary-bg {
|
|
168
|
+
background-color: #1989FA
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.danger-bg {
|
|
172
|
+
background-color: #FF6160
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.success-bg {
|
|
176
|
+
background-color: #26CA83
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.f-color-e4c {
|
|
180
|
+
color: #101E4C;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.f-black {
|
|
184
|
+
color: #000;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.f-color-3 {
|
|
188
|
+
color: #333;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.f-color-9 {
|
|
192
|
+
color: #999
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.f-color-e {
|
|
196
|
+
color: #EEE;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.f-color-606 {
|
|
200
|
+
color: #606266;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* font */
|
|
204
|
+
.f-size-14 {
|
|
205
|
+
font-size: 14px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.f-size-16 {
|
|
209
|
+
font-size: 16px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.f-size-18 {
|
|
213
|
+
font-size: 18px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.f-size-20 {
|
|
217
|
+
font-size: 20px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.f-weight {
|
|
221
|
+
font-weight: bold;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.cursor-pointer {
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.text-center {
|
|
229
|
+
text-align: center;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.flex-between {
|
|
233
|
+
display: flex;
|
|
234
|
+
justify-content: space-between;
|
|
235
|
+
align-items: center;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.align-items-center {
|
|
239
|
+
display: flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.flex-nowrap {
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-wrap: nowrap;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.flex-ver-start {
|
|
249
|
+
display: flex;
|
|
250
|
+
flex-wrap: wrap;
|
|
251
|
+
justify-content: flex-start;
|
|
252
|
+
align-items: center;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.flex-ver-end {
|
|
256
|
+
display: flex;
|
|
257
|
+
justify-content: flex-end;
|
|
258
|
+
align-items: center;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.flex-col-center {
|
|
262
|
+
display: flex;
|
|
263
|
+
flex-direction: column;
|
|
264
|
+
justify-content: center;
|
|
265
|
+
align-items: center;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.flex-ver-center {
|
|
269
|
+
display: flex;
|
|
270
|
+
justify-content: center;
|
|
271
|
+
align-items: center;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.wid-80 {
|
|
275
|
+
width: 80%;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** 多行文本下文字溢出显示 **/
|
|
279
|
+
.mutiple-row-of {
|
|
280
|
+
text-overflow: -o-ellipsis-lastline;
|
|
281
|
+
overflow: hidden;
|
|
282
|
+
text-overflow: ellipsis;
|
|
283
|
+
display: -webkit-box;
|
|
284
|
+
-webkit-line-clamp: 2;
|
|
285
|
+
-webkit-box-orient: vertical;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.single-row-nowrap {
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
text-overflow: ellipsis;
|
|
291
|
+
white-space: nowrap;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
/** 苹果字体 **/
|
|
296
|
+
.pingSC-regu {
|
|
297
|
+
font-family: "PingFangSCRegular";
|
|
298
|
+
font-size: 14px;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.pingSC-Heavy {
|
|
302
|
+
font-family: "PingFangHeavy";
|
|
303
|
+
font-size: 14px;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// 导入按钮样式
|
|
307
|
+
.imp_btn {
|
|
308
|
+
height: 28px;
|
|
309
|
+
padding: 5px 15px;
|
|
310
|
+
font-size: 12px;
|
|
311
|
+
border-radius: 3px;
|
|
312
|
+
margin: 0 10px;
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
box-sizing: border-box;
|
|
315
|
+
display: inline-block;
|
|
316
|
+
color: #fff;
|
|
317
|
+
background-color: #409eff;
|
|
318
|
+
border-color: #409eff;
|
|
319
|
+
transition: all 0.3s;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.imp_btn:hover {
|
|
323
|
+
background-color: #66b1ff;
|
|
324
|
+
transition: all 0.3s;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.custom-disabled-btn {
|
|
328
|
+
background-color: #eee !important;
|
|
329
|
+
border: #eee !important;
|
|
330
|
+
color: #ccc !important;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.round {
|
|
334
|
+
display: inline-block;
|
|
335
|
+
width: 10px;
|
|
336
|
+
height: 10px;
|
|
337
|
+
border-radius: 50%;
|
|
338
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
$header-color:#3e99f6; // 目前的主题色,后期处理换肤问题
|
|
2
|
+
$font-weight-color:#606266; //加粗字体颜色设置
|
|
3
|
+
$font-color:#555555; // menu导航栏字体设置
|
|
4
|
+
$primary-btn-color:#3e99f6;
|
|
5
|
+
$delete-btn-color:#F56C6C;
|
|
6
|
+
$warnign-btn-color:#E6A23C;
|
|
7
|
+
|
|
8
|
+
/*********** 主题色 **********/
|
|
9
|
+
|
|
10
|
+
/* 浅绿色 */
|
|
11
|
+
$green-color:#2F9688;
|
|
12
|
+
$green-hover-color:#30A89D;
|
|
13
|
+
/* 青色 */
|
|
14
|
+
$cyan-color:#55A66C;
|
|
15
|
+
$cyan-hover-color:#64b17a; // 鼠标hover时,按钮背景色
|
|
16
|
+
/* 橘黄色*/
|
|
17
|
+
$orange-color:#FF5722;
|
|
18
|
+
$orange-hover-color:#fa7c63;
|
|
19
|
+
/* 咖啡色 */
|
|
20
|
+
$coffee-color:#795548;
|
|
21
|
+
$coffee-hover-color:#7a6258;
|
|
22
|
+
/* 浅灰色 */
|
|
23
|
+
$grey-color:#989898;
|
|
24
|
+
$grey-hover-color:#cac6c6;
|
|
25
|
+
/* 海洋蓝*/
|
|
26
|
+
// $ocean-color:#064e96;
|
|
27
|
+
// $ocean-hover-color:#0f579e;
|
|
28
|
+
/* 天空蓝*/
|
|
29
|
+
$skyblue-color: #064DC3;
|
|
30
|
+
$skyblue-hover-color:#336ac4;
|
|
31
|
+
/* 棕红色 */
|
|
32
|
+
$brownish-red-color:#963B4F;
|
|
33
|
+
/* 紫色*/
|
|
34
|
+
$purple-color:#EE82EE;
|
|
35
|
+
$purple-hover-color:#ee9cee
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: your name
|
|
3
|
+
* @Date: 2022-04-22 15:51:20
|
|
4
|
+
* @LastEditTime: 2022-11-22 16:36:03
|
|
5
|
+
* @LastEditors: lrm lrm@gonsin.cn
|
|
6
|
+
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
|
+
* @FilePath: \client\src\components\MyDialog.vue
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="my_dialog">
|
|
12
|
+
<el-dialog
|
|
13
|
+
:title="data.title"
|
|
14
|
+
:visible.sync="show"
|
|
15
|
+
width="60%"
|
|
16
|
+
:before-close="hideDialog"
|
|
17
|
+
>
|
|
18
|
+
<!-- 自定义自动生成表单 -->
|
|
19
|
+
<!-- <myForm
|
|
20
|
+
v-if="dialogType == 'form'"
|
|
21
|
+
:queryProps="data.props"
|
|
22
|
+
:formData="data.boards"
|
|
23
|
+
:viewName="data.viewName"
|
|
24
|
+
:selectData="dialogData"
|
|
25
|
+
@confirmDialog="confirm"
|
|
26
|
+
@closeDialog="hideDialog">
|
|
27
|
+
</myForm>
|
|
28
|
+
<myTable
|
|
29
|
+
v-if="dialogType == 'table'"
|
|
30
|
+
:data="data.boards[0]"
|
|
31
|
+
:list="dialogTableData"
|
|
32
|
+
:propsPagination="props"
|
|
33
|
+
>
|
|
34
|
+
</myTable> -->
|
|
35
|
+
<templatess
|
|
36
|
+
v-if="showForm"
|
|
37
|
+
:viewName="data.viewName"
|
|
38
|
+
:board="board"
|
|
39
|
+
:queryProps="queryProps"
|
|
40
|
+
@closeDialog="hideDialog"
|
|
41
|
+
@refreshPage="refreshPage"
|
|
42
|
+
>
|
|
43
|
+
</templatess>
|
|
44
|
+
</el-dialog>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
import myForm from "./MyForm.vue";
|
|
50
|
+
import myTable from "./MyTable.vue";
|
|
51
|
+
|
|
52
|
+
import * as api from '../api'
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
name: "myDialog",
|
|
56
|
+
props: {
|
|
57
|
+
dialogViewData:{
|
|
58
|
+
type:Object
|
|
59
|
+
},
|
|
60
|
+
dialogFormData:{
|
|
61
|
+
type:Object
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
components: {
|
|
65
|
+
myForm,
|
|
66
|
+
myTable,
|
|
67
|
+
templatess: () => import('../components/Templatess.vue')
|
|
68
|
+
},
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
data: {},
|
|
72
|
+
board: {},
|
|
73
|
+
queryProps: {},
|
|
74
|
+
|
|
75
|
+
dialogType: '',
|
|
76
|
+
dialogData: {},
|
|
77
|
+
dialogTableData: [],
|
|
78
|
+
showForm:false,
|
|
79
|
+
show: true,
|
|
80
|
+
props: {
|
|
81
|
+
count: 10,
|
|
82
|
+
page: 0,
|
|
83
|
+
totalCount:0,
|
|
84
|
+
pageCount:0,
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
mounted(){
|
|
89
|
+
this.getView()
|
|
90
|
+
},
|
|
91
|
+
methods: {
|
|
92
|
+
refreshPage(){
|
|
93
|
+
this.$emit("refreshPage");
|
|
94
|
+
},
|
|
95
|
+
//获取数据
|
|
96
|
+
getView(){
|
|
97
|
+
let model = {};
|
|
98
|
+
if(this.$route.query.props){
|
|
99
|
+
model = JSON.parse(this.$route.query.props);
|
|
100
|
+
}
|
|
101
|
+
model.viewName = this.dialogViewData.view;
|
|
102
|
+
api.getOneView(model).then((res) => {
|
|
103
|
+
if(res.data.state == 200){
|
|
104
|
+
this.data = res.data.data;
|
|
105
|
+
if (this.data.boards[0].boardType === 'form') {
|
|
106
|
+
this.dialogType = 'form';
|
|
107
|
+
} else {
|
|
108
|
+
this.dialogType = 'table'
|
|
109
|
+
}
|
|
110
|
+
let arr = this.data.boards;
|
|
111
|
+
arr.forEach(element => {
|
|
112
|
+
if (element.data != null) {
|
|
113
|
+
this.getViewData(element.data.dataId, this.data.props)
|
|
114
|
+
} else if (element.tableData != null){
|
|
115
|
+
this.getViewData(element.tableData.dataId, this.data.props)
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
// console.log('this.data', this.data);
|
|
119
|
+
this.board = this.data.boards[0]
|
|
120
|
+
|
|
121
|
+
if (this.dialogFormData && this.data.props.length != 0) {
|
|
122
|
+
this.data.props.forEach(element => {
|
|
123
|
+
this.queryProps[element] = this.dialogFormData[element]
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.showForm = true;
|
|
128
|
+
} else{
|
|
129
|
+
this.$message({
|
|
130
|
+
type: "error",
|
|
131
|
+
message: res.data.message,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
//获取下拉的数据
|
|
137
|
+
getViewData(dataId, queryList) {
|
|
138
|
+
let model = {};
|
|
139
|
+
if(this.$route.query.props){
|
|
140
|
+
model = JSON.parse(this.$route.query.props);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (this.data.boards[0].boardType === 'table') {
|
|
144
|
+
model.count = this.props.count;
|
|
145
|
+
model.page = this.props.page
|
|
146
|
+
|
|
147
|
+
let query = {
|
|
148
|
+
viewName: this.data.viewName,
|
|
149
|
+
dataId: dataId,
|
|
150
|
+
props: model
|
|
151
|
+
}
|
|
152
|
+
// console.log('query', query);
|
|
153
|
+
// if(queryList.length !=0){
|
|
154
|
+
// console.log('queryList', queryList);
|
|
155
|
+
// queryList.forEach(element=>{
|
|
156
|
+
// query.props[element] = this.dialogFormData[element];
|
|
157
|
+
// })
|
|
158
|
+
// }
|
|
159
|
+
// Object.assign(query, model);
|
|
160
|
+
api
|
|
161
|
+
.getViewData(query)
|
|
162
|
+
.then((res) => {
|
|
163
|
+
if (res.data.state == 200) {
|
|
164
|
+
let list = res.data.data.data;
|
|
165
|
+
|
|
166
|
+
this.props.totalCount = res.data.data.totalCount;
|
|
167
|
+
this.props.pageCount = res.data.data.pageCount;
|
|
168
|
+
this.props.page = res.data.data.page;
|
|
169
|
+
this.props.count = res.data.data.count;
|
|
170
|
+
|
|
171
|
+
if (list.length != 0) {
|
|
172
|
+
this.dialogTableData = list
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
this.$message({
|
|
176
|
+
type: "error",
|
|
177
|
+
message: res.data.message,
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
} else {
|
|
182
|
+
let query = {
|
|
183
|
+
viewName: this.data.viewName,
|
|
184
|
+
dataId: dataId,
|
|
185
|
+
props: model
|
|
186
|
+
}
|
|
187
|
+
// console.log('query', query);
|
|
188
|
+
if(queryList.length !=0){
|
|
189
|
+
queryList.forEach(element=>{
|
|
190
|
+
query.props[element] = this.dialogFormData[element];
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
// Object.assign(query, model);
|
|
194
|
+
api
|
|
195
|
+
.getViewData(query)
|
|
196
|
+
.then((res) => {
|
|
197
|
+
if (res.data.state == 200) {
|
|
198
|
+
this.dialogData = res.data.data;
|
|
199
|
+
} else {
|
|
200
|
+
this.$message({
|
|
201
|
+
type: "error",
|
|
202
|
+
message: res.data.message,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
},
|
|
210
|
+
hideDialog(){
|
|
211
|
+
this.$emit('hideDialog')
|
|
212
|
+
},
|
|
213
|
+
confirm(params,id){
|
|
214
|
+
if(this.data.props.length !=0 && this.data.props != null){
|
|
215
|
+
for(let i in this.data.props){
|
|
216
|
+
params[this.data.props[i]] = this.dialogFormData[this.data.props[i]]
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
let model = {};
|
|
220
|
+
if(this.$route.query.props){
|
|
221
|
+
model = JSON.parse(this.$route.query.props);
|
|
222
|
+
}
|
|
223
|
+
Object.assign(params,model);
|
|
224
|
+
let confirmModel = {
|
|
225
|
+
buttonId: id,
|
|
226
|
+
props: params,
|
|
227
|
+
viewName:this.data.viewName
|
|
228
|
+
}
|
|
229
|
+
Object.assign(confirmModel,model);
|
|
230
|
+
api.confirm(confirmModel).then((res) => {
|
|
231
|
+
if(res.data.state == 200){
|
|
232
|
+
this.hideDialog();
|
|
233
|
+
this.$message({
|
|
234
|
+
type: "success",
|
|
235
|
+
message: "操作成功",
|
|
236
|
+
});
|
|
237
|
+
this.$emit('refresh');
|
|
238
|
+
}else{
|
|
239
|
+
// console.log('提交失败')
|
|
240
|
+
this.$message({
|
|
241
|
+
type: "error",
|
|
242
|
+
message: res.data.message,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
</script>
|
|
250
|
+
<style lang="scss" scoped>
|
|
251
|
+
</style>
|