agilebuilder-ui 1.0.87-temp2 → 1.0.87-temp4
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.
|
@@ -155,15 +155,9 @@
|
|
|
155
155
|
@focus="cellEvent('focus', $event)"
|
|
156
156
|
@input="cellEvent('input', $event, true)"
|
|
157
157
|
>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
>
|
|
162
|
-
<SuperIcon
|
|
163
|
-
iconValue="fa-barcode"
|
|
164
|
-
@click="scanClick()"
|
|
165
|
-
></SuperIcon>
|
|
166
|
-
</template>
|
|
158
|
+
<template v-if="isShowScanIcon" #append>
|
|
159
|
+
<SuperIcon iconValue="fa-barcode" @click="scanClick()"></SuperIcon>
|
|
160
|
+
</template>
|
|
167
161
|
</el-input>
|
|
168
162
|
|
|
169
163
|
<el-input
|
|
@@ -436,7 +430,7 @@ import {
|
|
|
436
430
|
isDynamicDataSourceSource,
|
|
437
431
|
isEditOptionFunction,
|
|
438
432
|
otherFilesToStandard,
|
|
439
|
-
getControlConfig
|
|
433
|
+
getControlConfig
|
|
440
434
|
} from './utils'
|
|
441
435
|
import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select.vue'
|
|
442
436
|
import { getEntityFieldValue, setEntityFieldValue } from '../../../src/utils/util'
|
|
@@ -554,10 +548,10 @@ export default {
|
|
|
554
548
|
const additionalParamMap = getAdditionalParamMap(gridParams)
|
|
555
549
|
const pageContext = gridParams.options.pageContext
|
|
556
550
|
const isMobile = isMobileBrowser()
|
|
557
|
-
|
|
558
|
-
const componentId = this.listCode+'_'+this.column.prop
|
|
551
|
+
|
|
552
|
+
const componentId = this.listCode + '_' + this.column.prop
|
|
559
553
|
let scanEnable = false
|
|
560
|
-
if(controlConfig.scanEnable){
|
|
554
|
+
if (controlConfig.scanEnable) {
|
|
561
555
|
scanEnable = true
|
|
562
556
|
}
|
|
563
557
|
let userAgent
|
|
@@ -570,9 +564,9 @@ export default {
|
|
|
570
564
|
userAgent = 'browser'
|
|
571
565
|
}
|
|
572
566
|
console.log('superGrid----window.location.protocol---', window.location.protocol)
|
|
573
|
-
const isShowScanIcon = isMobile && window.location.protocol === 'https:' ? true: false
|
|
574
|
-
const isApk = isMobile && userAgent && userAgent === 'app' ? true: false
|
|
575
|
-
|
|
567
|
+
const isShowScanIcon = isMobile && window.location.protocol === 'https:' ? true : false
|
|
568
|
+
const isApk = isMobile && userAgent && userAgent === 'app' ? true : false
|
|
569
|
+
|
|
576
570
|
let baseURL = gridParams.options.backendUrl
|
|
577
571
|
if (!baseURL) {
|
|
578
572
|
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
@@ -753,7 +747,14 @@ export default {
|
|
|
753
747
|
const that = this
|
|
754
748
|
// 选择文件结束
|
|
755
749
|
eventBus.$on(this.componentId + '-pickFileDone', (data) => {
|
|
756
|
-
console.log(
|
|
750
|
+
console.log(
|
|
751
|
+
'superPage666611---pickFileDone--data.componentId=',
|
|
752
|
+
data.componentId,
|
|
753
|
+
'data.listCode=',
|
|
754
|
+
data.listCode,
|
|
755
|
+
'data=',
|
|
756
|
+
data
|
|
757
|
+
)
|
|
757
758
|
if (that.$refs.fileUploadRef) {
|
|
758
759
|
that.$refs.fileUploadRef.pickFileDone(data)
|
|
759
760
|
}
|
|
@@ -766,12 +767,19 @@ export default {
|
|
|
766
767
|
})
|
|
767
768
|
// 扫描结束
|
|
768
769
|
eventBus.$on(this.componentId + '-scanDone', (data) => {
|
|
769
|
-
console.log(
|
|
770
|
-
|
|
771
|
-
|
|
770
|
+
console.log(
|
|
771
|
+
'superPage666611---scanDone--data.componentId=',
|
|
772
|
+
data.componentId,
|
|
773
|
+
'data.listCode=',
|
|
774
|
+
data.listCode,
|
|
775
|
+
'data=',
|
|
776
|
+
data
|
|
777
|
+
)
|
|
778
|
+
that.innerValue = data.result
|
|
779
|
+
that.blurEvent()
|
|
772
780
|
})
|
|
773
781
|
},
|
|
774
|
-
destroyed(){
|
|
782
|
+
destroyed() {
|
|
775
783
|
eventBus.$off(this.componentId + '-pickFileDone')
|
|
776
784
|
// 上传文件结束
|
|
777
785
|
eventBus.$off(this.componentId + '-uploadFileDone')
|
|
@@ -1080,7 +1088,7 @@ export default {
|
|
|
1080
1088
|
param.parent = this.parentFormData
|
|
1081
1089
|
param.rowIndex = this.rowIndex
|
|
1082
1090
|
param.additionalParamMap = gridParams.additionalParamMap
|
|
1083
|
-
if(gridParams.options.pageContext){
|
|
1091
|
+
if (gridParams.options.pageContext) {
|
|
1084
1092
|
param.pageContext = gridParams.options.pageContext
|
|
1085
1093
|
param.configure = gridParams.options.configureObj
|
|
1086
1094
|
const eventFunc = gridParams.options['eventCallBack'][funName]
|
|
@@ -1125,7 +1133,7 @@ export default {
|
|
|
1125
1133
|
uploadOnSuccess(response) {
|
|
1126
1134
|
console.log('superGrid---uploadOnSuccess----response=', response)
|
|
1127
1135
|
if (response) {
|
|
1128
|
-
if(this.isMobile){
|
|
1136
|
+
if (this.isMobile) {
|
|
1129
1137
|
// 移动端时事件
|
|
1130
1138
|
if (this.column.fileSet && this.column.fileSet !== '') {
|
|
1131
1139
|
const fileSetObj = JSON.parse(this.column.fileSet)
|
|
@@ -1293,7 +1301,7 @@ export default {
|
|
|
1293
1301
|
if (!fileArr) {
|
|
1294
1302
|
fileArr = []
|
|
1295
1303
|
}
|
|
1296
|
-
responseFiles.forEach(responseFile=>{
|
|
1304
|
+
responseFiles.forEach((responseFile) => {
|
|
1297
1305
|
const fileObj = this.responseFileToFileObj(fileSetObj, responseFile)
|
|
1298
1306
|
fileArr.push(fileObj)
|
|
1299
1307
|
})
|
|
@@ -1308,11 +1316,11 @@ export default {
|
|
|
1308
1316
|
if (fileSetObj.showNameData.dbName) {
|
|
1309
1317
|
if (this.row) {
|
|
1310
1318
|
let showName = ''
|
|
1311
|
-
responseFiles.forEach(responseFile=>{
|
|
1319
|
+
responseFiles.forEach((responseFile) => {
|
|
1312
1320
|
showName = showName + responseFile.name + ','
|
|
1313
1321
|
})
|
|
1314
|
-
if(showName.indexOf(',')>=0){
|
|
1315
|
-
showName = showName.substring(0,showName.lastIndexOf(','))
|
|
1322
|
+
if (showName.indexOf(',') >= 0) {
|
|
1323
|
+
showName = showName.substring(0, showName.lastIndexOf(','))
|
|
1316
1324
|
}
|
|
1317
1325
|
this.setCellValue(fileSetObj.showNameData.dbName, showName, 'input')
|
|
1318
1326
|
showNameStr = this.row[fileSetObj.showNameData.dbName]
|
|
@@ -1322,11 +1330,11 @@ export default {
|
|
|
1322
1330
|
if (fileSetObj.showNameData.name) {
|
|
1323
1331
|
if (this.row) {
|
|
1324
1332
|
let showName = ''
|
|
1325
|
-
responseFiles.forEach(responseFile=>{
|
|
1333
|
+
responseFiles.forEach((responseFile) => {
|
|
1326
1334
|
showName = showName + responseFile.name + ','
|
|
1327
1335
|
})
|
|
1328
|
-
if(showName.indexOf(',')>=0){
|
|
1329
|
-
showName = showName.substring(0,showName.lastIndexOf(','))
|
|
1336
|
+
if (showName.indexOf(',') >= 0) {
|
|
1337
|
+
showName = showName.substring(0, showName.lastIndexOf(','))
|
|
1330
1338
|
}
|
|
1331
1339
|
this.setCellValue(fileSetObj.showNameData.name, showName, 'input')
|
|
1332
1340
|
showNameStr = this.row[fileSetObj.showNameData.name]
|
|
@@ -1339,11 +1347,11 @@ export default {
|
|
|
1339
1347
|
if (fileSetObj.serverNameData.dbName) {
|
|
1340
1348
|
if (this.row) {
|
|
1341
1349
|
let serverName = ''
|
|
1342
|
-
responseFiles.forEach(responseFile=>{
|
|
1350
|
+
responseFiles.forEach((responseFile) => {
|
|
1343
1351
|
serverName = serverName + responseFile.serverPath + ','
|
|
1344
1352
|
})
|
|
1345
|
-
if(serverName.indexOf(',')>=0){
|
|
1346
|
-
serverName = serverName.substring(0,serverName.lastIndexOf(','))
|
|
1353
|
+
if (serverName.indexOf(',') >= 0) {
|
|
1354
|
+
serverName = serverName.substring(0, serverName.lastIndexOf(','))
|
|
1347
1355
|
}
|
|
1348
1356
|
this.setCellValue(fileSetObj.serverNameData.dbName, serverName, 'input')
|
|
1349
1357
|
pathNameStr = this.row[fileSetObj.serverNameData.dbName]
|
|
@@ -1353,11 +1361,11 @@ export default {
|
|
|
1353
1361
|
if (fileSetObj.serverNameData.name) {
|
|
1354
1362
|
if (this.row) {
|
|
1355
1363
|
let serverName = ''
|
|
1356
|
-
responseFiles.forEach(responseFile=>{
|
|
1364
|
+
responseFiles.forEach((responseFile) => {
|
|
1357
1365
|
serverName = serverName + responseFile.serverPath + ','
|
|
1358
1366
|
})
|
|
1359
|
-
if(serverName.indexOf(',')>=0){
|
|
1360
|
-
serverName = serverName.substring(0,serverName.lastIndexOf(','))
|
|
1367
|
+
if (serverName.indexOf(',') >= 0) {
|
|
1368
|
+
serverName = serverName.substring(0, serverName.lastIndexOf(','))
|
|
1361
1369
|
}
|
|
1362
1370
|
this.setCellValue(fileSetObj.serverNameData.name, serverName, 'input')
|
|
1363
1371
|
pathNameStr = this.row[fileSetObj.serverNameData.name]
|
|
@@ -1609,6 +1617,8 @@ export default {
|
|
|
1609
1617
|
}
|
|
1610
1618
|
this.cellEvent('change', val)
|
|
1611
1619
|
this.setCellValue(this.column.prop, val, 'change')
|
|
1620
|
+
} else {
|
|
1621
|
+
this.cellEvent('change', arr)
|
|
1612
1622
|
}
|
|
1613
1623
|
},
|
|
1614
1624
|
getDefaultValue(val) {
|
|
@@ -1749,17 +1759,17 @@ export default {
|
|
|
1749
1759
|
}
|
|
1750
1760
|
}
|
|
1751
1761
|
},
|
|
1752
|
-
scanClick(){
|
|
1762
|
+
scanClick() {
|
|
1753
1763
|
console.log('scanClick----userAgent=', this.userAgent)
|
|
1754
|
-
if(this.isApk) {
|
|
1764
|
+
if (this.isApk) {
|
|
1755
1765
|
// 表示是APK中
|
|
1756
1766
|
const message = {
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1767
|
+
type: 'scan',
|
|
1768
|
+
componentId: this.componentId,
|
|
1769
|
+
systemCode: this.pageContext.systemCode,
|
|
1770
|
+
listCode: this.listCode
|
|
1771
|
+
}
|
|
1772
|
+
window.parent.postMessage(JSON.stringify(message), '*')
|
|
1763
1773
|
} else {
|
|
1764
1774
|
// 表示是移动端浏览器中
|
|
1765
1775
|
this.isShowBrowserScan = true
|
|
@@ -1769,7 +1779,7 @@ export default {
|
|
|
1769
1779
|
* 扫描组件时,监听扫描值变化
|
|
1770
1780
|
*/
|
|
1771
1781
|
watchScanValueChange(newValue) {
|
|
1772
|
-
if(this.scanEnable && this.type === 'input'){
|
|
1782
|
+
if (this.scanEnable && this.type === 'input') {
|
|
1773
1783
|
const valueSet = analysisScanValue(newValue, this.column._scanRuleSets)
|
|
1774
1784
|
if (valueSet) {
|
|
1775
1785
|
setScanAnalysisValue(this.row, valueSet.scanSet, valueSet.params)
|