Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-11-23 17:04:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f34988f5a41d0ab706fd61f25e1abb15f82438a7
f34988f5
1 parent
299c9ba0
点击节点类型判断显示内容,隐藏相关字段
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
build/docs.js
doc/App.vue
doc/selectUserView.vue
build/docs.js
View file @
f34988f
/*
* @Date: 2021-08-18 12:47:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-11-2
1 15:29:14
* @LastEditTime: 2023-11-2
3 16:22:12
* @FilePath: /vue-flow-editor/build/docs.js
* @Description: 文件描述
*/
...
...
@@ -9,7 +9,7 @@ const $utils = require('./build.utils')
module
.
exports
=
{
publicPath
:
'./'
,
outputDir
:
'
docs
'
,
outputDir
:
'
custom_flow
'
,
pages
:
{
index
:
{
entry
:
$utils
.
resolve
(
'doc/main.ts'
),
...
...
doc/App.vue
View file @
f34988f
...
...
@@ -93,7 +93,7 @@
</div>
<el-input v-model="state.node_name" />
</el-form-item>
<div class="node-user">
<div
v-if="state.user_attr_set"
class="node-user">
<div style="font-size: 14px; margin-bottom: 10px;">
节点负责人 <span style="color: red;">*</span>
</div>
...
...
@@ -109,7 +109,7 @@
<div v-else class="text-empty">请选择成员</div>
</div>
</div>
<el-form-item prop="attr">
<el-form-item
v-if="state.select_attr_set"
prop="attr">
<el-radio-group
v-model="state.attr_radio"
size="large"
...
...
@@ -458,6 +458,8 @@ export default {
activeName: 'node',
attr_radio: '基础属性',
main_attr_set: true,
user_attr_set: true,
select_attr_set: true,
more_attr_switch: false,
more_attr: [], // 更多属性
more_attr_data: {
...
...
@@ -501,6 +503,8 @@ export default {
// 修改完 URL 后,更新浏览器地址栏显示的 URL
window.history.replaceState(null, '', url.toString());
// TODO: 到时候测试iframe的时候,看看有没有影响
// window.parent.location.href = window.parent.location.href + '&mod_id=' + item.id + '&width=' + item.width + '&height=' + item.height + '&bg_img=' + encodeURIComponent(item.background) + '&type=edit';
}
/**
...
...
@@ -780,6 +784,18 @@ export default {
// 判断是否是流程节点
let model_id = model.id
if (model_id !== 'end-node') {
// 判断是否是开始节点, 不设置负责人
if (model_id ==='start-node') {
state.user_attr_set = false;
} else {
state.user_attr_set = true;
}
// 判断是否是抄送节点
if (model.control === 'cc') {
state.select_attr_set = false;
} else {
state.select_attr_set = true;
}
// TODO: 接口查询节点的属性
// 节点名称 state.node_name,节点负责人 state.userTags,基础属性 state.field_auths,更多属性 state.more_attr
console.warn('基础属性', state.field_auths);
...
...
@@ -981,7 +997,7 @@ export default {
});
return;
}
if (state.userTags.length === 0) {
if (state.
detailModel.id !== 'start-node' && state.
userTags.length === 0) {
ElMessage({
type: 'error',
message: '节点负责人不能为空',
...
...
@@ -1009,8 +1025,8 @@ export default {
axios.post('/admin/?a=save_node_property', qs.stringify({
flow_id: +flow_id,
node_code: state.detailModel.id,
// data: JSON.stringify({ name: state.node_name, user
s
: state.userTags, field_auths: state.field_auths, more_attr: state.more_attr })
data: JSON.stringify({ name: state.node_name, user
s
: state.userTags })
// data: JSON.stringify({ name: state.node_name, user: state.userTags, field_auths: state.field_auths, more_attr: state.more_attr })
data: JSON.stringify({ name: state.node_name, user: state.userTags })
}))
.then(res => {
if (res.data.code) {
...
...
doc/selectUserView.vue
View file @
f34988f
<!--
* @Date: 2023-11-01 10:18:53
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-11-23 16:0
0:07
* @LastEditTime: 2023-11-23 16:0
5:19
* @FilePath: /vue-flow-editor/doc/selectUserView.vue
* @Description: 成员列表选择控件
-->
...
...
@@ -64,7 +64,7 @@
v-model="search_input"
@input="onSearchInput"
class="search-btn-wrapper"
placeholder="
请输入关键字
"
placeholder="
可通过名称、手机号或邮箱查询
"
>
<template #prefix>
<el-icon class="el-input__icon"><search /></el-icon>
...
...
Please
register
or
login
to post a comment