| | |
| | | <Property name="dataType">DateTime</Property> |
| | | <Property name="label">更新时间</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="fileId"> |
| | | <Property></Property> |
| | | <Property name="label">鸟瞰图id</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="fileName"> |
| | | <Property></Property> |
| | | <Property name="label">鸟瞰图</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="videoId"> |
| | | <Property></Property> |
| | | <Property name="label">视频附件id</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="videoName"> |
| | | <Property></Property> |
| | | <Property name="label">简介视频</Property> |
| | | </PropertyDef> |
| | | </DataType> |
| | | </Model> |
| | | <View layout="regionPadding:10"> |
| | | <View> |
| | | <ClientEvent name="onClick">/**
 |
| | | * 预览视频
 |
| | | */
 |
| | | showVideo = function(){
 |
| | | var cur = view.get("#dsMain.data:#");
 |
| | | var fileName = cur.get("fileId");
 |
| | | if(!fileName){
 |
| | | $alert("没有上传视频信息,无法预览。");
 |
| | | return;
 |
| | | }
 |
| | | var id = cur.get("id");
 |
| | | 
 |
| | | view.get("#iFrameVideo").set("path", "./dzhwk/dept-video?id=" + id);
 |
| | | view.get("#dialogVideo").show();
 |
| | | 
 |
| | | }; |
| | | /**
 |
| | | * 预览图片
 |
| | | */
 |
| | | showImg = function(){
 |
| | | var cur = view.get("#dsMain.data:#");
 |
| | | var fileName = cur.get("fileId");
 |
| | | if(!fileName){
 |
| | | $alert("没有上传视频信息,无法预览。");
 |
| | | return;
 |
| | | }
 |
| | | var id = cur.get("id");
 |
| | | 
 |
| | | view.get("#iFrameImg").set("path", "./dzhwk/dept-img?id=" + id);
 |
| | | view.get("#dialogImg").show();
 |
| | | 
 |
| | | };</ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dsMain"> |
| | | <Property name="dataProvider">deptPR#getData</Property> |
| | | <Property name="dataType">[dtMain]</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">
 |
| | | var select = view.get("#dgMain").get("selection");
 |
| | | <Container> |
| | | <Property name="exClassName">c-data</Property> |
| | | <ToolBar> |
| | | <ToolBarLabel> |
| | | <Property name="text">菜单栏:</Property> |
| | | <Property name="exClassName">menu-bar-caption</Property> |
| | | </ToolBarLabel> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#dialogMain").show();;
 |
| | | }else{
 |
| | | $notify("请选择需要修改的数据……");
 |
| | | } </ClientEvent> |
| | | <Property name="caption">详情编辑</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-pencil</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick"> 
 |
| | | var select = view.get("#dgMain").get("selection");
 |
| | | $notify("请选择需要编辑的数据……");
 |
| | | }</ClientEvent> |
| | | <Property name="caption">详情编辑</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-pencil</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#ajaxDel").set("parameter",select).execute(function(){
 |
| | | select.remove();
 |
| | | });
 |
| | | select.remove();
 |
| | | });
 |
| | | }else{
 |
| | | $notify("请选择需要删除的数据……");
 |
| | | }</ClientEvent> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-trash-o</Property> |
| | | </Button> |
| | | </Container> |
| | | <Container layout="regionPadding:10" layoutConstraint="center"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <DataGrid id="dgMain"> |
| | | <ClientEvent name="onDataRowDoubleClick">var dialog= view.get("#dialogMain");
 |
