Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
work-order-web
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
张圳龙
work-order-web
Commits
82b4e9e0
Commit
82b4e9e0
authored
Oct 14, 2020
by
YuleiLan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 审批退回无法编辑。
parent
d4c4af3a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
17 deletions
+37
-17
GenerateForm.vue
src/components/VueFormMaking/components/GenerateForm.vue
+11
-5
GenerateFormItem.vue
src/components/VueFormMaking/components/GenerateFormItem.vue
+17
-12
handle.vue
src/views/process/list/handle.vue
+9
-0
No files found.
src/components/VueFormMaking/components/GenerateForm.vue
View file @
82b4e9e0
...
@@ -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
)
{
subformFields
[
l
.
model
]
=
""
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
]
=
""
}
}
}
}
}
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 @
82b4e9e0
...
@@ -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,11 +370,14 @@ export default {
...
@@ -368,11 +370,14 @@ export default {
models
:
{
models
:
{
deep
:
true
,
deep
:
true
,
handler
(
val
)
{
handler
(
val
)
{
if
(
this
.
subformIndex
===
undefined
)
{
if
(
val
.
status
===
undefined
&&
val
.
status
===
null
)
{
this
.
dataModel
=
val
[
this
.
widget
.
model
]
if
(
this
.
subformIndex
===
undefined
)
{
}
else
{
this
.
dataModel
=
val
[
this
.
widget
.
model
]
this
.
dataModel
=
val
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
]
}
else
{
this
.
dataModel
=
val
[
this
.
subformModel
][
this
.
subformIndex
][
this
.
widget
.
model
]
}
}
}
delete
this
.
models
.
status
}
}
}
}
},
},
...
...
src/views/process/list/handle.vue
View file @
82b4e9e0
...
@@ -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