Commit 5fc1b413 authored by 王万里's avatar 王万里

add: 配置视图信息

parent e7677e0d
......@@ -219,24 +219,44 @@ angular.module('flowableModeler').controller('FieldTextPopup', ['$rootScope','$s
}]);
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
}]
angular.module('flowableModeler').controller('ExtraFormReadConfig', ['$rootScope','$scope', '$http', function($rootScope, $scope, $http) {
let componentList = []
let arr = []
let chArr = []
console.log(nodeIdParams, "nodeIdParams")
if (nodeIdParams) {
$http.get(FLOWABLE.APP_URL.GetAssemblyModel(''))
.success((res)=>{
res.getMe.forEach((item)=>{
item.defaultChecked = false
})
arr = res.getMe
$http.get(FLOWABLE.APP_URL.GetAssemblyModel(nodeIdParams))
.success((response)=>{
chArr = response.getMe
arr.forEach((item)=>{
chArr.forEach(cItem=>{
if (item.AssemblyName === cItem.AssemblyName) {
item.defaultChecked = true
}
})
})
componentList = arr
$scope.componentList = componentList
console.log($scope.componentList, '$scope.componentList')
})
})
}
$scope.changeValue = function(params) {
console.log(params)
let OperType = 0
if (params.defaultChecked) {
OperType = 1
}
$http.get(FLOWABLE.APP_URL.SaveAssemblyConfig(nodeIdParams, params.AssemblyName, OperType))
.success(res=>{
console.log(res)
})
}
}]);
\ No newline at end of file
<div ng-controller="ExtraFormReadConfig">
<table class="table" ng-if="isShow">
<table class="table">
<tr>
<th>显示</th>
<th style="width: 10%;"></th>
<th>外接表名称</th>
<th>描述</th>
</tr>
<tr ng-repeat="child in componentList">
<td style="width: 20px;">
<td>
<input type="checkbox" ng-model="child.defaultChecked" ng-change="changeValue(child)"/>
</td>
<td class="active" style="width: 80px;" title="{{child.name}}">{{child.name}}</td>
<td class="active" style="max-width: 110px;" title="{{child.AssemblyName}}">
<p style="margin: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{child.AssemblyName}}
</p>
</td>
<td class="active" style="max-width: 150px;" title="{{child.Describe}}">
<p style="margin: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{child.Describe}}
</p>
</td>
</tr>
</table>
</div>
<div ng-controller="ExtraFormReadConfig">
<table class="table" ng-if="isShow">
<table class="table">
<tr>
<th>显示</th>
<th style="width: 10%;"></th>
<th>外接表名称</th>
<th>描述</th>
</tr>
<tr ng-repeat="child in componentList">
<td style="width: 20px;">
<td>
<input type="checkbox" ng-model="child.defaultChecked" ng-change="changeValue(child)"/>
</td>
<td class="active" style="width: 80px;" title="{{child.name}}">{{child.name}}</td>
<td class="active" style="max-width: 110px;" title="{{child.AssemblyName}}">
<p style="margin: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{child.AssemblyName}}
</p>
</td>
<td class="active" style="max-width: 150px;" title="{{child.Describe}}">
<p style="margin: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{child.Describe}}
</p>
</td>
</tr>
</table>
</div>
......@@ -222,6 +222,16 @@ FLOWABLE.APP_URL = {
return `${window.API_ADDRESS}/getUserListForRole?_version=9999`
},
// 节点中组件设置接口
SaveAssemblyConfig: function(ACTID, ASSEMBLYNAME, OPERTYPE) {
return `${window.API_ADDRESS}/SaveAssemblyConfig?ActID=${ACTID}&AssemblyName=${ASSEMBLYNAME}&OperType=${OPERTYPE}`
},
// 根据节点ID查询组件接口
GetAssemblyModel: function(ACTID) {
return `${window.API_ADDRESS}/GetAssemblyModel?AssemblyName=&pageIndex=1&pageSize=1000&sortFields=&direction=&ActID=${ACTID}`
},
getFormModelValuesUrl: function (query) {
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/form-models/values?' + query;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment