bri-components 1.3.30 → 1.3.32

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.
Files changed (28) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/1.bri-components.min.js +1 -1
  3. package/lib/10.bri-components.min.js +1 -0
  4. package/lib/11.bri-components.min.js +1 -0
  5. package/lib/2.bri-components.min.js +1 -1
  6. package/lib/3.bri-components.min.js +1 -1
  7. package/lib/4.bri-components.min.js +1 -1
  8. package/lib/5.bri-components.min.js +1 -1
  9. package/lib/6.bri-components.min.js +1 -1
  10. package/lib/7.bri-components.min.js +1 -0
  11. package/lib/8.bri-components.min.js +1 -0
  12. package/lib/9.bri-components.min.js +1 -0
  13. package/lib/bri-components.min.js +16 -16
  14. package/package.json +1 -1
  15. package/src/components/controls/base/BriUpload/BriUpload.vue +2 -12
  16. package/src/components/controls/base/BriUpload/uploadList.vue +35 -31
  17. package/src/components/controls/senior/cascaderTable.vue +29 -173
  18. package/src/components/controls/senior/flatTable/flatTable.vue +55 -242
  19. package/src/components/controls/senior/selectUsers/selectUsers.vue +16 -13
  20. package/src/components/form/DshDefaultSearch.vue +1 -2
  21. package/src/components/list/DshCascaderTable.vue +231 -34
  22. package/src/components/list/DshFlatTable.vue +59 -1
  23. package/src/components/list/DshTreeTable.vue +263 -87
  24. package/src/components/{controls/senior/flatTable → list/common}/flatTableImportModal.vue +1 -9
  25. package/src/components/list/mixins/flatTableMixin.js +16 -48
  26. package/src/components/list/mixins/quoteListModal.vue +215 -0
  27. package/src/components/list/mixins/tableBaseMixin.js +349 -12
  28. package/src/styles/components/list/BriTable.less +26 -7
@@ -1,100 +1,56 @@
1
1
  <template>
2
2
  <div class="flatTable">
3
- <!-- 多选模式 -->
4
- <template v-if="multipleMode"></template>
5
-
6
- <!-- 单选模式 -->
7
- <template v-else>
8
- <!-- 查看 单元格内 -->
9
- <span
10
- v-if="isUnitShow"
11
- class="flatTable-unit"
12
- >
13
- <dsh-icons :list="[{
14
- customIcon: 'bico-internaltable'
15
- }]"></dsh-icons>
16
- <span class="flatTable-unit-text">
17
- {{ curVal.list.length }}行
18
- </span>
3
+ <!-- 查看 单元格内 -->
4
+ <span
5
+ v-if="isUnitShow"
6
+ class="flatTable-unit"
7
+ >
8
+ <dsh-icons :list="[{
9
+ customIcon: 'bico-internaltable'
10
+ }]"></dsh-icons>
11
+ <span class="flatTable-unit-text">
12
+ {{ curVal.list.length }}行
19
13
  </span>
14
+ </span>
20
15
 
21
- <!-- 编辑、查看(查看页内) -->
22
- <template v-else>
23
- <!-- 配置端 设置默认值用-->
24
- <dsh-btn-modal v-if="propsObj._key === '_default'">
25
- <dsh-flat-table
26
- :canEdit="finalCanEdit"
27
- :data="curVal.list"
28
- :rowDefault="curVal.rowDefault"
29
- :columns="columns"
30
- :propsObj="propsObj"
31
- :parentFormList="allFormList"
32
- :parentObj="value"
33
- @change="change"
34
- ></dsh-flat-table>
35
- </dsh-btn-modal>
36
-
37
- <!-- 正常使用 -->
38
- <template v-else>
39
- <!-- 操作按钮 -->
40
- <dsh-buttons
41
- class="flatTable-btns"
42
- itemClass="flatTable-btns-item"
43
- :list="$getOperationList(operationFieldList)"
44
- @click="$dispatchEvent($event)"
45
- ></dsh-buttons>
46
-
47
- <dsh-flat-table
48
- ref="dshFatTable"
49
- :canEdit="finalCanEdit"
50
- :data="curVal.list"
51
- :oldData="curVal.oldList"
52
- :rowDefault="curVal.rowDefault"
53
- :columns="columns"
54
- :propsObj="propsObj"
55
- :parentFormList="allFormList"
56
- :parentObj="value"
57
- @change="change"
58
- ></dsh-flat-table>
59
-
60
- <!-- 全屏查看 -->
61
- <dsh-modal
62
- v-model="isEnlarge"
63
- mode="custom"
64
- :propsObj="modalPropsObj"
65
- >
66
- <dsh-flat-table
67
- :canEdit="finalCanEdit"
68
- :data="curVal.list"
69
- :oldData="curVal.oldList"
70
- :rowDefault="curVal.rowDefault"
71
- :columns="columns"
72
- :propsObj="propsObj"
73
- :parentFormList="allFormList"
74
- :parentObj="value"
75
- @change="change"
76
- ></dsh-flat-table>
77
- </dsh-modal>
78
- </template>
79
- </template>
16
+ <!-- 编辑、查看(查看页内) -->
17
+ <template v-else>
18
+ <!-- 配置端 设置默认值用-->
19
+ <dsh-btn-modal v-if="propsObj._key === '_default'">
20
+ <dsh-flat-table
21
+ :canEdit="finalCanEdit"
22
+ :data="curVal.list"
23
+ :rowDefault="curVal.rowDefault"
24
+ :columns="subForm"
25
+ :propsObj="propsObj"
26
+ :parentFormList="allFormList"
27
+ :parentObj="value"
28
+ @change="change"
29
+ ></dsh-flat-table>
30
+ </dsh-btn-modal>
31
+
32
+ <!-- 正常使用 -->
33
+ <dsh-flat-table
34
+ v-else
35
+ ref="table"
36
+ :canEdit="finalCanEdit"
37
+ :data="curVal.list"
38
+ :oldData="curVal.oldList"
39
+ :rowDefault="curVal.rowDefault"
40
+ :columns="subForm"
41
+ :propsObj="propsObj"
42
+ :parentFormList="allFormList"
43
+ :parentObj="value"
44
+ @change="change"
45
+ ></dsh-flat-table>
80
46
  </template>
