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
6b19c939
Unverified
Commit
6b19c939
authored
Aug 27, 2020
by
lyl_task
Committed by
GitHub
Aug 27, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10 from lanyulei/dev
支持模版控制。
parents
a6e2af38
9c68b51e
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
297 additions
and
37 deletions
+297
-37
GenerateFormItem.vue
src/components/VueFormMaking/components/GenerateFormItem.vue
+17
-0
EndEventDetail.vue
src/components/wfd/components/DetailPanel/EndEventDetail.vue
+20
-1
HandleNodeDetail.vue
...omponents/wfd/components/DetailPanel/HandleNodeDetail.vue
+19
-1
NodeDetail.vue
src/components/wfd/components/DetailPanel/NodeDetail.vue
+87
-0
StartEventDetail.vue
...omponents/wfd/components/DetailPanel/StartEventDetail.vue
+19
-1
UserTaskDetail.vue
src/components/wfd/components/DetailPanel/UserTaskDetail.vue
+19
-1
index.vue
src/components/wfd/components/DetailPanel/index.vue
+45
-4
Wfd.vue
src/components/wfd/components/Wfd.vue
+10
-0
process-manager.vue
src/views/process/admin/process-manager.vue
+2
-0
create.vue
src/views/process/list/create.vue
+16
-7
handle.vue
src/views/process/list/handle.vue
+43
-22
No files found.
src/components/VueFormMaking/components/GenerateFormItem.vue
View file @
6b19c939
...
...
@@ -43,6 +43,23 @@
:allow-half=
"widget.options.allowHalf"
/>
</
template
>
<
template
v-else-if=
"widget.type === 'divider'"
>
<el-divider
:direction=
"widget.options.direction"
:content-position=
"widget.options.content_position"
>
<span
:style=
"
{
'font-size': widget.options.font_size,
'font-family': widget.options.font_family,
'font-weight': widget.options.font_weight,
'color': widget.options.font_color
}"
>
{{
widget
.
options
.
defaultValue
}}
</span>
</el-divider>
</
template
>
<
template
v-else
>
<div>
{{
dataModel
}}
...
...
src/components/wfd/components/DetailPanel/EndEventDetail.vue
View file @
6b19c939
...
...
@@ -17,15 +17,26 @@
<el-option
v-for=
"(taskValue, taskIndex) in tasks"
:key=
"taskIndex"
:label=
"taskValue.name"
:value=
"taskValue.full_name"
/>
</el-select>
</div>
<NodeDetail
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:templates=
"templates"
:templates-base=
"templatesBase"
:write-preview=
"false"
:readonly-preview=
"false"
/>
</div>
</div>
</
template
>
<
script
>
import
DefaultDetail
from
'./DefaultDetail'
import
NodeDetail
from
'./NodeDetail'
export
default
{
inject
:
[
'i18n'
],
components
:
{
DefaultDetail
DefaultDetail
,
NodeDetail
},
props
:
{
model
:
{
...
...
@@ -43,6 +54,14 @@ export default {
readOnly
:
{
type
:
Boolean
,
default
:
false
},
templates
:
{
type
:
Array
,
default
:
()
=>
([])
},
templatesBase
:
{
type
:
Array
,
default
:
()
=>
([])
}
}
}
...
...
src/components/wfd/components/DetailPanel/HandleNodeDetail.vue
View file @
6b19c939
...
...
@@ -106,15 +106,25 @@
:disabled=
"readOnly"
:value=
"!!model.isTaskOrder"
>
{{
i18n
[
'handleNode.taskOrder'
]
}}
</el-checkbox>
-->
</div>
<NodeDetail
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:templates=
"templates"
:templates-base=
"templatesBase"
:readonly-preview=
"false"
/>
</div>
</div>
</
template
>
<
script
>
import
DefaultDetail
from
'./DefaultDetail'
import
NodeDetail
from
'./NodeDetail'
export
default
{
inject
:
[
'i18n'
],
components
:
{
DefaultDetail
DefaultDetail
,
NodeDetail
},
props
:
{
model
:
{
...
...
@@ -144,6 +154,14 @@ export default {
readOnly
:
{
type
:
Boolean
,
default
:
false
},
templates
:
{
type
:
Array
,
default
:
()
=>
([])
},
templatesBase
:
{
type
:
Array
,
default
:
()
=>
([])
}
},
data
()
{
...
...
src/components/wfd/components/DetailPanel/NodeDetail.vue
0 → 100644
View file @
6b19c939
<
template
>
<div>
<div
v-if=
"writePreview"
class=
"panelRow"
>
<div>
可写模版:
</div>
<el-select
style=
"width:90%; font-size:12px"
placeholder=
"选择模版"
:disabled=
"readOnly"
:value=
"model.writeTpls"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) => onChange('writeTpls', e)"
>
<template
v-for=
"(templateValue, templateIndex) in templatesBase"
>
<el-option
v-if=
"templates.indexOf(templateValue.id) !== -1"
:key=
"templateIndex"
:label=
"templateValue.name"
:value=
"templateValue.id"
/>
</
template
>
</el-select>
</div>
<div
v-if=
"readonlyPreview"
class=
"panelRow"
>
<div>
只读模版:
</div>
<el-select
style=
"width:90%; font-size:12px"
placeholder=
"选择模版"
:disabled=
"readOnly"
:value=
"model.readonlyTpls"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) => onChange('readonlyTpls', e)"
>
<
template
v-for=
"(templateValue, templateIndex) in templatesBase"
>
<el-option
v-if=
"templates.indexOf(templateValue.id) !== -1"
:key=
"templateIndex"
:label=
"templateValue.name"
:value=
"templateValue.id"
/>
</
template
>
</el-select>
</div>
<div
class=
"panelRow"
>
<div>
隐藏模版:
</div>
<el-select
style=
"width:90%; font-size:12px"
placeholder=
"选择模版"
:disabled=
"readOnly"
:value=
"model.hideTpls"
:multiple=
"true"
:filterable=
"true"
@
change=
"(e) => onChange('hideTpls', e)"
>
<
template
v-for=
"(templateValue, templateIndex) in templatesBase"
>
<el-option
v-if=
"templates.indexOf(templateValue.id) !== -1"
:key=
"templateIndex"
:label=
"templateValue.name"
:value=
"templateValue.id"
/>
</
template
>
</el-select>
</div>
</div>
</template>
<
script
>
export
default
{
inject
:
[
'i18n'
],
props
:
{
model
:
{
type
:
Object
,
default
:
()
=>
({})
},
onChange
:
{
type
:
Function
,
default
:
()
=>
{}
},
readOnly
:
{
type
:
Boolean
,
default
:
false
},
templates
:
{
type
:
Array
,
default
:
()
=>
([])
},
templatesBase
:
{
type
:
Array
,
default
:
()
=>
([])
},
writePreview
:
{
type
:
Boolean
,
default
:
true
},
readonlyPreview
:
{
type
:
Boolean
,
default
:
true
}
}
}
</
script
>
src/components/wfd/components/DetailPanel/StartEventDetail.vue
View file @
6b19c939
...
...
@@ -17,15 +17,25 @@
<el-option
v-for=
"(taskValue, taskIndex) in tasks"
:key=
"taskIndex"
:label=
"taskValue.name"
:value=
"taskValue.full_name"
/>
</el-select>
</div>
<NodeDetail
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:templates=
"templates"
:templates-base=
"templatesBase"
:write-preview=
"false"
/>
</div>
</div>
</
template
>
<
script
>
import
DefaultDetail
from
'./DefaultDetail'
import
NodeDetail
from
'./NodeDetail'
export
default
{
inject
:
[
'i18n'
],
components
:
{
DefaultDetail
DefaultDetail
,
NodeDetail
},
props
:
{
model
:
{
...
...
@@ -43,6 +53,14 @@ export default {
readOnly
:
{
type
:
Boolean
,
default
:
false
},
templates
:
{
type
:
Array
,
default
:
()
=>
([])
},
templatesBase
:
{
type
:
Array
,
default
:
()
=>
([])
}
}
}
...
...
src/components/wfd/components/DetailPanel/UserTaskDetail.vue
View file @
6b19c939
...
...
@@ -97,15 +97,25 @@
:disabled=
"readOnly"
:value=
"!!model.isEndorsement"
>
{{
i18n
[
'userTask.endorsement'
]
}}
</el-checkbox>
-->
</div>
<NodeDetail
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:templates=
"templates"
:templates-base=
"templatesBase"
:readonly-preview=
"false"
/>
</div>
</div>
</
template
>
<
script
>
import
DefaultDetail
from
'./DefaultDetail'
import
NodeDetail
from
'./NodeDetail'
export
default
{
inject
:
[
'i18n'
],
components
:
{
DefaultDetail
DefaultDetail
,
NodeDetail
},
props
:
{
model
:
{
...
...
@@ -135,6 +145,14 @@ export default {
readOnly
:
{
type
:
Boolean
,
default
:
false
},
templates
:
{
type
:
Array
,
default
:
()
=>
([])
},
templatesBase
:
{
type
:
Array
,
default
:
()
=>
([])
}
},
data
()
{
...
...
src/components/wfd/components/DetailPanel/index.vue
View file @
6b19c939
...
...
@@ -9,6 +9,8 @@
:groups=
"groups"
:departments=
"departments"
:tasks=
"tasks"
:templates=
"templates"
:templates-base=
"templatesBase"
/>
<ScriptTaskDetail
v-else-if=
"model.clazz === 'scriptTask'"
...
...
@@ -26,11 +28,42 @@
:groups=
"groups"
:departments=
"departments"
:tasks=
"tasks"
:templates=
"templates"
:templates-base=
"templatesBase"
/>
<GatewayDetail
v-else-if=
"model.clazz === 'gateway' ||
model.clazz === 'exclusiveGateway' ||
model.clazz === 'parallelGateway' ||
model.clazz === 'inclusiveGateway'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
/>
<StartEventDetail
v-else-if=
"model.clazz === 'start'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:tasks=
"tasks"
:templates=
"templates"
:templates-base=
"templatesBase"
/>
<EndEventDetail
v-else-if=
"model.clazz === 'end'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:tasks=
"tasks"
:templates=
"templates"
:templates-base=
"templatesBase"
/>
<FlowDetail
v-else-if=
"model.clazz === 'flow'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
/>
<GatewayDetail
v-else-if=
"model.clazz === 'gateway' || model.clazz === 'exclusiveGateway' || model.clazz === 'parallelGateway' || model.clazz === 'inclusiveGateway'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
/>
<StartEventDetail
v-else-if=
"model.clazz === 'start'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:tasks=
"tasks"
/>
<EndEventDetail
v-else-if=
"model.clazz === 'end'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
:tasks=
"tasks"
/>
<FlowDetail
v-else-if=
"model.clazz === 'flow'"
:model=
"model"
:on-change=
"onChange"
:read-only=
"readOnly"
/>
</div>
</
template
>
<
script
>
...
...
@@ -92,6 +125,14 @@ export default {
tasks
:
{
type
:
Array
,
default
:
()
=>
([])
},
templates
:
{
type
:
Array
,
default
:
()
=>
([])
},
templatesBase
:
{
type
:
Array
,
default
:
()
=>
([])
}
}
}
...
...
src/components/wfd/components/Wfd.vue
View file @
6b19c939
...
...
@@ -14,6 +14,8 @@
:groups=
"groups"
:departments=
"departments"
:tasks=
"tasks"
:templates=
"templates"
:templates-base=
"templatesBase"
:signal-defs=
"processModel.signalDefs"
:message-defs=
"processModel.messageDefs"
:on-change=
"(key,val)=>
{onItemCfgChange(key,val)}"
...
...
@@ -89,6 +91,14 @@ export default {
tasks
:
{
type
:
Array
,
default
:
()
=>
([])
},
templates
:
{
type
:
Array
,
default
:
()
=>
([])
},
templatesBase
:
{
type
:
Array
,
default
:
()
=>
([])
}
},
data
()
{
...
...
src/views/process/admin/process-manager.vue
View file @
6b19c939
...
...
@@ -146,6 +146,8 @@
:users=
"users"
:departments=
"departments"
:tasks=
"taskListData"
:templates=
"ruleForm.tpls"
:templates-base=
"templates"
:data=
"ruleForm.structure"
:height=
"600"
:lang=
"lang"
...
...
src/views/process/list/create.vue
View file @
6b19c939
...
...
@@ -41,13 +41,20 @@
<span>
表单信息
</span>
</div>
<div
class=
"text item"
>
<
template
v-for=
"(tplItem, tplIndex) in processStructureValue.tpls"
>
<fm-generate-form
v-for=
"(tplItem, tplIndex) in processStructureValue.tpls"
v-show=
"currentNode.hideTpls===undefined ||
currentNode.hideTpls===null ||
currentNode.hideTpls.indexOf(tplItem.id)===-1"
:key=
"tplIndex"
:ref=
"'generateForm-'+tplItem.id"
:remote=
"remoteFunc"
:data=
"tplItem.form_structure"
:disabled=
"currentNode.readonlyTpls===undefined ||
currentNode.readonlyTpls===null ||
currentNode.readonlyTpls.indexOf(tplItem.id)===-1?false:true"
/>
</
template
>
</div>
<hr
style=
"background-color: #d9d9d9; border:0; height:1px;"
>
<div
class=
"text item"
style=
"text-align: center;margin-top:18px"
>
...
...
@@ -132,6 +139,7 @@ export default {
processId
:
this
.
$route
.
query
.
processId
}).
then
(
response
=>
{
this
.
processStructureValue
=
response
.
data
this
.
currentNode
=
this
.
processStructureValue
.
nodes
[
0
]
})
},
submitAction
(
target
)
{
...
...
@@ -174,6 +182,7 @@ export default {
var
promiseList
=
[]
for
(
var
tpl
of
this
.
processStructureValue
.
tpls
)
{
tpl
.
form_structure
.
id
=
tpl
.
id
this
.
ruleForm
.
tpls
.
form_structure
.
push
(
tpl
.
form_structure
)
promiseList
.
push
(
this
.
$refs
[
'generateForm-'
+
tpl
.
id
][
0
].
getData
())
}
...
...
src/views/process/list/handle.vue
View file @
6b19c939
...
...
@@ -60,16 +60,21 @@
<span>
表单信息
</span>
</div>
<div
class=
"text item"
>
<
template
v-for=
"(tplItem, tplIndex) in processStructureValue.tpls"
>
<fm-generate-form
v-for=
"(tplItem, tplIndex) in processStructureValue.tpls"
v-show=
"currentNode.hideTpls===undefined ||
currentNode.hideTpls===null ||
currentNode.hideTpls.indexOf(tplItem.id)===-1"
:key=
"tplIndex"
:ref=
"'generateForm-'+tplItem.id"
:preview=
"true"
:preview=
"currentNode.writeTpls===undefined ||
currentNode.writeTpls===null ||
currentNode.writeTpls.indexOf(tplItem.form_structure.id)===-1?true:false"
:remote=
"remoteFunc"
:value=
"tplItem.form_data"
:data=
"tplItem.form_structure"
:disabled=
"true"
/>
</
template
>
</div>
<div
v-if=
"processStructureValue.userAuthority"
>
<hr
style=
"background-color: #d9d9d9; border:0; height:1px; margin-bottom: 15px"
>
...
...
@@ -151,6 +156,7 @@ import { listUser } from '@/api/system/sysuser'
export
default
{
data
()
{
return
{
tpls
:
[],
remarks
:
''
,
// 备注信息
alertMessage
:
''
,
nodeStepList
:
[],
...
...
@@ -206,6 +212,7 @@ export default {
if
(
i
+
1
===
this
.
processStructureValue
.
nodes
.
length
)
{
this
.
activeIndex
=
this
.
nodeStepList
.
length
}
this
.
currentNode
=
this
.
processStructureValue
.
nodes
[
i
]
}
else
if
(
!
this
.
processStructureValue
.
nodes
[
i
].
isHideNode
)
{
// 非隐藏节点
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
...
...
@@ -215,6 +222,18 @@ export default {
})
},
submitAction
(
item
)
{
var
promiseList
=
[]
for
(
var
tpl
of
this
.
processStructureValue
.
tpls
)
{
this
.
tpls
.
push
({
tplDataId
:
tpl
.
id
})
promiseList
.
push
(
this
.
$refs
[
'generateForm-'
+
tpl
.
id
][
0
].
getData
())
}
Promise
.
all
(
promiseList
).
then
(
values
=>
{
for
(
var
tplDataIndex
in
this
.
tpls
)
{
this
.
tpls
[
tplDataIndex
].
tplValue
=
values
[
tplDataIndex
]
}
console
.
log
(
this
.
tpls
)
handleWorkOrder
({
tasks
:
this
.
processStructureValue
.
process
.
task
,
source_state
:
this
.
processStructureValue
.
workOrder
.
current_state
,
...
...
@@ -222,7 +241,8 @@ export default {
circulation
:
item
.
label
,
flow_properties
:
item
.
flowProperties
===
undefined
?
2
:
parseInt
(
item
.
flowProperties
),
work_order_id
:
parseInt
(
this
.
$route
.
query
.
workOrderId
),
remarks
:
this
.
remarks
remarks
:
this
.
remarks
,
tpls
:
this
.
tpls
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
// this.$router.push({ name: 'upcoming' })
...
...
@@ -230,6 +250,7 @@ export default {
this
.
getProcessNodeList
()
}
})
})
},
// 获取提示消息
getAlertMessage
()
{
...
...
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