agilebuilder-ui 1.1.46 → 1.1.48
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-1bde8dc9.js → 401-64e37702.js} +1 -1
- package/lib/{404-48d76996.js → 404-7d89180e.js} +1 -1
- package/lib/{iframe-page-77e184a0.js → iframe-page-4c8bc1d5.js} +1 -1
- package/lib/index-5c1112e8.js +92783 -0
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +33 -32
- package/lib/super-ui.umd.cjs +172 -133
- package/lib/{tab-content-iframe-index-39745d49.js → tab-content-iframe-index-0a36be80.js} +1 -1
- package/lib/{tab-content-index-65696e56.js → tab-content-index-9a271908.js} +1 -1
- package/lib/{tache-subprocess-history-ef943f95.js → tache-subprocess-history-93d013b2.js} +1 -1
- package/package.json +7 -2
- package/packages/chat-embed/index.ts +6 -0
- package/packages/chat-embed/src/chat-embed-message.ts +79 -0
- package/packages/chat-embed/src/chat-embed.css +117 -0
- package/packages/chat-embed/src/chat-sender.vue +240 -0
- package/packages/chat-embed/src/header.vue +50 -0
- package/packages/chat-embed/src/index.vue +425 -0
- package/packages/chat-embed/src/recommendation-message.vue +37 -0
- package/packages/chat-embed/src/util.ts +33 -0
- package/packages/fs-preview/src/fs-preview.vue +5 -1
- package/packages/fs-upload-list/src/fs-upload-list.vue +6 -1
- package/packages/fs-upload-new/src/fs-button-upload.vue +8 -1
- package/packages/fs-upload-new/src/fs-drag-upload.vue +8 -1
- package/packages/fs-upload-new/src/fs-upload-new.vue +17 -0
- package/packages/index.js +16 -13
- package/packages/json-view/index.ts +3 -0
- package/packages/json-view/json-view-dialog.vue +53 -0
- package/packages/json-view/json-view.vue +126 -0
- package/packages/super-grid/src/apis.js +11 -0
- package/packages/super-grid/src/custom-formatter.js +15 -2
- package/packages/super-grid/src/dynamic-input.vue +46 -4
- package/packages/super-grid/src/formatter.js +5 -1
- package/packages/super-grid/src/normal-column-content.vue +29 -37
- package/packages/super-grid/src/normal-column.vue +8 -1
- package/packages/super-grid/src/super-grid.vue +21 -8
- package/src/assets/chat-embed/avatar.png +0 -0
- package/src/i18n/langs/cn.js +17 -3
- package/src/i18n/langs/en.js +16 -2
- package/src/store/modules/chat-ai-store.ts +78 -0
- package/src/store/modules/tab-content.js +9 -3
- package/src/styles/index.scss +19 -0
- package/src/utils/chat-ai-util.ts +31 -0
- package/src/utils/common-util.js +56 -8
- package/src/utils/insert_css.js +14 -1
- package/src/utils/jump-page-utils.js +8 -4
- package/lib/index-465b0d69.js +0 -73558
package/packages/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../src/utils/insert_css' // 公共样式库
|
|
2
2
|
// 依次导入组件库的各个组件
|
|
3
3
|
import { resizeDirective } from '../src/utils/resize'
|
|
4
|
-
import '../src/utils/iframe-communicator'
|
|
5
|
-
import store from '../src/store'
|
|
4
|
+
import '../src/utils/iframe-communicator'
|
|
5
|
+
import store from '../src/store'
|
|
6
6
|
import Breadcrumb from './breadcrumb'
|
|
7
7
|
import DepartmentTree from './department-tree'
|
|
8
8
|
import Hamburger from './hamburger'
|
|
@@ -44,8 +44,9 @@ import FsUploadNew from './fs-upload-new'
|
|
|
44
44
|
import ScanCodeInputBrowser from './scan-code-input-browser'
|
|
45
45
|
import WorkgroupTreeMobile from './workgroup-tree-mobile'
|
|
46
46
|
import RowForm from './row-form'
|
|
47
|
-
import * as ElementPlusIconsVue from
|
|
48
|
-
import YxAffix from '../src/components/Affix'
|
|
47
|
+
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
48
|
+
import YxAffix from '../src/components/Affix'
|
|
49
|
+
import ChatEmbed from './chat-embed'
|
|
49
50
|
// 将所有组件都存储起来,方便后续统一注册
|
|
50
51
|
const components = [
|
|
51
52
|
YxAffix,
|
|
@@ -81,11 +82,12 @@ const components = [
|
|
|
81
82
|
IntervalSelection,
|
|
82
83
|
DepartmentTreeMobile,
|
|
83
84
|
DepartmentUserTreeMobile,
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
SuperIcon,
|
|
86
|
+
FsUploadNew,
|
|
86
87
|
ScanCodeInputBrowser,
|
|
87
88
|
WorkgroupTreeMobile,
|
|
88
|
-
RowForm
|
|
89
|
+
RowForm,
|
|
90
|
+
ChatEmbed
|
|
89
91
|
]
|
|
90
92
|
|
|
91
93
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
@@ -106,8 +108,8 @@ const install = function (Vue) {
|
|
|
106
108
|
Vue.component(key, component)
|
|
107
109
|
}
|
|
108
110
|
// store挂载到Vue原型
|
|
109
|
-
Vue.provide('$agilebuilderUIStore', store)
|
|
110
|
-
if(Vue.config.globalProperties) Vue.config.globalProperties.$agilebuilderUIStore = store
|
|
111
|
+
Vue.provide('$agilebuilderUIStore', store)
|
|
112
|
+
if (Vue.config.globalProperties) Vue.config.globalProperties.$agilebuilderUIStore = store
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
// 判断是否是直接引入vue的js文件,即全局引用可自动安装所有组件
|
|
@@ -146,16 +148,17 @@ export {
|
|
|
146
148
|
SecretInfo,
|
|
147
149
|
DepartmentTreeMobile,
|
|
148
150
|
DepartmentUserTreeMobile,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
SuperIcon,
|
|
152
|
+
FsUploadNew,
|
|
151
153
|
ScanCodeInputBrowser,
|
|
152
154
|
WorkgroupTreeMobile,
|
|
153
|
-
RowForm
|
|
155
|
+
RowForm,
|
|
156
|
+
ChatEmbed
|
|
154
157
|
}
|
|
155
158
|
|
|
156
159
|
export default {
|
|
157
160
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
158
161
|
install,
|
|
159
162
|
store,
|
|
160
|
-
...components
|
|
163
|
+
...components
|
|
161
164
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
append-to-body
|
|
4
|
+
v-model="showJsonVisible"
|
|
5
|
+
:append-to-body="appendToBody"
|
|
6
|
+
:title="title"
|
|
7
|
+
width="600"
|
|
8
|
+
@close="close"
|
|
9
|
+
>
|
|
10
|
+
<json-view :jsonObject="jsonObject" />
|
|
11
|
+
</el-dialog>
|
|
12
|
+
</template>
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import { ref, defineEmits, defineProps, defineOptions, watch } from 'vue'
|
|
15
|
+
defineOptions({
|
|
16
|
+
name: 'JsonViewDialog',
|
|
17
|
+
inheritAttrs: false
|
|
18
|
+
})
|
|
19
|
+
import JsonView from './json-view.vue'
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
jsonObject: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: () => {}
|
|
24
|
+
},
|
|
25
|
+
appendToBody: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'JSON 预览'
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
const emits = defineEmits(['update:modelValue'])
|
|
39
|
+
const showJsonVisible = ref(false)
|
|
40
|
+
watch(
|
|
41
|
+
() => props.modelValue,
|
|
42
|
+
(newVal) => {
|
|
43
|
+
if (newVal) {
|
|
44
|
+
showJsonVisible.value = true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
const close = () => {
|
|
49
|
+
showJsonVisible.value = false
|
|
50
|
+
emits('update:modelValue', false)
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
<style scoped></style>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{
|
|
4
|
+
width: '100%'
|
|
5
|
+
}"
|
|
6
|
+
ref="cfCodemirrorJsonViewRef"
|
|
7
|
+
id="cf-codemirror-view-json"
|
|
8
|
+
></div>
|
|
9
|
+
</template>
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { ref, defineProps, defineOptions, watch, nextTick, onMounted } from 'vue'
|
|
12
|
+
defineOptions({
|
|
13
|
+
name: 'JsonView',
|
|
14
|
+
inheritAttrs: false
|
|
15
|
+
})
|
|
16
|
+
import { basicSetup, EditorView } from 'codemirror'
|
|
17
|
+
import { jsonLanguage } from '@codemirror/lang-json'
|
|
18
|
+
import { EditorState, Facet } from '@codemirror/state'
|
|
19
|
+
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
jsonObject: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: () => {}
|
|
24
|
+
},
|
|
25
|
+
height: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 0
|
|
28
|
+
},
|
|
29
|
+
theme: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
const editor = ref<any>(null)
|
|
35
|
+
const cfCodemirrorJsonViewRef = ref()
|
|
36
|
+
const codemirrorHeight = ref('400px')
|
|
37
|
+
watch(
|
|
38
|
+
() => props.jsonObject,
|
|
39
|
+
(newVal) => {
|
|
40
|
+
if (editor.value) {
|
|
41
|
+
// 更新 CodeMirror 中的值
|
|
42
|
+
loadEditor()
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{ deep: true }
|
|
46
|
+
)
|
|
47
|
+
onMounted(() => {
|
|
48
|
+
nextTick(() => {
|
|
49
|
+
loadEditor()
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
function loadEditor() {
|
|
54
|
+
if (editor.value) {
|
|
55
|
+
editor.value.destroy()
|
|
56
|
+
}
|
|
57
|
+
const jsonStr = props.jsonObject ? JSON.stringify(props.jsonObject, null, 2) : ''
|
|
58
|
+
if (props.height) {
|
|
59
|
+
codemirrorHeight.value = props.height + 'px'
|
|
60
|
+
} else {
|
|
61
|
+
if (cfCodemirrorJsonViewRef.value) {
|
|
62
|
+
const rect = cfCodemirrorJsonViewRef.value.getBoundingClientRect()
|
|
63
|
+
if (rect.y || rect.y === 0) {
|
|
64
|
+
console.log('window.innerHeight - rect.y', window.innerHeight, rect.y)
|
|
65
|
+
codemirrorHeight.value = window.innerHeight - rect.y - 100 + 'px'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const state = getEditorState(jsonStr)
|
|
70
|
+
let element: Element | null = document.getElementById('cf-codemirror-view-json')
|
|
71
|
+
if (element) {
|
|
72
|
+
editor.value = new EditorView({
|
|
73
|
+
state,
|
|
74
|
+
parent: element
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// 获取编辑器状态
|
|
79
|
+
function getEditorState(jsonStr: string) {
|
|
80
|
+
// 获取主题
|
|
81
|
+
const mytheme = getTheme()
|
|
82
|
+
// 基本主题样式,主要设置字体大小和高度
|
|
83
|
+
const baseTheme = EditorView.theme({
|
|
84
|
+
'.cm-content, .cm-gutter': { minHeight: codemirrorHeight.value },
|
|
85
|
+
'&': {
|
|
86
|
+
height: codemirrorHeight.value,
|
|
87
|
+
maxHeight: codemirrorHeight.value,
|
|
88
|
+
fontSize: '12px'
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
return EditorState.create({
|
|
92
|
+
doc: jsonStr,
|
|
93
|
+
extensions: [
|
|
94
|
+
EditorState.tabSize.of(16),
|
|
95
|
+
basicSetup,
|
|
96
|
+
jsonLanguage,
|
|
97
|
+
mytheme,
|
|
98
|
+
baseTheme,
|
|
99
|
+
readOnlyFacet.of(true),
|
|
100
|
+
preventChanges
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 创建一个新的 Facet
|
|
106
|
+
const readOnlyFacet = Facet.define<boolean, boolean>({ combine: (values) => values.some((a) => a) })
|
|
107
|
+
|
|
108
|
+
// 创建一个新的 StateField 来监听更改
|
|
109
|
+
const preventChanges = EditorState.transactionFilter.of((tr: any) => {
|
|
110
|
+
if (tr.isUserEvent && tr.docChanged && tr.state.facet(readOnlyFacet)) {
|
|
111
|
+
return {
|
|
112
|
+
changes: {
|
|
113
|
+
from: tr.changes.from,
|
|
114
|
+
to: tr.changes.to,
|
|
115
|
+
insert: tr.startState.doc.sliceString(tr.changes.from, tr.changes.to)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return tr
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
function getTheme() {
|
|
123
|
+
return EditorView.theme({})
|
|
124
|
+
}
|
|
125
|
+
</script>
|
|
126
|
+
<style scoped></style>
|
|
@@ -1460,6 +1460,17 @@ const apis = {
|
|
|
1460
1460
|
},
|
|
1461
1461
|
getCustomFunc(funcName) {
|
|
1462
1462
|
window.$PageUtil.getCustomFunc(this.pageContext, funcName)
|
|
1463
|
+
},
|
|
1464
|
+
addRequiredClass(fieldName,listCode, rowIndex, pageNum) {
|
|
1465
|
+
const gridParams = store.get(listCode)
|
|
1466
|
+
if (this.isFormSubTable && this.isSubTableShowPage){
|
|
1467
|
+
rowIndex = rowIndex - 1
|
|
1468
|
+
if(pageNum !== this.currentPage){
|
|
1469
|
+
this.currentPage = pageNum
|
|
1470
|
+
this.changePage(pageNum)
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
gridParams.gridData[rowIndex]['validateErrorField'] = fieldName
|
|
1463
1474
|
}
|
|
1464
1475
|
}
|
|
1465
1476
|
export default apis
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $emit } from '../../utils/gogocodeTransfer'
|
|
2
|
-
import { doFormat } from './formatter'
|
|
2
|
+
import { doFormat, formatDateTime } from './formatter'
|
|
3
3
|
import store from './store'
|
|
4
4
|
import { initialization, jumpToPage } from '../../../src/utils/jump-page-utils'
|
|
5
5
|
import { analysisFileSetObj, otherFilesToStandard } from './utils'
|
|
@@ -198,9 +198,10 @@ const customFormatter = {
|
|
|
198
198
|
jumpPageJson = column.formatter.options.format
|
|
199
199
|
}
|
|
200
200
|
if (jumpPageJson && jumpPageJson !== '') {
|
|
201
|
+
const jumpPageJsonObject = JSON.parse(jumpPageJson)
|
|
201
202
|
// 解析是否需要显示该超链接
|
|
202
203
|
const result = initialization(
|
|
203
|
-
|
|
204
|
+
jumpPageJsonObject,
|
|
204
205
|
row,
|
|
205
206
|
isSql,
|
|
206
207
|
additionalParamerter,
|
|
@@ -227,6 +228,18 @@ const customFormatter = {
|
|
|
227
228
|
hyperLinkResult.label = this.objectPropValueTwo(row, column)
|
|
228
229
|
hyperLinkResult.title = hyperLinkResult.label
|
|
229
230
|
}
|
|
231
|
+
if (hyperLinkResult.jumpPageItem) {
|
|
232
|
+
const jumpSetting = hyperLinkResult.jumpPageItem.jumpPageSetting
|
|
233
|
+
if (jumpSetting && jumpSetting.displayTextFormatType && jumpSetting.displayTextFormat) {
|
|
234
|
+
const formatValue = formatDateTime(
|
|
235
|
+
jumpSetting.displayTextFormatType,
|
|
236
|
+
hyperLinkResult.label,
|
|
237
|
+
jumpSetting.displayTextFormat
|
|
238
|
+
)
|
|
239
|
+
hyperLinkResult.label = formatValue
|
|
240
|
+
hyperLinkResult.title = formatValue
|
|
241
|
+
}
|
|
242
|
+
}
|
|
230
243
|
return hyperLinkResult
|
|
231
244
|
},
|
|
232
245
|
// 点击超链接
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="type && type.indexOf('custom:') >= 0 && componentName != ''"
|
|
4
|
-
:
|
|
4
|
+
:class="
|
|
5
|
+
!this.isFormSubTable && row.validateErrorField && row.validateErrorField === column.prop ? 'required_bg' : ''
|
|
6
|
+
"
|
|
5
7
|
>
|
|
6
8
|
<component
|
|
7
9
|
:is="componentName"
|
|
@@ -26,7 +28,12 @@
|
|
|
26
28
|
@input="cellEvent('input', $event)"
|
|
27
29
|
/>
|
|
28
30
|
</div>
|
|
29
|
-
<div
|
|
31
|
+
<div
|
|
32
|
+
v-else
|
|
33
|
+
:class="
|
|
34
|
+
!this.isFormSubTable && row.validateErrorField && row.validateErrorField === column.prop ? 'required_bg' : ''
|
|
35
|
+
"
|
|
36
|
+
>
|
|
30
37
|
<!--必须有@input ,否则无法输入值-->
|
|
31
38
|
<el-date-picker
|
|
32
39
|
v-if="type === 'year' || type === 'month' || type === 'week'"
|
|
@@ -293,6 +300,7 @@
|
|
|
293
300
|
@delete="deleteFile"
|
|
294
301
|
@delete-success="deleteSuccess"
|
|
295
302
|
@upload-success="uploadOnSuccess"
|
|
303
|
+
@on-error="onError"
|
|
296
304
|
/>
|
|
297
305
|
<multipart-upload
|
|
298
306
|
v-else-if="type === 'multipartUpload'"
|
|
@@ -713,7 +721,6 @@ export default {
|
|
|
713
721
|
newValue: null,
|
|
714
722
|
// disabled, // 当前用户是否禁止编辑该字段/ 是否新增行
|
|
715
723
|
componentName: '',
|
|
716
|
-
validateErrorField: '', // 保存行记录时,验证失败的字段名
|
|
717
724
|
annexUploadFlag: false,
|
|
718
725
|
defaultAction,
|
|
719
726
|
fileMultiple: false, // 文件是否多选
|
|
@@ -768,7 +775,8 @@ export default {
|
|
|
768
775
|
colConfigure, // v10字段配置原信息
|
|
769
776
|
designProperty, // 字段配置
|
|
770
777
|
myCustomParams: {},
|
|
771
|
-
systemCode
|
|
778
|
+
systemCode,
|
|
779
|
+
isFormSubTable: false // 是否是表单子表
|
|
772
780
|
}
|
|
773
781
|
},
|
|
774
782
|
computed: {},
|
|
@@ -816,6 +824,9 @@ export default {
|
|
|
816
824
|
},
|
|
817
825
|
created() {
|
|
818
826
|
const gridParams = store.get(this.listCode)
|
|
827
|
+
if (gridParams && gridParams.options && gridParams.options.isFormSubTable) {
|
|
828
|
+
this.isFormSubTable = gridParams.options.isFormSubTable
|
|
829
|
+
}
|
|
819
830
|
if (this.controlConfig?.customParams) {
|
|
820
831
|
if (!this.pageContext) {
|
|
821
832
|
this.pageContext = gridParams.options.pageContext
|
|
@@ -1111,6 +1122,7 @@ export default {
|
|
|
1111
1122
|
val = null
|
|
1112
1123
|
}
|
|
1113
1124
|
$emit(this, 'update:value', val)
|
|
1125
|
+
this.clearValidateErrorField()
|
|
1114
1126
|
isInputVal = true
|
|
1115
1127
|
// 在callCustomEvent方法中使用了innerValue属性
|
|
1116
1128
|
this.innerValue = val
|
|
@@ -1127,9 +1139,11 @@ export default {
|
|
|
1127
1139
|
if (this.innerValue.indexOf(saveAll) < 0) {
|
|
1128
1140
|
// 不包含“全选”时才走input,全选是在multiselectchange中特殊处理的
|
|
1129
1141
|
$emit(this, 'update:value', this.innerValue.join(','))
|
|
1142
|
+
this.clearValidateErrorField()
|
|
1130
1143
|
}
|
|
1131
1144
|
} else {
|
|
1132
1145
|
$emit(this, 'update:value', this.innerValue)
|
|
1146
|
+
this.clearValidateErrorField()
|
|
1133
1147
|
}
|
|
1134
1148
|
isInputVal = true
|
|
1135
1149
|
} else if (eventName === 'input' && isInputEventUpdateValue !== undefined && isInputEventUpdateValue === true) {
|
|
@@ -1137,6 +1151,7 @@ export default {
|
|
|
1137
1151
|
// 在callCustomEvent方法中使用了innerValue属性
|
|
1138
1152
|
this.innerValue = event
|
|
1139
1153
|
$emit(this, 'update:value', event)
|
|
1154
|
+
this.clearValidateErrorField()
|
|
1140
1155
|
isInputVal = true
|
|
1141
1156
|
} else if (eventName === 'blur' && !this.isSelectControll()) {
|
|
1142
1157
|
// 为了使输入时流畅,所以在blur时调用input,更改组件的数据
|
|
@@ -1193,9 +1208,16 @@ export default {
|
|
|
1193
1208
|
}
|
|
1194
1209
|
// 必须这样调用input事件 ,否则组件无法输入值
|
|
1195
1210
|
$emit(this, 'update:value', this.innerValue) // 现在的用法
|
|
1211
|
+
this.clearValidateErrorField()
|
|
1196
1212
|
// 扫描组件时监控值变化
|
|
1197
1213
|
this.watchScanValueChange(this.innerValue)
|
|
1198
1214
|
},
|
|
1215
|
+
// 清空单元格必填样式
|
|
1216
|
+
clearValidateErrorField() {
|
|
1217
|
+
if (this.row.validateErrorField) {
|
|
1218
|
+
this.row.validateErrorField = undefined
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1199
1221
|
// 是否是输入框
|
|
1200
1222
|
isInputControl() {
|
|
1201
1223
|
return this.type === 'input' || this.type === 'textarea'
|
|
@@ -2075,6 +2097,26 @@ export default {
|
|
|
2075
2097
|
} else {
|
|
2076
2098
|
this.departmentInfo = []
|
|
2077
2099
|
}
|
|
2100
|
+
},
|
|
2101
|
+
onError(error) {
|
|
2102
|
+
console.error('Upload error:', error)
|
|
2103
|
+
if (error.message) {
|
|
2104
|
+
let message = JSON.parse(error.message)
|
|
2105
|
+
if (message && message.message) {
|
|
2106
|
+
message = JSON.parse(message.message)
|
|
2107
|
+
}
|
|
2108
|
+
this.$message({
|
|
2109
|
+
type: 'error',
|
|
2110
|
+
message: message,
|
|
2111
|
+
showClose: true
|
|
2112
|
+
})
|
|
2113
|
+
} else {
|
|
2114
|
+
this.$message({
|
|
2115
|
+
type: 'error',
|
|
2116
|
+
message: this.$t('fsUpload.uploadFailed'),
|
|
2117
|
+
showClose: true
|
|
2118
|
+
})
|
|
2119
|
+
}
|
|
2078
2120
|
}
|
|
2079
2121
|
}
|
|
2080
2122
|
}
|
|
@@ -179,7 +179,7 @@ export function doFormatWithValueSet(column, value) {
|
|
|
179
179
|
label.push(item[0].label)
|
|
180
180
|
}
|
|
181
181
|
})
|
|
182
|
-
if(label.length > 0){
|
|
182
|
+
if (label.length > 0) {
|
|
183
183
|
value = label.join(',')
|
|
184
184
|
}
|
|
185
185
|
} else {
|
|
@@ -194,3 +194,7 @@ export function doFormatWithValueSet(column, value) {
|
|
|
194
194
|
}
|
|
195
195
|
return value
|
|
196
196
|
}
|
|
197
|
+
|
|
198
|
+
export function formatDateTime(type, value, format) {
|
|
199
|
+
return formatter[type](value, { format: format })
|
|
200
|
+
}
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
columnFormatter.options.format &&
|
|
148
148
|
columnFormatter.options.format !== ''
|
|
149
149
|
"
|
|
150
|
-
:class="
|
|
150
|
+
:class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
|
|
151
151
|
>
|
|
152
152
|
<!--:key="column.prop+'_'+rowIndex+'_'+currentPage" 为了解决子表分页时,新增自动跳转到下一页,第一条记录的自定义控件被复用,导致业务逻辑没执行 -->
|
|
153
153
|
<component
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
:component-id="componentId"
|
|
173
173
|
:additional-settings="additionalSettings"
|
|
174
174
|
:page-context="options?.pageContext"
|
|
175
|
-
:custom-params="
|
|
175
|
+
:custom-params="getCustomParams()"
|
|
176
176
|
@prohibitToEdit="prohibitToEdit"
|
|
177
177
|
@refresh-list="refreshList"
|
|
178
178
|
/></span>
|
|
@@ -221,12 +221,7 @@
|
|
|
221
221
|
@click="clickHyperLink(column, row, listCode, rowIndex)"
|
|
222
222
|
> -->
|
|
223
223
|
<el-link
|
|
224
|
-
v-else-if="
|
|
225
|
-
columnFormatter !== undefined &&
|
|
226
|
-
columnFormatter.type !== undefined &&
|
|
227
|
-
columnFormatter.type === 'hyperlinks' &&
|
|
228
|
-
getMyHyperLinkSetting(row, rowIndex).visible === true
|
|
229
|
-
"
|
|
224
|
+
v-else-if="columnFormatter?.type === 'hyperlinks' && linkObject.visible === true"
|
|
230
225
|
:type="getLinkType(row)"
|
|
231
226
|
@click="clickHyperLink(column, row, listCode, rowIndex)"
|
|
232
227
|
>
|
|
@@ -234,20 +229,14 @@
|
|
|
234
229
|
v-if="isShowOverflowTooltip"
|
|
235
230
|
:id="column.prop + 'DomData' + rowIndex"
|
|
236
231
|
:style="textOverflow === 'newline' ? {} : { width: cellWidth + 'px' }"
|
|
237
|
-
:title="
|
|
232
|
+
:title="linkObject.title"
|
|
238
233
|
:class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
|
|
239
|
-
>{{
|
|
240
|
-
<SuperIcon
|
|
241
|
-
v-if="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
242
|
-
:iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
243
|
-
></SuperIcon>
|
|
234
|
+
>{{ linkObject.label }}
|
|
235
|
+
<SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
|
|
244
236
|
</span>
|
|
245
237
|
<span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'"
|
|
246
|
-
>{{
|
|
247
|
-
<SuperIcon
|
|
248
|
-
v-if="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
249
|
-
:iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
250
|
-
></SuperIcon>
|
|
238
|
+
>{{ linkObject.label }}
|
|
239
|
+
<SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
|
|
251
240
|
</span>
|
|
252
241
|
</el-link>
|
|
253
242
|
<span
|
|
@@ -307,12 +296,7 @@
|
|
|
307
296
|
</span>
|
|
308
297
|
<!-- 超链接 -->
|
|
309
298
|
<el-link
|
|
310
|
-
v-else-if="
|
|
311
|
-
columnFormatter !== undefined &&
|
|
312
|
-
columnFormatter.type !== undefined &&
|
|
313
|
-
columnFormatter.type === 'hyperlinks' &&
|
|
314
|
-
getMyHyperLinkSetting(row, rowIndex).visible === true
|
|
315
|
-
"
|
|
299
|
+
v-else-if="columnFormatter?.type === 'hyperlinks' && linkObject.visible"
|
|
316
300
|
type="primary"
|
|
317
301
|
@click="clickHyperLink(column, row, listCode, rowIndex)"
|
|
318
302
|
>
|
|
@@ -320,20 +304,14 @@
|
|
|
320
304
|
v-if="isShowOverflowTooltip"
|
|
321
305
|
:id="column.prop + 'DomData' + rowIndex"
|
|
322
306
|
:style="textOverflow === 'newline' ? {} : { width: cellWidth + 'px' }"
|
|
323
|
-
:title="$escapeHtml(
|
|
307
|
+
:title="$escapeHtml(linkObject.title)"
|
|
324
308
|
:class="textOverflow === 'newline' ? 'wrap-text' : 'ellipsis cell--span'"
|
|
325
|
-
>{{ $escapeHtml(
|
|
326
|
-
<SuperIcon
|
|
327
|
-
v-if="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
328
|
-
:iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
329
|
-
></SuperIcon>
|
|
309
|
+
>{{ $escapeHtml(linkObject.label) }}
|
|
310
|
+
<SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
|
|
330
311
|
</span>
|
|
331
312
|
<span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'"
|
|
332
|
-
>{{ $escapeHtml(
|
|
333
|
-
<SuperIcon
|
|
334
|
-
v-if="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
335
|
-
:iconValue="getMyHyperLinkSetting(row, rowIndex).icon"
|
|
336
|
-
></SuperIcon>
|
|
313
|
+
>{{ $escapeHtml(linkObject.label) }}
|
|
314
|
+
<SuperIcon v-if="linkObject.icon" :iconValue="linkObject.icon"></SuperIcon>
|
|
337
315
|
</span>
|
|
338
316
|
</el-link>
|
|
339
317
|
<!-- 富文本 -->
|
|
@@ -554,7 +532,8 @@ export default {
|
|
|
554
532
|
requiredClass: '',
|
|
555
533
|
lineEdit,
|
|
556
534
|
options,
|
|
557
|
-
textOverflow
|
|
535
|
+
textOverflow,
|
|
536
|
+
linkObject: {}
|
|
558
537
|
}
|
|
559
538
|
},
|
|
560
539
|
computed: {
|
|
@@ -707,6 +686,9 @@ export default {
|
|
|
707
686
|
}
|
|
708
687
|
this.setScanRuleSets()
|
|
709
688
|
this.requiredClass = this.isRequired(this.row.$editing) ? 'm-requried column-text-main' : ''
|
|
689
|
+
if (this.columnFormatter?.type === 'hyperlinks') {
|
|
690
|
+
this.linkObject = this.getMyHyperLinkSetting(this.row, this.rowIndex)
|
|
691
|
+
}
|
|
710
692
|
},
|
|
711
693
|
mounted() {
|
|
712
694
|
if (this.controlConfig) {
|
|
@@ -1280,6 +1262,16 @@ export default {
|
|
|
1280
1262
|
}
|
|
1281
1263
|
}
|
|
1282
1264
|
return true
|
|
1265
|
+
},
|
|
1266
|
+
getCustomParams() {
|
|
1267
|
+
if (this.column.formatter.type === 'customControl') {
|
|
1268
|
+
if (this.column.formatter?.options?.controlConfig) {
|
|
1269
|
+
const controlConfig = JSON.parse(this.column.formatter.options.controlConfig)
|
|
1270
|
+
if (controlConfig && controlConfig.customParams) {
|
|
1271
|
+
return formatCustomParams(controlConfig.customParams, this.options?.pageContext, this.row)
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1283
1275
|
}
|
|
1284
1276
|
},
|
|
1285
1277
|
emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
:row-index="scope.$index"
|
|
50
50
|
:line-edit="lineEdit"
|
|
51
51
|
:custom-format="customFormat"
|
|
52
|
+
:class="isValidateError(scope.row,scope.$index)?'required_bg required-corner':''"
|
|
53
|
+
:style="isValidateError(scope.row,scope.$index)?'display:block;':''"
|
|
52
54
|
@open-page="openPageEvent"
|
|
53
55
|
@refresData="refresData"
|
|
54
56
|
@refresh-list="refreshList"
|
|
@@ -60,7 +62,6 @@
|
|
|
60
62
|
</template>
|
|
61
63
|
</el-table-column>
|
|
62
64
|
</template>
|
|
63
|
-
|
|
64
65
|
<script>
|
|
65
66
|
import { CirclePlus, ZoomIn as ElIconZoomIn } from '@element-plus/icons-vue'
|
|
66
67
|
import { $emit, $off, $on } from '../../utils/gogocodeTransfer'
|
|
@@ -77,6 +78,7 @@ import RichEditorViewer from '../../rich-editor/viewer.vue'
|
|
|
77
78
|
import GridIcon from './components/grid-icon.vue'
|
|
78
79
|
import NormalColumnContent from './normal-column-content.vue'
|
|
79
80
|
import eventBus from './eventBus'
|
|
81
|
+
// border:1px solid red;padding: 10px;
|
|
80
82
|
export default {
|
|
81
83
|
components: {
|
|
82
84
|
DynamicInput,
|
|
@@ -359,6 +361,11 @@ export default {
|
|
|
359
361
|
openPageEvent(openPageParams) {
|
|
360
362
|
console.log('normalColumn----openPageEvent----', openPageParams)
|
|
361
363
|
this.$emit('open-page', openPageParams)
|
|
364
|
+
},
|
|
365
|
+
isValidateError(row,rowIndex) {
|
|
366
|
+
// const gridParams = store.get(this.listCode)
|
|
367
|
+
console.log('row.validateErrorField-----',row)
|
|
368
|
+
return this.isFormSubTable && row && row['validateErrorField'] && row['validateErrorField'] === this.column.prop
|
|
362
369
|
}
|
|
363
370
|
},
|
|
364
371
|
emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
|