adtec-core-package 2.6.5 → 2.6.7
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
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<!--创建时间: 2024/10/26 下午7:08-->
|
|
4
4
|
<!--修改时间: 2024/10/26 下午7:08-->
|
|
5
5
|
<template>
|
|
6
|
-
<el-flex align="center" height="44px" style="background: #ffffff">
|
|
7
|
-
<el-flex align="center">
|
|
6
|
+
<el-flex align="center" height="44px" style="background: #ffffff;overflow: hidden">
|
|
7
|
+
<el-flex align="center" style="overflow: hidden">
|
|
8
8
|
<template v-if="level + '' === '0'">
|
|
9
9
|
<el-icons
|
|
10
10
|
model-value="adtec-onetitle"
|
|
11
11
|
style="color: var(--el-color-primary); font-size: 16px"
|
|
12
12
|
></el-icons>
|
|
13
|
-
<el-text style="font-size: 16px; line-height: 16px">{{ title }}</el-text>
|
|
13
|
+
<el-text style="font-size: 16px; line-height: 16px;">{{ title }}</el-text>
|
|
14
14
|
<slot name="titleRight"></slot>
|
|
15
15
|
</template>
|
|
16
16
|
<template v-if="level + '' === '1'">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
>{{ props.tooltipContent ? props.tooltipContent : props.content }}
|
|
16
16
|
</slot>
|
|
17
17
|
</template>
|
|
18
|
-
<div class="content" :style="{ width: props.width }" @mouseover="isShowTooltip">
|
|
18
|
+
<div class="content" :style="{ width: props.width,textAlign:props.textAlign }" @mouseover="isShowTooltip">
|
|
19
19
|
<span ref="contentRef">
|
|
20
20
|
<!-- 给一个没有写插槽的默认值,兼容纯文本的情况 -->
|
|
21
21
|
<slot name="content">{{ props.content }}</slot>
|
|
@@ -31,6 +31,7 @@ import { ref } from 'vue'
|
|
|
31
31
|
interface Props {
|
|
32
32
|
content: string
|
|
33
33
|
width: string
|
|
34
|
+
textAlign: string
|
|
34
35
|
tooltipContent?: string
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -38,6 +39,7 @@ interface Props {
|
|
|
38
39
|
const props = withDefaults(defineProps<Props>(), {
|
|
39
40
|
content: '',
|
|
40
41
|
width: '',
|
|
42
|
+
textAlign: '',
|
|
41
43
|
tooltipContent: '',
|
|
42
44
|
})
|
|
43
45
|
// 使用isShow来控制tooltip是否显示
|
|
@@ -46,11 +48,7 @@ const isShow = ref<boolean>(true)
|
|
|
46
48
|
const contentRef = ref()
|
|
47
49
|
const isShowTooltip = function (): void {
|
|
48
50
|
// 计算span标签的offsetWidth与盒子元素的offsetWidth,给isShow赋值
|
|
49
|
-
|
|
50
|
-
isShow.value = false
|
|
51
|
-
} else {
|
|
52
|
-
isShow.value = true
|
|
53
|
-
}
|
|
51
|
+
isShow.value = !(contentRef.value && contentRef.value.parentNode.offsetWidth < contentRef.value.offsetWidth);
|
|
54
52
|
}
|
|
55
53
|
</script>
|
|
56
54
|
<style scoped lang="scss">
|
|
@@ -5,69 +5,65 @@ import { type IWfTaskVo } from '../../src/interface/workflow/IWfTaskVo'
|
|
|
5
5
|
import { userInfoStore } from '../../src/stores/userInfoStore'
|
|
6
6
|
import frameworkUtil from '../../src/utils/FrameworkUtils'
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* 修改时间: 2025/1/23 下午3:16
|
|
13
|
-
*/
|
|
14
|
-
export async function showTodoDialog(taskVo: Ref<IWfTaskVo>, params: any) {
|
|
8
|
+
export async function showTodoDialog(
|
|
9
|
+
taskVo: Ref<IWfTaskVo>,
|
|
10
|
+
params: any
|
|
11
|
+
) {
|
|
15
12
|
if (taskVo.value && taskVo.value.nodeTag) {
|
|
16
13
|
const nodeTag =
|
|
17
14
|
taskVo.value.nodeTag.indexOf(':') > -1
|
|
18
|
-
? taskVo.value.nodeTag.split(':')[1]
|
|
15
|
+
? taskVo.value.nodeTag.split(':')[1] || ''
|
|
19
16
|
: taskVo.value.nodeTag
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
const propertyList: Array<{ code: string, value: any }> = Object.entries(taskVo.value).map(([code, value]) => ({
|
|
18
|
+
code,
|
|
19
|
+
value
|
|
20
|
+
}))
|
|
21
|
+
|
|
22
|
+
if (params && params.value && Array.isArray(params.value) && params.value.length > 0) {
|
|
23
|
+
for (let param of params.value) {
|
|
24
|
+
if (param && typeof param === 'object') {
|
|
25
|
+
for (let valueKey in param) {
|
|
26
|
+
propertyList.push({ code: valueKey, value: param[valueKey] || '' })
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
localStorage.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
menu =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
ps.push({ code: 'menuCode', value: menu.code })
|
|
57
|
-
await WujieVue.bus.$emit('openMenu', menu, params)
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
await WujieVue.bus.$emit('openMenu', menu)
|
|
31
|
+
//表单页面
|
|
32
|
+
if (taskVo.value.nodeTag.indexOf('/') > -1) {
|
|
33
|
+
//给子应用组件发送bus事件
|
|
34
|
+
WujieVue.bus.$emit(taskVo.value.nodeTag.split(':')[0] + 'WorkflowTodoBus', propertyList)
|
|
35
|
+
} else {
|
|
36
|
+
//菜单页面
|
|
37
|
+
const find = userInfoStore().getUserInfo.menuList.find((c) => c.code === nodeTag)
|
|
38
|
+
if (find) {
|
|
39
|
+
const key = nodeTag + (Math.random() * 100000).toFixed(0)
|
|
40
|
+
localStorage.setItem(key + '_message', JSON.stringify(taskVo.value))
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
localStorage.removeItem(key + '_message')
|
|
43
|
+
}, 1000 * 10)
|
|
44
|
+
let menu = frameworkUtil
|
|
45
|
+
.getOpenMenuInfoWujie()
|
|
46
|
+
.find((item: any) => item.id === taskVo.value.taskId)
|
|
47
|
+
if (!menu) {
|
|
48
|
+
menu = JSON.parse(JSON.stringify(find))
|
|
49
|
+
if (menu) {
|
|
50
|
+
menu.code = key
|
|
51
|
+
menu.name = taskVo.value.taskName ? taskVo.value.taskName : menu.name
|
|
52
|
+
menu.id = taskVo.value.taskId
|
|
53
|
+
propertyList.push({ code: 'menuCode', value: menu.code })
|
|
54
|
+
await WujieVue.bus.$emit('openMenu', menu, propertyList)
|
|
61
55
|
}
|
|
62
|
-
//给子应用组件发送bus事件
|
|
63
|
-
setTimeout(() => {
|
|
64
|
-
WujieVue.bus.$emit(taskVo.value?.nodeTag?.split(':')[0] + 'WorkflowTodoBus', ps)
|
|
65
|
-
}, 1000)
|
|
66
|
-
// await permissionHooks.openMenu(find)
|
|
67
|
-
// WujieVue.bus.$emit(taskVo.value.nodeTag.split(':')[0] + 'WorkflowTodoBus', ps)
|
|
68
56
|
} else {
|
|
69
|
-
|
|
57
|
+
await WujieVue.bus.$emit('openMenu', menu)
|
|
70
58
|
}
|
|
59
|
+
//给子应用组件发送bus事件
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
WujieVue.bus.$emit(taskVo.value?.nodeTag?.split(':')[0] + 'WorkflowTodoBus', propertyList)
|
|
62
|
+
}, 1000)
|
|
63
|
+
// await permissionHooks.openMenu(find)
|
|
64
|
+
// WujieVue.bus.$emit(taskVo.value.nodeTag.split(':')[0] + 'WorkflowTodoBus', ps)
|
|
65
|
+
} else {
|
|
66
|
+
ElMessage.error('未找到该菜单')
|
|
71
67
|
}
|
|
72
68
|
}
|
|
73
69
|
} else {
|