|
@@ -46,15 +46,8 @@ const value = ref({})
|
|
|
const xmlString = ref('')
|
|
|
const skipConditionShow = ref(true)
|
|
|
|
|
|
-const props = withDefaults(
|
|
|
- defineProps<{
|
|
|
- modelValue: boolean
|
|
|
- disabled?: boolean
|
|
|
- }>(),
|
|
|
- {
|
|
|
- disabled: false
|
|
|
- }
|
|
|
-)
|
|
|
+const disabled = ref(false)
|
|
|
+const props = withDefaults(defineProps<{ modelValue: boolean }>(), {})
|
|
|
|
|
|
const computedModelValue = computed({
|
|
|
get() {
|
|
@@ -147,7 +140,7 @@ function initDndPanel() {
|
|
|
* 初始化控制面板
|
|
|
*/
|
|
|
function initControl() {
|
|
|
- if (!props.disabled) {
|
|
|
+ if (!disabled.value) {
|
|
|
// 控制面板-清空画布
|
|
|
lf.value.extension.control.addItem({
|
|
|
iconClass: 'lf-control-clear',
|
|
@@ -170,7 +163,7 @@ function initControl() {
|
|
|
let xmlString = logicFlowJsonToFlowXml(value.value)
|
|
|
saveXmlApi({ xmlString, id: definitionId.value }).then(() => {
|
|
|
ElMessage.success('保存成功')
|
|
|
- close()
|
|
|
+ visible.value = false
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -268,17 +261,9 @@ function initEvent() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-/** 关闭按钮 */
|
|
|
-function close() {
|
|
|
- const obj = {
|
|
|
- path: '/flow/definition',
|
|
|
- query: { t: Date.now(), pageNum: proxy.$route.query.pageNum }
|
|
|
- }
|
|
|
- visible.value = false
|
|
|
-}
|
|
|
-
|
|
|
-function open(id?: string) {
|
|
|
+function open(id?: string, openDisabled: boolean) {
|
|
|
visible.value = true
|
|
|
+ disabled.value = openDisabled
|
|
|
nextTick(() => {
|
|
|
use()
|
|
|
lf.value = new LogicFlow({ container: containerRef.value, grid: true })
|