agilebuilder-ui 1.0.76 → 1.0.77
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/lib/super-ui.css +1 -1
- package/lib/super-ui.js +80258 -78821
- package/lib/super-ui.umd.cjs +103 -103
- package/package.json +1 -1
- package/packages/department-tree/src/department-tree.vue +0 -1
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +15 -15
- package/packages/department-user-tree/src/department-user-tree.vue +1 -0
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +17 -19
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +0 -11
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +5 -5
- package/packages/fs-upload-list/src/fs-upload-list.vue +179 -119
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +2 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +2 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +2 -2
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +1 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +0 -6
- package/packages/fs-upload-new/src/fs-upload-new.vue +15 -13
- package/packages/index.js +8 -2
- package/packages/organization-input/src/organization-input.vue +3 -0
- package/packages/plugins/export-data-new.js +34 -1
- package/packages/scan-code-input/src/scan-code-input.vue +136 -104
- package/packages/scan-code-input-browser/index.js +6 -0
- package/packages/{scan-code-input/src/scan-code-input-colse.vue → scan-code-input-browser/src/scan-code-input.vue} +1 -28
- package/packages/super-grid/src/apis.js +12 -0
- package/packages/super-grid/src/dynamic-input.vue +236 -14
- package/packages/super-grid/src/normal-column.vue +37 -2
- package/packages/super-grid/src/scan-util.ts +243 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +3 -1
- package/packages/super-grid/src/search-form-item.vue +4 -2
- package/packages/super-grid/src/super-grid-service.js +2 -1
- package/packages/super-grid/src/super-grid.vue +19 -0
- package/packages/super-grid/src/utils.js +9 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +31 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +28 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +26 -0
- package/packages/workgroup-tree-mobile/index.js +6 -0
- package/packages/workgroup-tree-mobile/src/dept-result.vue +51 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +120 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +375 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-service.ts +62 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +15 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +27 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +11 -0
- package/packages/workgroup-user-tree-mobile/index.js +6 -0
- package/packages/workgroup-user-tree-mobile/src/dept-path.vue +36 -0
- package/packages/workgroup-user-tree-mobile/src/dept-result.vue +58 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue +119 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +394 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-service.ts +41 -0
- package/src/i18n/langs/cn.js +3 -1
- package/src/i18n/langs/en.js +3 -1
- package/src/utils/common-util.js +18 -2
- package/src/views/layout/EmptyLayout.vue +1 -44
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:readonly="true"
|
|
9
9
|
>
|
|
10
10
|
<template v-slot:append>
|
|
11
|
-
<el-button
|
|
11
|
+
<el-button :icon="Upload" size="default" @click="openAnnexUpload" />
|
|
12
12
|
</template>
|
|
13
13
|
</el-input>
|
|
14
14
|
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
:componentId="componentId"
|
|
45
45
|
:componentName="componentName"
|
|
46
46
|
:listCode="listCode"
|
|
47
|
-
:options="options"
|
|
48
47
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
49
48
|
@uploadend="uploadendMobile"
|
|
50
49
|
@remove="removeMobileFile"
|
|
@@ -161,10 +160,6 @@ const props = defineProps({
|
|
|
161
160
|
return 'file-upload'
|
|
162
161
|
}
|
|
163
162
|
},
|
|
164
|
-
options: {
|
|
165
|
-
type: Object,
|
|
166
|
-
default: null
|
|
167
|
-
},
|
|
168
163
|
// 列表编码
|
|
169
164
|
listCode: {
|
|
170
165
|
type: String,
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
:componentId="componentId"
|
|
26
26
|
:componentName="componentName"
|
|
27
27
|
:listCode="listCode"
|
|
28
|
-
:options="options"
|
|
29
28
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
30
29
|
@uploadend="uploadedFile"
|
|
31
30
|
@remove="removeFile"
|
|
@@ -55,7 +54,6 @@
|
|
|
55
54
|
:componentId="componentId"
|
|
56
55
|
:componentName="componentName"
|
|
57
56
|
:listCode="listCode"
|
|
58
|
-
:options="options"
|
|
59
57
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
60
58
|
@uploadend="uploadedFile"
|
|
61
59
|
@remove="removeFile"
|
|
@@ -170,10 +168,6 @@ const props = defineProps({
|
|
|
170
168
|
return 'file-upload'
|
|
171
169
|
}
|
|
172
170
|
},
|
|
173
|
-
options: {
|
|
174
|
-
type: Object,
|
|
175
|
-
default: null
|
|
176
|
-
},
|
|
177
171
|
// 列表编码
|
|
178
172
|
listCode: {
|
|
179
173
|
type: String,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
:row="entity"
|
|
6
6
|
:disabled="disabled"
|
|
7
7
|
:fileInfo="fileInfo"
|
|
8
|
-
|
|
9
|
-
:fileSetObj="{ accept: accept, multiple: multiple, limitFileSize: limitFileSize }"
|
|
8
|
+
:openFsUpload="openFsUpload"
|
|
9
|
+
:fileSetObj="{ accept: accept, multiple: multiple, limitFileSize: limitFileSize, limit: limitNum }"
|
|
10
10
|
@upload-success="onInputUploadSuccess"
|
|
11
11
|
@delete-success="onInputDeleteSuccess"
|
|
12
12
|
/>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
:systemCode="systemCode"
|
|
18
18
|
:accept="accept"
|
|
19
19
|
:multiple="multiple"
|
|
20
|
-
:limit="
|
|
20
|
+
:limit="limitNum"
|
|
21
21
|
:limitFileSize="limitFileSize"
|
|
22
22
|
:placeholder="placeholder"
|
|
23
23
|
:action="action"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
:systemCode="systemCode"
|
|
40
40
|
:accept="accept"
|
|
41
41
|
:multiple="multiple"
|
|
42
|
-
:limit="
|
|
42
|
+
:limit="limitNum"
|
|
43
43
|
:limitFileSize="limitFileSize"
|
|
44
44
|
:placeholder="placeholder"
|
|
45
45
|
:action="action"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
:systemCode="systemCode"
|
|
63
63
|
:accept="accept"
|
|
64
64
|
:multiple="multiple"
|
|
65
|
-
:limit="
|
|
65
|
+
:limit="limitNum"
|
|
66
66
|
:limitFileSize="limitFileSize"
|
|
67
67
|
:placeholder="placeholder"
|
|
68
68
|
:action="action"
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
:componentId="componentId"
|
|
80
80
|
:componentName="componentName"
|
|
81
81
|
:listCode="listCode"
|
|
82
|
-
:options="options"
|
|
83
82
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
84
83
|
/>
|
|
85
84
|
<FileUploadMobile v-else-if="isMobile"
|
|
@@ -89,7 +88,7 @@
|
|
|
89
88
|
:systemCode="systemCode"
|
|
90
89
|
:accept="accept"
|
|
91
90
|
:multiple="multiple"
|
|
92
|
-
:limit="
|
|
91
|
+
:limit="limitNum"
|
|
93
92
|
:limitFileSize="limitFileSize"
|
|
94
93
|
:placeholder="placeholder"
|
|
95
94
|
:action="action"
|
|
@@ -106,7 +105,6 @@
|
|
|
106
105
|
:componentId="componentId"
|
|
107
106
|
:componentName="componentName"
|
|
108
107
|
:listCode="listCode"
|
|
109
|
-
:options="options"
|
|
110
108
|
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
111
109
|
@uploadend="uploadendMobile"
|
|
112
110
|
@remove="removeMobileFile"
|
|
@@ -156,7 +154,7 @@ const props = defineProps({
|
|
|
156
154
|
},
|
|
157
155
|
limit: {
|
|
158
156
|
type: Number,
|
|
159
|
-
default:
|
|
157
|
+
default: null
|
|
160
158
|
},
|
|
161
159
|
limitFileSize: {
|
|
162
160
|
type: Number,
|
|
@@ -220,10 +218,6 @@ const props = defineProps({
|
|
|
220
218
|
return 'file-upload'
|
|
221
219
|
}
|
|
222
220
|
},
|
|
223
|
-
options: {
|
|
224
|
-
type: Object,
|
|
225
|
-
default: null
|
|
226
|
-
},
|
|
227
221
|
// 列表编码
|
|
228
222
|
listCode: {
|
|
229
223
|
type: String,
|
|
@@ -242,6 +236,14 @@ const listFileLabel = ref<string>('')
|
|
|
242
236
|
if (props.displayType === 'input') {
|
|
243
237
|
listFileLabel.value = props.fileInfo.showName || ''
|
|
244
238
|
}
|
|
239
|
+
let limitNum = ref(null)
|
|
240
|
+
if(props.limit){
|
|
241
|
+
limitNum.value = props.limit
|
|
242
|
+
} else if(props.multiple){
|
|
243
|
+
limitNum.value = 9
|
|
244
|
+
} else {
|
|
245
|
+
limitNum.value = 1
|
|
246
|
+
}
|
|
245
247
|
const onInputUploadSuccess = (res: any) => {
|
|
246
248
|
if (listFileLabel.value) {
|
|
247
249
|
listFileLabel.value = listFileLabel.value + ',' + res.showName
|
package/packages/index.js
CHANGED
|
@@ -37,6 +37,8 @@ import DepartmentTreeMobile from './department-tree-mobile'
|
|
|
37
37
|
import DepartmentUserTreeMobile from './department-user-tree-mobile'
|
|
38
38
|
import SuperIcon from './super-icon'
|
|
39
39
|
import FsUploadNew from './fs-upload-new'
|
|
40
|
+
import ScanCodeInputBrowser from './scan-code-input-browser'
|
|
41
|
+
import WorkgroupTreeMobile from './workgroup-tree-mobile'
|
|
40
42
|
import * as ElementPlusIconsVue from "@element-plus/icons-vue"
|
|
41
43
|
// 将所有组件都存储起来,方便后续统一注册
|
|
42
44
|
const components = [
|
|
@@ -73,7 +75,9 @@ const components = [
|
|
|
73
75
|
DepartmentTreeMobile,
|
|
74
76
|
DepartmentUserTreeMobile,
|
|
75
77
|
SuperIcon,
|
|
76
|
-
FsUploadNew
|
|
78
|
+
FsUploadNew,
|
|
79
|
+
ScanCodeInputBrowser,
|
|
80
|
+
WorkgroupTreeMobile
|
|
77
81
|
]
|
|
78
82
|
|
|
79
83
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
@@ -131,7 +135,9 @@ export {
|
|
|
131
135
|
DepartmentTreeMobile,
|
|
132
136
|
DepartmentUserTreeMobile,
|
|
133
137
|
SuperIcon,
|
|
134
|
-
FsUploadNew
|
|
138
|
+
FsUploadNew,
|
|
139
|
+
ScanCodeInputBrowser,
|
|
140
|
+
WorkgroupTreeMobile
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
export default {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
:readonly="true"
|
|
8
8
|
:size="size"
|
|
9
9
|
type="text"
|
|
10
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
10
11
|
>
|
|
11
12
|
<template v-slot:append>
|
|
12
13
|
<el-icon v-slot:suffix class="el-input__icon"><el-icon-search/></el-icon>
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
:readonly="true"
|
|
21
22
|
:size="size"
|
|
22
23
|
type="text"
|
|
24
|
+
:placeholder="$t('imatrixUIMessage.pleaseSelect')"
|
|
23
25
|
@click="showOrganizationTree(false)"
|
|
24
26
|
@change="changeEvent"
|
|
25
27
|
>
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
<workgroup-tree
|
|
57
59
|
v-if="treeType && treeType === 'WgTree' && showOrganizationTreeFlag"
|
|
58
60
|
:multiple="typeof multiple === 'undefined' ? false : multiple"
|
|
61
|
+
:branch-info="departmentInfo"
|
|
59
62
|
:search-field="searchField"
|
|
60
63
|
:select-workgroup-info="selectOrganizationInfo"
|
|
61
64
|
:separator="separator"
|
|
@@ -338,11 +338,32 @@ function exportListData(
|
|
|
338
338
|
exportOptions.pageContext.canClick = true
|
|
339
339
|
}
|
|
340
340
|
if (isAsync) {
|
|
341
|
+
const message = getI18n().t('imatrixUIMessage.asyncExport')
|
|
342
|
+
const exportPageUrl = getDcExportPageUrl()
|
|
343
|
+
let vnode
|
|
344
|
+
if (exportPageUrl) {
|
|
345
|
+
vnode = '<p><span>' + message + '</span>'
|
|
346
|
+
// 请点击进行权限申请
|
|
347
|
+
const asyncExportJumpMsg = getI18n().t('imatrixUIMessage.asyncExportJumpMsg')
|
|
348
|
+
vnode += '<a href="#" style="color: #1800ff;font-weight: bold;text-decoration:underline" onclick="window.open(\'' + exportPageUrl + '\')">' + asyncExportJumpMsg + '</a>'
|
|
349
|
+
vnode += '</p>'
|
|
350
|
+
}
|
|
351
|
+
if (vnode) {
|
|
341
352
|
Message({
|
|
342
|
-
|
|
353
|
+
showClose: true,
|
|
354
|
+
dangerouslyUseHTMLString: true,
|
|
355
|
+
message: vnode,
|
|
343
356
|
type: 'success',
|
|
357
|
+
duration: 10 * 1000
|
|
358
|
+
})
|
|
359
|
+
} else {
|
|
360
|
+
Message({
|
|
344
361
|
showClose: true,
|
|
362
|
+
message: message,
|
|
363
|
+
type: 'success',
|
|
364
|
+
duration: 5 * 1000
|
|
345
365
|
})
|
|
366
|
+
}
|
|
346
367
|
localStorage.setItem(uuid, 'ok')
|
|
347
368
|
} else {
|
|
348
369
|
if (data.indexOf('~~') >= 0) {
|
|
@@ -375,6 +396,18 @@ function exportListData(
|
|
|
375
396
|
}
|
|
376
397
|
})
|
|
377
398
|
}
|
|
399
|
+
// 获得文件中心/导出任务菜单的路由地址
|
|
400
|
+
function getDcExportPageUrl() {
|
|
401
|
+
let exportPageUrl
|
|
402
|
+
const baseAPI = Vue.prototype.baseAPI
|
|
403
|
+
if (baseAPI) {
|
|
404
|
+
// 获得平台的域名和端口
|
|
405
|
+
const baseUrls = baseAPI.split('/')
|
|
406
|
+
const baseUrlPrefix = baseUrls[0] + '//' + baseUrls[2]
|
|
407
|
+
exportPageUrl = baseUrlPrefix + '/document-center/#/file-task/file-export-task/list'
|
|
408
|
+
}
|
|
409
|
+
return exportPageUrl
|
|
410
|
+
}
|
|
378
411
|
/**
|
|
379
412
|
* 根据uuid获取导出情况
|
|
380
413
|
* @param {*} uuid
|
|
@@ -13,120 +13,152 @@
|
|
|
13
13
|
@input="input"
|
|
14
14
|
@clear="clear"
|
|
15
15
|
>
|
|
16
|
-
<template v-slot:append>
|
|
17
|
-
<
|
|
18
|
-
v-if="isMobile"
|
|
19
|
-
:icon="ElIconFullScreen"
|
|
20
|
-
@click="openVideo"
|
|
21
|
-
/>
|
|
16
|
+
<template v-if="isShowScanIcon" v-slot:append>
|
|
17
|
+
<SuperIcon iconValue="fa-barcode" @click="scanClick()"></SuperIcon>
|
|
22
18
|
</template>
|
|
23
19
|
<!-- <el-button slot="append" icon="el-icon-full-screen" @click="openVideo" /> -->
|
|
24
20
|
</el-input>
|
|
25
|
-
<scan-code-input-colse
|
|
26
|
-
v-if="isShow"
|
|
27
|
-
:colse-video="colseVideo"
|
|
28
|
-
@close="closeVideo"
|
|
29
|
-
/>
|
|
21
|
+
<scan-code-input-browser v-if="isShow" :colse-video="colseVideo" @close="closeBrowserScan" />
|
|
30
22
|
</div>
|
|
31
23
|
</template>
|
|
32
24
|
|
|
33
25
|
<script type="text/ecmascript-6">
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import scanCodeInputColse from './scan-code-input-colse.vue'
|
|
26
|
+
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
27
|
+
import scanCodeInputBrowser from '../../scan-code-input-browser/src/scan-code-input.vue'
|
|
37
28
|
import events from './events'
|
|
29
|
+
import { isMobileBrowser } from '../../../src/utils/common-util'
|
|
38
30
|
export default {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
data() {
|
|
32
|
+
const isMobile = isMobileBrowser()
|
|
33
|
+
let userAgent
|
|
34
|
+
const userAgentOrg = navigator.userAgent
|
|
35
|
+
if (userAgentOrg.indexOf(' uni-app ') > 0) {
|
|
36
|
+
// 表示uni-app中访问的
|
|
37
|
+
userAgent = 'app'
|
|
38
|
+
} else {
|
|
39
|
+
// 表示手机浏览器访问的
|
|
40
|
+
userAgent = 'browser'
|
|
41
|
+
}
|
|
42
|
+
console.log('scanCodeInputBrowser----window.location.protocol---', window.location.protocol)
|
|
43
|
+
const isShowScanIcon = isMobile && window.location.protocol === 'https:' ? true: false
|
|
44
|
+
const isApk = isMobile && userAgent && userAgent === 'app' ? true: false
|
|
45
|
+
return {
|
|
46
|
+
isMobile,
|
|
47
|
+
isShow: false,
|
|
48
|
+
scanCode: '',
|
|
49
|
+
isShowScanIcon,
|
|
50
|
+
isApk
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
name: 'ScanCodeInput',
|
|
54
|
+
components: {
|
|
55
|
+
scanCodeInputBrowser
|
|
56
|
+
},
|
|
57
|
+
model: {
|
|
58
|
+
prop: 'value',
|
|
59
|
+
event: 'input'
|
|
60
|
+
},
|
|
61
|
+
props: {
|
|
62
|
+
colseVideo: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
value: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: null
|
|
69
|
+
},
|
|
70
|
+
disable: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false
|
|
73
|
+
},
|
|
74
|
+
placeholder: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: null
|
|
77
|
+
},
|
|
78
|
+
clearable: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: null
|
|
81
|
+
},
|
|
82
|
+
readonly: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
maxlength: {
|
|
87
|
+
type: Number,
|
|
88
|
+
default: null
|
|
89
|
+
},
|
|
90
|
+
// 组件id,页面内要唯一
|
|
91
|
+
componentId: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: null
|
|
94
|
+
},
|
|
95
|
+
// 列表中使用该组件,需要传该参数
|
|
96
|
+
listCode: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: null
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
watch: {
|
|
102
|
+
value: {
|
|
103
|
+
deep: true,
|
|
104
|
+
handler(val) {
|
|
105
|
+
this.scanCode = this.value
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
created() {
|
|
110
|
+
// this.tipShow = true
|
|
111
|
+
this.scanCode = this.value
|
|
112
|
+
},
|
|
113
|
+
beforeUnmount() {},
|
|
114
|
+
methods: {
|
|
115
|
+
...events,
|
|
116
|
+
// equipment() {
|
|
117
|
+
// const flag = navigator.userAgent.match(
|
|
118
|
+
// /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
|
|
119
|
+
// )
|
|
120
|
+
// if (flag) {
|
|
121
|
+
// return flag
|
|
122
|
+
// } else {
|
|
123
|
+
// try {
|
|
124
|
+
// document.createEvent('TouchEvent')
|
|
125
|
+
// return true
|
|
126
|
+
// } catch (e) {
|
|
127
|
+
// return false
|
|
128
|
+
// }
|
|
129
|
+
// }
|
|
130
|
+
// },
|
|
131
|
+
openVideo() {
|
|
132
|
+
if (this.isShow) {
|
|
133
|
+
this.isShow = false
|
|
134
|
+
} else {
|
|
135
|
+
this.isShow = true
|
|
46
136
|
}
|
|
47
137
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
clearable: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: null
|
|
76
|
-
},
|
|
77
|
-
readonly: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false
|
|
80
|
-
},
|
|
81
|
-
maxlength: {
|
|
82
|
-
type: Number,
|
|
83
|
-
default: null
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
watch: {
|
|
87
|
-
value: {
|
|
88
|
-
deep: true,
|
|
89
|
-
handler(val) {
|
|
90
|
-
this.scanCode = this.value
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
created() {
|
|
95
|
-
// this.tipShow = true
|
|
96
|
-
this.isMobile = this.equipment()
|
|
97
|
-
this.scanCode = this.value
|
|
98
|
-
},
|
|
99
|
-
beforeUnmount() {
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
methods: {
|
|
103
|
-
...events,
|
|
104
|
-
equipment() {
|
|
105
|
-
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
|
106
|
-
if (flag) {
|
|
107
|
-
return flag
|
|
108
|
-
} else {
|
|
109
|
-
try {
|
|
110
|
-
document.createEvent('TouchEvent')
|
|
111
|
-
return true
|
|
112
|
-
} catch (e) {
|
|
113
|
-
return false
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
openVideo() {
|
|
118
|
-
if (this.isShow) {
|
|
119
|
-
this.isShow = false
|
|
120
|
-
} else {
|
|
121
|
-
this.isShow = true
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
closeVideo(value) {
|
|
125
|
-
this.isShow = false
|
|
126
|
-
this.value = value
|
|
127
|
-
$emit(this, "colse",value)
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
emits:['colse','update:value',]
|
|
138
|
+
closeBrowserScan(value) {
|
|
139
|
+
this.isShow = false
|
|
140
|
+
this.value = value
|
|
141
|
+
$emit(this, 'colse', value)
|
|
142
|
+
},
|
|
143
|
+
scanClick(){
|
|
144
|
+
if(!this.isApk){
|
|
145
|
+
// 表示是移动端浏览器
|
|
146
|
+
this.openVideo()
|
|
147
|
+
} else {
|
|
148
|
+
// 表示是移动端apk
|
|
149
|
+
this.scanClickApk()
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
scanClickApk() {
|
|
153
|
+
// 表示是APK中
|
|
154
|
+
const message = {
|
|
155
|
+
type: 'scan',
|
|
156
|
+
componentId: this.componentId,
|
|
157
|
+
listCode: this.listCode
|
|
158
|
+
}
|
|
159
|
+
window.parent.postMessage(JSON.stringify(message), '*')
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
emits: ['colse', 'update:value']
|
|
131
163
|
}
|
|
132
164
|
</script>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer';
|
|
19
19
|
import { BrowserMultiFormatReader } from '@zxing/library'
|
|
20
20
|
|
|
21
|
-
export default {name: '
|
|
21
|
+
export default {name: 'ScanCodeInputBrowser',
|
|
22
22
|
components: {},
|
|
23
23
|
props: {
|
|
24
24
|
colseVideo: {
|
|
@@ -69,33 +69,6 @@ methods: {
|
|
|
69
69
|
console.error(err)
|
|
70
70
|
})
|
|
71
71
|
},
|
|
72
|
-
async openScanTwo() {
|
|
73
|
-
const that = this
|
|
74
|
-
// codeReader.reset() // 重置
|
|
75
|
-
// that.textContent = null // 重置
|
|
76
|
-
that.codeReader = await new BrowserMultiFormatReader()
|
|
77
|
-
that.codeReader.listVideoInputDevices().then((videoInputDevices) => {
|
|
78
|
-
that.tipShow = true
|
|
79
|
-
that.tipMsg = this.$t('messageVideo.callingRearCamera')
|
|
80
|
-
console.log('videoInputDevices', videoInputDevices)
|
|
81
|
-
// 默认获取第一个摄像头设备id
|
|
82
|
-
let firstDeviceId = videoInputDevices[0].deviceId
|
|
83
|
-
// 获取第一个摄像头设备的名称
|
|
84
|
-
const videoInputDeviceslablestr = JSON.stringify(videoInputDevices[0].label)
|
|
85
|
-
if (videoInputDevices.length > 1) {
|
|
86
|
-
// 判断是否后置摄像头
|
|
87
|
-
if (videoInputDeviceslablestr.indexOf('back') > -1) {
|
|
88
|
-
firstDeviceId = videoInputDevices[0].deviceId
|
|
89
|
-
} else {
|
|
90
|
-
firstDeviceId = videoInputDevices[1].deviceId
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
that.decodeFromInputVideoFunc(firstDeviceId)
|
|
94
|
-
}).catch((err) => {
|
|
95
|
-
that.tipShow = false
|
|
96
|
-
console.error(err)
|
|
97
|
-
})
|
|
98
|
-
},
|
|
99
72
|
decodeFromInputVideoFunc(firstDeviceId) {
|
|
100
73
|
const that = this
|
|
101
74
|
that.codeReader.reset() // 重置
|
|
@@ -1375,6 +1375,18 @@ const apis = {
|
|
|
1375
1375
|
gridParams.subTableData = gridData
|
|
1376
1376
|
this.subTableData = gridData
|
|
1377
1377
|
}
|
|
1378
|
+
},
|
|
1379
|
+
// 获得默认值字段集合
|
|
1380
|
+
getDefaultValueColumns(listCode) {
|
|
1381
|
+
const defaultValueColumnsMap = {}
|
|
1382
|
+
const gridParams = store.get(listCode)
|
|
1383
|
+
const defaultValueColumns = gridParams.defaultValueColumns
|
|
1384
|
+
if (defaultValueColumns && defaultValueColumns.length > 0) {
|
|
1385
|
+
defaultValueColumns.forEach(column => {
|
|
1386
|
+
defaultValueColumnsMap[column.prop] = column.defaultValue
|
|
1387
|
+
})
|
|
1388
|
+
}
|
|
1389
|
+
return defaultValueColumnsMap
|
|
1378
1390
|
}
|
|
1379
1391
|
}
|
|
1380
1392
|
export default apis
|