{
	"client": "pc",
	"positionType": "absolute",
	"bgColorMode": "light",
	"components": [
		{
			"components": [
				{
					"type": "Button",
					"id": "button_clear",
					"value": "清空",
					"labelHeight": "30",
					"imageWidth": 24,
					"imageHeight": 24,
					"styles": {
						"cursor": "pointer",
						"padding-left": "10px",
						"padding-right": "10px",
						"text-align": "center",
						"width": "70px"
					},
					"theme": "round",
					"buttonType": "info",
					"onClick": "button_clear_onClick()"
				},
				{
					"buttonType": "primary",
					"imageHeight": 24,
					"imageWidth": 24,
					"onClick": "onOK()",
					"styles": {
						"cursor": "pointer",
						"padding-left": "10px",
						"padding-right": "10px",
						"text-align": "center",
						"width": "70px",
						"margin-left": "10px"
					},
					"type": "Button",
					"value": "确定",
					"id": "button_ok",
					"theme": "round"
				},
				{
					"buttonType": "default",
					"onClick": "tfp.closeCurDialog()",
					"styles": {
						"cursor": "pointer",
						"text-align": "center",
						"margin-left": "10px"
					},
					"theme": "round",
					"type": "Button",
					"value": "关闭",
					"id": "button_cancel"
				}
			],
			"id": "panel_bottom",
			"styles": {
				"bottom": "0",
				"height": "50px",
				"left": "0",
				"overflow": "auto",
				"position": "absolute",
				"right": "0"
			},
			"type": "Panel",
			"style": "display:flex;justify-content:center;align-items:center;"
		},
		{
			"checkAllChildOnCheckParent": true,
			"checkParentOnCheckChild": true,
			"id": "tree1",
			"leafNodeIdFieldName": "id",
			"leafNodeNameFieldName": "name",
			"leafNodeParentIdFieldName": "parent_id",
			"loadDataService": "serviceGetDeps",
			"multiCheck": true,
			"nodeDataMember": "deps",
			"nodeIdFieldName": "id",
			"nodeNameFieldName": "name",
			"nodeParentIdFieldName": "parent_id",
			"rootNodeParentId": "0",
			"showNodeCheckbox": true,
			"styles": {
				"border": "1px solid #cccccc",
				"bottom": "60px",
				"left": "15px",
				"position": "absolute",
				"right": "15px",
				"top": "15px",
				"z-index": 1
			},
			"type": "Tree",
			"unCheckAllChildOnUnCheckParent": true,
			"unCheckParentOnUnCheckAllChild": true
		},
		{
			"autoShowError": true,
			"bindComponents": [
				"tree1"
			],
			"id": "serviceGetDeps",
			"path": "sys/service/dep/getListAll.js",
			"type": "Service"
		}
	],
	"framework": "tfp",
	"height": "480px",
	"id": "divTFPPage",
	"jsFuncs": [
		{
			"args": [],
			"code": "  var deps;\n  var valueType = tfp.getUrlArg(\"valueType\");\n  if(valueType==\"obj\") {\n      let arr = tree1.getCheckedNodes(true);\n      if(arr.length==0) {\n          alert(\"请选择部门！\");\n          return;\n      }\n    deps = [];\n    for(var i=0;i<arr.length;i++) {\n      deps.push({\n        id: arr[i].data.id,\n        code: arr[i].data.code,\n        name: arr[i].data.name\n      });\n    }\n  } else {\n      deps = tree1.getCheckedNodesValue();\n      if(deps==\"\") {\n          alert(\"请选择部门！\");\n          return;\n      }\n  }\n  var dialog = tfp.getCurDialog();\n  if(tfp.getUrlArg(\"callback\")) {\n      eval(\"dialog.opener.\"+tfp.getUrlArg(\"callback\")+\"(deps)\");\n  } else if(tfp.getUrlArg(\"cptId\")) {\n      dialog.opener[tfp.getUrlArg(\"cptId\")].onSelected(deps);\n  }\n  tfp.closeCurDialog();\n",
			"comment": "",
			"editType": "code",
			"name": "onOK"
		},
		{
			"name": "button_clear_onClick",
			"comment": "点击时",
			"editType": "code",
			"args": [],
			"code": "  let cptId = tfp.getUrlArg(\"cptId\")\n  tfp.getCurDialog().opener.$(\".tfp-dep\").children(\"input\").val('');\n  tfp.getCurDialog().opener[cptId].value ={ };\n  tfp.closeCurDialog();\n"
		}
	],
	"jsGlobalVars": [],
	"pageType": "dialog",
	"styleSheets": [],
	"title": "选择部门",
	"type": "Page",
	"styles": {
		"background-color": "#FFFFFF"
	},
	"width": "480px"
}