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
c3efd5df
Commit
c3efd5df
authored
Jul 05, 2021
by
王万里
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 字段配置
parent
5fc1b413
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
50 deletions
+94
-50
properties-default-controllers.js
editor-app/configuration/properties-default-controllers.js
+34
-13
properties-form-reference-controller.js
...app/configuration/properties-form-reference-controller.js
+43
-6
form-field-read-config.html
...-app/configuration/properties/form-field-read-config.html
+11
-28
stencil-controller.js
editor-app/stencil-controller.js
+0
-0
url-config.js
scripts/configuration/url-config.js
+6
-3
No files found.
editor-app/configuration/properties-default-controllers.js
View file @
c3efd5df
...
@@ -19,10 +19,12 @@ let nodeIdParams = ""
...
@@ -19,10 +19,12 @@ let nodeIdParams = ""
let
exeCount
=
true
let
exeCount
=
true
let
schemaListObj
=
{}
let
schemaListObj
=
{}
window
.
share
&&
window
.
share
.
event
.
on
(
"editCurrentNodeForm"
,
(
params
)
=>
{
window
.
share
&&
window
.
share
.
event
.
on
(
"editCurrentNodeForm"
,
(
params
)
=>
{
// console.log(params)
shareformKey
=
params
shareformKey
=
params
})
})
window
.
share
&&
window
.
share
.
event
.
on
(
"editCurrentNodeId"
,
(
paramsId
)
=>
{
window
.
share
&&
window
.
share
.
event
.
on
(
"editCurrentNodeId"
,
(
paramsId
)
=>
{
// console.log(paramsId)
nodeIdParams
=
paramsId
nodeIdParams
=
paramsId
})
})
...
@@ -132,20 +134,35 @@ angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['
...
@@ -132,20 +134,35 @@ angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['
angular
.
module
(
'flowableModeler'
).
controller
(
'FieldReadConfigPopupCtrl'
,
[
'$rootScope'
,
'$scope'
,
'$http'
,
function
(
$rootScope
,
$scope
,
$http
)
{
angular
.
module
(
'flowableModeler'
).
controller
(
'FieldReadConfigPopupCtrl'
,
[
'$rootScope'
,
'$scope'
,
'$http'
,
function
(
$rootScope
,
$scope
,
$http
)
{
window
.
share
&&
window
.
share
.
event
.
on
(
"editCurrentNodeId"
,
(
params
)
=>
{
window
.
share
&&
window
.
share
.
event
.
on
(
"editCurrentNodeId"
,
(
params
)
=>
{
// console.log(params)
nodeIdParams
=
params
nodeIdParams
=
params
})
})
if
(
nodeIdParams
&&
shareformKey
)
{
if
(
nodeIdParams
&&
shareformKey
)
{
$http
.
get
(
FLOWABLE
.
APP_URL
.
GetColumnConfig
(
nodeIdParams
,
shareformKey
))
$http
.
get
(
FLOWABLE
.
APP_URL
.
GetColumnConfig
(
nodeIdParams
,
shareformKey
))
.
success
((
res
)
=>
{
.
success
((
res
)
=>
{
if
(
res
.
FieldConfigList
&&
res
.
FieldConfigList
.
length
>
0
)
{
if
(
res
.
FieldConfigList
&&
res
.
FieldConfigList
.
length
>
0
)
{
res
.
FieldConfigList
.
forEach
((
item
)
=>
{
var
result
=
[];
var
obj
=
{};
for
(
var
i
=
0
;
i
<
res
.
FieldConfigList
.
length
;
i
++
){
if
(
!
obj
[
res
.
FieldConfigList
[
i
].
FieldCode
]){
result
.
push
(
res
.
FieldConfigList
[
i
]);
obj
[
res
.
FieldConfigList
[
i
].
FieldCode
]
=
true
;
}
}
result
.
forEach
((
item
)
=>
{
$scope
.
property
.
properties
.
forEach
((
pItem
)
=>
{
$scope
.
property
.
properties
.
forEach
((
pItem
)
=>
{
if
(
item
.
FieldCode
===
pItem
.
key
)
{
if
(
item
.
FieldCode
===
pItem
.
FieldName
)
{
pItem
.
defaultUnit
=
item
.
Unit
pItem
.
defaultValue
=
item
.
Type
pItem
.
defaultChecked
=
item
.
IsShow
===
"1"
?
true
:
false
pItem
.
defaultChecked
=
item
.
IsShow
===
"1"
?
true
:
false
pItem
.
defaultIsRequired
=
item
.
IsRequired
===
"true"
?
true
:
false
pItem
.
defaultIsRequired
=
item
.
IsRequired
===
"true"
?
true
:
false
if
(
item
.
IsReadOnly
===
"true"
||
item
.
IsReadOnly
===
"1"
)
{
pItem
.
defaultIsReadOnly
=
true
}
else
{
pItem
.
defaultIsReadOnly
=
false
}
}
}
})
})
})
})
...
@@ -153,16 +170,17 @@ angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$root
...
@@ -153,16 +170,17 @@ angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$root
$scope
.
childFieldObj
=
schemaListObj
$scope
.
childFieldObj
=
schemaListObj
// console.log($scope.childFieldObj, "$scope.childFieldObj")
}
else
{
}
else
{
$scope
.
property
.
properties
.
forEach
(
el
=>
{
$scope
.
property
.
properties
.
forEach
(
el
=>
{
el
.
defaultValue
=
""
el
.
defaultChecked
=
true
el
.
defaultChecked
=
true
el
.
defaultUnit
=
""
el
.
defaultIsRequired
=
false
el
.
defaultIsRequired
=
false
});
});
}
}
})
})
}
}
$scope
.
isShow
=
true
$scope
.
isShow
=
true
$scope
.
toggleTable
=
function
()
{
$scope
.
toggleTable
=
function
()
{
...
@@ -170,17 +188,19 @@ angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$root
...
@@ -170,17 +188,19 @@ angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$root
}
}
$scope
.
changeValue
=
function
(
params
)
{
$scope
.
changeValue
=
function
(
params
)
{
// console.log(params)
const
data
=
{
const
data
=
{
ActID
:
$rootScope
.
currentReadResourceId
,
ActID
:
$rootScope
.
currentReadResourceId
,
Config
:
""
,
Config
:
""
,
FieldCode
:
params
.
key
,
FieldCode
:
params
.
FieldName
,
FieldName
:
params
.
titl
e
,
FieldName
:
params
.
FieldNam
e
,
FieldType
:
params
.
type
,
FieldType
:
'string'
,
FormKey
:
shareformKey
,
FormKey
:
shareformKey
,
IsShow
:
params
.
defaultChecked
?
1
:
0
,
IsShow
:
params
.
defaultChecked
?
1
:
0
,
Type
:
params
.
defaultValue
,
Type
:
params
.
defaultValue
,
Unit
:
params
.
defaultUnit
,
Unit
:
params
.
defaultUnit
,
IsRequired
:
params
.
defaultIsRequired
IsRequired
:
params
.
defaultIsRequired
,
IsReadOnly
:
params
.
defaultIsReadOnly
}
}
$http
({
method
:
'POST'
,
url
:
FLOWABLE
.
APP_URL
.
SaveFieldConfig
(),
data
:
data
})
$http
({
method
:
'POST'
,
url
:
FLOWABLE
.
APP_URL
.
SaveFieldConfig
(),
data
:
data
})
.
success
(
function
(
res
)
{
.
success
(
function
(
res
)
{
...
@@ -223,7 +243,7 @@ angular.module('flowableModeler').controller('ExtraFormReadConfig', ['$rootScope
...
@@ -223,7 +243,7 @@ angular.module('flowableModeler').controller('ExtraFormReadConfig', ['$rootScope
let
componentList
=
[]
let
componentList
=
[]
let
arr
=
[]
let
arr
=
[]
let
chArr
=
[]
let
chArr
=
[]
console
.
log
(
nodeIdParams
,
"nodeIdParams"
)
//
console.log(nodeIdParams, "nodeIdParams")
if
(
nodeIdParams
)
{
if
(
nodeIdParams
)
{
$http
.
get
(
FLOWABLE
.
APP_URL
.
GetAssemblyModel
(
''
))
$http
.
get
(
FLOWABLE
.
APP_URL
.
GetAssemblyModel
(
''
))
.
success
((
res
)
=>
{
.
success
((
res
)
=>
{
...
@@ -244,7 +264,7 @@ angular.module('flowableModeler').controller('ExtraFormReadConfig', ['$rootScope
...
@@ -244,7 +264,7 @@ angular.module('flowableModeler').controller('ExtraFormReadConfig', ['$rootScope
componentList
=
arr
componentList
=
arr
$scope
.
componentList
=
componentList
$scope
.
componentList
=
componentList
console
.
log
(
$scope
.
componentList
,
'$scope.componentList'
)
//
console.log($scope.componentList, '$scope.componentList')
})
})
})
})
}
}
...
@@ -256,7 +276,7 @@ angular.module('flowableModeler').controller('ExtraFormReadConfig', ['$rootScope
...
@@ -256,7 +276,7 @@ angular.module('flowableModeler').controller('ExtraFormReadConfig', ['$rootScope
}
}
$http
.
get
(
FLOWABLE
.
APP_URL
.
SaveAssemblyConfig
(
nodeIdParams
,
params
.
AssemblyName
,
OperType
))
$http
.
get
(
FLOWABLE
.
APP_URL
.
SaveAssemblyConfig
(
nodeIdParams
,
params
.
AssemblyName
,
OperType
))
.
success
(
res
=>
{
.
success
(
res
=>
{
console
.
log
(
res
)
//
console.log(res)
})
})
}
}
}]);
}]);
\ No newline at end of file
editor-app/configuration/properties-form-reference-controller.js
View file @
c3efd5df
...
@@ -100,12 +100,49 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
...
@@ -100,12 +100,49 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
window
.
share
&&
window
.
share
.
event
.
emit
(
"currentNodeForm"
,
$scope
.
property
.
value
);
window
.
share
&&
window
.
share
.
event
.
emit
(
"currentNodeForm"
,
$scope
.
property
.
value
);
// $rootScope.currentFormData = $scope.property.value
// $rootScope.currentFormData = $scope.property.value
$scope
.
updatePropertyInModel
(
$scope
.
property
);
$scope
.
updatePropertyInModel
(
$scope
.
property
);
$scope
.
close
();
const
formKey
=
$scope
.
selectedForm
.
TableName
const
nodeId
=
$rootScope
.
currentReadResourceId
||
$rootScope
.
resourceId
$http
.
get
(
FLOWABLE
.
APP_URL
.
GetTableFieldConfig
(
formKey
))
.
success
((
res
)
=>
{
let
formArr
=
[]
const
Values
=
res
.
getMe
[
0
].
Values
const
Groups
=
res
.
getMe
[
0
].
Groups
Values
.
forEach
((
item
)
=>
{
formArr
.
push
({
ActID
:
nodeId
,
Config
:
''
,
FieldCode
:
item
.
FieldName
,
FieldName
:
item
.
FieldName
,
FieldType
:
'string'
,
FormKey
:
formKey
,
IsShow
:
1
,
Type
:
""
,
Unit
:
""
,
IsRequired
:
false
,
IsReadOnly
:
"0"
})
})
var
result
=
[];
var
obj
=
{};
for
(
var
i
=
0
;
i
<
formArr
.
length
;
i
++
){
if
(
!
obj
[
formArr
[
i
].
FieldCode
]){
result
.
push
(
formArr
[
i
]);
obj
[
formArr
[
i
].
FieldCode
]
=
true
;
}
}
$http
({
method
:
'POST'
,
url
:
FLOWABLE
.
APP_URL
.
SaveColumnConfig
(
nodeId
,
decodeURI
(
formKey
)),
data
:
result
})
.
success
((
ret
)
=>
{
if
(
ret
.
statusCode
===
"0000"
)
{
$scope
.
close
();
}
})
})
})
})
}
else
{
}
else
{
$scope
.
property
.
value
=
null
;
$scope
.
property
.
value
=
null
;
$scope
.
updatePropertyInModel
(
$scope
.
property
);
$scope
.
updatePropertyInModel
(
$scope
.
property
);
$scope
.
close
();
$scope
.
close
();
}
}
};
};
...
@@ -296,12 +333,12 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
...
@@ -296,12 +333,12 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
}
}
})
})
var
cookie
=
cookieKeyVal
.
split
(
"="
)[
1
]
var
cookie
=
cookieKeyVal
.
split
(
"="
)[
1
]
$http
.
get
(
FLOWABLE
.
APP_URL
.
getFormModelsUrl
(
cookie
))
$http
.
get
(
FLOWABLE
.
APP_URL
.
getFormModelsUrl
(
''
))
.
success
(
.
success
(
function
(
response
)
{
function
(
response
)
{
$scope
.
state
.
loadingForms
=
false
;
$scope
.
state
.
loadingForms
=
false
;
$scope
.
state
.
formError
=
false
;
$scope
.
state
.
formError
=
false
;
$scope
.
forms
=
response
.
getMe
[
0
].
data
;
$scope
.
forms
=
response
.
getMe
;
})
})
.
error
(
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
function
(
data
,
status
,
headers
,
config
)
{
...
...
editor-app/configuration/properties/form-field-read-config.html
View file @
c3efd5df
...
@@ -10,38 +10,21 @@
...
@@ -10,38 +10,21 @@
</div>
</div>
<table
class=
"table"
ng-if=
"isShow"
>
<table
class=
"table"
ng-if=
"isShow"
>
<tr>
<tr>
<th></th>
<th
style=
"text-align: center;"
>
字段名称
</th>
<th>
字段
</th>
<th
style=
"text-align: center;"
>
是否显示
</th>
<th>
默认值
</th>
<th
style=
"text-align: center;"
>
是否只读
</th>
<th>
单位
</th>
<th
style=
"text-align: center;"
>
是否必填
</th>
<th>
只读
</th>
</tr>
</tr>
<tr
ng-repeat=
"child in childFieldObj.properties"
>
<tr
ng-repeat=
"child in childFieldObj.properties"
style=
"text-align: center;"
>
<td
style=
"width: 20px;"
>
<td
class=
"active"
title=
"{{child.title}}"
>
{{child.title}}
</td>
<td>
<input
type=
"checkbox"
ng-model=
"child.defaultChecked"
ng-change=
"changeValue(child)"
/>
<input
type=
"checkbox"
ng-model=
"child.defaultChecked"
ng-change=
"changeValue(child)"
/>
</td>
</td>
<td
class=
"active"
style=
"width: 80px;"
title=
"{{child.title}}"
>
{{child.title}}
</td>
<td>
<td
class=
"active"
style=
"width: 85px;"
>
<input
type=
"checkbox"
ng-model=
"child.defaultIsReadOnly"
ng-change=
"changeValue(child)"
/>
<select
ng-model=
"child.defaultValue"
ng-change=
"changeValue(child)"
>
<option
value=
"无"
>
无
</option>
<option
value=
"本人"
>
本人
</option>
<option
value=
"本部门"
>
本部门
</option>
<option
value=
"部门主管"
>
部门主管
</option>
<option
value=
"财务"
>
财务
</option>
<option
value=
"当前时间"
>
当前时间
</option>
<option
value=
"所属站点"
>
所属站点
</option>
</select>
</td>
</td>
<td
class=
"active"
style=
"width: 85px;"
>
<td>
<select
ng-model=
"child.defaultUnit"
ng-change=
"changeValue(child)"
>
<option
value=
"无"
>
无
</option>
<option
value=
"个"
>
个
</option>
<option
value=
"本"
>
本
</option>
<option
value=
"元"
>
元
</option>
<option
value=
"万元"
>
万元
</option>
</select>
</td>
<td
style=
"width: 45px;text-align: center;"
>
<input
type=
"checkbox"
ng-model=
"child.defaultIsRequired"
ng-change=
"changeValue(child)"
/>
<input
type=
"checkbox"
ng-model=
"child.defaultIsRequired"
ng-change=
"changeValue(child)"
/>
</td>
</td>
</tr>
</tr>
...
...
editor-app/stencil-controller.js
View file @
c3efd5df
This diff is collapsed.
Click to expand it.
scripts/configuration/url-config.js
View file @
c3efd5df
...
@@ -196,8 +196,8 @@ FLOWABLE.APP_URL = {
...
@@ -196,8 +196,8 @@ FLOWABLE.APP_URL = {
/* FORM MODEL URLS */
/* FORM MODEL URLS */
// 获取模型列表
// 获取模型列表
getFormModelsUrl
:
function
(
cooki
e
)
{
getFormModelsUrl
:
function
(
FormNam
e
)
{
return
`
${
window
.
API_ADDRESS
}
/GetForm
ModelList?Cookie=
${
cookie
}
`
;
return
`
${
window
.
API_ADDRESS
}
/GetForm
ListInfo_WithoutForm?FormName=
${
FormName
}
&pageIndex=1&pageSize=999&sortFields=id
`
;
},
},
// 获取模型详情
// 获取模型详情
getFormModelDetail
:
function
(
id
,
key
,
cookie
)
{
getFormModelDetail
:
function
(
id
,
key
,
cookie
)
{
...
@@ -207,7 +207,10 @@ FLOWABLE.APP_URL = {
...
@@ -207,7 +207,10 @@ FLOWABLE.APP_URL = {
GetColumnConfig
:
function
(
ACTID
,
FORMKEY
)
{
GetColumnConfig
:
function
(
ACTID
,
FORMKEY
)
{
return
`
${
window
.
API_ADDRESS
}
/GetColumnConfig?ActID=
${
ACTID
}
&FormKey=
${
FORMKEY
}
`
return
`
${
window
.
API_ADDRESS
}
/GetColumnConfig?ActID=
${
ACTID
}
&FormKey=
${
FORMKEY
}
`
},
},
// 根据表名查询台账配置
GetTableFieldConfig
:
function
(
tableName
)
{
return
`
${
window
.
API_ADDRESS
}
/GetTableGroupMetaV3?tableName=
${
tableName
}
`
},
// 保存单个字段配置信息
// 保存单个字段配置信息
SaveFieldConfig
:
function
()
{
SaveFieldConfig
:
function
()
{
return
`
${
window
.
API_ADDRESS
}
/SaveFieldConfig`
return
`
${
window
.
API_ADDRESS
}
/SaveFieldConfig`
...
...
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