Commit e7677e0d authored by 王万里's avatar 王万里

add: extraForm

parent 85ba30d5
......@@ -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
<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>
<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>
......@@ -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 }}&nbsp;:</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 }}&nbsp;:</span>
<span class="title-removed" ng-if="property.hidden"><i>{{ property.title }}&nbsp;({{'PROPERTY.REMOVED' | translate}})&nbsp;:</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>
......
......@@ -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(),
......
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