@tongfun/tf-widget 0.1.29 → 0.1.30
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 +4 -0
- package/lib/tf-widget.common.js +264 -226
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +264 -226
- package/lib/tf-widget.umd.min.js +4 -4
- package/package.json +1 -1
- package/package/svg-icon/index.js +0 -8
- package/package/svg-icon/src/SvgIcon.vue +0 -59
- package/package/t-data-list/index.js +0 -6
- package/package/t-data-list/main.vue +0 -193
- package/package/t-data-list/src/condition-input/basic.vue +0 -31
- package/package/t-data-list/src/condition-input/date.vue +0 -106
- package/package/t-data-list/src/condition-input/index.vue +0 -100
- package/package/t-data-list/src/condition-input/input.vue +0 -31
- package/package/t-data-list/src/condition-input/number.vue +0 -115
- package/package/t-data-list/src/condition-input/select.vue +0 -86
- package/package/t-data-list/src/js/fieldTypeEnum.js +0 -10
- package/package/t-data-list/src/js/operatorEnum.js +0 -108
- package/package/t-data-list/src/js/qureyParamsEnum.js +0 -4
- package/package/t-data-list/src/js/util.js +0 -34
- package/package/t-data-list/src/mixins/button-controll-mixin.js +0 -93
- package/package/t-data-list/src/pushdown/push-down.vue +0 -158
- package/package/t-data-list/src/t-list-search.vue +0 -36
- package/package/t-data-list/src/t-plan/condition-always-item.vue +0 -143
- package/package/t-data-list/src/t-plan/condition-mult-item.vue +0 -222
- package/package/t-data-list/src/t-plan/index.vue +0 -195
- package/package/t-data-list/src/t-plan/plan-content.vue +0 -389
- package/package/t-data-list/src/t-table/index.vue +0 -129
- package/package/t-data-list/src/t-table/table-group-item-edit.vue +0 -238
- package/package/t-data-list/src/t-table/table-group-item.vue +0 -87
- package/package/t-data-list/src/t-table/table-group.vue +0 -180
- package/package/t-data-list/src/t-table/table-records-header-popover.vue +0 -246
- package/package/t-data-list/src/t-table/table-records-selected.vue +0 -159
- package/package/t-data-list/src/t-table/table-records.vue +0 -336
- package/package/t-input/children/address.vue +0 -101
- package/package/t-input/children/basic-display.vue +0 -41
- package/package/t-input/children/basic.vue +0 -261
- package/package/t-input/children/date.vue +0 -84
- package/package/t-input/children/group-components/group-dialog.vue +0 -344
- package/package/t-input/children/group.vue +0 -126
- package/package/t-input/children/input.vue +0 -67
- package/package/t-input/children/number.vue +0 -71
- package/package/t-input/children/select.vue +0 -86
- package/package/t-input/children/tfile/fiile-enclosure.vue +0 -233
- package/package/t-input/children/tfile/file-img/comp.png +0 -0
- package/package/t-input/children/tfile/file-img/excel.png +0 -0
- package/package/t-input/children/tfile/file-img/img.png +0 -0
- package/package/t-input/children/tfile/file-img/pdf.png +0 -0
- package/package/t-input/children/tfile/file-img/word.png +0 -0
- package/package/t-input/index.js +0 -7
- package/package/t-input/index.vue +0 -337
- package/package/t-input/tInputCache.js +0 -24
- package/package/tf-icon-picker/README.md +0 -8
- package/package/tf-icon-picker/index.js +0 -8
- package/package/tf-icon-picker/src/tf-icon-picker.vue +0 -266
- package/package/tf-layout/README.md +0 -115
- package/package/tf-layout/index.js +0 -8
- package/package/tf-layout/src/components/tf-labelbar.vue +0 -394
- package/package/tf-layout/src/components/tf-menu.vue +0 -180
- package/package/tf-layout/src/components/tf-right-menu.vue +0 -89
- package/package/tf-layout/src/components/tf-rotate-box.vue +0 -50
- package/package/tf-layout/src/tf-layout.vue +0 -140
- package/package/tf-widget/index.js +0 -8
- package/package/tf-widget/src/assets/common-input.less +0 -11
- package/package/tf-widget/src/children/basic-data/basic-data.vue +0 -366
- package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +0 -1087
- package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +0 -750
- package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +0 -519
- package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +0 -93
- package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +0 -240
- package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +0 -108
- package/package/tf-widget/src/children/date-time.vue +0 -103
- package/package/tf-widget/src/children/date.vue +0 -103
- package/package/tf-widget/src/children/decimal.vue +0 -115
- package/package/tf-widget/src/children/integer.vue +0 -104
- package/package/tf-widget/src/children/property.vue +0 -59
- package/package/tf-widget/src/children/single-line-text.vue +0 -82
- package/package/tf-widget/src/children/small-pictures.vue +0 -223
- package/package/tf-widget/src/children/text-area.vue +0 -74
- package/package/tf-widget/src/children/tf-select.vue +0 -113
- package/package/tf-widget/src/tf-widget.vue +0 -175
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-dialog
|
|
4
|
-
:visible.sync="showDialog"
|
|
5
|
-
class="table-control"
|
|
6
|
-
:append-to-body="true"
|
|
7
|
-
@close="closeDialog"
|
|
8
|
-
>
|
|
9
|
-
<template v-slot:title> 列表控制 </template>
|
|
10
|
-
<div class="table-control-header">
|
|
11
|
-
<ul>
|
|
12
|
-
<li @click="recoverDefault">恢复默认</li>
|
|
13
|
-
<li>|</li>
|
|
14
|
-
<li @click="onlySingle">
|
|
15
|
-
<span>{{ hiddenHeaderFlag ? '显示单据头+单据体':'只显示单据头' }}</span>
|
|
16
|
-
</li>
|
|
17
|
-
<li>|</li>
|
|
18
|
-
<li @click="allHidden">
|
|
19
|
-
<span>{{ allHiddenFlag ? '全部显示':'全部隐藏' }}</span>
|
|
20
|
-
</li>
|
|
21
|
-
<li>|</li>
|
|
22
|
-
<li @click="allIce">
|
|
23
|
-
<span v-if="allFixedFlag === false">全部冻结</span>
|
|
24
|
-
<span v-else>取消全部冻结</span>
|
|
25
|
-
</li>
|
|
26
|
-
</ul>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="table-control-body">
|
|
29
|
-
<ux-grid
|
|
30
|
-
ref="plxTable"
|
|
31
|
-
:data="tableLayout"
|
|
32
|
-
border
|
|
33
|
-
show-overflow
|
|
34
|
-
max-height="600"
|
|
35
|
-
:width-resize="true"
|
|
36
|
-
:highlight-current-row="false"
|
|
37
|
-
:edit-config="{trigger: 'click', mode: 'cell'}"
|
|
38
|
-
>
|
|
39
|
-
<ux-table-column type="index" width="80" align="center" />
|
|
40
|
-
<ux-table-column field="title" title="列名" align="center" width="180" />
|
|
41
|
-
<ux-table-column field="align" title="对齐方式" align="center" width="360">
|
|
42
|
-
<template v-slot="{ row }">
|
|
43
|
-
<el-radio-group v-model="row.align">
|
|
44
|
-
<el-radio v-for="item in alignList" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
|
45
|
-
</el-radio-group>
|
|
46
|
-
</template>
|
|
47
|
-
</ux-table-column>
|
|
48
|
-
<ux-table-column field="hiddenFlag" title="隐藏列" align="center">
|
|
49
|
-
<!--这个呢是编辑状态下的方式-->
|
|
50
|
-
<template v-slot="scope">
|
|
51
|
-
<el-switch
|
|
52
|
-
v-model="scope.row.hiddenFlag"
|
|
53
|
-
active-color="#13ce66"
|
|
54
|
-
inactive-color="#D8D8D8"
|
|
55
|
-
/>
|
|
56
|
-
</template>
|
|
57
|
-
</ux-table-column>
|
|
58
|
-
<ux-table-column field="fixedBak" title="冻结列" align="center">
|
|
59
|
-
<!--这个呢是编辑状态下的方式-->
|
|
60
|
-
<template v-slot="scope">
|
|
61
|
-
<el-switch
|
|
62
|
-
v-model="scope.row.fixedBak"
|
|
63
|
-
active-color="#13ce66"
|
|
64
|
-
inactive-color="#D8D8D8"
|
|
65
|
-
@change="changeFixed(scope)"
|
|
66
|
-
/>
|
|
67
|
-
</template>
|
|
68
|
-
</ux-table-column>
|
|
69
|
-
</ux-grid>
|
|
70
|
-
</div>
|
|
71
|
-
</el-dialog>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
<script>
|
|
75
|
-
export default {
|
|
76
|
-
components: {},
|
|
77
|
-
props: {
|
|
78
|
-
tableLayout: {
|
|
79
|
-
type: Array,
|
|
80
|
-
default: () => {
|
|
81
|
-
return []
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
dialogTableVisible: {
|
|
85
|
-
type: Boolean,
|
|
86
|
-
default: false
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
data () {
|
|
90
|
-
return {
|
|
91
|
-
alignList: [
|
|
92
|
-
{
|
|
93
|
-
value: 'left',
|
|
94
|
-
label: '居左'
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
value: 'center',
|
|
98
|
-
label: '默认'
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
value: 'right',
|
|
102
|
-
label: '居右'
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
showDialog: false, // 列表控制弹框
|
|
106
|
-
allHiddenFlag: false, // 全部隐藏标志
|
|
107
|
-
allFixedFlag: false, // 全部冻结标志
|
|
108
|
-
hiddenHeaderFlag: false, // 只显示单据头标志
|
|
109
|
-
checkboxList: [],
|
|
110
|
-
emptyString: ''
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
watch: {
|
|
114
|
-
// 监听 dialogTableVisible 改变
|
|
115
|
-
dialogTableVisible (newVal) {
|
|
116
|
-
this.showDialog = newVal
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
mounted () {
|
|
120
|
-
// 初始化fixedBak
|
|
121
|
-
this.initFixedBak()
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
methods: {
|
|
125
|
-
|
|
126
|
-
// 初始化fixedBak
|
|
127
|
-
initFixedBak () {
|
|
128
|
-
this.tableLayout.forEach(item => {
|
|
129
|
-
item.fixedBak = item.fixed === 'left'
|
|
130
|
-
})
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
// 对齐方式显示为中文
|
|
134
|
-
getAlignLabel (val) {
|
|
135
|
-
const item = this.alignList.filter(item => item.value === val)[0]
|
|
136
|
-
return item ? item.label : ''
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
changeFixed (scope) {
|
|
140
|
-
this.$nextTick(() => {
|
|
141
|
-
const index = this.tableLayout.findIndex(d => d._XID === scope.row._XID)
|
|
142
|
-
this.tableLayout.splice(index, 1, { ...this.tableLayout[index], fixed: scope.row.fixedBak ? 'left' : '' })
|
|
143
|
-
// 更新列配置
|
|
144
|
-
this.$emit('updateColumn')
|
|
145
|
-
})
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
closeDialog () {
|
|
149
|
-
this.$emit('closeDialog', false)
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
// 恢复默认
|
|
153
|
-
recoverDefault () {
|
|
154
|
-
this.tableLayout.forEach((item, index) => {
|
|
155
|
-
this.tableLayout.splice(index, 1, { ...item, hiddenFlag: false, fixed: '', fixedBak: false })
|
|
156
|
-
})
|
|
157
|
-
this.allHiddenFlag = false
|
|
158
|
-
this.allFixedFlag = false
|
|
159
|
-
this.hiddenHeaderFlag = false
|
|
160
|
-
// 更新列配置
|
|
161
|
-
this.$emit('updateColumn')
|
|
162
|
-
this.$message.success('恢复默认成功')
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
// 只显示单据头
|
|
166
|
-
onlySingle () {
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
// 全部隐藏 + 全部显示
|
|
170
|
-
allHidden () {
|
|
171
|
-
// 全部隐藏
|
|
172
|
-
if (this.allHiddenFlag === false) {
|
|
173
|
-
this.tableLayout.forEach((item, index) => {
|
|
174
|
-
this.tableLayout.splice(index, 1, { ...item, hiddenFlag: true })
|
|
175
|
-
})
|
|
176
|
-
this.allHiddenFlag = true
|
|
177
|
-
this.$message.success('全部隐藏成功')
|
|
178
|
-
} else { // 全部显示
|
|
179
|
-
this.tableLayout.forEach((item, index) => {
|
|
180
|
-
this.tableLayout.splice(index, 1, { ...item, hiddenFlag: false })
|
|
181
|
-
})
|
|
182
|
-
this.allHiddenFlag = false
|
|
183
|
-
this.$message.success('全部显示成功')
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
// 全部冻结 + 取消全部冻结
|
|
188
|
-
allIce () {
|
|
189
|
-
// 全部冻结
|
|
190
|
-
if (this.allFixedFlag === false) {
|
|
191
|
-
this.tableLayout.forEach((item, index) => {
|
|
192
|
-
this.tableLayout.splice(index, 1, { ...item, fixedBak: true, fixed: 'left' })
|
|
193
|
-
})
|
|
194
|
-
this.allFixedFlag = true
|
|
195
|
-
this.$message.success('全部冻结成功')
|
|
196
|
-
} else { // 取消全部冻结
|
|
197
|
-
this.tableLayout.forEach((item, index) => {
|
|
198
|
-
this.tableLayout.splice(index, 1, { ...item, fixedBak: false, fixed: '' })
|
|
199
|
-
})
|
|
200
|
-
this.allFixedFlag = false
|
|
201
|
-
this.$message.success('取消全部冻结成功')
|
|
202
|
-
}
|
|
203
|
-
// 更新列配置
|
|
204
|
-
this.$emit('updateColumn')
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
</script>
|
|
210
|
-
|
|
211
|
-
<style lang="less" scoped>
|
|
212
|
-
.table-control{
|
|
213
|
-
/deep/ .el-dialog {
|
|
214
|
-
border-radius: 0.9259vh 0.9259vh 0 0;
|
|
215
|
-
/deep/ .el-dialog__header {
|
|
216
|
-
background: #0261A4;
|
|
217
|
-
color: #fff;
|
|
218
|
-
border-radius: 0.9259vh 0.9259vh 0 0;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/*头部样式*/
|
|
223
|
-
.table-control-header {
|
|
224
|
-
height: 3.7963vh;
|
|
225
|
-
margin: 0 auto;
|
|
226
|
-
text-align: center;
|
|
227
|
-
ul :nth-child(odd) {
|
|
228
|
-
color: #0261A4;
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
}
|
|
231
|
-
li {
|
|
232
|
-
display: inline;
|
|
233
|
-
line-height: 3.7963vh;
|
|
234
|
-
margin: 0 1.9444vh;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
</style>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
title="查看图片"
|
|
4
|
-
:visible.sync="dialogVisible"
|
|
5
|
-
width="50%"
|
|
6
|
-
:append-to-body="true"
|
|
7
|
-
:before-close="handleCloseMethod"
|
|
8
|
-
>
|
|
9
|
-
<div class="picture-warp">
|
|
10
|
-
<el-carousel trigger="click" :autoplay="false">
|
|
11
|
-
<el-carousel-item v-for="item in pictures" :key="item">
|
|
12
|
-
<div>
|
|
13
|
-
<el-image :src="item" alt="" fit="contain" />
|
|
14
|
-
</div>
|
|
15
|
-
</el-carousel-item>
|
|
16
|
-
</el-carousel>
|
|
17
|
-
</div>
|
|
18
|
-
<span slot="footer" class="dialog-footer">
|
|
19
|
-
<el-button class="common-header-button" type="primary" @click="handelClose">取 消</el-button>
|
|
20
|
-
<el-button class="common-header-button button-sure" type="primary" @click="handelClose">确 定</el-button>
|
|
21
|
-
</span>
|
|
22
|
-
</el-dialog>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
export default {
|
|
27
|
-
props: {
|
|
28
|
-
dialogVisible: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
viewPictureData: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: ''
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
data () {
|
|
38
|
-
return {
|
|
39
|
-
pictures: []
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
watch: {
|
|
43
|
-
viewPictureData: function (newVal, oldVal) {
|
|
44
|
-
this.pictures = newVal.split(',')
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
methods: {
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 弹框关闭前
|
|
51
|
-
*/
|
|
52
|
-
handleCloseMethod (done) {
|
|
53
|
-
this.$emit('handelClose', false)
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* 弹框关闭
|
|
58
|
-
*/
|
|
59
|
-
handelClose () {
|
|
60
|
-
this.$emit('handelClose', false)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
</script>
|
|
67
|
-
<style lang='less' scoped>
|
|
68
|
-
@import "@/assets/styles/common-table.less";
|
|
69
|
-
/deep/ .el-dialog__body{
|
|
70
|
-
height: 50vh;
|
|
71
|
-
overflow: auto;
|
|
72
|
-
padding: 1vh 1vw;
|
|
73
|
-
box-sizing: border-box;
|
|
74
|
-
.picture-warp{
|
|
75
|
-
height: 100%;
|
|
76
|
-
.el-carousel{
|
|
77
|
-
height: 100%;
|
|
78
|
-
.el-carousel__container{
|
|
79
|
-
height: 100% !important;
|
|
80
|
-
}
|
|
81
|
-
.el-carousel__item{
|
|
82
|
-
height: 100% !important;
|
|
83
|
-
>div{
|
|
84
|
-
height: 100% !important;
|
|
85
|
-
display: flex;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
::v-deep .el-button{
|
|
94
|
-
width: 2.5vw;
|
|
95
|
-
height: 2.222vh;
|
|
96
|
-
opacity: 1;
|
|
97
|
-
background: #0c4c8e;
|
|
98
|
-
color: #fff;
|
|
99
|
-
padding: 0;
|
|
100
|
-
border-radius: 2px 0 0 2px;
|
|
101
|
-
border: 1px solid #0c4c8e;
|
|
102
|
-
margin-right: 0;
|
|
103
|
-
}
|
|
104
|
-
.button-sure{
|
|
105
|
-
margin-left: 1vw !important;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
</style>
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-date-picker
|
|
3
|
-
:value="value"
|
|
4
|
-
type="datetime"
|
|
5
|
-
:placeholder="placeholder"
|
|
6
|
-
value-format="yyyy-MM-dd HH:mm:ss"
|
|
7
|
-
format="yyyy-MM-dd HH:mm:ss"
|
|
8
|
-
:disabled="JSON.parse(disabled)"
|
|
9
|
-
:clearable="false"
|
|
10
|
-
@input="handleInput"
|
|
11
|
-
v-on="$listeners"
|
|
12
|
-
/>
|
|
13
|
-
</template>
|
|
14
|
-
<script>
|
|
15
|
-
export default {
|
|
16
|
-
components: {
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
value: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: ''
|
|
22
|
-
},
|
|
23
|
-
disabled: {
|
|
24
|
-
type: [Boolean, String],
|
|
25
|
-
default: false
|
|
26
|
-
},
|
|
27
|
-
placeholder: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: ''
|
|
30
|
-
},
|
|
31
|
-
defaultValue: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: ''
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
data () {
|
|
37
|
-
return {
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
watch: {
|
|
41
|
-
value () {
|
|
42
|
-
if (!this.value) {
|
|
43
|
-
this.handleInput(null)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
created () {
|
|
48
|
-
if (this.defaultValue && this.defaultValue !== 'now' && !this.value) {
|
|
49
|
-
return this.handleInput(this.defaultValue)
|
|
50
|
-
}
|
|
51
|
-
if (this.defaultValue && this.defaultValue === 'now' && !this.value) {
|
|
52
|
-
return this.handleInput(this.getNowTime())
|
|
53
|
-
}
|
|
54
|
-
// 时间类型初始化成null
|
|
55
|
-
if (!this.value) {
|
|
56
|
-
this.handleInput(null)
|
|
57
|
-
} else {
|
|
58
|
-
this.handleInput(this.value)
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
methods: {
|
|
62
|
-
handleInput (v) {
|
|
63
|
-
this.$emit('input', v)
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
// 获取当前日期
|
|
67
|
-
getNowTime () {
|
|
68
|
-
const time = new Date()
|
|
69
|
-
const year = time.getFullYear()
|
|
70
|
-
const month = (time.getMonth() + 1).toString().padStart(2, '0')
|
|
71
|
-
const date = (time.getDate()).toString().padStart(2, '0')
|
|
72
|
-
const hours = (time.getHours()).toString().padStart(2, '0')
|
|
73
|
-
const minute = (time.getMinutes()).toString().padStart(2, '0')
|
|
74
|
-
const second = (time.getSeconds()).toString().padStart(2, '0')
|
|
75
|
-
return year + '-' + month + '-' + date + ' ' + hours + ':' + minute + ':' + second
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<style lang="less" scoped>
|
|
83
|
-
@import '../assets/common-input.less';
|
|
84
|
-
::v-deep .el-input__inner{
|
|
85
|
-
width: 100%;
|
|
86
|
-
border: none;
|
|
87
|
-
border-bottom: 1px solid #DCDCDC;
|
|
88
|
-
border-radius: 0;
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
::v-deep .el-icon-time {
|
|
92
|
-
// background: red;
|
|
93
|
-
background-size: 20px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
::v-deep .el-icon-time:before {
|
|
97
|
-
content: "\e71f";
|
|
98
|
-
font-size: 16px;
|
|
99
|
-
position: absolute;
|
|
100
|
-
left: 760% !important;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
</style>
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-date-picker
|
|
3
|
-
ref="date"
|
|
4
|
-
:value="value"
|
|
5
|
-
type="date"
|
|
6
|
-
:placeholder="placeholder"
|
|
7
|
-
value-format="yyyy-MM-dd"
|
|
8
|
-
format="yyyy-MM-dd"
|
|
9
|
-
:disabled="JSON.parse(disabled)"
|
|
10
|
-
:clearable="false"
|
|
11
|
-
@input="handleInput"
|
|
12
|
-
v-on="$listeners"
|
|
13
|
-
/>
|
|
14
|
-
</template>
|
|
15
|
-
<script>
|
|
16
|
-
export default {
|
|
17
|
-
components: {
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
value: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ''
|
|
24
|
-
},
|
|
25
|
-
disabled: {
|
|
26
|
-
type: [Boolean, String],
|
|
27
|
-
default: false
|
|
28
|
-
},
|
|
29
|
-
placeholder: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ''
|
|
32
|
-
},
|
|
33
|
-
defaultValue: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: ''
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
data () {
|
|
39
|
-
return {
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
watch: {
|
|
43
|
-
value () {
|
|
44
|
-
if (!this.value) {
|
|
45
|
-
this.handleInput(null)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
created () {
|
|
50
|
-
if (this.defaultValue && this.defaultValue !== 'now' && !this.value) {
|
|
51
|
-
return this.handleInput(this.defaultValue)
|
|
52
|
-
}
|
|
53
|
-
if (this.defaultValue && this.defaultValue === 'now' && !this.value) {
|
|
54
|
-
return this.handleInput(this.getNowTime())
|
|
55
|
-
}
|
|
56
|
-
// 时间类型初始化成null
|
|
57
|
-
if (!this.value) {
|
|
58
|
-
this.handleInput(null)
|
|
59
|
-
} else {
|
|
60
|
-
this.handleInput(this.value)
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
methods: {
|
|
64
|
-
handleInput (v) {
|
|
65
|
-
this.$emit('input', v)
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
// 获取当前日期
|
|
69
|
-
getNowTime () {
|
|
70
|
-
const time = new Date()
|
|
71
|
-
const year = time.getFullYear()
|
|
72
|
-
const month = (time.getMonth() + 1).toString().padStart(2, '0')
|
|
73
|
-
const date = (time.getDate()).toString().padStart(2, '0')
|
|
74
|
-
return year + '-' + month + '-' + date
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
</script>
|
|
80
|
-
|
|
81
|
-
<style lang="less" scoped>
|
|
82
|
-
@import '../assets/common-input.less';
|
|
83
|
-
::v-deep .el-input__inner{
|
|
84
|
-
width: 100%;
|
|
85
|
-
border: none;
|
|
86
|
-
border-bottom: 1px solid #DCDCDC;
|
|
87
|
-
padding-left: 15px !important;
|
|
88
|
-
border-radius: 0;
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
}
|
|
91
|
-
::v-deep .el-icon-date {
|
|
92
|
-
// background: red;
|
|
93
|
-
background-size: 20px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
::v-deep .el-icon-date:before {
|
|
97
|
-
content: "\e78e";
|
|
98
|
-
font-size: 16px;
|
|
99
|
-
position: absolute;
|
|
100
|
-
left: 760% !important;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
</style>
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="decimal">
|
|
3
|
-
<el-input-number
|
|
4
|
-
:disabled="JSON.parse(disabled)"
|
|
5
|
-
:min="minLimit ? 0 : -Infinity"
|
|
6
|
-
:controls="false"
|
|
7
|
-
:placeholder="placeholder"
|
|
8
|
-
:precision="Number(percision)"
|
|
9
|
-
:value="value"
|
|
10
|
-
@change="handleInput"
|
|
11
|
-
v-on="$listeners"
|
|
12
|
-
/>
|
|
13
|
-
<!-- <i v-if="disabled" class="el-icon-lock" /> -->
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
components: {
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
value: {
|
|
23
|
-
type: [Object, Number, String],
|
|
24
|
-
default: undefined
|
|
25
|
-
},
|
|
26
|
-
percision: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: '2'
|
|
29
|
-
},
|
|
30
|
-
placeholder: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: ''
|
|
33
|
-
},
|
|
34
|
-
disabled: {
|
|
35
|
-
type: [Boolean, Object, String],
|
|
36
|
-
default: null
|
|
37
|
-
},
|
|
38
|
-
defaultValue: {
|
|
39
|
-
type: [String, Object],
|
|
40
|
-
default: null
|
|
41
|
-
},
|
|
42
|
-
minLimit: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: true
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
data () {
|
|
48
|
-
return {
|
|
49
|
-
// refName: Math.random().toString().slice(3, 9),
|
|
50
|
-
// inputWidth: '0'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
watch: {
|
|
54
|
-
value: {
|
|
55
|
-
handler (newVal) {
|
|
56
|
-
if (newVal === '') {
|
|
57
|
-
this.handleInput(undefined)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
created () {
|
|
63
|
-
if (this.defaultValue) {
|
|
64
|
-
return this.$emit('input', this.defaultValue)
|
|
65
|
-
}
|
|
66
|
-
if (this.value) {
|
|
67
|
-
return this.$emit('input', this.value)
|
|
68
|
-
}
|
|
69
|
-
this.$emit('input', undefined)
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
// mounted () {
|
|
73
|
-
// this.inputWidth = this.$refs[this.refName].$children[0].$el.clientWidth + 'px'
|
|
74
|
-
// },
|
|
75
|
-
|
|
76
|
-
methods: {
|
|
77
|
-
handleInput (value) {
|
|
78
|
-
this.$emit('input', value)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<style lang="less" scoped>
|
|
86
|
-
@import '../assets/common-input.less';
|
|
87
|
-
.decimal{
|
|
88
|
-
width: 100%;
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
position: relative;
|
|
92
|
-
::v-deep .el-input{
|
|
93
|
-
height: 100%;
|
|
94
|
-
//margin-top: -0.55vh;
|
|
95
|
-
}
|
|
96
|
-
::v-deep .el-input-number{
|
|
97
|
-
width: 100%;
|
|
98
|
-
}
|
|
99
|
-
::v-deep .el-input__inner{
|
|
100
|
-
width: 100%;
|
|
101
|
-
border: none;
|
|
102
|
-
border-bottom: 1px solid #DCDCDC;
|
|
103
|
-
border-radius: 0;
|
|
104
|
-
text-align: left;
|
|
105
|
-
}
|
|
106
|
-
// .el-icon-lock{
|
|
107
|
-
// position: absolute;
|
|
108
|
-
// left: calc(var(--inputWidth) - 25px);
|
|
109
|
-
// }
|
|
110
|
-
// .el-icon-lock::before{
|
|
111
|
-
// color: #C0C4CC;
|
|
112
|
-
// font-size: 14px;
|
|
113
|
-
// }
|
|
114
|
-
}
|
|
115
|
-
</style>
|