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,85 @@
|
|
|
1
|
+
import request from './request'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name requestAxios
|
|
5
|
+
* @param param
|
|
6
|
+
* @return {Promise<unknown>}
|
|
7
|
+
*/
|
|
8
|
+
export function requestAxios(param) {
|
|
9
|
+
// 检查是否配置request
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
request(param).then((res) => {
|
|
12
|
+
if (res && res.data) {
|
|
13
|
+
res.data = res.data
|
|
14
|
+
}
|
|
15
|
+
res.success = !!(res && res.code === 0);
|
|
16
|
+
if (res && res.msg) {
|
|
17
|
+
res.msg = res.msg
|
|
18
|
+
}
|
|
19
|
+
resolve(res)
|
|
20
|
+
}).catch(e => {
|
|
21
|
+
reject(e)
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function postAction(url, param) {
|
|
27
|
+
return requestAxios({
|
|
28
|
+
url: url,
|
|
29
|
+
method: 'post',
|
|
30
|
+
data: param
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function getAction(url, param) {
|
|
35
|
+
return requestAxios({
|
|
36
|
+
url: url,
|
|
37
|
+
method: 'get',
|
|
38
|
+
params: param
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function deleteAction(url, param) {
|
|
43
|
+
return requestAxios({
|
|
44
|
+
url: url,
|
|
45
|
+
method: 'delete',
|
|
46
|
+
params: param,
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function putAction(url, param) {
|
|
51
|
+
return requestAxios({
|
|
52
|
+
url: url,
|
|
53
|
+
method: 'put',
|
|
54
|
+
data: param,
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function uploadAction(url, param) {
|
|
59
|
+
return requestAxios({
|
|
60
|
+
url: url,
|
|
61
|
+
data: param,
|
|
62
|
+
method: 'post',
|
|
63
|
+
headers: {
|
|
64
|
+
'Content-Type': 'multipart/form-data',
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function downFilePost(url, parameter) {
|
|
70
|
+
return requestAxios({
|
|
71
|
+
url: url,
|
|
72
|
+
data: parameter,
|
|
73
|
+
method: 'post',
|
|
74
|
+
responseType: 'blob'
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default {
|
|
79
|
+
requestAxios,
|
|
80
|
+
postAction,
|
|
81
|
+
getAction,
|
|
82
|
+
deleteAction,
|
|
83
|
+
putAction,
|
|
84
|
+
uploadAction,
|
|
85
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
import {Message, Notification} from 'element-ui'
|
|
3
|
+
import router from '../router'
|
|
4
|
+
const errorCode = {
|
|
5
|
+
'401': '账号未登录',
|
|
6
|
+
'403': '当前操作没有权限',
|
|
7
|
+
'404': '访问资源不存在',
|
|
8
|
+
'default': '系统未知错误,请反馈给管理员'
|
|
9
|
+
}
|
|
10
|
+
console.log("--------------", process.env)
|
|
11
|
+
|
|
12
|
+
// 获取token
|
|
13
|
+
const getAccessToken = () => {
|
|
14
|
+
let token = window.localStorage.getItem('FRAME_VUE_TOKEN')
|
|
15
|
+
return token ? token : undefined
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 需要忽略的提示。忽略后,自动 Promise.reject('error')
|
|
19
|
+
const ignoreMsgs = [
|
|
20
|
+
"无效的刷新令牌", // 刷新令牌被删除时,不用提示
|
|
21
|
+
"刷新令牌已过期" // 使用刷新令牌,刷新获取新的访问令牌时,结果因为过期失败,此时需要忽略。否则,会导致继续 401,无法跳转到登出界面
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
// 是否显示重新登录
|
|
25
|
+
export const isRelogin = {show: false};
|
|
26
|
+
|
|
27
|
+
export function getBaseHeader() {
|
|
28
|
+
return {
|
|
29
|
+
'Authorization': "Bearer " + getAccessToken(),
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
|
34
|
+
|
|
35
|
+
// 创建axios实例
|
|
36
|
+
const service = axios.create({
|
|
37
|
+
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
|
38
|
+
baseURL: process.env.VUE_APP_BASE_API + '/admin-api/', // 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/
|
|
39
|
+
// 超时
|
|
40
|
+
timeout: 60000,
|
|
41
|
+
// 禁用 Cookie 等信息
|
|
42
|
+
withCredentials: false,
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
// request拦截器
|
|
46
|
+
service.interceptors.request.use(config => {
|
|
47
|
+
// 是否需要设置 token
|
|
48
|
+
const isToken = (config.headers || {}).isToken === false
|
|
49
|
+
if (getAccessToken() && !isToken) {
|
|
50
|
+
config.headers['Authorization'] = getBaseHeader().Authorization // 让每个请求携带自定义token 请根据实际情况自行修改
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// get请求映射params参数
|
|
54
|
+
if (config.method === 'get' && config.params) {
|
|
55
|
+
let url = config.url + '?';
|
|
56
|
+
for (const propName of Object.keys(config.params)) {
|
|
57
|
+
const value = config.params[propName];
|
|
58
|
+
const part = encodeURIComponent(propName) + '='
|
|
59
|
+
if (value !== null && typeof (value) !== "undefined") {
|
|
60
|
+
if (typeof value === 'object') {
|
|
61
|
+
for (const key of Object.keys(value)) {
|
|
62
|
+
let params = propName + '[' + key + ']';
|
|
63
|
+
const subPart = encodeURIComponent(params) + '='
|
|
64
|
+
url += subPart + encodeURIComponent(value[key]) + "&";
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
url += part + encodeURIComponent(value) + "&";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
url = url.slice(0, -1);
|
|
72
|
+
config.params = {};
|
|
73
|
+
config.url = url;
|
|
74
|
+
}
|
|
75
|
+
return config
|
|
76
|
+
}, error => {
|
|
77
|
+
console.log(error)
|
|
78
|
+
Promise.reject(error)
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// 响应拦截器
|
|
82
|
+
service.interceptors.response.use(async res => {
|
|
83
|
+
// 未设置状态码则默认成功状态
|
|
84
|
+
const code = res.data.code || 200;
|
|
85
|
+
// 获取错误信息
|
|
86
|
+
const msg = res.data.msg || errorCode[code] || errorCode['default']
|
|
87
|
+
|
|
88
|
+
if(msg === errorCode[401]){
|
|
89
|
+
router.push({path: "/login"})
|
|
90
|
+
return Promise.reject(msg)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (ignoreMsgs.indexOf(msg) !== -1) { // 如果是忽略的错误码,直接返回 msg 异常
|
|
94
|
+
return Promise.reject(msg)
|
|
95
|
+
} else if (code === 401) {
|
|
96
|
+
Message({
|
|
97
|
+
message: msg,
|
|
98
|
+
type: 'error'
|
|
99
|
+
})
|
|
100
|
+
return Promise.reject(new Error(msg))
|
|
101
|
+
} else if (code === 500) {
|
|
102
|
+
Message({
|
|
103
|
+
message: msg,
|
|
104
|
+
type: 'error'
|
|
105
|
+
})
|
|
106
|
+
return Promise.reject(new Error(msg))
|
|
107
|
+
} else if (code === 901) {
|
|
108
|
+
Message({
|
|
109
|
+
type: 'error',
|
|
110
|
+
duration: 0,
|
|
111
|
+
dangerouslyUseHTMLString: true,
|
|
112
|
+
message: '<div>演示模式,无法进行写操作</div>',
|
|
113
|
+
})
|
|
114
|
+
return Promise.reject(new Error(msg))
|
|
115
|
+
} else if (code !== 200) {
|
|
116
|
+
if (msg === ignoreMsgs[0]) { // hard coding:忽略这个提示,直接登出
|
|
117
|
+
console.log(msg)
|
|
118
|
+
} else {
|
|
119
|
+
Notification.error({
|
|
120
|
+
title: msg
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
return Promise.reject('error')
|
|
124
|
+
} else {
|
|
125
|
+
return res.data
|
|
126
|
+
}
|
|
127
|
+
}, error => {
|
|
128
|
+
let {message} = error;
|
|
129
|
+
if (message === "Network Error") {
|
|
130
|
+
message = "后端接口连接异常";
|
|
131
|
+
} else if (message.includes("timeout")) {
|
|
132
|
+
message = "系统接口请求超时";
|
|
133
|
+
} else if (message.includes("Request failed with status code")) {
|
|
134
|
+
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
|
135
|
+
}
|
|
136
|
+
Message({
|
|
137
|
+
message: message,
|
|
138
|
+
type: 'error',
|
|
139
|
+
duration: 5 * 1000
|
|
140
|
+
})
|
|
141
|
+
return Promise.reject(error)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
export default service
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import Router from 'vue-router';
|
|
3
|
+
import Layout from "@/layouts";
|
|
4
|
+
|
|
5
|
+
// router
|
|
6
|
+
import easydata from "@/router/modules/easydata";
|
|
7
|
+
import baseRouter from "@/router/modules/baseRouter";
|
|
8
|
+
|
|
9
|
+
export const routes = [
|
|
10
|
+
{
|
|
11
|
+
path: "/login",
|
|
12
|
+
title: "登录",
|
|
13
|
+
hidden: true,
|
|
14
|
+
icons: "el-icon-menu",
|
|
15
|
+
component: () => import("@/views/login.vue")
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
path: '/redirect',
|
|
19
|
+
component: Layout,
|
|
20
|
+
hidden: true,
|
|
21
|
+
children: [
|
|
22
|
+
{
|
|
23
|
+
path: '/redirect/:path(.*)',
|
|
24
|
+
component: () => import('@/views/redirect')
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
path: "",
|
|
30
|
+
redirect: 'index',
|
|
31
|
+
component: Layout,
|
|
32
|
+
children: [{
|
|
33
|
+
path: '/index',
|
|
34
|
+
icons: "el-icon-menu",
|
|
35
|
+
component: () => import('@/views/index.vue'),
|
|
36
|
+
title: '首页',
|
|
37
|
+
meta: {title: '首页', affix: true}
|
|
38
|
+
}]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: "/easydata",
|
|
42
|
+
redirect: "/easydata/dataSource",
|
|
43
|
+
component: Layout,
|
|
44
|
+
icons: "el-icon-menu",
|
|
45
|
+
title: "业务组件",
|
|
46
|
+
children: easydata
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
path: "/base",
|
|
50
|
+
redirect: "/base/inputTable",
|
|
51
|
+
component: Layout,
|
|
52
|
+
icons: "el-icon-menu",
|
|
53
|
+
title: "基础组件",
|
|
54
|
+
children: baseRouter
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
Vue.use(Router)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
export default new Router({
|
|
62
|
+
mode: 'history',
|
|
63
|
+
routes: routes
|
|
64
|
+
})
|
|
65
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
path: '/base/inputTable',
|
|
4
|
+
meta: {
|
|
5
|
+
title: '表格选择器',
|
|
6
|
+
},
|
|
7
|
+
title: '表格选择器',
|
|
8
|
+
icons: "el-icon-menu",
|
|
9
|
+
component: () => import("@/views/base/inputTable")
|
|
10
|
+
},{
|
|
11
|
+
path: '/base/EdTable',
|
|
12
|
+
meta: {
|
|
13
|
+
title: '表格',
|
|
14
|
+
},
|
|
15
|
+
title: '表格',
|
|
16
|
+
icons: "el-icon-menu",
|
|
17
|
+
component: () => import("@/views/base/EdTable")
|
|
18
|
+
},{
|
|
19
|
+
path: '/base/EdFormView',
|
|
20
|
+
meta: {
|
|
21
|
+
title: '表单',
|
|
22
|
+
},
|
|
23
|
+
title: '表单',
|
|
24
|
+
icons: "el-icon-menu",
|
|
25
|
+
component: () => import("@/views/base/EdFormView")
|
|
26
|
+
},{
|
|
27
|
+
path: '/base/BaseRichText',
|
|
28
|
+
meta: {
|
|
29
|
+
title: '富文本编辑',
|
|
30
|
+
},
|
|
31
|
+
title: '富文本编辑',
|
|
32
|
+
icons: "el-icon-menu",
|
|
33
|
+
component: () => import("@/views/base/BaseRichText")
|
|
34
|
+
},{
|
|
35
|
+
path: '/base/BaseRichPreview',
|
|
36
|
+
meta: {
|
|
37
|
+
title: '富文本预览',
|
|
38
|
+
},
|
|
39
|
+
title: '富文本预览',
|
|
40
|
+
icons: "el-icon-menu",
|
|
41
|
+
component: () => import("@/views/base/BaseRichPreview")
|
|
42
|
+
},
|
|
43
|
+
]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
path: '/easydata/dataSource',
|
|
4
|
+
meta: {
|
|
5
|
+
title: '数据源',
|
|
6
|
+
},
|
|
7
|
+
title: '数据源',
|
|
8
|
+
icons: "el-icon-menu",
|
|
9
|
+
component: () => import("@/views/easydata/dataSource")
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
path: '/easydata/dataSource/EasyDataList/:dataSourceName',
|
|
13
|
+
hidden: true,
|
|
14
|
+
meta: {
|
|
15
|
+
title: '查看数据源',
|
|
16
|
+
},
|
|
17
|
+
title: '查看数据源',
|
|
18
|
+
icons: "el-icon-menu",
|
|
19
|
+
component: () => import("@/views/easydata/dataSourceView")
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
path: '/easydata/templateInfo',
|
|
23
|
+
meta: {
|
|
24
|
+
title: '模板管理',
|
|
25
|
+
},
|
|
26
|
+
title: '模板管理',
|
|
27
|
+
icons: "el-icon-menu",
|
|
28
|
+
component: () => import("@/views/easydata/templateInfo")
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: '/easydata/templateDemo',
|
|
32
|
+
meta: {
|
|
33
|
+
title: '模板测试',
|
|
34
|
+
},
|
|
35
|
+
title: '模板测试',
|
|
36
|
+
icons: "el-icon-menu",
|
|
37
|
+
component: () => import("@/views/easydata/templateDemo")
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
path: '/easydata/Interface',
|
|
41
|
+
meta: {
|
|
42
|
+
title: '接口配置',
|
|
43
|
+
},
|
|
44
|
+
title: '接口配置',
|
|
45
|
+
icons: "el-icon-menu",
|
|
46
|
+
component: () => import("@/views/easydata/Interface")
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ed-card title="富文本预览">
|
|
3
|
+
<ed-rich-preview :value="dataValue"></ed-rich-preview>
|
|
4
|
+
</ed-card>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "BaseRichPreview",
|
|
10
|
+
data(){
|
|
11
|
+
return {
|
|
12
|
+
dataValue:`<p><img src="http://47.108.166.206:48080/admin-api/infra/file/5/get/easydata/biz/2023-11-27/ac1a7b0fcb154ec380ec228313050373.png?t=image" alt="" data-href="" style="width: 245.00px;height: 324.26px;"/><img src="http://47.108.166.206:48080/admin-api/infra/file/5/get/easydata/biz/2023-11-27/321c55bd9d2a4d89af8518ea29bb3f6d.JPG?t=image" alt="" data-href="" style="width: 200.00px;height: 322.90px;"/></p><div data-w-e-type="video" data-w-e-is-void>
|
|
13
|
+
<video poster="" controls="true" width="auto" height="auto"><source src="http://47.108.166.206:48080/admin-api/infra/file/5/get/easydata/biz/2023-11-27/f15359ecc2874b1193eb89bd67cbfebe.mp4?t=image" type="video/mp4"/></video>
|
|
14
|
+
</div><p><br></p>`,
|
|
15
|
+
toolbarConfig: {}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ed-card title="富文本">
|
|
3
|
+
<ed-rich-text v-model="dataValue" :toolbarConfig="toolbarConfig"></ed-rich-text>
|
|
4
|
+
</ed-card>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "BaseRichText",
|
|
10
|
+
data(){
|
|
11
|
+
return {
|
|
12
|
+
dataValue:`<p><img src="http://47.108.166.206:48080/admin-api/infra/file/5/get/easydata/biz/2023-11-27/ac1a7b0fcb154ec380ec228313050373.png?t=image" alt="" data-href="" style="width: 245.00px;height: 324.26px;"/><img src="http://47.108.166.206:48080/admin-api/infra/file/5/get/easydata/biz/2023-11-27/321c55bd9d2a4d89af8518ea29bb3f6d.JPG?t=image" alt="" data-href="" style="width: 200.00px;height: 322.90px;"/></p><div data-w-e-type="video" data-w-e-is-void>
|
|
13
|
+
<video poster="" controls="true" width="auto" height="auto"><source src="http://47.108.166.206:48080/admin-api/infra/file/5/get/easydata/biz/2023-11-27/f15359ecc2874b1193eb89bd67cbfebe.mp4?t=image" type="video/mp4"/></video>
|
|
14
|
+
</div><p><br></p>`,
|
|
15
|
+
toolbarConfig: {}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
watch: {
|
|
19
|
+
dataValue(n, o){
|
|
20
|
+
console.log(n)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style scoped>
|
|
27
|
+
|
|
28
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ed-form :form-desc="formDesc" v-model="formModel"> </ed-form>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import {DefaultUrl, getFileAccessHttpUrl} from "../../../lib/api/easyData";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: "EdFormView",
|
|
10
|
+
data(){
|
|
11
|
+
return {
|
|
12
|
+
formModel: {
|
|
13
|
+
upload: [],
|
|
14
|
+
text: ""
|
|
15
|
+
},
|
|
16
|
+
formDesc: [
|
|
17
|
+
{
|
|
18
|
+
label: "上传",
|
|
19
|
+
props: "upload",
|
|
20
|
+
children: {
|
|
21
|
+
tags: "ed-upload",
|
|
22
|
+
attrs: this.bindUploadProps()
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: "文件描述",
|
|
27
|
+
props: "text",
|
|
28
|
+
children: {
|
|
29
|
+
tags: "el-input"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
methods:{
|
|
36
|
+
bindUploadProps(){
|
|
37
|
+
let props = {}
|
|
38
|
+
props.headers = this.$EdFrame.BASE_HEADERS()
|
|
39
|
+
props.action = this.$EdFrame.BASE_API + '/admin-api' + DefaultUrl.uploadUrl
|
|
40
|
+
// props.beforeUpload = (file) => this.beforeUpload(file, control)
|
|
41
|
+
// props.onPreview = (v) => this.uploadHandleDownload(v, control)
|
|
42
|
+
// props.onSuccess = (res, file, fileList) => this.uploadHandleSuccess(res, file, fileList, control)
|
|
43
|
+
// props.onExceed = (v) => this.uploadHandleExceed(v, controlProps)
|
|
44
|
+
// props.onRemove = (file, fileList) => this.uploadHandleRemove(file, fileList, control.controlName)
|
|
45
|
+
// props.data = controlProps
|
|
46
|
+
return props
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style scoped>
|
|
53
|
+
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- <el-table-->
|
|
4
|
+
<!-- ref="singleTable"-->
|
|
5
|
+
<!-- :data="tableData"-->
|
|
6
|
+
<!-- highlight-current-row-->
|
|
7
|
+
<!-- @current-change="handleCurrentChange"-->
|
|
8
|
+
<!-- style="width: 100%">-->
|
|
9
|
+
<!-- <el-table-column-->
|
|
10
|
+
<!-- type="index"-->
|
|
11
|
+
<!-- width="50">-->
|
|
12
|
+
<!-- </el-table-column>-->
|
|
13
|
+
<!-- <el-table-column-->
|
|
14
|
+
<!-- property="date"-->
|
|
15
|
+
<!-- label="日期"-->
|
|
16
|
+
<!-- width="120">-->
|
|
17
|
+
<!-- </el-table-column>-->
|
|
18
|
+
<!-- <el-table-column-->
|
|
19
|
+
<!-- property="name"-->
|
|
20
|
+
<!-- label="姓名"-->
|
|
21
|
+
<!-- width="120">-->
|
|
22
|
+
<!-- </el-table-column>-->
|
|
23
|
+
<!-- <el-table-column-->
|
|
24
|
+
<!-- property="address"-->
|
|
25
|
+
<!-- label="地址">-->
|
|
26
|
+
<!-- </el-table-column>-->
|
|
27
|
+
<!-- </el-table>-->
|
|
28
|
+
|
|
29
|
+
<ed-table ref="edtable" :data="tableData" :column-type="columnType" :columns="tableColumns" :loading.sync="loading" @row-click="handlerRowClick"
|
|
30
|
+
@selection-change="handleSelectionChange" :pagination="pagination"></ed-table>
|
|
31
|
+
<div style="margin-top: 20px">
|
|
32
|
+
<el-button @click="setCurrent(tableData[1])">选中第二行</el-button>
|
|
33
|
+
<el-button @click="setCurrent()">取消选择</el-button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
export default {
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
loading: false,
|
|
43
|
+
columnType: "radio",
|
|
44
|
+
tableColumns:[
|
|
45
|
+
{
|
|
46
|
+
prop: "date",
|
|
47
|
+
label: "日期"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
prop: "name",
|
|
51
|
+
label: "姓名"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
prop: "address",
|
|
55
|
+
label: "地址"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
tableData: [{
|
|
59
|
+
date: '2016-05-02',
|
|
60
|
+
name: '王小虎',
|
|
61
|
+
address: '上海市普陀区金沙江路 1518 弄'
|
|
62
|
+
}, {
|
|
63
|
+
date: '2016-05-04',
|
|
64
|
+
name: '王小虎',
|
|
65
|
+
address: '上海市普陀区金沙江路 1517 弄'
|
|
66
|
+
}, {
|
|
67
|
+
date: '2016-05-01',
|
|
68
|
+
name: '王小虎',
|
|
69
|
+
address: '上海市普陀区金沙江路 1519 弄'
|
|
70
|
+
}, {
|
|
71
|
+
date: '2016-05-03',
|
|
72
|
+
name: '王小虎',
|
|
73
|
+
address: '上海市普陀区金沙江路 1516 弄'
|
|
74
|
+
}],
|
|
75
|
+
currentRow: null,
|
|
76
|
+
pagination: {
|
|
77
|
+
current: 1,
|
|
78
|
+
pageSize: 10,
|
|
79
|
+
total: 0,
|
|
80
|
+
pageSizes: [10, 20, 30]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
mounted() {
|
|
85
|
+
// this.setCurrent(this.tableData[1])
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
setCurrent(row) {
|
|
89
|
+
this.$refs.edtable.setCurrentRow(row);
|
|
90
|
+
},
|
|
91
|
+
handleCurrentChange(val) {
|
|
92
|
+
this.currentRow = val;
|
|
93
|
+
},
|
|
94
|
+
handlerRowClick(){},
|
|
95
|
+
handleSelectionChange(){}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</script>
|