Commit 41cc558e authored by godlovericea's avatar godlovericea

add: btn

parent c3efd5df
......@@ -24,7 +24,7 @@ window.share && window.share.event.on("editCurrentNodeForm", (params)=> {
})
window.share && window.share.event.on("editCurrentNodeId", (paramsId)=>{
// console.log(paramsId)
// console.log(nodeIdParams, "nodeIdParams---上面")
nodeIdParams = paramsId
})
......@@ -130,18 +130,16 @@ angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['
$scope.$hide();
};
}]);
angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$rootScope','$scope', '$http', function($rootScope, $scope, $http) {
window.share && window.share.event.on("editCurrentNodeId", (params)=>{
// console.log(params)
// console.log(params, "editCurrentNodeId----下面")
nodeIdParams = params
})
if (nodeIdParams && shareformKey) {
// console.log("properties-default-control---GetColumnConfig")
$http.get(FLOWABLE.APP_URL.GetColumnConfig(nodeIdParams, shareformKey))
.success((res)=>{
if (res.FieldConfigList && res.FieldConfigList.length > 0) {
var result = [];
......
......@@ -103,41 +103,46 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
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"
// console.log("properties-form-reference-controller-----GetTableFieldConfig")
if (formKey) {
$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();
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 {
$scope.close();
}
})
} else {
$scope.property.value = null;
......
......@@ -29,7 +29,7 @@
<div class="col-xs-12 editor-item-picker">
<div ng-if="!state.loadingForms && !state.formError" class="col-xs-4 editor-item-picker-component" ng-repeat="form in forms" ng-class="{'selected' : form.formId == selectedForm.formId}" ng-click="selectForm(form, $event)">
<div class="controls" style="margin-right: 5px;">
<input type="checkbox" value="option1" ng-click="selectForm(form, $event)" ng-checked="form.id == selectedForm.id" />
<input type="checkbox" value="option1" ng-click="selectForm(form, $event)" ng-checked="form.key == selectedForm.key" />
</div>
<h4>{{form.name}}</h4>
<!-- <img ng-src="{{getModelThumbnailUrl(form.id)}}" /> -->
......
This diff is collapsed.
......@@ -52,18 +52,53 @@ angular.module('flowableModeler')
// Click handler for toolbar buttons
$scope.toolbarButtonClicked = function(buttonIndex) {
// buttonIndex===0是保存按钮
if (buttonIndex === 0) {
$http.get(FLOWABLE.APP_URL.checkDeployState(editorManager.modelId))
.success((response)=>{
// console.log(response, "response")
if (response.statusCode === "0000") {
// Default behaviour
var buttonClicked = $scope.items[buttonIndex];
var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate, 'editorManager' : editorManager};
executeFunctionByName(buttonClicked.action, window, services);
// Other events
var event = {
type : FLOWABLE.eventBus.EVENT_TYPE_TOOLBAR_BUTTON_CLICKED,
toolbarItem : buttonClicked
};
FLOWABLE.eventBus.dispatch(event.type, event);
} else if (response.statusCode === "1001"){
window.alert(response.errMsg)
} else {
window.alert("保存失败!流程出错或者系统出错,请联系管理员。")
}
})
} else {
// Default behaviour
var buttonClicked = $scope.items[buttonIndex];
var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate, 'editorManager' : editorManager};
executeFunctionByName(buttonClicked.action, window, services);
// Other events
var event = {
type : FLOWABLE.eventBus.EVENT_TYPE_TOOLBAR_BUTTON_CLICKED,
toolbarItem : buttonClicked
};
FLOWABLE.eventBus.dispatch(event.type, event);
}
// Default behaviour
var buttonClicked = $scope.items[buttonIndex];
var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate, 'editorManager' : editorManager};
executeFunctionByName(buttonClicked.action, window, services);
// var buttonClicked = $scope.items[buttonIndex];
// var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate, 'editorManager' : editorManager};
// executeFunctionByName(buttonClicked.action, window, services);
// Other events
var event = {
type : FLOWABLE.eventBus.EVENT_TYPE_TOOLBAR_BUTTON_CLICKED,
toolbarItem : buttonClicked
};
FLOWABLE.eventBus.dispatch(event.type, event);
// // Other events
// var event = {
// type : FLOWABLE.eventBus.EVENT_TYPE_TOOLBAR_BUTTON_CLICKED,
// toolbarItem : buttonClicked
// };
// FLOWABLE.eventBus.dispatch(event.type, event);
};
// Click handler for secondary toolbar buttons
......
......@@ -19,7 +19,7 @@ var FLOWABLE = FLOWABLE || {};
var pathname = window.location.pathname.replace(/^(\/[^\/]*)(\/.*)?modeler\/?$/, '$1').replace(/\/$/, '');
console.log(pathname)
// console.log(pathname)
// FLOWABLE.CONFIG = {
// 'onPremise' : true,
......
......@@ -196,6 +196,9 @@ FLOWABLE.APP_URL = {
/* FORM MODEL URLS */
// 获取模型列表
checkDeployState: function (modelId) {
return `${window.API_ADDRESS}/CheckDeployState?modelId=${modelId}`;
},
getFormModelsUrl: function (FormName) {
return `${window.API_ADDRESS}/GetFormListInfo_WithoutForm?FormName=${FormName}&pageIndex=1&pageSize=999&sortFields=id`;
},
......
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