cnhis-design-vue 2.1.79 → 2.1.80
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/CHANGELOG.md +38 -17
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +115 -95
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +22 -22
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +9 -9
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +66 -66
- package/es/index/index.js +2794 -1422
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +76 -76
- package/es/multi-chat-client/index.js +70 -70
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +22 -22
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +52 -50
- package/es/scale-view/style.css +1 -1
- package/es/select/index.js +12 -12
- package/es/select-label/index.js +36 -34
- package/es/select-label/style.css +1 -1
- package/es/select-person/index.js +2 -2
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +2535 -1185
- package/es/table-filter/style.css +1 -1
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +3100 -1583
- package/lib/cui.umd.js +3100 -1583
- package/lib/cui.umd.min.js +54 -54
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +15 -3
- package/packages/big-table/src/assets/style/table-base.less +7 -4
- package/packages/select-label/select-label.vue +18 -2
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +7 -15
- package/packages/table-filter/src/components/TextOverTooltip.vue +24 -11
- package/packages/table-filter/src/components/age-com/index.vue +3 -3
- package/packages/table-filter/src/components/checkbox-group/CheckboxGroup.vue +53 -0
- package/packages/table-filter/src/components/multi-select/multi-select.vue +7 -1
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +5 -119
- package/packages/table-filter/src/components/range-age/index.vue +11 -12
- package/packages/table-filter/src/components/render-widget/components/DateRangeQuick.vue +212 -0
- package/packages/table-filter/src/components/render-widget/components/NumberRange.vue +145 -0
- package/packages/table-filter/src/components/render-widget/components/SelectDynamic.vue +304 -0
- package/packages/table-filter/src/components/render-widget/components/index.js +4 -4
- package/packages/table-filter/src/components/render-widget/enums.js +27 -22
- package/packages/table-filter/src/components/render-widget/index.vue +38 -5
- package/packages/table-filter/src/components/render-widget/mixins/dynamic-method.js +158 -0
- package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +150 -45
- package/packages/table-filter/src/components/search-filter/SearchFilter.vue +3 -1
- package/packages/table-filter/src/mixins/mixins.js +192 -133
- package/packages/table-filter/src/mixins/out-quick-method.js +123 -0
- package/packages/table-filter/src/mixins/renderWidget.js +21 -13
- package/packages/table-filter/src/quick-search/QuickSearch.vue +144 -121
package/package.json
CHANGED
|
@@ -733,7 +733,7 @@ export default create({
|
|
|
733
733
|
return str;
|
|
734
734
|
},
|
|
735
735
|
// 日期显示格式化
|
|
736
|
-
getDate(row, item) {
|
|
736
|
+
getDate(row, item, attrType) {
|
|
737
737
|
let obj = row[item.columnName] || '';
|
|
738
738
|
let style = {};
|
|
739
739
|
// fillColor 有值代表背景色
|
|
@@ -754,6 +754,13 @@ export default create({
|
|
|
754
754
|
];
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
+
if (attrType === 'BIRTHDAY') {
|
|
758
|
+
return [
|
|
759
|
+
<a-tooltip title={obj}>
|
|
760
|
+
<span domPropsInnerHTML={obj} style={style} />
|
|
761
|
+
</a-tooltip>
|
|
762
|
+
];
|
|
763
|
+
}
|
|
757
764
|
return [<span domPropsInnerHTML={obj} style={style}></span>];
|
|
758
765
|
},
|
|
759
766
|
// 百分数格式化
|
|
@@ -1415,6 +1422,10 @@ export default create({
|
|
|
1415
1422
|
this.columnLen = currentColumns.filter(item => item.visible).length;
|
|
1416
1423
|
return columns;
|
|
1417
1424
|
},
|
|
1425
|
+
_isAge(item){
|
|
1426
|
+
if(item.attrType !== 'BIRTHDAY') return false;
|
|
1427
|
+
return item.settingObj?.format?.includes?.("age")
|
|
1428
|
+
},
|
|
1418
1429
|
// 2022/12/1 沈培均/方晶晶要求新增 如果有自定义提示就不显示表格自带的提示
|
|
1419
1430
|
handleShowOverflow(item) {
|
|
1420
1431
|
// 2023/03/17 新增单行高度由内容撑开, 不需要缺省
|
|
@@ -1422,6 +1433,7 @@ export default create({
|
|
|
1422
1433
|
if (item.columnName == "operatorColumn") return false;
|
|
1423
1434
|
// 选人组件 自己的tooltip
|
|
1424
1435
|
if (item.attrType === "CANDIDATE_COMPONENTS") return false;
|
|
1436
|
+
if(this._isAge(item)) return false;
|
|
1425
1437
|
let {showSetting} = item.settingObj || {}
|
|
1426
1438
|
if (!showSetting || !showSetting.length) return 'title';
|
|
1427
1439
|
let hasTips = 'title';
|
|
@@ -2071,8 +2083,8 @@ export default create({
|
|
|
2071
2083
|
if (attrType == 'MAP') {
|
|
2072
2084
|
return this.getMapVal(row, own);
|
|
2073
2085
|
}
|
|
2074
|
-
if (attrType == 'DATE' || attrType == 'TASKDATE') {
|
|
2075
|
-
return this.getDate(row, own);
|
|
2086
|
+
if (attrType == 'DATE' || attrType == 'TASKDATE'|| this._isAge(own)) {
|
|
2087
|
+
return this.getDate(row, own, attrType);
|
|
2076
2088
|
}
|
|
2077
2089
|
if (attrType == 'PERCENTAGE') {
|
|
2078
2090
|
return this.getPercentage(row, own);
|
|
@@ -273,20 +273,23 @@ body {
|
|
|
273
273
|
border-right-color: #5585f5;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
+
/deep/ .vxe-body--column.col--checkbox {
|
|
277
|
+
.vxe-cell {
|
|
278
|
+
position: relative;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
276
281
|
/deep/ .disabled-checked-tips {
|
|
277
282
|
position: absolute;
|
|
278
|
-
left:
|
|
283
|
+
left: 50%;
|
|
279
284
|
top: 50%;
|
|
280
|
-
bottom: 0;
|
|
281
|
-
right: 0;
|
|
282
285
|
box-sizing: border-box;
|
|
283
286
|
width: 16px;
|
|
284
287
|
height: 16px;
|
|
285
|
-
margin-top: -8px;
|
|
286
288
|
overflow: hidden;
|
|
287
289
|
border-radius: 50%;
|
|
288
290
|
border: 2px solid #b5b5b5;
|
|
289
291
|
background: #fff;
|
|
292
|
+
transform: translate(-50%, -50%);
|
|
290
293
|
&:hover {
|
|
291
294
|
border-color: #ff1818;
|
|
292
295
|
&::after {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
新增
|
|
10
10
|
</span>
|
|
11
11
|
</div>
|
|
12
|
-
<div class="common-label" v-if="sourceType == 'form' && commonLabelList.length &&
|
|
12
|
+
<div class="common-label" v-if="sourceType == 'form' && commonLabelList.length && !explicit">
|
|
13
13
|
<span>常用</span>
|
|
14
|
-
<a-checkable-tag v-for="(item, i) in commonLabelList" v-model="item.isSelect" @change="handleCommonLabelChange($event, item)" :key="i" :style="handleLabelColor(item)">
|
|
14
|
+
<a-checkable-tag v-for="(item, i) in commonLabelList" v-model="item.isSelect" @change="handleCommonLabelChange($event, item)" :key="i" :style="handleLabelColor(item)" :class="{'label-common-check-disabel': !item_is_edit}">
|
|
15
15
|
{{ item.labelName }}
|
|
16
16
|
</a-checkable-tag>
|
|
17
17
|
</div>
|
|
@@ -233,6 +233,7 @@ export default create({
|
|
|
233
233
|
this.hanldeSetLabelItem(d.labelId, false);
|
|
234
234
|
},
|
|
235
235
|
handleCommonLabelChange(v, d) {
|
|
236
|
+
if(!this.item_is_edit) return;
|
|
236
237
|
let multipleChoiceConfig = this.multipleChoiceConfig;
|
|
237
238
|
let selectedList = this.labelSelectedList || [];
|
|
238
239
|
if (v) {
|
|
@@ -304,6 +305,7 @@ export default create({
|
|
|
304
305
|
},
|
|
305
306
|
|
|
306
307
|
handleLabelColor(...arg) {
|
|
308
|
+
if(!this.item_is_edit) return {}
|
|
307
309
|
return utils.handleLabelColor(...arg);
|
|
308
310
|
},
|
|
309
311
|
|
|
@@ -500,10 +502,24 @@ export default create({
|
|
|
500
502
|
.ant-tag-checkable {
|
|
501
503
|
cursor: pointer;
|
|
502
504
|
box-sizing: border-box;
|
|
505
|
+
&.label-common-check-disabel {
|
|
506
|
+
color: rgba(33, 33, 33, 0.6);
|
|
507
|
+
background: rgb(250, 250, 250);
|
|
508
|
+
border-color: rgba(213, 213, 213, 0.8);
|
|
509
|
+
cursor: default;
|
|
510
|
+
&:hover,
|
|
511
|
+
&:active,
|
|
512
|
+
&:focus {
|
|
513
|
+
color: rgba(33, 33, 33, 0.6);
|
|
514
|
+
background: rgb(250, 250, 250);
|
|
515
|
+
border-color: rgba(213, 213, 213, 0.8);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
503
518
|
}
|
|
504
519
|
/deep/ .ant-tag {
|
|
505
520
|
margin-bottom: 4px;
|
|
506
521
|
}
|
|
522
|
+
|
|
507
523
|
}
|
|
508
524
|
.form-add-icon-label {
|
|
509
525
|
margin-bottom: 4px;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<!-- start--筛选外显--start -->
|
|
55
55
|
<template v-for="item in outSearchFieldList">
|
|
56
56
|
<li class="outQuickSearch-li" v-if="item.isRender" :key="item._frontId">
|
|
57
|
-
<RenderWidget style="margin: 0 8px 8px 0" :cfg="item" v-model="item.value" @outFilterChange="outFilterChange" />
|
|
57
|
+
<RenderWidget style="margin: 0 8px 8px 0" :cfg="item" v-model="item.value" source="baseSearch" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange" />
|
|
58
58
|
</li>
|
|
59
59
|
<outQuickSearch v-else :key="item.id + item.random_key" :item="item" :ref="item.columnName + item.random_key" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
|
|
60
60
|
</template>
|
|
@@ -412,8 +412,10 @@ import PrintBtn from '~/button/src/ButtonPrint/index';
|
|
|
412
412
|
|
|
413
413
|
import outQuickSearch from '../components/out-quick-search/out-quick-search';
|
|
414
414
|
import utils from '@/utils/utils-map';
|
|
415
|
-
import { durationMixin, $utils, filterApiFn, outQuickSearchFn } from '../mixins/mixins';
|
|
415
|
+
import { durationMixin, $utils, filterApiFn, outQuickSearchFn, outQuickSearchDefCommon } from '../mixins/mixins';
|
|
416
416
|
import tableSearchCon from '../mixins/tableSearchCon';
|
|
417
|
+
import OutQuickMethod from '../mixins/out-quick-method'
|
|
418
|
+
import dynamicMethod from '../components/render-widget/mixins/dynamic-method'
|
|
417
419
|
import svgIcon from '@/component/svg/index.vue';
|
|
418
420
|
import 'text-security/text-security.css';
|
|
419
421
|
import create from '@/core/create';
|
|
@@ -466,7 +468,7 @@ const BTNOBJ = {
|
|
|
466
468
|
|
|
467
469
|
export default create({
|
|
468
470
|
name: 'base-search',
|
|
469
|
-
mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, outQuickSearchFn],
|
|
471
|
+
mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, outQuickSearchFn, outQuickSearchDefCommon, OutQuickMethod, dynamicMethod],
|
|
470
472
|
directives: { resize, preventReClick },
|
|
471
473
|
props: {
|
|
472
474
|
width: {
|
|
@@ -1801,18 +1803,8 @@ export default create({
|
|
|
1801
1803
|
}
|
|
1802
1804
|
|
|
1803
1805
|
// 如有配置默认值
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
return this.isExistDefValByRenderWidget(v);
|
|
1807
|
-
}
|
|
1808
|
-
return !!v.explicitDefaultVal
|
|
1809
|
-
});
|
|
1810
|
-
if (isSetDefVal) {
|
|
1811
|
-
this.$emit('outSearchInit');
|
|
1812
|
-
if ('reset' != config?.type) {
|
|
1813
|
-
this.outFilterChange({ type: 'outSearchInit' });
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1806
|
+
this.isOut = true;
|
|
1807
|
+
this.handleDefVal(config)
|
|
1816
1808
|
},
|
|
1817
1809
|
dealOutFilterHideBtn() {
|
|
1818
1810
|
if (!this.isShowSetting('buttonAdaption') && this.outSearchFieldList.length > 0) {
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="text-over-tooltip-components">
|
|
3
|
-
<a-tooltip
|
|
4
|
-
|
|
3
|
+
<a-tooltip
|
|
4
|
+
:effect="effect"
|
|
5
|
+
:visible="isDisabledTooltip"
|
|
6
|
+
:title="curContent"
|
|
7
|
+
:placement="placement"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="ellipsis"
|
|
11
|
+
:class="className"
|
|
12
|
+
@mouseover="onMouseOver(refName)"
|
|
13
|
+
@mouseout="onMouseOut"
|
|
14
|
+
>
|
|
5
15
|
<i :ref="refName">
|
|
6
16
|
<slot></slot>
|
|
7
17
|
<i>{{ content }}</i>
|
|
@@ -12,10 +22,10 @@
|
|
|
12
22
|
</template>
|
|
13
23
|
|
|
14
24
|
<script>
|
|
15
|
-
import { Tooltip } from
|
|
25
|
+
import { Tooltip } from "ant-design-vue";
|
|
16
26
|
import vexutils from '@/utils/vexutils';
|
|
17
27
|
export default {
|
|
18
|
-
name:
|
|
28
|
+
name: "TextOverTooltip",
|
|
19
29
|
components: {
|
|
20
30
|
[Tooltip.name]: Tooltip
|
|
21
31
|
},
|
|
@@ -30,27 +40,27 @@ export default {
|
|
|
30
40
|
effect: {
|
|
31
41
|
type: String,
|
|
32
42
|
default: () => {
|
|
33
|
-
return
|
|
43
|
+
return "dark";
|
|
34
44
|
}
|
|
35
45
|
},
|
|
36
46
|
// Tooltip 的出现位置top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end
|
|
37
47
|
placement: {
|
|
38
48
|
type: String,
|
|
39
49
|
default: () => {
|
|
40
|
-
return
|
|
50
|
+
return "top";
|
|
41
51
|
}
|
|
42
52
|
},
|
|
43
|
-
tooltipTitle: { type: [Number, String], default:
|
|
53
|
+
tooltipTitle: { type: [Number, String], default: "" },
|
|
44
54
|
isAlias: Boolean
|
|
45
55
|
},
|
|
46
56
|
data() {
|
|
47
57
|
return {
|
|
48
|
-
isDisabledTooltip:
|
|
58
|
+
isDisabledTooltip: false // 是否需要禁止提示
|
|
49
59
|
};
|
|
50
60
|
},
|
|
51
61
|
computed: {
|
|
52
62
|
curContent() {
|
|
53
|
-
let res = this.tooltipTitle || this.content ||
|
|
63
|
+
let res = this.tooltipTitle || this.content || "";
|
|
54
64
|
if (vexutils.isNumber(res)) {
|
|
55
65
|
return res.toString();
|
|
56
66
|
}
|
|
@@ -61,13 +71,16 @@ export default {
|
|
|
61
71
|
// 移入事件: 判断内容的宽度contentWidth是否大于父级的宽度
|
|
62
72
|
onMouseOver(str) {
|
|
63
73
|
if (this.isAlias) {
|
|
64
|
-
this.isDisabledTooltip =
|
|
74
|
+
this.isDisabledTooltip = true;
|
|
65
75
|
return;
|
|
66
76
|
}
|
|
67
77
|
let parentWidth = this.$refs[str].parentNode.offsetWidth;
|
|
68
78
|
let contentWidth = this.$refs[str].offsetWidth;
|
|
69
79
|
// 判断是否禁用tooltip功能
|
|
70
|
-
this.isDisabledTooltip = contentWidth
|
|
80
|
+
this.isDisabledTooltip = contentWidth > parentWidth;
|
|
81
|
+
},
|
|
82
|
+
onMouseOut() {
|
|
83
|
+
this.isDisabledTooltip = false;
|
|
71
84
|
}
|
|
72
85
|
}
|
|
73
86
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="container age-com" :class="{ 'form-item-disabled': isDetail }">
|
|
3
3
|
<template v-if="showType.includes('YYYY')">
|
|
4
|
-
<a-input-number :value="ageValue.year" @change="handleYearChange" :disabled="isDisabled || isDetail" :min="0" />
|
|
4
|
+
<a-input-number :value="ageValue.year" @change="handleYearChange" :disabled="isDisabled || isDetail" :min="0" placeholder="请输入岁" />
|
|
5
5
|
<span class="age-com-suffix">岁</span>
|
|
6
6
|
</template>
|
|
7
7
|
<template v-if="showType.includes('MM')">
|
|
8
|
-
<a-input-number :value="ageValue.month" @change="handleMonthChange" :disabled="isDisabled || isDetail" :min="0" />
|
|
8
|
+
<a-input-number :value="ageValue.month" @change="handleMonthChange" :disabled="isDisabled || isDetail" :min="0" placeholder="请输入月" />
|
|
9
9
|
<span class="age-com-suffix">月</span>
|
|
10
10
|
</template>
|
|
11
11
|
<template v-if="showType.includes('DD')">
|
|
12
|
-
<a-input-number v-if="showType.includes('DD')" :value="ageValue.day" @change="handleDayChange" :disabled="isDisabled || isDetail" :min="0" />
|
|
12
|
+
<a-input-number v-if="showType.includes('DD')" :value="ageValue.day" @change="handleDayChange" :disabled="isDisabled || isDetail" :min="0" placeholder="请输入日" />
|
|
13
13
|
<span class="age-com-suffix">日</span>
|
|
14
14
|
</template>
|
|
15
15
|
</div>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CheckboxGroup v-bind="$attrs" :value="valueCp" @change="onChange"></CheckboxGroup>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { Checkbox } from 'ant-design-vue';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
components: {
|
|
11
|
+
CheckboxGroup: Checkbox.Group,
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
value: {
|
|
15
|
+
type: [Array, String, Number],
|
|
16
|
+
},
|
|
17
|
+
multiple: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
model: {
|
|
23
|
+
prop: "value",
|
|
24
|
+
event: "update:value"
|
|
25
|
+
},
|
|
26
|
+
computed: {
|
|
27
|
+
valueCp: {
|
|
28
|
+
set(val) {
|
|
29
|
+
this.$emit("update:value", val);
|
|
30
|
+
},
|
|
31
|
+
get() {
|
|
32
|
+
return Array.isArray(this.value) ? this.value : this.value ? [this.value] : [];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
filterNewVal(val) {
|
|
38
|
+
return val.filter((v) => !this.valueCp.includes(v));
|
|
39
|
+
},
|
|
40
|
+
onChange(val) {
|
|
41
|
+
if (!this.multiple && Array.isArray(val)) {
|
|
42
|
+
let res = this.filterNewVal(val)?.[0]
|
|
43
|
+
this.valueCp = res ? [res]: [];
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this.valueCp = val;
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
</script>
|
|
52
|
+
<style lang='less'>
|
|
53
|
+
</style>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:mode="mode"
|
|
4
4
|
v-if="item.com == 'SelectMui'"
|
|
5
5
|
:placeholder="item.placeholder || `请选择${item.alias || item.title}`"
|
|
6
|
-
:style="
|
|
6
|
+
:style="selectWidth"
|
|
7
7
|
:dropdownMatchSelectWidth="false"
|
|
8
8
|
:maxTagCount="handleMaxTagCount(item)"
|
|
9
9
|
:maxTagPlaceholder="handleMaxTag(item)"
|
|
@@ -85,6 +85,12 @@ export default {
|
|
|
85
85
|
},
|
|
86
86
|
|
|
87
87
|
computed: {
|
|
88
|
+
selectWidth(){
|
|
89
|
+
if(this.source !== 'quickSearch' || this.item?.advanceColWidth) {
|
|
90
|
+
return {width: `${this.item?.advanceColWidth || 160}px`}
|
|
91
|
+
}
|
|
92
|
+
return {width: '100%'}
|
|
93
|
+
},
|
|
88
94
|
handleMaxTagCount() {
|
|
89
95
|
return function(item) {
|
|
90
96
|
let len = this.maxTagPlaceholder(item);
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
@change="value => rangePickerChange(value, item)"
|
|
43
43
|
@ok="outFilterChange"
|
|
44
44
|
v-model="item.value"
|
|
45
|
-
:placeholder="[
|
|
45
|
+
:placeholder="[`起始${item.alias || item.title}`, `截止${item.alias || item.title}`]"
|
|
46
46
|
v-if="item.com == 'DatePicker'"
|
|
47
47
|
style="margin: 0 8px 8px 0"
|
|
48
48
|
:showTime="handlePickerShowTime(item)"
|
|
@@ -116,7 +116,8 @@
|
|
|
116
116
|
import multiSelect from '../multi-select/multi-select';
|
|
117
117
|
import cTreeSelect from '../c-tree-select/tree-select';
|
|
118
118
|
import { filterApiFn } from '../../mixins/mixins';
|
|
119
|
-
import wordBookutils from '../../mixins/wordBookutils';
|
|
119
|
+
// import wordBookutils from '../../mixins/wordBookutils';
|
|
120
|
+
import OutQuickMethod from '../../mixins/out-quick-method'
|
|
120
121
|
import moment from 'moment';
|
|
121
122
|
import { Input, DatePicker} from 'ant-design-vue';
|
|
122
123
|
const EVALUATEList = [
|
|
@@ -148,7 +149,7 @@ const EVALUATEList = [
|
|
|
148
149
|
];
|
|
149
150
|
export default {
|
|
150
151
|
name: "OutQuickSearch",
|
|
151
|
-
mixins: [filterApiFn],
|
|
152
|
+
mixins: [filterApiFn, OutQuickMethod],
|
|
152
153
|
components: {
|
|
153
154
|
multiSelect,
|
|
154
155
|
cTreeSelect,
|
|
@@ -180,126 +181,11 @@ export default {
|
|
|
180
181
|
watch: {},
|
|
181
182
|
// 生命周期
|
|
182
183
|
created() {},
|
|
183
|
-
mounted() {
|
|
184
|
-
this.init();
|
|
185
|
-
},
|
|
184
|
+
mounted() {},
|
|
186
185
|
|
|
187
186
|
// 方法
|
|
188
187
|
methods: {
|
|
189
188
|
|
|
190
|
-
init(){
|
|
191
|
-
let item = this.item;
|
|
192
|
-
let df = item.explicitDefaultVal;
|
|
193
|
-
if(item.com == 'SelectMui' && df){
|
|
194
|
-
this.dropdownVisibleChange(true, item, {type:'hasDefaultInit'})
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
handleWordBookSearch(value, item, config = {}) {
|
|
199
|
-
if (item.comType != "SelectMuiWordBook") return;
|
|
200
|
-
let curAutograph = item.settingObj.wordbook && item.settingObj.wordbook.autograph;
|
|
201
|
-
let params = {
|
|
202
|
-
keyword: value,
|
|
203
|
-
autograph: curAutograph
|
|
204
|
-
};
|
|
205
|
-
let obj = {};
|
|
206
|
-
let p = item?.setting?.wordbook?.params || undefined;
|
|
207
|
-
if (p) {
|
|
208
|
-
item.setting.wordbook.params.forEach(item => {
|
|
209
|
-
obj[item.p_name] = item.p_value;
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
let rp = { ...params, ...obj, ...config }
|
|
213
|
-
this.getWordbookData(item.setting.wordbook, rp).then(({ data }) => {
|
|
214
|
-
this.handleWordbookData(item, data, rp);
|
|
215
|
-
});
|
|
216
|
-
},
|
|
217
|
-
dropdownVisibleChange(open, item, config={}) {
|
|
218
|
-
if (item.comType != "SelectMuiWordBook") return;
|
|
219
|
-
if (open) {
|
|
220
|
-
let obj = {};
|
|
221
|
-
if (item.setting.wordbook.params) {
|
|
222
|
-
item.setting.wordbook.params.forEach(item => {
|
|
223
|
-
obj[item.p_name] = item.p_value;
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
if (item.settingObj.wordbook) {
|
|
227
|
-
obj.autograph = item.settingObj.wordbook.autograph;
|
|
228
|
-
}
|
|
229
|
-
let df = item.explicitDefaultVal;
|
|
230
|
-
if(df != 'firstOption'){
|
|
231
|
-
obj.keyword = df;
|
|
232
|
-
}
|
|
233
|
-
this.getWordbookData(item.setting.wordbook, obj).then(({ data }) => {
|
|
234
|
-
this.handleWordbookData(item, data, obj);
|
|
235
|
-
if('hasDefaultInit' == config?.type){
|
|
236
|
-
this.outFilterChange({type:'outSearchInit'});
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
handleWordbookData(item, data, params) {
|
|
242
|
-
this.$set(item, "hasFieldList", false);
|
|
243
|
-
const {rows,hasFieldList,searchPageConfig} = wordBookutils.handleWordbookData(item,data,params);
|
|
244
|
-
this.$set(item, "hasFieldList", hasFieldList);
|
|
245
|
-
this.$set(item, "dataSource", rows);
|
|
246
|
-
let showKeys = item?.setting?.wordbook?.showKeys || [];
|
|
247
|
-
item.searchPageConfig = Object.assign(item.searchPageConfig, searchPageConfig);
|
|
248
|
-
// 初始化获取值
|
|
249
|
-
if(!this.initSearch){
|
|
250
|
-
let df = item.explicitDefaultVal;
|
|
251
|
-
if(df){
|
|
252
|
-
let defval = [];
|
|
253
|
-
if(df === 'firstOption'){
|
|
254
|
-
let [v,k] = rows;
|
|
255
|
-
// 如果有添加提示标题,取第二个
|
|
256
|
-
if(showKeys.length > 0 && item.hasFieldList){
|
|
257
|
-
v = k;
|
|
258
|
-
}
|
|
259
|
-
v && (defval = [v.myName])
|
|
260
|
-
} else {
|
|
261
|
-
let f = rows.find(v => v.myName.includes(df));
|
|
262
|
-
if(f){
|
|
263
|
-
defval = [f.myName]
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
item.value = [...defval]
|
|
267
|
-
item.search_DefaultValue= [...defval]
|
|
268
|
-
}
|
|
269
|
-
this.initSearch = true;
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
getWordbookData(o, obj) {
|
|
273
|
-
let { id, filterKeys, wordbookType } = o;
|
|
274
|
-
this.fetchingWordbook = true;
|
|
275
|
-
let resFieldKeys = Array.isArray(filterKeys) ? JSON.stringify(filterKeys) : filterKeys;
|
|
276
|
-
let url = `/tableReader/getWordbookData`;
|
|
277
|
-
let params = {
|
|
278
|
-
wordbookId: id,
|
|
279
|
-
fieldKeys: resFieldKeys,
|
|
280
|
-
wordbookType: wordbookType || "WORDBOOK",
|
|
281
|
-
asyncCount: 1, // 开启性能模式
|
|
282
|
-
...obj
|
|
283
|
-
};
|
|
284
|
-
return this.handleGetConfigApi(params, 'requestGetWordbookData', { fields: o }).then(res => {
|
|
285
|
-
this.fetchingWordbook = false;
|
|
286
|
-
if(typeof res.data === 'object'){
|
|
287
|
-
res.data.reqParams = params;
|
|
288
|
-
}
|
|
289
|
-
return res;
|
|
290
|
-
}).catch(() => {
|
|
291
|
-
this.fetchingWordbook = false;
|
|
292
|
-
});
|
|
293
|
-
// return this.axios
|
|
294
|
-
// .post(url, this.$qs.stringify(params))
|
|
295
|
-
// .then(res => {
|
|
296
|
-
// this.fetchingWordbook = false;
|
|
297
|
-
// return res;
|
|
298
|
-
// })
|
|
299
|
-
// .catch(() => {
|
|
300
|
-
// this.fetchingWordbook = false;
|
|
301
|
-
// });
|
|
302
|
-
},
|
|
303
189
|
rangePickerChange(value, item) {
|
|
304
190
|
if (item.showTime) {
|
|
305
191
|
if (!value.length && item.showTime) {
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a-input-group>
|
|
3
|
-
<a-row :gutter="8">
|
|
4
|
-
<a-col :span="11">
|
|
2
|
+
<a-input-group class="rang-age-input-group">
|
|
5
3
|
<age-com
|
|
6
4
|
:disabled="disabled"
|
|
7
5
|
:format="format"
|
|
8
6
|
@change="ageStartOnChange"
|
|
9
7
|
:defaultValue="startValue"
|
|
10
|
-
></age-com
|
|
11
|
-
</a-col>
|
|
12
|
-
<a-col :span="1">
|
|
13
|
-
<div class="middle-tips">—</div>
|
|
14
|
-
</a-col>
|
|
15
|
-
<a-col :span="11">
|
|
16
|
-
<age-com
|
|
8
|
+
></age-com><div class="middle-tips">—</div><age-com
|
|
17
9
|
:disabled="disabled"
|
|
18
10
|
:format="format"
|
|
19
11
|
@change="ageEndOnChange"
|
|
20
12
|
:defaultValue="endValue"
|
|
21
13
|
></age-com>
|
|
22
|
-
</a-col>
|
|
23
|
-
</a-row>
|
|
24
14
|
</a-input-group>
|
|
25
15
|
</template>
|
|
26
16
|
|
|
@@ -164,7 +154,16 @@ export default {
|
|
|
164
154
|
</script>
|
|
165
155
|
|
|
166
156
|
<style lang="less" scoped>
|
|
157
|
+
.rang-age-input-group {
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
width: 100%;
|
|
160
|
+
/deep/ .age-com {
|
|
161
|
+
max-width: calc(50% - 16px);
|
|
162
|
+
width: unset;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
167
165
|
.middle-tips {
|
|
166
|
+
width: 32px;
|
|
168
167
|
height: 30px;
|
|
169
168
|
line-height: 30px;
|
|
170
169
|
text-align: center;
|