fix : 修复工作流流程新增bug
This commit is contained in:
11294
package-lock.json
generated
11294
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,7 @@
|
|||||||
"@codemirror/lang-sql": "^6.5.4",
|
"@codemirror/lang-sql": "^6.5.4",
|
||||||
"@vitejs/plugin-vue": "^4.2.1",
|
"@vitejs/plugin-vue": "^4.2.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"unplugin-auto-import": "^0.15.3",
|
"unplugin-auto-import": "^0.15.3",
|
||||||
"unplugin-vue-components": "^0.24.1",
|
"unplugin-vue-components": "^0.24.1",
|
||||||
"vite": "^4.3.4",
|
"vite": "^4.3.4",
|
||||||
|
|||||||
@@ -227,16 +227,18 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.branch-merge {
|
.branch-merge {
|
||||||
font-size: 12px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 38px;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
font-size: 12px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: -20px auto 0;
|
margin: -20px auto 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
box-shadow: 0 0 5px 0 #d8d8d8;
|
box-shadow: 0 0 5px 0 #d8d8d8;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -249,6 +251,10 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.el-icon{
|
||||||
|
width: 1.4em;
|
||||||
|
height: 1.4em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
@@ -266,7 +272,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
width: 2px;
|
width: 2px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #CACACA;
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,7 +448,10 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
.fen-icon{
|
||||||
|
width: 1.8em;
|
||||||
|
height: 1.7em;
|
||||||
|
}
|
||||||
.middle-icon {
|
.middle-icon {
|
||||||
width: 1.4em;
|
width: 1.4em;
|
||||||
height: 1.4em;
|
height: 1.4em;
|
||||||
|
|||||||
1
src/assets/svg/fenzhi.svg
Normal file
1
src/assets/svg/fenzhi.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711286414943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="24248" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M480.246 771.968a128 128 0 1 0 63.488 0 32.32 32.32 0 0 0 0.256-3.96800001c0-75.648 51.392-140.16 180.672-249.59999999 96.256-81.408 102.528-86.912 132.416-118.912C903.414 349.76 927.99 304.25599999 927.99 256c0-1.34399999-0.064-2.688-0.256-3.968a128 128 0 1 0-63.488 0 32.32 32.32 0 0 0-0.256 3.96800001c0 28.672-17.408 60.8-53.76 99.83999999-27.264 29.248-33.6 34.816-126.912 113.728-60.992 51.648-106.816 94.71999999-139.328 135.04L543.99 256.00000001c0-1.34399999-0.064-2.688-0.256-3.96800001a128 128 0 1 0-63.488 0 32.32 32.32 0 0 0-0.256 3.968L479.99 604.608c-32.512-40.32-78.336-83.392-139.328-135.03999999-93.312-78.912-99.648-84.48-126.912-113.72800001-36.352-39.04-53.76-71.168-53.76-99.84 0-1.34399999-0.064-2.688-0.256-3.968a128 128 0 1 0-63.488 0 32.32 32.32 0 0 0-0.25600001 3.968c0 48.256 24.576 93.76 70.91200001 143.488 29.888 32 36.16 37.504 132.416 118.976C428.598 627.84 479.98999999 692.352 479.99 768a32.32 32.32 0 0 0 0.256 3.968zM511.99 192a64 64 0 1 1 0-128 64 64 0 0 1 0 128z m384 0a64 64 0 1 1 0-128 64 64 0 0 1 0 128z m-768 0a64 64 0 1 1 0-128 64 64 0 0 1 0 128z m384 768a64 64 0 1 1 0-128 64 64 0 0 1 0 128z" p-id="24249" fill="#2E7CF0"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -73,56 +73,56 @@ const handleViewDetails = (noticeId) => {
|
|||||||
viewForm.value = res.data
|
viewForm.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const setWsUrl=(url)=>{
|
// const setWsUrl=(url)=>{
|
||||||
return (window.location.protocol === 'http:' ? "ws://" : "wss://")+window.location.host + import.meta.env.VITE_BASE_URL + url;
|
// return (window.location.protocol === 'http:' ? "ws://" : "wss://")+window.location.host + import.meta.env.VITE_BASE_URL + url;
|
||||||
}
|
// }
|
||||||
const initWebSocket = () => {
|
// const initWebSocket = () => {
|
||||||
try {
|
// try {
|
||||||
//怎么区分http https /url(全局url) 封装url 只填个url?
|
// //怎么区分http https /url(全局url) 封装url 只填个url?
|
||||||
const wsUrl=setWsUrl('/notice-ws/notice')
|
// const wsUrl=setWsUrl('/notice-ws/notice')
|
||||||
const socket = new WebSocket(wsUrl)
|
// const socket = new WebSocket(wsUrl)
|
||||||
// 2. ws.send()给服务器发送信息
|
// // 2. ws.send()给服务器发送信息
|
||||||
//连接发生错误的回调方法
|
// //连接发生错误的回调方法
|
||||||
socket.onerror = function () {
|
// socket.onerror = function () {
|
||||||
console.log("ws连接发生错误");
|
// console.log("ws连接发生错误");
|
||||||
};
|
// };
|
||||||
//连接成功建立的回调方法
|
// //连接成功建立的回调方法
|
||||||
socket.onopen = function () {
|
// socket.onopen = function () {
|
||||||
let authInfo = {
|
// let authInfo = {
|
||||||
token: getToken(),
|
// token: getToken(),
|
||||||
type: "auth",
|
// type: "auth",
|
||||||
cluster: "notice"
|
// cluster: "notice"
|
||||||
}
|
// }
|
||||||
socket.send(JSON.stringify(authInfo))
|
// socket.send(JSON.stringify(authInfo))
|
||||||
console.log("ws连接成功");
|
// console.log("ws连接成功");
|
||||||
}
|
// }
|
||||||
//接收到消息的回调方法
|
// //接收到消息的回调方法
|
||||||
socket.onmessage = function (event) {
|
// socket.onmessage = function (event) {
|
||||||
let data = JSON.parse(event.data)
|
// let data = JSON.parse(event.data)
|
||||||
console.log('测试铃铛',data)
|
// console.log('测试铃铛',data)
|
||||||
if (data.type === 'notice') {
|
// if (data.type === 'notice') {
|
||||||
noticeList.value.push(data.notice)
|
// noticeList.value.push(data.notice)
|
||||||
total.value += 1
|
// total.value += 1
|
||||||
} else if(!data.type&&data.cluster==="notice"){
|
// } else if(!data.type&&data.cluster==="notice"){
|
||||||
noticeList.value.push(data)
|
// noticeList.value.push(data)
|
||||||
total.value += 1
|
// total.value += 1
|
||||||
}
|
// }
|
||||||
// console.log("服务器返回的信息: ", JSON.parse(event.data));
|
// // console.log("服务器返回的信息: ", JSON.parse(event.data));
|
||||||
}
|
// }
|
||||||
//连接关闭的回调方法
|
// //连接关闭的回调方法
|
||||||
socket.onclose = function () {
|
// socket.onclose = function () {
|
||||||
// initWebSocket()
|
// // initWebSocket()
|
||||||
console.log("ws连接关闭");
|
// console.log("ws连接关闭");
|
||||||
}
|
// }
|
||||||
setInterval(() => {
|
// setInterval(() => {
|
||||||
socket.send(JSON.stringify(send))
|
// socket.send(JSON.stringify(send))
|
||||||
}, 30000)
|
// }, 30000)
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
console.log(e)
|
// console.log(e)
|
||||||
console.log("ws连接失败");
|
// console.log("ws连接失败");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
initWebSocket()
|
// initWebSocket()
|
||||||
|
|
||||||
const searchNotifyList = () => {
|
const searchNotifyList = () => {
|
||||||
let params = {
|
let params = {
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ export const useProcessStore = defineStore('process', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const addProcess = (val) => {
|
const addProcess = (val) => {
|
||||||
console.log("添加节点成功")
|
|
||||||
processData.value.process.push(val)
|
processData.value.process.push(val)
|
||||||
}
|
}
|
||||||
const delProcess = (delNode) => {
|
const delProcess = (delNode) => {
|
||||||
@@ -109,4 +108,4 @@ export const useProcessStore = defineStore('process', () => {
|
|||||||
getAssignedUser,
|
getAssignedUser,
|
||||||
addAssignedUser
|
addAssignedUser
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -74,7 +74,8 @@ const visible = ref(false)
|
|||||||
const timer = ref(null)
|
const timer = ref(null)
|
||||||
const validComponents = ref(['processSetting', 'formDesign', 'processDesign'])
|
const validComponents = ref(['processSetting', 'formDesign', 'processDesign'])
|
||||||
// const activeSelect = ref('formDesign')
|
// const activeSelect = ref('formDesign')
|
||||||
const activeSelect = ref('processSetting')
|
// const activeSelect = ref('processSetting')
|
||||||
|
const activeSelect = ref('processDesign')
|
||||||
const validVisible = ref(false)
|
const validVisible = ref(false)
|
||||||
const validStep = ref(0)
|
const validStep = ref(0)
|
||||||
const validResult = ref({})
|
const validResult = ref({})
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
import {useProcessStore} from '@/stores/processStore.js'
|
import {useProcessStore} from '@/stores/processStore.js'
|
||||||
import {computed, defineExpose} from "vue";
|
import {computed, defineExpose} from "vue";
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
console.log(processStore.getDesign)
|
|
||||||
|
|
||||||
const processData = computed(() => {
|
const processData = computed(() => {
|
||||||
return processStore.getDesign()
|
return processStore.getDesign()
|
||||||
@@ -27,4 +26,4 @@ defineExpose({
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import MergeNode from './nodes/MergeNode.vue'
|
|||||||
import DelayNode from './nodes/DelayNode.vue'
|
import DelayNode from './nodes/DelayNode.vue'
|
||||||
import AddBranchNode from './nodes/AddBranchNode.vue'
|
import AddBranchNode from './nodes/AddBranchNode.vue'
|
||||||
|
|
||||||
|
import { debounce } from 'lodash'
|
||||||
import {defineExpose, h, render, ref} from 'vue'
|
import {defineExpose, h, render, ref} from 'vue'
|
||||||
import DefaultProps from "./DefaultNodeProps"
|
import DefaultProps from "./DefaultNodeProps"
|
||||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
@@ -47,7 +48,6 @@ const init = () => {
|
|||||||
|
|
||||||
// 初始化map集合,以便数据整理
|
// 初始化map集合,以便数据整理
|
||||||
const initMapping = (node) => {
|
const initMapping = (node) => {
|
||||||
console.log("初始化数据", node)
|
|
||||||
node.forEach(nodeItem => {
|
node.forEach(nodeItem => {
|
||||||
processStore.nodeMap.set(nodeItem.id, nodeItem)
|
processStore.nodeMap.set(nodeItem.id, nodeItem)
|
||||||
processStore.parentMap.set(nodeItem.parentId, nodeItem)
|
processStore.parentMap.set(nodeItem.parentId, nodeItem)
|
||||||
@@ -290,7 +290,7 @@ const selectNode = (node) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//处理节点插入逻辑
|
//处理节点插入逻辑
|
||||||
const insertNode = (type, parentNode) => {
|
const insertNode =debounce( (type, parentNode) => {
|
||||||
//插入新节点
|
//插入新节点
|
||||||
let id = getRandomId();
|
let id = getRandomId();
|
||||||
updateParentId(id, parentNode.id)
|
updateParentId(id, parentNode.id)
|
||||||
@@ -321,9 +321,8 @@ const insertNode = (type, parentNode) => {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
console.log('开始刷新')
|
|
||||||
init()
|
init()
|
||||||
}
|
},1000)
|
||||||
/**
|
/**
|
||||||
* 更新父id
|
* 更新父id
|
||||||
* @param newId
|
* @param newId
|
||||||
@@ -700,8 +699,9 @@ defineExpose({
|
|||||||
//background: #f5f6f6;
|
//background: #f5f6f6;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-top: 2px solid #cccccc;
|
border-top: 2px solid #000000;
|
||||||
border-bottom: 2px solid #cccccc;
|
|
||||||
|
border-bottom: 2px solid #000000;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: "";
|
content: "";
|
||||||
@@ -711,7 +711,7 @@ defineExpose({
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
width: 2px;
|
width: 2px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #CACACA;
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line-top-left, .line-top-right, .line-bot-left, .line-bot-right {
|
.line-top-left, .line-top-right, .line-bot-left, .line-bot-right {
|
||||||
@@ -745,7 +745,9 @@ defineExpose({
|
|||||||
.add-branch-btn {
|
.add-branch-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
|
.el-button {
|
||||||
|
border-color: #000000;
|
||||||
|
}
|
||||||
.add-branch-btn-el {
|
.add-branch-btn-el {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-popover :visible="visible" placement="bottom-start" title="添加流程节点" width="350">
|
<el-popover :visible="visible" placement="bottom-start" title="添加流程节点" width="306">
|
||||||
<div class="node-select">
|
<div class="node-select">
|
||||||
<div @click="addApprovalNode">
|
<div @click="addApprovalNode">
|
||||||
<el-icon style="color:rgb(255, 148, 62);">
|
<el-icon style="color:rgb(255, 148, 62);">
|
||||||
@@ -39,18 +39,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="Plus" slot="reference" type="primary" @click="visible = !visible" size="small" circle></el-button>
|
<!-- <el-button :icon="Plus" slot="reference" type="primary" @click="visible = !visible" size="small"-->
|
||||||
|
<!-- circle></el-button>-->
|
||||||
|
<el-icon @click="visible = !visible" color="#fff" style="background-color:#2E7CF0;border-radius: 50%;cursor: pointer" ><Plus /></el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {Plus } from '@element-plus/icons-vue'
|
import {Plus, Clock, SetUp, Operation, Share, Promotion, Coordinate} from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const emit = defineEmits(['insertNode'])
|
const emit = defineEmits(['insertNode'])
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
document.addEventListener('click', nullBlockClick)
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* 点击空白处, 清除选项选中状态
|
||||||
|
*/
|
||||||
|
const nullBlockClick = (e) => {
|
||||||
|
if(!(e.target.tagName==='svg'||e.target.tagName==='path')){
|
||||||
|
disVisible()
|
||||||
|
}
|
||||||
|
}
|
||||||
const addApprovalNode = () => {
|
const addApprovalNode = () => {
|
||||||
emit('insertNode', "APPROVAL")
|
emit('insertNode', "APPROVAL")
|
||||||
disVisible()
|
disVisible()
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const assignedUser = computed(() => {
|
|||||||
|
|
||||||
const headerBgc = computed(() => {
|
const headerBgc = computed(() => {
|
||||||
if (props.mode === 'design' || props.mode === 'view') {
|
if (props.mode === 'design' || props.mode === 'view') {
|
||||||
return '#ff943e'
|
return '#F0A32E'
|
||||||
} else {
|
} else {
|
||||||
return props.config.props.headerBgc
|
return props.config.props.headerBgc
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import {Promotion} from '@element-plus/icons-vue'
|
|||||||
|
|
||||||
const headerBgc = computed(() => {
|
const headerBgc = computed(() => {
|
||||||
if (props.mode === 'design' || props.mode === 'view') {
|
if (props.mode === 'design' || props.mode === 'view') {
|
||||||
return '#3296fa'
|
return '#2EC2F0'
|
||||||
} else {
|
} else {
|
||||||
return props.config.props.headerBgc
|
return props.config.props.headerBgc
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const errorInfo = ref('')
|
|||||||
|
|
||||||
const headerBgc = computed(() => {
|
const headerBgc = computed(() => {
|
||||||
if (props.mode === 'design' || props.mode === 'view') {
|
if (props.mode === 'design' || props.mode === 'view') {
|
||||||
return '#f25643'
|
return '#F05D2E'
|
||||||
} else {
|
} else {
|
||||||
return props.config.props.headerBgc
|
return props.config.props.headerBgc
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,53 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="{'node': true, 'root': isRoot || !show, 'node-error-state': showError}">
|
<div :class="{'node': true, 'root': isRoot || !show, 'node-error-state': showError}">
|
||||||
<div v-if="show" @click="emit('selected')" :class="{'node-body': true, 'error': showError}">
|
<div v-if="show" @click="emit('selected')" :class="{'node-body': true, 'error': showError}">
|
||||||
<div class="node-body-header" :style="{'background-color': headerBgc}">
|
<div class="node-body-header" :style="{'background-color': headerBgc}">
|
||||||
<el-icon v-if="headerIcon" size="15">
|
<el-icon v-if="headerIcon" size="15">
|
||||||
<component :is="headerIcon"/>
|
<component :is="headerIcon"/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<ellipsis class="name" hover-tip :content="title"/>
|
<ellipsis class="name" hover-tip :content="title"/>
|
||||||
<el-icon v-if="!isRoot && designState" size="15" style="float:right;" @click="emit('delNode')">
|
<el-icon v-if="!isRoot && designState" size="15" style="float:right;" @click="emit('delNode')">
|
||||||
<Close/>
|
<Close/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
|
||||||
<div class="node-body-content">
|
|
||||||
<el-icon v-if="leftIcon">
|
|
||||||
<component :is="leftIcon"/>
|
|
||||||
</el-icon>
|
|
||||||
<template v-if="selectUser.show && mode === 'view'">
|
|
||||||
<div class="avatar_button">
|
|
||||||
<avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/>
|
|
||||||
<el-button type="primary" :icon="Plus" circle/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="showAvatar">
|
|
||||||
<span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span>
|
|
||||||
<avatar-ellipsis :row="3" :user-info="userInfo" v-else/>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<span class="placeholder" v-if="(content || '').trim() === ''">{{ placeholder }}</span>
|
|
||||||
<ellipsis :row="3" :content="content" v-else/>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div class="node-error" v-if="showError">
|
|
||||||
<el-tooltip effect="dark" :content="errorInfo" placement="top-start">
|
|
||||||
<el-icon><Warning /></el-icon>
|
|
||||||
</el-tooltip>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="node-body-content">
|
||||||
|
<el-icon v-if="leftIcon">
|
||||||
|
<component :is="leftIcon"/>
|
||||||
|
</el-icon>
|
||||||
|
<template v-if="selectUser.show && mode === 'view'">
|
||||||
|
<div class="avatar_button">
|
||||||
|
<avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/>
|
||||||
|
<el-button type="primary" :icon="Plus" circle/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="showAvatar">
|
||||||
|
<span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span>
|
||||||
|
<avatar-ellipsis :row="3" :user-info="userInfo" v-else/>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<span class="placeholder" v-if="(content || '').trim() === ''">{{ placeholder }}</span>
|
||||||
|
<ellipsis :row="3" :content="content" v-else/>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div class="node-error" v-if="showError">
|
||||||
|
<el-tooltip effect="dark" :content="errorInfo" placement="top-start">
|
||||||
|
<el-icon>
|
||||||
|
<Warning/>
|
||||||
|
</el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="node-footer">
|
<div class="node-footer">
|
||||||
<div v-if="merge" class="branch-merge">
|
<div v-if="merge" class="branch-merge">
|
||||||
<img data-v-1e7b1da5=""
|
<svg-icon name="fenzhi" :class-name="'fen-icon'"/>
|
||||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABXlJREFUeF7tmm2IVGUUx3/nLkQUqxmkpAVhSPUllZX8EEGhvVgZQWCU6wcpsqi2mXtnoaBwoqLCufeO9oJYUJQiFZWlZPQCfYiIXkylstTyS1oWWeYWCe6cuLsz7t3r3Ll3du6907oz35bnPM9z/r895zznmWeECf6RCa6fDoBOBExwAp0UmOAB0CmCnRTopECbCZi2nivK1CMD7FpXlH+ydqctKZBz9QyjwkqFG4HzfKK/0gpvl/ulmBWIzAHkVmlRDFY2EihwwLFkRhYQxgzAtHW2CpcBc4CpOsg26eK7yVPYVFwu/9ZzPufq2VLhQBxhAk85lvSF2Y5l/3prjQlAvqR3IjwJTKqz6DeGssQuyLfBsbyjz6PcFgeAZyOwzLFk/QnrjHH/RACYtj6ncHuUCDWYXs7Lz367XEn3inB+1NzauMLGsiW3+u1b2b9lAH22LuiCD2IJED5yTbmiZpt3dAbKT7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FB8uWPJakeG+t9AE4+jjK/XGLWtgTusBix5It4w5ArqRLRTjhl14IW40KD/kre66ki0R4p57IrgozS/2yb9wByDvqhbKX07Xv/oIavMfOP6pFb0pdgcqrbkFuTlp8JingbRIaBfEUHUOYltbtMPUaUNNo2rpeYWk8zSNWqvSmeSvMDIAnybT1boWnY0I4aigL7YJ4bXRqn0wBeCqG7gYVVqFcFapKWXt0gP5nizKQmvLqwpkDqAkaanmhB4MelOkI27XCDjHY7pqyN23htfXbBiArgVH7dABEETrZxzsRcLL/h6P0/Qc1qphfvB2K3wAAAABJRU5ErkJggg=="
|
<!-- <img data-v-1e7b1da5=""-->
|
||||||
alt="">
|
<!-- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABXlJREFUeF7tmm2IVGUUx3/nLkQUqxmkpAVhSPUllZX8EEGhvVgZQWCU6wcpsqi2mXtnoaBwoqLCufeO9oJYUJQiFZWlZPQCfYiIXkylstTyS1oWWeYWCe6cuLsz7t3r3Ll3du6907oz35bnPM9z/r895zznmWeECf6RCa6fDoBOBExwAp0UmOAB0CmCnRTopECbCZi2nivK1CMD7FpXlH+ydqctKZBz9QyjwkqFG4HzfKK/0gpvl/ulmBWIzAHkVmlRDFY2EihwwLFkRhYQxgzAtHW2CpcBc4CpOsg26eK7yVPYVFwu/9ZzPufq2VLhQBxhAk85lvSF2Y5l/3prjQlAvqR3IjwJTKqz6DeGssQuyLfBsbyjz6PcFgeAZyOwzLFk/QnrjHH/RACYtj6ncHuUCDWYXs7Lz367XEn3inB+1NzauMLGsiW3+u1b2b9lAH22LuiCD2IJED5yTbmiZpt3dAbKT7Hmjhjtdi25oPZnK/uH7dtUCpi2vqVwQ1wRWuHhWkW3StpTEb6IO3fIThhwTemuzWll/0QA5G39FTgrtghhs2vKELA7inra6d38HXvusOEnriWXHo+iFvZvGUDfap3VdYzdzQgIHmd5W7cBc2Ovoax1C3KXZ5/E/i3VgCQci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SvMDIAnybT1boWnY0I4aigL7YJ4bXRqn0wBeCqG7gYVVqFcFapKWXt0gP5nizKQmvLqwpkDqAkaanmhB4MelOkI27XCDjHY7pqyN23htfXbBiArgVH7dABEETrZxzsRcLL/h6P0/Qc1qphfvB2K3wAAAABJRU5ErkJggg=="-->
|
||||||
|
<!-- alt="">-->
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<insert-button v-if="designState" @insertNode="type => emit('insertNode', type)"/>
|
<insert-button v-if="designState" @insertNode="type => emit('insertNode', type)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <user-picker v-if="selectUser.show" title="请选择系统用户" :multiple="selectUser.multiple" ref="userPicker"-->
|
<!-- <user-picker v-if="selectUser.show" title="请选择系统用户" :multiple="selectUser.multiple" ref="userPicker"-->
|
||||||
<!-- :selected="_userInfo"-->
|
<!-- :selected="_userInfo"-->
|
||||||
<!-- @ok="selectedUser"/>-->
|
<!-- @ok="selectedUser"/>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -55,18 +58,19 @@
|
|||||||
import InsertButton from '../common/InsertButton.vue'
|
import InsertButton from '../common/InsertButton.vue'
|
||||||
import Ellipsis from '../common/Ellipsis.vue'
|
import Ellipsis from '../common/Ellipsis.vue'
|
||||||
import AvatarEllipsis from '../common/AvatarEllipsis.vue'
|
import AvatarEllipsis from '../common/AvatarEllipsis.vue'
|
||||||
import {defineProps,defineEmits} from "vue";
|
import SvgIcon from '@/components/svgIcon/index.vue'
|
||||||
|
import {Close, Warning, Plus} from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const emit = defineEmits(['insertNode'])
|
const emit = defineEmits(['insertNode'])
|
||||||
import {Close,Warning,Plus} from '@element-plus/icons-vue'
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
//是否为根节点
|
//是否为根节点
|
||||||
isRoot: {
|
isRoot: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
nodeId:{
|
nodeId: {
|
||||||
type:String,
|
type: String,
|
||||||
default:()=>{
|
default: () => {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -144,7 +148,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const designState = computed(()=>{
|
const designState = computed(() => {
|
||||||
return props.mode === 'design'
|
return props.mode === 'design'
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -165,7 +169,7 @@ const init = () => {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
init()
|
// init()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -185,15 +189,15 @@ init()
|
|||||||
&:before {
|
&:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -12px;
|
top: -9px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
-webkit-transform: translateX(-50%);
|
-webkit-transform: translateX(-50%);
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 0;
|
width: 0;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 8px 6px 4px;
|
border-width: 8px 6px 4px;
|
||||||
border-color: #CACACA transparent transparent;
|
border-color: #000000 transparent transparent;
|
||||||
background: #F5F5F7;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-body {
|
.node-body {
|
||||||
@@ -216,6 +220,7 @@ init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
.node-body-header {
|
.node-body-header {
|
||||||
|
text-align: center;
|
||||||
border-top-left-radius: 5px;
|
border-top-left-radius: 5px;
|
||||||
border-top-right-radius: 5px;
|
border-top-right-radius: 5px;
|
||||||
padding: 5px 15px;
|
padding: 5px 15px;
|
||||||
@@ -227,8 +232,8 @@ init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
height: 14px;
|
//height: 14px;
|
||||||
width: 150px;
|
//width: 150px;
|
||||||
display: inline-block
|
display: inline-block
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -243,6 +248,7 @@ init()
|
|||||||
display: flex;
|
display: flex;
|
||||||
//flex: 1;
|
//flex: 1;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<node title="发起人" :is-root="true" :mode="mode" :content="content" show-avatar :user-info="config.props.assignedUser"
|
<node title="发起人" :is-root="true" :mode="mode" :content="content" show-avatar :user-info="config.props.assignedUser"
|
||||||
@selected="emit('selected')" @insertNode="type => emit('insertNode', type)"
|
@selected="emit('selected')" @insertNode="type => emit('insertNode', type)"
|
||||||
placeholder="所有人" :header-bgc="config.props.headerBgc" :header-icon="UserFilled"/>
|
placeholder="所有人" :header-bgc="headerBgc" :header-icon="UserFilled"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Node from './Node.vue'
|
import Node from './Node.vue'
|
||||||
import {UserFilled} from '@element-plus/icons-vue'
|
import {UserFilled} from '@element-plus/icons-vue'
|
||||||
import {defineExpose, defineProps} from "vue";
|
import {computed, defineExpose, defineProps} from "vue";
|
||||||
const emit = defineEmits(['insertNode','selected'])
|
const emit = defineEmits(['insertNode','selected'])
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -34,6 +34,14 @@ const content = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const headerBgc = computed(() => {
|
||||||
|
if (props.mode === 'design' || props.mode === 'view') {
|
||||||
|
return '#2E7CF0'
|
||||||
|
} else {
|
||||||
|
return props.config.props.headerBgc
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
console.log("调用成功")
|
console.log("调用成功")
|
||||||
|
|||||||
@@ -31,12 +31,11 @@ const preview = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const headerBgc = computed(() => {
|
const headerBgc = computed(() => {
|
||||||
return '#47bc82'
|
if (props.mode === 'design' || props.mode === 'view') {
|
||||||
// if (preview || !viewer) {
|
return '#BE2EF0'
|
||||||
// return '#ff943e'
|
} else {
|
||||||
// } else {
|
return props.config.props.headerBgc
|
||||||
// return props.config.props.headerBgc
|
}
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
const content = computed(() => {
|
const content = computed(() => {
|
||||||
return '请设置触发器'
|
return '请设置触发器'
|
||||||
|
|||||||
@@ -69,21 +69,21 @@ export default defineConfig({
|
|||||||
strictPort: false,
|
strictPort: false,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api/admin': {
|
// '/api/admin': {
|
||||||
target: 'http://dev-mosr.frp.feashow.cn/',
|
// target: 'http://dev-mosr.frp.feashow.cn/',
|
||||||
// target: 'http://192.168.31.175:8000',
|
// // target: 'http://192.168.31.175:8000',
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '')
|
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
},
|
// },
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://mosr.feashow.cn',
|
target: 'http://mosr.feashow.cn',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
'/api/notice-ws': {
|
// '/api/notice-ws': {
|
||||||
target: 'ws://mosr.feashow.cn/api/notice-ws',
|
// target: 'ws://mosr.feashow.cn/api/notice-ws',
|
||||||
ws: true,
|
// ws: true,
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user