@tongfun/tf-widget 0.1.21 → 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 -49
- package/lib/tf-widget.common.js +547 -503
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +547 -503
- 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 -193
- 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 -108
- 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 -93
- package/package/t-data-list/src/pushdown/push-down.vue +158 -158
- package/package/t-data-list/src/t-list-search.vue +36 -36
- 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 -195
- package/package/t-data-list/src/t-plan/plan-content.vue +389 -389
- package/package/t-data-list/src/t-table/index.vue +129 -129
- 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 -180
- package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -246
- 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 -337
- 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 -253
- package/package/t-input/children/date.vue +89 -89
- package/package/t-input/children/group-components/group-dialog.vue +344 -344
- 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 -394
- 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 -140
- 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 -44
- 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 -160
- 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 -24
- package/src/index.js +31 -31
- package/src/mixins/t-data-query-mixin.js +290 -290
- 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
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-input
|
|
3
|
-
type="textarea"
|
|
4
|
-
:value="value"
|
|
5
|
-
:disabled="JSON.parse(disabled) "
|
|
6
|
-
:placeholder="placeholder"
|
|
7
|
-
@input="handleInput"
|
|
8
|
-
v-on="$listeners"
|
|
9
|
-
/>
|
|
10
|
-
</template>
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
components: {
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
props: {
|
|
17
|
-
value: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ''
|
|
20
|
-
},
|
|
21
|
-
placeholder: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ''
|
|
24
|
-
},
|
|
25
|
-
disabled: {
|
|
26
|
-
type: [Boolean, String],
|
|
27
|
-
default: false
|
|
28
|
-
},
|
|
29
|
-
defaultValue: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ''
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
data () {
|
|
35
|
-
return {
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
computed: {
|
|
39
|
-
debug () {
|
|
40
|
-
return typeof this.value
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
watch: {
|
|
44
|
-
value () {
|
|
45
|
-
if (!this.value) {
|
|
46
|
-
this.handleInput(null)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
created () {
|
|
51
|
-
// 默认值
|
|
52
|
-
if (this.defaultValue && !this.value) {
|
|
53
|
-
return this.handleInput(this.defaultValue)
|
|
54
|
-
}
|
|
55
|
-
// 有值的情况下不进行初始化
|
|
56
|
-
if (!this.value) {
|
|
57
|
-
return this.handleInput(null)
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
methods: {
|
|
61
|
-
handleInput (newValue) {
|
|
62
|
-
this.$emit('input', newValue)
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
|
-
<style lang="less" scoped>
|
|
69
|
-
@import '../assets/common-input.less';
|
|
70
|
-
::v-deep .el-textarea__inner{
|
|
71
|
-
width: 100%;
|
|
72
|
-
height: 100%;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-input
|
|
3
|
+
type="textarea"
|
|
4
|
+
:value="value"
|
|
5
|
+
:disabled="JSON.parse(disabled) "
|
|
6
|
+
:placeholder="placeholder"
|
|
7
|
+
@input="handleInput"
|
|
8
|
+
v-on="$listeners"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
components: {
|
|
14
|
+
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
value: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ''
|
|
20
|
+
},
|
|
21
|
+
placeholder: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ''
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: [Boolean, String],
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
defaultValue: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ''
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
data () {
|
|
35
|
+
return {
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
debug () {
|
|
40
|
+
return typeof this.value
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
value () {
|
|
45
|
+
if (!this.value) {
|
|
46
|
+
this.handleInput(null)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
created () {
|
|
51
|
+
// 默认值
|
|
52
|
+
if (this.defaultValue && !this.value) {
|
|
53
|
+
return this.handleInput(this.defaultValue)
|
|
54
|
+
}
|
|
55
|
+
// 有值的情况下不进行初始化
|
|
56
|
+
if (!this.value) {
|
|
57
|
+
return this.handleInput(null)
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
handleInput (newValue) {
|
|
62
|
+
this.$emit('input', newValue)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="less" scoped>
|
|
69
|
+
@import '../assets/common-input.less';
|
|
70
|
+
::v-deep .el-textarea__inner{
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tf-select">
|
|
3
|
-
<el-select v-if="!disabled" :value="selectId" filterable clearable :placeholder="placeholder" :disabled="JSON.parse(disabled)" style="display:block" @input="change" @change="$emit('change', $event)">
|
|
4
|
-
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
|
|
5
|
-
</el-select>
|
|
6
|
-
<el-input
|
|
7
|
-
v-else
|
|
8
|
-
:value="value ? value.name : ''"
|
|
9
|
-
:disabled="true"
|
|
10
|
-
:placeholder="placeholder"
|
|
11
|
-
>
|
|
12
|
-
<i class="el-icon-lock el-input__icon" slot="suffix" />
|
|
13
|
-
</el-input>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script>
|
|
17
|
-
import { getEnumOptions } from '@/api/edit.js'
|
|
18
|
-
export default {
|
|
19
|
-
components: {
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
props: {
|
|
23
|
-
value: {
|
|
24
|
-
type: [String, Object],
|
|
25
|
-
default: ''
|
|
26
|
-
},
|
|
27
|
-
enumtype: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: ''
|
|
30
|
-
},
|
|
31
|
-
placeholder: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: ''
|
|
34
|
-
},
|
|
35
|
-
disabled: {
|
|
36
|
-
type: [Boolean, Object, String],
|
|
37
|
-
default: null
|
|
38
|
-
},
|
|
39
|
-
defaultValue: {
|
|
40
|
-
type: [String, Object],
|
|
41
|
-
default: null
|
|
42
|
-
},
|
|
43
|
-
inEntity: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: false
|
|
46
|
-
},
|
|
47
|
-
field: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: ''
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
data () {
|
|
53
|
-
return {
|
|
54
|
-
options: []
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
computed: {
|
|
58
|
-
selectId () {
|
|
59
|
-
if (this.value) {
|
|
60
|
-
return this.value.id
|
|
61
|
-
}
|
|
62
|
-
return ''
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
async created () {
|
|
66
|
-
const res = await getEnumOptions(this.enumtype)
|
|
67
|
-
this.options = res.data
|
|
68
|
-
// 有默认值渲染默认值
|
|
69
|
-
if (this.defaultValue && !this.value) {
|
|
70
|
-
return this.change(this.defaultValue)
|
|
71
|
-
}
|
|
72
|
-
// 没有值的情况下初始化为null
|
|
73
|
-
if (!this.value) {
|
|
74
|
-
this.change(null)
|
|
75
|
-
} else {
|
|
76
|
-
this.change(this.selectId)
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
methods: {
|
|
80
|
-
change (newValue) {
|
|
81
|
-
const name = this.getLabelByValue(newValue)
|
|
82
|
-
let id = newValue
|
|
83
|
-
if (!name) {
|
|
84
|
-
id = null
|
|
85
|
-
}
|
|
86
|
-
this.$emit('input', { name, id })
|
|
87
|
-
if (this.field === 'is_closed') {
|
|
88
|
-
this.$emit('receiptClose', newValue)
|
|
89
|
-
}
|
|
90
|
-
if (this.field === 'line_closed') {
|
|
91
|
-
this.$emit('rowClose', newValue)
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
getLabelByValue (newValue) {
|
|
95
|
-
const option = this.options.find(item => item.id === newValue)
|
|
96
|
-
if (option) {
|
|
97
|
-
return option.name
|
|
98
|
-
}
|
|
99
|
-
return ''
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
</script>
|
|
104
|
-
|
|
105
|
-
<style lang="less" scoped>
|
|
106
|
-
@import '../assets/common-input.less';
|
|
107
|
-
::v-deep .el-input__inner{
|
|
108
|
-
width: 100%;
|
|
109
|
-
border: none;
|
|
110
|
-
border-bottom: 1px solid #DCDCDC;
|
|
111
|
-
border-radius: 0;
|
|
112
|
-
}
|
|
113
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tf-select">
|
|
3
|
+
<el-select v-if="!disabled" :value="selectId" filterable clearable :placeholder="placeholder" :disabled="JSON.parse(disabled)" style="display:block" @input="change" @change="$emit('change', $event)">
|
|
4
|
+
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
|
|
5
|
+
</el-select>
|
|
6
|
+
<el-input
|
|
7
|
+
v-else
|
|
8
|
+
:value="value ? value.name : ''"
|
|
9
|
+
:disabled="true"
|
|
10
|
+
:placeholder="placeholder"
|
|
11
|
+
>
|
|
12
|
+
<i class="el-icon-lock el-input__icon" slot="suffix" />
|
|
13
|
+
</el-input>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
import { getEnumOptions } from '@/api/edit.js'
|
|
18
|
+
export default {
|
|
19
|
+
components: {
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
value: {
|
|
24
|
+
type: [String, Object],
|
|
25
|
+
default: ''
|
|
26
|
+
},
|
|
27
|
+
enumtype: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ''
|
|
30
|
+
},
|
|
31
|
+
placeholder: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ''
|
|
34
|
+
},
|
|
35
|
+
disabled: {
|
|
36
|
+
type: [Boolean, Object, String],
|
|
37
|
+
default: null
|
|
38
|
+
},
|
|
39
|
+
defaultValue: {
|
|
40
|
+
type: [String, Object],
|
|
41
|
+
default: null
|
|
42
|
+
},
|
|
43
|
+
inEntity: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
field: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ''
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
data () {
|
|
53
|
+
return {
|
|
54
|
+
options: []
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
selectId () {
|
|
59
|
+
if (this.value) {
|
|
60
|
+
return this.value.id
|
|
61
|
+
}
|
|
62
|
+
return ''
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
async created () {
|
|
66
|
+
const res = await getEnumOptions(this.enumtype)
|
|
67
|
+
this.options = res.data
|
|
68
|
+
// 有默认值渲染默认值
|
|
69
|
+
if (this.defaultValue && !this.value) {
|
|
70
|
+
return this.change(this.defaultValue)
|
|
71
|
+
}
|
|
72
|
+
// 没有值的情况下初始化为null
|
|
73
|
+
if (!this.value) {
|
|
74
|
+
this.change(null)
|
|
75
|
+
} else {
|
|
76
|
+
this.change(this.selectId)
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
methods: {
|
|
80
|
+
change (newValue) {
|
|
81
|
+
const name = this.getLabelByValue(newValue)
|
|
82
|
+
let id = newValue
|
|
83
|
+
if (!name) {
|
|
84
|
+
id = null
|
|
85
|
+
}
|
|
86
|
+
this.$emit('input', { name, id })
|
|
87
|
+
if (this.field === 'is_closed') {
|
|
88
|
+
this.$emit('receiptClose', newValue)
|
|
89
|
+
}
|
|
90
|
+
if (this.field === 'line_closed') {
|
|
91
|
+
this.$emit('rowClose', newValue)
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
getLabelByValue (newValue) {
|
|
95
|
+
const option = this.options.find(item => item.id === newValue)
|
|
96
|
+
if (option) {
|
|
97
|
+
return option.name
|
|
98
|
+
}
|
|
99
|
+
return ''
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<style lang="less" scoped>
|
|
106
|
+
@import '../assets/common-input.less';
|
|
107
|
+
::v-deep .el-input__inner{
|
|
108
|
+
width: 100%;
|
|
109
|
+
border: none;
|
|
110
|
+
border-bottom: 1px solid #DCDCDC;
|
|
111
|
+
border-radius: 0;
|
|
112
|
+
}
|
|
113
|
+
</style>
|