bri-components 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/README.md +30 -0
- package/lib/.DS_Store +0 -0
- package/lib/0.bri-components.min.js +2 -0
- package/lib/0.bri-components.min.js.map +1 -0
- package/lib/1.bri-components.min.js +2 -0
- package/lib/1.bri-components.min.js.map +1 -0
- package/lib/2.bri-components.min.js +2 -0
- package/lib/2.bri-components.min.js.map +1 -0
- package/lib/3.bri-components.min.js +2 -0
- package/lib/3.bri-components.min.js.gz +0 -0
- package/lib/3.bri-components.min.js.map +1 -0
- package/lib/4.bri-components.min.js +2 -0
- package/lib/4.bri-components.min.js.gz +0 -0
- package/lib/4.bri-components.min.js.map +1 -0
- package/lib/5.bri-components.min.js +2 -0
- package/lib/5.bri-components.min.js.map +1 -0
- package/lib/6.bri-components.min.js +2 -0
- package/lib/6.bri-components.min.js.map +1 -0
- package/lib/bri-components.min.js +21 -0
- package/lib/bri-components.min.js.gz +0 -0
- package/lib/bri-components.min.js.map +1 -0
- package/lib/styles/bri-components.css +1 -0
- package/lib/styles/bundle.css +14 -0
- package/lib/styles/font/fontello.eot +0 -0
- package/lib/styles/font/fontello.svg +32 -0
- package/lib/styles/font/fontello.ttf +0 -0
- package/lib/styles/font/fontello.woff +0 -0
- package/lib/styles/font/fontello.woff2 +0 -0
- package/package.json +121 -0
- package/src/.DS_Store +0 -0
- package/src/components/controls/base/DshBack.vue +36 -0
- package/src/components/controls/base/DshCascader.vue +366 -0
- package/src/components/controls/base/DshCascaderMultiple.vue +158 -0
- package/src/components/controls/base/DshCheckbox.vue +199 -0
- package/src/components/controls/base/DshCoordinates.vue +497 -0
- package/src/components/controls/base/DshDate.vue +148 -0
- package/src/components/controls/base/DshDaterange.vue +335 -0
- package/src/components/controls/base/DshDivider.vue +59 -0
- package/src/components/controls/base/DshEditor.vue +166 -0
- package/src/components/controls/base/DshInput.vue +139 -0
- package/src/components/controls/base/DshLabels.vue +302 -0
- package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +425 -0
- package/src/components/controls/base/DshNumber/BriInputNumber/mixins/emitter.js +34 -0
- package/src/components/controls/base/DshNumber/BriInputNumber/mixins/form.js +14 -0
- package/src/components/controls/base/DshNumber/BriInputNumber/utils/assist.js +322 -0
- package/src/components/controls/base/DshNumber/DshNumber.vue +148 -0
- package/src/components/controls/base/DshNumberange.vue +137 -0
- package/src/components/controls/base/DshPackage.vue +72 -0
- package/src/components/controls/base/DshSelect.vue +231 -0
- package/src/components/controls/base/DshSwitch.vue +112 -0
- package/src/components/controls/base/DshUndeveloped.vue +39 -0
- package/src/components/controls/base/YSerialNumber.vue +37 -0
- package/src/components/controls/base/ZUpload/YUploadImage.vue +228 -0
- package/src/components/controls/base/ZUpload/index.vue +356 -0
- package/src/components/controls/base/ZUpload/upload-list.vue +277 -0
- package/src/components/controls/base/ZUpload/upload-listItem.vue +0 -0
- package/src/components/controls/base/ZUpload/uploadMixin.js +397 -0
- package/src/components/controls/base/selectMixin.js +110 -0
- package/src/components/controls/base/textMultiple/DshTextMultiple.vue +94 -0
- package/src/components/controls/base/textMultiple/MultipleInput.vue +106 -0
- package/src/components/controls/controlMap.js +94 -0
- package/src/components/controls/controlMixin.js +84 -0
- package/src/components/form/DshAdvSearchForm.vue +341 -0
- package/src/components/form/DshDefaultSearch.vue +203 -0
- package/src/components/form/DshForm.vue +364 -0
- package/src/components/form/searchMixin.js +205 -0
- package/src/components/list/DshBox/DshBox.vue +168 -0
- package/src/components/list/DshBox/DshCard.vue +219 -0
- package/src/components/list/DshBox/DshCrossTable.vue +624 -0
- package/src/components/list/DshBox/DshList.vue +442 -0
- package/src/components/list/DshBox/DshPanel.vue +407 -0
- package/src/components/list/DshBox/DshSingleData.vue +82 -0
- package/src/components/list/DshBox/DshTable.vue +273 -0
- package/src/components/list/DshCascaderTable.vue +817 -0
- package/src/components/list/DshFlatTable.vue +622 -0
- package/src/components/list/ZTree.vue +527 -0
- package/src/components/list/easyTable/index.js +23 -0
- package/src/components/list/easyTable/src/directives/clickoutside.js +32 -0
- package/src/components/list/easyTable/src/mixins/layerAdjustment.js +62 -0
- package/src/components/list/easyTable/src/settings/settings.js +11 -0
- package/src/components/list/easyTable/src/utils/deepClone.js +256 -0
- package/src/components/list/easyTable/src/utils/dom.js +41 -0
- package/src/components/list/easyTable/src/utils/utils.js +190 -0
- package/src/components/list/easyTable/v-checkbox/index.js +7 -0
- package/src/components/list/easyTable/v-checkbox/src/checkbox.vue +127 -0
- package/src/components/list/easyTable/v-checkbox-group/index.js +7 -0
- package/src/components/list/easyTable/v-checkbox-group/src/checkbox-group.vue +68 -0
- package/src/components/list/easyTable/v-dropdown/index.js +7 -0
- package/src/components/list/easyTable/v-dropdown/src/dropdown.vue +337 -0
- package/src/components/list/easyTable/v-table/index.js +7 -0
- package/src/components/list/easyTable/v-table/src/body-cell-merge-mixin.js +141 -0
- package/src/components/list/easyTable/v-table/src/cell-edit-mixin.js +102 -0
- package/src/components/list/easyTable/v-table/src/checkbox-selection-mixin.js +189 -0
- package/src/components/list/easyTable/v-table/src/classes-mixin.js +56 -0
- package/src/components/list/easyTable/v-table/src/drag-width-mixin.js +202 -0
- package/src/components/list/easyTable/v-table/src/export-csv.js +74 -0
- package/src/components/list/easyTable/v-table/src/frozen-columns-mixin.js +134 -0
- package/src/components/list/easyTable/v-table/src/loading.vue +49 -0
- package/src/components/list/easyTable/v-table/src/scroll-bar-control-mixin.js +21 -0
- package/src/components/list/easyTable/v-table/src/scroll-control-mixin.js +92 -0
- package/src/components/list/easyTable/v-table/src/sort-control-mixin.js +108 -0
- package/src/components/list/easyTable/v-table/src/table-empty-mixin.js +73 -0
- package/src/components/list/easyTable/v-table/src/table-empty.vue +66 -0
- package/src/components/list/easyTable/v-table/src/table-filters-mixin.js +126 -0
- package/src/components/list/easyTable/v-table/src/table-footer-mixin.js +122 -0
- package/src/components/list/easyTable/v-table/src/table-resize-mixin.js +279 -0
- package/src/components/list/easyTable/v-table/src/table-row-mouse-events-mixin.js +123 -0
- package/src/components/list/easyTable/v-table/src/table.vue +1565 -0
- package/src/components/list/easyTable/v-table/src/title-cell-merge-mixin.js +115 -0
- package/src/components/list/evTable/EvTable.vue +323 -0
- package/src/components/list/evTable/EvTableMixin.js +26 -0
- package/src/components/other/DshAvatar.vue +149 -0
- package/src/components/other/DshBtnModal.vue +64 -0
- package/src/components/other/DshColorPanel.vue +128 -0
- package/src/components/other/DshEditPanel.vue +130 -0
- package/src/components/other/InfoCascader.vue +258 -0
- package/src/components/other/YNoPermission.vue +45 -0
- package/src/components/other/ZCode.vue +125 -0
- package/src/components/other/ZCollapseTree.vue +84 -0
- package/src/components/other/ZGantt.vue +669 -0
- package/src/components/other/ZIframe.vue +105 -0
- package/src/components/other/ZLoading.vue +59 -0
- package/src/components/other/menu/DshMenu.vue +133 -0
- package/src/components/other/menu/DshMenuNav.vue +104 -0
- package/src/components/pages/Error/Error403.vue +34 -0
- package/src/components/pages/Error/Error404.vue +34 -0
- package/src/components/pages/Error/Error500.vue +34 -0
- package/src/components/pages/Error/error.less +163 -0
- package/src/components/pages/Error/errorBack.vue +38 -0
- package/src/components/small/Ctooltip.vue +90 -0
- package/src/components/small/DshButtons.vue +195 -0
- package/src/components/small/DshControlDefine.vue +110 -0
- package/src/components/small/DshCrumbs.vue +61 -0
- package/src/components/small/DshCrumbsItem.vue +107 -0
- package/src/components/small/DshDropdown.vue +159 -0
- package/src/components/small/DshFileShow.vue +212 -0
- package/src/components/small/DshIcons.vue +63 -0
- package/src/components/small/DshModal.vue +255 -0
- package/src/components/small/DshPage.vue +98 -0
- package/src/components/small/DshSteps.vue +68 -0
- package/src/components/small/DshTabs.vue +227 -0
- package/src/components/small/DshTags.vue +58 -0
- package/src/components/small/DshTdRender.js +21 -0
- package/src/components/small/DshTitle.vue +36 -0
- package/src/components/small/render.js +20 -0
- package/src/components/unit/DshFormItem.vue +157 -0
- package/src/components/unit/DshUnit.vue +72 -0
- package/src/components/unit/unitMixin.js +43 -0
- package/src/datas/.DS_Store +0 -0
- package/src/datas/common/region.json +1 -0
- package/src/datas/common/resourceData.json +20 -0
- package/src/datas/index.js +11 -0
- package/src/index.js +243 -0
- package/src/styles/animate.less +16 -0
- package/src/styles/bundle.css +14 -0
- package/src/styles/common/box.less +157 -0
- package/src/styles/common/common.less +31 -0
- package/src/styles/common/flex.less +282 -0
- package/src/styles/common/index.less +4 -0
- package/src/styles/common/text.less +43 -0
- package/src/styles/components/controls/DshCascader.less +75 -0
- package/src/styles/components/controls/DshCheckbox.less +156 -0
- package/src/styles/components/controls/DshCoordinates.less +72 -0
- package/src/styles/components/controls/DshDaterange.less +49 -0
- package/src/styles/components/controls/DshDivider.less +115 -0
- package/src/styles/components/controls/DshEditor.less +52 -0
- package/src/styles/components/controls/DshInput.less +40 -0
- package/src/styles/components/controls/DshLabels.less +187 -0
- package/src/styles/components/controls/DshNumberange.less +24 -0
- package/src/styles/components/controls/DshPackage.less +25 -0
- package/src/styles/components/controls/DshSelect.less +172 -0
- package/src/styles/components/controls/MultipleInput.less +55 -0
- package/src/styles/components/controls/ZUpload.less +446 -0
- package/src/styles/components/form/DshAdvSearchForm.less +159 -0
- package/src/styles/components/form/DshDefaultSearch.less +71 -0
- package/src/styles/components/index.less +49 -0
- package/src/styles/components/list/DshCascaderTable.less +113 -0
- package/src/styles/components/list/DshCrossTable.less +175 -0
- package/src/styles/components/list/DshFlatTable.less +98 -0
- package/src/styles/components/list/DshSingleData.less +30 -0
- package/src/styles/components/list/evTable.less +79 -0
- package/src/styles/components/list/evtable/animation.less +141 -0
- package/src/styles/components/list/evtable/font/fontello.eot +0 -0
- package/src/styles/components/list/evtable/font/fontello.svg +32 -0
- package/src/styles/components/list/evtable/font/fontello.ttf +0 -0
- package/src/styles/components/list/evtable/font/fontello.woff +0 -0
- package/src/styles/components/list/evtable/font/fontello.woff2 +0 -0
- package/src/styles/components/list/evtable/fontello.less +68 -0
- package/src/styles/components/list/evtable/index.less +5 -0
- package/src/styles/components/list/evtable/v-checkbox.less +167 -0
- package/src/styles/components/list/evtable/v-dropdown.less +235 -0
- package/src/styles/components/list/evtable/v-table.less +334 -0
- package/src/styles/components/list/ivu_reset.less +49 -0
- package/src/styles/components/other/DshEditPanel.less +70 -0
- package/src/styles/components/other/DshMenu.less +37 -0
- package/src/styles/components/other/DshMenuNav.less +82 -0
- package/src/styles/components/other/InfoCascader.less +55 -0
- package/src/styles/components/other/ZCode.less +1 -0
- package/src/styles/components/other/ZCollapseTree.less +62 -0
- package/src/styles/components/other/ZGantt.less +278 -0
- package/src/styles/components/other/ZLoading.less +36 -0
- package/src/styles/components/small/Ctooltip.less +5 -0
- package/src/styles/components/small/DshButtons.less +40 -0
- package/src/styles/components/small/DshControlDefine.less +64 -0
- package/src/styles/components/small/DshDropdown.less +61 -0
- package/src/styles/components/small/DshPage.less +94 -0
- package/src/styles/components/small/DshSteps.less +58 -0
- package/src/styles/components/small/DshTabs.less +82 -0
- package/src/styles/components/small/DshTitle.less +18 -0
- package/src/styles/components/unit/DshFormItem.less +124 -0
- package/src/styles/define.less +374 -0
- package/src/styles/index.less +10 -0
- package/src/styles/reset.less +83 -0
- package/src/styles/variables.less +98 -0
- package/src/styles/view_reset.less +446 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Dropdown
|
|
3
|
+
class="DshColorPanel"
|
|
4
|
+
:trigger="trigger"
|
|
5
|
+
:placement="placement"
|
|
6
|
+
:transfer="transfer"
|
|
7
|
+
>
|
|
8
|
+
<Icon
|
|
9
|
+
class="DshColorPanel-rel"
|
|
10
|
+
:type="dropdownObj.icon"
|
|
11
|
+
:size="dropdownObj.size"
|
|
12
|
+
:color="dropdownObj.color"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<DropdownMenu
|
|
16
|
+
slot="list"
|
|
17
|
+
class="DshColorPanel-list"
|
|
18
|
+
:class="menuClass"
|
|
19
|
+
>
|
|
20
|
+
<DropdownItem
|
|
21
|
+
v-for="dropdownItem in list"
|
|
22
|
+
:key="dropdownItem._id || dropdownItem.type"
|
|
23
|
+
class="DshColorPanel-list-item"
|
|
24
|
+
:selected="dropdownItem.selected"
|
|
25
|
+
@click.native="dispatchEvent(dropdownItem)"
|
|
26
|
+
>
|
|
27
|
+
<span
|
|
28
|
+
class="DshColorPanel-list-item-small"
|
|
29
|
+
:style="{background:dropdownItem}"
|
|
30
|
+
></span>
|
|
31
|
+
<span
|
|
32
|
+
class="DshColorPanel-list-item-big"
|
|
33
|
+
:style="{borderColor:dropdownItem}"
|
|
34
|
+
></span>
|
|
35
|
+
</DropdownItem>
|
|
36
|
+
</DropdownMenu>
|
|
37
|
+
</Dropdown>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
export default {
|
|
42
|
+
name: "DshColorPanel",
|
|
43
|
+
props: {
|
|
44
|
+
dropdownObj: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default () {
|
|
47
|
+
return {
|
|
48
|
+
icon: "ios-more",
|
|
49
|
+
size: 18,
|
|
50
|
+
showDropdownItemIcon: true
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
list: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default () {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
placement: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "bottom-start"
|
|
63
|
+
},
|
|
64
|
+
trigger: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "click"
|
|
67
|
+
},
|
|
68
|
+
transfer: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true
|
|
71
|
+
},
|
|
72
|
+
menuClass: String
|
|
73
|
+
},
|
|
74
|
+
data () {
|
|
75
|
+
return {};
|
|
76
|
+
},
|
|
77
|
+
computed: {},
|
|
78
|
+
created () {},
|
|
79
|
+
methods: {
|
|
80
|
+
dispatchEvent (dropdownItem) {
|
|
81
|
+
this.$emit("click", dropdownItem);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<style lang="less" scoped>
|
|
88
|
+
.DshColorPanel {
|
|
89
|
+
&-rel {
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
&-list {
|
|
93
|
+
font-size: 15px;
|
|
94
|
+
display: flex;
|
|
95
|
+
width: 293px;
|
|
96
|
+
height: 72px;
|
|
97
|
+
flex-wrap: wrap;
|
|
98
|
+
justify-content: space-around;
|
|
99
|
+
align-items: center;
|
|
100
|
+
&-item {
|
|
101
|
+
padding: 6px;
|
|
102
|
+
&-big {
|
|
103
|
+
width: 15px;
|
|
104
|
+
height: 15px;
|
|
105
|
+
display: inline-block;
|
|
106
|
+
border-radius: 50%;
|
|
107
|
+
}
|
|
108
|
+
&-small {
|
|
109
|
+
width: 12px;
|
|
110
|
+
height: 12px;
|
|
111
|
+
position: absolute;
|
|
112
|
+
display: inline-block;
|
|
113
|
+
transform: translate(1.5px,1.5px);
|
|
114
|
+
border-radius: 50%;
|
|
115
|
+
&:hover + span{
|
|
116
|
+
border-width: 1px;
|
|
117
|
+
border-style: solid;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
124
|
+
<style lang="less">
|
|
125
|
+
.DshColorPanel {
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="DshEditPanel">
|
|
3
|
+
<Form class="DshEditPanel-form" :model="value" :label-width="80" label-position="left">
|
|
4
|
+
<FormItem label="应用名称">
|
|
5
|
+
<Input v-model="value.name" placeholder="请输入应用名称" autofocus @on-blur="onBlur(value)" />
|
|
6
|
+
</FormItem>
|
|
7
|
+
|
|
8
|
+
<FormItem label="主题颜色">
|
|
9
|
+
<div class="DshEditPanel-colors">
|
|
10
|
+
<div
|
|
11
|
+
v-for="(colorItem, colorKey) in $appData.themeColors"
|
|
12
|
+
:key="colorKey"
|
|
13
|
+
class="DshEditPanel-colors-item"
|
|
14
|
+
@click="$dispatchEvent(operationMap.updateColor, colorItem.color, colorKey, value)"
|
|
15
|
+
>
|
|
16
|
+
<div class="DshEditPanel-colors-item-content" :style="{ backgroundColor: colorItem.color }"></div>
|
|
17
|
+
<Icon
|
|
18
|
+
v-if="colorItem.color === value.color"
|
|
19
|
+
class="DshEditPanel-colors-item-icon"
|
|
20
|
+
type="ios-checkmark-circle"
|
|
21
|
+
size="16"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</FormItem>
|
|
26
|
+
|
|
27
|
+
<FormItem label="主题图标">
|
|
28
|
+
<div class="DshEditPanel-icons">
|
|
29
|
+
<div
|
|
30
|
+
v-for="(iconItem, iconIndex) in $appData.icons"
|
|
31
|
+
:key="iconIndex"
|
|
32
|
+
class="DshEditPanel-icons-item"
|
|
33
|
+
:style="{
|
|
34
|
+
backgroundColor: $appData.themeColors[value.color].bgColor,
|
|
35
|
+
border: value.icon === iconItem ? `1px solid ${value.color}` : 'none'
|
|
36
|
+
}"
|
|
37
|
+
@click="$dispatchEvent(operationMap.updateIcon, iconItem, iconIndex, value)"
|
|
38
|
+
>
|
|
39
|
+
<div class="DshEditPanel-icons-item-content" :style="{backgroundImage: 'url('+ $appData.themeColors[value.color].bgUrl +')'}">
|
|
40
|
+
<Icon :custom="'bico-font ' + iconItem"></Icon>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</FormItem>
|
|
45
|
+
</Form>
|
|
46
|
+
|
|
47
|
+
<!-- 操作按钮 -->
|
|
48
|
+
<dsh-buttons
|
|
49
|
+
class="bri-footer"
|
|
50
|
+
:list="$getOperationList(['cancel', 'confirm'])"
|
|
51
|
+
@click="$dispatchEvent($event)"
|
|
52
|
+
></dsh-buttons>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
export default {
|
|
58
|
+
components: {},
|
|
59
|
+
name: "DshEditPanel",
|
|
60
|
+
props: {
|
|
61
|
+
value: {
|
|
62
|
+
type: Object,
|
|
63
|
+
default () {
|
|
64
|
+
return {};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
data () {
|
|
69
|
+
return {
|
|
70
|
+
operationMap: {
|
|
71
|
+
updateColor: {
|
|
72
|
+
name: "修改主题色",
|
|
73
|
+
type: "updateColor",
|
|
74
|
+
event: "clickUpdateColor"
|
|
75
|
+
},
|
|
76
|
+
updateIcon: {
|
|
77
|
+
name: "修改图标",
|
|
78
|
+
type: "updateIcon",
|
|
79
|
+
event: "clickUpdateIcon"
|
|
80
|
+
},
|
|
81
|
+
cancel: {
|
|
82
|
+
name: "取消",
|
|
83
|
+
type: "cancel",
|
|
84
|
+
event: "clickCancel"
|
|
85
|
+
},
|
|
86
|
+
confirm: {
|
|
87
|
+
name: "确定",
|
|
88
|
+
type: "confirm",
|
|
89
|
+
btnType: "primary",
|
|
90
|
+
event: "clickConfirm"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
computed: {},
|
|
96
|
+
created () {
|
|
97
|
+
this.init();
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
// 初始化
|
|
101
|
+
init () {
|
|
102
|
+
Object.assign(this.value, {
|
|
103
|
+
oldName: this.value.name,
|
|
104
|
+
color: this.value.color || Object.values(this.$appData.themeColors)[0].color,
|
|
105
|
+
icon: this.value.icon || this.$appData.icons[0]
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
onBlur (value) {
|
|
110
|
+
value.name || (value.name = value.oldName || "未命名");
|
|
111
|
+
},
|
|
112
|
+
// 点击修改应用主题色
|
|
113
|
+
clickUpdateColor (item, colorItem, colorKey, appObj) {
|
|
114
|
+
appObj.color = colorItem;
|
|
115
|
+
},
|
|
116
|
+
// 点击修改应用图标
|
|
117
|
+
clickUpdateIcon (item, iconItem, iconIndex, appObj) {
|
|
118
|
+
appObj.icon = iconItem;
|
|
119
|
+
},
|
|
120
|
+
// 点击取消
|
|
121
|
+
clickConfirm () {
|
|
122
|
+
this.$emit("on-ok", this.value);
|
|
123
|
+
},
|
|
124
|
+
// 点击取消
|
|
125
|
+
clickCancel () {
|
|
126
|
+
this.$emit("on-cancel");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
</script>
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="InfoCascader">
|
|
3
|
+
<dsh-modal
|
|
4
|
+
v-model="modalVal"
|
|
5
|
+
:propsObj="modalPropsObj"
|
|
6
|
+
mode="middle"
|
|
7
|
+
>
|
|
8
|
+
<dsh-input
|
|
9
|
+
class="InfoCascader-search"
|
|
10
|
+
:value="searchData"
|
|
11
|
+
:propsObj="inputPropsObj"
|
|
12
|
+
>
|
|
13
|
+
</dsh-input>
|
|
14
|
+
<div class="InfoCascader-content">
|
|
15
|
+
<div class="InfoCascader-content-left">
|
|
16
|
+
<Tree
|
|
17
|
+
v-if="show"
|
|
18
|
+
expand-node
|
|
19
|
+
:data="treeData"
|
|
20
|
+
></Tree>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="InfoCascader-content-right">
|
|
23
|
+
<div class="InfoCascader-content-right-title">
|
|
24
|
+
{{curName}}说明
|
|
25
|
+
</div>
|
|
26
|
+
<p
|
|
27
|
+
class="InfoCascader-content-right-content"
|
|
28
|
+
v-html="description"
|
|
29
|
+
>
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="InfoCascader-footer">
|
|
34
|
+
<dsh-buttons
|
|
35
|
+
class="InfoCascader-footer-btns"
|
|
36
|
+
:list="$getOperationList(['cancel', 'confirm'])"
|
|
37
|
+
@click="$dispatchEvent($event)"
|
|
38
|
+
></dsh-buttons>
|
|
39
|
+
</div>
|
|
40
|
+
</dsh-modal>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
export default {
|
|
46
|
+
name: "InfoCascader",
|
|
47
|
+
props: {
|
|
48
|
+
value: {
|
|
49
|
+
type: Array,
|
|
50
|
+
default () {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
propsObj: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default () {
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
data: {
|
|
61
|
+
type: Array,
|
|
62
|
+
default () {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
showModal: Boolean
|
|
67
|
+
},
|
|
68
|
+
data () {
|
|
69
|
+
return {
|
|
70
|
+
description: "",
|
|
71
|
+
operationMap: {
|
|
72
|
+
cancel: {
|
|
73
|
+
name: "取消",
|
|
74
|
+
type: "clickCancel",
|
|
75
|
+
event: "clickCancel",
|
|
76
|
+
class: "z-default"
|
|
77
|
+
},
|
|
78
|
+
confirm: {
|
|
79
|
+
name: "确定",
|
|
80
|
+
btnType: "primary",
|
|
81
|
+
type: "clickConfirm",
|
|
82
|
+
event: "clickConfirm",
|
|
83
|
+
class: "z-primary"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
curSelect: {},
|
|
87
|
+
curName: "",
|
|
88
|
+
searchData: {
|
|
89
|
+
search: ""
|
|
90
|
+
},
|
|
91
|
+
inputPropsObj: {
|
|
92
|
+
_key: "search",
|
|
93
|
+
_name: "关键字搜索"
|
|
94
|
+
},
|
|
95
|
+
show: true
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
modalVal: {
|
|
100
|
+
get () {
|
|
101
|
+
return this.showModal;
|
|
102
|
+
},
|
|
103
|
+
set (val) {
|
|
104
|
+
this.$emit("changeShowModal", val);
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
modalPropsObj () {
|
|
108
|
+
return {
|
|
109
|
+
title: this.propsObj._name
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
initData () {
|
|
113
|
+
return this.loop(this.data, null, this.value);
|
|
114
|
+
},
|
|
115
|
+
treeData () {
|
|
116
|
+
if (!this.searchData.search) { // 内容为空时,查询所有
|
|
117
|
+
return this.initData;
|
|
118
|
+
}
|
|
119
|
+
let that = this;
|
|
120
|
+
const rebuildData = (value, treeList) => {
|
|
121
|
+
that.show = false;
|
|
122
|
+
let newarr = [];
|
|
123
|
+
treeList.forEach(element => {
|
|
124
|
+
if (element.children && element.children.length) {
|
|
125
|
+
if (element.title.indexOf(value) > -1) {
|
|
126
|
+
element.expand = true;
|
|
127
|
+
newarr.push(element);
|
|
128
|
+
}
|
|
129
|
+
const ab = rebuildData(value, element.children);
|
|
130
|
+
const obj = {
|
|
131
|
+
...element,
|
|
132
|
+
expand: true,
|
|
133
|
+
children: ab
|
|
134
|
+
};
|
|
135
|
+
if (ab && ab.length) {
|
|
136
|
+
newarr.push(obj);
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
if (element.title.indexOf(value) > -1) {
|
|
140
|
+
newarr.push(element);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
that.show = true;
|
|
145
|
+
return newarr;
|
|
146
|
+
};
|
|
147
|
+
return rebuildData(this.searchData.search, this.initData);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
created () {
|
|
151
|
+
this.curSelect.codeArr = this.value;
|
|
152
|
+
if (this.value && this.value.length) {
|
|
153
|
+
// 回显已选择的名称
|
|
154
|
+
const loop = (arr) => {
|
|
155
|
+
for (let item of arr) {
|
|
156
|
+
if (item.codeArr.length == this.value.length && item.codeArr.every((code, idx) => code === this.value[idx])) {
|
|
157
|
+
this.curName = item.name;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
if (item.children.length) {
|
|
161
|
+
loop(item.children);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
loop(this.initData);
|
|
166
|
+
this.getDescription(this.value);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
methods: {
|
|
170
|
+
change (node) {
|
|
171
|
+
// 点击最后层级时,才出现右侧说明
|
|
172
|
+
if (node.children.length === 0) {
|
|
173
|
+
this.curName = node.name;
|
|
174
|
+
this.getDescription(node.codeArr);
|
|
175
|
+
if (node.codeArr.length && this.curSelect.codeArr && this.curSelect.codeArr.length === node.codeArr.length && node.codeArr.every((code, idx) => code === this.curSelect.codeArr[idx])) {
|
|
176
|
+
this.curSelect = {};
|
|
177
|
+
this.description = "";
|
|
178
|
+
} else {
|
|
179
|
+
if (!this.propsObj._cascaderLevel || node.level == this.propsObj._cascaderLevel || !node.children.length) {
|
|
180
|
+
this.curSelect = node;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
} else {
|
|
184
|
+
this.curName = "";
|
|
185
|
+
this.description = "";
|
|
186
|
+
this.curSelect = {};
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
getDescription (nodeKeys) {
|
|
190
|
+
this.$https({
|
|
191
|
+
url: {
|
|
192
|
+
module: "sheet",
|
|
193
|
+
name: "getResourceDescription"
|
|
194
|
+
},
|
|
195
|
+
params: {
|
|
196
|
+
resourceKey: this.propsObj._resourceKey,
|
|
197
|
+
nodeKeys
|
|
198
|
+
},
|
|
199
|
+
callback: data => {
|
|
200
|
+
this.description = data;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
},
|
|
204
|
+
clickCancel () {
|
|
205
|
+
this.$emit("changeShowModal", false);
|
|
206
|
+
},
|
|
207
|
+
clickConfirm () {
|
|
208
|
+
if (this.curName) {
|
|
209
|
+
this.$emit("input", this.curSelect.codeArr);
|
|
210
|
+
this.$emit("change", this.curSelect.codeArr);
|
|
211
|
+
this.$emit("changeShowModal", false);
|
|
212
|
+
} else {
|
|
213
|
+
this.$Message.warning(`请选择${this.propsObj._name}!`);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
},
|
|
217
|
+
loop (data = [], level, codeArr) {
|
|
218
|
+
return data
|
|
219
|
+
? data.reduce((arr, item) => {
|
|
220
|
+
item.expand = false;
|
|
221
|
+
if (this.value.length) {
|
|
222
|
+
let arr = this.$getTreeLinealDatas(this.value, this.data);
|
|
223
|
+
arr.forEach(i => { i.expand = true; });
|
|
224
|
+
}
|
|
225
|
+
const newItem = {
|
|
226
|
+
...item,
|
|
227
|
+
value: item._key,
|
|
228
|
+
title: item.name,
|
|
229
|
+
disabled: this.propsObj._cascaderLevel ? (item.level < this.propsObj._cascaderLevel) : true,
|
|
230
|
+
render: (h, { root, node, data }) => {
|
|
231
|
+
return h("span", {
|
|
232
|
+
class: {
|
|
233
|
+
"ivu-tree-title-selected": this.curSelect.codeArr && this.curSelect.codeArr.length && this.curSelect.codeArr.length === data.codeArr.length && this.curSelect.codeArr.every((code, idx) => code === data.codeArr[idx])
|
|
234
|
+
},
|
|
235
|
+
style: {
|
|
236
|
+
display: "inline-block",
|
|
237
|
+
width: "100%"
|
|
238
|
+
},
|
|
239
|
+
on: {
|
|
240
|
+
click: () => {
|
|
241
|
+
this.change(data);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}, data.title);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
if (!level || level > item.level) {
|
|
248
|
+
newItem.children = this.loop(item.children, level, this.value);
|
|
249
|
+
}
|
|
250
|
+
arr.push(newItem);
|
|
251
|
+
|
|
252
|
+
return arr;
|
|
253
|
+
}, [])
|
|
254
|
+
: [];
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="YCompanyPermision">
|
|
3
|
+
<img :src="noPermissionSrc" alt="">
|
|
4
|
+
<p>{{ title }}</p>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: "YCompanyPermision",
|
|
11
|
+
props: {
|
|
12
|
+
title: String
|
|
13
|
+
},
|
|
14
|
+
data () {
|
|
15
|
+
return {
|
|
16
|
+
noPermissionSrc: this.$imageSrcMap.app.nodata
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
computed: {},
|
|
20
|
+
created () {},
|
|
21
|
+
methods: {}
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style lang="less" scoped>
|
|
26
|
+
.YCompanyPermision {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
padding: 20px;
|
|
30
|
+
text-align: center;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
p {
|
|
37
|
+
margin: 10px 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
<style lang="less">
|
|
42
|
+
.YCompanyPermision {
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ZCode">
|
|
3
|
+
<codemirror
|
|
4
|
+
style="height:100%"
|
|
5
|
+
v-model="computedVal"
|
|
6
|
+
:options="option"
|
|
7
|
+
@ready="ready"
|
|
8
|
+
@input="input"
|
|
9
|
+
@changes="changes"
|
|
10
|
+
></codemirror>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { JSHINT } from "jshint";
|
|
16
|
+
|
|
17
|
+
import { codemirror } from "vue-codemirror";
|
|
18
|
+
// 这里引入的模式的js,根据设置的mode引入
|
|
19
|
+
import "codemirror/mode/javascript/javascript.js";
|
|
20
|
+
// 光标行背景高亮,配置里面也需要styleActiveLine设置为true
|
|
21
|
+
import "codemirror/addon/selection/active-line.js";
|
|
22
|
+
import "codemirror/addon/edit/matchbrackets.js";
|
|
23
|
+
|
|
24
|
+
// JavaScript代码提示功能需要引入三个依赖
|
|
25
|
+
import "codemirror/addon/hint/javascript-hint.js";
|
|
26
|
+
import "codemirror/addon/hint/show-hint.js";
|
|
27
|
+
|
|
28
|
+
// 折叠
|
|
29
|
+
import "codemirror/addon/fold/foldcode.js";
|
|
30
|
+
import "codemirror/addon/fold/foldgutter.js";
|
|
31
|
+
import "codemirror/addon/fold/brace-fold.js";
|
|
32
|
+
import "codemirror/addon/fold/comment-fold.js";
|
|
33
|
+
|
|
34
|
+
// 下面这几个引入的主要是验证提示类的,配置里的lint需要设置true,gutters: ['CodeMirror-lint-markers']
|
|
35
|
+
// 如果需要验证 json 的话
|
|
36
|
+
import "codemirror/addon/lint/lint.js";
|
|
37
|
+
import "codemirror/addon/lint/javascript-lint.js";
|
|
38
|
+
import "codemirror/addon/display/autorefresh"; // 及时自动更新,配置里面也需要设置autoRefresh为true
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: "ZCode",
|
|
42
|
+
components: {
|
|
43
|
+
codemirror
|
|
44
|
+
},
|
|
45
|
+
props: {
|
|
46
|
+
value: String,
|
|
47
|
+
option: {
|
|
48
|
+
type: Object,
|
|
49
|
+
default: function () {
|
|
50
|
+
return {
|
|
51
|
+
mode: "javascript",
|
|
52
|
+
theme: "cobalt",
|
|
53
|
+
dragDrop: true, // 拖拽
|
|
54
|
+
lineWrapping: true, // 换行
|
|
55
|
+
autofocus: true,
|
|
56
|
+
lineNumbers: true, // 行号
|
|
57
|
+
foldGutter: true, // 代码折叠
|
|
58
|
+
line: true,
|
|
59
|
+
matchBrackets: true, // 括号匹配
|
|
60
|
+
extraKeys: { Ctrl: "autocomplete" },
|
|
61
|
+
showCursorWhenSelecting: true, // 在选择时是否显示光标,默认为false
|
|
62
|
+
lineWiseCopyCut: true, // 启用时,如果在复制或剪切时没有选择文本,那么就会自动操作光标所在的整行]
|
|
63
|
+
autorefresh: true, // 及时自动更新
|
|
64
|
+
lint: true, // json检查
|
|
65
|
+
hint: true,
|
|
66
|
+
styleActiveLine: true,
|
|
67
|
+
gutters: [
|
|
68
|
+
"CodeMirror-linenumbers", // 显示行号
|
|
69
|
+
"CodeMirror-foldgutter", // 代码折叠
|
|
70
|
+
"CodeMirror-lint-markers" // json检查
|
|
71
|
+
]
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
model: {
|
|
77
|
+
prop: "value",
|
|
78
|
+
event: "change"
|
|
79
|
+
},
|
|
80
|
+
data () {
|
|
81
|
+
return {};
|
|
82
|
+
},
|
|
83
|
+
computed: {
|
|
84
|
+
computedVal: {
|
|
85
|
+
get () {
|
|
86
|
+
return this.value;
|
|
87
|
+
},
|
|
88
|
+
set (val) {
|
|
89
|
+
this.handleChange(val);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
created () {
|
|
94
|
+
window.JSHINT = JSHINT;
|
|
95
|
+
},
|
|
96
|
+
methods: {
|
|
97
|
+
ready (cm) {
|
|
98
|
+
cm.setSize("100%", "100%");
|
|
99
|
+
this.$emit("ready", cm);
|
|
100
|
+
},
|
|
101
|
+
input (cm) {
|
|
102
|
+
this.$emit("input", cm);
|
|
103
|
+
},
|
|
104
|
+
changes (cm, value) {
|
|
105
|
+
this.$emit("changes", cm, value);
|
|
106
|
+
},
|
|
107
|
+
handleChange (val) {
|
|
108
|
+
// 0 no, 1 warning 2 error
|
|
109
|
+
JSHINT(val);
|
|
110
|
+
let errors = (JSHINT.data().errors || [])
|
|
111
|
+
.map(error => error.code ? (error.code.startsWith("W") ? 1 : 2) : 2);
|
|
112
|
+
|
|
113
|
+
this.$emit("jshint", errors.some(errorNum => errorNum === 2), errors);
|
|
114
|
+
this.$emit("change", val);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
</script>
|
|
119
|
+
|
|
120
|
+
<style lang="less" scoped>
|
|
121
|
+
.ZCode {
|
|
122
|
+
width: 100%;
|
|
123
|
+
height: 100%;
|
|
124
|
+
}
|
|
125
|
+
</style>
|