bri-components 1.4.40 → 1.4.42
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 +1 -1
- package/src/components/controls/DshControlInput.vue +15 -1
- package/src/components/controls/base/DshInput/DshInput.vue +1 -0
- package/src/components/controls/mixins/controlMixin.js +7 -2
- package/src/components/controls/mixins/userAndDepartMixin.js +0 -1
- package/src/components/controls/senior/selectUsers/selectUsers.vue +1 -1
- package/src/components/list/mixins/DshFlatTableMixin.js +20 -14
- package/src/components/list/mixins/tableBaseMixin.js +1 -2
package/package.json
CHANGED
|
@@ -111,7 +111,21 @@
|
|
|
111
111
|
this.$emit("clickItem", ...params);
|
|
112
112
|
},
|
|
113
113
|
clickClear () {
|
|
114
|
-
|
|
114
|
+
const cb = () => {
|
|
115
|
+
this.$emit("clear");
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (this.propsObj._useDeleteTip === true) {
|
|
119
|
+
this.$Modal.confirm({
|
|
120
|
+
title: "提示",
|
|
121
|
+
content: "确定清除全部内容吗?",
|
|
122
|
+
onOk: () => {
|
|
123
|
+
cb();
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
} else {
|
|
127
|
+
cb();
|
|
128
|
+
}
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
131
|
};
|
|
@@ -105,12 +105,17 @@ export default {
|
|
|
105
105
|
commonDealPropsObj () {
|
|
106
106
|
const selectControlTypes = ["coordinates", "date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "users", "departments", "reference"];
|
|
107
107
|
return {
|
|
108
|
-
// TODO: 此处的请输入可能还有请选择之类的,待处理
|
|
109
108
|
_placeholder: this.canEdit && this.propsObj._enterType !== "calculate" && this.propsObj._disabled !== true && this.propsObj._readonly !== true
|
|
110
109
|
? (this.propsObj._placeholder || `${selectControlTypes.includes(this.controlType) ? "选择" : "输入"}${this.propsObj._name}`)
|
|
111
110
|
: "",
|
|
112
111
|
_clearable: this.finalCanEdit && !this.propsObj._disabled && !this.propsObj._readonly && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable),
|
|
113
|
-
_disabled: !(this.finalCanEdit && !this.propsObj._disabled && !this.propsObj._readonly)
|
|
112
|
+
_disabled: !(this.finalCanEdit && !this.propsObj._disabled && !this.propsObj._readonly),
|
|
113
|
+
// 目前部门、用户在用,以后还会增多
|
|
114
|
+
_useDeleteTip: this.isInDftSearch || this.isInSearch
|
|
115
|
+
? false
|
|
116
|
+
: this.propsObj._useDeleteTip == undefined
|
|
117
|
+
? false
|
|
118
|
+
: this.propsObj._useDeleteTip // 删除项进行提示(筛选下删除项不提示)
|
|
114
119
|
};
|
|
115
120
|
},
|
|
116
121
|
// 是否为多选模式
|
|
@@ -275,18 +275,20 @@ export default {
|
|
|
275
275
|
});
|
|
276
276
|
},
|
|
277
277
|
quickChangeVal (operationItem, row, rowIndex, column, params) {
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
if (this.isUseQuickChange({ row, rowIndex, column })) {
|
|
279
|
+
this.$set(this.ruleRecordMap, this.getMixKey(row, column), { showRuleMessage: true });
|
|
280
|
+
this.dealSameRowsVal({ row, rowIndex, column });
|
|
280
281
|
|
|
281
|
-
|
|
282
|
+
this.change("quickChangeVal", row, rowIndex, column, ...params);
|
|
283
|
+
}
|
|
282
284
|
},
|
|
283
285
|
changeVal (operationItem, row, rowIndex, column, params) {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
+
if (!this.isUseQuickChange({ row, rowIndex, column })) {
|
|
287
|
+
this.$set(this.ruleRecordMap, this.getMixKey(row, column), { showRuleMessage: true });
|
|
286
288
|
this.dealSameRowsVal({ row, rowIndex, column });
|
|
287
|
-
}
|
|
288
289
|
|
|
289
|
-
|
|
290
|
+
this.change("changeVal", row, rowIndex, column, ...params);
|
|
291
|
+
}
|
|
290
292
|
},
|
|
291
293
|
|
|
292
294
|
/* ----------- 方法 ---------- */
|
|
@@ -337,15 +339,19 @@ export default {
|
|
|
337
339
|
|
|
338
340
|
return rowspan;
|
|
339
341
|
},
|
|
342
|
+
// 是都满足使用quickChange
|
|
343
|
+
isUseQuickChange ({ row, rowIndex, column }) {
|
|
344
|
+
return ["text", "textarea", "idcard", "email", "phone", "url", "password"].includes(column._type) &&
|
|
345
|
+
this.mergeRowColKeys.includes(column._key) &&
|
|
346
|
+
this.rowspanMap[this.getMixKey(row, column)] > 1;
|
|
347
|
+
},
|
|
340
348
|
// 合并单元格的行,某列的值全部跟着修改
|
|
341
349
|
dealSameRowsVal ({ row, rowIndex, column }, list = this.allListData) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
.
|
|
346
|
-
|
|
347
|
-
});
|
|
348
|
-
}
|
|
350
|
+
const indexInAll = list.findIndex(dataItem => dataItem._id === row._id);
|
|
351
|
+
list.slice(indexInAll + 1, indexInAll + this.rowspanMap[this.getMixKey(row, column)])
|
|
352
|
+
.forEach(rowItem => {
|
|
353
|
+
rowItem[column._key] = this.$deepCopy(row[column._key]);
|
|
354
|
+
});
|
|
349
355
|
}
|
|
350
356
|
}
|
|
351
357
|
};
|
|
@@ -813,8 +813,7 @@ export default {
|
|
|
813
813
|
},
|
|
814
814
|
// 输入框值改变立即
|
|
815
815
|
quickChangeVal (operationItem, row, rowIndex, column, params) {
|
|
816
|
-
|
|
817
|
-
this.change("quickChangeVal", row, rowIndex, column, ...params);
|
|
816
|
+
// 啥也不做,平级表格合并单元格时用这个方法
|
|
818
817
|
},
|
|
819
818
|
// 输入框值改变
|
|
820
819
|
changeVal (operationItem, row, rowIndex, column, params) {
|