cloud-web-corejs 1.0.54-dev.673 → 1.0.54-dev.675
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/package.json +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor copy.vue +988 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +87 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +14 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onDynamicColumns-editor.vue +44 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +7 -0
- package/src/components/xform/form-render/container-item/data-table-item.vue +0 -9
- package/src/components/xform/form-render/container-item/data-table-mixin.js +438 -21
- package/src/index.js +72 -61
- package/src/utils/vab.js +88 -107
package/src/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**version-1.0*/
|
|
2
|
-
import Vue from
|
|
3
|
-
import Cookies from
|
|
4
|
-
import
|
|
5
|
-
import Element from
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
8
|
|
|
9
|
-
import App from
|
|
10
|
-
import store from
|
|
11
|
-
import router from
|
|
9
|
+
import App from "@base/App";
|
|
10
|
+
import store from "@base/store";
|
|
11
|
+
import router from "@base/router";
|
|
12
12
|
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import "@/icons"; // icon
|
|
14
|
+
import "@base/permission"; // permission control
|
|
15
15
|
|
|
16
|
-
import * as filters from
|
|
16
|
+
import * as filters from "@base/filters"; // global filters
|
|
17
17
|
|
|
18
18
|
// main.js 文件添加以下代码
|
|
19
19
|
|
|
20
|
-
import BaseKeepAlive from
|
|
20
|
+
import BaseKeepAlive from "@base/utils/keepAlive.js";
|
|
21
21
|
|
|
22
|
-
Vue.component(
|
|
22
|
+
Vue.component("BaseKeepAlive", BaseKeepAlive);
|
|
23
23
|
|
|
24
|
-
import VXETable from
|
|
25
|
-
import
|
|
24
|
+
import VXETable from "vxe-table";
|
|
25
|
+
import "vxe-table/lib/style.css";
|
|
26
26
|
|
|
27
27
|
// 引入扩展插件
|
|
28
|
-
import
|
|
29
|
-
import
|
|
28
|
+
import "@base/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js";
|
|
29
|
+
import "@base/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css";
|
|
30
30
|
|
|
31
31
|
/* // 设置授权信息
|
|
32
32
|
VXETable.setup({
|
|
@@ -39,9 +39,7 @@ VXETable.setup({
|
|
|
39
39
|
// }
|
|
40
40
|
}) */
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
import Vab from '@base/utils/vab';
|
|
42
|
+
import Vab from "@base/utils/vab";
|
|
45
43
|
|
|
46
44
|
Vue.use(Vab);
|
|
47
45
|
|
|
@@ -50,54 +48,58 @@ Vue.use(VXETable);
|
|
|
50
48
|
/* import tablePluns from "@/mixins/table/index.js"
|
|
51
49
|
VXETable.use(tablePluns) */
|
|
52
50
|
|
|
53
|
-
import
|
|
51
|
+
import "@base/components/table/index.js";
|
|
54
52
|
|
|
55
|
-
import drag from
|
|
53
|
+
import drag from "@base/directive/el-drag-dialog/index.js";
|
|
56
54
|
|
|
57
55
|
Vue.use(drag.install);
|
|
58
56
|
|
|
59
|
-
import elDialogCenter from
|
|
57
|
+
import elDialogCenter from "@base/directive/el-dialog-center/index.js";
|
|
60
58
|
|
|
61
59
|
Vue.use(elDialogCenter.install);
|
|
62
60
|
|
|
63
|
-
import ErroreBox from
|
|
61
|
+
import ErroreBox from "@base/components/errorMsg/index.js";
|
|
64
62
|
|
|
65
63
|
Vue.use(ErroreBox);
|
|
66
64
|
|
|
67
|
-
import ExcelExport from
|
|
65
|
+
import ExcelExport from "@base/components/excelExport/index.js";
|
|
68
66
|
|
|
69
67
|
Vue.use(ExcelExport);
|
|
70
68
|
|
|
71
|
-
import ExcelImport from
|
|
69
|
+
import ExcelImport from "@base/components/excelImport/index.js";
|
|
72
70
|
|
|
73
71
|
Vue.use(ExcelImport);
|
|
74
72
|
|
|
75
|
-
import ConfirmDialog from
|
|
73
|
+
import ConfirmDialog from "@base/components/confirmDialog/index.js";
|
|
76
74
|
|
|
77
75
|
Vue.use(ConfirmDialog);
|
|
78
76
|
|
|
79
|
-
import baseAlert from
|
|
77
|
+
import baseAlert from "@base/components/baseAlert/index.js";
|
|
80
78
|
|
|
81
79
|
Vue.use(baseAlert);
|
|
82
80
|
|
|
83
|
-
import permission from
|
|
81
|
+
import permission from "@base/directive/permission";
|
|
84
82
|
|
|
85
83
|
Vue.use(permission);
|
|
86
84
|
|
|
87
|
-
import VabUpload from
|
|
85
|
+
import VabUpload from "@base/components/VabUpload/index.js";
|
|
88
86
|
|
|
89
87
|
Vue.use(VabUpload);
|
|
90
88
|
|
|
91
|
-
Vue.component(
|
|
89
|
+
Vue.component("baseUpload", () =>
|
|
90
|
+
import("@base/components/VabUpload/view.vue")
|
|
91
|
+
);
|
|
92
92
|
|
|
93
|
-
import baseAttachment from
|
|
93
|
+
import baseAttachment from "@base/components/baseAttachment/install";
|
|
94
94
|
|
|
95
95
|
Vue.use(baseAttachment);
|
|
96
|
-
Vue.component(
|
|
96
|
+
Vue.component("attachmentShowList", () =>
|
|
97
|
+
import("@base/components/baseAttachment/showList")
|
|
98
|
+
);
|
|
97
99
|
|
|
98
|
-
import
|
|
100
|
+
import "@base/resources/js/base/common.js";
|
|
99
101
|
|
|
100
|
-
import vxeFilter from
|
|
102
|
+
import vxeFilter from "@base/components/table/vxeFilter/index.js";
|
|
101
103
|
|
|
102
104
|
Vue.use(vxeFilter);
|
|
103
105
|
|
|
@@ -105,18 +107,17 @@ import baseTableExport from "@base/components/excelExport/button.vue";
|
|
|
105
107
|
|
|
106
108
|
Vue.component(baseTableExport.name, baseTableExport);
|
|
107
109
|
|
|
108
|
-
|
|
109
110
|
/* Vue.component('extendedProperties', () => import('@base/components/extendedProperties/view.vue')); */
|
|
110
111
|
|
|
111
|
-
import LimitNumber from
|
|
112
|
+
import LimitNumber from "@base/directive/LimitNumber/index.js";
|
|
112
113
|
|
|
113
114
|
Vue.use(LimitNumber);
|
|
114
115
|
|
|
115
|
-
import baseInputNumber from
|
|
116
|
+
import baseInputNumber from "@base/components/baseInputNumber/index.vue";
|
|
116
117
|
|
|
117
118
|
Vue.component(baseInputNumber.name, baseInputNumber);
|
|
118
119
|
|
|
119
|
-
import elReadonly from
|
|
120
|
+
import elReadonly from "@base/directive/el-readonly/index.js";
|
|
120
121
|
|
|
121
122
|
Vue.use(elReadonly);
|
|
122
123
|
|
|
@@ -125,23 +126,27 @@ Vue.use(elReadonly);
|
|
|
125
126
|
Vue.use(cnPrint);*/
|
|
126
127
|
|
|
127
128
|
/* Vue.component('oplogTable', () => import('@base/components/oplogTable/index.vue')); */
|
|
128
|
-
import oplogTable from
|
|
129
|
+
import oplogTable from "@base/components/oplogTable/index.vue";
|
|
129
130
|
|
|
130
131
|
Vue.component(oplogTable.name, oplogTable);
|
|
131
132
|
|
|
132
|
-
import baseInputBatch from
|
|
133
|
+
import baseInputBatch from "@base/components/baseInputBatch/index.vue";
|
|
133
134
|
|
|
134
135
|
Vue.component(baseInputBatch.name, baseInputBatch);
|
|
135
136
|
|
|
136
|
-
Vue.component(
|
|
137
|
+
Vue.component("baseInputExport", () =>
|
|
138
|
+
import("@base/components/baseInputExport/index.vue")
|
|
139
|
+
);
|
|
137
140
|
|
|
138
|
-
Vue.component(
|
|
141
|
+
Vue.component("advancedSearchDialog", () =>
|
|
142
|
+
import("@base/components/advancedSearchDialog/index.vue")
|
|
143
|
+
);
|
|
139
144
|
|
|
140
|
-
import baseTabs from
|
|
145
|
+
import baseTabs from "@base/components/baseTabs/index.vue";
|
|
141
146
|
|
|
142
147
|
Vue.component(baseTabs.name, baseTabs);
|
|
143
148
|
|
|
144
|
-
import baseTabPane from
|
|
149
|
+
import baseTabPane from "@base/components/baseTabs/baseTabPane.vue";
|
|
145
150
|
|
|
146
151
|
Vue.component(baseTabPane.name, baseTabPane);
|
|
147
152
|
|
|
@@ -153,32 +158,38 @@ Vue.component(vb_tabs.name, vb_tabs);
|
|
|
153
158
|
Vue.component(vb_tab_pane.name, vb_tab_pane);
|
|
154
159
|
Vue.component(xTabs.name, xTabs);
|
|
155
160
|
|
|
156
|
-
Vue.component(
|
|
161
|
+
Vue.component("status-tag", () =>
|
|
162
|
+
import("@base/components/statusTag/index.vue")
|
|
163
|
+
);
|
|
157
164
|
|
|
158
|
-
Vue.component(
|
|
165
|
+
Vue.component("CodeEditor", () =>
|
|
166
|
+
import("@base/components/code-editor/index.vue")
|
|
167
|
+
);
|
|
159
168
|
|
|
160
|
-
Vue.component(
|
|
169
|
+
Vue.component("scriptDescriptionButton", () =>
|
|
170
|
+
import("@base/components/scriptDescription/button")
|
|
171
|
+
);
|
|
161
172
|
|
|
162
|
-
Vue.component(
|
|
173
|
+
Vue.component("scriptTestButton", () =>
|
|
174
|
+
import("@base/components/scriptTest/button")
|
|
175
|
+
);
|
|
163
176
|
|
|
164
|
-
|
|
165
|
-
import baseTextarea from '@base/components/base-textarea/index.vue'
|
|
177
|
+
import baseTextarea from "@base/components/base-textarea/index.vue";
|
|
166
178
|
|
|
167
179
|
Vue.component(baseTextarea.name, baseTextarea);
|
|
168
180
|
|
|
169
|
-
import jsonImport from
|
|
181
|
+
import jsonImport from "@base/components/jsonImport/index.js";
|
|
170
182
|
|
|
171
183
|
Vue.use(jsonImport);
|
|
172
184
|
|
|
173
|
-
import langImport from
|
|
185
|
+
import langImport from "@base/components/langImport/index.js";
|
|
174
186
|
|
|
175
187
|
Vue.use(langImport);
|
|
176
188
|
|
|
177
189
|
//vform
|
|
178
190
|
// import '@base/components/xform/utils/directive'
|
|
179
191
|
|
|
180
|
-
|
|
181
|
-
import i18n from '@base/lang/index.js'
|
|
192
|
+
import i18n from "@base/lang/index.js";
|
|
182
193
|
|
|
183
194
|
/**
|
|
184
195
|
* If you don't want to use mock-server
|
|
@@ -188,28 +199,28 @@ import i18n from '@base/lang/index.js'
|
|
|
188
199
|
* Currently MockJs will be used in the production environment,
|
|
189
200
|
* please remove it before going online ! ! !
|
|
190
201
|
*/
|
|
191
|
-
if (process.env.NODE_ENV ===
|
|
202
|
+
if (process.env.NODE_ENV === "production") {
|
|
192
203
|
/* const { mockXHR } = require('../mock')
|
|
193
204
|
mockXHR() */
|
|
194
205
|
}
|
|
195
206
|
|
|
196
207
|
Vue.use(Element, {
|
|
197
|
-
size: Cookies.get(
|
|
208
|
+
size: Cookies.get("size") || "medium", // set element-ui default size
|
|
198
209
|
// locale: enLang // 如果使用中文,无需设置,请删除
|
|
199
210
|
});
|
|
200
211
|
|
|
201
212
|
// register global utility filters
|
|
202
|
-
Object.keys(filters).forEach(key => {
|
|
213
|
+
Object.keys(filters).forEach((key) => {
|
|
203
214
|
Vue.filter(key, filters[key]);
|
|
204
215
|
});
|
|
205
216
|
|
|
206
217
|
Vue.config.productionTip = false;
|
|
207
218
|
|
|
208
219
|
let vue = new Vue({
|
|
209
|
-
el:
|
|
220
|
+
el: "#app",
|
|
210
221
|
router,
|
|
211
222
|
store,
|
|
212
223
|
i18n,
|
|
213
|
-
render: h => h(App)
|
|
224
|
+
render: (h) => h(App),
|
|
214
225
|
});
|
|
215
226
|
window.$vueRoot = vue;
|
package/src/utils/vab.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/**version-1.0*/
|
|
2
2
|
let install = {};
|
|
3
3
|
|
|
4
|
-
function reqImg(a) {
|
|
5
|
-
return require("@/resources/images/" + a);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
4
|
import request from "./request";
|
|
9
5
|
import * as lodash from "lodash";
|
|
10
6
|
import { Loading, Message, MessageBox, Notification, Form } from "element-ui";
|
|
@@ -30,6 +26,65 @@ let imFun = {
|
|
|
30
26
|
prefixConfig,
|
|
31
27
|
};
|
|
32
28
|
|
|
29
|
+
function reqImg(a) {
|
|
30
|
+
return require("@/resources/images/" + a);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const FILE_ICON_NAME_MAP = {
|
|
34
|
+
word: "ico-wrod.svg",
|
|
35
|
+
excel: "ico-excel.svg",
|
|
36
|
+
ppt: "ico-ppt.svg",
|
|
37
|
+
pdf: "ico-pdf.svg",
|
|
38
|
+
picture: "ico-photo.svg",
|
|
39
|
+
video: "ico-video.svg",
|
|
40
|
+
audio: "ico-music.svg",
|
|
41
|
+
html: "ico-html.svg",
|
|
42
|
+
txt: "ico-txt.svg",
|
|
43
|
+
java: "ico-java.svg",
|
|
44
|
+
vue: "ico-vue.svg",
|
|
45
|
+
xml: "ico-xml.svg",
|
|
46
|
+
flash: "ico-flash.svg",
|
|
47
|
+
zip: "ico-yasuobao.svg",
|
|
48
|
+
exe: "ico-ext.svg",
|
|
49
|
+
psd: "ico-psd.svg",
|
|
50
|
+
folder: "ico-wenjianjia.svg",
|
|
51
|
+
other: "ico-default_wenjian.svg",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const FILE_ICON_TYPE_MAP = {
|
|
55
|
+
doc: "word",
|
|
56
|
+
docx: "word",
|
|
57
|
+
xls: "excel",
|
|
58
|
+
xlsx: "excel",
|
|
59
|
+
ppt: "ppt",
|
|
60
|
+
pptx: "ppt",
|
|
61
|
+
pdf: "pdf",
|
|
62
|
+
jpg: "picture",
|
|
63
|
+
jpeg: "picture",
|
|
64
|
+
png: "picture",
|
|
65
|
+
gif: "picture",
|
|
66
|
+
mp3: "video",
|
|
67
|
+
mp4: "video",
|
|
68
|
+
mpg: "video",
|
|
69
|
+
mkv: "video",
|
|
70
|
+
rmvb: "video",
|
|
71
|
+
avi: "video",
|
|
72
|
+
mov: "video",
|
|
73
|
+
wav: "audio",
|
|
74
|
+
html: "html",
|
|
75
|
+
htm: "html",
|
|
76
|
+
txt: "txt",
|
|
77
|
+
java: "java",
|
|
78
|
+
vue: "vue",
|
|
79
|
+
xml: "xml",
|
|
80
|
+
swf: "flash",
|
|
81
|
+
zip: "zip",
|
|
82
|
+
rar: "zip",
|
|
83
|
+
"7z": "zip",
|
|
84
|
+
// exe: 'exe',
|
|
85
|
+
psd: "psd",
|
|
86
|
+
};
|
|
87
|
+
|
|
33
88
|
const accessToken = imFun.store.getters["user/token"];
|
|
34
89
|
|
|
35
90
|
const loadingText = "";
|
|
@@ -62,9 +117,9 @@ install = (Vue, opts = {}) => {
|
|
|
62
117
|
option.addCreateInfo = defaultOption.addCreateInfo;
|
|
63
118
|
}
|
|
64
119
|
if (
|
|
65
|
-
opts.queryCreateInfo === null
|
|
66
|
-
opts.queryCreateInfo === undefined
|
|
67
|
-
opts.queryCreateInfo === true
|
|
120
|
+
opts.queryCreateInfo === null
|
|
121
|
+
|| opts.queryCreateInfo === undefined
|
|
122
|
+
|| opts.queryCreateInfo === true
|
|
68
123
|
) {
|
|
69
124
|
option.queryCreateInfo = defaultOption.queryCreateInfo;
|
|
70
125
|
}
|
|
@@ -330,6 +385,7 @@ install = (Vue, opts = {}) => {
|
|
|
330
385
|
"webp",
|
|
331
386
|
"tga",
|
|
332
387
|
"svg",
|
|
388
|
+
"vue",
|
|
333
389
|
];
|
|
334
390
|
Vue.prototype.$commonFileUtil = {
|
|
335
391
|
// 文件类型获取与判断接口
|
|
@@ -536,102 +592,27 @@ install = (Vue, opts = {}) => {
|
|
|
536
592
|
return this.getFileIconRequire(filename);
|
|
537
593
|
}
|
|
538
594
|
},
|
|
539
|
-
|
|
540
|
-
let iconType = this.getDiyFileIconType(name);
|
|
541
|
-
if (!iconType) {
|
|
542
|
-
iconType = "other";
|
|
543
|
-
}
|
|
544
|
-
let fileIconNameMap = {
|
|
545
|
-
word: "ico-wrod.svg",
|
|
546
|
-
excel: "ico-excel.svg",
|
|
547
|
-
ppt: "ico-ppt.svg",
|
|
548
|
-
pdf: "ico-pdf.svg",
|
|
549
|
-
picture: "ico-photo.svg",
|
|
550
|
-
video: "ico-video.svg",
|
|
551
|
-
audio: "ico-music.svg",
|
|
552
|
-
html: "ico-html.svg",
|
|
553
|
-
txt: "ico-txt.svg",
|
|
554
|
-
flash: "ico-flash.svg",
|
|
555
|
-
zip: "ico-yasuobao.svg",
|
|
556
|
-
exe: "ico-ext.svg",
|
|
557
|
-
psd: "ico-psd.svg",
|
|
558
|
-
folder: "ico-wenjianjia.svg",
|
|
559
|
-
other: "ico-default_wenjian.svg",
|
|
560
|
-
};
|
|
595
|
+
resolveFileIconName: function (name, showType) {
|
|
596
|
+
let iconType = this.getDiyFileIconType(name) || "other";
|
|
561
597
|
if (showType) {
|
|
562
598
|
iconType = showType;
|
|
563
599
|
}
|
|
564
|
-
|
|
565
|
-
|
|
600
|
+
return FILE_ICON_NAME_MAP[iconType];
|
|
601
|
+
},
|
|
602
|
+
getFileIconRequire: function (name, showType) {
|
|
603
|
+
return reqImg(this.resolveFileIconName(name, showType));
|
|
566
604
|
},
|
|
567
605
|
getFileIconPath: function (name, showType) {
|
|
568
|
-
|
|
569
|
-
if (!iconType) {
|
|
570
|
-
iconType = "other";
|
|
571
|
-
}
|
|
572
|
-
let fileIconNameMap = {
|
|
573
|
-
word: "ico-wrod.svg",
|
|
574
|
-
excel: "ico-excel.svg",
|
|
575
|
-
ppt: "ico-ppt.svg",
|
|
576
|
-
pdf: "ico-pdf.svg",
|
|
577
|
-
picture: "ico-photo.svg",
|
|
578
|
-
video: "ico-video.svg",
|
|
579
|
-
audio: "ico-music.svg",
|
|
580
|
-
html: "ico-html.svg",
|
|
581
|
-
txt: "ico-txt.svg",
|
|
582
|
-
flash: "ico-flash.svg",
|
|
583
|
-
zip: "ico-yasuobao.svg",
|
|
584
|
-
exe: "ico-ext.svg",
|
|
585
|
-
psd: "ico-psd.svg",
|
|
586
|
-
folder: "ico-wenjianjia.svg",
|
|
587
|
-
other: "ico-default_wenjian.svg",
|
|
588
|
-
};
|
|
589
|
-
if (showType) {
|
|
590
|
-
iconType = showType;
|
|
591
|
-
}
|
|
592
|
-
let fileIcenName = fileIconNameMap[iconType];
|
|
593
|
-
let path = "/resources/images/" + fileIcenName;
|
|
594
|
-
return path;
|
|
606
|
+
return "/resources/images/" + this.resolveFileIconName(name, showType);
|
|
595
607
|
},
|
|
596
608
|
getDiyFileIconType: function (name) {
|
|
597
|
-
let fileIconTypeMap = {
|
|
598
|
-
doc: "word",
|
|
599
|
-
docx: "word",
|
|
600
|
-
xls: "excel",
|
|
601
|
-
xlsx: "excel",
|
|
602
|
-
ppt: "ppt",
|
|
603
|
-
pptx: "ppt",
|
|
604
|
-
pdf: "pdf",
|
|
605
|
-
jpg: "picture",
|
|
606
|
-
jpeg: "picture",
|
|
607
|
-
png: "picture",
|
|
608
|
-
gif: "picture",
|
|
609
|
-
mp3: "video",
|
|
610
|
-
mp4: "video",
|
|
611
|
-
mpg: "video",
|
|
612
|
-
mkv: "video",
|
|
613
|
-
rmvb: "video",
|
|
614
|
-
avi: "video",
|
|
615
|
-
mov: "video",
|
|
616
|
-
wav: "audio",
|
|
617
|
-
html: "html",
|
|
618
|
-
htm: "html",
|
|
619
|
-
txt: "txt",
|
|
620
|
-
swf: "flash",
|
|
621
|
-
zip: "zip",
|
|
622
|
-
rar: "zip",
|
|
623
|
-
"7z": "zip",
|
|
624
|
-
// exe: 'exe',
|
|
625
|
-
psd: "psd",
|
|
626
|
-
};
|
|
627
|
-
|
|
628
609
|
let suffix = this.getFileSuffix(name);
|
|
629
610
|
if (suffix === "") {
|
|
630
611
|
// 默认是文本类型
|
|
631
612
|
return "";
|
|
632
613
|
}
|
|
633
614
|
|
|
634
|
-
let iconType =
|
|
615
|
+
let iconType = FILE_ICON_TYPE_MAP[suffix];
|
|
635
616
|
if (undefined === iconType) {
|
|
636
617
|
return "";
|
|
637
618
|
}
|
|
@@ -798,8 +779,8 @@ install = (Vue, opts = {}) => {
|
|
|
798
779
|
if (Array.isArray(attachment)) {
|
|
799
780
|
let currentFile = attachment[index];
|
|
800
781
|
let typeStr = Object.prototype.toString.call(currentFile);
|
|
801
|
-
let url
|
|
802
|
-
typeStr === "[object Object]"
|
|
782
|
+
let url
|
|
783
|
+
= typeStr === "[object Object]"
|
|
803
784
|
? currentFile.domain + currentFile.url
|
|
804
785
|
: currentFile;
|
|
805
786
|
if (that.$commonFileUtil.isPictureFile(url)) {
|
|
@@ -809,8 +790,8 @@ install = (Vue, opts = {}) => {
|
|
|
809
790
|
}
|
|
810
791
|
} else {
|
|
811
792
|
let typeStr = Object.prototype.toString.call(attachment);
|
|
812
|
-
let url
|
|
813
|
-
typeStr === "[object Object]"
|
|
793
|
+
let url
|
|
794
|
+
= typeStr === "[object Object]"
|
|
814
795
|
? attachment.domain + attachment.url
|
|
815
796
|
: attachment;
|
|
816
797
|
if (that.$commonFileUtil.isPictureFile(url)) {
|
|
@@ -838,11 +819,11 @@ install = (Vue, opts = {}) => {
|
|
|
838
819
|
let visibleKey = target.$attrs["visible-key"] || "showEdit";
|
|
839
820
|
let parentTarget = target.$attrs["parent-target"] || target.$parent;
|
|
840
821
|
let originTarget = parentTarget.$refs._viewDialog ? parentTarget : target;
|
|
841
|
-
let updateParam
|
|
842
|
-
param !== null
|
|
843
|
-
param !== undefined
|
|
844
|
-
param.updateParam !== null
|
|
845
|
-
param.updateParam !== undefined
|
|
822
|
+
let updateParam
|
|
823
|
+
= param !== null
|
|
824
|
+
&& param !== undefined
|
|
825
|
+
&& param.updateParam !== null
|
|
826
|
+
&& param.updateParam !== undefined
|
|
846
827
|
? param.updateParam
|
|
847
828
|
: {};
|
|
848
829
|
for (let key in updateParam) {
|
|
@@ -1067,8 +1048,8 @@ install = (Vue, opts = {}) => {
|
|
|
1067
1048
|
let price;
|
|
1068
1049
|
if (priceRoundType === "roundHalfUp") {
|
|
1069
1050
|
price = (
|
|
1070
|
-
Math.round(value * Math.pow(10, priceScale))
|
|
1071
|
-
Math.pow(10, priceScale)
|
|
1051
|
+
Math.round(value * Math.pow(10, priceScale))
|
|
1052
|
+
/ Math.pow(10, priceScale)
|
|
1072
1053
|
).toFixed(priceScale);
|
|
1073
1054
|
} else if (priceRoundType === "roundUp") {
|
|
1074
1055
|
price = (
|
|
@@ -1076,8 +1057,8 @@ install = (Vue, opts = {}) => {
|
|
|
1076
1057
|
).toFixed(priceScale);
|
|
1077
1058
|
} else {
|
|
1078
1059
|
price = (
|
|
1079
|
-
Math.floor(value * Math.pow(10, priceScale))
|
|
1080
|
-
Math.pow(10, priceScale)
|
|
1060
|
+
Math.floor(value * Math.pow(10, priceScale))
|
|
1061
|
+
/ Math.pow(10, priceScale)
|
|
1081
1062
|
).toFixed(priceScale);
|
|
1082
1063
|
}
|
|
1083
1064
|
return price;
|
|
@@ -1106,8 +1087,8 @@ install = (Vue, opts = {}) => {
|
|
|
1106
1087
|
/* dicts.forEach((item) => {
|
|
1107
1088
|
dictMap[item.sn] = item.value;
|
|
1108
1089
|
}); */
|
|
1109
|
-
option.success
|
|
1110
|
-
option.success({
|
|
1090
|
+
option.success
|
|
1091
|
+
&& option.success({
|
|
1111
1092
|
dicts,
|
|
1112
1093
|
dictMap,
|
|
1113
1094
|
});
|
|
@@ -1242,8 +1223,8 @@ install = (Vue, opts = {}) => {
|
|
|
1242
1223
|
return i18n._t(path, lang, { zh: { [path]: path } }, null, values);
|
|
1243
1224
|
} else {
|
|
1244
1225
|
return (
|
|
1245
|
-
i18n.t(path, values)
|
|
1246
|
-
i18n._t(path, lang, { zh: { [path]: path } }, null, values)
|
|
1226
|
+
i18n.t(path, values)
|
|
1227
|
+
|| i18n._t(path, lang, { zh: { [path]: path } }, null, values)
|
|
1247
1228
|
);
|
|
1248
1229
|
}
|
|
1249
1230
|
}
|