This commit is contained in:
那些花儿
2025-08-30 17:49:39 +08:00
parent cbc1956bc6
commit 5441b1d785
83 changed files with 3708 additions and 3186 deletions
@@ -105,3 +105,8 @@
.el-button{
border-radius: 2px;
}
.el-descriptions .is-bordered{
table-layout: fixed;!important;
}
@@ -0,0 +1,195 @@
.lf-graph {
position: relative;
width: 100%;
height: 100%;
z-index: 0;
background: #ffffff;
user-select: none;
}
.lf-element-text {
cursor: text;
}
.lf-text-disabled {
pointer-events: none;
}
.lf-text-draggable {
cursor: move;
}
.lf-node-anchor {
cursor: crosshair;
}
.lf-node-anchor-hover {
visibility: hidden;
}
.lf-anchor:hover .lf-node-anchor-hover {
visibility: visible;
}
.lf-edge.pointer-none {
pointer-events: none;
}
.lf-edge-append {
cursor: pointer;
}
.lf-edge-animation {
stroke-dashoffset: 100%;
animation: lf_animate_dash 5s linear infinite;
}
@keyframes lf_animate_dash {
to {
stroke-dashoffset: 0;
}
}
/* node */
.lf-node-not-allow {
cursor: not-allowed;
}
.lf-polyline-append-ns-resize {
cursor: ns-resize;
}
.lf-polyline-append-ew-resize {
cursor: ew-resize;
}
.lf-dragging {
cursor: grabbing;
}
.lf-drag-able {
cursor: default;
}
.lf-bezier-adjust-anchor {
cursor: pointer;
}
/* background */
.lf-background,
.lf-grid {
position: absolute;
left: 0px;
top: 0px;
right: 0;
bottom: 0;
z-index: -1;
}
.lf-background-area {
width: 100%;
height: 100%;
}
/* html-overlay */
.lf-html-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
pointer-events: none;
overflow: hidden;
user-select: none;
}
.lf-html-overlay__transform > * {
pointer-events: all;
}
.lf-text-editable {
pointer-events: all;
}
.lf-text-input {
text-align: center;
outline: none;
position: absolute;
border: 1px solid #edefed;
box-sizing: border-box;
line-height: 1.2;
border-radius: 3px;
resize: none;
padding: 5px;
min-height: 20px;
min-width: 100px;
white-space: pre;
background: #fff;
transform: translate(-50%, -50%);
}
.lf-get-text-height {
display: inline-block;
word-break: break-all;
/* 为了跟输入效果保持一致,设置透明边框占位 */
border: 1px solid transparent;
box-sizing: border-box;
}
.lf-node-text-auto-wrap {
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
/* border: 1px solid transparent; */
}
.lf-node-text-auto-wrap-content {
line-height: 1.2;
background: transparent;
text-align: center;
word-break: break-all;
width: 100%;
}
.lf-node-text-ellipsis-content {
line-height: 1.2;
background: transparent;
text-align: center;
white-space: nowrap;
/* overflow: hidden;
text-overflow: ellipsis; */
width: 100%;
}
.lf-node-text-ellipsis-content>div{
text-overflow: ellipsis;
overflow: hidden;
}
/* tool-overlay */
.lf-tool-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
pointer-events: none;
overflow: hidden;
}
.lf-tool-overlay > * {
pointer-events: all;
}
/* modification-overlay */
.modification-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
pointer-events: none;
overflow: hidden;
}
.modification-overlay > * {
pointer-events: all;
}
.lf-outline,.lf-snapline {
pointer-events: none;
}
.lf-keyboard-tips {
float: right;
}
.lf-node-select-decorate {
transform: translate(-50%, -50%);
pointer-events: none;
border: 1px dashed #343435;
position: absolute;
}
.lf-multiple-select {
position: absolute;
border: 2px dashed rgba(24, 125, 255, 0.8);
box-shadow: 0px 0px 3px 0px rgba(24, 125, 255, 0.5);
cursor: move;
}
.lf-edge-adjust-point {
cursor: move;
}
File diff suppressed because one or more lines are too long
@@ -1,9 +1,12 @@
<template>
<div>
<template v-for="item in options">
<el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs">{{ item[label_key] }}</el-tag>
</template>
</div>
<div>
<template v-for="item in options">
<el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs"
:type="item.type"
>{{ item[label_key] }}
</el-tag>
</template>
</div>
</template>
<script>
@@ -12,73 +15,73 @@ const enumCache = {}
const requestPromises = {}
module.exports = {
name: "DictTag",
props: {
value: { type: String | Number },
name: { type: String },
value_key: {
type: String,
default: "code"
},
label_key: {
type: String,
default: "name"
}
name: "DictTag",
props: {
value: {type: String | Number},
name: {type: String},
value_key: {
type: String,
default: "code"
},
data() {
return {
options: []
}
},
watch: {
code:{
handler(val) {
this.getEnumOptions()
},
immediate: true
}
},
methods: {
getEnumOptions() {
// // 检查数据缓存
// if (enumCache[this.name]) {
// this.options = enumCache[this.name]
// return
// }
//
// // 检查是否已有相同请求在进行中
// if (requestPromises[this.name]) {
// requestPromises[this.name].then(data => {
// this.options = data
// })
// return
// }
// 创建请求Promise并缓存
requestPromises[this.name] = $.get("/open/common/dictEnumOptions", { name: this.name })
.then(res => {
if (res.code === 0) {
// 存入数据缓存
enumCache[this.name] = res.data
// 清除请求Promise缓存
delete requestPromises[this.name]
return res.data
}
})
requestPromises[this.name].then(data => {
this.options = data
})
}
},
created() {
label_key: {
type: String,
default: "name"
}
},
data() {
return {
options: []
}
},
watch: {
code: {
handler(val) {
this.getEnumOptions()
},
immediate: true
}
},
methods: {
getEnumOptions() {
// // 检查数据缓存
// if (enumCache[this.name]) {
// this.options = enumCache[this.name]
// return
// }
//
// // 检查是否已有相同请求在进行中
// if (requestPromises[this.name]) {
// requestPromises[this.name].then(data => {
// this.options = data
// })
// return
// }
// 创建请求Promise并缓存
requestPromises[this.name] = $.get("/open/common/dictEnumOptions", {name: this.name})
.then(res => {
if (res.code === 0) {
// 存入数据缓存
enumCache[this.name] = res.data
// 清除请求Promise缓存
delete requestPromises[this.name]
return res.data
}
})
requestPromises[this.name].then(data => {
this.options = data
})
}
},
created() {
}
}
</script>
<style scoped>
.el-tag + .el-tag {
margin-left: 10px;
margin-left: 10px;
}
</style>
File diff suppressed because it is too large Load Diff