Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
flowable-engine-fontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王万里
flowable-engine-fontend
Commits
e7677e0d
Commit
e7677e0d
authored
May 25, 2021
by
王万里
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: extraForm
parent
85ba30d5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
156 additions
and
67 deletions
+156
-67
properties-default-controllers.js
editor-app/configuration/properties-default-controllers.js
+24
-55
extra-form-read-config.html
...-app/configuration/properties/extra-form-read-config.html
+14
-0
extra-form-write-config.html
...app/configuration/properties/extra-form-write-config.html
+14
-0
editor.html
editor-app/editor.html
+10
-4
stencil-controller.js
editor-app/stencil-controller.js
+94
-8
No files found.
editor-app/configuration/properties-default-controllers.js
View file @
e7677e0d
...
...
@@ -138,7 +138,6 @@ angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$root
if
(
nodeIdParams
&&
shareformKey
)
{
$http
.
get
(
FLOWABLE
.
APP_URL
.
GetColumnConfig
(
nodeIdParams
,
shareformKey
))
.
success
((
res
)
=>
{
// console.log("进入。。。。。。。。。。///////////")
if
(
res
.
FieldConfigList
&&
res
.
FieldConfigList
.
length
>
0
)
{
res
.
FieldConfigList
.
forEach
((
item
)
=>
{
$scope
.
property
.
properties
.
forEach
((
pItem
)
=>
{
...
...
@@ -150,14 +149,8 @@ angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$root
}
})
})
// $rootScope.curField = $scope.property
// $scope.childFieldObj = $rootScope.curField
schemaListObj
=
$scope
.
property
// console.log(schemaListObj, "schemaListObj......schemaListObj.......")
$scope
.
childFieldObj
=
schemaListObj
}
else
{
...
...
@@ -170,54 +163,6 @@ angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$root
}
})
}
// if ($rootScope.currentReadResourceId) {
// $http.get(FLOWABLE.APP_URL.GetColumnConfig($rootScope.currentReadResourceId, shareformKey))
// .success((res)=>{
// if (res.FieldConfigList && res.FieldConfigList.length > 0) {
// res.FieldConfigList.forEach((item)=>{
// $scope.property.properties.forEach((pItem)=>{
// if (item.FieldCode === pItem.key) {
// pItem.defaultUnit = item.Unit
// pItem.defaultValue = item.Type
// pItem.defaultChecked = item.IsShow === "1" ? true : false
// }
// })
// })
// $rootScope.curField = $scope.property
// $scope.childFieldObj = $rootScope.curField
// console.log($scope.childFieldObj, "$scope.childFieldObj......$scope.childFieldObj.......")
// } else {
// $scope.property.properties.forEach(el => {
// el.defaultValue = ""
// el.defaultChecked = true
// el.defaultUnit = ""
// });
// }
// })
// } else {
// $scope.property.properties.forEach(el => {
// el.defaultValue = ""
// el.defaultChecked = true
// el.defaultUnit = ""
// });
// }
// $scope.property.properties.forEach(el => {
// el.defaultValue = ""
// el.defaultChecked = true
// el.defaultUnit = ""
// });
// $rootScope.curField = $scope.property
// $scope.childFieldObj = $rootScope.curField
// $scope.childFieldObj = schemaListObj
// console.log($scope.childFieldObj, "$scope.childFieldObj$scope.childFieldObj")
$scope
.
isShow
=
true
$scope
.
toggleTable
=
function
()
{
...
...
@@ -272,3 +217,26 @@ angular.module('flowableModeler').controller('FieldTextPopup', ['$rootScope','$s
// console.log($scope)
}
}]);
angular
.
module
(
'flowableModeler'
).
controller
(
'ExtraFormReadConfig'
,
[
'$rootScope'
,
'$scope'
,
'$http'
,
function
(
$rootScope
,
$scope
,
$http
)
{
$scope
.
isShow
=
true
$scope
.
componentList
=
[{
name
:
'产品信息'
,
component
:
'ProductInfo'
,
defaultChecked
:
false
},
{
name
:
'客户信息'
,
component
:
'BusInfo'
,
defaultChecked
:
false
},
{
name
:
'商机信息'
,
component
:
'BusInfo'
,
defaultChecked
:
false
}]
$scope
.
changeValue
=
function
(
params
)
{
console
.
log
(
params
)
}
}]);
\ No newline at end of file
editor-app/configuration/properties/extra-form-read-config.html
0 → 100644
View file @
e7677e0d
<div
ng-controller=
"ExtraFormReadConfig"
>
<table
class=
"table"
ng-if=
"isShow"
>
<tr>
<th>
显示
</th>
<th>
外接表名称
</th>
</tr>
<tr
ng-repeat=
"child in componentList"
>
<td
style=
"width: 20px;"
>
<input
type=
"checkbox"
ng-model=
"child.defaultChecked"
ng-change=
"changeValue(child)"
/>
</td>
<td
class=
"active"
style=
"width: 80px;"
title=
"{{child.name}}"
>
{{child.name}}
</td>
</tr>
</table>
</div>
editor-app/configuration/properties/extra-form-write-config.html
0 → 100644
View file @
e7677e0d
<div
ng-controller=
"ExtraFormReadConfig"
>
<table
class=
"table"
ng-if=
"isShow"
>
<tr>
<th>
显示
</th>
<th>
外接表名称
</th>
</tr>
<tr
ng-repeat=
"child in componentList"
>
<td
style=
"width: 20px;"
>
<input
type=
"checkbox"
ng-model=
"child.defaultChecked"
ng-change=
"changeValue(child)"
/>
</td>
<td
class=
"active"
style=
"width: 80px;"
title=
"{{child.name}}"
>
{{child.name}}
</td>
</tr>
</table>
</div>
editor-app/editor.html
View file @
e7677e0d
...
...
@@ -149,13 +149,19 @@
<div
class=
"selected-item-body"
>
<div>
<div
class=
"property-row"
ng-repeat=
"property in selectedItem.properties"
ng-click=
"propertyClicked($index)"
ng-class=
"{'clear' : $index%2 == 0}"
>
<div
ng-if=
"property.type === '
wangwanli
'"
>
<div
ng-if=
"property.type === '
cusFieldConfig
'"
>
<ng-include
src=
"getPropertyReadModeTemplateUrl($index)"
></ng-include>
</div>
<!-- <div ng-if="property.type !== 'wangwanli'"> -->
<span
class=
"title"
ng-if=
"!property.hidden && property.type !== 'wangwanli'"
title=
"{{ property.description | translate}}"
>
{{ property.title | translate }}
:
</span>
<div
ng-if=
"property.type === 'extraForm'"
>
<ng-include
src=
"getPropertyReadModeTemplateUrl($index)"
></ng-include>
</div>
<!-- <div ng-if="property.type === 'cusFieldConfig'">
<ng-include src="getPropertyReadModeTemplateUrl($index)"></ng-include>
</div> -->
<!-- <div ng-if="property.type !== 'cusFieldConfig'"> -->
<span
class=
"title"
ng-if=
"!property.hidden && property.type !== 'cusFieldConfig' && property.type !== 'extraForm'"
title=
"{{ property.description | translate}}"
>
{{ property.title | translate }}
:
</span>
<span
class=
"title-removed"
ng-if=
"property.hidden"
><i>
{{ property.title }}
({{'PROPERTY.REMOVED' | translate}})
:
</i></span>
<span
class=
"value"
ng-if=
"property.type !== '
wangwanli
'"
>
<span
class=
"value"
ng-if=
"property.type !== '
cusFieldConfig' && property.type !== 'extraForm
'"
>
<ng-include
src=
"getPropertyTemplateUrl($index)"
ng-if=
"!property.hasReadWriteMode"
></ng-include>
<ng-include
src=
"getPropertyReadModeTemplateUrl($index)"
ng-if=
"property.hasReadWriteMode && property.mode == 'read'"
></ng-include>
<ng-include
src=
"getPropertyWriteModeTemplateUrl($index)"
ng-if=
"property.hasReadWriteMode && property.mode == 'write'"
></ng-include>
...
...
editor-app/stencil-controller.js
View file @
e7677e0d
...
...
@@ -443,6 +443,33 @@ angular.module('flowableModeler')
value
:
true
,
writeModeTemplateUrl
:
""
,
}
const
extraFormTitle
=
{
description
:
''
,
hasReadWriteMode
:
false
,
hidden
:
false
,
mode
:
"read"
,
readModeTemplateUrl
:
""
,
readonly
:
false
,
title
:
'外接表单'
,
type
:
"string"
,
value
:
true
,
writeModeTemplateUrl
:
""
,
}
const
extraFormObj
=
{
description
:
''
,
hasReadWriteMode
:
false
,
hidden
:
false
,
key
:
key
,
mode
:
"read"
,
readModeTemplateUrl
:
"editor-app/configuration/properties/extra-form-read-config.html?version="
+
(
new
Date
()).
getTime
(),
readonly
:
false
,
title
:
''
,
type
:
"extraForm"
,
value
:
true
,
properties
:
[
'product'
],
writeModeTemplateUrl
:
"editor-app/configuration/properties/extra-form-write-config.html?version="
+
(
new
Date
()).
getTime
(),
}
currentObjArr
.
push
(
fieldTitle
)
for
(
let
key
in
fatherObj
)
{
const
currentObj
=
{
description
:
''
,
...
...
@@ -453,15 +480,16 @@ angular.module('flowableModeler')
readModeTemplateUrl
:
"editor-app/configuration/properties/form-field-read-config.html?version="
+
(
new
Date
()).
getTime
(),
readonly
:
false
,
title
:
fatherObj
[
key
].
title
,
type
:
"
wangwanli
"
,
type
:
"
cusFieldConfig
"
,
value
:
true
,
properties
:
generatorArr
(
fatherObj
[
key
].
properties
),
writeModeTemplateUrl
:
"editor-app/configuration/properties/form-field-write-config.html?version="
+
(
new
Date
()).
getTime
(),
}
currentObjArr
.
push
(
currentObj
)
}
currentObjArr
.
unshift
(
fieldTitle
)
currentObjArr
.
push
(
extraFormTitle
)
currentObjArr
.
push
(
extraFormObj
)
$rootScope
.
formKeyList
=
selectedItem
.
properties
let
preArr
=
[]
let
nextArr
=
[]
...
...
@@ -473,6 +501,8 @@ angular.module('flowableModeler')
}
selectedItem
.
properties
=
preArr
.
concat
(
currentObjArr
).
concat
(
nextArr
)
console
.
log
(
selectedItem
.
properties
,
"selectedItem.properties"
)
})
}
...
...
@@ -507,6 +537,33 @@ angular.module('flowableModeler')
value
:
true
,
writeModeTemplateUrl
:
""
,
}
const
extraFormTitle
=
{
description
:
''
,
hasReadWriteMode
:
false
,
hidden
:
false
,
mode
:
"read"
,
readModeTemplateUrl
:
""
,
readonly
:
false
,
title
:
'外接表单'
,
type
:
"string"
,
value
:
true
,
writeModeTemplateUrl
:
""
,
}
const
extraFormObj
=
{
description
:
''
,
hasReadWriteMode
:
false
,
hidden
:
false
,
key
:
key
,
mode
:
"read"
,
readModeTemplateUrl
:
"editor-app/configuration/properties/extra-form-read-config.html?version="
+
(
new
Date
()).
getTime
(),
readonly
:
false
,
title
:
''
,
type
:
"extraForm"
,
value
:
true
,
properties
:
[
'product'
],
writeModeTemplateUrl
:
"editor-app/configuration/properties/extra-form-write-config.html?version="
+
(
new
Date
()).
getTime
(),
}
currentObjArr
.
push
(
fieldTitle
)
for
(
let
key
in
fatherObj
)
{
const
currentObj
=
{
description
:
''
,
...
...
@@ -517,7 +574,7 @@ angular.module('flowableModeler')
readModeTemplateUrl
:
"editor-app/configuration/properties/form-field-read-config.html?version="
+
(
new
Date
()).
getTime
(),
readonly
:
false
,
title
:
fatherObj
[
key
].
title
,
type
:
"
wangwanli
"
,
type
:
"
cusFieldConfig
"
,
value
:
true
,
properties
:
generatorArr
(
fatherObj
[
key
].
properties
),
writeModeTemplateUrl
:
"editor-app/configuration/properties/form-field-write-config.html?version="
+
(
new
Date
()).
getTime
(),
...
...
@@ -525,7 +582,8 @@ angular.module('flowableModeler')
currentObjArr
.
push
(
currentObj
)
}
currentObjArr
.
unshift
(
fieldTitle
)
currentObjArr
.
push
(
extraFormTitle
)
currentObjArr
.
push
(
extraFormObj
)
$rootScope
.
formKeyList
=
selectedItem
.
properties
let
preArr
=
[]
...
...
@@ -581,6 +639,33 @@ angular.module('flowableModeler')
value
:
true
,
writeModeTemplateUrl
:
""
,
}
const
extraFormTitle
=
{
description
:
''
,
hasReadWriteMode
:
false
,
hidden
:
false
,
mode
:
"read"
,
readModeTemplateUrl
:
""
,
readonly
:
false
,
title
:
'外接表单'
,
type
:
"string"
,
value
:
true
,
writeModeTemplateUrl
:
""
,
}
const
extraFormObj
=
{
description
:
''
,
hasReadWriteMode
:
false
,
hidden
:
false
,
key
:
key
,
mode
:
"read"
,
readModeTemplateUrl
:
"editor-app/configuration/properties/extra-form-read-config.html?version="
+
(
new
Date
()).
getTime
(),
readonly
:
false
,
title
:
''
,
type
:
"extraForm"
,
value
:
true
,
properties
:
[
'product'
],
writeModeTemplateUrl
:
"editor-app/configuration/properties/extra-form-write-config.html?version="
+
(
new
Date
()).
getTime
(),
}
currentObjArr
.
push
(
fieldTitle
)
for
(
let
key
in
fatherObj
)
{
const
currentObj
=
{
description
:
''
,
...
...
@@ -591,7 +676,7 @@ angular.module('flowableModeler')
readModeTemplateUrl
:
"editor-app/configuration/properties/form-field-read-config.html?version="
+
(
new
Date
()).
getTime
(),
readonly
:
false
,
title
:
fatherObj
[
key
].
title
,
type
:
"
wangwanli
"
,
type
:
"
cusFieldConfig
"
,
value
:
true
,
properties
:
generatorArr
(
fatherObj
[
key
].
properties
),
writeModeTemplateUrl
:
"editor-app/configuration/properties/form-field-write-config.html?version="
+
(
new
Date
()).
getTime
(),
...
...
@@ -599,7 +684,8 @@ angular.module('flowableModeler')
currentObjArr
.
push
(
currentObj
)
}
currentObjArr
.
unshift
(
fieldTitle
)
currentObjArr
.
push
(
extraFormTitle
)
currentObjArr
.
push
(
extraFormObj
)
$rootScope
.
formKeyList
=
selectedItem
.
properties
let
preArr
=
[]
...
...
@@ -663,7 +749,7 @@ angular.module('flowableModeler')
// readModeTemplateUrl: "editor-app/configuration/properties/form-field-read-config.html?version=" + (new Date()).getTime(),
// readonly: false,
// title: fatherObj[key].title,
// type: "
wangwanli
",
// type: "
cusFieldConfig
",
// value: true,
// properties: generatorArr(fatherObj[key].properties),
// writeModeTemplateUrl: "editor-app/configuration/properties/form-field-write-config.html?version=" + (new Date()).getTime(),
...
...
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