<?xml version="1.0" encoding="UTF-8"?>
|
<ViewConfig>
|
<Arguments/>
|
<Context/>
|
<Model/>
|
<View layout="padding:5;regionPadding:5">
|
<Property name="packages">font-awesome,css-common</Property>
|
<Property name="cache">
|
<Property name="mode">clientSide</Property>
|
</Property>
|
<DataSet id="dsMain">
|
<Property name="dataProvider">dicSloganPR#loadData</Property>
|
<Property name="dataType">[dtDicSlogan]</Property>
|
</DataSet>
|
<Container layout="regionPadding:10" layoutConstraint="top">
|
<Property name="exClassName">bg-color</Property>
|
<Property name="height">55</Property>
|
<Property name="contentOverflow">hidden</Property>
|
<Label layoutConstraint="left">
|
<Property name="text">菜单栏:</Property>
|
</Label>
|
<Button layoutConstraint="left">
|
<ClientEvent name="onClick">view.get("#dsMain").insert();
|
view.get("#dialog1").show();
|
</ClientEvent>
|
<Property name="caption">新增</Property>
|
<Property name="exClassName">btn-normal</Property>
|
<Property name="iconClass">fa fa-plus</Property>
|
</Button>
|
<Button layoutConstraint="left">
|
<ClientEvent name="onClick">view.get("#dialog1").show();</ClientEvent>
|
<Property name="caption">修改</Property>
|
<Property name="iconClass">fa fa-cog</Property>
|
<Property name="exClassName">btn-default</Property>
|
</Button>
|
<Button layoutConstraint="left">
|
<ClientEvent name="onClick">var cur = view.get("#dsMain.data:#");
|
if(!cur) return;
|

|
$confirm("确定要删除当前数据么?",function(){
|
cur.remove();
|

|
view.get("#uaMain").execute();
|
});</ClientEvent>
|
<Property name="caption">删除</Property>
|
<Property name="exClassName">btn-warn</Property>
|
<Property name="iconClass">fa fa-trash-o</Property>
|
</Button>
|
<Button layoutConstraint="left">
|
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
|
if(data){
|
$confirm("确认将" + data.get("name") + "推送至大屏?",function(){
|
view.get("#ajaxAction1").set("parameter",data).execute(function(){
|
$notify("推送成功!");
|
view.get("#dsMain").flushAsync ();
|
});
|
});
|
}else{
|
$notify("请选择一条标语");
|
}
|

|
</ClientEvent>
|
<Property name="caption">推送到大屏</Property>
|
<Property name="exClassName">btn-default</Property>
|
<Property name="iconClass">fa fa-upload</Property>
|
</Button>
|
</Container>
|
<Dialog id="dialog1">
|
<Property name="width">500</Property>
|
<Property name="height">300</Property>
|
<Property name="caption">详细</Property>
|
<Buttons>
|
<Button>
|
<ClientEvent name="onClick">view.get("#uaMain").execute(function(result){
|
if(result){
|
$alert(result);
|
}else{
|
$notify("保存成功!!");
|
view.get("#dialog1").hide();
|
}
|
});
|

|
</ClientEvent>
|
<Property name="caption">保存</Property>
|
</Button>
|
<Button>
|
<ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
|
view.get("#dialog1").hide();
|
</ClientEvent>
|
<Property name="caption">取消</Property>
|
</Button>
|
</Buttons>
|
<Children>
|
<AutoForm>
|
<Property name="dataSet">dsMain</Property>
|
<Property name="cols">*</Property>
|
<AutoFormElement>
|
<Property name="name">name</Property>
|
<Property name="property">name</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="property">color</Property>
|
<Property name="name">color</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement layoutConstraint="rowSpan:3">
|
<Property name="name">content</Property>
|
<Property name="property">content</Property>
|
<Property name="editorType">TextArea</Property>
|
<Editor/>
|
</AutoFormElement>
|
</AutoForm>
|
</Children>
|
<Tools/>
|
</Dialog>
|
<DataGrid layoutConstraint="center ">
|
<Property name="dataSet">dsMain</Property>
|
<Property name="readOnly">true</Property>
|
<Property name="selectionMode">singleRow</Property>
|
<RowNumColumn/>
|
<DataColumn name="id">
|
<Property name="property">id</Property>
|
<Property name="visible">false</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="companyId">
|
<Property name="property">companyId</Property>
|
<Property name="visible">false</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="name">
|
<Property name="property">name</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="content">
|
<Property name="property">content</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="status">
|
<Property name="property">status</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="createUser">
|
<Property name="property">createUser</Property>
|
<Property name="visible">false</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="createTime">
|
<Property name="property">createTime</Property>
|
<Property name="visible">false</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="updateUser">
|
<Property name="property">updateUser</Property>
|
<Property name="visible">false</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="updateTime">
|
<Property name="property">updateTime</Property>
|
<Property name="visible">false</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="pushUser">
|
<Property name="property">pushUser</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="pushTime">
|
<Property name="property">pushTime</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
</DataGrid>
|
<UpdateAction id="uaMain">
|
<Property name="dataResolver">dicSloganPR#saveAll</Property>
|
<UpdateItem>
|
<Property name="dataSet">dsMain</Property>
|
</UpdateItem>
|
</UpdateAction>
|
<AjaxAction id="ajaxAction1">
|
<Property name="service">dicSloganPR#push</Property>
|
</AjaxAction>
|
</View>
|
</ViewConfig>
|