81
-
82
- <flat-table-import-modal
83
- v-if="showBatchImportModal"
84
- :value="showBatchImportModal"
85
- :propsObj="propsObj"
86
- :importParams="importParams"
87
- @input="toggleBatchImportModal"
88
- @importCb="importCb"
89
- ></flat-table-import-modal>
90
47
  </div>
91
48
  </template>
92
49
 
93
50
  <script>
94
51
  import controlMixin from "../../mixins/controlMixin.js";
95
- import DshBtnModal from "../../../small/DshBtnModal.vue";
96
52
  import DshFlatTable from "../../../list/DshFlatTable.vue";
97
- import flatTableImportModal from "./flatTableImportModal.vue";
53
+ import DshBtnModal from "../../../small/DshBtnModal.vue";
98
54
 
99
55
  export default {
100
56
  name: "flatTable",
@@ -102,48 +58,24 @@
102
58
  controlMixin
103
59
  ],
104
60
  components: {
105
- DshBtnModal,
106
61
  DshFlatTable,
107
- flatTableImportModal
62
+ DshBtnModal
108
63
  },
109
64
  props: {},
110
65
  data () {
111
- return {
112
- isEnlarge: false,
113
-
114
- operationMap: {
115
- canEnlarge: {
116
- name: "全屏展示",
117
- type: "canEnlarge",
118
- icon: "md-expand",
119
- size: "small",
120
- btnType: "text",
121
- event: "enlarge"
122
- },
123
- canImport: {
124
- name: "导入",
125
- type: "canImport",
126
- icon: "ios-create-outline",
127
- size: "small",
128
- btnType: "text",
129
- event: "clickBatchImport"
130
- },
131
- canExport: {
132
- name: "导出",
133
- type: "canExport",
134
- icon: "md-share-alt",
135
- size: "small",
136
- btnType: "text",
137
- disabled: false,
138
- event: "clickExport"
139
- }
140
- },
141
-
142
- showBatchImportModal: false,
143
- timer: null
144
- };
66
+ return {};
145
67
  },
146
68
  computed: {
69
+ selfPropsObj () {
70
+ return {
71
+ _subForm: [],
72
+ ...this.propsObj
73
+ };
74
+ },
75
+ subForm () {
76
+ return this.selfPropsObj._subForm;
77
+ },
78
+
147
79
  curVal () {
148
80
  // TODO: 待定处理
149
81
  return this.value[this.controlKey] || {
@@ -151,125 +83,15 @@
151
83
  oldList: [],
152
84
  rowDefault: {}
153
85
  };
154
- },
155
- columns () {
156
- return this.propsObj._subForm;
157
- },
158
-
159
- modalPropsObj () {
160
- return {
161
- title: this.propsObj._name,
162
- fullscreen: true,
163
- showSlotClose: false,
164
- closable: true
165
- };
166
- },
167
-
168
- operationFieldList () {
169
- let btnList = ["canEnlarge"];
170
- if (this.propsObj._isExport) {
171
- btnList.unshift("canExport");
172
- }
173
- if (this.propsObj._isImport && this.finalCanEdit) {
174
- btnList.unshift("canImport");
175
- }
176
-
177
- return btnList;
178
- },
179
- importParams () {
180
- return {
181
- _key: this.controlKey,
182
- _id: this.value._id
183
- };
184
86
  }
185
87
  },
