agilebuilder-ui 1.1.16-tmp1 → 1.1.16-tmp6
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/{401-00c49690.js → 401-1093bbcf.js} +1 -1
- package/lib/{404-c4147027.js → 404-09cf9017.js} +1 -1
- package/lib/{iframe-page-e043d90e.js → iframe-page-15b8354e.js} +1 -1
- package/lib/{index-cd2cc1c6.js → index-2b8eabca.js} +19980 -20380
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +91 -91
- package/lib/{tab-content-iframe-index-5f22a3b1.js → tab-content-iframe-index-a43cac7b.js} +1 -1
- package/lib/{tab-content-index-7b98f020.js → tab-content-index-133a2913.js} +1 -1
- package/lib/{tache-subprocess-history-a0cb4649.js → tache-subprocess-history-c7779e85.js} +1 -1
- package/package.json +1 -1
- package/packages/index.js +0 -1
- package/packages/super-grid/src/apis.js +1 -53
- package/packages/super-grid/src/dynamic-input.vue +9 -3
- package/packages/super-grid/src/normal-column-content.vue +3 -145
- package/packages/super-grid/src/super-grid.vue +1 -10
- package/src/i18n/langs/cn.js +0 -6
- package/src/i18n/langs/en.js +0 -6
- package/src/store/getters.js +0 -4
- package/src/store/index.js +0 -2
- package/src/styles/display-layout.scss +0 -10
- package/src/styles/theme/tiffany-blue-mobile/card.scss +2 -1
- package/src/utils/common-util.js +23 -28
- package/src/store/modules/table.js +0 -76
- package/src/utils/insert_css.js +0 -33
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
|
|
2
|
-
import { _ as s } from "./index-
|
|
2
|
+
import { _ as s } from "./index-2b8eabca.js";
|
|
3
3
|
const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
|
|
4
4
|
this.src = this.$route.query.src;
|
|
5
5
|
} }, mounted() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as v, c as $, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-
|
|
1
|
+
import { _ as v, c as $, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-2b8eabca.js";
|
|
2
2
|
import { resolveComponent as m, openBlock as l, createBlock as b, withCtx as g, createVNode as w, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as u, toDisplayString as y, createCommentVNode as f, normalizeClass as S } from "vue";
|
|
3
3
|
const A = { class: "no-redirect" }, k = v({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
|
|
4
4
|
return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
|
|
2
|
-
import { _ as I } from "./index-
|
|
2
|
+
import { _ as I } from "./index-2b8eabca.js";
|
|
3
3
|
const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
|
|
4
4
|
const o = this.$route.query.workflowId;
|
|
5
5
|
o && (this.workflowId = parseInt(o));
|
package/package.json
CHANGED
package/packages/index.js
CHANGED
|
@@ -22,7 +22,6 @@ import eventBus from './eventBus'
|
|
|
22
22
|
import { isPromise } from '../../../src/utils/common-util'
|
|
23
23
|
import { updateWithPageValue } from '../../../src/utils/jump-page-utils'
|
|
24
24
|
import { getGuId } from '../../../src/utils/guid.js';
|
|
25
|
-
import { ElMessageBox } from 'element-plus';
|
|
26
25
|
|
|
27
26
|
const apis = {
|
|
28
27
|
// 列表工具栏控件刷新列表数据。添加该方法解决工具栏值清空后,列表内容没有还原问题
|
|
@@ -136,6 +135,7 @@ const apis = {
|
|
|
136
135
|
// 新建行
|
|
137
136
|
createRow(listCode, row, options) {
|
|
138
137
|
return new Promise((resolve, reject) => {
|
|
138
|
+
debugger;
|
|
139
139
|
if (!listCode) {
|
|
140
140
|
listCode = store.get('_list_code')
|
|
141
141
|
}
|
|
@@ -420,58 +420,6 @@ const apis = {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
|
-
isLastEditRowSaveMessage(listCode) {
|
|
424
|
-
if (!listCode) {
|
|
425
|
-
listCode = store.get('_list_code')
|
|
426
|
-
}
|
|
427
|
-
const gridParams = store.get(listCode)
|
|
428
|
-
if (!isLastEditRowSave(listCode)) {
|
|
429
|
-
// 最后编辑的一行没有保存,则提示
|
|
430
|
-
window.$vueApp.config.globalProperties.$message({
|
|
431
|
-
showClose: true,
|
|
432
|
-
message: getI18n().t('superGrid.pleaseSaveLine', {
|
|
433
|
-
row: gridParams.$rowIndex + 1
|
|
434
|
-
}),
|
|
435
|
-
type: 'warning'
|
|
436
|
-
})
|
|
437
|
-
}
|
|
438
|
-
},
|
|
439
|
-
// 切换行编辑时候提示
|
|
440
|
-
confirmBeforeSwitchingRow(listCode, callback) {
|
|
441
|
-
if (!listCode) {
|
|
442
|
-
listCode = store.get('_list_code')
|
|
443
|
-
}
|
|
444
|
-
const { t } = getI18n()
|
|
445
|
-
const gridParams = store.get(listCode)
|
|
446
|
-
const rowIndex = gridParams.$rowIndex
|
|
447
|
-
if (!isLastEditRowSave(listCode)) {
|
|
448
|
-
ElMessageBox.confirm(
|
|
449
|
-
t('superGrid.rowEditMessageBox.content'), // 当前行有未保存的修改,你是否要切换编辑行?
|
|
450
|
-
t('superGrid.rowEditMessageBox.title'), // 操作确认
|
|
451
|
-
{
|
|
452
|
-
distinguishCancelAndClose: true,
|
|
453
|
-
confirmButtonText: t('superGrid.rowEditMessageBox.confirmButton'), // 提交修改
|
|
454
|
-
cancelButtonText: t('superGrid.rowEditMessageBox.cancelButton'), // 放弃修改
|
|
455
|
-
showClose: true,
|
|
456
|
-
beforeClose: (action, instance, done) => {
|
|
457
|
-
if (action === 'confirm') {
|
|
458
|
-
this.saveRow(rowIndex, listCode).then((res) => {
|
|
459
|
-
// this.editRow(rowIndex, listCode, true)
|
|
460
|
-
callback?.('confirm');
|
|
461
|
-
done();
|
|
462
|
-
})
|
|
463
|
-
} else if (action === 'cancel') {
|
|
464
|
-
this.restoreCurrentRow(rowIndex, listCode)
|
|
465
|
-
callback?.('cancel');
|
|
466
|
-
done();
|
|
467
|
-
} else if (action === 'close') {
|
|
468
|
-
done();
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
}
|
|
472
|
-
)
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
423
|
// 编辑行
|
|
476
424
|
editRow(rowIndex, listCode, isSaveCallback) {
|
|
477
425
|
if (!listCode) {
|
|
@@ -517,7 +517,7 @@ import apis from './apis'
|
|
|
517
517
|
import ViewImageDialog from './view-image-dialog'
|
|
518
518
|
import { $emit } from '../../utils/gogocodeTransfer'
|
|
519
519
|
import eventBus from './eventBus'
|
|
520
|
-
import { isMobileBrowser } from '../../../src/utils/common-util'
|
|
520
|
+
import { isMobileBrowser, getAuthSource } from '../../../src/utils/common-util'
|
|
521
521
|
import { analysisScanValue, setScanAnalysisValue } from './scan-util.ts'
|
|
522
522
|
import customFormatter from './custom-formatter'
|
|
523
523
|
export default {
|
|
@@ -648,8 +648,10 @@ export default {
|
|
|
648
648
|
userAgent = 'browser'
|
|
649
649
|
}
|
|
650
650
|
console.log('superGrid----window.location.protocol---', window.location.protocol)
|
|
651
|
+
const isDingTalk = getAuthSource() === 'dingtalk' ? true : false
|
|
651
652
|
const isApk = isMobile && userAgent && userAgent === 'app' ? true : false
|
|
652
|
-
const isShowScanIcon =
|
|
653
|
+
const isShowScanIcon =
|
|
654
|
+
isApk || isDingTalk || (isMobile && scanEnable && window.location.protocol === 'https:' ? true : false)
|
|
653
655
|
|
|
654
656
|
let baseURL = gridParams.options.backendUrl
|
|
655
657
|
if (!baseURL) {
|
|
@@ -725,6 +727,7 @@ export default {
|
|
|
725
727
|
scanEnable,
|
|
726
728
|
userAgent,
|
|
727
729
|
isApk,
|
|
730
|
+
isDingTalk,
|
|
728
731
|
isShowBrowserScan: false,
|
|
729
732
|
isShowScanIcon,
|
|
730
733
|
baseURL,
|
|
@@ -1912,7 +1915,7 @@ export default {
|
|
|
1912
1915
|
},
|
|
1913
1916
|
scanClick() {
|
|
1914
1917
|
console.log('scanClick----userAgent=', this.userAgent)
|
|
1915
|
-
if (this.isApk) {
|
|
1918
|
+
if (this.isApk || this.isDingTalk) {
|
|
1916
1919
|
// 表示是APK中
|
|
1917
1920
|
const message = {
|
|
1918
1921
|
type: 'scan',
|
|
@@ -1920,6 +1923,9 @@ export default {
|
|
|
1920
1923
|
systemCode: this.pageContext.systemCode,
|
|
1921
1924
|
listCode: this.listCode
|
|
1922
1925
|
}
|
|
1926
|
+
if (this.isDingTalk) {
|
|
1927
|
+
message.type = 'dingTalkScan'
|
|
1928
|
+
}
|
|
1923
1929
|
window.parent.postMessage(JSON.stringify(message), '*')
|
|
1924
1930
|
} else {
|
|
1925
1931
|
// 表示是移动端浏览器中
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
<div style="width: 100%">
|
|
3
3
|
<!--添加:key="column.prop+'_'+rowIndex"是为了解决多行是行编辑状态时新建的记录的文本框内有值的问题-->
|
|
4
4
|
<dynamic-input
|
|
5
|
-
v-if="
|
|
6
|
-
ref="dynamicRef"
|
|
5
|
+
v-if="(lineEdit.editable && isEditable && row.$editing && !isContentViewText) || isShowForm"
|
|
7
6
|
v-model:value="row[column.prop]"
|
|
8
7
|
:class="requiredClass"
|
|
9
8
|
:column="column"
|
|
@@ -21,7 +20,6 @@
|
|
|
21
20
|
:row="row"
|
|
22
21
|
:row-index="rowIndex"
|
|
23
22
|
:type="column.componentType"
|
|
24
|
-
@keyup.enter="clearAllEditing"
|
|
25
23
|
@findIndex="findIndex(rowIndex)"
|
|
26
24
|
@focus="onFocus(rowIndex)"
|
|
27
25
|
@prohibit-to-edit="prohibitToEdit"
|
|
@@ -34,11 +32,7 @@
|
|
|
34
32
|
@change-required="changeRequired"
|
|
35
33
|
@open-page="openPageEvent"
|
|
36
34
|
/>
|
|
37
|
-
<
|
|
38
|
-
<div v-if="lineEdit.editable && isEditable && !disabled && !isContentViewText" class="column-text-edit-main" @click="onEditing">
|
|
39
|
-
<el-icon :size="14" color="#409eff"><Edit /></el-icon>
|
|
40
|
-
<span v-if="!row[column.prop]" table-column-placeholder>请点击输入</span>
|
|
41
|
-
</div>
|
|
35
|
+
<span v-else>
|
|
42
36
|
<span v-if="column.operations" class="grid-operation-buttons">
|
|
43
37
|
<span
|
|
44
38
|
v-for="(operation, operationIndex) in column.operations"
|
|
@@ -343,7 +337,7 @@
|
|
|
343
337
|
$escapeHtml(getLabel(row, rowIndex))
|
|
344
338
|
}}</span>
|
|
345
339
|
</span>
|
|
346
|
-
</
|
|
340
|
+
</span>
|
|
347
341
|
<view-image-dialog v-if="showSingleImgFlag" :file-list="fileList" @close="showSingleImgFlag = false" />
|
|
348
342
|
<rich-editor-viewer
|
|
349
343
|
v-if="showRichEditorViewer"
|
|
@@ -381,8 +375,6 @@ import FsPreview from '../../fs-preview'
|
|
|
381
375
|
import RichEditorViewer from '../../rich-editor/viewer.vue'
|
|
382
376
|
import GridIcon from './components/grid-icon.vue'
|
|
383
377
|
import { formatScanRuleSets } from './scan-util.ts'
|
|
384
|
-
import storeVuex from '../../../src/store';
|
|
385
|
-
|
|
386
378
|
export default {
|
|
387
379
|
components: {
|
|
388
380
|
DynamicInput,
|
|
@@ -526,37 +518,6 @@ export default {
|
|
|
526
518
|
}
|
|
527
519
|
},
|
|
528
520
|
computed: {
|
|
529
|
-
$rowGuId() {
|
|
530
|
-
return `${this.row.$rowDataGuId ?? this.row.id ?? this.rowIndex}`
|
|
531
|
-
},
|
|
532
|
-
// 字段唯一标识
|
|
533
|
-
$rowColumnDataGuId() {
|
|
534
|
-
return `${this.$rowGuId}_${this.column.prop}`
|
|
535
|
-
},
|
|
536
|
-
// 手动触发编辑状态
|
|
537
|
-
isEditing() {
|
|
538
|
-
try {
|
|
539
|
-
// 没权限
|
|
540
|
-
if (!this.hasEditPermission) return
|
|
541
|
-
// 检测到单选修改模式
|
|
542
|
-
if (storeVuex.getters.isEditing(this.$rowColumnDataGuId)) return true
|
|
543
|
-
// 判定不是子表情况
|
|
544
|
-
if (!this.isFormSubTable) {
|
|
545
|
-
if (this.row.$editing) {
|
|
546
|
-
// 检测是否是单元格同一行
|
|
547
|
-
if (storeVuex.getters.isRowEditing(this.$rowGuId)) return false
|
|
548
|
-
return true
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
return this.row.$editing;
|
|
552
|
-
} catch (error) {
|
|
553
|
-
return false
|
|
554
|
-
}
|
|
555
|
-
},
|
|
556
|
-
// 基础编辑权限
|
|
557
|
-
hasEditPermission() {
|
|
558
|
-
return this.lineEdit.editable && this.isEditable && !this.isContentViewText
|
|
559
|
-
},
|
|
560
521
|
// lineEdit() {
|
|
561
522
|
// let isLineEdit = false
|
|
562
523
|
// if (this.listCode) {
|
|
@@ -573,15 +534,6 @@ export default {
|
|
|
573
534
|
...mapGetters(['preventReclick'])
|
|
574
535
|
},
|
|
575
536
|
watch: {
|
|
576
|
-
// 取消行时候
|
|
577
|
-
'row.$editing': {
|
|
578
|
-
deep: true,
|
|
579
|
-
handler(newValue) {
|
|
580
|
-
if([false].includes(newValue)) {
|
|
581
|
-
this.clearAllEditing()
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
537
|
isSql: {
|
|
586
538
|
deep: true,
|
|
587
539
|
|
|
@@ -758,79 +710,6 @@ export default {
|
|
|
758
710
|
methods: {
|
|
759
711
|
...customFormatter,
|
|
760
712
|
...apis,
|
|
761
|
-
// 清理所有手动编辑
|
|
762
|
-
clearAllEditing() {
|
|
763
|
-
if (this.hasEditPermission) {
|
|
764
|
-
storeVuex?.dispatch?.('clearAllEditing')
|
|
765
|
-
}
|
|
766
|
-
},
|
|
767
|
-
// 手动编辑触发
|
|
768
|
-
onEditing(event) {
|
|
769
|
-
if (this.hasEditPermission && !this.isEditing) {
|
|
770
|
-
event.stopPropagation()
|
|
771
|
-
|
|
772
|
-
const onEditing = () => {
|
|
773
|
-
this.clearAllEditing()
|
|
774
|
-
storeVuex?.dispatch?.('setRowEditing', {
|
|
775
|
-
$rowDataGuId: this.$rowColumnDataGuId,
|
|
776
|
-
isEditing: true
|
|
777
|
-
})
|
|
778
|
-
setTimeout(this.focusBottomInput, 400)
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
if(!this.isFormSubTable) {
|
|
782
|
-
// 非子表
|
|
783
|
-
if (storeVuex.getters.isConfigEditing) {
|
|
784
|
-
if (storeVuex.getters.isRowEditing(this.$rowGuId)) {
|
|
785
|
-
onEditing()
|
|
786
|
-
} else {
|
|
787
|
-
this.isLastEditRowSaveMessage(this.listCode)
|
|
788
|
-
// this.confirmBeforeSwitchingRow(this.listCode, () => { })
|
|
789
|
-
}
|
|
790
|
-
} else {
|
|
791
|
-
// 如果不是子表 则 开启 编辑模式
|
|
792
|
-
this.editRow(this.rowIndex, this.listCode, true)
|
|
793
|
-
onEditing()
|
|
794
|
-
}
|
|
795
|
-
} else {
|
|
796
|
-
// 取消所有列编辑状态
|
|
797
|
-
this.restoreGridEdit(this.listCode)
|
|
798
|
-
// 子表
|
|
799
|
-
onEditing()
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
},
|
|
803
|
-
// 默认聚焦渲染组件
|
|
804
|
-
focusBottomInput() {
|
|
805
|
-
this.$nextTick(() => {
|
|
806
|
-
try {
|
|
807
|
-
const getOffsetParent = (selectorAll) => {
|
|
808
|
-
return selectorAll ? Array.from(this.$refs.dynamicRef.$el.querySelectorAll(selectorAll)).filter(control => !!control.offsetParent) : [];
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
let visibleFormControls = getOffsetParent('.el-select, .el-date-picker, .el-upload');
|
|
812
|
-
if (visibleFormControls.length) {
|
|
813
|
-
visibleFormControls[0].click()
|
|
814
|
-
} else {
|
|
815
|
-
visibleFormControls = getOffsetParent('input, textarea');
|
|
816
|
-
if (visibleFormControls.length > 0) {
|
|
817
|
-
const bottomControl = visibleFormControls.reduce((prev, current) => {
|
|
818
|
-
return current.getBoundingClientRect().bottom > prev.getBoundingClientRect().bottom
|
|
819
|
-
? current
|
|
820
|
-
: prev;
|
|
821
|
-
});
|
|
822
|
-
if (['INPUT', 'TEXTAREA'].includes(bottomControl.tagName)) {
|
|
823
|
-
bottomControl.focus();
|
|
824
|
-
bottomControl.select();
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
}
|
|
829
|
-
} catch (error) {
|
|
830
|
-
console.error(error)
|
|
831
|
-
}
|
|
832
|
-
})
|
|
833
|
-
},
|
|
834
713
|
getFileObj(fileSet) {
|
|
835
714
|
if (fileSet) {
|
|
836
715
|
return JSON.parse(fileSet)
|
|
@@ -1177,25 +1056,4 @@ export default {
|
|
|
1177
1056
|
content: '*';
|
|
1178
1057
|
color: #f56c6c;
|
|
1179
1058
|
}
|
|
1180
|
-
.column-text-main {
|
|
1181
|
-
display: flex;
|
|
1182
|
-
align-items: center;
|
|
1183
|
-
gap: 10px;
|
|
1184
|
-
|
|
1185
|
-
.column-text-edit-main {
|
|
1186
|
-
display: flex;
|
|
1187
|
-
align-items: center;
|
|
1188
|
-
gap: 10px;
|
|
1189
|
-
|
|
1190
|
-
&::after {
|
|
1191
|
-
content: ' ';
|
|
1192
|
-
position: absolute;
|
|
1193
|
-
left: 0;
|
|
1194
|
-
top: 0;
|
|
1195
|
-
right: 0;
|
|
1196
|
-
bottom: 0;
|
|
1197
|
-
cursor: pointer;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
1059
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div data-v="1.0.0" :style="subTableStyle"
|
|
2
|
+
<div data-v="1.0.0" :style="subTableStyle">
|
|
3
3
|
<search-form
|
|
4
4
|
v-if="!isFormSubTable && hasLoadedColumns && query && query.showType === 'embedded'"
|
|
5
5
|
v-show="!isMobile || (isMobile && isShowMobileSearch)"
|
|
@@ -906,10 +906,6 @@ export default {
|
|
|
906
906
|
...publicMethods,
|
|
907
907
|
...superGridService,
|
|
908
908
|
...apis,
|
|
909
|
-
onClickMain() {
|
|
910
|
-
// 清理编辑选中
|
|
911
|
-
storeVuex?.dispatch?.('clearAllEditing')
|
|
912
|
-
},
|
|
913
909
|
isDeleteChange(boole) {
|
|
914
910
|
this.isDelete = boole
|
|
915
911
|
},
|
|
@@ -1324,11 +1320,6 @@ export default {
|
|
|
1324
1320
|
},
|
|
1325
1321
|
changeRowStyle(param) {
|
|
1326
1322
|
// param的格式:{row, rowIndex}
|
|
1327
|
-
|
|
1328
|
-
// 新增表格编辑背景颜色
|
|
1329
|
-
if (param.row.$editing) {
|
|
1330
|
-
return { background: `var(--el-table-row-hover-bg-color)` }
|
|
1331
|
-
}
|
|
1332
1323
|
const gridParams = store.get(this.code)
|
|
1333
1324
|
if (this.lineEdit && this.lineEdit.editable) {
|
|
1334
1325
|
if (param.rowIndex === gridParams.$rowIndex) {
|
package/src/i18n/langs/cn.js
CHANGED
|
@@ -88,12 +88,6 @@ const cn = {
|
|
|
88
88
|
},
|
|
89
89
|
// 列表组件
|
|
90
90
|
superGrid: {
|
|
91
|
-
rowEditMessageBox: {
|
|
92
|
-
title: "操作确认",
|
|
93
|
-
content: "当前行有未保存的修改,是否进行保存修改切换?",
|
|
94
|
-
confirmButton: "保存修改",
|
|
95
|
-
cancelButton: "放弃修改"
|
|
96
|
-
},
|
|
97
91
|
columnConfig: '字段配置',
|
|
98
92
|
pleaseSaveOrCancelEditingLine: '请先保存或撤销编辑第 {row} 行数据',
|
|
99
93
|
pleaseSaveLine: '请先保存第 {row} 行数据',
|
package/src/i18n/langs/en.js
CHANGED
|
@@ -89,12 +89,6 @@ const en = {
|
|
|
89
89
|
mustFill: '{label} must fill'
|
|
90
90
|
},
|
|
91
91
|
superGrid: {
|
|
92
|
-
rowEditMessageBox: {
|
|
93
|
-
title: "Operation Confirmation",
|
|
94
|
-
content: "There are unsaved modifications in the current row. Do you want to save the modifications and switch?",
|
|
95
|
-
confirmButton: "Save edit",
|
|
96
|
-
cancelButton: "Discard edit"
|
|
97
|
-
},
|
|
98
92
|
columnConfig: 'Column Config',
|
|
99
93
|
pleaseSaveOrCancelEditingLine:
|
|
100
94
|
'Please Save Or Cancel Editing Line {row} Data First',
|
package/src/store/getters.js
CHANGED
|
@@ -4,10 +4,6 @@ const getters = {
|
|
|
4
4
|
windowWidth: (state) => state.app.windowWidth,
|
|
5
5
|
windowHeight: (state) => state.app.windowHeight,
|
|
6
6
|
isMobileResize: (state) => state.app.isMobileResize,
|
|
7
|
-
tableEditingDatas: (state) => state.table.tableEditingDatas,
|
|
8
|
-
isConfigEditing: (state) => state.table.tableEditingDatas.length > 0,
|
|
9
|
-
isEditing: (state) => ($rowDataGuId) => state.table.tableEditingDatas.includes($rowDataGuId),
|
|
10
|
-
isRowEditing: (state) => ($rowGuId) => state.table.tableEditingDatas.some(v => v.includes($rowGuId)),
|
|
11
7
|
token: (state) => state.user.token,
|
|
12
8
|
name: (state) => state.user.name,
|
|
13
9
|
// routers: state => state.permission.routers,
|
package/src/store/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as Vue from 'vue'
|
|
2
2
|
import * as Vuex from 'vuex'
|
|
3
3
|
import app from './modules/app'
|
|
4
|
-
import table from './modules/table'
|
|
5
4
|
import user from './modules/user'
|
|
6
5
|
import permission from './modules/permission'
|
|
7
6
|
import tabContent from './modules/tab-content'
|
|
@@ -10,7 +9,6 @@ import getters from './getters'
|
|
|
10
9
|
const store = Vuex.createStore({
|
|
11
10
|
modules: {
|
|
12
11
|
app,
|
|
13
|
-
table,
|
|
14
12
|
user,
|
|
15
13
|
permission,
|
|
16
14
|
tabContent,
|
|
@@ -38,10 +38,6 @@
|
|
|
38
38
|
overflow-wrap: break-word;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
[table-column-placeholder] {
|
|
42
|
-
color: var(--el-text-color-placeholder, #a8abb2);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
41
|
.yx-flex-wrap {
|
|
46
42
|
display: flex;
|
|
47
43
|
justify-content: flex-start;
|
|
@@ -288,9 +284,3 @@
|
|
|
288
284
|
}
|
|
289
285
|
}
|
|
290
286
|
}
|
|
291
|
-
|
|
292
|
-
.el-descriptions {
|
|
293
|
-
.el-descriptions__content{
|
|
294
|
-
position: relative;
|
|
295
|
-
}
|
|
296
|
-
}
|
package/src/utils/common-util.js
CHANGED
|
@@ -676,16 +676,8 @@ export function getCurrentSystemCode() {
|
|
|
676
676
|
|
|
677
677
|
export function isLogoutTimeout(event) {
|
|
678
678
|
let isTimeout = false
|
|
679
|
-
if (
|
|
680
|
-
event &&
|
|
681
|
-
typeof event.data === 'string' &&
|
|
682
|
-
event.data.indexOf('loginTimeout') >= 0
|
|
683
|
-
) {
|
|
684
|
-
if (
|
|
685
|
-
event &&
|
|
686
|
-
typeof event.data === 'string' &&
|
|
687
|
-
event.data.indexOf('loginTimeout') >= 0
|
|
688
|
-
) {
|
|
679
|
+
if (event && typeof event.data === 'string' && event.data.indexOf('loginTimeout') >= 0) {
|
|
680
|
+
if (event && typeof event.data === 'string' && event.data.indexOf('loginTimeout') >= 0) {
|
|
689
681
|
// removeToken()
|
|
690
682
|
// this.$router.replace({
|
|
691
683
|
// path: '/login'
|
|
@@ -697,22 +689,25 @@ export function isLogoutTimeout(event) {
|
|
|
697
689
|
}
|
|
698
690
|
|
|
699
691
|
export function cacheSystemUrl() {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
if (urlMap) {
|
|
710
|
-
window.$authApi.setSystemCacheUrl(urlMap)
|
|
711
|
-
}
|
|
712
|
-
resolve()
|
|
713
|
-
})
|
|
714
|
-
} else {
|
|
692
|
+
return new Promise((resolve, reject) => {
|
|
693
|
+
const systemUrls = window.$authApi.getSystemCacheUrl()
|
|
694
|
+
if (!systemUrls) {
|
|
695
|
+
window.$vueApp.config.globalProperties.$http
|
|
696
|
+
.get(window.$vueApp.config.globalProperties.baseAPI + '/component/business-systems/without-plate')
|
|
697
|
+
.then((urlMap) => {
|
|
698
|
+
if (urlMap) {
|
|
699
|
+
window.$authApi.setSystemCacheUrl(urlMap)
|
|
700
|
+
}
|
|
715
701
|
resolve()
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
|
|
702
|
+
})
|
|
703
|
+
} else {
|
|
704
|
+
resolve()
|
|
705
|
+
}
|
|
706
|
+
})
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* 登录源是哪种方式,例如:portal、dingtalk、weixin、mobile等
|
|
710
|
+
*/
|
|
711
|
+
export function getAuthSource() {
|
|
712
|
+
return window.localStorage.getItem('auth_source')
|
|
713
|
+
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
const app = {
|
|
2
|
-
state: {
|
|
3
|
-
tableEditingDatas: [], // 开启编辑 表格$rowDataGuId
|
|
4
|
-
},
|
|
5
|
-
mutations: {
|
|
6
|
-
/**
|
|
7
|
-
* 切换行数据的编辑状态
|
|
8
|
-
* @param {Object} state - 当前状态对象
|
|
9
|
-
* @param {string} $rowDataGuId - 行数据的唯一标识
|
|
10
|
-
*/
|
|
11
|
-
toggleRowEditing(state, $rowDataGuId) {
|
|
12
|
-
if (state.tableEditingDatas.includes($rowDataGuId)) {
|
|
13
|
-
state.tableEditingDatas = state.tableEditingDatas.filter(id => id !== $rowDataGuId)
|
|
14
|
-
} else {
|
|
15
|
-
state.tableEditingDatas = [...state.tableEditingDatas, $rowDataGuId]
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* 直接设置行数据的编辑状态
|
|
20
|
-
* @param {Object} state - 当前状态对象
|
|
21
|
-
* @param {Object} payload - 包含行数据唯一标识和编辑状态的对象
|
|
22
|
-
* @param {string} payload.$rowDataGuId - 行数据的唯一标识
|
|
23
|
-
* @param {boolean} payload.isEditing - 编辑状态
|
|
24
|
-
*/
|
|
25
|
-
setRowEditing(state, { $rowDataGuId, isEditing = false }) {
|
|
26
|
-
if ($rowDataGuId) {
|
|
27
|
-
if (isEditing) {
|
|
28
|
-
if (!state.tableEditingDatas.includes($rowDataGuId)) {
|
|
29
|
-
state.tableEditingDatas = [...state.tableEditingDatas, $rowDataGuId];
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
state.tableEditingDatas = state.tableEditingDatas.filter(id => id!== $rowDataGuId);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* 清理所有编辑状态
|
|
38
|
-
* @param {Object} state - 当前状态对象
|
|
39
|
-
*/
|
|
40
|
-
clearAllEditing(state) {
|
|
41
|
-
state.tableEditingDatas = [];
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
actions: {
|
|
45
|
-
/**
|
|
46
|
-
* 触发切换行数据编辑状态的操作
|
|
47
|
-
* @param {Object} context - 上下文对象
|
|
48
|
-
* @param {string} $rowDataGuId - 行数据的唯一标识
|
|
49
|
-
*/
|
|
50
|
-
toggleEditingData({ commit }, $rowDataGuId) {
|
|
51
|
-
commit('toggleRowEditing', $rowDataGuId)
|
|
52
|
-
},
|
|
53
|
-
/**
|
|
54
|
-
* 触发直接设置行数据编辑状态的操作
|
|
55
|
-
* @param {Object} context - 上下文对象
|
|
56
|
-
* @param {Object} payload - 包含行数据唯一标识和编辑状态的对象
|
|
57
|
-
* @param {string} payload.$rowDataGuId - 行数据的唯一标识
|
|
58
|
-
* @param {boolean} payload.isEditing - 编辑状态
|
|
59
|
-
*/
|
|
60
|
-
setRowEditing({ commit }, payload) {
|
|
61
|
-
commit('setRowEditing', payload);
|
|
62
|
-
},
|
|
63
|
-
closeRowEditing({ commit }, payload) {
|
|
64
|
-
commit('setRowEditing', payload);
|
|
65
|
-
},
|
|
66
|
-
/**
|
|
67
|
-
* 触发清理所有编辑状态的操作
|
|
68
|
-
* @param {Object} context - 上下文对象
|
|
69
|
-
*/
|
|
70
|
-
clearAllEditing({ commit }) {
|
|
71
|
-
commit('clearAllEditing');
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export default app
|
package/src/utils/insert_css.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 动态引入公共样式库
|
|
3
|
-
*/
|
|
4
|
-
if (!window.insertedCssFiles) {
|
|
5
|
-
// 存储 已经动态加入 样式地址
|
|
6
|
-
window.insertedCssFiles = new Set();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
if (!window.defaultCssUrl) {
|
|
10
|
-
window.defaultCssUrl = 'myapp-default-css/default.css';
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (!window.insertCssFile) {
|
|
14
|
-
window.insertCssFile = (cssUrl) => {
|
|
15
|
-
if (!cssUrl || window.insertedCssFiles.has(cssUrl)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const link = document.createElement('link');
|
|
19
|
-
link.rel = 'stylesheet';
|
|
20
|
-
link.href = cssUrl;
|
|
21
|
-
link.onload = function () {
|
|
22
|
-
window.insertedCssFiles.add(cssUrl);
|
|
23
|
-
};
|
|
24
|
-
link.onerror = function () {
|
|
25
|
-
console.error(`无法加载公共 CSS 文件: ${cssUrl}`);
|
|
26
|
-
};
|
|
27
|
-
document.head.appendChild(link);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (window.insertCssFile) {
|
|
32
|
-
window.insertCssFile(window.defaultCssUrl);
|
|
33
|
-
}
|