resolver-egretimp-plus 0.1.119 → 0.1.121
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/dist/h5/index.js +18 -18
- package/dist/web/index.js +11 -11
- package/package.json +1 -1
- package/src/components/options/OptionsDefault.vue +0 -1
- package/src/components/packages-web/CustomComponentCycle.vue +38 -33
- package/src/components/packages-web/CustomComponentCycleTabPane.vue +40 -33
- package/src/components/packages-web/CustomComponentPlain.vue +6 -5
- package/src/components/packages-web/CustomComponentTable.jsx +48 -40
- package/src/components/packages-web/ElInput copy.jsx +0 -1
- package/src/components/packages-web/ElInput.jsx +0 -1
- package/src/config.js +2 -0
- package/src/hooks/pageConfig.js +10 -4
- package/src/index.jsx +15 -10
- package/src/renderer.jsx +4 -1
- package/src/resolver-common.vue +22 -2
- package/src/rules/rulesDriver.js +4 -0
- package/src/utils/common.js +13 -0
- package/src/utils/render.jsx +196 -96
- package/src-bak/analysisComponent.jsx +0 -343
- package/src-bak/api/builtIn.js +0 -10
- package/src-bak/bpm/bpmInstance.js +0 -388
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/application.js +0 -8
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/component.js +0 -97
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/datasource.js +0 -88
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/index.js +0 -3
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/UdcComponent.js +0 -76
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/index.js +0 -201
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/index.js +0 -69
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/page.js +0 -56
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/utils.js +0 -76
- package/src-bak/bpm/udc-sdk-esm/cjs/index.js +0 -46
- package/src-bak/bpm/udc-sdk-esm/cjs/utils.js +0 -21
- package/src-bak/components/childDialog/index.js +0 -39
- package/src-bak/components/childDialog/src/index.vue +0 -185
- package/src-bak/components/cmiFormItem/index.js +0 -1
- package/src-bak/components/cmiFormItem/src/index.vue +0 -112
- package/src-bak/components/confirmInstance-H5/index.js +0 -53
- package/src-bak/components/confirmInstance-H5/src/index.vue +0 -54
- package/src-bak/components/helper/FormPolyfill.jsx +0 -25
- package/src-bak/components/helper/calcTooltip.jsx +0 -134
- package/src-bak/components/helper/dock.js +0 -141
- package/src-bak/components/helper/eventOrchestration.js +0 -763
- package/src-bak/components/helper/resolver.js +0 -163
- package/src-bak/components/helper/table.jsx +0 -103
- package/src-bak/components/icons/date.vue +0 -33
- package/src-bak/components/icons/info.vue +0 -62
- package/src-bak/components/icons/loading.vue +0 -19
- package/src-bak/components/icons/question-filled.vue +0 -8
- package/src-bak/components/loading/index.js +0 -6
- package/src-bak/components/loading/loading.js +0 -98
- package/src-bak/components/loading/loading.scss +0 -74
- package/src-bak/components/loading/loading.vue +0 -89
- package/src-bak/components/loadingComponent/LoadingComponent.vue +0 -33
- package/src-bak/components/modal/index.js +0 -9
- package/src-bak/components/modal/modal.scss +0 -195
- package/src-bak/components/modal/modal.vue +0 -201
- package/src-bak/components/options/OptionsDefault.vue +0 -47
- package/src-bak/components/packages-H5/CmiButton.vue +0 -120
- package/src-bak/components/packages-H5/CmiCalendar.vue +0 -152
- package/src-bak/components/packages-H5/CmiCell.vue +0 -87
- package/src-bak/components/packages-H5/CmiCheckbox.vue +0 -82
- package/src-bak/components/packages-H5/CmiDatetimePicker.vue +0 -98
- package/src-bak/components/packages-H5/CmiDivider.vue +0 -30
- package/src-bak/components/packages-H5/CmiDropdownMenu.vue +0 -58
- package/src-bak/components/packages-H5/CmiInput.vue +0 -69
- package/src-bak/components/packages-H5/CmiLink.vue +0 -28
- package/src-bak/components/packages-H5/CmiPicker.vue +0 -229
- package/src-bak/components/packages-H5/CmiRadio.vue +0 -29
- package/src-bak/components/packages-H5/CmiSearch.vue +0 -39
- package/src-bak/components/packages-H5/CmiSelect.vue +0 -84
- package/src-bak/components/packages-H5/CustomComponentCardH5.vue +0 -129
- package/src-bak/components/packages-H5/CustomComponentColH5.vue +0 -8
- package/src-bak/components/packages-H5/CustomComponentCollapseH5.vue +0 -141
- package/src-bak/components/packages-H5/CustomComponentFormLayoutH5.vue +0 -54
- package/src-bak/components/packages-H5/CustomComponentTabPaneH5.vue +0 -38
- package/src-bak/components/packages-H5/CustomComponentTableH5.vue +0 -352
- package/src-bak/components/packages-H5/CustomComponentTabsH5.vue +0 -170
- package/src-bak/components/packages-web/CustomComponentCard.vue +0 -40
- package/src-bak/components/packages-web/CustomComponentCol.vue +0 -66
- package/src-bak/components/packages-web/CustomComponentCollapse.vue +0 -164
- package/src-bak/components/packages-web/CustomComponentCycle.vue +0 -95
- package/src-bak/components/packages-web/CustomComponentCycleTabPane.vue +0 -155
- package/src-bak/components/packages-web/CustomComponentDialog.vue +0 -192
- package/src-bak/components/packages-web/CustomComponentEditor.vue +0 -50
- package/src-bak/components/packages-web/CustomComponentFileExport.vue +0 -60
- package/src-bak/components/packages-web/CustomComponentFileImport.vue +0 -60
- package/src-bak/components/packages-web/CustomComponentFormLayout.vue +0 -65
- package/src-bak/components/packages-web/CustomComponentGrid.vue +0 -29
- package/src-bak/components/packages-web/CustomComponentGridCol.vue +0 -29
- package/src-bak/components/packages-web/CustomComponentInputDialog.vue +0 -144
- package/src-bak/components/packages-web/CustomComponentNativeTabPane.vue +0 -84
- package/src-bak/components/packages-web/CustomComponentPlain.vue +0 -247
- package/src-bak/components/packages-web/CustomComponentRow.vue +0 -83
- package/src-bak/components/packages-web/CustomComponentSelectEmployees.vue +0 -203
- package/src-bak/components/packages-web/CustomComponentSendMail.vue +0 -62
- package/src-bak/components/packages-web/CustomComponentSteps.vue +0 -41
- package/src-bak/components/packages-web/CustomComponentTabPane.vue +0 -20
- package/src-bak/components/packages-web/CustomComponentTable.jsx +0 -814
- package/src-bak/components/packages-web/CustomComponentTabs.vue +0 -126
- package/src-bak/components/packages-web/CustomComponentTree.vue +0 -28
- package/src-bak/components/packages-web/ElButton.vue +0 -146
- package/src-bak/components/packages-web/ElCheckbox.vue +0 -97
- package/src-bak/components/packages-web/ElDatePicker.vue +0 -93
- package/src-bak/components/packages-web/ElInput copy.jsx +0 -393
- package/src-bak/components/packages-web/ElInput.jsx +0 -312
- package/src-bak/components/packages-web/ElInputNumber.vue +0 -81
- package/src-bak/components/packages-web/ElPagination.vue +0 -61
- package/src-bak/components/packages-web/ElRadio.vue +0 -47
- package/src-bak/components/packages-web/ElSelect.jsx +0 -249
- package/src-bak/components/packages-web/ElSelect_bak.vue +0 -155
- package/src-bak/components/packages-web/ElText.jsx +0 -187
- package/src-bak/components/packages-web/ElTextaa.vue +0 -169
- package/src-bak/components/packages-web/ElTimePicker.vue +0 -39
- package/src-bak/components/patchComponents-H5.js +0 -46
- package/src-bak/components/patchComponents-web.js +0 -46
- package/src-bak/components/simpleFormItemPc/index.js +0 -1
- package/src-bak/components/simpleFormItemPc/src/index.vue +0 -94
- package/src-bak/components/table/index.ts +0 -29
- package/src-bak/components/table/src/composables/use-scrollbar.ts +0 -30
- package/src-bak/components/table/src/config.ts +0 -256
- package/src-bak/components/table/src/filter-panel.vue +0 -260
- package/src-bak/components/table/src/h-helper.ts +0 -34
- package/src-bak/components/table/src/layout-observer.ts +0 -78
- package/src-bak/components/table/src/store/current.ts +0 -85
- package/src-bak/components/table/src/store/expand.ts +0 -76
- package/src-bak/components/table/src/store/helper.ts +0 -74
- package/src-bak/components/table/src/store/index.ts +0 -246
- package/src-bak/components/table/src/store/tree.ts +0 -230
- package/src-bak/components/table/src/store/watcher.ts +0 -543
- package/src-bak/components/table/src/table/defaults.ts +0 -402
- package/src-bak/components/table/src/table/key-render-helper.ts +0 -27
- package/src-bak/components/table/src/table/style-helper.ts +0 -378
- package/src-bak/components/table/src/table/utils-helper.ts +0 -47
- package/src-bak/components/table/src/table-body/defaults.ts +0 -52
- package/src-bak/components/table/src/table-body/events-helper.ts +0 -203
- package/src-bak/components/table/src/table-body/index.ts +0 -119
- package/src-bak/components/table/src/table-body/render-helper.ts +0 -283
- package/src-bak/components/table/src/table-body/styles-helper.ts +0 -164
- package/src-bak/components/table/src/table-column/defaults.ts +0 -237
- package/src-bak/components/table/src/table-column/index.ts +0 -202
- package/src-bak/components/table/src/table-column/render-helper.ts +0 -214
- package/src-bak/components/table/src/table-column/watcher-helper.ts +0 -88
- package/src-bak/components/table/src/table-footer/index.ts +0 -128
- package/src-bak/components/table/src/table-footer/mapState-helper.ts +0 -33
- package/src-bak/components/table/src/table-footer/style-helper.ts +0 -51
- package/src-bak/components/table/src/table-header/event-helper.ts +0 -213
- package/src-bak/components/table/src/table-header/index.ts +0 -244
- package/src-bak/components/table/src/table-header/style.helper.ts +0 -119
- package/src-bak/components/table/src/table-header/utils-helper.ts +0 -94
- package/src-bak/components/table/src/table-layout.ts +0 -259
- package/src-bak/components/table/src/table.vue +0 -389
- package/src-bak/components/table/src/tableColumn.ts +0 -3
- package/src-bak/components/table/src/tokens.ts +0 -5
- package/src-bak/components/table/src/util.ts +0 -521
- package/src-bak/components/table/style/css.ts +0 -5
- package/src-bak/components/table/style/index.ts +0 -5
- package/src-bak/components/tabs/index.js +0 -8
- package/src-bak/components/tabs/src/constants.js +0 -23
- package/src-bak/components/tabs/src/tab-bar.js +0 -8
- package/src-bak/components/tabs/src/tab-bar.vue +0 -92
- package/src-bak/components/tabs/src/tab-nav.jsx +0 -424
- package/src-bak/components/tabs/src/tab-pane.js +0 -16
- package/src-bak/components/tabs/src/tab-pane.vue +0 -80
- package/src-bak/components/tabs/src/tabs.jsx +0 -223
- package/src-bak/components/tabs/style/css.js +0 -2
- package/src-bak/components/tabs/style/index.js +0 -2
- package/src-bak/components/thirdPartyFrame/index.js +0 -32
- package/src-bak/components/thirdPartyFrame/src/ThirdPartyFrame.vue +0 -125
- package/src-bak/enums/index.js +0 -16
- package/src-bak/hooks/configLoad.js +0 -45
- package/src-bak/hooks/index.js +0 -189
- package/src-bak/hooks/mock.js +0 -6960
- package/src-bak/hooks/pageConfig.js +0 -127
- package/src-bak/index.jsx +0 -443
- package/src-bak/renderer.jsx +0 -77
- package/src-bak/resolver-H5.vue +0 -88
- package/src-bak/resolver-common.vue +0 -129
- package/src-bak/resolver-web.vue +0 -91
- package/src-bak/rules/eventsSupplement.js +0 -573
- package/src-bak/rules/parseCondition.js +0 -378
- package/src-bak/rules/ruleUtils.js +0 -273
- package/src-bak/rules/rulesDriver.js +0 -139
- package/src-bak/rulesImp/events.js +0 -588
- package/src-bak/rulesImp/index.js +0 -33
- package/src-bak/rulesImp/ruleInstance.js +0 -231
- package/src-bak/rulesImp/ruleUtils.js +0 -124
- package/src-bak/theme/element/components/button.scss +0 -122
- package/src-bak/theme/element/components/card.scss +0 -8
- package/src-bak/theme/element/components/checkbox.scss +0 -19
- package/src-bak/theme/element/components/collapse.scss +0 -174
- package/src-bak/theme/element/components/common.scss +0 -30
- package/src-bak/theme/element/components/cycle.scss +0 -0
- package/src-bak/theme/element/components/date.scss +0 -13
- package/src-bak/theme/element/components/dialog.scss +0 -44
- package/src-bak/theme/element/components/form.scss +0 -104
- package/src-bak/theme/element/components/index.scss +0 -55
- package/src-bak/theme/element/components/input.scss +0 -36
- package/src-bak/theme/element/components/message.scss +0 -48
- package/src-bak/theme/element/components/pagination.scss +0 -47
- package/src-bak/theme/element/components/popper.scss +0 -3
- package/src-bak/theme/element/components/radio.scss +0 -40
- package/src-bak/theme/element/components/scrollbar.scss +0 -14
- package/src-bak/theme/element/components/select.scss +0 -82
- package/src-bak/theme/element/components/steps.scss +0 -6
- package/src-bak/theme/element/components/table.scss +0 -218
- package/src-bak/theme/element/components/tabs.scss +0 -128
- package/src-bak/theme/element/components/tag.scss +0 -6
- package/src-bak/theme/element/components/text.scss +0 -20
- package/src-bak/theme/element/components/textarea.scss +0 -3
- package/src-bak/theme/element/components/tree.scss +0 -0
- package/src-bak/theme/element/index.scss +0 -55
- package/src-bak/utils/cipher.js +0 -141
- package/src-bak/utils/common.js +0 -664
- package/src-bak/utils/const.js +0 -259
- package/src-bak/utils/defaultVal.js +0 -92
- package/src-bak/utils/dom.js +0 -36
- package/src-bak/utils/format.js +0 -19
- package/src-bak/utils/index.js +0 -4
- package/src-bak/utils/is.js +0 -74
- package/src-bak/utils/loadModule.js +0 -75
- package/src-bak/utils/preserveFunc.js +0 -33
- package/src-bak/utils/render.jsx +0 -1138
- package/src-bak/utils/request.js +0 -136
- package/src-bak/utils/respone.js +0 -70
- package/src-bak/utils/valid.js +0 -89
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineComponent,
|
|
3
|
-
getCurrentInstance,
|
|
4
|
-
nextTick,
|
|
5
|
-
provide,
|
|
6
|
-
ref,
|
|
7
|
-
renderSlot,
|
|
8
|
-
watch,
|
|
9
|
-
} from 'vue'
|
|
10
|
-
import {
|
|
11
|
-
buildProps,
|
|
12
|
-
definePropType,
|
|
13
|
-
isNumber,
|
|
14
|
-
isString,
|
|
15
|
-
isUndefined,
|
|
16
|
-
} from 'element-plus/es/utils/index.mjs'
|
|
17
|
-
import { EVENT_CODE, UPDATE_MODEL_EVENT } from 'element-plus/es/constants/index.mjs'
|
|
18
|
-
import ElIcon from 'element-plus/es/components/icon/index.mjs'
|
|
19
|
-
import { Plus } from '@element-plus/icons-vue'
|
|
20
|
-
import { useNamespace, useOrderedChildren } from 'element-plus/es/hooks/index.mjs'
|
|
21
|
-
import { tabsRootContextKey } from './constants.js'
|
|
22
|
-
import TabNav from './tab-nav'
|
|
23
|
-
|
|
24
|
-
// import type { TabNavInstance } from './tab-nav'
|
|
25
|
-
// import type { TabsPaneContext } from './constants'
|
|
26
|
-
// import type { ExtractPropTypes } from 'vue'
|
|
27
|
-
// import type { Awaitable } from '@element-plus/utils'
|
|
28
|
-
|
|
29
|
-
// export type TabPaneName = string | number
|
|
30
|
-
|
|
31
|
-
export const tabsProps = buildProps({
|
|
32
|
-
type: {
|
|
33
|
-
type: String,
|
|
34
|
-
values: ['card', 'border-card', ''],
|
|
35
|
-
default: '',
|
|
36
|
-
},
|
|
37
|
-
closable: Boolean,
|
|
38
|
-
addable: Boolean,
|
|
39
|
-
modelValue: {
|
|
40
|
-
type: [String, Number],
|
|
41
|
-
},
|
|
42
|
-
editable: Boolean,
|
|
43
|
-
tabPosition: {
|
|
44
|
-
type: String,
|
|
45
|
-
values: ['top', 'right', 'bottom', 'left'],
|
|
46
|
-
default: 'top',
|
|
47
|
-
},
|
|
48
|
-
beforeLeave: {
|
|
49
|
-
type: Function,
|
|
50
|
-
default: () => true,
|
|
51
|
-
},
|
|
52
|
-
showBar: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: true
|
|
55
|
-
},
|
|
56
|
-
stretch: Boolean,
|
|
57
|
-
})
|
|
58
|
-
// export type TabsProps = ExtractPropTypes<typeof tabsProps>
|
|
59
|
-
|
|
60
|
-
const isPaneName = (value) =>
|
|
61
|
-
isString(value) || isNumber(value)
|
|
62
|
-
|
|
63
|
-
export const tabsEmits = {
|
|
64
|
-
[UPDATE_MODEL_EVENT]: (name) => isPaneName(name),
|
|
65
|
-
tabClick: (pane, ev) => ev instanceof Event,
|
|
66
|
-
tabChange: (name) => isPaneName(name),
|
|
67
|
-
edit: (paneName, action) =>
|
|
68
|
-
['remove', 'add'].includes(action),
|
|
69
|
-
tabRemove: (name) => isPaneName(name),
|
|
70
|
-
tabAdd: () => true,
|
|
71
|
-
}
|
|
72
|
-
// export type TabsEmits = typeof tabsEmits
|
|
73
|
-
|
|
74
|
-
// export type TabsPanes = Record<number, TabsPaneContext>
|
|
75
|
-
|
|
76
|
-
const Tabs = defineComponent({
|
|
77
|
-
name: 'ElTabs',
|
|
78
|
-
|
|
79
|
-
props: tabsProps,
|
|
80
|
-
emits: tabsEmits,
|
|
81
|
-
|
|
82
|
-
setup(props, { emit, slots, expose }) {
|
|
83
|
-
const ns = useNamespace('tabs')
|
|
84
|
-
|
|
85
|
-
const {
|
|
86
|
-
children: panes,
|
|
87
|
-
addChild: registerPane,
|
|
88
|
-
removeChild: unregisterPane,
|
|
89
|
-
} = useOrderedChildren(getCurrentInstance(), 'ElTabPane')
|
|
90
|
-
|
|
91
|
-
const nav$ = ref({})
|
|
92
|
-
const currentName = ref(props.modelValue ?? '0')
|
|
93
|
-
|
|
94
|
-
const setCurrentName = async (value, trigger = false) => {
|
|
95
|
-
// should do nothing.
|
|
96
|
-
if (currentName.value === value || isUndefined(value)) return
|
|
97
|
-
|
|
98
|
-
try {
|
|
99
|
-
const canLeave = await props.beforeLeave?.(value, currentName.value)
|
|
100
|
-
if (canLeave !== false) {
|
|
101
|
-
currentName.value = value
|
|
102
|
-
if (trigger) {
|
|
103
|
-
emit(UPDATE_MODEL_EVENT, value)
|
|
104
|
-
emit('tabChange', value)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
nav$.value?.removeFocus?.()
|
|
108
|
-
}
|
|
109
|
-
} catch {}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const handleTabClick = (
|
|
113
|
-
tab,
|
|
114
|
-
tabName,
|
|
115
|
-
event
|
|
116
|
-
) => {
|
|
117
|
-
if (tab.props.disabled) return
|
|
118
|
-
setCurrentName(tabName, true)
|
|
119
|
-
emit('tabClick', tab, event)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const handleTabRemove = (pane, ev) => {
|
|
123
|
-
if (pane.props.disabled || isUndefined(pane.props.name)) return
|
|
124
|
-
ev.stopPropagation()
|
|
125
|
-
emit('edit', pane.props.name, 'remove')
|
|
126
|
-
emit('tabRemove', pane.props.name)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const handleTabAdd = () => {
|
|
130
|
-
emit('edit', undefined, 'add')
|
|
131
|
-
emit('tabAdd')
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
watch(
|
|
135
|
-
() => props.modelValue,
|
|
136
|
-
(modelValue) => setCurrentName(modelValue)
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
watch(currentName, async () => {
|
|
140
|
-
await nextTick()
|
|
141
|
-
nav$.value?.scrollToActiveTab()
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
provide(tabsRootContextKey, {
|
|
145
|
-
props,
|
|
146
|
-
currentName,
|
|
147
|
-
registerPane,
|
|
148
|
-
unregisterPane,
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
expose({
|
|
152
|
-
currentName,
|
|
153
|
-
})
|
|
154
|
-
|
|
155
|
-
return () => {
|
|
156
|
-
const addSlot = slots['add-icon']
|
|
157
|
-
const newButton =
|
|
158
|
-
props.editable || props.addable ? (
|
|
159
|
-
<span
|
|
160
|
-
class={ns.e('new-tab')}
|
|
161
|
-
tabindex="0"
|
|
162
|
-
onClick={handleTabAdd}
|
|
163
|
-
onKeydown={(ev) => {
|
|
164
|
-
if (ev.code === EVENT_CODE.enter) handleTabAdd()
|
|
165
|
-
}}
|
|
166
|
-
>
|
|
167
|
-
{addSlot ? (
|
|
168
|
-
renderSlot(slots, 'add-icon')
|
|
169
|
-
) : (
|
|
170
|
-
<ElIcon class={ns.is('icon-plus')}>
|
|
171
|
-
<Plus />
|
|
172
|
-
</ElIcon>
|
|
173
|
-
)}
|
|
174
|
-
</span>
|
|
175
|
-
) : null
|
|
176
|
-
|
|
177
|
-
const header = (
|
|
178
|
-
<div class={[ns.e('header'), ns.is(props.tabPosition)]}>
|
|
179
|
-
{newButton}
|
|
180
|
-
<TabNav
|
|
181
|
-
ref={nav$}
|
|
182
|
-
currentName={currentName.value}
|
|
183
|
-
editable={props.editable}
|
|
184
|
-
showBar={props.showBar}
|
|
185
|
-
type={props.type}
|
|
186
|
-
panes={panes.value}
|
|
187
|
-
stretch={props.stretch}
|
|
188
|
-
onTabClick={handleTabClick}
|
|
189
|
-
onTabRemove={handleTabRemove}
|
|
190
|
-
/>
|
|
191
|
-
</div>
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
const panels = (
|
|
195
|
-
<div class={ns.e('content')}>{renderSlot(slots, 'default')}</div>
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
return (
|
|
199
|
-
<div
|
|
200
|
-
class={[
|
|
201
|
-
'resolver-tabs',
|
|
202
|
-
ns.b(),
|
|
203
|
-
ns.m(props.tabPosition),
|
|
204
|
-
{
|
|
205
|
-
[ns.m('card')]: props.type === 'card',
|
|
206
|
-
[ns.m('border-card')]: props.type === 'border-card',
|
|
207
|
-
},
|
|
208
|
-
]}
|
|
209
|
-
>
|
|
210
|
-
{...props.tabPosition !== 'bottom'
|
|
211
|
-
? [panels, header]
|
|
212
|
-
: [header, panels]}
|
|
213
|
-
</div>
|
|
214
|
-
)
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
})
|
|
218
|
-
|
|
219
|
-
// export type TabsInstance = InstanceType<typeof Tabs> & {
|
|
220
|
-
// currentName: TabPaneName
|
|
221
|
-
// }
|
|
222
|
-
|
|
223
|
-
export default Tabs
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import ThirdPartyFrame from './src/ThirdPartyFrame.vue'
|
|
2
|
-
import { createVNode, render } from 'vue'
|
|
3
|
-
|
|
4
|
-
let instance = null
|
|
5
|
-
|
|
6
|
-
export default function (options = {}) {
|
|
7
|
-
if (instance) {
|
|
8
|
-
Object.keys(options).forEach(key => {
|
|
9
|
-
instance.props[key] = options[key]
|
|
10
|
-
|
|
11
|
-
instance.vm.exposed.dialogVisible.value = true
|
|
12
|
-
})
|
|
13
|
-
return instance.close
|
|
14
|
-
}
|
|
15
|
-
const container = document.createElement('div')
|
|
16
|
-
const vnode = createVNode(ThirdPartyFrame, {
|
|
17
|
-
...options,
|
|
18
|
-
})
|
|
19
|
-
render(vnode, container)
|
|
20
|
-
document.body.appendChild(container.firstElementChild)
|
|
21
|
-
|
|
22
|
-
instance = {
|
|
23
|
-
vnode,
|
|
24
|
-
vm: vnode.component,
|
|
25
|
-
props: vnode.component?.props,
|
|
26
|
-
close: () => {
|
|
27
|
-
vnode.component.exposed.dialogVisible.value = false
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
vnode.component.exposed.dialogVisible.value = true
|
|
31
|
-
return instance.close
|
|
32
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ElDialog class="third-party-frame custom-component-dialog" width="90%" v-model="dialogVisible" :close-on-click-modal="false">
|
|
3
|
-
<div class="header" v-if="!!props.title">
|
|
4
|
-
<span>{{ props.title }}</span>
|
|
5
|
-
</div>
|
|
6
|
-
<!-- :style="{marginTop: !!props.title ? 0 : '16px'}" -->
|
|
7
|
-
<iframe ref="iframeRef" class="iframe-box" :src="dialogVisible ? props.src : ''"></iframe>
|
|
8
|
-
<div class="footer">
|
|
9
|
-
<div class="dialog-footer">
|
|
10
|
-
<ElButton @click="dialogVisible = false" v-if="showClose">
|
|
11
|
-
{{lang.indexOf('zh') > -1 ? '关闭' : 'Close'}}
|
|
12
|
-
</ElButton>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</ElDialog>
|
|
16
|
-
</template>
|
|
17
|
-
<script setup>
|
|
18
|
-
import { ElDialog, ElButton } from "element-plus"
|
|
19
|
-
import { ref, defineProps, defineExpose, onMounted, computed, watch, onUnmounted } from "vue";
|
|
20
|
-
|
|
21
|
-
const iframeRef = ref(null)
|
|
22
|
-
const props = defineProps({
|
|
23
|
-
src: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: ''
|
|
26
|
-
},
|
|
27
|
-
awalyCloseCb: {
|
|
28
|
-
type: Function,
|
|
29
|
-
default: null
|
|
30
|
-
},
|
|
31
|
-
closeCb: {
|
|
32
|
-
type: Function,
|
|
33
|
-
default: null
|
|
34
|
-
},
|
|
35
|
-
title: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: ''
|
|
38
|
-
},
|
|
39
|
-
showClose: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: true
|
|
42
|
-
},
|
|
43
|
-
lang: String,
|
|
44
|
-
})
|
|
45
|
-
const lang = computed(() => {
|
|
46
|
-
return props.lang
|
|
47
|
-
})
|
|
48
|
-
let closeCb = null
|
|
49
|
-
const dialogVisible = ref(false)
|
|
50
|
-
defineExpose({
|
|
51
|
-
dialogVisible
|
|
52
|
-
})
|
|
53
|
-
watch(dialogVisible, (val, old) => {
|
|
54
|
-
if (!val && old) {
|
|
55
|
-
closeCb && closeCb()
|
|
56
|
-
props.awalyCloseCb?.()
|
|
57
|
-
iframeRef.value = null
|
|
58
|
-
closeCb = null
|
|
59
|
-
// changeSlide(true)//隐藏致远侧边框
|
|
60
|
-
} else{
|
|
61
|
-
// changeSlide(false)//显示致远侧边框
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
const messageCb = (event) => {
|
|
65
|
-
console.log('event===:', event)
|
|
66
|
-
let data = event.data;
|
|
67
|
-
switch (data.submitType) {
|
|
68
|
-
case 'CCM_CLOSE': // 这个是合同中心的message回调判断
|
|
69
|
-
case 'PROCUREMENT_CONTRACT_SUBMIT': // 这个是scm的message回调判断
|
|
70
|
-
console.log('props===:', props)
|
|
71
|
-
closeCb = props.closeCb
|
|
72
|
-
dialogVisible.value = false
|
|
73
|
-
break
|
|
74
|
-
default:
|
|
75
|
-
// closeDialog()
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// const contentHeight = computed(() => {
|
|
80
|
-
// let reduceNum = 0
|
|
81
|
-
// if (!!props.title.value) {
|
|
82
|
-
// reduceNum += 46
|
|
83
|
-
// }
|
|
84
|
-
// reduceNum += 72
|
|
85
|
-
// return `calc(100% - ${reduceNum}px)`
|
|
86
|
-
// })
|
|
87
|
-
|
|
88
|
-
onMounted(() => {
|
|
89
|
-
watch(iframeRef, (val) => {
|
|
90
|
-
if (val) {
|
|
91
|
-
window && window.addEventListener('message', messageCb)
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
immediate: true
|
|
95
|
-
})
|
|
96
|
-
})
|
|
97
|
-
onUnmounted(() => {
|
|
98
|
-
window && window.removeEventListener('message', messageCb)
|
|
99
|
-
})
|
|
100
|
-
</script>
|
|
101
|
-
<style lang="scss">
|
|
102
|
-
.third-party-frame {
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
&.el-dialog {
|
|
105
|
-
margin-top: 30px !important;
|
|
106
|
-
margin-bottom: 30px;
|
|
107
|
-
iframe {
|
|
108
|
-
border: 1px solid #dee0e3;
|
|
109
|
-
height: 80vh;
|
|
110
|
-
width: 100%;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</style>
|
|
115
|
-
<style scoped lang="scss">
|
|
116
|
-
.iframe-box {
|
|
117
|
-
box-sizing: border-box;
|
|
118
|
-
display: block;
|
|
119
|
-
}
|
|
120
|
-
.dialog-footer {
|
|
121
|
-
margin-top: 10px;
|
|
122
|
-
text-align: right;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
</style>
|
package/src-bak/enums/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DATA_VALID_RULE_EXECUTE, FIND_FILEA_NND_CONENT_BY_ID, GET_SYS_PARAM_CACHE, LCP_LOGIN, QUERY_PAGE_CONFIG_DATA } from "../api/builtIn"
|
|
2
|
-
|
|
3
|
-
export const USER_NAME = 'caowb3'
|
|
4
|
-
export const PASSWORD = '123456'
|
|
5
|
-
// export const USER_NAME = 'lcpsupport'
|
|
6
|
-
// export const PASSWORD = '8ik,*IK<'
|
|
7
|
-
export const USER_TYPE = '1'
|
|
8
|
-
export const AUTH_CODE = '9887'
|
|
9
|
-
|
|
10
|
-
export const NOT_AUTH_APIS = [
|
|
11
|
-
LCP_LOGIN,
|
|
12
|
-
GET_SYS_PARAM_CACHE,
|
|
13
|
-
QUERY_PAGE_CONFIG_DATA,
|
|
14
|
-
DATA_VALID_RULE_EXECUTE,
|
|
15
|
-
FIND_FILEA_NND_CONENT_BY_ID
|
|
16
|
-
]
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { definePrivatelyProp, findComponent, NOT_LOAD_CHILD_TYPE } from "../utils"
|
|
2
|
-
import { inject, onMounted, provide } from "vue"
|
|
3
|
-
|
|
4
|
-
const CONFIG_LOAD_KEY = Symbol()
|
|
5
|
-
export const useConfigLoad = (config) => {
|
|
6
|
-
const injectLoadFn = inject(CONFIG_LOAD_KEY) // 加载父组件传递下来的 加载完成的 回调函数
|
|
7
|
-
const loadFn = (childConfig) => {
|
|
8
|
-
const multiPmPageMetaList = config.multiPmPageMetaList
|
|
9
|
-
const pmPageMetaList = config.pmPageMetaList
|
|
10
|
-
// if (config.metaCode == 'rackRental') {
|
|
11
|
-
// debugger
|
|
12
|
-
// }
|
|
13
|
-
if (multiPmPageMetaList && multiPmPageMetaList.length) {
|
|
14
|
-
const allLoad = multiPmPageMetaList.every(configList => configList.every(config => config._componentLoad))
|
|
15
|
-
if (allLoad) {
|
|
16
|
-
config._componentLoad = true
|
|
17
|
-
injectLoadFn?.(config)
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
const allLoad = pmPageMetaList.every(config => config._componentLoad)
|
|
21
|
-
if (allLoad) {
|
|
22
|
-
config._componentLoad = true
|
|
23
|
-
injectLoadFn?.(config)
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
provide(CONFIG_LOAD_KEY, loadFn)
|
|
28
|
-
|
|
29
|
-
onMounted(() => {
|
|
30
|
-
const multiPmPageMetaList = config.multiPmPageMetaList
|
|
31
|
-
const pmPageMetaList = config.pmPageMetaList
|
|
32
|
-
|
|
33
|
-
if (
|
|
34
|
-
(
|
|
35
|
-
(!multiPmPageMetaList || multiPmPageMetaList.length === 0) &&
|
|
36
|
-
(!pmPageMetaList || pmPageMetaList.length === 0)
|
|
37
|
-
) ||
|
|
38
|
-
config.renderby ||
|
|
39
|
-
findComponent(NOT_LOAD_CHILD_TYPE, config.metaType) !== -1
|
|
40
|
-
) {
|
|
41
|
-
config._componentLoad = true
|
|
42
|
-
injectLoadFn?.(config)
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
}
|
package/src-bak/hooks/index.js
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { computed, inject, nextTick, reactive } from "vue"
|
|
2
|
-
import rulesDriver from '../rules/rulesDriver'
|
|
3
|
-
import defaultVal from '../utils/defaultVal.js'
|
|
4
|
-
import {definePrivatelyProp, isNonRefType, modelValueDeepMerge } from "../utils"
|
|
5
|
-
|
|
6
|
-
export function useVModel(config, props, emit, modelKey = 'update:modelValue') {
|
|
7
|
-
const { hireRelatMapRules, messageInstance, rootValue, ruleExecuter, dataLoad, dynamicMapComp, lang, _mapComp } = this
|
|
8
|
-
const currentRules = hireRelatMapRules.value[config.hireRelat]
|
|
9
|
-
let metaCodeKey = config.metaCode
|
|
10
|
-
if (modelKey !== 'update:modelValue') {
|
|
11
|
-
const matchs = modelKey.match(/^update:(\w+)$/)
|
|
12
|
-
if (!matchs) {
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
metaCodeKey = matchs[1]
|
|
16
|
-
const dynamicMapKey = config.dynamicHireRelat.replace(/->\w+$/, `->${metaCodeKey}`)
|
|
17
|
-
config = dynamicMapComp[dynamicMapKey]
|
|
18
|
-
}
|
|
19
|
-
const retModelVale = computed({
|
|
20
|
-
get() {
|
|
21
|
-
if (!config) {
|
|
22
|
-
// 如果使用v-model:[]方式绑定非modelValue,可能会出现没有对应的config
|
|
23
|
-
return
|
|
24
|
-
}
|
|
25
|
-
const val = (metaCodeKey ? props.modelValue?.[metaCodeKey] : props.modelValue) ?? null
|
|
26
|
-
if (modelKey === 'update:modelValue' && (val === undefined || val === null)) {
|
|
27
|
-
defaultVal(config)
|
|
28
|
-
// setTimeout(() => {
|
|
29
|
-
// defaultVal(config)
|
|
30
|
-
// }, 0)
|
|
31
|
-
}
|
|
32
|
-
config && (config.bindValue = val)
|
|
33
|
-
if (config) {
|
|
34
|
-
// 事件初始化执行,在dataLoaded请求完成之后,执行一次事件
|
|
35
|
-
if (dataLoad.value && !config.eventInit && !config.notInit) {
|
|
36
|
-
setTimeout(() => {
|
|
37
|
-
ruleExecuter?.run({
|
|
38
|
-
rootValue,
|
|
39
|
-
rules: currentRules,
|
|
40
|
-
config,
|
|
41
|
-
dynamicMapComp,
|
|
42
|
-
lang,
|
|
43
|
-
messageInstance,
|
|
44
|
-
_mapComp,
|
|
45
|
-
isInit: true,
|
|
46
|
-
})
|
|
47
|
-
rulesDriver.call({
|
|
48
|
-
config,
|
|
49
|
-
dynamicMapComp,
|
|
50
|
-
lang,
|
|
51
|
-
_mapComp,
|
|
52
|
-
messageInstance
|
|
53
|
-
}, currentRules, true)
|
|
54
|
-
definePrivatelyProp(config, 'eventInit', true)
|
|
55
|
-
}, 0)
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return val
|
|
59
|
-
},
|
|
60
|
-
set(val) {
|
|
61
|
-
if (!config) {
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
const modelValue = props.modelValue
|
|
65
|
-
const metaCode = metaCodeKey
|
|
66
|
-
// if (!metaCode) return
|
|
67
|
-
if (!modelValue) {
|
|
68
|
-
// frameSet 表示的是一帧之内重复设置对应metaCode的值
|
|
69
|
-
// 一帧之内重复设置metaCode的值需要进行merge,也就是下面modelValueDeepMerge走的逻辑
|
|
70
|
-
//(
|
|
71
|
-
// 原因是因为一帧之后重复设置,如果不走merge,会出现val值直接覆盖原本对应的metaCode的值,
|
|
72
|
-
// 这个在正常情况下没什么问题,但是如果刚开始根数据对应的层级对应出现断层为空,在进行emit(update:modelValue)进行赋值之后
|
|
73
|
-
// 并不能立即更新到对应的props.modelValue下面去,所以会出现 同时通过config.refValue设置同层级,并且是根数据断层的情况下;会出现覆盖
|
|
74
|
-
// )
|
|
75
|
-
config.parent && (config.parent.frameSet = true)
|
|
76
|
-
nextTick(() => {
|
|
77
|
-
config.parent && (config.parent.frameSet = false)
|
|
78
|
-
})
|
|
79
|
-
let updateValue = {
|
|
80
|
-
[metaCode]: val
|
|
81
|
-
}
|
|
82
|
-
if (!metaCode) {
|
|
83
|
-
updateValue = val
|
|
84
|
-
}
|
|
85
|
-
emit('update:modelValue', updateValue)
|
|
86
|
-
} else {
|
|
87
|
-
let updateValue = modelValue?.[metaCode]
|
|
88
|
-
if (config?.frameSet) {
|
|
89
|
-
if (!metaCode) {
|
|
90
|
-
updateValue = modelValue
|
|
91
|
-
}
|
|
92
|
-
if (updateValue) {
|
|
93
|
-
if (typeof updateValue === 'object' || typeof val === 'object') {
|
|
94
|
-
val = modelValueDeepMerge(updateValue, val)
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (isNonRefType(updateValue) && isNonRefType(val) && updateValue === val) {
|
|
99
|
-
// 这边的值没有变,就不用出触发下面的其他动作了
|
|
100
|
-
return
|
|
101
|
-
}
|
|
102
|
-
try {
|
|
103
|
-
if (!metaCode) {
|
|
104
|
-
props.modelValue = val
|
|
105
|
-
} else {
|
|
106
|
-
props.modelValue[metaCode] = val
|
|
107
|
-
}
|
|
108
|
-
} catch (error) {
|
|
109
|
-
console.log('config', config, metaCode)
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (config) {
|
|
113
|
-
setTimeout(() => {
|
|
114
|
-
ruleExecuter?.run({
|
|
115
|
-
rootValue,
|
|
116
|
-
rules: currentRules,
|
|
117
|
-
config,
|
|
118
|
-
dynamicMapComp,
|
|
119
|
-
lang,
|
|
120
|
-
messageInstance,
|
|
121
|
-
_mapComp,
|
|
122
|
-
})
|
|
123
|
-
rulesDriver.call({
|
|
124
|
-
config,
|
|
125
|
-
dynamicMapComp,
|
|
126
|
-
lang,
|
|
127
|
-
_mapComp,
|
|
128
|
-
messageInstance
|
|
129
|
-
}, currentRules)
|
|
130
|
-
}, 0)
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
})
|
|
134
|
-
return retModelVale
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export function useVmodels(props, emit) {
|
|
138
|
-
const hireRelatMapRules = inject('hireRelatMapRules')
|
|
139
|
-
const dataLoad = inject('dataLoad')
|
|
140
|
-
const dynamicMapComp = inject('dynamicMapComp')
|
|
141
|
-
const lang = inject('lang')
|
|
142
|
-
const _mapComp = inject('_mapComp')
|
|
143
|
-
const rootValue = inject('rootValue')
|
|
144
|
-
const ruleExecuter = inject('_ruleExecuter')
|
|
145
|
-
const messageInstance = inject('_messageInstance')
|
|
146
|
-
|
|
147
|
-
const thisObj = {
|
|
148
|
-
hireRelatMapRules,
|
|
149
|
-
dataLoad,
|
|
150
|
-
dynamicMapComp,
|
|
151
|
-
lang,
|
|
152
|
-
rootValue,
|
|
153
|
-
_mapComp,
|
|
154
|
-
ruleExecuter,
|
|
155
|
-
messageInstance: messageInstance?.value
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
const vModelObjs = reactive({})
|
|
159
|
-
const modelValue = useVModel.call(thisObj, props.config, props, emit)
|
|
160
|
-
|
|
161
|
-
vModelObjs['onUpdate:modelValue'] = (val) => { modelValue.value = val }
|
|
162
|
-
vModelObjs['modelValue'] = modelValue
|
|
163
|
-
|
|
164
|
-
function initVmodels(emitKeys = []) {
|
|
165
|
-
if (!Array.isArray(emitKeys)) {
|
|
166
|
-
emitKeys = Object.keys(emitKeys)
|
|
167
|
-
}
|
|
168
|
-
emitKeys = emitKeys.filter(key => {
|
|
169
|
-
return key.match(/^update:(\w+)$/)
|
|
170
|
-
})
|
|
171
|
-
emitKeys.forEach(key => {
|
|
172
|
-
if (typeof key !== 'string') return
|
|
173
|
-
const modelValue = useVModel.call(thisObj, props.config, props, emit, key)
|
|
174
|
-
if (modelValue) {
|
|
175
|
-
const matchs = key.match(/^update:(\w+)$/)
|
|
176
|
-
vModelObjs[`onUpdate:${matchs[1]}`] = (val) => { modelValue.value = val }
|
|
177
|
-
vModelObjs[matchs[1]] = modelValue
|
|
178
|
-
}
|
|
179
|
-
})
|
|
180
|
-
vModelObjs['onUpdate:modelValue'] = (val) => { modelValue.value = val }
|
|
181
|
-
vModelObjs['modelValue'] = modelValue
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
modelValue,
|
|
185
|
-
vModelObjs,
|
|
186
|
-
initVmodels
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
}
|