centaline-data-driven 1.4.35 → 1.4.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.4.35",
3
+ "version": "1.4.36",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -104,6 +104,9 @@
104
104
  else if (v.show !== false && v.type === 'btn' && v.id === 'btnFilter') {
105
105
  this.filterBtnName = v.label;
106
106
  }
107
+ if(v.type !== 'btn'){
108
+ v.action='search';
109
+ }
107
110
  });
108
111
 
109
112
  },
@@ -2,16 +2,18 @@
2
2
  <div style="padding:0 8px 0 10px">
3
3
  <div v-if="model !== null">
4
4
  <el-table ref="multipleTable" :data="tableData"
5
- highlight-current-row tooltip-effect="dark" size="mini" style="width: 100%;" fit :row-class-name="tableRowClassName"
5
+ highlight-current-row tooltip-effect="dark" size="mini" style="width: 100%;" fit :row-class-name="tableRowClassName"
6
6
  :height="elTableHeight" v-loading="loading"
7
7
  @selection-change="handleSelectionChange"
8
- @current-change="handleCurrentChange">
8
+ @current-change="handleCurrentChange"
9
+ @cell-click="handleCellClick">
9
10
  <el-table-column type="selection" width="55" v-if="!singleSelectio"></el-table-column>
10
11
  <el-table-column v-for="(col, index) in model.columns" v-if="col.show" :key="index"
11
12
  :prop="col.id" :label="col.name" :min-width="col.width">
12
13
  </el-table-column>
13
14
  </el-table>
14
15
  <div style="margin-top: 20px;width: 100%;display: inline-block;height: 30px;margin-bottom: 10px;">
16
+ <span class="ct-table-tip-mini" v-if="!loading && model" v-html="model.footer"></span> <span class="ct-table-tip-mini" v-if="!loading && model" style="color:red;">已勾选 {{selectCount}} 条</span>
15
17
  <el-input v-if="jumpBtnName" size="mini" v-model="jumpStr" placeholder="定位" style="width:150px"></el-input>
16
18
  <el-button v-if="jumpBtnName" size="mini" @click="jumpClickHandler()">{{jumpBtnName}}</el-button>
17
19
  <el-button v-if="filterBtnName" size="mini" @click="filterClickHandler()" style="margin-left: 0px;">{{filterBtnName}}</el-button>
@@ -48,7 +50,8 @@
48
50
  loading: true,
49
51
  jumpStr: '',
50
52
  isBusy:false,
51
- elTableHeight:0,
53
+ elTableHeight: 0,
54
+ selectCount:0
52
55
  }
53
56
  },
54
57
  methods: {
@@ -62,7 +65,6 @@
62
65
  var selectWrap = this.$refs.multipleTable.bodyWrapper;
63
66
  selectWrap.addEventListener('scroll', this.scrollHandle);
64
67
  });
65
-
66
68
  //通知父组件加载完成
67
69
  this.$emit('loaded');
68
70
  },
@@ -101,11 +103,15 @@
101
103
  //当多选项发生变化时会触发该事件
102
104
  handleSelectionChange(val) {
103
105
  this.multipleSelection = val;
106
+ this.selectCount = this.$refs.multipleTable.selection.length;
104
107
  },
105
108
  //当单选项发生变化时会触发该事件
106
109
  handleCurrentChange(val) {
107
110
  this.currentRow = val;
108
111
  },
112
+ handleCellClick(row) {
113
+ this.model.selectIndex = row.tableIndex;
114
+ },
109
115
  filterClickHandler() {
110
116
  this.tableData = this.multipleSelection;
111
117