swordpass-ui 1.0.0
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/LICENSE +21 -0
- package/README.md +37 -0
- package/lib/demo.html +10 -0
- package/lib/img/icon_found_img.c785c1b7.png +0 -0
- package/lib/sword-vue-ui.common.js +61402 -0
- package/lib/sword-vue-ui.css +1 -0
- package/lib/sword-vue-ui.umd.js +61412 -0
- package/lib/sword-vue-ui.umd.min.js +6 -0
- package/package.json +109 -0
- package/packages/AddQueryStrategy/index.js +7 -0
- package/packages/AddQueryStrategy/src/main.vue +236 -0
- package/packages/Autocomplete/index.js +7 -0
- package/packages/Autocomplete/src/main.vue +192 -0
- package/packages/Button/index.js +7 -0
- package/packages/Button/src/main.vue +90 -0
- package/packages/Cascader/index.js +7 -0
- package/packages/Cascader/src/main.vue +210 -0
- package/packages/Chart/index.js +7 -0
- package/packages/Chart/src/Chart.vue +831 -0
- package/packages/Checkbox/index.js +7 -0
- package/packages/Checkbox/src/main.vue +200 -0
- package/packages/Collapse/index.js +7 -0
- package/packages/Collapse/src/ClCollapse.vue +67 -0
- package/packages/Collapse/src/ClCollapseItem.vue +21 -0
- package/packages/CollapseItem/index.js +7 -0
- package/packages/CustomDialog/index.js +7 -0
- package/packages/CustomDialog/src/customDialog.js +99 -0
- package/packages/CustomDialog/src/main.vue +1944 -0
- package/packages/DataView/index.js +7 -0
- package/packages/DataView/src/DataView.vue +45 -0
- package/packages/Date/index.js +7 -0
- package/packages/Date/src/main.vue +180 -0
- package/packages/DatePicker/index.js +7 -0
- package/packages/DatePicker/src/main.vue +155 -0
- package/packages/Demension/index.js +7 -0
- package/packages/Demension/src/main.vue +379 -0
- package/packages/Dialog/index.js +7 -0
- package/packages/Dialog/src/main.vue +160 -0
- package/packages/Dictionary/index.js +7 -0
- package/packages/Dictionary/src/main.vue +204 -0
- package/packages/DimensionSelector/index.js +7 -0
- package/packages/DimensionSelector/src/main.vue +359 -0
- package/packages/DimensionSelectorInput/index.js +7 -0
- package/packages/DimensionSelectorInput/src/main.vue +79 -0
- package/packages/Divider/index.js +7 -0
- package/packages/Divider/src/main.vue +38 -0
- package/packages/Duration/index.js +7 -0
- package/packages/Duration/src/main.vue +172 -0
- package/packages/Editor/index.js +7 -0
- package/packages/Editor/src/main.vue +280 -0
- package/packages/Explain/index.js +7 -0
- package/packages/Explain/src/main.vue +55 -0
- package/packages/FieldTail/index.js +7 -0
- package/packages/FieldTail/src/main.vue +163 -0
- package/packages/File/index.js +7 -0
- package/packages/File/src/FileCard.vue +169 -0
- package/packages/File/src/FileList.vue +180 -0
- package/packages/File/src/FileTable.vue +223 -0
- package/packages/File/src/main.vue +467 -0
- package/packages/FileUpload/index.js +7 -0
- package/packages/FileUpload/src/main.vue +222 -0
- package/packages/FlowChart/index.js +7 -0
- package/packages/FlowChart/src/main.vue +386 -0
- package/packages/FormItem/index.js +7 -0
- package/packages/FormItem/src/main.vue +167 -0
- package/packages/Global/index.js +12 -0
- package/packages/Global/src/GlobalQuery.vue +200 -0
- package/packages/Global/src/GlobalValidate.vue +69 -0
- package/packages/Icon/index.js +7 -0
- package/packages/Icon/src/icons/ad.js +14 -0
- package/packages/Icon/src/icons/address-book.js +14 -0
- package/packages/Icon/src/icons/arrow.js +14 -0
- package/packages/Icon/src/icons/attachment.js +18 -0
- package/packages/Icon/src/icons/balance.js +14 -0
- package/packages/Icon/src/icons/ban.js +14 -0
- package/packages/Icon/src/icons/bell.js +14 -0
- package/packages/Icon/src/icons/block.js +26 -0
- package/packages/Icon/src/icons/book.js +14 -0
- package/packages/Icon/src/icons/bookmark.js +14 -0
- package/packages/Icon/src/icons/bug.js +22 -0
- package/packages/Icon/src/icons/bullhorn.js +14 -0
- package/packages/Icon/src/icons/calc.js +14 -0
- package/packages/Icon/src/icons/checkbox.js +14 -0
- package/packages/Icon/src/icons/circle.js +14 -0
- package/packages/Icon/src/icons/close.js +14 -0
- package/packages/Icon/src/icons/cloud-sun.js +14 -0
- package/packages/Icon/src/icons/coffee.js +14 -0
- package/packages/Icon/src/icons/component.js +14 -0
- package/packages/Icon/src/icons/compress.js +14 -0
- package/packages/Icon/src/icons/copyright.js +14 -0
- package/packages/Icon/src/icons/dialog.js +14 -0
- package/packages/Icon/src/icons/download.js +14 -0
- package/packages/Icon/src/icons/duration.js +14 -0
- package/packages/Icon/src/icons/excel.js +18 -0
- package/packages/Icon/src/icons/expand.js +14 -0
- package/packages/Icon/src/icons/export.js +21 -0
- package/packages/Icon/src/icons/eye-slash.js +14 -0
- package/packages/Icon/src/icons/eye.js +14 -0
- package/packages/Icon/src/icons/file.js +18 -0
- package/packages/Icon/src/icons/form.js +14 -0
- package/packages/Icon/src/icons/ganged.js +14 -0
- package/packages/Icon/src/icons/gaode.js +27 -0
- package/packages/Icon/src/icons/gift.js +14 -0
- package/packages/Icon/src/icons/home.js +14 -0
- package/packages/Icon/src/icons/image.js +14 -0
- package/packages/Icon/src/icons/import.js +18 -0
- package/packages/Icon/src/icons/index.js +67 -0
- package/packages/Icon/src/icons/info.js +21 -0
- package/packages/Icon/src/icons/laptop.js +14 -0
- package/packages/Icon/src/icons/line.js +34 -0
- package/packages/Icon/src/icons/lock.js +14 -0
- package/packages/Icon/src/icons/map.js +18 -0
- package/packages/Icon/src/icons/more.js +19 -0
- package/packages/Icon/src/icons/move.js +14 -0
- package/packages/Icon/src/icons/org.js +18 -0
- package/packages/Icon/src/icons/palette.js +14 -0
- package/packages/Icon/src/icons/plan.js +17 -0
- package/packages/Icon/src/icons/ppt.js +18 -0
- package/packages/Icon/src/icons/question.js +18 -0
- package/packages/Icon/src/icons/radio.js +14 -0
- package/packages/Icon/src/icons/refresh.js +14 -0
- package/packages/Icon/src/icons/search.js +14 -0
- package/packages/Icon/src/icons/select.js +14 -0
- package/packages/Icon/src/icons/setting.js +18 -0
- package/packages/Icon/src/icons/simple-collapse.js +18 -0
- package/packages/Icon/src/icons/simple-expand.js +14 -0
- package/packages/Icon/src/icons/sort.js +22 -0
- package/packages/Icon/src/icons/sword.js +26 -0
- package/packages/Icon/src/icons/table.js +14 -0
- package/packages/Icon/src/icons/time.js +14 -0
- package/packages/Icon/src/icons/tree.js +14 -0
- package/packages/Icon/src/icons/typography.js +18 -0
- package/packages/Icon/src/icons/upload.js +18 -0
- package/packages/Icon/src/icons/user.js +14 -0
- package/packages/Icon/src/icons/users.js +30 -0
- package/packages/Icon/src/icons/video.js +14 -0
- package/packages/Icon/src/icons/word.js +18 -0
- package/packages/Icon/src/main.vue +432 -0
- package/packages/Image/index.js +7 -0
- package/packages/Image/src/main.vue +66 -0
- package/packages/Input/index.js +7 -0
- package/packages/Input/src/main.vue +552 -0
- package/packages/JobSelector/index.js +7 -0
- package/packages/JobSelector/src/main.vue +339 -0
- package/packages/JobSelectorInput/index.js +7 -0
- package/packages/JobSelectorInput/src/main.vue +87 -0
- package/packages/Map/index.js +7 -0
- package/packages/Map/src/Map.vue +427 -0
- package/packages/Milepost/index.js +7 -0
- package/packages/Milepost/src/main.vue +45 -0
- package/packages/OnlineForm/index.js +7 -0
- package/packages/OnlineForm/src/Form.vue +359 -0
- package/packages/OrgPostDialog/index.js +7 -0
- package/packages/OrgPostDialog/src/main.vue +244 -0
- package/packages/OrgSelector/index.js +7 -0
- package/packages/OrgSelector/src/main.vue +493 -0
- package/packages/OrgSelectorInput/index.js +7 -0
- package/packages/OrgSelectorInput/src/OrgSelectorInput.vue +216 -0
- package/packages/PostSelector/index.js +7 -0
- package/packages/PostSelector/src/main.vue +463 -0
- package/packages/PostSelectorInput/index.js +7 -0
- package/packages/PostSelectorInput/src/PostSelectorInput.vue +200 -0
- package/packages/Preview/index.js +7 -0
- package/packages/Preview/src/FillPage.vue +311 -0
- package/packages/Preview/src/FrameViewer.vue +135 -0
- package/packages/Preview/src/Loading.vue +126 -0
- package/packages/Preview/src/PdfViewer.vue +125 -0
- package/packages/Preview/src/TextViewer.vue +99 -0
- package/packages/Preview/src/main.vue +242 -0
- package/packages/Preview/src/watermark.js +124 -0
- package/packages/ProcessRecord/index.js +7 -0
- package/packages/ProcessRecord/src/main.vue +392 -0
- package/packages/Qrcode/index.js +7 -0
- package/packages/Qrcode/src/Qrcode.vue +105 -0
- package/packages/QuerySqlPreview/index.js +7 -0
- package/packages/QuerySqlPreview/src/QuerySqlPreview.vue +163 -0
- package/packages/Radio/index.js +7 -0
- package/packages/Radio/src/main.vue +172 -0
- package/packages/Rate/index.js +7 -0
- package/packages/Rate/src/main.vue +89 -0
- package/packages/ReadonlyInput/index.js +7 -0
- package/packages/ReadonlyInput/src/main.vue +92 -0
- package/packages/RelevantFlow/index.js +7 -0
- package/packages/RelevantFlow/src/main.vue +547 -0
- package/packages/RelevantFlow/src/relevantFlow.js +28 -0
- package/packages/RoleSelector/index.js +7 -0
- package/packages/RoleSelector/src/main.vue +358 -0
- package/packages/RoleSelectorInput/index.js +7 -0
- package/packages/RoleSelectorInput/src/main.vue +84 -0
- package/packages/SaveButton/index.js +7 -0
- package/packages/SaveButton/src/main.vue +73 -0
- package/packages/Select/index.js +7 -0
- package/packages/Select/src/main.vue +330 -0
- package/packages/SelectTree/index.js +7 -0
- package/packages/SelectTree/src/SelectTree.vue +352 -0
- package/packages/Selector/index.js +7 -0
- package/packages/Selector/src/main.vue +617 -0
- package/packages/SidebarDialog/index.js +7 -0
- package/packages/SidebarDialog/src/main.vue +156 -0
- package/packages/Slider/index.js +7 -0
- package/packages/Slider/src/main.vue +84 -0
- package/packages/Step/index.js +7 -0
- package/packages/StepLayout/index.js +7 -0
- package/packages/Steps/index.js +7 -0
- package/packages/Steps/src/Step.vue +122 -0
- package/packages/Steps/src/StepLayout.vue +35 -0
- package/packages/Steps/src/Steps.vue +65 -0
- package/packages/Subtable/index.js +33 -0
- package/packages/Subtable/src/SubDialog.vue +1926 -0
- package/packages/Subtable/src/SubExportDialog.vue +115 -0
- package/packages/Subtable/src/SubImportDialog.vue +316 -0
- package/packages/Subtable/src/SubPagination.vue +112 -0
- package/packages/Subtable/src/SubtableBackfill.vue +83 -0
- package/packages/Subtable/src/dialog.js +42 -0
- package/packages/Switch/index.js +7 -0
- package/packages/Switch/src/main.vue +83 -0
- package/packages/Table/index.js +7 -0
- package/packages/Table/src/CustomColumn.vue +351 -0
- package/packages/Table/src/Table.vue +979 -0
- package/packages/TableColumn/index.js +7 -0
- package/packages/TableColumn/src/main.vue +177 -0
- package/packages/TableSearchField/index.js +7 -0
- package/packages/TableSearchField/src/main.vue +334 -0
- package/packages/TableSearchPanel/index.js +7 -0
- package/packages/TableSearchPanel/src/main.vue +149 -0
- package/packages/Tabs/index.js +7 -0
- package/packages/Tabs/src/Tabs.vue +140 -0
- package/packages/Tag/index.js +7 -0
- package/packages/Tag/src/main.vue +264 -0
- package/packages/TemplateBatchUpdate/index.js +7 -0
- package/packages/TemplateBatchUpdate/src/TemplateBatchUpdateDialog.vue +174 -0
- package/packages/TemplateForm/index.js +7 -0
- package/packages/TemplateForm/src/main.vue +645 -0
- package/packages/TemplateFormDialog/index.js +7 -0
- package/packages/TemplateFormDialog/src/main.vue +61 -0
- package/packages/TemplateImportResult/index.js +7 -0
- package/packages/TemplateImportResult/src/main.vue +158 -0
- package/packages/TemplatePreview/index.js +19 -0
- package/packages/TemplatePreview/src/TemplatePreview.vue +169 -0
- package/packages/TemplatePreview/src/TemplatePreviewFile.vue +171 -0
- package/packages/TemplatePreview/src/TemplatePreviewImage.vue +83 -0
- package/packages/TemplateTaskCirculate/index.js +7 -0
- package/packages/TemplateTaskCirculate/src/main.vue +238 -0
- package/packages/Text/index.js +7 -0
- package/packages/Text/src/main.vue +57 -0
- package/packages/TimePicker/index.js +7 -0
- package/packages/TimePicker/src/main.vue +139 -0
- package/packages/TimeSelect/index.js +7 -0
- package/packages/TimeSelect/src/main.vue +96 -0
- package/packages/Tree/index.js +7 -0
- package/packages/Tree/src/main.vue +439 -0
- package/packages/TreeDialog/index.js +7 -0
- package/packages/TreeDialog/src/main.vue +293 -0
- package/packages/TreeListDialog/index.js +7 -0
- package/packages/TreeListDialog/src/main.vue +219 -0
- package/packages/Typography/index.js +8 -0
- package/packages/Typography/src/create-header.js +72 -0
- package/packages/UserDialog/index.js +7 -0
- package/packages/UserDialog/src/main.vue +250 -0
- package/packages/UserSelector/index.js +7 -0
- package/packages/UserSelector/src/main.vue +746 -0
- package/packages/UserSelectorInput/index.js +7 -0
- package/packages/UserSelectorInput/src/main.vue +319 -0
- package/packages/picture/index.js +7 -0
- package/packages/picture/src/main.vue +530 -0
- package/packages/plugins/Echarts.js +30 -0
- package/packages/plugins/Map.js +29 -0
- package/packages/plugins/Preview.js +49 -0
- package/packages/plugins/Qrcode.js +7 -0
- package/packages/plugins/XLSX.js +7 -0
- package/packages/plugins/wangeditor.js +19 -0
- package/src/assets/icon_found_img.png +0 -0
- package/src/assets/table-no-data.png +0 -0
- package/src/directive/badge.js +53 -0
- package/src/directive/copy.js +47 -0
- package/src/directive/ellipsis.js +6 -0
- package/src/directive/expandClick.js +23 -0
- package/src/directive/express.js +86 -0
- package/src/directive/form.js +122 -0
- package/src/directive/format.js +24 -0
- package/src/directive/formulas.js +708 -0
- package/src/directive/index.js +42 -0
- package/src/directive/permissionLine.js +59 -0
- package/src/directive/permissionLineLable.js +56 -0
- package/src/directive/permit.js +23 -0
- package/src/directive/popconfirm.js +86 -0
- package/src/directive/relatedQuery.js +61 -0
- package/src/directive/resize.js +18 -0
- package/src/directive/subSort.js +18 -0
- package/src/directive/tableDrag.js +25 -0
- package/src/directive/tooltip.js +37 -0
- package/src/filter/computerSize.js +23 -0
- package/src/filter/dateFormat.js +10 -0
- package/src/filter/index.js +10 -0
- package/src/index.js +267 -0
- package/src/locale/format.js +44 -0
- package/src/locale/index.js +48 -0
- package/src/locale/lang/en.js +59 -0
- package/src/locale/lang/zh-CN.js +58 -0
- package/src/locale/lang/zh-TW.js +57 -0
- package/src/locale/validate/dict.js +223 -0
- package/src/math.js +270 -0
- package/src/mixins/emitter.js +33 -0
- package/src/mixins/form.js +25 -0
- package/src/mixins/formDataUpdate.js +32 -0
- package/src/mixins/ganged.js +126 -0
- package/src/mixins/inputName.js +30 -0
- package/src/mixins/linkage.js +403 -0
- package/src/mixins/locale.js +9 -0
- package/src/mixins/mobileMode.js +27 -0
- package/src/mixins/onlineHottable.js +105 -0
- package/src/mixins/onlineSubtable.js +468 -0
- package/src/mixins/permission.js +84 -0
- package/src/mixins/querySqlPreview.js +747 -0
- package/src/mixins/regionValidator.js +70 -0
- package/src/mixins/script.js +35 -0
- package/src/mixins/templatePreview.js +3673 -0
- package/src/service.js +336 -0
- package/src/services/CustomQuery.js +199 -0
- package/src/services/SubPagination.js +132 -0
- package/src/styles/index.scss +7 -0
- package/src/styles/selector.scss +127 -0
- package/src/styles/variables.scss +71 -0
- package/src/util/base64.js +21 -0
- package/src/util/brower.js +15 -0
- package/src/util/clone.js +61 -0
- package/src/util/path.js +4 -0
- package/src/util/request.js +14 -0
- package/src/utils.js +1205 -0
- package/src/validate.js +184 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="permission_sub !== 'n'" class="amap-page">
|
|
3
|
+
<!-- 铺开时 -->
|
|
4
|
+
<template v-if="showEffect === 'tile'">
|
|
5
|
+
<cl-input
|
|
6
|
+
v-model="inputVal"
|
|
7
|
+
:permission="permission_sub"
|
|
8
|
+
:name="inputName"
|
|
9
|
+
:title="inputVal"
|
|
10
|
+
:display-style="displayStyle"
|
|
11
|
+
:clearable="false"
|
|
12
|
+
>
|
|
13
|
+
<i
|
|
14
|
+
v-if="inputWriteable"
|
|
15
|
+
slot="prefix"
|
|
16
|
+
class="el-input__icon"
|
|
17
|
+
title="地图选点"
|
|
18
|
+
>
|
|
19
|
+
<cl-icon name="map" />
|
|
20
|
+
</i>
|
|
21
|
+
<i
|
|
22
|
+
v-if="inputWriteable && inputVal"
|
|
23
|
+
slot="suffix"
|
|
24
|
+
title="清除地址数据"
|
|
25
|
+
class="el-input__icon"
|
|
26
|
+
@click="clearPosition"
|
|
27
|
+
>
|
|
28
|
+
<cl-icon name="close" />
|
|
29
|
+
</i>
|
|
30
|
+
</cl-input>
|
|
31
|
+
<div class="amap-page_map_container" :style="mapStyle">
|
|
32
|
+
<div v-if="plugin.length > 0">
|
|
33
|
+
<el-amap-search-box
|
|
34
|
+
class="search-box"
|
|
35
|
+
:search-option="searchOption"
|
|
36
|
+
:on-search-result="onSearchResult"
|
|
37
|
+
></el-amap-search-box>
|
|
38
|
+
<el-amap
|
|
39
|
+
vid="amap"
|
|
40
|
+
:plugin="plugin"
|
|
41
|
+
:center="mapCenter"
|
|
42
|
+
class="amap-demo"
|
|
43
|
+
:zoom="zoom"
|
|
44
|
+
:resize-enable="resizeEnable"
|
|
45
|
+
:events="events"
|
|
46
|
+
>
|
|
47
|
+
<el-amap-marker
|
|
48
|
+
v-for="(marker, $index) in markers"
|
|
49
|
+
:key="$index"
|
|
50
|
+
:position="marker"
|
|
51
|
+
></el-amap-marker>
|
|
52
|
+
</el-amap>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
<template v-else>
|
|
57
|
+
<cl-input
|
|
58
|
+
v-model="inputVal"
|
|
59
|
+
:permission="permission_sub"
|
|
60
|
+
:name="inputName"
|
|
61
|
+
:title="inputVal"
|
|
62
|
+
:display-style="displayStyle"
|
|
63
|
+
:clearable="false"
|
|
64
|
+
>
|
|
65
|
+
<i
|
|
66
|
+
v-if="inputWriteable"
|
|
67
|
+
slot="prefix"
|
|
68
|
+
class="el-input__icon"
|
|
69
|
+
title="地图选点"
|
|
70
|
+
@click="openMapDia"
|
|
71
|
+
>
|
|
72
|
+
<cl-icon name="map" />
|
|
73
|
+
</i>
|
|
74
|
+
<template slot="append">
|
|
75
|
+
<cl-icon name="gaode" class="amap-page_map" @click="openMapDia" />
|
|
76
|
+
</template>
|
|
77
|
+
<i
|
|
78
|
+
v-if="inputWriteable && inputVal"
|
|
79
|
+
slot="suffix"
|
|
80
|
+
title="清除地址数据"
|
|
81
|
+
class="el-input__icon"
|
|
82
|
+
@click="clearPosition"
|
|
83
|
+
>
|
|
84
|
+
<cl-icon name="close" />
|
|
85
|
+
</i>
|
|
86
|
+
</cl-input>
|
|
87
|
+
|
|
88
|
+
<!-- 地图弹框 -->
|
|
89
|
+
<div v-show="mapDiaVisible" class="amap-page_dialog">
|
|
90
|
+
<div class="amap-page_dialog_container">
|
|
91
|
+
<div v-if="plugin.length > 0">
|
|
92
|
+
<el-amap-search-box
|
|
93
|
+
class="search-box"
|
|
94
|
+
:search-option="searchOption"
|
|
95
|
+
:on-search-result="onSearchResult"
|
|
96
|
+
></el-amap-search-box>
|
|
97
|
+
<el-amap
|
|
98
|
+
vid="amap"
|
|
99
|
+
:plugin="plugin"
|
|
100
|
+
:center="mapCenter"
|
|
101
|
+
class="amap-demo"
|
|
102
|
+
:zoom="zoom"
|
|
103
|
+
:resize-enable="resizeEnable"
|
|
104
|
+
:events="events"
|
|
105
|
+
>
|
|
106
|
+
<el-amap-marker
|
|
107
|
+
v-for="(marker, $index) in markers"
|
|
108
|
+
:key="$index"
|
|
109
|
+
:position="marker"
|
|
110
|
+
></el-amap-marker>
|
|
111
|
+
</el-amap>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="amap-page_dialog_text">
|
|
115
|
+
<div>{{ preAddress }}</div>
|
|
116
|
+
<div v-if="prePosition.length">
|
|
117
|
+
经度:{{ prePosition[0] }},纬度:{{ prePosition[1] }}
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="amap-page_dialog_footer">
|
|
121
|
+
<el-button type="primary" @click="confirmAddress">确定</el-button>
|
|
122
|
+
<el-button @click="mapDiaVisible = false">取消</el-button>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
126
|
+
</div>
|
|
127
|
+
</template>
|
|
128
|
+
<script>
|
|
129
|
+
import permission from '@/mixins/permission.js'
|
|
130
|
+
import inputName from '@/mixins/inputName.js'
|
|
131
|
+
import form from '@/mixins/form.js'
|
|
132
|
+
import utils from '@/utils.js'
|
|
133
|
+
|
|
134
|
+
export default {
|
|
135
|
+
name: 'ClMap',
|
|
136
|
+
mixins: [permission, inputName, form],
|
|
137
|
+
props: {
|
|
138
|
+
value: String,
|
|
139
|
+
appendPosition: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: false,
|
|
142
|
+
},
|
|
143
|
+
locationPath: String,
|
|
144
|
+
showEffect: String, // dialog 弹出 tile 铺开
|
|
145
|
+
widthMap: String,
|
|
146
|
+
heightMap: String,
|
|
147
|
+
},
|
|
148
|
+
data() {
|
|
149
|
+
const self = this
|
|
150
|
+
return {
|
|
151
|
+
mapCenter: [121.59996, 31.197646],
|
|
152
|
+
markers: [],
|
|
153
|
+
address: '',
|
|
154
|
+
zoom: 12,
|
|
155
|
+
resizeEnable: true,
|
|
156
|
+
lng: 0,
|
|
157
|
+
lat: 0,
|
|
158
|
+
loaded: false,
|
|
159
|
+
searchOption: {
|
|
160
|
+
//poi搜索条件 默认全国
|
|
161
|
+
city: '全国',
|
|
162
|
+
citylimit: false, //是否限制城市内搜索
|
|
163
|
+
},
|
|
164
|
+
plugin: [],
|
|
165
|
+
mapDiaVisible: false,
|
|
166
|
+
preAddress: '',
|
|
167
|
+
prePosition: [],
|
|
168
|
+
events: {
|
|
169
|
+
click: self.mapClick,
|
|
170
|
+
},
|
|
171
|
+
geocoder: null,
|
|
172
|
+
position: [],
|
|
173
|
+
addressText: '',
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
computed: {
|
|
177
|
+
inputVal() {
|
|
178
|
+
return this.value
|
|
179
|
+
},
|
|
180
|
+
formatAddress() {
|
|
181
|
+
let str = this.addressText
|
|
182
|
+
if (str && this.appendPosition) {
|
|
183
|
+
str += ' 坐标' + JSON.stringify(this.position)
|
|
184
|
+
}
|
|
185
|
+
return str
|
|
186
|
+
},
|
|
187
|
+
mapStyle() {
|
|
188
|
+
return {
|
|
189
|
+
width: this.widthMap,
|
|
190
|
+
height: this.heightMap,
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
watch: {
|
|
195
|
+
formatAddress: function (newVal) {
|
|
196
|
+
if (newVal === this.value) {
|
|
197
|
+
return
|
|
198
|
+
}
|
|
199
|
+
this.$emit('input', newVal)
|
|
200
|
+
if (!this.appendPosition && this.locationPath) {
|
|
201
|
+
this.updateFormVal(this.position)
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
mounted() {
|
|
206
|
+
if (this.showEffect === 'tile') {
|
|
207
|
+
this.initMap()
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
methods: {
|
|
211
|
+
onSearchResult(pois) {
|
|
212
|
+
if (pois.length > 0) {
|
|
213
|
+
//获取选择的地址经纬度
|
|
214
|
+
this.updateMarker(pois[0])
|
|
215
|
+
this.updateCurVal(pois[0].address + pois[0].name, [
|
|
216
|
+
pois[0].lng,
|
|
217
|
+
pois[0].lat,
|
|
218
|
+
])
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
initMap() {
|
|
222
|
+
const self = this
|
|
223
|
+
setTimeout(() => {
|
|
224
|
+
self.plugin = [
|
|
225
|
+
'AMap.Autocomplete',
|
|
226
|
+
{
|
|
227
|
+
enableHighAccuracy: true, //是否使用高精度定位,默认:true
|
|
228
|
+
timeout: 10000, //超过10秒后停止定位,默认:5s
|
|
229
|
+
buttonPosition: 'RB', //定位按钮的停靠位置
|
|
230
|
+
// eslint-disable-next-line
|
|
231
|
+
buttonOffset: new AMap.Pixel(5, 10), //定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
|
|
232
|
+
zoomToAccuracy: true, //定位成功后是否自动调整地图视野到定位点
|
|
233
|
+
markerOptions: {
|
|
234
|
+
//自定义定位点样式,同Marker的Options
|
|
235
|
+
// eslint-disable-next-line
|
|
236
|
+
offset: new AMap.Pixel(-18, -36),
|
|
237
|
+
content:
|
|
238
|
+
'<img src="https://a.amap.com/jsapi_demos/static/resource/img/user.png" style="width:36px;height:36px"/>',
|
|
239
|
+
},
|
|
240
|
+
showCircle: true, //是否显示定位精度圈
|
|
241
|
+
circleOptions: {
|
|
242
|
+
//定位精度圈的样式
|
|
243
|
+
strokeColor: '#0093FF',
|
|
244
|
+
noSelect: true,
|
|
245
|
+
strokeOpacity: 0.5,
|
|
246
|
+
strokeWeight: 1,
|
|
247
|
+
fillColor: '#02B0FF',
|
|
248
|
+
fillOpacity: 0.25,
|
|
249
|
+
},
|
|
250
|
+
extensions: 'all',
|
|
251
|
+
pName: 'Geolocation',
|
|
252
|
+
events: {
|
|
253
|
+
init(o) {
|
|
254
|
+
if (!self.value) {
|
|
255
|
+
// o 是高德地图定位插件实例 获取当前位置
|
|
256
|
+
o.getCurrentPosition((status, result) => {
|
|
257
|
+
if (result && result.position) {
|
|
258
|
+
self.lng = result.position.lng
|
|
259
|
+
self.lat = result.position.lat
|
|
260
|
+
self.center = [self.lng, self.lat]
|
|
261
|
+
self.getAddressByCode(result.position)
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
//poi搜索插件
|
|
270
|
+
pName: 'PlaceSearch',
|
|
271
|
+
events: {
|
|
272
|
+
init() {},
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
]
|
|
276
|
+
// eslint-disable-next-line
|
|
277
|
+
self.geocoder = new AMap.Geocoder()
|
|
278
|
+
}, 500)
|
|
279
|
+
},
|
|
280
|
+
openMapDia() {
|
|
281
|
+
if (!this.inputWriteable) {
|
|
282
|
+
return
|
|
283
|
+
}
|
|
284
|
+
if (typeof AMap == 'undefined') {
|
|
285
|
+
this.$message.error('当前未引入地图组件,无法加载地图。')
|
|
286
|
+
return
|
|
287
|
+
}
|
|
288
|
+
this.mapDiaVisible = true
|
|
289
|
+
this.initMap()
|
|
290
|
+
},
|
|
291
|
+
confirmAddress() {
|
|
292
|
+
this.addressText = this.preAddress
|
|
293
|
+
this.position = this.prePosition
|
|
294
|
+
this.mapDiaVisible = false
|
|
295
|
+
},
|
|
296
|
+
mapClick(data) {
|
|
297
|
+
this.updateMarker(data.lnglat)
|
|
298
|
+
this.getAddressByCode(data.lnglat)
|
|
299
|
+
},
|
|
300
|
+
// 更新点
|
|
301
|
+
updateMarker(position) {
|
|
302
|
+
this.mapCenter = [position.lng, position.lat]
|
|
303
|
+
if (
|
|
304
|
+
this.markers.length > 0 &&
|
|
305
|
+
this.markers[0][0] != this.mapCenter[0] &&
|
|
306
|
+
this.markers[0][1] != this.mapCenter[1]
|
|
307
|
+
) {
|
|
308
|
+
this.markers = [] //清空经纬度
|
|
309
|
+
this.markers.push([position.lng, position.lat])
|
|
310
|
+
} else if (this.markers.length == 0) {
|
|
311
|
+
this.markers.push([position.lng, position.lat])
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
getAddressByCode(data) {
|
|
315
|
+
this.geocoder.getAddress([data.lng, data.lat], (status, result) => {
|
|
316
|
+
if (status === 'complete' && result.regeocode) {
|
|
317
|
+
this.updateCurVal(result.regeocode.formattedAddress, [
|
|
318
|
+
data.lng,
|
|
319
|
+
data.lat,
|
|
320
|
+
])
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
},
|
|
324
|
+
updateCurVal(name, position) {
|
|
325
|
+
if (!this.inputWriteable) {
|
|
326
|
+
return
|
|
327
|
+
}
|
|
328
|
+
this.preAddress = name
|
|
329
|
+
this.prePosition = position
|
|
330
|
+
if (this.showEffect === 'tile') {
|
|
331
|
+
this.confirmAddress()
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
clearPosition() {
|
|
335
|
+
this.position = []
|
|
336
|
+
this.addressText = ''
|
|
337
|
+
},
|
|
338
|
+
// 更新绑定的字段
|
|
339
|
+
updateFormVal(value) {
|
|
340
|
+
const pInst = utils.getOnlineFormInstance(this)
|
|
341
|
+
utils.setValueByPath(
|
|
342
|
+
pInst,
|
|
343
|
+
this.locationPath,
|
|
344
|
+
value && value.length ? JSON.stringify(value) : ''
|
|
345
|
+
)
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
}
|
|
349
|
+
</script>
|
|
350
|
+
<style lang="scss">
|
|
351
|
+
.el-vue-search-box-container .search-tips {
|
|
352
|
+
position: absolute;
|
|
353
|
+
top: 100%;
|
|
354
|
+
height: 280px;
|
|
355
|
+
border: 0 !important;
|
|
356
|
+
background: #fff;
|
|
357
|
+
overflow: auto;
|
|
358
|
+
}
|
|
359
|
+
.amap-page {
|
|
360
|
+
width: 100%;
|
|
361
|
+
.amap-page_map {
|
|
362
|
+
cursor: pointer;
|
|
363
|
+
}
|
|
364
|
+
.amap-page_content {
|
|
365
|
+
border: 1px solid #ddd;
|
|
366
|
+
border-radius: 5px;
|
|
367
|
+
padding: 10px;
|
|
368
|
+
margin-bottom: 5px;
|
|
369
|
+
.amap-page_text {
|
|
370
|
+
line-height: 20px;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
.amap-page_btn {
|
|
374
|
+
width: 100%;
|
|
375
|
+
}
|
|
376
|
+
.amap-page_dialog {
|
|
377
|
+
position: fixed;
|
|
378
|
+
top: 0;
|
|
379
|
+
left: 0;
|
|
380
|
+
right: 0;
|
|
381
|
+
bottom: 0;
|
|
382
|
+
display: flex;
|
|
383
|
+
flex-direction: column;
|
|
384
|
+
background: #fff;
|
|
385
|
+
z-index: 2021;
|
|
386
|
+
.amap-page_dialog_container {
|
|
387
|
+
width: 100%;
|
|
388
|
+
flex: 1;
|
|
389
|
+
position: relative;
|
|
390
|
+
> div {
|
|
391
|
+
height: 100%;
|
|
392
|
+
width: 100%;
|
|
393
|
+
}
|
|
394
|
+
.search-box {
|
|
395
|
+
position: absolute !important;
|
|
396
|
+
width: 90%;
|
|
397
|
+
top: 10px;
|
|
398
|
+
left: 5%;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
.amap-page_dialog_text {
|
|
402
|
+
padding: 10px;
|
|
403
|
+
font-size: 14px;
|
|
404
|
+
color: #606266;
|
|
405
|
+
margin-top: 5px;
|
|
406
|
+
line-height: 20px;
|
|
407
|
+
}
|
|
408
|
+
.amap-page_dialog_footer {
|
|
409
|
+
text-align: center;
|
|
410
|
+
padding: 20px;
|
|
411
|
+
border-top: 1px solid #ddd;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
.amap-page_map_container {
|
|
415
|
+
position: relative;
|
|
416
|
+
> div {
|
|
417
|
+
width: 100%;
|
|
418
|
+
height: 100%;
|
|
419
|
+
.search-box {
|
|
420
|
+
position: absolute;
|
|
421
|
+
top: 10px;
|
|
422
|
+
right: 10px;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-steps
|
|
3
|
+
v-if="permission_sub != 'n'"
|
|
4
|
+
:active="inputVal"
|
|
5
|
+
:direction="direction"
|
|
6
|
+
align-center
|
|
7
|
+
finish-status="success"
|
|
8
|
+
>
|
|
9
|
+
<el-step
|
|
10
|
+
v-for="item in stepList"
|
|
11
|
+
:key="item.title"
|
|
12
|
+
:title="item.title"
|
|
13
|
+
:description="item.description"
|
|
14
|
+
></el-step>
|
|
15
|
+
</el-steps>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
import permission from '@/mixins/permission.js'
|
|
19
|
+
import inputName from '@/mixins/inputName.js'
|
|
20
|
+
import form from '@/mixins/form.js'
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'ClMilepost',
|
|
24
|
+
mixins: [permission, inputName, form],
|
|
25
|
+
props: {
|
|
26
|
+
value: [Number, String],
|
|
27
|
+
direction: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
content: String,
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
inputVal: function() {
|
|
34
|
+
if (this.value === null || this.value === undefined) {
|
|
35
|
+
return 1
|
|
36
|
+
}
|
|
37
|
+
const valNum = Number(this.value)
|
|
38
|
+
return isNaN(valNum) ? 1 : valNum
|
|
39
|
+
},
|
|
40
|
+
stepList() {
|
|
41
|
+
return JSON.parse(this.content)
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
</script>
|