9494 < div class ="modal-header ">
9595 < button type ="button " class ="close " data-dismiss ="modal " aria-hidden ="true ">
9696 ×
97- < tton >
97+ </ button >
9898 < h4 class ="modal-title " id ="myModalLabel " data-i18n ="resources.text_login "> </ h4 >
9999 </ div >
100100 < table class ="table table-bordered col-md-6 ">
@@ -180,11 +180,11 @@ <h4 class="modal-title" data-i18n="resources.title_share_setting"></h4>
180180 < fieldset >
181181 < ul class ="nav nav-tabs " role ="tablist ">
182182 < li role ="presentation " class ="active ">
183- < a href ="#home " aria-controls ="home " role ="tab " data-toggle ="tab " data-i18n ="resources.title_iPortalQueryResourcesPublic "> </ a >
183+ < a href ="#public " aria-controls ="public " role ="tab " data-toggle ="tab " data-i18n ="resources.title_iPortalQueryResourcesPublic "> </ a >
184184 </ li >
185185 </ ul >
186186 < div class ="tab-content ">
187- < div role ="tabpanel " class ="tab-pane active " id ="home ">
187+ < div role ="tabpanel " class ="tab-pane active " id ="public ">
188188
189189 </ div >
190190 </ div >
@@ -511,6 +511,48 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
511511 } )
512512 }
513513 }
514+ //调用资源update接口,模拟服务metadata对象(所有字段) 提交后端 防止因为后端返回metadata对象为空 造成属性提交报错的问题(如果有变化 就替换 否则提交默认值)
515+ var entity = {
516+ metadata : {
517+ dataIdInfo : {
518+ dataIdent : {
519+ idCitation : {
520+ resTitle : ""
521+ } ,
522+ idAbs : "" ,
523+ dataExt : {
524+ exDesc : "" ,
525+ geoEle : {
526+ geoBndBox : {
527+ westBL : "" ,
528+ eastBL : "" ,
529+ southBL : "" ,
530+ northBL : "" ,
531+ } ,
532+ } ,
533+ } ,
534+ } ,
535+ } ,
536+ refSysInfo : {
537+ refSysID : "" ,
538+ mdCoRefSys : {
539+ projection : ""
540+ }
541+ } ,
542+ mdContact : {
543+ rpIndName : "" ,
544+ rpOrgName : "" ,
545+ rpCntInfo : {
546+ cntAddress : {
547+ delPoint : "" ,
548+ EMailAdd : ""
549+ } ,
550+ voiceNum : "" ,
551+ faxNum : ""
552+ }
553+ }
554+ } ,
555+ }
514556 //构造属性对象 提交参数 更改属性值
515557 function updateSelectFeature ( updated , data ) {
516558 switch ( updated . key ) {
@@ -661,21 +703,22 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
661703 item . sourceJSON . title = attributes . title ;
662704 break ;
663705 case 'SERVICE' :
664- item . sourceJSON . metadata . dataIdInfo . dataIdent . idCitation . resTitle = attributes . title ;
706+ entity . metadata . dataIdInfo . dataIdent . idCitation . resTitle = attributes . title ;
665707 item . sourceJSON . tokenRefreshUrl = attributes . tokenRefreshUrl ;
666- item . sourceJSON . metadata . refSysInfo . refSysID = attributes . refSysInfo . refSysID ;
667- item . sourceJSON . metadata . refSysInfo . mdCoRefSys . projection = attributes . refSysInfo . projection ;
668- item . sourceJSON . metadata . dataIdInfo . dataIdent . dataExt . exDesc = attributes . identifier . region ;
669- item . sourceJSON . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . westBL = attributes . bounds . west ;
670- item . sourceJSON . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . eastBL = attributes . bounds . east ;
671- item . sourceJSON . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . southBL = attributes . bounds . south ;
672- item . sourceJSON . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . northBL = attributes . bounds . north ;
673- item . sourceJSON . metadata . mdContact . rpIndName = attributes . contact . personName ;
674- item . sourceJSON . metadata . mdContact . rpOrgName = attributes . contact . orgName ;
675- item . sourceJSON . metadata . mdContact . rpCntInfo . cntAddress . delPoint = attributes . contact . address ;
676- item . sourceJSON . metadata . mdContact . rpCntInfo . cntAddress . EMailAdd = attributes . contact . email ;
677- item . sourceJSON . metadata . mdContact . rpCntInfo . voiceNum = attributes . contact . voiceNum ;
678- item . sourceJSON . metadata . mdContact . rpCntInfo . faxNum = attributes . contact . faxNum ;
708+ entity . metadata . refSysInfo . refSysID = attributes . refSysInfo . refSysID ;
709+ entity . metadata . refSysInfo . mdCoRefSys . projection = attributes . refSysInfo . projection ;
710+ entity . metadata . dataIdInfo . dataIdent . dataExt . exDesc = attributes . identifier . region ;
711+ entity . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . westBL = attributes . bounds . west ;
712+ entity . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . eastBL = attributes . bounds . east ;
713+ entity . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . southBL = attributes . bounds . south ;
714+ entity . metadata . dataIdInfo . dataIdent . dataExt . geoEle . geoBndBox . northBL = attributes . bounds . north ;
715+ entity . metadata . mdContact . rpIndName = attributes . contact . personName ;
716+ entity . metadata . mdContact . rpOrgName = attributes . contact . orgName ;
717+ entity . metadata . mdContact . rpCntInfo . cntAddress . delPoint = attributes . contact . address ;
718+ entity . metadata . mdContact . rpCntInfo . cntAddress . EMailAdd = attributes . contact . email ;
719+ entity . metadata . mdContact . rpCntInfo . voiceNum = attributes . contact . voiceNum ;
720+ entity . metadata . mdContact . rpCntInfo . faxNum = attributes . contact . faxNum ;
721+ item . sourceJSON . metadata = entity . metadata ;
679722 break ;
680723 case "DATA" :
681724 item . sourceJSON . fileName = attributes . title + attributes . filePostfix ;
@@ -712,10 +755,10 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
712755 widgets . alert . showAlert ( "请选择要共享的资源。" , false ) ;
713756 return ;
714757 }
715- $ ( "#home " ) . empty ( ) ;
758+ $ ( "#public " ) . empty ( ) ;
716759 //公开
717760 if ( resourceType === 'MAP' ) {
718- sharePublishDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
761+ sharePublicDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
719762 "<div class='publicPane sub-font' id='search'>" +
720763 "<input type='checkbox'" +
721764 "value='search'" +
@@ -739,7 +782,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
739782 "</div>" +
740783 "</div>" )
741784 } else if ( resourceType === 'SERVICE' ) {
742- sharePublishDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
785+ sharePublicDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
743786 "<div class='publicPane sub-font' id='search'>" +
744787 "<input type='checkbox'" +
745788 "value='search'" +
@@ -756,7 +799,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
756799 "</div>" +
757800 "</div>" )
758801 } else if ( resourceType === 'SCENE' ) {
759- sharePublishDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
802+ sharePublicDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
760803 "<div class='publicPane sub-font' id='search'>" +
761804 "<input type='checkbox'" +
762805 "value='search'" +
@@ -773,7 +816,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
773816 "</div>" +
774817 "</div>" )
775818 } else if ( resourceType === 'DATA' ) {
776- sharePublishDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
819+ sharePublicDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
777820 "<div class='publicPane sub-font' id='search'>" +
778821 "<input type='checkbox'" +
779822 "value='search'" +
@@ -790,7 +833,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
790833 "</div>" +
791834 "</div>" )
792835 } else if ( resourceType === 'INSIGHTS_WORKSPACE' ) {
793- sharePublishDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
836+ sharePublicDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
794837 "<div class='publicPane sub-font' id='search'>" +
795838 "<input type='checkbox'" +
796839 "value='search'" +
@@ -807,7 +850,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
807850 "</div>" +
808851 "</div>" )
809852 } else if ( resourceType === 'MAP_DASHBOARD' ) {
810- sharePublishDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
853+ sharePublicDOM = $ ( "<div class='col-md-4 gallery-item' id='shareCheckboxs'>" +
811854 "<div class='publicPane sub-font' id='search'>" +
812855 "<input type='checkbox'" +
813856 "value='search'" +
@@ -824,7 +867,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
824867 "</div>" +
825868 "</div>" )
826869 }
827- $ ( "#home " ) . append ( sharePublishDOM )
870+ $ ( "#public " ) . append ( sharePublicDOM )
828871 var item = new SuperMap . iPortalResource ( iPortalUrl , { resourceId :shareIds [ 0 ] , resourceType :resourceType } ) ;
829872 item . load ( ) . then ( ( ) => {
830873 if ( item . sourceJSON . authorizeSetting && item . sourceJSON . authorizeSetting . length > 0 ) {
0 commit comments