cloud-web-corejs 1.0.54-dev.355 → 1.0.54-dev.356

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/src/index.js CHANGED
@@ -1,190 +1,195 @@
1
- /**version-1.0*/
2
- import Vue from 'vue';
3
- import Cookies from 'js-cookie';
4
- import 'normalize.css/normalize.css'; // a modern alternative to CSS resets
5
- import Element from 'element-ui';
6
- import '@/styles/element-variables.scss';
7
- import '@/styles/index.scss'; // global css
8
-
9
- import App from '@base/App';
10
- import store from '@base/store';
11
- import router from '@base/router';
12
-
13
- import '@/icons'; // icon
14
- import '@base/permission'; // permission control
15
-
16
- import * as filters from '@base/filters'; // global filters
17
-
18
- // main.js 文件添加以下代码
19
-
20
- import BaseKeepAlive from '@base/utils/keepAlive.js'
21
-
22
- Vue.component('BaseKeepAlive', BaseKeepAlive)
23
-
24
- import VXETable from 'vxe-table';
25
- import 'vxe-table/lib/style.css';
26
-
27
- import Vab from '@base/utils/vab';
28
-
29
- Vue.use(Vab);
30
-
31
- Vue.use(VXETable);
32
-
33
- import '@base/components/table/index.js';
34
-
35
- import drag from '@base/directive/el-drag-dialog/index.js';
36
-
37
- Vue.use(drag.install);
38
-
39
- import elDialogCenter from '@base/directive/el-dialog-center/index.js';
40
-
41
- Vue.use(elDialogCenter.install);
42
-
43
- import ErroreBox from '@base/components/errorMsg/index.js';
44
-
45
- Vue.use(ErroreBox);
46
-
47
- import ExcelExport from '@base/components/excelExport/index.js';
48
-
49
- Vue.use(ExcelExport);
50
-
51
- import ExcelImport from '@base/components/excelImport/index.js';
52
-
53
- Vue.use(ExcelImport);
54
-
55
- import ConfirmDialog from '@base/components/confirmDialog/index.js';
56
-
57
- Vue.use(ConfirmDialog);
58
-
59
- import baseAlert from '@base/components/baseAlert/index.js';
60
-
61
- Vue.use(baseAlert);
62
-
63
- import permission from '@base/directive/permission';
64
-
65
- Vue.use(permission);
66
-
67
- import VabUpload from '@base/components/VabUpload/index.js';
68
-
69
- Vue.use(VabUpload);
70
-
71
- Vue.component('baseUpload', () => import('@base/components/VabUpload/view.vue'));
72
-
73
- import baseAttachment from '@base/components/baseAttachment/install';
74
-
75
- Vue.use(baseAttachment);
76
- Vue.component('attachmentShowList', () => import('@base/components/baseAttachment/showList'));
77
-
78
- import '@base/resources/js/base/common.js';
79
-
80
- import vxeFilter from '@base/components/table/vxeFilter/index.js';
81
-
82
- Vue.use(vxeFilter);
83
-
84
- import baseTableExport from "@base/components/excelExport/button.vue";
85
-
86
- Vue.component(baseTableExport.name, baseTableExport);
87
-
88
-
89
- /* Vue.component('extendedProperties', () => import('@base/components/extendedProperties/view.vue')); */
90
-
91
- import LimitNumber from '@base/directive/LimitNumber/index.js';
92
-
93
- Vue.use(LimitNumber);
94
-
95
- import baseInputNumber from '@base/components/baseInputNumber/index.vue'
96
-
97
- Vue.component(baseInputNumber.name, baseInputNumber);
98
-
99
- import elReadonly from '@base/directive/el-readonly/index.js';
100
-
101
- Vue.use(elReadonly);
102
-
103
- /*import cnPrint from "@base/components/cnPrint/index.js"
104
-
105
- Vue.use(cnPrint);*/
106
-
107
- /* Vue.component('oplogTable', () => import('@base/components/oplogTable/index.vue')); */
108
- import oplogTable from '@base/components/oplogTable/index.vue'
109
-
110
- Vue.component(oplogTable.name, oplogTable);
111
-
112
- import baseInputBatch from '@base/components/baseInputBatch/index.vue'
113
-
114
- Vue.component(baseInputBatch.name, baseInputBatch);
115
-
116
- Vue.component('baseInputExport', () => import('@base/components/baseInputExport/index.vue'));
117
-
118
- Vue.component('advancedSearchDialog', () => import('@base/components/advancedSearchDialog/index.vue'));
119
-
120
- import baseTabs from '@base/components/baseTabs/index.vue'
121
-
122
- Vue.component(baseTabs.name, baseTabs);
123
-
124
- import baseTabPane from '@base/components/baseTabs/baseTabPane.vue'
125
-
126
- Vue.component(baseTabPane.name, baseTabPane);
127
-
128
- import vb_tabs from "@base/components/vb-tabs/index.vue";
129
- import vb_tab_pane from "@base/components/vb-tabs/tab-pane.vue";
130
- import xTabs from "@base/components/vb-tabs/x-tabs.vue";
131
-
132
- Vue.component(vb_tabs.name, vb_tabs);
133
- Vue.component(vb_tab_pane.name, vb_tab_pane);
134
- Vue.component(xTabs.name, xTabs);
135
-
136
- Vue.component('status-tag', () => import('@base/components/statusTag/index.vue'));
137
-
138
- Vue.component('CodeEditor', () => import('@base/components/code-editor/index.vue'));
139
-
140
- Vue.component('scriptDescriptionButton', () => import('@base/components/scriptDescription/button'));
141
-
142
- Vue.component('scriptTestButton', () => import('@base/components/scriptTest/button'));
143
-
144
- import jsonImport from '@base/components/jsonImport/index.js';
145
-
146
- Vue.use(jsonImport);
147
-
148
- import langImport from '@base/components/langImport/index.js';
149
-
150
- Vue.use(langImport);
151
-
152
- //vform
153
- // import '@base/components/xform/utils/directive'
154
-
155
-
156
- import i18n from '@base/lang/index.js'
157
-
158
- /**
159
- * If you don't want to use mock-server
160
- * you want to use MockJs for mock api
161
- * you can execute: mockXHR()
162
- *
163
- * Currently MockJs will be used in the production environment,
164
- * please remove it before going online ! ! !
165
- */
166
- if (process.env.NODE_ENV === 'production') {
167
- /* const { mockXHR } = require('../mock')
168
- mockXHR() */
169
- }
170
-
171
- Vue.use(Element, {
172
- size: Cookies.get('size') || 'medium' // set element-ui default size
173
- // locale: enLang // 如果使用中文,无需设置,请删除
174
- });
175
-
176
- // register global utility filters
177
- Object.keys(filters).forEach(key => {
178
- Vue.filter(key, filters[key]);
179
- });
180
-
181
- Vue.config.productionTip = false;
182
-
183
- let vue = new Vue({
184
- el: '#app',
185
- router,
186
- store,
187
- i18n,
188
- render: h => h(App)
189
- });
190
- window.$vueRoot = vue;
1
+ /**version-1.0*/
2
+ import Vue from 'vue';
3
+ import Cookies from 'js-cookie';
4
+ import 'normalize.css/normalize.css'; // a modern alternative to CSS resets
5
+ import Element from 'element-ui';
6
+ import '@/styles/element-variables.scss';
7
+ import '@/styles/index.scss'; // global css
8
+
9
+ import App from '@base/App';
10
+ import store from '@base/store';
11
+ import router from '@base/router';
12
+
13
+ import '@/icons'; // icon
14
+ import '@base/permission'; // permission control
15
+
16
+ import * as filters from '@base/filters'; // global filters
17
+
18
+ // main.js 文件添加以下代码
19
+
20
+ import BaseKeepAlive from '@base/utils/keepAlive.js'
21
+
22
+ Vue.component('BaseKeepAlive', BaseKeepAlive)
23
+
24
+ import VXETable from 'vxe-table';
25
+ import 'vxe-table/lib/style.css';
26
+
27
+
28
+
29
+ import Vab from '@base/utils/vab';
30
+
31
+ Vue.use(Vab);
32
+
33
+ Vue.use(VXETable);
34
+
35
+ /* import tablePluns from "@/mixins/table/index.js"
36
+ VXETable.use(tablePluns) */
37
+
38
+ import '@base/components/table/index.js';
39
+
40
+ import drag from '@base/directive/el-drag-dialog/index.js';
41
+
42
+ Vue.use(drag.install);
43
+
44
+ import elDialogCenter from '@base/directive/el-dialog-center/index.js';
45
+
46
+ Vue.use(elDialogCenter.install);
47
+
48
+ import ErroreBox from '@base/components/errorMsg/index.js';
49
+
50
+ Vue.use(ErroreBox);
51
+
52
+ import ExcelExport from '@base/components/excelExport/index.js';
53
+
54
+ Vue.use(ExcelExport);
55
+
56
+ import ExcelImport from '@base/components/excelImport/index.js';
57
+
58
+ Vue.use(ExcelImport);
59
+
60
+ import ConfirmDialog from '@base/components/confirmDialog/index.js';
61
+
62
+ Vue.use(ConfirmDialog);
63
+
64
+ import baseAlert from '@base/components/baseAlert/index.js';
65
+
66
+ Vue.use(baseAlert);
67
+
68
+ import permission from '@base/directive/permission';
69
+
70
+ Vue.use(permission);
71
+
72
+ import VabUpload from '@base/components/VabUpload/index.js';
73
+
74
+ Vue.use(VabUpload);
75
+
76
+ Vue.component('baseUpload', () => import('@base/components/VabUpload/view.vue'));
77
+
78
+ import baseAttachment from '@base/components/baseAttachment/install';
79
+
80
+ Vue.use(baseAttachment);
81
+ Vue.component('attachmentShowList', () => import('@base/components/baseAttachment/showList'));
82
+
83
+ import '@base/resources/js/base/common.js';
84
+
85
+ import vxeFilter from '@base/components/table/vxeFilter/index.js';
86
+
87
+ Vue.use(vxeFilter);
88
+
89
+ import baseTableExport from "@base/components/excelExport/button.vue";
90
+
91
+ Vue.component(baseTableExport.name, baseTableExport);
92
+
93
+
94
+ /* Vue.component('extendedProperties', () => import('@base/components/extendedProperties/view.vue')); */
95
+
96
+ import LimitNumber from '@base/directive/LimitNumber/index.js';
97
+
98
+ Vue.use(LimitNumber);
99
+
100
+ import baseInputNumber from '@base/components/baseInputNumber/index.vue'
101
+
102
+ Vue.component(baseInputNumber.name, baseInputNumber);
103
+
104
+ import elReadonly from '@base/directive/el-readonly/index.js';
105
+
106
+ Vue.use(elReadonly);
107
+
108
+ /*import cnPrint from "@base/components/cnPrint/index.js"
109
+
110
+ Vue.use(cnPrint);*/
111
+
112
+ /* Vue.component('oplogTable', () => import('@base/components/oplogTable/index.vue')); */
113
+ import oplogTable from '@base/components/oplogTable/index.vue'
114
+
115
+ Vue.component(oplogTable.name, oplogTable);
116
+
117
+ import baseInputBatch from '@base/components/baseInputBatch/index.vue'
118
+
119
+ Vue.component(baseInputBatch.name, baseInputBatch);
120
+
121
+ Vue.component('baseInputExport', () => import('@base/components/baseInputExport/index.vue'));
122
+
123
+ Vue.component('advancedSearchDialog', () => import('@base/components/advancedSearchDialog/index.vue'));
124
+
125
+ import baseTabs from '@base/components/baseTabs/index.vue'
126
+
127
+ Vue.component(baseTabs.name, baseTabs);
128
+
129
+ import baseTabPane from '@base/components/baseTabs/baseTabPane.vue'
130
+
131
+ Vue.component(baseTabPane.name, baseTabPane);
132
+
133
+ import vb_tabs from "@base/components/vb-tabs/index.vue";
134
+ import vb_tab_pane from "@base/components/vb-tabs/tab-pane.vue";
135
+ import xTabs from "@base/components/vb-tabs/x-tabs.vue";
136
+
137
+ Vue.component(vb_tabs.name, vb_tabs);
138
+ Vue.component(vb_tab_pane.name, vb_tab_pane);
139
+ Vue.component(xTabs.name, xTabs);
140
+
141
+ Vue.component('status-tag', () => import('@base/components/statusTag/index.vue'));
142
+
143
+ Vue.component('CodeEditor', () => import('@base/components/code-editor/index.vue'));
144
+
145
+ Vue.component('scriptDescriptionButton', () => import('@base/components/scriptDescription/button'));
146
+
147
+ Vue.component('scriptTestButton', () => import('@base/components/scriptTest/button'));
148
+
149
+ import jsonImport from '@base/components/jsonImport/index.js';
150
+
151
+ Vue.use(jsonImport);
152
+
153
+ import langImport from '@base/components/langImport/index.js';
154
+
155
+ Vue.use(langImport);
156
+
157
+ //vform
158
+ // import '@base/components/xform/utils/directive'
159
+
160
+
161
+ import i18n from '@base/lang/index.js'
162
+
163
+ /**
164
+ * If you don't want to use mock-server
165
+ * you want to use MockJs for mock api
166
+ * you can execute: mockXHR()
167
+ *
168
+ * Currently MockJs will be used in the production environment,
169
+ * please remove it before going online ! ! !
170
+ */
171
+ if (process.env.NODE_ENV === 'production') {
172
+ /* const { mockXHR } = require('../mock')
173
+ mockXHR() */
174
+ }
175
+
176
+ Vue.use(Element, {
177
+ size: Cookies.get('size') || 'medium' // set element-ui default size
178
+ // locale: enLang // 如果使用中文,无需设置,请删除
179
+ });
180
+
181
+ // register global utility filters
182
+ Object.keys(filters).forEach(key => {
183
+ Vue.filter(key, filters[key]);
184
+ });
185
+
186
+ Vue.config.productionTip = false;
187
+
188
+ let vue = new Vue({
189
+ el: '#app',
190
+ router,
191
+ store,
192
+ i18n,
193
+ render: h => h(App)
194
+ });
195
+ window.$vueRoot = vue;
@@ -0,0 +1,152 @@
1
+
2
+ let module = {
3
+ install (vxetable, options) {
4
+ let Table = vxetable.Table;
5
+ debugger
6
+ // return
7
+
8
+
9
+
10
+ Table.mixins.push({
11
+ methods: {
12
+ /**
13
+ * 全局按下事件处理
14
+ */
15
+ handleGlobalMousedownEvent : (evnt) => {
16
+ let $xeTable = this
17
+ const { editStore, ctxMenuStore, filterStore, customStore } = reactData
18
+ const { mouseConfig, editRules } = props
19
+ const el = refElem.value
20
+ const editOpts = computeEditOpts.value
21
+ const validOpts = computeValidOpts.value
22
+ const areaOpts = computeAreaOpts.value
23
+ const { actived } = editStore
24
+ const $validTooltip = refValidTooltip.value
25
+ const tableFilter = refTableFilter.value
26
+ const tableCustom = refTableCustom.value
27
+ const tableMenu = refTableMenu.value
28
+ // 筛选
29
+ if (tableFilter) {
30
+ if (getEventTargetNode(evnt, el, 'vxe-cell--filter').flag) {
31
+ // 如果点击了筛选按钮
32
+ } else if (getEventTargetNode(evnt, tableFilter.getRefMaps().refElem.value).flag) {
33
+ // 如果点击筛选容器
34
+ } else {
35
+ if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
36
+ tablePrivateMethods.preventEvent(evnt, 'event.clearFilter', filterStore.args, tableMethods.closeFilter)
37
+ }
38
+ }
39
+ }
40
+ // 自定义列
41
+ if (tableCustom) {
42
+ if (customStore.btnEl === evnt.target || getEventTargetNode(evnt, document.body, 'vxe-toolbar-custom-target').flag) {
43
+ // 如果点击了自定义列按钮
44
+ } else if (getEventTargetNode(evnt, tableCustom.getRefMaps().refElem.value).flag) {
45
+ // 如果点击自定义列容器
46
+ } else {
47
+ if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
48
+ tablePrivateMethods.preventEvent(evnt, 'event.clearCustom', {}, () => {
49
+ if ($xeTable.closeCustom) {
50
+ $xeTable.closeCustom()
51
+ }
52
+ })
53
+ }
54
+ }
55
+ }
56
+
57
+ // 如果已激活了编辑状态
58
+ if (actived.row) {
59
+ if (!(editOpts.autoClear === false)) {
60
+ // 如果是激活状态,点击了单元格之外
61
+ const cell = actived.args.cell
62
+ if ((!cell || !getEventTargetNode(evnt, cell).flag)) {
63
+ if ($validTooltip && getEventTargetNode(evnt, $validTooltip.$el as HTMLDivElement).flag) {
64
+ // 如果是激活状态,且点击了校验提示框
65
+ } else if (!internalData._lastCallTime || internalData._lastCallTime + 50 < Date.now()) {
66
+ // 如果是激活状态,点击了单元格之外
67
+ if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
68
+ // 如果手动调用了激活单元格,避免触发源被移除后导致重复关闭
69
+ tablePrivateMethods.preventEvent(evnt, 'event.clearEdit', actived.args, () => {
70
+ let isClear
71
+ if (editOpts.mode === 'row') {
72
+ const rowTargetNode = getEventTargetNode(evnt, el, 'vxe-body--row')
73
+ const rowNodeRest = rowTargetNode.flag ? tableMethods.getRowNode(rowTargetNode.targetElem) : null
74
+ // row 方式,如果点击了不同行
75
+ isClear = rowNodeRest ? !$xeTable.eqRow(rowNodeRest.item, actived.args.row) : false
76
+ } else {
77
+ // cell 方式,如果是非编辑列
78
+ isClear = !getEventTargetNode(evnt, el, 'col--edit').flag
79
+ }
80
+ // 如果点击表头行,则清除激活状态
81
+ if (!isClear) {
82
+ isClear = getEventTargetNode(evnt, el, 'vxe-header--row').flag
83
+ }
84
+ // 如果点击表尾行,则清除激活状态
85
+ if (!isClear) {
86
+ isClear = getEventTargetNode(evnt, el, 'vxe-footer--row').flag
87
+ }
88
+ // 如果固定了高度且点击了行之外的空白处,则清除激活状态
89
+ if (!isClear && props.height && !reactData.overflowY) {
90
+ const bodyWrapperElem = evnt.target as HTMLDivElement
91
+ if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
92
+ isClear = evnt.offsetY < bodyWrapperElem.clientHeight
93
+ }
94
+ }
95
+ if (
96
+ isClear ||
97
+ // 如果点击了当前表格之外
98
+ !getEventTargetNode(evnt, el).flag
99
+ ) {
100
+ setTimeout(() => {
101
+ $xeTable.handleClearEdit(evnt).then(() => {
102
+ // 如果存在校验,点击了表格之外则清除
103
+ if (!internalData.isActivated && editRules && validOpts.autoClear) {
104
+ reactData.validErrorMaps = {}
105
+ }
106
+ })
107
+ })
108
+ }
109
+ })
110
+ }
111
+ }
112
+ }
113
+ }
114
+ } else if (mouseConfig) {
115
+ if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) && !($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)) {
116
+ if ($xeTable.clearSelected) {
117
+ $xeTable.clearSelected()
118
+ }
119
+ if (areaOpts.autoClear) {
120
+ if ($xeTable.getCellAreas) {
121
+ const cellAreas = $xeTable.getCellAreas()
122
+ if (cellAreas && cellAreas.length && !getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
123
+ tablePrivateMethods.preventEvent(evnt, 'event.clearAreas', {}, () => {
124
+ $xeTable.clearCellAreas()
125
+ $xeTable.clearCopyCellArea()
126
+ dispatchEvent('clear-cell-area-selection', { cellAreas }, evnt)
127
+ })
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ // 如果配置了快捷菜单且,点击了其他地方则关闭
134
+ if ($xeTable.closeMenu) {
135
+ if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) {
136
+ $xeTable.closeMenu()
137
+ }
138
+ }
139
+ const isActivated = getEventTargetNode(evnt, $xeGGWrapper ? $xeGGWrapper.getRefMaps().refElem.value : el).flag
140
+ // 如果存在校验,点击了表格之外则清除
141
+ if (!isActivated && editRules && validOpts.autoClear) {
142
+ reactData.validErrorMaps = {}
143
+ }
144
+ // 最后激活的表格
145
+ internalData.isActivated = isActivated
146
+ }
147
+ }
148
+ })
149
+ }
150
+ }
151
+
152
+ export default module
@@ -35,6 +35,15 @@ export const constantRoutes = [
35
35
  menuUrl: "/pmd/product/common/product_display/detail",
36
36
  },
37
37
  },
38
+ {
39
+ path: "/test",
40
+ component: () =>
41
+ import("@/views/test/index"),
42
+ name: "test",
43
+ meta: {
44
+ title: "表格复制粘贴",
45
+ },
46
+ },
38
47
  ],
39
48
  },
40
49