Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Chatopera OpenSource
/
ferry_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
01dad1c5
authored
Oct 14, 2020
by
lanyulei
Committed by
GitHub
Oct 14, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #40 from lanyulei/dev
fix: 审批退回无法编辑。
parents
d4c4af3a
82b4e9e0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
12 deletions
src/components/VueFormMaking/components/GenerateForm.vue
src/components/VueFormMaking/components/GenerateFormItem.vue
src/views/process/list/handle.vue
src/components/VueFormMaking/components/GenerateForm.vue
View file @
01dad1c5
...
@@ -66,10 +66,10 @@
...
@@ -66,10 +66,10 @@
width=
"50"
width=
"50"
>
>
<template
slot=
"header"
>
<template
slot=
"header"
>
<i
style=
"font-size: 25px; color: #409EFF;cursor:pointer;"
class=
"el-icon-circle-plus"
@
click=
"addCol(item)"
/>
<i
style=
"font-size: 25px; color: #409EFF;cursor:pointer;"
class=
"el-icon-circle-plus"
@
click=
"add
Subform
Col(item)"
/>
</
template
>
</
template
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<i
style=
"font-size: 25px; color: red"
class=
"el-icon-remove"
@
click=
"delCol(item, scope.$index)"
/>
<i
style=
"font-size: 25px; color: red"
class=
"el-icon-remove"
@
click=
"del
Subform
Col(item, scope.$index)"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -160,17 +160,23 @@ export default {
...
@@ -160,17 +160,23 @@ export default {
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
addCol
(
item
)
{
add
Subform
Col
(
item
)
{
var
subformFields
=
{}
var
subformFields
=
{}
for
(
var
c
of
item
.
columns
)
{
for
(
var
c
of
item
.
columns
)
{
for
(
var
l
of
c
.
list
)
{
for
(
var
l
of
c
.
list
)
{
if
(
l
.
options
!==
null
&&
l
.
options
!==
undefined
)
{
subformFields
[
l
.
model
]
=
l
.
options
.
defaultValue
!==
undefined
&&
l
.
options
.
defaultValue
!==
null
?
l
.
options
.
defaultValue
:
""
}
else
{
subformFields
[
l
.
model
]
=
""
subformFields
[
l
.
model
]
=
""
}
}
}
}
}
this
.
models
[
item
.
model
].
push
(
subformFields
)
this
.
models
[
item
.
model
].
push
(
subformFields
)
this
.
models
.
status
=
1
},
},
delCol
(
item
,
index
)
{
del
Subform
Col
(
item
,
index
)
{
this
.
models
[
item
.
model
].
splice
(
index
,
1
)
this
.
models
[
item
.
model
].
splice
(
index
,
1
)
this
.
models
.
status
=
-
1
},
},
generateModle
(
genList
)
{
generateModle
(
genList
)
{
for
(
let
i
=
0
;
i
<
genList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
genList
.
length
;
i
++
)
{
...
...
src/components/VueFormMaking/components/GenerateFormItem.vue
View file @
01dad1c5
...
@@ -338,29 +338,31 @@ export default {
...
@@ -338,29 +338,31 @@ export default {
data
()
{
data
()
{
return
{
return
{
widgetLabelWidth
:
''
,
widgetLabelWidth
:
''
,
dataModel
:
this
.
subformIndex
===
undefined
?
this
.
models
[
this
.
widget
.
model
]:
this
.
models
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
],
dataModel
:
this
.
subformIndex
===
undefined
?
this
.
models
[
this
.
widget
.
model
]:
this
.
models
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
],
tableData
:
[]
tableData
:
[]
}
}
},
},
watch
:
{
watch
:
{
dataModel
:
{
dataModel
:
{
deep
:
true
,
deep
:
true
,
handler
(
val
)
{
handler
(
newValue
)
{
if
(
val
!==
undefined
)
{
if
(
newValue
!==
undefined
&&
newValue
!==
null
)
{
if
(
this
.
subformIndex
!==
undefined
)
{
if
(
this
.
subformIndex
!==
undefined
)
{
this
.
models
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
]
=
val
this
.
models
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
]
=
newValue
this
.
$emit
(
'update:models'
,
{
this
.
$emit
(
'update:models'
,
{
...
this
.
models
,
...
this
.
models
,
[
this
.
subformModel
]:
this
.
models
[
this
.
subformModel
]
[
this
.
subformModel
]:
this
.
models
[
this
.
subformModel
]
})
})
this
.
$emit
(
'input-change'
,
val
,
this
.
widget
.
model
,
this
.
subformIndex
)
//
this.$emit('input-change', val, this.widget.model, this.subformIndex)
}
else
{
}
else
{
this
.
models
[
this
.
widget
.
model
]
=
val
this
.
models
[
this
.
widget
.
model
]
=
newValue
this
.
$emit
(
'update:models'
,
{
this
.
$emit
(
'update:models'
,
{
...
this
.
models
,
...
this
.
models
,
[
this
.
widget
.
model
]:
val
[
this
.
widget
.
model
]:
newValue
})
})
this
.
$emit
(
'input-change'
,
val
,
this
.
widget
.
model
)
//
this.$emit('input-change', val, this.widget.model)
}
}
}
}
}
}
...
@@ -368,12 +370,15 @@ export default {
...
@@ -368,12 +370,15 @@ export default {
models
:
{
models
:
{
deep
:
true
,
deep
:
true
,
handler
(
val
)
{
handler
(
val
)
{
if
(
val
.
status
===
undefined
&&
val
.
status
===
null
)
{
if
(
this
.
subformIndex
===
undefined
)
{
if
(
this
.
subformIndex
===
undefined
)
{
this
.
dataModel
=
val
[
this
.
widget
.
model
]
this
.
dataModel
=
val
[
this
.
widget
.
model
]
}
else
{
}
else
{
this
.
dataModel
=
val
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
]
this
.
dataModel
=
val
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
]
}
}
}
}
delete
this
.
models
.
status
}
}
}
},
},
created
()
{
created
()
{
...
...
src/views/process/list/handle.vue
View file @
01dad1c5
...
@@ -240,11 +240,20 @@ export default {
...
@@ -240,11 +240,20 @@ export default {
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
}
}
}
}
// 如果回退到初始节点则可编辑。
if
(
this
.
activeIndex
===
0
&&
this
.
currentNode
.
clazz
===
'start'
)
{
this
.
currentNode
.
writeTpls
=
[]
for
(
var
tplTmp
of
this
.
processStructureValue
.
tpls
)
{
this
.
currentNode
.
writeTpls
.
push
(
tplTmp
.
form_structure
.
id
)
}
}
this
.
getAlertMessage
()
this
.
getAlertMessage
()
})
})
},
},
submitAction
(
item
)
{
submitAction
(
item
)
{
var
promiseList
=
[]
var
promiseList
=
[]
this
.
tpls
=
[]
for
(
var
tpl
of
this
.
processStructureValue
.
tpls
)
{
for
(
var
tpl
of
this
.
processStructureValue
.
tpls
)
{
this
.
tpls
.
push
({
this
.
tpls
.
push
({
tplDataId
:
tpl
.
id
,
tplDataId
:
tpl
.
id
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment