@tongfun/tf-widget 0.1.18 → 0.1.22
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/README.md +49 -42
- package/lib/css/1.841c5d60.css +1 -0
- package/lib/tf-widget.common.1.js +9 -13
- package/lib/tf-widget.common.js +1102 -950
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.1.js +9 -13
- package/lib/tf-widget.umd.js +1102 -950
- package/lib/tf-widget.umd.min.1.js +1 -1
- package/lib/tf-widget.umd.min.js +4 -4
- package/package/svg-icon/index.js +8 -8
- package/package/svg-icon/src/SvgIcon.vue +59 -59
- package/package/t-data-list/index.js +6 -6
- package/package/t-data-list/main.vue +193 -192
- package/package/t-data-list/src/condition-input/basic.vue +31 -31
- package/package/t-data-list/src/condition-input/date.vue +106 -106
- package/package/t-data-list/src/condition-input/index.vue +100 -100
- package/package/t-data-list/src/condition-input/input.vue +31 -31
- package/package/t-data-list/src/condition-input/number.vue +115 -115
- package/package/t-data-list/src/condition-input/select.vue +86 -86
- package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
- package/package/t-data-list/src/js/operatorEnum.js +108 -109
- package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
- package/package/t-data-list/src/js/util.js +34 -34
- package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -77
- package/package/t-data-list/src/pushdown/push-down.vue +158 -158
- package/package/t-data-list/src/t-list-search.vue +36 -32
- package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
- package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
- package/package/t-data-list/src/t-plan/index.vue +195 -190
- package/package/t-data-list/src/t-plan/plan-content.vue +389 -396
- package/package/t-data-list/src/t-table/index.vue +129 -120
- package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
- package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
- package/package/t-data-list/src/t-table/table-group.vue +180 -179
- package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -250
- package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
- package/package/t-data-list/src/t-table/table-records.vue +337 -324
- package/package/t-input/children/address.vue +101 -101
- package/package/t-input/children/basic-display.vue +41 -41
- package/package/t-input/children/basic.vue +253 -251
- package/package/t-input/children/date.vue +89 -89
- package/package/t-input/children/group-components/group-dialog.vue +344 -350
- package/package/t-input/children/group.vue +126 -126
- package/package/t-input/children/input.vue +72 -72
- package/package/t-input/children/number.vue +74 -74
- package/package/t-input/children/select.vue +89 -89
- package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
- package/package/t-input/index.js +7 -7
- package/package/t-input/index.vue +337 -337
- package/package/t-input/tInputCache.js +24 -24
- package/package/tf-icon-picker/README.md +7 -7
- package/package/tf-icon-picker/index.js +8 -8
- package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
- package/package/tf-layout/README.md +115 -115
- package/package/tf-layout/index.js +8 -8
- package/package/tf-layout/src/components/tf-labelbar.vue +394 -382
- package/package/tf-layout/src/components/tf-menu.vue +180 -180
- package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
- package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
- package/package/tf-layout/src/tf-layout.vue +140 -120
- package/package/tf-widget/index.js +8 -8
- package/package/tf-widget/src/assets/common-input.less +10 -10
- package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
- package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1087
- package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
- package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
- package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
- package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
- package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
- package/package/tf-widget/src/children/date-time.vue +103 -103
- package/package/tf-widget/src/children/date.vue +103 -103
- package/package/tf-widget/src/children/decimal.vue +115 -115
- package/package/tf-widget/src/children/integer.vue +104 -104
- package/package/tf-widget/src/children/property.vue +59 -59
- package/package/tf-widget/src/children/single-line-text.vue +82 -82
- package/package/tf-widget/src/children/small-pictures.vue +223 -223
- package/package/tf-widget/src/children/text-area.vue +74 -74
- package/package/tf-widget/src/children/tf-select.vue +113 -113
- package/package/tf-widget/src/tf-widget.vue +175 -175
- package/package.json +44 -43
- package/src/api/edit.js +97 -97
- package/src/api/file-enclosure.js +26 -26
- package/src/api/push-down.js +19 -19
- package/src/api/table.js +294 -294
- package/src/api/tableV3.js +166 -186
- package/src/assets/images/icons/index.js +9 -9
- package/src/assets/images/icons/svg/add.svg +5 -5
- package/src/assets/images/icons/svg/push-down.svg +1 -1
- package/src/assets/images/icons/svg/remove.svg +1 -1
- package/src/assets/styles/common-table.less +202 -202
- package/src/directives/debounce.js +24 -0
- package/src/index.js +31 -31
- package/src/mixins/t-data-query-mixin.js +290 -289
- package/src/utils/auth.js +22 -22
- package/src/utils/request.js +42 -42
- package/src/utils/stato-anormale.js +59 -59
- package/src/utils/utils.js +109 -109
- package/src/utils/validate.js +84 -84
- package/lib/css/1.920744ef.css +0 -1
|
@@ -1,120 +1,140 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tf-layout">
|
|
3
|
-
<TfMenu
|
|
4
|
-
:menus-info="menusInfo"
|
|
5
|
-
:menu-state="menuState"
|
|
6
|
-
/>
|
|
7
|
-
<div class="tf-layout-subject">
|
|
8
|
-
<TfLaberBar
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@
|
|
12
|
-
@
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
if (Array.isArray(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tf-layout">
|
|
3
|
+
<TfMenu
|
|
4
|
+
:menus-info="menusInfo"
|
|
5
|
+
:menu-state="menuState"
|
|
6
|
+
/>
|
|
7
|
+
<div class="tf-layout-subject">
|
|
8
|
+
<TfLaberBar
|
|
9
|
+
ref="TfLaberBar"
|
|
10
|
+
:route-base="routeBase"
|
|
11
|
+
@setCache="setCache"
|
|
12
|
+
@changeMenuState="changeMenuState"
|
|
13
|
+
@deleteCache="deleteCache"
|
|
14
|
+
/>
|
|
15
|
+
<div class="tf-layout-subject-content">
|
|
16
|
+
<keep-alive :include="secondCacheArray">
|
|
17
|
+
<router-view />
|
|
18
|
+
</keep-alive>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import TfMenu from './components/tf-menu'
|
|
26
|
+
import TfLaberBar from './components/tf-labelbar'
|
|
27
|
+
export default {
|
|
28
|
+
name: 'TfLayout',
|
|
29
|
+
components: {
|
|
30
|
+
TfMenu,
|
|
31
|
+
TfLaberBar
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
menusInfo: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default: function () {
|
|
37
|
+
return []
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
routeBase: {
|
|
41
|
+
default: null,
|
|
42
|
+
type: String
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
data () {
|
|
46
|
+
return {
|
|
47
|
+
currencyCache: {},
|
|
48
|
+
menuState: false,
|
|
49
|
+
cacheMap: new Map(),
|
|
50
|
+
secondCacheArray: [],
|
|
51
|
+
thirdCacheArr: []
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
changeMenuState (state) {
|
|
56
|
+
this.menuState = state
|
|
57
|
+
},
|
|
58
|
+
setCache (value) {
|
|
59
|
+
const key = value[2] || value[1]
|
|
60
|
+
if (this.cacheMap.get(key)) {
|
|
61
|
+
if (!this.currencyCache[key] || this.currencyCache[key] < 0) this.$set(this.currencyCache, key, 0)
|
|
62
|
+
this.currencyCache[key] += 1
|
|
63
|
+
} else {
|
|
64
|
+
this.cacheMap.set(key, value[1])
|
|
65
|
+
this.initCacheArr()
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
initCacheArr () {
|
|
69
|
+
this.secondCacheArray.push(
|
|
70
|
+
...this.arrayDiff([...this.cacheMap.values()], this.secondCacheArray)
|
|
71
|
+
)
|
|
72
|
+
this.thirdCacheArr.push(
|
|
73
|
+
...this.arrayDiff([...this.cacheMap.keys()], this.thirdCacheArr)
|
|
74
|
+
)
|
|
75
|
+
this.$emit('setSecondCache', this.secondCacheArray)
|
|
76
|
+
this.$emit('setThirdCache', this.thirdCacheArr)
|
|
77
|
+
},
|
|
78
|
+
arrayDiff (arr, arrRaw) {
|
|
79
|
+
if (Array.isArray(arr)) {
|
|
80
|
+
return arr.filter((i) => {
|
|
81
|
+
return arrRaw.indexOf(i) < 0
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
return []
|
|
85
|
+
},
|
|
86
|
+
deleteCache (value) {
|
|
87
|
+
if (Array.isArray(value)) {
|
|
88
|
+
value.forEach((item) => {
|
|
89
|
+
const key = item[2] || item[1]
|
|
90
|
+
if (`${this.currencyCache[key]}` && this.currencyCache[key] >= 0) {
|
|
91
|
+
this.currencyCache[key] -= 1
|
|
92
|
+
if (this.currencyCache[key] < 0) {
|
|
93
|
+
this.cacheMap.delete(key)
|
|
94
|
+
this.thirdCacheArr.splice(
|
|
95
|
+
this.thirdCacheArr.indexOf(key),
|
|
96
|
+
1
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
this.cacheMap.delete(key)
|
|
101
|
+
this.thirdCacheArr.splice(
|
|
102
|
+
this.thirdCacheArr.indexOf(key),
|
|
103
|
+
1
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
if ([...this.cacheMap.values()].indexOf(item[1]) === -1) {
|
|
107
|
+
this.secondCacheArray.splice(
|
|
108
|
+
this.secondCacheArray.indexOf(item[2]),
|
|
109
|
+
1
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
this.$emit('setSecondCache', this.secondCacheArray)
|
|
114
|
+
this.$emit('setThirdCache', this.thirdCacheArr)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style lang="less" scoped>
|
|
122
|
+
.tf-layout {
|
|
123
|
+
height: 100vh;
|
|
124
|
+
width: 100vw;
|
|
125
|
+
display: flex;
|
|
126
|
+
.tf-layout-subject {
|
|
127
|
+
flex: 1;
|
|
128
|
+
height: 94.82vh;
|
|
129
|
+
width: 100%;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
.tf-layout-subject-content {
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: calc(100% - 35px);
|
|
134
|
+
background: rgb(241, 241, 241);
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
padding: 5px 0 0 0;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import TfWidget from './src/tf-widget'
|
|
2
|
-
|
|
3
|
-
/* istanbul ignore next */
|
|
4
|
-
TfWidget.install = function (Vue) {
|
|
5
|
-
Vue.component(TfWidget.name, TfWidget)
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default TfWidget
|
|
1
|
+
import TfWidget from './src/tf-widget'
|
|
2
|
+
|
|
3
|
+
/* istanbul ignore next */
|
|
4
|
+
TfWidget.install = function (Vue) {
|
|
5
|
+
Vue.component(TfWidget.name, TfWidget)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default TfWidget
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// 颜色定义
|
|
2
|
-
@disabledBgColor: #f0f0f5;
|
|
3
|
-
|
|
4
|
-
::v-deep .el-input__inner[disabled = 'disabled']{
|
|
5
|
-
background: @disabledBgColor;
|
|
6
|
-
border-color: @disabledBgColor;
|
|
7
|
-
}
|
|
8
|
-
::v-deep .el-textarea__inner[disabled = 'disabled']{
|
|
9
|
-
background: @disabledBgColor;
|
|
10
|
-
border-color: @disabledBgColor;
|
|
1
|
+
// 颜色定义
|
|
2
|
+
@disabledBgColor: #f0f0f5;
|
|
3
|
+
|
|
4
|
+
::v-deep .el-input__inner[disabled = 'disabled']{
|
|
5
|
+
background: @disabledBgColor;
|
|
6
|
+
border-color: @disabledBgColor;
|
|
7
|
+
}
|
|
8
|
+
::v-deep .el-textarea__inner[disabled = 'disabled']{
|
|
9
|
+
background: @disabledBgColor;
|
|
10
|
+
border-color: @disabledBgColor;
|
|
11
11
|
}
|