{ "type" : "page", "title" : "查看新闻", "body" : { "type" : "crud", "api" : "/api/flow/OA_NEWSMANAGE_SEARCH_LOOK", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "TITLE", "label" : "主题", "type" : "input-text" }, { "name" : "NEWTYPE", "label" : "新闻类型", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/NEWS_TYPE" }, { "name" : "IMPORTANT", "label" : "重要级别", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/Important" }, { "name" : "ISDEL", "label" : "是否删除", "hidden" : true, "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO", "value" : "0" }, { "name" : "ISSEND", "label" : "是否发布", "hidden" : true, "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO", "value" : "1" }, { "name" : "USERSEND_ID", "label" : "发布人", "type" : "picker", "clearable" : true, "source" : "/api/picker/76d2f950-ef40-4eff-89ec-98ad9a4976b9/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] }, "placeholder" : "请点击右侧的图标" }, { "name" : "SENDTIME", "label" : "发布时间", "type" : "input-datetime" }, { "name" : "ISSHOW", "label" : "显示/隐藏", "hidden" : true, "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO", "value" : "0" } ] }, "columns" : [ { "name" : "OA_NEWSMANAGE_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "TITLE", "label" : "主题", "width" : 400 }, { "name" : "NEWTYPE", "label" : "新闻类型", "width" : 100, "type" : "mapping", "map" : { "0" : "普通", "1" : "图片" } }, { "name" : "IMPORTANT", "label" : "重要级别", "width" : 100, "type" : "mapping", "map" : { "0" : "一般", "1" : "重要" } }, { "name" : "ISDEL", "label" : "是否删除", "width" : 200, "type" : "mapping", "map" : { "0" : "否", "1" : "是" }, "toggled" : false }, { "name" : "ISSEND", "label" : "是否发布", "width" : 200, "type" : "mapping", "map" : { "0" : "否", "1" : "是" }, "toggled" : false }, { "name" : "USERSEND_ID_DISPLAY__", "label" : "发布人", "width" : 100 }, { "name" : "SENDTIME", "label" : "发布时间", "width" : 200, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ISSHOW", "label" : "显示/隐藏", "width" : 200, "type" : "mapping", "map" : { "1" : "显示", "0" : "隐藏" }, "toggled" : false }, { "name" : "ISTOP", "label" : "是否置顶", "width" : 200, "type" : "mapping", "map" : { "0" : "否", "1" : "是" }, "toggled" : false }, { "name" : "TOPTIME", "label" : "置顶时间", "width" : 200, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ", "toggled" : false } ], "headerToolbar" : [ { "type" : "button", "id" : "收藏", "label" : "收藏", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "收藏", "size" : "lg", "data" : { "&" : "${selectedItems[0]}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/1615a50d-86d5-4b1a-a94d-0eefeb06f334?format=amis", "api" : { "method" : "post", "url" : "/api/flow/OA_NEWSMANAGE_LOAD?__egtpl=1615a50d-86d5-4b1a-a94d-0eefeb06f334", "data" : { "OA_NEWSMANAGE_ID" : "${OA_NEWSMANAGE_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_NEWSCOLLECTION_ADD?__egtpl=1615a50d-86d5-4b1a-a94d-0eefeb06f334", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "查看", "label" : "查看", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "查看", "size" : "lg", "data" : { "&" : "${selectedItems[0]}", "__readonly" : true }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/f4f7a799-da3a-4b96-8b4f-38ea138913c6?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/OA_NEWSMANAGE_LOAD?__egtpl=f4f7a799-da3a-4b96-8b4f-38ea138913c6", "data" : { "OA_NEWSMANAGE_ID" : "${OA_NEWSMANAGE_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "fc374870-1276-4775-ad42-9095def98f7c" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } } }, "pagination" ], "primaryField" : "OA_NEWSMANAGE_ID", "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "fc374870-1276-4775-ad42-9095def98f7c" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }