20170914

来源:互联网 发布:bi数据分析前景 编辑:程序博客网 时间:2024/06/05 21:50
 $row.val("fNo")
  if (data.state) {
var str = eval(data.response);
for (var i = 0; i < str.length; i++) {
url = DocUtils.InnerUtils.getdocServerAction({
"docPath":str[i].DocPath,
urlPattern:"/repository/file/view/"+str[i].FileID+"/last/content",
isFromAction :false,
context: me.getContext(),
useCookie : false
});
// debugger
// url =  url.indexOf(window.location.protocol) < 1 ? url : window.location.protocol + "//" + window.location.host + url;
Picdata.newData();
Picdata.setValue("fPath",url);
Picdata.setValue("fWorkID",fBZID);
Picdata.saveData();
Picdata.refreshData();
list3.refresh();
}
}
{'backgroundColor':    val("fChoseAnswer") !=null? 'green' :(val("fChoseAnswer")==null || val("fChoseAnswer")==''?'grey':'red')}
{'backgroundColor':  val("fWeightType")=='一般'? 'red' :'blue'}
Model.prototype.Jump = function(event){
//跳转2级


var  data = this.comp("Safety");
var  data1= this.comp("TE_ProduceSetMain");
var   a = data.getValue("fMessCode");
var    state = data.getValue("fMasterTime");


if(state == undefined){


data.setValue("fMasterTime",1);
data.saveData();
var  TE_critica = this.comp("TE_critica");
data1.to(a);
//
var params = new biz.Request.ActionParam();
params.setString("id", a);
// 调用动作
biz.Request.sendBizRequest({
"context" : this.getContext(),
"action" : "getCriticalControlPoint1",
"parameters" : params,
"callback" : function(data) {
// data.ignoreError 是否忽略默认的异常处理,默认值true
data.ignoreError = false;


// data.state 请求返回状态,标识请求是否执行成功
if (data.state) {
var  a = data.response;
a=$.parseJSON(a);
for( var i=0;i<a.length;i++){
TE_critica.newData();
TE_critica.setValue("fNo",i+1);
TE_critica.setValue("fText",a[i].text);
TE_critica.setValue("fSixTime",a[i].state);
TE_critica.setValue("fWeightType",a[i].fWeightType);
}


}
}
});
this.comp("Tab").to("Detail");
}
public static String getCriticalControlPoint1(String id) throws JSONException{
JSONArray jsonArray = new JSONArray();
String str = "select  m.fWeightType as fWeightType,m.fProduceName as fProduceName,m.fIsKey as fIsKey from TE_ProduceSetDetail m where m.fMasterID='"+id+"'";
System.out.println(str);
Table tt = KSQL.select(str, null, "/TeamTreasure/baseSet/data", null);
Iterator<Row> rows = tt.iterator();
while (rows.hasNext()) {
Row row = rows.next();
String fProduceName = row.getString("fProduceName");
String fIsKey = row.getString("fIsKey");
String fWeightType = row.getString("fWeightType");
//
JSONObject jsonObject2 = new JSONObject();
jsonObject2.put("text", fProduceName);
jsonObject2.put("state", fIsKey);
jsonObject2.put("fWeightType",fWeightType);
jsonArray.put(jsonObject2);


}
return jsonArray.toString();
}

var docID = "";
Model.prototype.modelParamsReceive = function(event){
//参数接受事件

var  data = this.comp("SA_DocNode");
var context = this.getContext();
var a = event.params.a1;
docID = event.params.a1;
data.setFilter("Type","SA_DocNode.fDocID ='"+a+"'");
data.refreshData();

// var fileNames = ".gif,.jpg,.chm,.avi,.cmd,.code,.cpp,.css,.dll,.doc,.exe,.fla,.flv,.html,.ini,.mdb,.mp3,.pdf,.php,.ppt,.psd,.rar,.rb,.svg,.ttf,.txt,.wmv,.xls,.xml,.zip";
// var  baasData1 =this.comp("baasData1");
// //each data
// baasData1.each(function(param){
// //遍历赋值
//
// var title= baasData1.getValue("attachmenttitle",param.row);
// //
// var str = title.split('.');
//
// var a  = str[0];
// var b  = str[1];
// var  str1 = title.split("\\");
// var c = str1[1];
// //
//// var url = "$UI/UniteBulidCountry/ProjectTypeMoble/Plan-DangWuZiLiao/img/"+b+".png";
// var url = require.toUrl("../Plan-DangWuZiLiao/img/" + b +".png");
// baasData1.setValueByID("note",url, param.row.getID());
// baasData1.setValueByID("ssize",c, param.row.getID());
// });
};


Model.prototype.button1Click = function(event){
//返回主页
var url = "$UI/TeamTreasure/education/process/education/education.m.w";
var process = "/TeamTreasure/education/process/education/educationProcess";
var activity = "education";
url = url + '?' + 'process=' + process + '&activity=' + activity;


justep.Shell.showPage(url);


};


Model.prototype.modelLoad = function(event){
//初始化


};


Model.prototype.SA_DocNodeAfterRefresh = function(event){
//刷新后事件把图片种类改变
//声明变量
var fileNames = ".gif,.jpg,.chm,.avi,.cmd,.code,.cpp,.css,.dll,.doc,.exe,.fla,.flv,.html,.ini,.mdb,.mp3,.pdf,.php,.ppt,.psd,.rar,.rb,.svg,.ttf,.txt,.wmv,.xls,.xml,.zip";
//
var  SA_DocNode =this.comp("SA_DocNode");
//each data
SA_DocNode.each(function(param){
//遍历赋值
var title= SA_DocNode.getValue("sDocName",param.row);
var fDocID= SA_DocNode.getValue("fDocID",param.row);
var  docPath = SA_DocNode.getValue("fDocPath",param.row);
var  FileID = SA_DocNode.getValue("FileID",param.row);
//
if(fDocID==docID){
    var str = title.split('.');
var a  = str[0];
var b  = str[1];
//
// url1 = DocUtils.InnerUtils.getdocServerAction({
// "docPath":docPath,
// urlPattern:"/repository/file/view/"+FileID+"/last/content",
// isFromAction :false,
// context: this.getContext(),
// useCookie : false
// });
// alert("a"+a);
// alert("b"+b);
//
var url = require.toUrl("../education/img/" + b +".png");
SA_DocNode.setValueByID("sDescription",url, param.row.getID());
// SA_DocNode.setValueByID("sCacheName",url1, param.row.getID()); 
// var abc=SA_DocNode.setValueByID("sCacheName",url1, param.row.getID()); 
// alert(abc);
}
});


};


}

原创粉丝点击