tianheng-ui 0.1.76 → 0.1.78

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,18 +27,7 @@
27
27
  <el-radio-button label="api">接口导入</el-radio-button>
28
28
  </el-radio-group>
29
29
  </el-form-item>
30
- <el-form-item>
31
- <el-tooltip
32
- slot="label"
33
- effect="light"
34
- content="开启后,选择数据接口会触发 remote-params 回调,用于从服务器查询字段"
35
- placement="top"
36
- >
37
- <span style="color: #409EFF;">远程字段</span>
38
- </el-tooltip>
39
- <el-switch v-model="config.table.fields.remote"> </el-switch>
40
- </el-form-item>
41
- <el-form-item>
30
+ <el-form-item v-if="config.table.fields.type==='api'">
42
31
  <el-tooltip
43
32
  slot="label"
44
33
  effect="light"
@@ -70,6 +59,17 @@
70
59
  placeholder="请输入"
71
60
  ></el-input>
72
61
  </el-form-item>
62
+ <el-form-item>
63
+ <el-tooltip
64
+ slot="label"
65
+ effect="light"
66
+ content="开启后,选择数据接口会触发 remote-params 回调,用于从服务器获取字段"
67
+ placement="top"
68
+ >
69
+ <span style="color: #409EFF;">远程字段</span>
70
+ </el-tooltip>
71
+ <el-switch v-model="config.table.fields.remote"> </el-switch>
72
+ </el-form-item>
73
73
  <el-form-item label="是否分页">
74
74
  <el-switch v-model="config.table.pageInfo.show"> </el-switch>
75
75
  </el-form-item>
@@ -111,19 +111,14 @@
111
111
  </el-tabs>
112
112
  </div>
113
113
  <div v-show="step === 2">
114
- <el-form-item label="">
115
- <div
116
- class="tools-item"
117
- v-for="item in Object.values(config.tools)"
118
- :key="item.type"
119
- >
120
- <el-checkbox
121
- v-model="item.show"
122
- :label="item.name"
123
- border
124
- ></el-checkbox>
125
- </div>
126
- </el-form-item>
114
+ <el-checkbox
115
+ class="tools-item"
116
+ v-for="item in Object.values(config.tools)"
117
+ v-model="item.show"
118
+ :label="item.name"
119
+ :key="item.type"
120
+ border
121
+ ></el-checkbox>
127
122
  </div>
128
123
  </el-form>
129
124
  </div>
@@ -234,7 +229,9 @@ export default {
234
229
  padding-top: 10px;
235
230
 
236
231
  .tools-item {
237
- margin-bottom: 10px;
232
+ display: inline-block;
233
+ margin: 10px;
234
+ width: calc(25% - 20px);
238
235
  }
239
236
  }
240
237
  .footer {
@@ -1,6 +1,15 @@
1
1
  <template>
2
2
  <div class="widgetTable">
3
- <div class="table-title">查询字段</div>
3
+ <div class="table-title">
4
+ <span>查询字段</span>
5
+ <el-button
6
+ v-if="config.table.fields.type === 'custom'"
7
+ style="float:right;padding:0px 10px;"
8
+ type="text"
9
+ @click="handleParamsAdd('in')"
10
+ >新增</el-button
11
+ >
12
+ </div>
4
13
  <div
5
14
  class="tableList searchList"
6
15
  v-loading="!config.search.show"
@@ -95,7 +104,16 @@
95
104
  </draggable>
96
105
  <div v-else class="search-content"></div>
97
106
  </div>
98
- <div class="table-title">列表字段</div>
107
+ <div class="table-title">
108
+ <span>列表字段</span>
109
+ <el-button
110
+ v-if="config.table.fields.type === 'custom'"
111
+ style="float:right;padding:0px 10px;"
112
+ type="text"
113
+ @click="handleParamsAdd('out')"
114
+ >新增</el-button
115
+ >
116
+ </div>
99
117
  <div class="tableList" style="height: calc(100% - 350px);">
100
118
  <div class="table-item table-header">
101
119
  <div class="table-item-custom">拖动</div>
@@ -246,6 +264,20 @@ export default {
246
264
  handleDialogAffirm() {
247
265
  this.dialog.data.staticData = this.codeEditorValue;
248
266
  this.dialog = { visible: false, title: "", data: null };
267
+ },
268
+ handleParamsAdd(action) {
269
+ if (action === "in") {
270
+ this.config.search.options.push({
271
+ alias: "",
272
+ align: "left",
273
+ elType: "input",
274
+ id: new Date().getTime(),
275
+ javaType: "String",
276
+ label: "字段名",
277
+ pAlias: "",
278
+ prop: ""
279
+ });
280
+ }
249
281
  }
250
282
  }
251
283
  };
@@ -259,8 +291,10 @@ export default {
259
291
  overflow-y: overlay;
260
292
 
261
293
  .table-title {
294
+ display: flex;
295
+ align-items: center;
296
+ justify-content: space-between;
262
297
  height: 25px;
263
- line-height: 25px;
264
298
  }
265
299
  .searchList {
266
300
  margin: 10px 0;