imeik-imui 1.1.0 → 1.1.2
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 +4 -4
- package/src/imui/AffixedTable.js +135 -0
- package/src/imui/FieldComponents/index.js +11 -0
- package/src/imui/FieldComponents/readme.md +5 -0
- package/src/imui/FieldComponents/src/FieldAddressInfo/RegionCascader.vue +99 -0
- package/src/imui/FieldComponents/src/FieldAddressInfo/index.vue +463 -0
- package/src/imui/FieldComponents/src/FieldCardHeader/index.vue +34 -0
- package/src/imui/FieldComponents/src/FieldCitySelect/index.vue +221 -0
- package/src/imui/FieldComponents/src/FieldCustomerSelect/components/CustomerSelect.vue +165 -0
- package/src/imui/FieldComponents/src/FieldCustomerSelect/components/EnumShow.vue +63 -0
- package/src/imui/FieldComponents/src/FieldCustomerSelect/components/debounce.js +44 -0
- package/src/imui/FieldComponents/src/FieldCustomerSelect/index.vue +135 -0
- package/src/imui/FieldComponents/src/FieldDateSelect/index.vue +204 -0
- package/src/imui/FieldComponents/src/FieldDepartmentSelect/index.vue +343 -0
- package/src/imui/FieldComponents/src/FieldEmployeeSelect/index.vue +262 -0
- package/src/imui/FieldComponents/src/FieldEmpty/index.vue +21 -0
- package/src/imui/FieldComponents/src/FieldEnumSelect/index.vue +101 -0
- package/src/imui/FieldComponents/src/FieldInput/index.vue +146 -0
- package/src/imui/FieldComponents/src/FieldMeetingSelect/components/MeetingSelect.vue +155 -0
- package/src/imui/FieldComponents/src/FieldMeetingSelect/index.vue +126 -0
- package/src/imui/FieldComponents/src/FieldSelect/index.vue +141 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/Show/EnumShow.vue +64 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/Show/ImageShow.vue +90 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/SupplyManagementList.vue +449 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/SupplySelectDialog.vue +385 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/index.vue +228 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/list/CombinationSupplyInfo.vue +47 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/list/ErpCount.vue +146 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/list/GroupBrandAllParams.vue +114 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/list/SupplyBrandSelect.vue +108 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/list/SupplyName.vue +62 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/list/SupplyStatus.vue +26 -0
- package/src/imui/FieldComponents/src/FieldSupplySelect/utils.js +33 -0
- package/src/imui/FieldComponents/src/FieldTagComponent/index.vue +110 -0
- package/src/imui/FieldComponents/src/FieldTextarea/index.vue +100 -0
- package/src/imui/FieldComponents/utils.js +192 -0
- package/src/imui/FieldConfigurate/FieldConfigs.vue +573 -0
- package/src/imui/FieldConfigurate/common.js +207 -0
- package/src/imui/FieldConfigurate/readme.md +1 -0
- package/src/imui/FieldConfigurate/widgets/DefaultSetting.vue +138 -0
- package/src/imui/FieldConfigurate/widgets/OptionsSetting.vue +251 -0
- package/src/imui/FieldConfigurate/widgets/RadioSelect.vue +89 -0
- package/src/imui/FieldConfigurate/widgets/TagCodeSelect.vue +64 -0
- package/src/imui/FormConfigPage/components/ConfigHeader.vue +133 -0
- package/src/imui/FormConfigPage/components/ViewConfigDialog.vue +128 -0
- package/src/imui/FormConfigPage/index.vue +152 -0
- package/src/imui/FormConfiguration/FieldListToDrag.vue +198 -0
- package/src/imui/FormConfiguration/FormRender.vue +193 -0
- package/src/imui/FormConfiguration/field.js +300 -0
- package/src/imui/FormConfiguration/index.vue +278 -0
- package/src/imui/FormConfiguration/utils.js +18 -0
- package/src/imui/ImCard.vue +31 -0
- package/src/imui/ImDialog.vue +90 -0
- package/src/imui/ImDrawer.vue +96 -0
- package/src/imui/ImForm/FormComponents.vue +52 -0
- package/src/imui/ImForm/components/ImBr.vue +10 -0
- package/src/imui/ImForm/components/ImButton.vue +39 -0
- package/src/imui/ImForm/components/ImCascader.vue +113 -0
- package/src/imui/ImForm/components/ImColorPicker.vue +76 -0
- package/src/imui/ImForm/components/ImDatePicker.vue +109 -0
- package/src/imui/ImForm/components/ImEnumCheckboxGroup.vue +86 -0
- package/src/imui/ImForm/components/ImGroupSelect.vue +71 -0
- package/src/imui/ImForm/components/ImInput.vue +85 -0
- package/src/imui/ImForm/components/ImInputNumber.vue +70 -0
- package/src/imui/ImForm/components/ImNumberInput.vue +206 -0
- package/src/imui/ImForm/components/ImRadio.vue +60 -0
- package/src/imui/ImForm/components/ImSelect.vue +149 -0
- package/src/imui/ImForm/components/ImServerCascader.vue +223 -0
- package/src/imui/ImForm/components/ImServerSelect.vue +197 -0
- package/src/imui/ImForm/components/ImSlot.vue +21 -0
- package/src/imui/ImForm/components/ImTimePicker.vue +52 -0
- package/src/imui/ImForm/components/ImTree.vue +59 -0
- package/src/imui/ImForm/components/index.js +9 -0
- package/src/imui/ImForm/index.vue +448 -0
- package/src/imui/ImPagination.vue +78 -0
- package/src/imui/ImSearchArea.vue +108 -0
- package/src/imui/ImTable/components/ImTableColumn.vue +71 -0
- package/src/imui/ImTable/index.vue +262 -0
- package/src/imui/ImTableArea.vue +5 -0
- package/src/imui/ImTableCellWithBorder.vue +41 -0
- package/src/imui/ImWrapper.vue +20 -0
- package/src/imui/api/applycenter.js +19 -0
- package/src/imui/api/mms.js +59 -0
- package/src/imui/api/permission.js +13 -0
- package/src/imui/api/rulecenter.js +14 -0
- package/src/imui/api/user.js +112 -0
- package/src/imui/index.js +34 -0
- package/src/imui/utils/applycenterRequest.js +12 -0
- package/src/imui/utils/index.js +32 -0
- package/src/imui/utils/mmsRequest.js +12 -0
- package/src/imui/utils/permissionRequest.js +12 -0
- package/src/imui/utils/requestTemplate.js +48 -0
- package/src/imui/utils/rulecenterRequest.js +12 -0
- package/src/imui/utils/userRequest.js +12 -0
- package/dist/css/2.366b417b.css +0 -1
- package/dist/css/3.8406421c.css +0 -1
- package/dist/css/4.4ecc2520.css +0 -1
- package/dist/css/5.49962813.css +0 -1
- package/dist/css/fail.c6cef1a9.css +0 -1
- package/dist/demo.html +0 -10
- package/dist/imeik-imui.common.2.js +0 -387
- package/dist/imeik-imui.common.2.js.gz +0 -0
- package/dist/imeik-imui.common.3.js +0 -746
- package/dist/imeik-imui.common.3.js.gz +0 -0
- package/dist/imeik-imui.common.4.js +0 -201
- package/dist/imeik-imui.common.5.js +0 -92
- package/dist/imeik-imui.common.6.js +0 -218
- package/dist/imeik-imui.common.7.js +0 -141
- package/dist/imeik-imui.common.8.js +0 -257
- package/dist/imeik-imui.common.9.js +0 -102
- package/dist/imeik-imui.common.fail.js +0 -195
- package/dist/imeik-imui.common.fail.js.gz +0 -0
- package/dist/imeik-imui.common.js +0 -179327
- package/dist/imeik-imui.common.js.gz +0 -0
- package/dist/imeik-imui.css +0 -1
- package/dist/imeik-imui.css.gz +0 -0
- package/dist/imeik-imui.umd.2.js +0 -387
- package/dist/imeik-imui.umd.2.js.gz +0 -0
- package/dist/imeik-imui.umd.3.js +0 -746
- package/dist/imeik-imui.umd.3.js.gz +0 -0
- package/dist/imeik-imui.umd.4.js +0 -201
- package/dist/imeik-imui.umd.5.js +0 -92
- package/dist/imeik-imui.umd.6.js +0 -218
- package/dist/imeik-imui.umd.7.js +0 -141
- package/dist/imeik-imui.umd.8.js +0 -257
- package/dist/imeik-imui.umd.9.js +0 -102
- package/dist/imeik-imui.umd.fail.js +0 -195
- package/dist/imeik-imui.umd.fail.js.gz +0 -0
- package/dist/imeik-imui.umd.js +0 -179337
- package/dist/imeik-imui.umd.js.gz +0 -0
- package/dist/imeik-imui.umd.min.2.js +0 -1
- package/dist/imeik-imui.umd.min.3.js +0 -1
- package/dist/imeik-imui.umd.min.4.js +0 -1
- package/dist/imeik-imui.umd.min.5.js +0 -1
- package/dist/imeik-imui.umd.min.6.js +0 -1
- package/dist/imeik-imui.umd.min.7.js +0 -1
- package/dist/imeik-imui.umd.min.8.js +0 -1
- package/dist/imeik-imui.umd.min.9.js +0 -1
- package/dist/imeik-imui.umd.min.fail.js +0 -1
- package/dist/imeik-imui.umd.min.js +0 -101
- package/dist/imeik-imui.umd.min.js.gz +0 -0
- package/dist/img/403.f6b0bff1.png +0 -0
- package/dist/img/404.6f8b0c05.png +0 -0
- package/dist/img/home.3c5166d9.svg +0 -172
- package/dist/img/home.3c5166d9.svg.gz +0 -0
- package/dist/img/jsoneditor-icons.256e3abc.svg +0 -893
- package/dist/img/jsoneditor-icons.256e3abc.svg.gz +0 -0
- package/dist/img/logo2023.9a27179a.svg +0 -42
- package/dist/img/logo2023.9a27179a.svg.gz +0 -0
- package/dist/img/menu-icon-approval-current.2130b50f.png +0 -0
- package/dist/img/menu-icon-approval.562a6985.png +0 -0
- package/dist/img/menu-icon-employees-current.b19603be.png +0 -0
- package/dist/img/menu-icon-miniapp-current.163007db.png +0 -0
- package/dist/img/menu-icon-miniapp.d5ae6730.png +0 -0
- package/dist/img/menu-icon-system-current.7c9509ad.png +0 -0
- package/dist/img/user-avatar.8f143865.png +0 -0
- /package/{dist/img/img-holder.0dbc682e.png → src/imui/FieldComponents/src/FieldSupplySelect/Show/img-holder.png} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imeik-imui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"ch_name": "imeik UI 组件库 PC端",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vue-cli-service serve --mode dev",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
|
19
19
|
"build:imui": "vue-cli-service build --target lib --name imeik-imui ./src/imui/index.js"
|
|
20
20
|
},
|
|
21
|
-
"main": "./
|
|
21
|
+
"main": "./src/imui/index.js",
|
|
22
22
|
"files": [
|
|
23
|
-
"
|
|
23
|
+
"src/imui",
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
@@ -103,4 +103,4 @@
|
|
|
103
103
|
"git add"
|
|
104
104
|
]
|
|
105
105
|
}
|
|
106
|
-
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'AffixTable',
|
|
3
|
+
props: {
|
|
4
|
+
stickyTop: {
|
|
5
|
+
type: Number,
|
|
6
|
+
default: 0
|
|
7
|
+
},
|
|
8
|
+
selector: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: '.app-scrollbar-wrapper'
|
|
11
|
+
},
|
|
12
|
+
// 通过这个参数,可以让表格没有吸顶逻辑
|
|
13
|
+
noStick: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
scrollContainer: null,
|
|
21
|
+
scrollTop: 0,
|
|
22
|
+
$head: [],
|
|
23
|
+
$body: null,
|
|
24
|
+
ticking: false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
watch: {
|
|
28
|
+
// 修复table表格错位问题
|
|
29
|
+
'table.data': {
|
|
30
|
+
handler() {
|
|
31
|
+
this.$nextTick(() => {
|
|
32
|
+
this.$refs.tableRef.doLayout() // 对 Table 进行重新布局
|
|
33
|
+
})
|
|
34
|
+
},
|
|
35
|
+
deep: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
activated() {
|
|
39
|
+
if (this.noStick) {
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
// 如果页面用户keep-alive,列表需要定位到对应项
|
|
43
|
+
if (this.scrollContainer) {
|
|
44
|
+
this.scrollContainer.scrollTop = this.scrollTop || 0
|
|
45
|
+
this.scrollContainer.addEventListener('scroll', this.onScroll)
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
deactivated() {
|
|
49
|
+
if (this.noStick) {
|
|
50
|
+
return
|
|
51
|
+
}
|
|
52
|
+
this.scrollContainer?.removeEventListener('scroll', this.onScroll)
|
|
53
|
+
},
|
|
54
|
+
beforeDestroy() {
|
|
55
|
+
if (this.noStick) {
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
this.scrollContainer?.removeEventListener('scroll', this.onScroll)
|
|
59
|
+
},
|
|
60
|
+
mounted() {
|
|
61
|
+
if (this.noStick) {
|
|
62
|
+
return
|
|
63
|
+
}
|
|
64
|
+
this.scrollContainer = document.querySelector(this.selector)
|
|
65
|
+
this.$body = this.$el.querySelector('.el-table')
|
|
66
|
+
this.$nextTick(() => {
|
|
67
|
+
this.$head = this.$el.querySelectorAll(
|
|
68
|
+
'.el-table .el-table__header-wrapper,.el-table .el-table__fixed-header-wrapper'
|
|
69
|
+
)
|
|
70
|
+
this.setFixedStyle()
|
|
71
|
+
})
|
|
72
|
+
this.scrollContainer?.addEventListener('scroll', this.onScroll)
|
|
73
|
+
},
|
|
74
|
+
methods: {
|
|
75
|
+
setFixedStyle() {
|
|
76
|
+
for (let i = 0; i < this.$head.length; i++) {
|
|
77
|
+
const item = this.$head[i]
|
|
78
|
+
item.style.background = 'url(http://about:blank)'
|
|
79
|
+
item.style.backgroundAttachment = 'fixed'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
onScroll() {
|
|
83
|
+
this.scrollTop = this.scrollContainer.scrollTop
|
|
84
|
+
if (!this.ticking) {
|
|
85
|
+
window.requestAnimationFrame(() => {
|
|
86
|
+
const $head = this.$head || []
|
|
87
|
+
const bodyTop = this.$body.getBoundingClientRect().top
|
|
88
|
+
for (let i = 0; i < $head.length; i++) {
|
|
89
|
+
const item = $head[i]
|
|
90
|
+
if (bodyTop <= this.stickyTop) {
|
|
91
|
+
item.style.transform = `translate3d(0, ${
|
|
92
|
+
this.stickyTop - bodyTop
|
|
93
|
+
}px, 0)`
|
|
94
|
+
} else {
|
|
95
|
+
item.style.transform = 'translate3d(0, 0, 0)'
|
|
96
|
+
}
|
|
97
|
+
item.style.zIndex = 10
|
|
98
|
+
if (
|
|
99
|
+
item
|
|
100
|
+
.getAttribute('class')
|
|
101
|
+
.indexOf('el-table__fixed-header-wrapper') > -1
|
|
102
|
+
) {
|
|
103
|
+
item.style.position = 'absolute'
|
|
104
|
+
} else {
|
|
105
|
+
item.style.position = 'relative'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
this.ticking = false
|
|
109
|
+
})
|
|
110
|
+
this.ticking = true
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
getTableInstance() {
|
|
114
|
+
return this.$refs.tableRef
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
render() {
|
|
118
|
+
const props = { ...this.$attrs }
|
|
119
|
+
return (
|
|
120
|
+
<div>
|
|
121
|
+
<el-table
|
|
122
|
+
ref="tableRef"
|
|
123
|
+
style="background-color:white;"
|
|
124
|
+
props={props}
|
|
125
|
+
on={this.$listeners}
|
|
126
|
+
scopedSlots={this.$scopedSlots}
|
|
127
|
+
>
|
|
128
|
+
{Object.keys(this.$slots).map((name) => (
|
|
129
|
+
<template slot={name}>{this.$slots[name]}</template>
|
|
130
|
+
))}
|
|
131
|
+
</el-table>
|
|
132
|
+
</div>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const commonComponent = require.context('./src', true, /index.vue$/)
|
|
2
|
+
|
|
3
|
+
const defaultObj = {}
|
|
4
|
+
// 通用组件位置
|
|
5
|
+
commonComponent.keys().forEach((fileName) => {
|
|
6
|
+
const componentConfig = commonComponent(fileName)
|
|
7
|
+
const componentName = fileName.replace(/^.\/(.*)\/.*$/, '$1')
|
|
8
|
+
defaultObj[componentName] = componentConfig.default || componentConfig
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export default defaultObj
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-cascader ref="cascaderRef" v-model="myValue" :props="props" :options="options" :placeholder="placeholder" clearable filterable v-bind="$attrs" @change="handleChange"></el-cascader>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { getRegionData } from '../../../api/user'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'RegionCascader',
|
|
10
|
+
props: {
|
|
11
|
+
value: {
|
|
12
|
+
type: [String, Array],
|
|
13
|
+
default: undefined
|
|
14
|
+
},
|
|
15
|
+
placeholder: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: '请选择'
|
|
18
|
+
},
|
|
19
|
+
level: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: undefined
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default() {
|
|
26
|
+
return {
|
|
27
|
+
label: 'name',
|
|
28
|
+
value: 'numberCode',
|
|
29
|
+
children: 'subRegin',
|
|
30
|
+
expandTrigger: 'hover',
|
|
31
|
+
// checkStrictly: true,
|
|
32
|
+
emitPath: false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
myValue: undefined,
|
|
40
|
+
options: []
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
value: {
|
|
45
|
+
immediate: true,
|
|
46
|
+
handler() {
|
|
47
|
+
this.setMyValue()
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
created() {
|
|
52
|
+
this.getOptions()
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
setMyValue() {
|
|
56
|
+
try {
|
|
57
|
+
this.myValue = JSON.parse(JSON.stringify(this.value))
|
|
58
|
+
} catch (error) {
|
|
59
|
+
this.myValue = undefined
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
getOptions() {
|
|
64
|
+
getRegionData({}).then((res) => {
|
|
65
|
+
if (res.code === 200) {
|
|
66
|
+
this.options = res.data || []
|
|
67
|
+
this.formatData(this.options)
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
formatData(regionData) {
|
|
73
|
+
for (let i = 0; i < regionData.length; i++) {
|
|
74
|
+
const item = regionData[i]
|
|
75
|
+
if (this.level && this.level === item.level) {
|
|
76
|
+
delete item.subRegin
|
|
77
|
+
continue
|
|
78
|
+
}
|
|
79
|
+
if (item.subRegin && item.subRegin.length === 0) {
|
|
80
|
+
delete item.subRegin
|
|
81
|
+
}
|
|
82
|
+
if (item.subRegin && item.subRegin.length > 0) {
|
|
83
|
+
this.formatData(item.subRegin)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
handleChange() {
|
|
89
|
+
let pathNodes = []
|
|
90
|
+
const checkedNodes = this.$refs.cascaderRef.getCheckedNodes()
|
|
91
|
+
if (checkedNodes && checkedNodes.length > 0) {
|
|
92
|
+
pathNodes = checkedNodes[0].pathNodes
|
|
93
|
+
}
|
|
94
|
+
this.$emit('input', this.myValue, pathNodes)
|
|
95
|
+
this.$emit('change', this.myValue, pathNodes)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</script>
|