提交 c6873fce 编写于 作者: Z zhourui

Merge branch 'develop' into feature/swagger

......@@ -72,6 +72,9 @@ public class ActionReciveAttendanceMobile extends BaseAction {
}
}
if( check ){
if (StringUtils.isNotEmpty(wrapIn.getDescription())) {
attendanceDetailMobile.setDescription(wrapIn.getDescription());
}
if( StringUtils.isNotEmpty(wrapIn.getRecordAddress()) ){
attendanceDetailMobile.setRecordAddress( wrapIn.getRecordAddress() );
}
......
......@@ -241,7 +241,7 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
"onComplete": function(items){
var arr = [];
items.each(function(item){
arr.push(item.data.name);
arr.push(item.data.distinguishedName);
}.bind(this));
el.set("value",arr.join(","));
}.bind(this)
......
......@@ -133,11 +133,17 @@ MWF.xApplication.Attendance.PeopleDetail.Explorer = new Class({
this.fileterNode.set("html",html);
MWF.xDesktop.requireApp("Template", "MForm", function(){
var empSelector = { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } };
if( !this.app.isAdmin() && this.app.manageUnits ){
empSelector = { text : lp.person, type : "org", orgType : "identity", "units": this.app.manageUnits, orgOptions: {
"resultType": "person",
} , notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm( this.fileterNode, {}, {
style: "attendance",
isEdited : true,
itemTemplate : {
q_empName : { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } },
q_empName : empSelector,
cycleYear : {
text : lp.annuaal,
"type" : "select",
......@@ -499,11 +505,17 @@ MWF.xApplication.Attendance.PeopleDetail.DetailStaticExplorer = new Class({
this.fileterNode.set("html",html);
MWF.xDesktop.requireApp("Template", "MForm", function(){
var empSelector = { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } };
if( !this.app.isAdmin() && this.app.manageUnits ){
empSelector = { text : lp.person, type : "org", orgType : "identity", "units": this.app.manageUnits, orgOptions: {
"resultType": "person",
} , notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm( this.fileterNode, {}, {
style: "attendance",
isEdited : true,
itemTemplate : {
q_empName : { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } },
q_empName : empSelector,
cycleYear : {
text : lp.annuaal,
"type" : "select",
......
......@@ -114,11 +114,17 @@ MWF.xApplication.Attendance.PeopleDingdingDetail.Explorer = new Class({
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
var empSelector = { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } };
if( !this.app.isAdmin() && this.app.manageUnits ){
empSelector = { text : lp.person, type : "org", orgType : "identity", "units": this.app.manageUnits, orgOptions: {
"resultType": "person",
} , notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
person: { text: lp.person, type: "org", orgType: "person", notEmpty: true, style: { "min-width": "100px" } },
person: empSelector,
year: {
text: lp.annuaal,
"type": "select",
......@@ -264,11 +270,17 @@ MWF.xApplication.Attendance.PeopleDingdingDetail.DetailStaticExplorer = new Clas
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
var empSelector = { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } };
if( !this.app.isAdmin() && this.app.manageUnits ){
empSelector = { text : lp.person, type : "org", orgType : "identity", "units": this.app.manageUnits, orgOptions: {
"resultType": "person",
} , notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
q_empName: { text: lp.person, type: "org", orgType: "person", notEmpty: true, style: { "min-width": "100px" } },
q_empName: empSelector,
cycleYear: {
text: lp.annuaal,
"type": "select",
......
......@@ -114,11 +114,17 @@ MWF.xApplication.Attendance.PeopleQywxDetail.Explorer = new Class({
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
var empSelector = { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } };
if( !this.app.isAdmin() && this.app.manageUnits ){
empSelector = { text : lp.person, type : "org", orgType : "identity", "units": this.app.manageUnits, orgOptions: {
"resultType": "person",
} , notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
person: { text: lp.person, type: "org", orgType: "person", notEmpty: true, style: { "min-width": "100px" } },
person: empSelector,
year: {
text: lp.annuaal,
"type": "select",
......@@ -264,11 +270,17 @@ MWF.xApplication.Attendance.PeopleQywxDetail.DetailStaticExplorer = new Class({
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
var empSelector = { text : lp.person, type : "org", orgType : "person", notEmpty : true, style : {"min-width": "100px" } };
if( !this.app.isAdmin() && this.app.manageUnits ){
empSelector = { text : lp.person, type : "org", orgType : "identity", "units": this.app.manageUnits, orgOptions: {
"resultType": "person",
} , notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
q_empName: { text: lp.person, type: "org", orgType: "person", notEmpty: true, style: { "min-width": "100px" } },
q_empName: empSelector,
cycleYear: {
text: lp.annuaal,
"type": "select",
......
......@@ -116,12 +116,8 @@ MWF.xApplication.Attendance.UnitDetail.Explorer = new Class({
this.fileterNode.set("html",html);
MWF.xDesktop.requireApp("Template", "MForm", function(){
this.form = new MForm( this.fileterNode, {}, {
style: "attendance",
isEdited : true,
itemTemplate : {
q_unitName : { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } },
cycleYear : {
var itemTemplate = {
cycleYear : {
text : lp.annuaal,
"type" : "select",
"selectValue" : function(){
......@@ -193,10 +189,31 @@ MWF.xApplication.Attendance.UnitDetail.Explorer = new Class({
debugger;
this.actions.detailsExportStream(result.q_topUnitName,result.q_unitName,result.q_empName,result.cycleYear,result.cycleMonth,result.q_date,result.isAbsent,result.isLackOfTime,result.isLate,true);
}.bind(this)
}}
}
}
};
if( this.app.isAdmin() ){
itemTemplate.q_unitName = { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } };
}else{
var unitNameArr = []
var unitValueArr = this.app.manageUnits;
for (let i = 0; i < unitValueArr.length; i++) {
const element = unitValueArr[i];
if(element.indexOf("@") > -1){
const name = element.split("@")[0];
unitNameArr.push(name);
} else {
unitNameArr.push(element);
}
}
itemTemplate.q_unitName = { text : lp.unit, type : "select", selectValue : unitValueArr, "selectText": unitNameArr, notEmpty : true, style : {"min-width": "100px" } };
}
}, this.app, this.app.css);
this.form.load();
this.form = new MForm( this.fileterNode, {}, {
style: "attendance",
isEdited : true,
itemTemplate : itemTemplate
}, this.app, this.app.css);
this.form.load();
}.bind(this), true);
},
getDateSelectValue : function(){
......@@ -492,47 +509,65 @@ MWF.xApplication.Attendance.UnitDetail.DetailStaticExplorer = new Class({
this.fileterNode.set("html",html);
MWF.xDesktop.requireApp("Template", "MForm", function(){
this.form = new MForm( this.fileterNode, {}, {
style: "attendance",
isEdited : true,
itemTemplate : {
q_unitName : { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } },
cycleYear : {
text : lp.annuaal,
"type" : "select",
"selectValue" : function(){
var years = [];
var year = new Date().getFullYear();
for(var i=0; i<6; i++ ){
years.push( year-- );
}
return years;
var itemTemplate = {
q_unitName : { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } },
cycleYear : {
text : lp.annuaal,
"type" : "select",
"selectValue" : function(){
var years = [];
var year = new Date().getFullYear();
for(var i=0; i<6; i++ ){
years.push( year-- );
}
return years;
}
},
cycleMonth : {
text : lp.months, notEmpty : true,
"type" : "select",
"defaultValue" : function(){
var month = (new Date().getMonth() + 1 ).toString();
return month.length == 1 ? "0"+month : month;
},
cycleMonth : {
text : lp.months, notEmpty : true,
"type" : "select",
"defaultValue" : function(){
var month = (new Date().getMonth() + 1 ).toString();
return month.length == 1 ? "0"+month : month;
},
"selectValue" :["","01","02","03","04","05","06","07","08","09","10","11","12"]
},
action : { "value" : lp.query, type : "button", className : "filterButton", event : {
"selectValue" :["","01","02","03","04","05","06","07","08","09","10","11","12"]
},
action : { "value" : lp.query, type : "button", className : "filterButton", event : {
click : function(){
var result = this.form.getResult(true,",",true,true,false);
if( !result )return;
this.loadView( result );
}.bind(this)
}},
export : { "value" : lp.export, type : "button", className : "filterButton", event : {
click : function(){
var result = this.form.getResult(true,",",true,true,false);
if( !result )return;
this.loadView( result );
this.actions.exportUnitStatisticAttachment(result.q_unitName,result.cycleYear,result.cycleMonth,true);
}.bind(this)
}},
export : { "value" : lp.export, type : "button", className : "filterButton", event : {
click : function(){
var result = this.form.getResult(true,",",true,true,false);
if( !result )return;
this.actions.exportUnitStatisticAttachment(result.q_unitName,result.cycleYear,result.cycleMonth,true);
}.bind(this)
}}
}}
};
if( this.app.isAdmin() ){
itemTemplate.q_unitName = { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } };
}else{
var unitNameArr = []
var unitValueArr = this.app.manageUnits;
for (let i = 0; i < unitValueArr.length; i++) {
const element = unitValueArr[i];
if(element.indexOf("@") > -1){
const name = element.split("@")[0];
unitNameArr.push(name);
} else {
unitNameArr.push(element);
}
}
itemTemplate.q_unitName = { text : lp.unit, type : "select", selectValue : unitValueArr, "selectText": unitNameArr, notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm( this.fileterNode, {}, {
style: "attendance",
isEdited : true,
itemTemplate : itemTemplate
}, this.app, this.app.css);
this.form.load();
}.bind(this), true);
......
......@@ -113,60 +113,77 @@ MWF.xApplication.Attendance.UnitDingdingDetail.Explorer = new Class({
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
unit: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "100px" } },
year: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
},
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
var itemTemplate = {
unit: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "100px" } },
year: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
},
month: {
text: lp.months,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
}
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
}
},
month: {
text: lp.months,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
day: { text: lp.date, "type": "select", "selectValue": this.getDateSelectValue.bind(this) },
checkType: { text: lp.signinType, "type": "select", "selectValue": ["", "OnDuty", "OffDuty"], "selectText": lp.signinTypeSelectText },
timeResult: { text: lp.signinResult, "type": "select", "selectValue": ["", "Normal", "Early", "Late", "SeriousLate", "Absenteeism", "NotSigned"], "selectText": lp.signinResultSelectText },
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
if (result.day && result.day != "") {
result.q_date = result.year + "-" + result.month + "-" + result.day;
}
this.loadView(result);
}.bind(this)
}
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
}
},
day: { text: lp.date, "type": "select", "selectValue": this.getDateSelectValue.bind(this) },
checkType: { text: lp.signinType, "type": "select", "selectValue": ["", "OnDuty", "OffDuty"], "selectText": lp.signinTypeSelectText },
timeResult: { text: lp.signinResult, "type": "select", "selectValue": ["", "Normal", "Early", "Late", "SeriousLate", "Absenteeism", "NotSigned"], "selectText": lp.signinResultSelectText },
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
if (result.day && result.day != "") {
result.q_date = result.year + "-" + result.month + "-" + result.day;
}
this.loadView(result);
}.bind(this)
}
}
}
if( this.app.isAdmin() ){
itemTemplate.q_unitName = { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } };
}else{
var unitNameArr = []
var unitValueArr = this.app.manageUnits;
for (let i = 0; i < unitValueArr.length; i++) {
const element = unitValueArr[i];
if(element.indexOf("@") > -1){
const name = element.split("@")[0];
unitNameArr.push(name);
} else {
unitNameArr.push(element);
}
}
itemTemplate.q_unitName = { text : lp.unit, type : "select", selectValue : unitValueArr, "selectText": unitNameArr, notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: itemTemplate
}, this.app, this.app.css);
this.form.load();
}.bind(this), true);
......@@ -251,42 +268,59 @@ MWF.xApplication.Attendance.UnitDingdingDetail.DetailStaticExplorer = new Class(
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
q_unitName: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "100px" } },
cycleYear: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
var itemTemplate = {
q_unitName: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "100px" } },
cycleYear: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
}
},
cycleMonth: {
text: lp.months, notEmpty: true,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
cycleMonth: {
text: lp.months, notEmpty: true,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
},
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
this.loadView(result);
}.bind(this)
}
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
},
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
this.loadView(result);
}.bind(this)
}
}
}
if( this.app.isAdmin() ){
itemTemplate.q_unitName = { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } };
}else{
var unitNameArr = []
var unitValueArr = this.app.manageUnits;
for (let i = 0; i < unitValueArr.length; i++) {
const element = unitValueArr[i];
if(element.indexOf("@") > -1){
const name = element.split("@")[0];
unitNameArr.push(name);
} else {
unitNameArr.push(element);
}
}
itemTemplate.q_unitName = { text : lp.unit, type : "select", selectValue : unitValueArr, "selectText": unitNameArr, notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: itemTemplate
}, this.app, this.app.css);
this.form.load();
}.bind(this), true);
......
......@@ -113,60 +113,77 @@ MWF.xApplication.Attendance.UnitQywxDetail.Explorer = new Class({
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
unit: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "200px" } },
year: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
},
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
var itemTemplate = {
unit: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "200px" } },
year: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
},
month: {
text: lp.months,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
}
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
}
},
month: {
text: lp.months,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
day: { text: lp.date, "type": "select", "selectValue": this.getDateSelectValue.bind(this) },
checkType: { text: lp.signinType, "type": "select", "selectValue": lp.signinQywxTypeSelectText, "selectText": lp.signinQywxTypeSelectText },
exceptionType: { text: lp.signinResult, "type": "select", "selectValue": lp.signinQywxResultSelectText, "selectText": lp.signinQywxResultSelectText },
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
if (result.day && result.day != "") {
result.q_date = result.year + "-" + result.month + "-" + result.day;
}
this.loadView(result);
}.bind(this)
}
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
"event": {
"change": function (item, ev) {
var values = this.getDateSelectValue();
item.form.getItem("day").resetItemOptions(values, values)
}.bind(this)
}
},
day: { text: lp.date, "type": "select", "selectValue": this.getDateSelectValue.bind(this) },
checkType: { text: lp.signinType, "type": "select", "selectValue": lp.signinQywxTypeSelectText, "selectText": lp.signinQywxTypeSelectText },
exceptionType: { text: lp.signinResult, "type": "select", "selectValue": lp.signinQywxResultSelectText, "selectText": lp.signinQywxResultSelectText },
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
if (result.day && result.day != "") {
result.q_date = result.year + "-" + result.month + "-" + result.day;
}
this.loadView(result);
}.bind(this)
}
}
}
if( this.app.isAdmin() ){
itemTemplate.unit = { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } };
}else{
var unitNameArr = []
var unitValueArr = this.app.manageUnits;
for (let i = 0; i < unitValueArr.length; i++) {
const element = unitValueArr[i];
if(element.indexOf("@") > -1){
const name = element.split("@")[0];
unitNameArr.push(name);
} else {
unitNameArr.push(element);
}
}
itemTemplate.unit = { text : lp.unit, type : "select", selectValue : unitValueArr, "selectText": unitNameArr, notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: itemTemplate
}, this.app, this.app.css);
this.form.load();
}.bind(this), true);
......@@ -251,42 +268,59 @@ MWF.xApplication.Attendance.UnitQywxDetail.DetailStaticExplorer = new Class({
this.fileterNode.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: {
q_unitName: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "200px" } },
cycleYear: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
var itemTemplate = {
q_unitName: { text: lp.unit, type: "org", orgType: "unit", notEmpty: true, style: { "min-width": "200px" } },
cycleYear: {
text: lp.annuaal,
"type": "select",
"selectValue": function () {
var years = [];
var year = new Date().getFullYear();
for (var i = 0; i < 6; i++) {
years.push(year--);
}
return years;
}
},
cycleMonth: {
text: lp.months, notEmpty: true,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
cycleMonth: {
text: lp.months, notEmpty: true,
"type": "select",
"defaultValue": function () {
var month = (new Date().getMonth() + 1).toString();
return month.length == 1 ? "0" + month : month;
},
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
},
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
this.loadView(result);
}.bind(this)
}
"selectValue": ["", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
},
action: {
"value": lp.query, type: "button", className: "filterButton", event: {
click: function () {
var result = this.form.getResult(true, ",", true, true, false);
if (!result) return;
this.loadView(result);
}.bind(this)
}
}
}
if( this.app.isAdmin() ){
itemTemplate.q_unitName = { text : lp.unit, type : "org", orgType : "unit", notEmpty : true, style : {"min-width": "100px" } };
}else{
var unitNameArr = []
var unitValueArr = this.app.manageUnits;
for (let i = 0; i < unitValueArr.length; i++) {
const element = unitValueArr[i];
if(element.indexOf("@") > -1){
const name = element.split("@")[0];
unitNameArr.push(name);
} else {
unitNameArr.push(element);
}
}
itemTemplate.q_unitName = { text : lp.unit, type : "select", selectValue : unitValueArr, "selectText": unitNameArr, notEmpty : true, style : {"min-width": "100px" } };
}
this.form = new MForm(this.fileterNode, {}, {
style: "attendance",
isEdited: true,
itemTemplate: itemTemplate
}, this.app, this.app.css);
this.form.load();
}.bind(this), true);
......
......@@ -217,6 +217,11 @@
"text": "wpsOffice",
"className": "WpsOffice"
},
"wpsOffice2": {
"icon": "wpsOffice.png",
"text": "wpsOffice2",
"className": "WpsOffice2"
},
"statementSelector": {
"icon": "statementSelector.png",
"text": MWF.xApplication.process.FormDesigner.LP.modules.statementSelector,
......
......@@ -743,8 +743,8 @@
"valueType": "script",
"text": "",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"events": {
"click": {
......
......@@ -931,7 +931,7 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "var cmsDocument = this.data.cmsDocument;\nreturn ( cmsDocument && cmsDocument.createTime ) ? cmsDocument.createTime : this.workContext.getWork().createTime;",
"code": "var cmsDocument = this.data.cmsDocument;\nreturn ( cmsDocument && cmsDocument.createTime ) ? cmsDocument.createTime : this.workContext.getWork().startTime;",
"html": "return this.data.cmsDocument.createTime"
},
"moduleName": "label",
......@@ -1397,7 +1397,7 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "var cmsDocument = this.data.cmsDocument;\nreturn ( cmsDocument && cmsDocument.createTime ) ? cmsDocument.createTime : this.workContext.getWork().createTime;",
"code": "var cmsDocument = this.data.cmsDocument;\nreturn ( cmsDocument && cmsDocument.createTime ) ? cmsDocument.createTime : this.workContext.getWork().startTime;",
"html": "return this.data.cmsDocument.createTime"
},
"moduleName": "label",
......
......@@ -385,8 +385,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"isSaved": true,
......
......@@ -560,8 +560,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"isSaved": true,
......@@ -2560,8 +2560,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"isSaved": true,
......
......@@ -1464,8 +1464,8 @@
"valueType": "script",
"text": "",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"events": {
"click": {
......
......@@ -538,8 +538,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......@@ -1669,8 +1669,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......
......@@ -1322,8 +1322,8 @@
"valueType": "script",
"text": "",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"events": {
"click": {
......@@ -5029,8 +5029,8 @@
"valueType": "script",
"text": "",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"events": {
"click": {
......
......@@ -1318,8 +1318,8 @@
"valueType": "script",
"text": "",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"events": {
"click": {
......@@ -8335,8 +8335,8 @@
"valueType": "script",
"text": "",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"events": {
"click": {
......
......@@ -384,8 +384,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......@@ -2605,8 +2605,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......
......@@ -597,8 +597,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......@@ -3233,8 +3233,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......
......@@ -384,8 +384,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......@@ -2597,8 +2597,8 @@
"type": "Label",
"valueType": "script",
"script": {
"code": "return this.workContext.getWork().createTime\n",
"html": "return this.workContext.getWork().createTime\n"
"code": "return this.workContext.getWork().startTime\n",
"html": "return this.workContext.getWork().startTime\n"
},
"moduleName": "label",
"recoveryStyles": {
......
......@@ -44,6 +44,7 @@ MWF.xDesktop.requireApp("process.FormDesigner", "Module.IWebOffice", null, false
MWF.xDesktop.requireApp("process.FormDesigner", "Module.YozoOffice", null, false);
MWF.xDesktop.requireApp("process.FormDesigner", "Module.OnlyOffice", null, false);
MWF.xDesktop.requireApp("process.FormDesigner", "Module.WpsOffice", null, false);
MWF.xDesktop.requireApp("process.FormDesigner", "Module.WpsOffice2", null, false);
MWF.xDesktop.requireApp("process.FormDesigner", "Module.Attachment", null, false);
MWF.xDesktop.requireApp("process.FormDesigner", "Module.Orgfield", null, false);
MWF.xDesktop.requireApp("process.FormDesigner", "Module.Org", null, false);
......
MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {};
MWF.xDesktop.requireApp("process.FormDesigner", "Module.$Element", null, false);
MWF.xApplication.process.FormDesigner.Module.WpsOffice2 = MWF.FCWpsOffice2 = new Class({
Extends: MWF.FC$Element,
Implements: [Options, Events],
options: {
"style": "default",
"propertyPath": "../x_component_process_FormDesigner/Module/WpsOffice2/wpsoffice2.html"
},
initialize: function(form, options){
this.setOptions(options);
this.path = "../x_component_process_FormDesigner/Module/WpsOffice2/";
this.cssPath = "../x_component_process_FormDesigner/Module/WpsOffice2/"+this.options.style+"/css.wcss";
this._loadCss();
this.moduleType = "element";
this.moduleName = "wpsoffice2";
this.form = form;
this.container = null;
this.containerNode = null;
},
_createMoveNode: function(){
this.moveNode = new Element("div", {
"MWFType": "wpsoffice2",
"id": this.json.id,
"styles": this.css.moduleNodeMove,
"events": {
"selectstart": function(){
return false;
}
}
}).inject(this.form.container);
},
_createNode: function(){
this.node = this.moveNode.clone(true, true);
this.node.setStyles(this.css.moduleNode);
this.node.set("id", this.json.id);
this.node.addEvent("selectstart", function(){
return false;
});
this.iconNode = new Element("div", {
"styles": this.css.iconNode
}).inject(this.node);
var icon = new Element("div", {
"styles": this.css.iconNodeIcon
}).inject(this.iconNode);
var text = new Element("div", {
"styles": this.css.iconNodeText,
"text": "WpsOffice2"
}).inject(this.iconNode);
this.setIcon();
},
_loadNodeStyles: function(){
this.iconNode = this.node.getElement("div").setStyles(this.css.iconNode);
this.iconNode.getFirst("div").setStyles(this.css.iconNodeIcon);
this.iconNode.getLast("div").setStyles(this.css.iconNodeText);
this.setIcon();
},
setIconNode: function(img, txt, color, width){
if (this.iconNode){
this.iconNode.setStyle("width", width);
var icon = this.iconNode.getFirst();
var text = this.iconNode.getLast();
icon.setStyle("background-image", "url("+this.path+this.options.style+"/icon/"+img+".png)");
text.set("text", txt);
text.setStyles({
"color": color,
"width": width-34
});
}
},
setIcon: function(){
if (this.json.officeType=="word"){
this.setIconNode("word", "Word", "#2b5797", 90);
}
if (this.json.officeType=="excel"){
this.setIconNode("excel", "Excel", "#1e7145", 86);
}
if (this.json.officeType=="ppt"){
this.setIconNode("ppt", "PowerPoint", "#d04525", 130);
}
if (this.json.officeType=="other"){
this.setIconNode("office", "Office", "#f36523", 96);
}
},
_setEditStyle_custom: function(name){
if (name=="officeType"){
this.setIcon();
}
},
setNodeContainer:function(){
this.node.empty();
this.iconNode = new Element("div", {
"styles": this.css.iconNode
}).inject(this.node);
var icon = new Element("div", {
"styles": this.css.iconNodeIcon
}).inject(this.iconNode);
var text = new Element("div", {
"styles": this.css.iconNodeText,
"text": "WpsOffice2"
}).inject(this.iconNode);
this.setIcon();
if(!layout.serviceAddressList["x_wpsfile2_assemble_control"]){
this.tipNode = new Element("div",{"style":"text-align:center"}).inject(this.node);
this.tipNode.set("html","<h3><font color=red>" + MWF.APPFD.LP.wpsoffice.nosetup + "</font></h3>");
}
this.setIcon();
}
});
{
"moduleNodeMove": {
"border": "2px dashed #ffa200",
"height": "22px",
"line-height": "22px",
"overflow": "hidden",
"margin": "3px",
"display": "block",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "absolute",
"z-index": 10002,
"opacity": 0.7,
"width": "100px",
"cursor": "move",
"background-color": "#EEE"
},
"moduleNodeShow": {
"border": "1px dashed #333",
"height": "2px",
"cursor": "pointer",
"line-height": "22px",
"overflow": "hidden",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"display": "block",
"top": "auto",
"left": "auto",
"width": "auto",
"opacity": 0.5,
"background": "#ffa200"
},
"moduleNode": {
"border": "1px dashed #333",
"min-height": "300px",
"cursor": "pointer",
"line-height": "22px",
"overflow": "hidden",
"margin": "3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"display": "block",
"top": "auto",
"left": "auto",
"width": "auto",
"opacity": 1,
"background-color": "#ffffff"
},
"iconNode": {
"width": "100px",
"height": "34px",
"color": "#999",
"font-size": "12px",
"margin": "auto",
"margin-top": "36px",
// "background": "#FFF",
"position": "static",
"float": "none"
},
"iconNodeIcon":{
"width": "34px",
"height": "34px",
"background": "url("+"../x_component_process_FormDesigner/Module/OnlyOffice/default/icon/office.png) 5px center no-repeat",
"float": "left"
},
"iconNodeText":{
"line-height": "34px",
"height": "34px",
"width": "66px",
"float": "right",
"font-family": "Gadugi",
"font-weight": "bold",
"font-size": "16px",
"color": "#f36523"
}
}
\ No newline at end of file
{
"id": "",
"name": "",
"type": "WpsOffice2",
"description": "",
"officeType": "word",
"template": "",
"isNotLoadNow": false,
"isShowTopArea" : true,
"isShowHeader" : true,
"isShowComment" : false,
"isCooperUsersAvatarVisible" : false,
"showMode" : "normal",
"isBrowserViewFullscreen" : false,
"isIframeViewFullscreen" : false,
"isShowDocMap" : true,
"isBestScale" : false,
"isShowBottomStatusBar" : true,
"isOpenIntoEdit" : false,
"HeaderLeft": true,
"HeaderRight": true,
"FloatQuickHelp": true,
"HistoryVersion": true,
"HistoryRecord": true,
"HistoryVersionDivider": true,
"TabPrintPreview": true,
"MenuPrintPreview": true,
"ReviewTrackChanges": true,
"TrackChanges": true,
"ContextMenuConvene": true,
"Logo": true,
"Cooperation": true,
"More": true,
"SendButton": true,
"CooperHistoryMenuItem": true,
"WriterHoverToolbars": true,
"ReadSetting": true,
"script": {
"code": "",
"html": ""
},
"events": {
"afterOpen": {
"code": "",
"html": ""
},
"beforeOpen": {
"code": "",
"html": ""
},
"afterSave": {
"code": "",
"html": ""
}
},
"properties": {},
"class": "",
"styles": {},
"container": ""
}
<div style="background-color: #FFF; overflow: hidden">
<div title="{{$.lp.base}}" class="MWFTab">
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">{{$.lp.id}}:</td>
<td class="editTableValue"><input type="text" name="id" value="text{$.id}" class="editTableInput"/></td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.name}}:</td>
<td class="editTableValue"><input type="text" name="name" value="text{$.name}" class="editTableInput"/></td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.description}}:</td>
<td class="editTableValue"><input type="text" name="description" value="text{$.description}" class="editTableInput"/></td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.readonly}}:</td>
<td class="editTableValue">
<input type="radio" name="isReadonly" value="true" text{($.isReadonly)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<!-- <tr>-->
<!-- <td class="editTableTitle">延时加载:</td>-->
<!-- <td class="editTableValue">-->
<!-- <input type="radio" name="isNotLoadNow" value="true" text{($.isNotLoadNow)?'checked':''}/>是-->
<!-- <input type="radio" name="isNotLoadNow" value="false" text{(!$.isNotLoadNow)?'checked':''}/>否-->
<!-- </td>-->
<!-- </tr>-->
</table>
<div class="MWFMaplist" name="styles" title="{{$.lp.style}}"></div>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">{{$.lp.type}}:</td>
<td class="editTableValue">
<input class="editTableRadio" onclick="if (this.checked) $('officeTemplateArea').setStyle('display', 'none'); " name="officeType" text{($.officeType=='word')?'checked':''} type="radio" value="word"/>Word<br/>
<input class="editTableRadio" onclick="if (this.checked) $('officeTemplateArea').setStyle('display', 'none'); " name="officeType" text{($.officeType=='excel')?'checked':''} type="radio" value="excel"/>Excel<br/>
<input class="editTableRadio" onclick="if (this.checked) $('officeTemplateArea').setStyle('display', 'none'); " name="officeType" text{($.officeType=='ppt')?'checked':''} type="radio" value="ppt"/>PowerPoint<br/>
<input class="editTableRadio" onclick="if (this.checked) $('officeTemplateArea').setStyle('display', 'block'); " name="officeType" text{($.officeType=='other')?'checked':''} type="radio" value="other"/>{{$.lp.byTemplate}}
</td>
</tr>
<tr>
<td class="editTableTitle">fileName:</td>
<td class="editTableValue"><input type="text" name="fileName" value="text{$.fileName}" class="editTableInput"/></td>
</tr>
</table>
<div id="officeTemplateArea" title="src" style="display: text{($.officeType=='other')?'block':'none'}">
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">模板标识:</td>
<td class="editTableValue">
<input type="text" name="template" value="text{$.template}" class="editTableInput"/>
</td>
</tr>
</table>
</div>
<div class="MWFScriptArea" name="readScript" title="{{$.lp.readonlyCondition}} (S)"></div>
</div>
<div title="{{$.lp.wps.config}}" class="MWFTab">
<div style="height: 28px; font-weight: bold; line-height:28px; background-color: #EEE; padding: 0px 6px; border-top: 1px solid #999">{{$.lp.wps.options}}</div>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">{{$.lp.wps.topArea}}:</td>
<td class="editTableValue">
<input type="radio" name="isShowTopArea" value="true" text{($.isShowTopArea)?'checked':''}/>{{$.lp.wps.show}}
<input type="radio" name="isShowTopArea" value="false" text{(!$.isShowTopArea)?'checked':''}/>{{$.lp.wps.hide}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.headArea}}:</td>
<td class="editTableValue">
<input type="radio" name="isShowHeader" value="true" text{($.isShowHeader)?'checked':''}/>{{$.lp.wps.show}}
<input type="radio" name="isShowHeader" value="false" text{(!$.isShowHeader)?'checked':''}/>{{$.lp.wps.hide}}
</td>
</tr>
<!-- <tr>-->
<!-- <td class="editTableTitle">头像:</td>-->
<!-- <td class="editTableValue">-->
<!-- <input type="radio" name="isCooperUsersAvatarVisible" value="true" text{($.isCooperUsersAvatarVisible)?'checked':''}/>显示-->
<!-- <input type="radio" name="isCooperUsersAvatarVisible" value="false" text{(!$.isCooperUsersAvatarVisible)?'checked':''}/>隐藏-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td class="editTableTitle">{{$.lp.wps.showMode}}:</td>
<td class="editTableValue">
<input type="radio" name="showMode" value="normal" text{($.showMode=='normal')||(!$.showMode)?'checked':''}/>{{$.lp.wps.showMode_normal}}
<br>
<input type="radio" name="showMode" value="simple" text{($.showMode=='simple')?'checked':''}/>{{$.lp.wps.showMode_simple}}
</td>
</tr>
<!-- <tr>-->
<!-- <td class="editTableTitle">浏览器区域全屏:</td>-->
<!-- <td class="editTableValue">-->
<!-- <input type="radio" name="isBrowserViewFullscreen" value="true" text{($.isBrowserViewFullscreen)?'checked':''}/>是-->
<!-- <input type="radio" name="isBrowserViewFullscreen" value="false" text{(!$.isBrowserViewFullscreen)?'checked':''}/>否-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td class="editTableTitle">在iframe区域内全屏:</td>-->
<!-- <td class="editTableValue">-->
<!-- <input type="radio" name="isIframeViewFullscreen" value="true" text{($.isIframeViewFullscreen)?'checked':''}/>是-->
<!-- <input type="radio" name="isIframeViewFullscreen" value="false" text{(!$.isIframeViewFullscreen)?'checked':''}/>否-->
<!-- </td>-->
<!-- </tr>-->
</table>
<div style="height: 28px; font-weight: bold; line-height:28px; background-color: #EEE; padding: 0px 6px; border-top: 1px solid #999">{{$.lp.wps.wordConfig}}</div>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">{{$.lp.wps.comment}}:</td>
<td class="editTableValue">
<input type="radio" name="isShowComment" value="true" text{($.isShowComment)?'checked':''}/>{{$.lp.wps.show}}
<input type="radio" name="isShowComment" value="false" text{(!$.isShowComment)?'checked':''}/>{{$.lp.wps.hide}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.isShowDocMap}}:</td>
<td class="editTableValue">
<input type="radio" name="isShowDocMap" value="true" text{($.isShowDocMap)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="isShowDocMap" value="false" text{(!$.isShowDocMap)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.isBestScale}}:</td>
<td class="editTableValue">
<input type="radio" name="isBestScale" value="true" text{($.isBestScale)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="isBestScale" value="false" text{(!$.isBestScale)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.isShowBottomStatusBar}}:</td>
<td class="editTableValue">
<input type="radio" name="isShowBottomStatusBar" value="true" text{($.isShowBottomStatusBar)?'checked':''}/>{{$.lp.wps.show}}
<input type="radio" name="isShowBottomStatusBar" value="false" text{(!$.isShowBottomStatusBar)?'checked':''}/>{{$.lp.wps.hide}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.isOpenIntoEdit}}:</td>
<td class="editTableValue">
<input type="radio" name="isOpenIntoEdit" value="true" text{($.isOpenIntoEdit)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="isOpenIntoEdit" value="false" text{(!$.isOpenIntoEdit)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
</table>
</div>
<div title="{{$.lp.wps.component}}" class="MWFTab">
<div style="height: 28px; font-weight: bold; line-height:28px; background-color: #EEE; padding: 0px 6px; border-top: 1px solid #999">{{$.lp.wps.isComponent}}</div>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">{{$.lp.wps.HeaderLeft}}:</td>
<td class="editTableValue">
<input type="radio" name="HeaderLeft" value="true" text{($.HeaderLeft)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="HeaderLeft" value="false" text{(!$.HeaderLeft)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.HeaderRight}}:</td>
<td class="editTableValue">
<input type="radio" name="HeaderRight" value="true" text{($.HeaderRight)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="HeaderRight" value="false" text{(!$.HeaderRight)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.FloatQuickHelp}}:</td>
<td class="editTableValue">
<input type="radio" name="FloatQuickHelp" value="true" text{($.FloatQuickHelp)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="FloatQuickHelp" value="false" text{(!$.FloatQuickHelp)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.HistoryVersion}}:</td>
<td class="editTableValue">
<input type="radio" name="HistoryVersion" value="true" text{($.HistoryVersion)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="HistoryVersion" value="false" text{(!$.HistoryVersion)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.HistoryRecord}}:</td>
<td class="editTableValue">
<input type="radio" name="HistoryRecord" value="true" text{($.HistoryRecord)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="HistoryRecord" value="false" text{(!$.HistoryRecord)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.HistoryVersionDivider}}:</td>
<td class="editTableValue">
<input type="radio" name="HistoryVersionDivider" value="true" text{($.HistoryVersionDivider)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="HistoryVersionDivider" value="false" text{(!$.HistoryVersionDivider)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.TabPrintPreview}}:</td>
<td class="editTableValue">
<input type="radio" name="TabPrintPreview" value="true" text{($.TabPrintPreview)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="TabPrintPreview" value="false" text{(!$.TabPrintPreview)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.MenuPrintPreview}}:</td>
<td class="editTableValue">
<input type="radio" name="MenuPrintPreview" value="true" text{($.MenuPrintPreview)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="MenuPrintPreview" value="false" text{(!$.MenuPrintPreview)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.ReviewTrackChanges}}:</td>
<td class="editTableValue">
<input type="radio" name="ReviewTrackChanges" value="true" text{($.ReviewTrackChanges)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="ReviewTrackChanges" value="false" text{(!$.ReviewTrackChanges)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.TrackChanges}}:</td>
<td class="editTableValue">
<input type="radio" name="TrackChanges" value="true" text{($.TrackChanges)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="TrackChanges" value="false" text{(!$.TrackChanges)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.ContextMenuConvene}}:</td>
<td class="editTableValue">
<input type="radio" name="ContextMenuConvene" value="true" text{($.ContextMenuConvene)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="ContextMenuConvene" value="false" text{(!$.ContextMenuConvene)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
</table>
<div style="height: 28px; font-weight: bold; line-height:28px; background-color: #EEE; padding: 0px 6px; border-top: 1px solid #999">{{$.lp.wps.isComponentMobile}}</div>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">{{$.lp.wps.Logo}}:</td>
<td class="editTableValue">
<input type="radio" name="Logo" value="true" text{($.Logo)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="Logo" value="false" text{(!$.Logo)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.Cooperation}}:</td>
<td class="editTableValue">
<input type="radio" name="Cooperation" value="true" text{($.Cooperation)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="Cooperation" value="false" text{(!$.Cooperation)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.More}}:</td>
<td class="editTableValue">
<input type="radio" name="More" value="true" text{($.More)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="More" value="false" text{(!$.More)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.SendButton}}:</td>
<td class="editTableValue">
<input type="radio" name="SendButton" value="true" text{($.SendButton)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="SendButton" value="false" text{(!$.SendButton)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.CooperHistoryMenuItem}}:</td>
<td class="editTableValue">
<input type="radio" name="CooperHistoryMenuItem" value="true" text{($.CooperHistoryMenuItem)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="CooperHistoryMenuItem" value="false" text{(!$.CooperHistoryMenuItem)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.WriterHoverToolbars}}:</td>
<td class="editTableValue">
<input type="radio" name="WriterHoverToolbars" value="true" text{($.WriterHoverToolbars)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="WriterHoverToolbars" value="false" text{(!$.WriterHoverToolbars)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.wps.ReadSetting}}:</td>
<td class="editTableValue">
<input type="radio" name="ReadSetting" value="true" text{($.ReadSetting)?'checked':''}/>{{$.lp.yes}}
<input type="radio" name="ReadSetting" value="false" text{(!$.ReadSetting)?'checked':''}/>{{$.lp.no}}
</td>
</tr>
</table>
</div>
<div title="{{$.lp.event}}" class="MWFTab">
<div class="MWFEventsArea" name="events"></div>
</div>
<div title="HTML" class="MWFTab">
<div class="MWFHTMLArea" style="font-family: Verdana, Geneva, sans-serif; font-size:14px"></div>
</div>
<div title="JSON" class="MWFTab">
<div class="MWFJSONArea" style="font-family: Verdana, Geneva, sans-serif; font-size:14px"></div>
</div>
</div>
......@@ -35,7 +35,9 @@ MWF.xApplication.process.Xform.Button = MWF.APPButton = new Class({
"MWFType": this.json.type
});
if (!this.json.preprocessing) this.node.setStyles(this.form.css.buttonStyles);
if( this.json.properties ){
this.node.set(this.json.properties )
}
}
});
......@@ -35,6 +35,7 @@ MWF.xApplication.process.Xform.require = function(callback){
["process.Xform", "YozoOffice"],
["process.Xform", "OnlyOffice"],
["process.Xform", "WpsOffice"],
["process.Xform", "WpsOffice2"],
["process.Xform", "Attachment"],
["process.Xform", "Actionbar"],
["process.Xform", "Sidebar"],
......
此差异已折叠。
......@@ -229,6 +229,8 @@ MWF.xApplication.service.InvokeDesigner.Invoke = new Class({
this.designer.propertyEnableTokenNode.getElement("option[value='"+ this.data.enableToken +"']").set("selected", true );
this.designer.propertyEnableNode.getElement("option[value='"+ this.data.enable +"']").set("selected", true );
this.designer.propertyRemoteAddrRegexNode.set("value", this.data.remoteAddrRegex || "");
this.designer.propertyLastStartTimeNode.set("text", this.data.lastStartTime || "");
......@@ -236,8 +238,15 @@ MWF.xApplication.service.InvokeDesigner.Invoke = new Class({
this.designer.propertyDescriptionNode.set("value", this.data.description || "");
this.setInvokeUrlText();
this.designer.propertyEnableTokenNode.addEvent("change", this.setInvokeUrlText.bind(this));
if( this.designer.propertyEnableTokenChangeEvent ){
this.designer.propertyEnableTokenNode.removeEvent("change", this.designer.propertyEnableTokenChangeEvent);
}
this.designer.propertyEnableTokenChangeEvent = function(){
this.setInvokeUrlText();
this.checkPropertyTokenNode();
}.bind(this);
this.designer.propertyEnableTokenNode.addEvent("change", this.designer.propertyEnableTokenChangeEvent);
this.designer.propertyEnableTokenChangeEvent();
if(this.page){
this.designer.propertyRequireBodyNode.set("value", this.page.requireBody || "");
......@@ -251,6 +260,16 @@ MWF.xApplication.service.InvokeDesigner.Invoke = new Class({
this.designer.propertyExecuteButton.store("alias", this.data.alias);
this.designer.propertyExecuteButton.store("name", this.data.name);
},
checkPropertyTokenNode: function(){
var enableToken = true;
this.designer.propertyEnableTokenNode.getElements("option").each( function(option){
if( option.selected ){
enableToken = (option.value == "true");
}
});
this.designer.propertyTokenNode.getPrevious().setStyle("display", enableToken ? "" : "none" );
this.designer.propertyTokenNode.setStyle("display", enableToken ? "" : "none" );
},
setInvokeUrlText: function(){
debugger
var action = this.designer.actions.action;
......
......@@ -637,6 +637,20 @@ MWF.xApplication.service.InvokeDesigner.Main = new Class({
}
}).inject(this.propertyContentArea);
node = new Element("div", {"styles": this.css.propertyTextNode, "text": this.lp.tokenSetting+":"}).inject(this.propertyContentArea);
this.propertyTokenNode = new Element("select", {"styles": this.css.propertySelectNode }).inject(this.propertyContentArea);
o2.Actions.load("x_program_center").ConfigAction.getToken(function(json){
debugger;
json.data.ssos.each(function(sso){
if( sso.enable ){
new Element("option" , { "value" : sso.key, "text" : sso.client }).inject(this.propertyTokenNode);
}
}.bind(this));
}.bind(this), function(){
return true;
});
new Element("div", {"styles": this.css.propertyTextNode, "text": this.lp.runResult}).setStyles({
"word-break":"break-all",
"height" : "auto",
......@@ -658,11 +672,39 @@ MWF.xApplication.service.InvokeDesigner.Main = new Class({
var id = this.propertyExecuteButton.retrieve("id");
var body = this.propertyRequireBodyNode.get("value");
debugger;
var enableToken = false;
this.propertyEnableTokenNode.getElements("option").each(function(el){
if( el.selected )enableToken = el.get("value") === "true";
});
if( id ){
var address = o2.Actions.getHost("x_program_center");
var serviceName = o2.Actions.load("x_program_center").InvokeAction.action.serviceName;
var uri = o2.Actions.load("x_program_center").InvokeAction.action.actions.execute.uri;
var url = uri.replace("{flag}", alias || name || id);
var uri, url;
if( enableToken ){
uri = o2.Actions.load("x_program_center").InvokeAction.action.actions.executeToken.uri;
var client, key, token;
this.propertyTokenNode.getElements("option").each(function(el){
if( el.selected ){
client = el.get("text");
key = el.get("value");
}
});
if( client && key ){
o2.Actions.load("x_program_center").InvokeAction.token({ client : client }, function(json){
token = json.data.value;
}, null, false);
url = uri.replace("{flag}", alias || name || id).replace("{client}", client).replace("{token}", token);
}else{
this.notice( this.lp.noSSOSetting, "error");
return;
}
}else{
uri = o2.Actions.load("x_program_center").InvokeAction.action.actions.execute.uri;
url = uri.replace("{flag}", alias || name || id);
}
var res = new Request({
url: address + "/" + serviceName + url,
async: false,
......
......@@ -33,7 +33,9 @@ MWF.xApplication.service.InvokeDesigner.LP = {
"run": "Run",
"runSuccess": "Run successfully",
"requireArguments": "Request Arguments",
"tokenSetting": "Authentication Setting",
"runResult": "Execution Result",
"noSSOSetting": "Please configure authentication first",
"notice": {
"save_success": "The interface was saved successfully!",
......
......@@ -29,7 +29,9 @@ MWF.xApplication.service.InvokeDesigner.LP = {
"run": "立即运行",
"runSuccess": "运行成功",
"requireArguments": "请求参数",
"tokenSetting": "鉴权配置",
"runResult": "执行结果",
"noSSOSetting": "请先配置鉴权",
"notice": {
"save_success": "接口保存成功!",
......
......@@ -1167,6 +1167,28 @@
this.o2m.util.navigation.goBack = _o2m_u_navigation_goBack;
//o2m.util.navigation.openOtherApp 功能不完整,有很多限制。暂时不开放
this.o2m.util.navigation.openOtherAppSuccess = function (result) {
console.log("util navigation openOtherApp back, result:" + result);
};
var _o2m_u_navigation_openOtherApp = function (c) {
var onSuccess = c && c.onSuccess ? c.onSuccess : null;
var onFail = c && c.onFail ? c.onFail : null;
if (onSuccess && typeof onSuccess === "function") {
o2m.util.navigation.openOtherAppSuccess = onSuccess;
}
var schema = c && c.schema ? c.schema : "";
var body = {
type: "navigation.openOtherApp",
callback: "o2m.util.navigation.openOtherAppSuccess",
data: {
schema: schema
}
};
_util_post(body, onFail);
};
this.o2m.util.navigation.openOtherApp = _o2m_u_navigation_openOtherApp;
/** ***** BEGIN BIZ BLOCK *****
......@@ -1179,11 +1201,13 @@
o2m.biz.contact.departmentsPicker
o2m.biz.contact.ComplexPicker
o2m.biz.contact.GroupPicker
o2m.biz.file.previewDoc
* ***** END UTIL BLOCK ******/
this.o2m.biz = {
contact: {}
contact: {},
file:{}
};
var _biz_post = function (body, onFail) {
......@@ -1651,4 +1675,56 @@
//o2m.biz.contact.ComplexPicker
this.o2m.biz.file.PreviewDocSuccess = function (result) {
console.log("biz file preview doc back, result:" + result);
};
var _o2m_b_file_preview = function (c) {
var onSuccess = c && c.onSuccess ? c.onSuccess : null;
var onFail = c && c.onFail ? c.onFail : null;
if (onSuccess && typeof onSuccess === "function") {
o2m.biz.file.PreviewDocSuccess = onSuccess;
}
var fileUrl = c && c.url ? c.url : "";
var fileName = c && c.fileName ? c.fileName : "";
var body = {
type: "file.previewDoc",
callback: "o2m.biz.file.PreviewDocSuccess ",
data: {
url: fileUrl,
fileName: fileName
}
};
_biz_post(body, onFail);
};
/**
* 文件预览
* @method PreviewDoc
* @memberOf o2m
* @o2membercategory biz
* @static
* @param {Object} obj PreviewDoc需要传入对象
* <pre><code class='language-js'>{
* url: String, //文件下载地址,比如https://www.o2oa.net/file.pdf
* fileName:String 预览的文件名称,比如file.pdf
* "onSuccess": function, //成功回调
* "onFail": function, //失败回调
* }</code></pre>
* @example
* o2m.biz.file.PreviewDoc({
* url: "https://www.o2oa.net/file.pdf", //文件下载地址
* fileName: "file.pdf",//预览的文件名称
* onSuccess : function(result) {
* //返回结果样例
* {
* result:true,
* message:""
* }
* },
* onFail : function(err) {}
* });
*/
this.o2m.biz.file.PreviewDoc = _o2m_b_file_preview;
})();
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册