hookehuyr

fix

Showing 1 changed file with 49 additions and 39 deletions
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
93 <span class="name">节点名称</span> 93 <span class="name">节点名称</span>
94 <span class="node-index"> 节点索引:{{ state.node_idx }} </span> 94 <span class="node-index"> 节点索引:{{ state.node_idx }} </span>
95 </div> 95 </div>
96 - <el-input v-model="state.node_name" style="margin-top: 5px;" /> 96 + <el-input v-model="state.node_name" @input="handleNodeNameChange" style="margin-top: 5px;" />
97 </el-form-item> 97 </el-form-item>
98 <div v-if="state.user_attr_set" class="node-user"> 98 <div v-if="state.user_attr_set" class="node-user">
99 <div class="name">节点负责人</div> 99 <div class="name">节点负责人</div>
...@@ -1114,6 +1114,11 @@ export default { ...@@ -1114,6 +1114,11 @@ export default {
1114 } 1114 }
1115 /******************* END *******************/ 1115 /******************* END *******************/
1116 1116
1117 + const handleNodeNameChange = (val) => {
1118 + state.detailModel.text = val; // 更新节点名称显示
1119 + editor.updateModel(state.detailModel); // 更新流程图信息
1120 + }
1121 +
1117 /***************** 用户选择控件弹框 ****************/ 1122 /***************** 用户选择控件弹框 ****************/
1118 1123
1119 /** 1124 /**
...@@ -1373,24 +1378,25 @@ export default { ...@@ -1373,24 +1378,25 @@ export default {
1373 * 1378 *
1374 */ 1379 */
1375 function cancel() { 1380 function cancel() {
1376 - if (!checkFormEdited()) { 1381 + // if (!checkFormEdited()) {
1377 - ElMessageBox.confirm( 1382 + // ElMessageBox.confirm(
1378 - '您刚才修改过表单内容还未保存,是否离开?', 1383 + // '您刚才修改过表单内容还未保存,是否离开?',
1379 - '温馨提示', 1384 + // '温馨提示',
1380 - { 1385 + // {
1381 - confirmButtonText: '离开', 1386 + // confirmButtonText: '离开',
1382 - cancelButtonText: '取消', 1387 + // cancelButtonText: '取消',
1383 - type: 'warning', 1388 + // type: 'warning',
1384 - } 1389 + // }
1385 - ) 1390 + // )
1386 - .then(() => { 1391 + // .then(() => {
1387 - editor.closeModel() 1392 + // editor.closeModel()
1388 - }) 1393 + // })
1389 - .catch(() => { 1394 + // .catch(() => {
1390 - }) 1395 + // })
1391 - } else { 1396 + // } else {
1392 - editor.closeModel() 1397 + // editor.closeModel()
1393 - } 1398 + // }
1399 + editor.closeModel()
1394 } 1400 }
1395 1401
1396 /** 1402 /**
...@@ -1630,26 +1636,28 @@ export default { ...@@ -1630,26 +1636,28 @@ export default {
1630 } 1636 }
1631 1637
1632 function onClickCanvas(e: myEvent) { 1638 function onClickCanvas(e: myEvent) {
1633 - if (!checkFormEdited() && state.detailModel) { 1639 + // if (!checkFormEdited() && state.detailModel) {
1634 - ElMessageBox.confirm( 1640 + // ElMessageBox.confirm(
1635 - '您刚才修改过表单内容还未保存,是否离开?', 1641 + // '您刚才修改过表单内容还未保存,是否离开?',
1636 - '温馨提示', 1642 + // '温馨提示',
1637 - { 1643 + // {
1638 - confirmButtonText: '离开', 1644 + // confirmButtonText: '离开',
1639 - cancelButtonText: '取消', 1645 + // cancelButtonText: '取消',
1640 - type: 'warning', 1646 + // type: 'warning',
1641 - } 1647 + // }
1642 - ) 1648 + // )
1643 - .then(() => { 1649 + // .then(() => {
1644 - state.detailModel = null; 1650 + // state.detailModel = null;
1645 - editor.closeModel() 1651 + // editor.closeModel()
1646 - }) 1652 + // })
1647 - .catch(() => { 1653 + // .catch(() => {
1648 - }) 1654 + // })
1649 - } else { 1655 + // } else {
1650 - state.detailModel = null; 1656 + // state.detailModel = null;
1651 - editor.closeModel() 1657 + // editor.closeModel()
1652 - } 1658 + // }
1659 + state.detailModel = null;
1660 + editor.closeModel()
1653 } 1661 }
1654 1662
1655 const checkFormEdited = () => { // 检查表单是否修改过内容 1663 const checkFormEdited = () => { // 检查表单是否修改过内容
...@@ -1871,6 +1879,8 @@ export default { ...@@ -1871,6 +1879,8 @@ export default {
1871 onAuthAllEditChange, 1879 onAuthAllEditChange,
1872 onSearchAuthInput, 1880 onSearchAuthInput,
1873 1881
1882 + handleNodeNameChange,
1883 +
1874 openUserForm, 1884 openUserForm,
1875 onCloseUserView, 1885 onCloseUserView,
1876 onConfirmUserView, 1886 onConfirmUserView,
......