|
|
@@ -38,15 +38,28 @@
|
|
38
|
38
|
<el-option label="请选择字典生成" value="" />
|
|
39
|
39
|
</el-select>
|
|
40
|
40
|
</el-form-item>
|
|
41
|
|
-#elseif($column.htmlType == "datetime")
|
|
|
41
|
+#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
|
|
42
|
42
|
<el-form-item label="${comment}" prop="${column.javaField}">
|
|
43
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
43
|
+ <el-date-picker clearable size="small"
|
|
44
|
44
|
v-model="queryParams.${column.javaField}"
|
|
45
|
45
|
type="date"
|
|
46
|
46
|
value-format="yyyy-MM-dd"
|
|
47
|
47
|
placeholder="选择${comment}">
|
|
48
|
48
|
</el-date-picker>
|
|
49
|
49
|
</el-form-item>
|
|
|
50
|
+#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
51
|
+ <el-form-item label="${comment}">
|
|
|
52
|
+ <el-date-picker
|
|
|
53
|
+ v-model="daterange${AttrName}"
|
|
|
54
|
+ size="small"
|
|
|
55
|
+ style="width: 240px"
|
|
|
56
|
+ value-format="yyyy-MM-dd"
|
|
|
57
|
+ type="daterange"
|
|
|
58
|
+ range-separator="-"
|
|
|
59
|
+ start-placeholder="开始日期"
|
|
|
60
|
+ end-placeholder="结束日期"
|
|
|
61
|
+ ></el-date-picker>
|
|
|
62
|
+ </el-form-item>
|
|
50
|
63
|
#end
|
|
51
|
64
|
#end
|
|
52
|
65
|
#end
|
|
|
@@ -95,7 +108,7 @@
|
|
95
|
108
|
v-hasPermi="['${moduleName}:${businessName}:export']"
|
|
96
|
109
|
>导出</el-button>
|
|
97
|
110
|
</el-col>
|
|
98
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
111
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
99
|
112
|
</el-row>
|
|
100
|
113
|
|
|
101
|
114
|
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
|
|
|
@@ -230,7 +243,7 @@
|
|
230
|
243
|
</el-form-item>
|
|
231
|
244
|
#elseif($column.htmlType == "datetime")
|
|
232
|
245
|
<el-form-item label="${comment}" prop="${field}">
|
|
233
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
246
|
+ <el-date-picker clearable size="small"
|
|
234
|
247
|
v-model="form.${field}"
|
|
235
|
248
|
type="date"
|
|
236
|
249
|
value-format="yyyy-MM-dd"
|
|
|
@@ -315,6 +328,10 @@ export default {
|
|
315
|
328
|
#if(${column.dictType} != '')
|
|
316
|
329
|
// $comment字典
|
|
317
|
330
|
${column.javaField}Options: [],
|
|
|
331
|
+#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
332
|
+#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
333
|
+ // $comment时间范围
|
|
|
334
|
+ daterange${AttrName}: [],
|
|
318
|
335
|
#end
|
|
319
|
336
|
#end
|
|
320
|
337
|
// 查询参数
|
|
|
@@ -363,6 +380,21 @@ export default {
|
|
363
|
380
|
/** 查询${functionName}列表 */
|
|
364
|
381
|
getList() {
|
|
365
|
382
|
this.loading = true;
|
|
|
383
|
+#foreach ($column in $columns)
|
|
|
384
|
+#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
385
|
+ this.queryParams.params = {};
|
|
|
386
|
+#break
|
|
|
387
|
+#end
|
|
|
388
|
+#end
|
|
|
389
|
+#foreach ($column in $columns)
|
|
|
390
|
+#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
391
|
+#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
392
|
+ if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) {
|
|
|
393
|
+ this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0];
|
|
|
394
|
+ this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1];
|
|
|
395
|
+ }
|
|
|
396
|
+#end
|
|
|
397
|
+#end
|
|
366
|
398
|
list${BusinessName}(this.queryParams).then(response => {
|
|
367
|
399
|
this.${businessName}List = response.rows;
|
|
368
|
400
|
this.total = response.total;
|
|
|
@@ -413,6 +445,12 @@ export default {
|
|
413
|
445
|
},
|
|
414
|
446
|
/** 重置按钮操作 */
|
|
415
|
447
|
resetQuery() {
|
|
|
448
|
+#foreach ($column in $columns)
|
|
|
449
|
+#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
|
|
450
|
+#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
451
|
+ this.daterange${AttrName} = [];
|
|
|
452
|
+#end
|
|
|
453
|
+#end
|
|
416
|
454
|
this.resetForm("queryForm");
|
|
417
|
455
|
this.handleQuery();
|
|
418
|
456
|
},
|