simple-frame-unit 1.0.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/.env.dev +14 -0
- package/CHANGELOG.md +9 -0
- package/README.md +24 -0
- package/dist/ed-frame-vue.common.1.js +11046 -0
- package/dist/ed-frame-vue.common.1.js.map +1 -0
- package/dist/ed-frame-vue.common.2.js +1715 -0
- package/dist/ed-frame-vue.common.2.js.map +1 -0
- package/dist/ed-frame-vue.common.js +53427 -0
- package/dist/ed-frame-vue.common.js.map +1 -0
- package/dist/ed-frame-vue.umd.1.js +11046 -0
- package/dist/ed-frame-vue.umd.1.js.map +1 -0
- package/dist/ed-frame-vue.umd.2.js +1715 -0
- package/dist/ed-frame-vue.umd.2.js.map +1 -0
- package/dist/ed-frame-vue.umd.js +53437 -0
- package/dist/ed-frame-vue.umd.js.map +1 -0
- package/dist/ed-frame-vue.umd.min.1.js +17 -0
- package/dist/ed-frame-vue.umd.min.1.js.map +1 -0
- package/dist/ed-frame-vue.umd.min.2.js +4 -0
- package/dist/ed-frame-vue.umd.min.2.js.map +1 -0
- package/dist/ed-frame-vue.umd.min.js +470 -0
- package/dist/ed-frame-vue.umd.min.js.map +1 -0
- package/import.easydata.js +46 -0
- package/lib/CHANGELOG.md +18 -0
- package/lib/README.md +27 -0
- package/lib/api/ds/index.js +124 -0
- package/lib/api/easyData.js +90 -0
- package/lib/api/easyform/easyForm.js +32 -0
- package/lib/api/index.js +61 -0
- package/lib/api/interface/index.js +32 -0
- package/lib/api/system.js +20 -0
- package/lib/index.js +80 -0
- package/lib/packages/BasicTemplate/EasyDataTemplate.vue +189 -0
- package/lib/packages/BasicTemplate/Props.js +64 -0
- package/lib/packages/BasicTemplate/components/TemplateComp.vue +263 -0
- package/lib/packages/BasicTemplate/components/TemplateViews.vue +292 -0
- package/lib/packages/BasicTemplate/hooks/business.js +74 -0
- package/lib/packages/BasicTemplate/hooks/getFormData.js +89 -0
- package/lib/packages/BasicTemplate/hooks/queryFormData.js +194 -0
- package/lib/packages/BasicTemplate/hooks/submitForm.js +53 -0
- package/lib/packages/BasicTemplate/hooks/useEmits.js +15 -0
- package/lib/packages/BasicTemplate/hooks/validate.js +42 -0
- package/lib/packages/EasyDataForm/EasyDataForm.vue +597 -0
- package/lib/packages/EasyDataForm/Props.js +22 -0
- package/lib/packages/EasyDataForm/components/FormItem.vue +228 -0
- package/lib/packages/EasyDataForm/hooks/useChosePopup.js +85 -0
- package/lib/packages/EasyDataForm/hooks/useEmits.js +19 -0
- package/lib/packages/EasyDataForm/hooks/useForm.js +169 -0
- package/lib/packages/EasyDataForm/hooks/useUpload.js +168 -0
- package/lib/packages/EasyDataList/EasyDataList.vue +348 -0
- package/lib/packages/EasyDataList/Props.js +116 -0
- package/lib/packages/EasyDataList/components/BasicModal.vue +150 -0
- package/lib/packages/EasyDataList/components/FormAction.vue +63 -0
- package/lib/packages/EasyDataList/hooks/useEmits.js +30 -0
- package/lib/packages/EasyDataList/hooks/useForm.js +62 -0
- package/lib/packages/EasyDataList/hooks/useTable.js +314 -0
- package/lib/packages/EasyDataTable/EasyDataTable.vue +233 -0
- package/lib/packages/EasyDataView/EasyDataView.vue +105 -0
- package/lib/packages/EdRichPreview/index.js +32 -0
- package/lib/packages/EdRichText/index.vue +167 -0
- package/lib/packages/EdRichText/replaceUrl.js +49 -0
- package/lib/packages/components/FileView.vue +97 -0
- package/lib/packages/index.js +11 -0
- package/lib/packages/mixins/EasyDataMixins.js +133 -0
- package/lib/packages/mixins/useTable.jsx +130 -0
- package/lib/pages/DataSource/index.js +8 -0
- package/lib/pages/DataSource/src/components/ControlViews/BaseProps.js +103 -0
- package/lib/pages/DataSource/src/components/ControlViews/control.js +1089 -0
- package/lib/pages/DataSource/src/components/ControlViews/index.vue +301 -0
- package/lib/pages/DataSource/src/components/TableOperationModal.vue +225 -0
- package/lib/pages/DataSource/src/components/TablePropsModal.vue +367 -0
- package/lib/pages/DataSource/src/components/ViewPropsModal.vue +737 -0
- package/lib/pages/DataSource/src/components/modal/ChooseDict.vue +119 -0
- package/lib/pages/DataSource/src/hooks/useTable.js +138 -0
- package/lib/pages/DataSource/src/index.vue +431 -0
- package/lib/pages/Interface/index.js +8 -0
- package/lib/pages/Interface/src/components/InterfaceCall.vue +73 -0
- package/lib/pages/Interface/src/components/InterfaceDepend.vue +299 -0
- package/lib/pages/Interface/src/components/InterfaceFee.vue +131 -0
- package/lib/pages/Interface/src/components/InterfaceMessage.vue +878 -0
- package/lib/pages/Interface/src/components/InterfaceMock.vue +203 -0
- package/lib/pages/Interface/src/components/InterfaceParam.vue +308 -0
- package/lib/pages/Interface/src/components/InterfaceRepeat.vue +281 -0
- package/lib/pages/Interface/src/components/InterfaceVariable.vue +31 -0
- package/lib/pages/Interface/src/index.vue +216 -0
- package/lib/pages/Template/index.js +8 -0
- package/lib/pages/Template/src/components/DefineModal.vue +524 -0
- package/lib/pages/Template/src/components/TemplatePreview.vue +109 -0
- package/lib/pages/Template/src/components/model/AddDialog.vue +60 -0
- package/lib/pages/Template/src/components/model/TemplatePreview2.vue +101 -0
- package/lib/pages/Template/src/hooks/index.js +3 -0
- package/lib/pages/Template/src/hooks/useEmits.js +64 -0
- package/lib/pages/Template/src/index.vue +124 -0
- package/lib/popup/index.js +8 -0
- package/lib/popup/src/DataSourceChoose.vue +44 -0
- package/lib/popup/src/DataSourceViewIdChoose.vue +67 -0
- package/lib/popup/src/DictChoose.vue +104 -0
- package/lib/popup/src/InterfaceChoose.vue +46 -0
- package/lib/popup/src/OrgChoose.vue +121 -0
- package/lib/popup/src/RoleChoose.vue +101 -0
- package/lib/popup/src/TemplateChoose.vue +43 -0
- package/lib/popup/src/UserChoose.vue +161 -0
- package/lib/popup//347/273/204/344/273/266/345/274/200/345/217/221/350/247/204/350/214/203.md +25 -0
- package/lib/style/custom.scss +126 -0
- package/lib/style/deep.scss +109 -0
- package/lib/style/index.scss +4 -0
- package/lib/utils/MapLoader.js +48 -0
- package/lib/utils/dateUtils.js +58 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/setting.js +25 -0
- package/lib/utils/sortable/index.js +3784 -0
- package/lib/utils/useBusiness.js +212 -0
- package/lib/utils/utils.js +588 -0
- package/package.json +77 -0
- package/src/App.vue +12 -0
- package/src/assets/Vue.png +0 -0
- package/src/assets/avatar.png +0 -0
- package/src/assets/images/bg.png +0 -0
- package/src/assets/images/logo-bills.png +0 -0
- package/src/assets/images/pic.png +0 -0
- package/src/assets/images/weplus-logo.png +0 -0
- package/src/assets/marker.png +0 -0
- package/src/assets/styles/common.scss +359 -0
- package/src/assets/styles/ele-docs.css +3278 -0
- package/src/assets/styles/fonts/icomoon.eot +0 -0
- package/src/assets/styles/fonts/icomoon.svg +14 -0
- package/src/assets/styles/fonts/icomoon.ttf +0 -0
- package/src/assets/styles/fonts/icomoon.woff +0 -0
- package/src/assets/styles/fonts/style.css +39 -0
- package/src/assets/styles/higtlightEle.css +84 -0
- package/src/assets/svg/code.svg +7 -0
- package/src/assets/svg/password.svg +1 -0
- package/src/components/Popups/DiyCompDictChoose.vue +112 -0
- package/src/components/Popups/index.js +28 -0
- package/src/components/ed-base-vue/global/variable.js +8 -0
- package/src/components/ed-base-vue/index.js +81 -0
- package/src/components/ed-base-vue/package/EdCard/index.js +7 -0
- package/src/components/ed-base-vue/package/EdCard/src/index.vue +87 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/index.js +8 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/AceConfig.js +71 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/Editor.vue +137 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/Toolbar.vue +68 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/index.vue +119 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/webpack-resolver.js +51 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/Toolbar.vue +57 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/config.js +64 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/index.vue +309 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/EdCodeEditor.vue +238 -0
- package/src/components/ed-base-vue/package/EdDate/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDate/src/index.js +50 -0
- package/src/components/ed-base-vue/package/EdDescriptions/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDescriptions/src/EdDescriptions.vue +46 -0
- package/src/components/ed-base-vue/package/EdDescriptions/src/EdDescriptionsItem.js +20 -0
- package/src/components/ed-base-vue/package/EdDescriptions/src/Props.js +20 -0
- package/src/components/ed-base-vue/package/EdDialog/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDialog/src/EdDialog.vue +138 -0
- package/src/components/ed-base-vue/package/EdDialog/src/Props.js +91 -0
- package/src/components/ed-base-vue/package/EdDialog/src/components/DialogFooter.vue +42 -0
- package/src/components/ed-base-vue/package/EdDialog/src/components/DialogWrapper.vue +53 -0
- package/src/components/ed-base-vue/package/EdDrawer/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDrawer/src/DrawerFooter.vue +41 -0
- package/src/components/ed-base-vue/package/EdDrawer/src/EdDrawer.vue +150 -0
- package/src/components/ed-base-vue/package/EdDrawer/src/props.js +71 -0
- package/src/components/ed-base-vue/package/EdFlow/index.js +8 -0
- package/src/components/ed-base-vue/package/EdFlow/src/EdFlowItem.vue +733 -0
- package/src/components/ed-base-vue/package/EdFlow/src/index.vue +148 -0
- package/src/components/ed-base-vue/package/EdForm/index.js +8 -0
- package/src/components/ed-base-vue/package/EdForm/src/EdForm.vue +172 -0
- package/src/components/ed-base-vue/package/EdForm/src/Props.js +33 -0
- package/src/components/ed-base-vue/package/EdForm/src/components/EdFormItem.vue +34 -0
- package/src/components/ed-base-vue/package/EdIcons/index.js +8 -0
- package/src/components/ed-base-vue/package/EdIcons/src/hooks/Icons.js +406 -0
- package/src/components/ed-base-vue/package/EdIcons/src/hooks/Icons1.js +830 -0
- package/src/components/ed-base-vue/package/EdIcons/src/index.vue +13 -0
- package/src/components/ed-base-vue/package/EdImage/index.js +8 -0
- package/src/components/ed-base-vue/package/EdImage/src/index.vue +28 -0
- package/src/components/ed-base-vue/package/EdInputArray/index.js +8 -0
- package/src/components/ed-base-vue/package/EdInputArray/src/Props.js +26 -0
- package/src/components/ed-base-vue/package/EdInputArray/src/index.vue +97 -0
- package/src/components/ed-base-vue/package/EdInputColor/index.js +8 -0
- package/src/components/ed-base-vue/package/EdInputColor/src/InputColor.vue +81 -0
- package/src/components/ed-base-vue/package/EdInputMap/index.js +9 -0
- package/src/components/ed-base-vue/package/EdInputMap/src/EdInputMap.vue +246 -0
- package/src/components/ed-base-vue/package/EdInputMap/src/EdInputMapProps.js +6 -0
- package/src/components/ed-base-vue/package/EdInputPop/index.js +13 -0
- package/src/components/ed-base-vue/package/EdInputPop/src/EdInputPop.vue +144 -0
- package/src/components/ed-base-vue/package/EdInputPop/src/Props.js +48 -0
- package/src/components/ed-base-vue/package/EdInputTable/index.js +8 -0
- package/src/components/ed-base-vue/package/EdInputTable/src/EdInputTable.vue +368 -0
- package/src/components/ed-base-vue/package/EdInputTable/src/Fetch.js +40 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/index.js +13 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/EdJsonEditor.vue +198 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/img/jsoneditor-icons.svg +749 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/jsoneditor.css +2031 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/plus.svg +1 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/hooks.js +63 -0
- package/src/components/ed-base-vue/package/EdJsonViewer/index.js +8 -0
- package/src/components/ed-base-vue/package/EdJsonViewer/src/EdJsonViewer.vue +44 -0
- package/src/components/ed-base-vue/package/EdLable/index.js +8 -0
- package/src/components/ed-base-vue/package/EdLable/src/index.vue +34 -0
- package/src/components/ed-base-vue/package/EdLink/index.js +8 -0
- package/src/components/ed-base-vue/package/EdLink/src/index.vue +43 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/index.js +15 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/src/EdMarkEditor.vue +368 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/src/extra-function.js +538 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/src/highlight.js +95 -0
- package/src/components/ed-base-vue/package/EdTable/index.js +8 -0
- package/src/components/ed-base-vue/package/EdTable/src/EdTable.vue +240 -0
- package/src/components/ed-base-vue/package/EdTable/src/Props.js +97 -0
- package/src/components/ed-base-vue/package/EdTable/src/components/TableColumnItem.js +24 -0
- package/src/components/ed-base-vue/package/EdTable/src/components/TablePagination.vue +73 -0
- package/src/components/ed-base-vue/package/EdTableEditor/index.js +8 -0
- package/src/components/ed-base-vue/package/EdTableEditor/src/EdTableEditor.vue +282 -0
- package/src/components/ed-base-vue/package/EdTableEditor/src/Props.js +107 -0
- package/src/components/ed-base-vue/package/EdTableEditor/src/hooks/validate.js +90 -0
- package/src/components/ed-base-vue/package/EdUpload/index.js +8 -0
- package/src/components/ed-base-vue/package/EdUpload/src/Props.js +90 -0
- package/src/components/ed-base-vue/package/EdUpload/src/index.vue +88 -0
- package/src/components/ed-base-vue/package/EdViewer/index.js +8 -0
- package/src/components/ed-base-vue/package/EdViewer/src/EdViewer.vue +310 -0
- package/src/components/ed-base-vue/package/EdWangEditor/index.js +14 -0
- package/src/components/ed-base-vue/package/EdWangEditor/src/EdWangEditor.vue +127 -0
- package/src/components/ed-base-vue/package/ExtendSlot.js +12 -0
- package/src/components/ed-base-vue/package/OptionSlot.js +65 -0
- package/src/components/ed-base-vue/plugin/Message/index.js +2 -0
- package/src/components/ed-base-vue/plugin/Message/src/main.js +91 -0
- package/src/components/ed-base-vue/plugin/Message/src/main.vue +253 -0
- package/src/components/ed-base-vue/plugin/print/index.js +156 -0
- package/src/components/ed-base-vue/plugin/sortable/index.js +3784 -0
- package/src/components/ed-base-vue/style/custom.scss +107 -0
- package/src/components/ed-base-vue/style/deep.scss +100 -0
- package/src/components/ed-base-vue/style/index.scss +4 -0
- package/src/components/ed-base-vue/tools/date-format.js +315 -0
- package/src/components/ed-base-vue/tools/utils.js +124 -0
- package/src/layouts/components/AppMain.vue +17 -0
- package/src/layouts/components/Header.vue +256 -0
- package/src/layouts/components/Logo.vue +56 -0
- package/src/layouts/components/Navbar.vue +169 -0
- package/src/layouts/components/SideBar.vue +107 -0
- package/src/layouts/components/index.js +5 -0
- package/src/layouts/index.vue +57 -0
- package/src/main.js +42 -0
- package/src/request/config.js +6 -0
- package/src/request/index.js +85 -0
- package/src/request/request.js +147 -0
- package/src/router/index.js +65 -0
- package/src/router/modules/baseRouter.js +43 -0
- package/src/router/modules/easydata.js +49 -0
- package/src/views/base/BaseRichPreview.vue +23 -0
- package/src/views/base/BaseRichText.vue +28 -0
- package/src/views/base/EdFormView.vue +54 -0
- package/src/views/base/EdTable.vue +98 -0
- package/src/views/base/inputTable.vue +103 -0
- package/src/views/easydata/Interface.vue +3 -0
- package/src/views/easydata/dataSource.vue +13 -0
- package/src/views/easydata/dataSourceView.vue +71 -0
- package/src/views/easydata/templateDemo.vue +89 -0
- package/src/views/easydata/templateInfo.vue +13 -0
- package/src/views/index.vue +17 -0
- package/src/views/login.vue +208 -0
- package/src/views/redirect.vue +15 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import {getControlProp} from "../../utils/useBusiness";
|
|
2
|
+
import {getVarType} from "../../utils/utils";
|
|
3
|
+
import {formatDate} from "../../utils/dateUtils";
|
|
4
|
+
import FileView from "../components/FileView.vue";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
methods: {
|
|
8
|
+
/**
|
|
9
|
+
* @name getColumns
|
|
10
|
+
* @returns {*[]}
|
|
11
|
+
*/
|
|
12
|
+
getColumns(controlInfos, controlProps) {
|
|
13
|
+
let columns = []
|
|
14
|
+
controlInfos.forEach((control) => {
|
|
15
|
+
if (control.isShow) {
|
|
16
|
+
//展示字段
|
|
17
|
+
let column = {
|
|
18
|
+
label: control.label,
|
|
19
|
+
prop: control.virtualColumn ? 'keyInfoView.' + control.controlName : control.controlName,
|
|
20
|
+
}
|
|
21
|
+
if (control.controlType === 'textarea') column.showOverflowTooltip = true
|
|
22
|
+
//数据渲染
|
|
23
|
+
this.renderColumn(control, column, controlProps);
|
|
24
|
+
columns.push(column)
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
// 调用编辑
|
|
29
|
+
if (Object.keys(this.$listeners).includes('editColumns')) {
|
|
30
|
+
this.$listeners.editColumns(columns)
|
|
31
|
+
}
|
|
32
|
+
return columns;
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 渲染下拉框
|
|
37
|
+
* @param {*} control
|
|
38
|
+
* @param column
|
|
39
|
+
* @param controlProps
|
|
40
|
+
*/
|
|
41
|
+
renderColumn(control, column, controlProps) {
|
|
42
|
+
const controlProp = getControlProp(control, controlProps);
|
|
43
|
+
if (control.controlType === 'select' || control.controlType === '_switch') {
|
|
44
|
+
// form,视图配置的下拉列表,模式,数据绑定方式
|
|
45
|
+
column.formatter = function (row, column, cellValue, index) {
|
|
46
|
+
|
|
47
|
+
if (getVarType(cellValue) !== 'undefined') {
|
|
48
|
+
if (getVarType(cellValue) === 'array') {
|
|
49
|
+
return cellValue.map(i => i.label).join(',')
|
|
50
|
+
} else if (getVarType(cellValue) === 'object') {
|
|
51
|
+
return cellValue.label
|
|
52
|
+
} else if (getVarType(cellValue) === 'string') {
|
|
53
|
+
if (controlProp.dataSource && controlProp.dataSource.length > 0) {
|
|
54
|
+
for(let i = 0; i < controlProp.dataSource.length; i++) {
|
|
55
|
+
if(cellValue === controlProp.dataSource[i].value) {
|
|
56
|
+
return controlProp.dataSource[i].label
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return cellValue + ""
|
|
62
|
+
}
|
|
63
|
+
return cellValue
|
|
64
|
+
}
|
|
65
|
+
} else if (control.controlType === "popup") {
|
|
66
|
+
column.formatter = function (row, column, cellValue, index) {
|
|
67
|
+
if (cellValue) {
|
|
68
|
+
if (getVarType(cellValue) === 'array') {
|
|
69
|
+
return <div class="table-tag">{cellValue.map(i => <el-tag size="small">{i.label}</el-tag>)}</div>
|
|
70
|
+
}else if (getVarType(cellValue) === 'object') {
|
|
71
|
+
return <div className="table-tag">{cellValue.label}</div>
|
|
72
|
+
}
|
|
73
|
+
return cellValue.label
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
} else if (control.controlType === "checkbox") {
|
|
77
|
+
column.formatter = function (row, column, cellValue, index) {
|
|
78
|
+
if (cellValue && cellValue instanceof Array) {
|
|
79
|
+
return <div class="table-tag">{cellValue.map(i => <el-tag size="small">{i.label}</el-tag>)}</div>
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
} else if (control.controlType === "radio") {
|
|
83
|
+
column.formatter = function (row, column, cellValue, index) {
|
|
84
|
+
if (cellValue) {
|
|
85
|
+
return <div class="table-tag">
|
|
86
|
+
<el-tag size="small">{cellValue.label}</el-tag>
|
|
87
|
+
</div>
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} else if (["datePicker"].includes(control.controlType)) {
|
|
91
|
+
column.formatter = function (row, column, cellValue, index) {
|
|
92
|
+
if (cellValue) {
|
|
93
|
+
const {format} = controlProp
|
|
94
|
+
let data = new Date(cellValue)
|
|
95
|
+
return formatDate(data, format)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
} else if (control.controlType === 'cascader') {
|
|
99
|
+
const showAllLevels = getVarType(controlProp.showAllLevels) === 'boolean' && controlProp.showAllLevels === false;
|
|
100
|
+
column.formatter = function (row, column, cellValue, index) {
|
|
101
|
+
if (cellValue) {
|
|
102
|
+
if (getVarType(cellValue) === 'object') {
|
|
103
|
+
if (showAllLevels) {
|
|
104
|
+
const temp = cellValue.label.split("/");
|
|
105
|
+
return temp[temp.length - 1];
|
|
106
|
+
} else return cellValue.label;
|
|
107
|
+
} else if (getVarType(cellValue) === 'array') {
|
|
108
|
+
return cellValue.map(item => {
|
|
109
|
+
if (showAllLevels) {
|
|
110
|
+
const temp = item.label.split("/");
|
|
111
|
+
return temp[temp.length - 1];
|
|
112
|
+
} else return item.label;
|
|
113
|
+
}).join(",")
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return cellValue
|
|
117
|
+
}
|
|
118
|
+
} else if (control.controlType === 'upload') { //控件为上传控件时
|
|
119
|
+
column.formatter = (row, column, cellValue, index) => {
|
|
120
|
+
if (cellValue) {
|
|
121
|
+
if (cellValue && getVarType(cellValue) === 'array') {
|
|
122
|
+
return <FileView list={cellValue}></FileView>
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return cellValue;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// 表单描述
|
|
2
|
+
export const FormDesc = [
|
|
3
|
+
{
|
|
4
|
+
label: '默认值',
|
|
5
|
+
prop: "defaultValue",
|
|
6
|
+
children: {
|
|
7
|
+
tags: "el-input",
|
|
8
|
+
attrs: {
|
|
9
|
+
placeholder: '请输入默认值'
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: '验证表达式',
|
|
15
|
+
prop: "validateExpression",
|
|
16
|
+
tooltip: "示例:/^[0-9]{8}$/ 8位数字",
|
|
17
|
+
children: {
|
|
18
|
+
tags: "el-input",
|
|
19
|
+
attrs: {
|
|
20
|
+
placeholder: '请输入默认值'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: '存储为label',
|
|
26
|
+
prop: "isLabelValue",
|
|
27
|
+
tooltip: "示例:/^[0-9]{8}$/ 8位数字",
|
|
28
|
+
children: {
|
|
29
|
+
tags: "el-input",
|
|
30
|
+
attrs: {
|
|
31
|
+
placeholder: '请输入默认值'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 下拉元素Table列配置
|
|
40
|
+
* @type {[{label: string, type: string, align: string},{children: {tags: string, attrs: {placeholder: string}}, prop: string, label: string, align: string},{children: {tags: string, attrs: {placeholder: string}}, prop: string, label: string, align: string},{children: {tags: string, attrs: {placeholder: string}}, prop: string, label: string, align: string},{children: {tags: string, attrs: {placeholder: string}}, prop: string, label: string, align: string}]}
|
|
41
|
+
*/
|
|
42
|
+
export const TableEditorColumns = [
|
|
43
|
+
{
|
|
44
|
+
label: "#",
|
|
45
|
+
type: "index",
|
|
46
|
+
align: "center"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: "Label",
|
|
50
|
+
prop: "label",
|
|
51
|
+
align: "center",
|
|
52
|
+
children: {
|
|
53
|
+
tags: "ed-input-pop",
|
|
54
|
+
attrs: {
|
|
55
|
+
placeholder: "Label"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "Value",
|
|
61
|
+
prop: "value",
|
|
62
|
+
align: "center",
|
|
63
|
+
children: {
|
|
64
|
+
tags: "ed-input-pop",
|
|
65
|
+
attrs: {
|
|
66
|
+
placeholder: "Value"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: "触发控件",
|
|
72
|
+
prop: "triggerControl",
|
|
73
|
+
align: "center",
|
|
74
|
+
children: {
|
|
75
|
+
tags: "ed-input-pop",
|
|
76
|
+
attrs: {
|
|
77
|
+
placeholder: "触发控件"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "默认选中",
|
|
83
|
+
prop: "isChecked",
|
|
84
|
+
align: "center",
|
|
85
|
+
children: {
|
|
86
|
+
tags: "el-switch",
|
|
87
|
+
attrs: {
|
|
88
|
+
placeholder: "默认选中"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
export const TableEditorRules = {
|
|
95
|
+
label: [
|
|
96
|
+
{required: true, message: '必填', trigger: 'blur'}
|
|
97
|
+
],
|
|
98
|
+
|
|
99
|
+
value: [
|
|
100
|
+
{required: true, message: '必填', trigger: 'blur'}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
|