cloud-web-corejs 1.0.171 → 1.0.172

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.
@@ -2,16 +2,21 @@
2
2
  <container-item-wrapper :widget="widget">
3
3
  <div>
4
4
  <div class="tree-form">
5
- <el-input
6
- v-if="widget.options.filter"
7
- :key="0"
8
- :size="widget.options.size"
9
- :placeholder="i18nt('designer.setting.enterForQuery')"
10
- v-model="filterText"
11
- class="txt"
12
- >
13
- <el-button slot="append" icon="el-icon-search"></el-button>
14
- </el-input>
5
+ <template v-if="widget.options.filter">
6
+ <el-input
7
+ v-if="!widget.options.treeFilterType"
8
+ :key="0"
9
+ :size="widget.options.size"
10
+ :placeholder="i18nt('designer.setting.enterForQuery')"
11
+ v-model="filterText"
12
+ @change="handleFilterTextChange"
13
+ class="txt"
14
+ >
15
+ <el-button slot="append" icon="el-icon-search" @click="handleClickButton"></el-button>
16
+ </el-input>
17
+ <el-date-picker v-else-if="widget.options.treeFilterType==1" v-model="filterText" type="date" value-format="yyyy-MM-dd" @change="handleFilterTextChange" :placeholder="$t1('请输入日期')"></el-date-picker>
18
+ </template>
19
+
15
20
  </div>
16
21
  <div class="tree-btns"
17
22
  v-show="widget.options.selectClearAllNode && widget.options.showCheckBox || widget.options.expandRetractAllNode">
@@ -60,6 +65,7 @@
60
65
  @check="handleTreeNodeCheck"
61
66
  @check-change="handleCheckChange"
62
67
  :load="loadNode"
68
+ v-if="showTree"
63
69
  >
64
70
  <span class="custom-tree-node" slot-scope="{ node, data }">
65
71
  <span>{{ node.label }}</span>
@@ -128,6 +134,7 @@ export default {
128
134
  disabled: this.isDisabled,
129
135
  isLeaf: 'leaf'
130
136
  },
137
+ showTree:true
131
138
  };
132
139
  },
133
140
  computed: {
@@ -137,7 +144,9 @@ export default {
137
144
  },
138
145
  watch: {
139
146
  filterText(o) {
140
- this.$refs.tree.filter(o);
147
+ if(!this.widget.options.disLocalFilter){
148
+ this.$refs.tree.filter(o);
149
+ }
141
150
  },
142
151
  },
143
152
  props: {
@@ -340,6 +349,18 @@ export default {
340
349
  loopDo();
341
350
  }
342
351
  },
352
+ handleClickButton(){
353
+ this.handleCustomEvent(this.widget.options.onFilterIconClick,["keyword"],[this.filterText])
354
+ },
355
+ handleFilterTextChange(val){
356
+ this.handleCustomEvent(this.widget.options.onFilterTextChange,["keyword"],[val])
357
+ },
358
+ reflushTree(){
359
+ this.showTree = false;
360
+ this.$nextTick(()=>{
361
+ this.showTree = true;
362
+ })
363
+ }
343
364
  /*loadDataFromDS(o = {}, e = "") {
344
365
  let n = e || this.widget.options.dsName,
345
366
  l = this.widget.options.dataSetName,