186
88
  created () {},
187
89
  methods: {
188
- clickBatchImport () {
189
- this.openBatchImportModal();
190
- },
191
- openBatchImportModal () {
192
- this.showBatchImportModal = true;
193
- },
194
- // 关闭批量导入模态框
195
- closeBatchImportModal () {
196
- this.showBatchImportModal = false;
197
- },
198
- // 切换批量导入模态框
199
- toggleBatchImportModal (bool) {
200
- bool ? this.openBatchImportModal() : this.closeBatchImportModal();
201
- },
202
- // 导出点击
203
- clickExport (operationItem) {
204
- if (operationItem.disabled || this.timer) {
205
- return;
206
- }
207
- operationItem.disabled = true;
208
- this.$https({
209
- url: {
210
- module: "sheet",
211
- name: "exportFlatTableExcel"
212
- },
213
- params: {
214
- _key: this.controlKey,
215
- _id: this.value._id,
216
- screenKey: this.screenKey
217
- },
218
- callback: data => {
219
- setTimeout(() => {
220
- operationItem.disabled = false;
221
- }, 500);
222
- this.timer = setInterval(this.getTransitStatus(data.jobId, data.excel_url), 1000);
223
- }
224
- });
225
- },
226
- getTransitStatus (id, url) {
227
- let that = this;
228
- return function () {
229
- that.getJobStatus(id, url);
230
- };
231
- },
232
- getJobStatus (id, url) {
233
- this.$https({
234
- url: {
235
- module: "sheet",
236
- name: "getJobStatus"
237
- },
238
- params: {
239
- jobId: id
240
- },
241
- callback: data => {
242
- if (data.status === "completed") {
243
- clearInterval(this.timer);
244
- this.timer = null;
245
- window.location.href = data.url;
246
- } else if (data.status === "failed") {
247
- clearInterval(this.timer);
248
- this.timer = null;
249
- // this.exportBtnLoading = false;
250
- this.$Message.info({ content: "操作失败,请稍后再试" });
251
- }
252
- },
253
- error: data => {
254
- this.timer = null;
255
- }
256
- });
257
- },
258
- // 回调- 导入成功
259
- importCb (data) {
260
- this.value[this.controlKey] = data;
261
- this.change(data);
262
- },
263
-
264
90
  // 校验方法 -供外部使用
265
91
  validate () {
266
- return this.$refs.dshFatTable.validate();
92
+ return this.$refs.table.validate();
267
93
  },
268
94
 
269
- // 打开全屏模态框
270
- enlarge () {
271
- this.isEnlarge = true;
272
- },
273
95
  change (...params) {
274
96
  this.$emit("change", ...params);
275
97
  }
@@ -288,14 +110,5 @@
288
110
 
289
111
  }
290
112
  }
291
-
292
- &-btns {
293
- text-align: right;
294
- color: @textColor;
295
-
296
- &-item {
297
-
298
- }
299
- }
300
113
  }
301
114
  </style>
@@ -28,18 +28,19 @@
28
28
  }"
29
29
  >
30
30
  <template v-if="!$isEmptyData(curValList)">
31
- <img
32
- v-for="item in curValList"
33
- :src="item.avatarurl ? $imageResize(item.avatarurl, imageResizeConfig) : $imageSrcMap.system.boy"
34
- :key="item._key"
35
- class="selectUsers-unit-img"
36
- />
37
- <span
38
- v-if="curValList[0]"
39
- class="selectUsers-unit-text"
40
- >
41
- {{ curValList[0].name || curValList[0].realname || curValList[0].mobile }}
42
- </span>
31
+ <template v-for="item in curValList">
32
+ <img
33
+ :src="item.avatarurl ? $imageResize(item.avatarurl, imageResizeConfig) : $imageSrcMap.system.boy"
34
+ :key="item._key"
35
+ class="selectUsers-unit-img"
36
+ />
37
+ <span
38
+ :key="item._key + 'span'"
39
+ class="selectUsers-unit-text"
40
+ >
41
+ {{ item.name || item.realname || item.mobile }}
42
+ </span>
43
+ </template>
43
44
  </template>
44
45
 
45
46
  <template v-else>
@@ -274,7 +275,9 @@
274
275
  m: "fixed",
275
276
  w: 18,
276
277
  h: 18
277
- }
278
+ },
279
+
280
+ allListFilterVals: []
278
281
  };
279
282
  },
280
283
  computed: {
@@ -186,8 +186,7 @@
186
186
 
187
187
  &-item {
188
188
  padding: 6px 0px;
189
- margin-top: 0px;
190
- margin-bottom: 0px;
189
+ margin: 0px;
191
190
 
192
191
  &-name {}
193
192
  }