{
 "hidden": false,
 "children": [{
  "configs": {"itemId": "module"},
  "expanded": true,
  "children": [{
   "configs": {
    "layout": "absolute",
    "itemId": "socketWin",
    "dialog": "true",
    "closeAction": "destroy",
    "width": "952",
    "title": "消息编辑",
    "iconCls": "web_icon",
    "autoScroll": "false",
    "modal": "true",
    "frame": "true",
    "height": "336"
   },
   "expanded": true,
   "children": [
    {
     "configs": {
      "itemId": "TASK_BY_ID",
      "hidden": "true",
      "labelAlign": "right",
      "fieldLabel": "发起人ID",
      "x": "601",
      "width": "319",
      "y": "57",
      "labelWidth": "65",
      "value": "{#sys.user#}",
      "height": "22"
     },
     "expanded": false,
     "children": [],
     "type": "text"
    },
    {
     "configs": {
      "itemId": "TASK_BY_NAME",
      "labelAlign": "right",
      "fieldLabel": "发起人",
      "x": "591",
      "width": "329",
      "y": "152",
      "labelWidth": "75",
      "readOnly": "true",
      "value": "{#sys.username#}",
      "height": "22"
     },
     "expanded": false,
     "children": [],
     "type": "text"
    },
    {
     "configs": {
      "itemId": "BUSINESS_KEY",
      "labelAlign": "right",
      "fieldLabel": "业务主键",
      "x": "596",
      "width": "322",
      "y": "181",
      "labelWidth": "70",
      "readOnly": "true",
      "value": "{#businessKey#}",
      "height": "22"
     },
     "expanded": false,
     "children": [],
     "type": "text"
    },
    {
     "configs": {
      "itemId": "BUSINESS_URL",
      "labelAlign": "right",
      "fieldLabel": "业务URL",
      "x": "596",
      "width": "322",
      "y": "237",
      "labelWidth": "70",
      "readOnly": "true",
      "value": "{#url#}",
      "height": "22"
     },
     "expanded": false,
     "children": [],
     "type": "text"
    },
    {
     "configs": {
      "itemId": "TASK_TYPE",
      "labelAlign": "right",
      "fieldLabel": "发送类型",
      "x": "38",
      "width": "233",
      "keyName": "SOCKET_SEND_TYPE",
      "y": "5",
      "labelWidth": "70",
      "value": "single",
      "height": "22"
     },
     "expanded": false,
     "children": [],
     "type": "combo",
     "events": {"select": "var type=combo.value;\
if(type=='dept'){\
\tWb.setDisabled(app.TASK_USER_NAME,true);\
    Wb.setDisabled(app.TASK_DEPT_ID,false);\
}else{\
    Wb.setDisabled(app.TASK_DEPT_ID,true);\
    Wb.setDisabled(app.TASK_USER_NAME,false);\
}"}
    },
    {
     "configs": {
      "itemId": "MSG_INFO",
      "labelAlign": "right",
      "fieldLabel": "消息内容",
      "x": "38",
      "width": "520",
      "y": "96",
      "labelWidth": "70",
      "height": "170"
     },
     "expanded": false,
     "children": [],
     "type": "textarea"
    },
    {
     "configs": {
      "itemId": "TASK_USER_NAME",
      "labelAlign": "right",
      "fieldLabel": "接收方(个人)",
      "x": "18",
      "width": "252",
      "keyName": "WB_USER",
      "y": "32",
      "displayField": "V",
      "labelWidth": "90",
      "valueField": "V",
      "height": "22"
     },
     "expanded": true,
     "children": [],
     "type": "combo",
     "events": {"select": "app.TASK_USER_ID.setValue(records[0].data.K);\
"}
    },
    {
     "configs": {
      "itemId": "TASK_USER_ID",
      "hidden": "true",
      "x": "448",
      "width": "240",
      "y": "8",
      "height": "22"
     },
     "expanded": false,
     "children": [],
     "type": "text"
    },
    {
     "configs": {
      "itemId": "TASK_DEPT_ID",
      "labelAlign": "right",
      "fieldLabel": "接收方(部门)",
      "x": "18",
      "width": "252",
      "y": "61",
      "displayField": "V",
      "labelWidth": "90",
      "disabled": "true",
      "valueField": "K",
      "height": "22"
     },
     "expanded": true,
     "children": [{
      "configs": {
       "itemId": "store",
       "url": "m?xwl=sys/msg/msgSql/deptQuery"
      },
      "expanded": false,
      "children": [],
      "type": "store"
     }],
     "type": "combo"
    },
    {
     "configs": {
      "keyName": "SOCKET_BUS_TYPE",
      "labelWidth": "70",
      "valueField": "V",
      "itemId": "BUSINESS_TYPE",
      "labelAlign": "right",
      "fieldLabel": "业务类型",
      "x": "597",
      "width": "321",
      "y": "209",
      "displayField": "V",
      "value": "{#businessType#}",
      "forceSelection": "false",
      "height": "22"
     },
     "expanded": false,
     "children": [],
     "type": "combo",
     "events": {"select": "var type=records[0].raw[0];\
if(type=='dept'){\
\tWb.setDisabled(app.TASK_USER_NAME,true);\
    Wb.setDisabled(app.TASK_DEPT_ID,false);\
}else{\
    Wb.setDisabled(app.TASK_DEPT_ID,true);\
    Wb.setDisabled(app.TASK_USER_NAME,false);\
}"}
    }
   ],
   "type": "window",
   "events": {"ok": " var dataJson = Wb.getValue(app.socketWin);\
$.ajax({\
  url: \"/agWebSocketControl/sendMsgFromJava\",\
  async: true,\
  data: {\
    msgBean: JSON.stringify(dataJson)\
  },\
  type: \"POST\",\
  success: function(req) {\
    //console.info('success');\
    //请求成功时处理\
    Wb.tip('发送成功');\
    win.close();\
  },\
  complete: function(req) {\
    // console.info('complete');\
  },\
  error: function(req) {\
    Wb.info(req.responseText);\
  }\
});\
"}
  }],
  "type": "module"
 }],
 "roles": {"default": 1},
 "title": "消息窗口(共用)",
 "iconCls": "",
 "inframe": false,
 "pageLink": ""
}