Showing
3 changed files
with
25 additions
and
9 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2021-08-18 12:47:05 | 2 | * @Date: 2021-08-18 12:47:05 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-11-21 15:29:14 | 4 | + * @LastEditTime: 2023-11-23 16:22:12 |
| 5 | * @FilePath: /vue-flow-editor/build/docs.js | 5 | * @FilePath: /vue-flow-editor/build/docs.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -9,7 +9,7 @@ const $utils = require('./build.utils') | ... | @@ -9,7 +9,7 @@ const $utils = require('./build.utils') |
| 9 | 9 | ||
| 10 | module.exports = { | 10 | module.exports = { |
| 11 | publicPath: './', | 11 | publicPath: './', |
| 12 | - outputDir: 'docs', | 12 | + outputDir: 'custom_flow', |
| 13 | pages: { | 13 | pages: { |
| 14 | index: { | 14 | index: { |
| 15 | entry: $utils.resolve('doc/main.ts'), | 15 | entry: $utils.resolve('doc/main.ts'), | ... | ... |
| ... | @@ -93,7 +93,7 @@ | ... | @@ -93,7 +93,7 @@ |
| 93 | </div> | 93 | </div> |
| 94 | <el-input v-model="state.node_name" /> | 94 | <el-input v-model="state.node_name" /> |
| 95 | </el-form-item> | 95 | </el-form-item> |
| 96 | - <div class="node-user"> | 96 | + <div v-if="state.user_attr_set" class="node-user"> |
| 97 | <div style="font-size: 14px; margin-bottom: 10px;"> | 97 | <div style="font-size: 14px; margin-bottom: 10px;"> |
| 98 | 节点负责人 <span style="color: red;">*</span> | 98 | 节点负责人 <span style="color: red;">*</span> |
| 99 | </div> | 99 | </div> |
| ... | @@ -109,7 +109,7 @@ | ... | @@ -109,7 +109,7 @@ |
| 109 | <div v-else class="text-empty">请选择成员</div> | 109 | <div v-else class="text-empty">请选择成员</div> |
| 110 | </div> | 110 | </div> |
| 111 | </div> | 111 | </div> |
| 112 | - <el-form-item prop="attr"> | 112 | + <el-form-item v-if="state.select_attr_set" prop="attr"> |
| 113 | <el-radio-group | 113 | <el-radio-group |
| 114 | v-model="state.attr_radio" | 114 | v-model="state.attr_radio" |
| 115 | size="large" | 115 | size="large" |
| ... | @@ -458,6 +458,8 @@ export default { | ... | @@ -458,6 +458,8 @@ export default { |
| 458 | activeName: 'node', | 458 | activeName: 'node', |
| 459 | attr_radio: '基础属性', | 459 | attr_radio: '基础属性', |
| 460 | main_attr_set: true, | 460 | main_attr_set: true, |
| 461 | + user_attr_set: true, | ||
| 462 | + select_attr_set: true, | ||
| 461 | more_attr_switch: false, | 463 | more_attr_switch: false, |
| 462 | more_attr: [], // 更多属性 | 464 | more_attr: [], // 更多属性 |
| 463 | more_attr_data: { | 465 | more_attr_data: { |
| ... | @@ -501,6 +503,8 @@ export default { | ... | @@ -501,6 +503,8 @@ export default { |
| 501 | 503 | ||
| 502 | // 修改完 URL 后,更新浏览器地址栏显示的 URL | 504 | // 修改完 URL 后,更新浏览器地址栏显示的 URL |
| 503 | window.history.replaceState(null, '', url.toString()); | 505 | window.history.replaceState(null, '', url.toString()); |
| 506 | + // TODO: 到时候测试iframe的时候,看看有没有影响 | ||
| 507 | + // 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'; | ||
| 504 | } | 508 | } |
| 505 | 509 | ||
| 506 | /** | 510 | /** |
| ... | @@ -780,6 +784,18 @@ export default { | ... | @@ -780,6 +784,18 @@ export default { |
| 780 | // 判断是否是流程节点 | 784 | // 判断是否是流程节点 |
| 781 | let model_id = model.id | 785 | let model_id = model.id |
| 782 | if (model_id !== 'end-node') { | 786 | if (model_id !== 'end-node') { |
| 787 | + // 判断是否是开始节点, 不设置负责人 | ||
| 788 | + if (model_id ==='start-node') { | ||
| 789 | + state.user_attr_set = false; | ||
| 790 | + } else { | ||
| 791 | + state.user_attr_set = true; | ||
| 792 | + } | ||
| 793 | + // 判断是否是抄送节点 | ||
| 794 | + if (model.control === 'cc') { | ||
| 795 | + state.select_attr_set = false; | ||
| 796 | + } else { | ||
| 797 | + state.select_attr_set = true; | ||
| 798 | + } | ||
| 783 | // TODO: 接口查询节点的属性 | 799 | // TODO: 接口查询节点的属性 |
| 784 | // 节点名称 state.node_name,节点负责人 state.userTags,基础属性 state.field_auths,更多属性 state.more_attr | 800 | // 节点名称 state.node_name,节点负责人 state.userTags,基础属性 state.field_auths,更多属性 state.more_attr |
| 785 | console.warn('基础属性', state.field_auths); | 801 | console.warn('基础属性', state.field_auths); |
| ... | @@ -981,7 +997,7 @@ export default { | ... | @@ -981,7 +997,7 @@ export default { |
| 981 | }); | 997 | }); |
| 982 | return; | 998 | return; |
| 983 | } | 999 | } |
| 984 | - if (state.userTags.length === 0) { | 1000 | + if (state.detailModel.id !== 'start-node' && state.userTags.length === 0) { |
| 985 | ElMessage({ | 1001 | ElMessage({ |
| 986 | type: 'error', | 1002 | type: 'error', |
| 987 | message: '节点负责人不能为空', | 1003 | message: '节点负责人不能为空', |
| ... | @@ -1009,8 +1025,8 @@ export default { | ... | @@ -1009,8 +1025,8 @@ export default { |
| 1009 | axios.post('/admin/?a=save_node_property', qs.stringify({ | 1025 | axios.post('/admin/?a=save_node_property', qs.stringify({ |
| 1010 | flow_id: +flow_id, | 1026 | flow_id: +flow_id, |
| 1011 | node_code: state.detailModel.id, | 1027 | node_code: state.detailModel.id, |
| 1012 | - // data: JSON.stringify({ name: state.node_name, users: state.userTags, field_auths: state.field_auths, more_attr: state.more_attr }) | 1028 | + // data: JSON.stringify({ name: state.node_name, user: state.userTags, field_auths: state.field_auths, more_attr: state.more_attr }) |
| 1013 | - data: JSON.stringify({ name: state.node_name, users: state.userTags }) | 1029 | + data: JSON.stringify({ name: state.node_name, user: state.userTags }) |
| 1014 | })) | 1030 | })) |
| 1015 | .then(res => { | 1031 | .then(res => { |
| 1016 | if (res.data.code) { | 1032 | if (res.data.code) { | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-11-01 10:18:53 | 2 | * @Date: 2023-11-01 10:18:53 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-11-23 16:00:07 | 4 | + * @LastEditTime: 2023-11-23 16:05:19 |
| 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue | 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue |
| 6 | * @Description: 成员列表选择控件 | 6 | * @Description: 成员列表选择控件 |
| 7 | --> | 7 | --> |
| ... | @@ -64,7 +64,7 @@ | ... | @@ -64,7 +64,7 @@ |
| 64 | v-model="search_input" | 64 | v-model="search_input" |
| 65 | @input="onSearchInput" | 65 | @input="onSearchInput" |
| 66 | class="search-btn-wrapper" | 66 | class="search-btn-wrapper" |
| 67 | - placeholder="请输入关键字" | 67 | + placeholder="可通过名称、手机号或邮箱查询" |
| 68 | > | 68 | > |
| 69 | <template #prefix> | 69 | <template #prefix> |
| 70 | <el-icon class="el-input__icon"><search /></el-icon> | 70 | <el-icon class="el-input__icon"><search /></el-icon> | ... | ... |
-
Please register or login to post a comment