| | | dialog.show();</ClientEvent> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-trash-o</Property> |
| | | </ToolBarButton> |
| | | </ToolBar> |
| | | <DataGrid id="dgMain" layoutConstraint="padding:15px 0px 0px 0px"> |
| | | <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="selectionMode">singleRow</Property> |
| | |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Container> |
| | | <Dialog id="dialogMain"> |
| | | <Dialog id="dialogMain" layout="regionPadding:10"> |
| | | <Property name="iconClass">fa fa-pencil-square-o</Property> |
| | | <Property name="caption">库区信息</Property> |
| | | <Property name="width">1200</Property> |
| | | <Property name="closeable">false</Property> |
| | |
| | | </Button> |
| | | </Buttons> |
| | | <Children> |
| | | <FieldSet layout="padding:15"> |
| | | <FieldSet layout="padding:5"> |
| | | <Property name="caption">基本信息</Property> |
| | | <Buttons/> |
| | | <Children> |
| | |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | | <FieldSet layout="padding:5"> |
| | | <Property name="caption">鸟瞰图</Property> |
| | | <Buttons/> |
| | | <Children> |
| | | <AutoForm> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="cols">*,*</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="labelSeparator"> : </Property> |
| | | <Property name="labelWidth">120</Property> |
| | | <AutoFormElement> |
| | | <Property name="name">fileName</Property> |
| | | <Property name="property">fileName</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="editorType">Label</Property> |
| | | <Editor> |
| | | <TextEditor> |
| | | <Property name="blankText"> -- 系统自动生成 --</Property> |
| | | </TextEditor> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <Container> |
| | | <Button layoutConstraint="left"> |
| | | <Property name="action">uploadFileImg</Property> |
| | | <Property name="caption">鸟瞰图上传...</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | | </Button> |
| | | <Label layoutConstraint="left"> |
| | | <Property name="width">10px</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left "> |
| | | <ClientEvent name="onClick">showImg();</ClientEvent> |
| | | <Property name="caption">鸟瞰图预览</Property> |
| | | <Property name="exClassName">btn4</Property> |
| | | <Property name="iconClass">fa fa-picture-o</Property> |
| | | </Button> |
| | | </Container> |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | | <FieldSet layout="padding:5"> |
| | | <Property name="caption">简介视频</Property> |
| | | <Buttons/> |
| | | <Children> |
| | | <AutoForm> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="cols">*,*</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="labelSeparator"> : </Property> |
| | | <Property name="labelWidth">120</Property> |
| | | <AutoFormElement> |
| | | <Property name="name">videoName</Property> |
| | | <Property name="property">videoName</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="editorType">Label</Property> |
| | | <Editor> |
| | | <TextEditor> |
| | | <Property name="blankText"> -- 系统自动生成 --</Property> |
| | | </TextEditor> |
| | | </Editor> |
| | | </AutoFormElement> |
| | | <Container> |
| | | <Button layoutConstraint="left"> |
| | | <Property name="action">uploadFileVideo</Property> |
| | | <Property name="caption">视频上传...</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-cloud-upload</Property> |
| | | </Button> |
| | | <Label layoutConstraint="left"> |
| | | <Property name="width">10px</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left "> |
| | | <ClientEvent name="onClick">showVideo();</ClientEvent> |
| | | <Property name="caption">视频预览</Property> |
| | | <Property name="exClassName">btn4</Property> |
| | | <Property name="iconClass">fa fa-picture-o</Property> |
| | | </Button> |
| | | </Container> |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | | </Children> |
| | | <Tools/> |
| | | </Dialog> |
| | | <Dialog id="dialogImg"> |
| | | <Property name="width">1000</Property> |
| | | <Property name="height">640</Property> |
| | | <Property name="iconClass">fa fa-tasks</Property> |
| | | <Property name="caption">鸟瞰图预览</Property> |
| | | <Buttons/> |
| | | <Children> |
| | | <IFrame id="iFrameImg"> |
| | | <Property name="width">100%</Property> |
| | | </IFrame> |
| | | </Children> |
| | | <Tools/> |
| | | </Dialog> |
| | | <Dialog id="dialogVideo"> |
| | | <Property name="width">1000</Property> |
| | | <Property name="height">640</Property> |
| | | <Property name="iconClass">fa fa-tasks</Property> |
| | | <Property name="caption">视频预览</Property> |
| | | <Buttons/> |
| | | <Children> |
| | | <IFrame id="iFrameVideo"> |
| | | <Property name="width">100%</Property> |
| | | </IFrame> |
| | | </Children> |
| | | <Tools/> |
| | | </Dialog> |
| | |
| | | </DataPilot> |
| | | </Container> |
| | | </CustomDropDown> |
| | | <UploadAction id="uploadFileImg"> |
| | | <ClientEvent name="onFileUploaded">var fileId = arg.returnValue;
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("fileId",fileId);
 |
| | | data.set("fileName",arg.file.name);</ClientEvent> |
| | | <Property name="fileResolver">fileUploadManage#imgFile</Property> |
| | | <Property name="maxFileSize">50MB</Property> |
| | | <Filters/> |
| | | </UploadAction> |
| | | <UploadAction id="uploadFileVideo"> |
| | | <ClientEvent name="onFileUploaded">var videoId = arg.returnValue;
 |
| | | var data = view.get("#dsMain.data:#");
 |
| | | data.set("videoId",videoId);
 |
| | | data.set("videoName",arg.file.name);</ClientEvent> |
| | | <Property name="fileResolver">fileUploadManage#videoFile</Property> |
| | | <Property name="maxFileSize">500MB</Property> |
| | | <Filters/> |
| | | </UploadAction> |
| | | </View> |
| | | </ViewConfig> |