export const sourcePicLayoutTpl = `
    <div class="cd-source-content J_sourceContent">
        <div class="cd-source-folder">
            <div class="cd-source-switch">
                <div class="cd-switch-radio J_picSwitch">
                    <input id="J_picCenter{{randomId}}" name="cd-source-tab{{randomId}}" tabType="picCenter" value="J_picCenterTree{{randomId}}" type="radio" {{if switchShowType == 'picCenter'}} checked="true" {{/if}} />
                    <label for="J_picCenter{{randomId}}">图片空间</label>
                    <input id="J_picTu{{randomId}}" name="cd-source-tab{{randomId}}" tabType="picTu" value="J_picTuTree{{randomId}}" type="radio" {{if switchShowType == 'picTu'}} checked="true" {{/if}} />
                    <label for="J_picTu{{randomId}}">商图</label>
                </div>
            </div>
            <div class="cd-add-btns J_picCenterNode">
                <a class="cd-add-folder-btn J_addFileCate"><span class="cd-icons cd-icons-folderAdd"></span>新建文件夹</a>
                <!--<a class="cd-add-folder-btn J_addFileCate" data-type="1"><span class="cd-add-icon"></span>一级分类</a>
                <a class="cd-add-folder-btn J_addFileCate" data-type="2"><span class="cd-add-icon"></span>二级分类</a> -->
            </div>
            <div class="cd-source-folder-list">
                <div class="cd-folder-layout J_folderList" {{if switchShowType == 'picCenter'}} style="display:block;" {{/if}}>
                    <ul class="cd-fold-tree" id="J_picCenterTree{{randomId}}"></ul>
                </div>
                <div class="cd-folder-layout J_folderList" {{if switchShowType == 'picTu'}} style="display:block;" {{/if}}>
                    <ul class="cd-fold-tree" id="J_picTuTree{{randomId}}"></ul>
                </div>
            </div>
        </div>
        <div class="cd-source-area">
            <div class="cd-top-part">
                <div class="cd-source-crumbs J_sourceCrumbs"></div>
                <div class="cd-source-upload">
                   <a class="cd-middle-red-btn cd-file-upload-btn">上传图片<input type="file" class="cd-file J_fileUpload" enctype="multipart/form-data" multiple="" accept=".jpg,.jpeg,.gif,.png"></a>
                   <input type="hidden" class="J_getFileCateId" value="0">
                </div>
                <a class="cd-middle-red-btn cd-legal-material" href="//sucai.jd.com/?userSource=105" target="_blank">正版素材（免费）</a>
            </div>
            <div class="cd-content-part">
                <div class="cd-top-bar">
                    {{if loadType === 'dom'}}
                    <!--批量操作条-->
                    <div class="cd-source-operate">
                        <span class="cd-select-all">
                            <label>
                                <input type="checkbox" class="J_sourceAllCheck">全选
                            </label>
                            <span class="cd-checked-tip">已选<i class="J_nowChooseTotal">0</i>个</span>
                        </span>
                        <span class="cd-operate-wrap J_operateWrap"><span class="cd-mult-operate cd-mult-operate-move J_operateItem" type="move"><i class="cd-icons cd-icons-sourceMove"></i>移动到文件夹</span>
                        <span class="cd-mult-operate cd-mult-operate-code J_operateItem" type="code"><i class="cd-icons cd-icons-sourceCopy"></i>复制链接/代码</span>
                        <span class="cd-mult-operate cd-mult-operate-remove J_operateItem" type="remove"><i class="cd-icons cd-icons-delete16"></i>删除</span></span>
                    </div>
                    {{/if}}
                    <!--搜索条-->
                    <div class="cd-source-search J_picCenterNode" {{if loadType !== 'dom'}}style="float: left;"{{/if}} >
                        <div class="cd-source-order">
                            <label class="cd-select select-lg1">
                                <select name="cd-select-order-{{randomId}}" class="J_sourceOrder J_sourceOrder{{randomId}}">
                                    <option value="createDate-desc" >最新上传在前</option>
                                    <option value="createDate-asc">最新上传在后</option>
                                    <option value="imgName-asc">按图片名升序</option>
                                    <option value="imgName-desc">按图片名降序</option>
                                </select>
                            </label>
                        </div>
                        <div class="cd-source-search-input">
                             <input type="text" placeholder="输入图片名称" class="cd-text-input J_queryFileName"/>
                             <!--<a  class="cd-search-btn cd-middle-black-border-btn J_searchFileBtn">-->
                                <!--搜索-->
                                <!--&lt;!&ndash;<span class="cd-component cd-component-search_4"></span>&ndash;&gt;-->
                             <!--</a>-->
                        </div>
                        <a class="cd-search-btn cd-middle-black-border-btn J_searchFileBtn">搜索</a>
                        <div class="cd-source-search-condition J_sourceSearchCondition"></div>
                        {{if loadType === 'dom'}}
                        <!--<div class="cd-source-delete-btn J_sourceDeleteBtn"><i></i><span>批量删除</span></div>-->
                        {{/if}}
                    </div>
                </div>
                <div class="cd-source-list">
                    <div class="J_sourceListScroll">
                        <ul class="J_sourceList"></ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {{if isShowFooter }}
    <div class="cd-source-footer">
        {{if !zxDesignerPicture}}
        <div class="cd-pic-manage">
            <a href="//conecli.com" target="_blank">进入图片管理</a>
        </div>
        {{/if}}
        <div class="cd-modal-btns">
            <a href="javascript:;"  class="cd-btn-cancel J_sourceCancelBtn">{{cancelBtnText}}</a>
            {{ if !uploadOnly }}
            <a href="javascript:;"  class="cd-btn-ok J_sourceEnsureBtn">{{ensureBtnText}}</a>
            {{ /if }}
         </div>
    </div>
    {{/if}} 
`;
export const sourceVideoLayoutTpl = `
    <div class="cd-source-content J_sourceContent">
        <div class="cd-source-folder">
            <div class="cd-source-folder-list">
                <div class="cd-folder-layout J_folderList" style="display:block;">
                    <ul class="cd-fold-tree" id="J_videoTree{{randomId}}"></ul>
                </div>
            </div>
            <!--<div class="cd-add-btns">-->
                <!--<a class="cd-add-folder-btn"><span class="cd-add-icon"></span>一级分类</a>-->
                <!--<a class="cd-add-folder-btn"><span class="cd-add-icon"></span>二级分类</a> -->
            <!--</div>-->
        </div>
        <div class="cd-source-area" {{ if !${window.page_data.isSDKM} }} style="padding: 0 40px;" {{ /if }}>
            <div class="cd-source-search" {{ if !${window.page_data.isSDKM} }} style="padding: 20px 0;" {{ /if }}>
                <!--sdkm此处需屏蔽-->
                <!--<div class="cd-source-order">-->
                    <!--<label class="cd-select select-lg1">-->
                        <!--<select name="cd-select-order-{{randomId}}" class="J_sourceOrder J_sourceOrder{{randomId}}">-->
                            <!--<option value="">全部</option>-->
                            <!--<option value="1">转码中</option>-->
                            <!--<option value="6">转码失败</option>-->
                            <!--<option value="2">转码完成</option>-->
                            <!--<option value="3">待审核</option>
                            <!--<option value="4">审核成功</option>-->
                            <!--<option value="5">审核失败</option>-->
                        <!--</select>-->
                    <!--</label>-->
                <!--</div>-->
                <!--<div class="cd-source-search-input">-->
                     <!--<input type="text" placeholder="输入视频名称" class="cd-text-input J_queryFileName" />-->
                <!--</div>-->
                <!--<a class="cd-search-btn cd-middle-black-border-btn J_searchFileBtn">搜索</a>-->
                <!--<div class="cd-source-upload" style="flex: 1; text-align: right;">-->
                   <!--<a class="cd-middle-red-btn" href="//conecli.com/video/upload.action?videoType=4" target="_blank">上传视频</a>-->
                <!--</div>-->
                {{ if !${window.page_data.isSDKM} }}
                <div class="cd-source-order">
                    <label class="cd-select select-lg1">
                        <select name="cd-select-order-{{randomId}}" class="J_sourceOrder J_sourceOrder{{randomId}}">
                            <option value="">全部</option>
                            <option value="1">转码中</option>
                            <option value="6">转码失败</option>
                            <option value="2">转码完成</option>
                            <option value="3">待审核</option>
                            <option value="4">审核成功</option>
                            <option value="5">审核失败</option>
                        </select>
                    </label>
                </div>
                <div class="cd-source-search-input">
                     <input type="text" placeholder="输入视频名称" class="cd-text-input J_queryFileName" />
                     <!--<a class="cd-search-btn J_searchFileBtn">-->
                        <!--<span class="cd-component cd-component-search_4"></span>-->
                     <!--</a>-->
                </div>
                <a class="cd-search-btn cd-middle-black-border-btn J_searchFileBtn">搜索</a>
                <div class="cd-source-upload" style="flex: 1; text-align: right;">
                   <a class="cd-middle-red-btn" href="//conecli.com/video/upload.action?videoType=4" target="_blank">上传视频</a>
                </div>
                {{ /if }}
            </div>
            <!--<div class="cd-source-space">-->
                <!--<span>已使用空间<label>35.94</label>M（总共<label>500.00</label>M）有效期至<label>2018-12-04</label></span><a href="#">存储升级</a>-->
            <!--</div>-->
            <div class="cd-source-list cd-video-list">
                <div class="J_sourceListScroll">
                    <ul class="J_sourceList"></ul>
                </div>
            </div>
        </div>
    </div>
    {{if isShowFooter }}
    <div class="cd-source-footer">
        <!--sdkm此处需要屏蔽-->
        <!--<div class="cd-pic-manage">-->
            <!--<a href="//conecli.com/video/list.action" target="_blank">进入视频管理</a>-->
        <!--</div>-->
        {{ if !${window.page_data.isSDKM} }}
        <div class="cd-pic-manage">
            <a href="//conecli.com/video/list.action" target="_blank">进入视频管理</a>
        </div>
        {{ /if }}
        <div class="cd-modal-btns">
            <a href="javascript:;"  class="cd-btn-cancel J_sourceCancelBtn">{{cancelBtnText}}</a>
            <a href="javascript:;"  class="cd-btn-ok J_sourceEnsureBtn">{{ensureBtnText}}</a>
         </div>
    </div>
    {{/if}} 
`;
export const sourcePicListTpl = `
{{if folderList && folderList.length > 0}}
    {{each folderList value index}}  
         <li class="J_folderItem cd-pic-item">	
            <div class="cd-pic-info cd-folder-info J_sourceInfo" data-cateid="{{value.id}}">
                <div class="cd-pic-show" {{if isNewDblclickFolderUser && loadType !== 'dom'}}data-tooltips="data-tooltips" data-direaction="right" data-content="双击打开文件夹哦~"{{/if}}>
                {{if loadType === 'dom'}}
                     <span>
                        <input type="checkbox" id="itemCheckbox{{value.id}}" class="cd-simulink-radio cd-pic-checkbox J_picCheckbox" value="{{value.id}}" />
                        <label for="itemCheckbox{{value.id}}"></label>
                     </span>
                {{/if}}
                </div>		
            </div>	
            <p class="cd-source-name" title="{{value.imgName}}">{{value.name}}</p>		
          </li>
    {{/each}}
{{/if}}
{{if list && list.length > 0}}
    {{each list value index}}  
         <li class="J_picItem cd-pic-item {{if useType === 'new'}}cd-new-item{{/if}} {{format | picLimitFormat value,typeLimit,sizeLimit,loadType}}">	
            {{ if ${window.page_data.isSDKM} }}
            <div class="cd-pic-info J_sourceInfo" data-cateid="{{value.cateId}}" data-id="{{value.imgId}}" data-name="{{value.imgName}}" data-type="{{value.imgType}}" data-width="{{value.imgWidth}}" data-height="{{value.imgHeight}}" data-url="{{value.imgUrl}}"  data-size="{{value.imgSize}}">		
               <div class="cd-pic-show" style="background-image: url('{{value.imgUrl | getLowSmallPicSrc:value.imgWidth,value.imgHeight}}');">
            {{ else }}
            <div class="cd-pic-info J_sourceInfo" data-cateid="{{value.cateId}}" data-id="{{value.imgId}}" data-name="{{value.imgName}}" data-type="{{value.imgType}}" data-width="{{value.imgWidth}}" data-height="{{value.imgHeight}}" data-url="{{value.imgUrl}}">		
                <div class="cd-pic-show" style="background-image: url('{{value.imgUrl | getLowSmallPicSrc:value.imgWidth,value.imgHeight}}');" {{if isNewPreviewUser && loadType === 'dom'}}data-tooltips="data-tooltips" data-direaction="right" data-content="双击图片可预览哦~"{{/if}} >
            {{ /if }}
                     {{if fileSelectType === 'radio'}}
                     <span>
                        <input type="radio" id="itemRadio{{value.imgId}}" class="cd-simulink-radio cd-pic-radio" name="cd-file-select{{randomId}}" value="{{value.imageId}}" />
                        <label for="itemRadio{{value.imgId}}"></label>
                     </span>
                     {{else if fileSelectType === 'checkbox'}}
                     <span>
                        <input type="checkbox" id="itemCheckbox{{value.imgId}}" class="cd-simulink-radio cd-pic-checkbox J_picCheckbox" name="cd-file-select{{randomId}}" value="{{value.imageId}}" />
                        <label for="itemCheckbox{{value.imgId}}"></label>
                     </span>
                     {{/if}}
                </div>
                <div class="cd-pic-limit">
                    <span class="cd-icons cd-icons-whiteNotice"></span>
                    <p>{{value.failedTip}}</p>
                </div>
                <div class="cd-pic-expand">
                   <div class="cd-pic-size">{{value.imgWidth}} x {{value.imgHeight}}</div>			
                   <div class="cd-pic-operate">
                        {{if value.imgType === 'JPEG' || value.imgType === 'JPG' || value.imgType === 'PNG'}}
                        <span class="J_picOperate" data-tooltips data-direction="bottom" type="slice" data-content="裁剪">
                            <span class="cd-icons cd-icons-corpWhite"></span>
                        </span>
                        {{/if}}
                        <span class="J_picOperate" data-tooltips data-direction="bottom" type="imgUrl" data-content="复制地址">
                            <span class="cd-icons cd-icons-linkWhite"></span>
                        </span>
                        <span class="J_picOperate" data-tooltips data-direction="bottom" type="imgCode" data-content="复制代码">
                            <span class="cd-icons cd-icons-icon-code"></span>
                        </span>
                        <span class="J_picOperate" data-tooltips data-direction="bottom" type="remove" data-content="删除">
                            <span class="cd-icons cd-icons-deleteWhite"></span>
                        </span>
                    </div>	
                </div>
            </div>	
            <p class="cd-source-name" title="{{value.imgName}}">{{value.imgName}}</p>		
          </li>
    {{/each}}
{{/if}}
{{if list && folderList && list.length === 0 && folderList.length === 0}}
    <div class="cd-list-empty">
        <div class="cd-icons cd-icons-picListEmpty"></div>
        <div class="cd-empty-tip">{{'图片' | getNoRecoredText}}</div>
    </div>
{{/if}}
`;
export const sourcePicTuListTpl = `
{{if list && list.length > 0}}
    {{each list value index}}  
         <li class="cd-pic-item cd-pic-st {{format | picLimitFormat value,typeLimit,sizeLimit}}">	
            <div class="cd-pic-info J_sourceInfo"  data-id="{{value.id}}" data-name="{{value.keywords}}" data-type="{{value.imgType}}" data-width="{{value.imageWidth}}" data-height="{{value.imageHeight}}" data-url="{{value.imageUrl}}">		
               <div class="cd-pic-show" style="background-image: url('{{value.imageUrl | getLowSmallPicSrc:value.imgWidth,value.imgHeight}}');">
                     <!--{{if format | picLimitFormat}}
                         {{if fileSelectType === 'radio'}}
                         <input type="radio" class="cd-simulink-radio cd-pic-radio" name="cd-file-select{{randomId}}" value="{{value.imageId}}" />
                         {{else if fileSelectType === 'checkbox'}}
                         <input type="checkbox" class="cd-simulink-radio cd-pic-checkbox" name="cd-file-select{{randomId}}" value="{{value.imageId}}" />
                         {{/if}}
                      {{/if}}-->
                </div>
                <!--<div class="cd-pic-limit">
                     <span class="cd-icons cd-icons-whiteNotice"></span>
                     <p>{{value.failedTip}}</p>
                </div>-->
                <div class="cd-pic-expand">
                   <div class="cd-pic-size">{{value.imageWidth}} x {{value.imageHeight}}</div>			
                   <!--<div class="cd-pic-operate">
                        {{if value.imgType === 'JPEG' || value.imgType === 'JPG' || value.imgType === 'PNG'}}
                        <span class="J_picOperate" data-tooltips data-direction="bottom" type="slice" data-content="裁剪">
                            <span class="cd-icons cd-icons-icon-slice"></span>
                        </span>
                        {{/if}}
                        <span class="J_picOperate" data-tooltips data-direction="bottom" type="imgUrl" data-content="地址">
                            <span class="cd-icons cd-icons-icon-link"></span>
                        </span>
                        <span class="J_picOperate" data-tooltips data-direction="bottom" type="remove" data-content="删除">
                            <span class="cd-icons cd-icons-delete"></span>
                        </span>
                    </div>	-->
                </div>
            </div>	
            <p class="cd-source-name" title="{{value.keywords}}">{{value.keywords}}</p>		
          </li>
    {{/each}}
{{else}}
    <div class="cd-list-empty">
        <div class="cd-icons cd-icons-picListEmpty"></div>
        <div class="cd-empty-tip">暂无搜索结果</div>
    </div>
{{/if}}
`;
export const sourceVideoListTpl = `
{{if list && list.length > 0}}
    {{each list value index}}  
         <li class="cd-video-item {{value.agentVideoId | getItemhasChoosedClass currentChooseIds}}">
            {{ if ${window.page_data.isSDKM} }}
            <div class="cd-video-info J_sourceInfo" data-playUrl="{{value.videoUrl}}" data-videoWidth="{{value.vwidth}}" data-videoHeight="{{value.vheight}}" data-id="{{value.videoId}}" data-agentId="{{value.agentVideoId}}" data-name="{{value.videoName}}" data-size="{{value.videoSize}}" data-type="{{value.videoType}}" data-status="{{value.status}}" data-time="{{value.time}}" data-imgurl="{{value.imageUrl}}">
            {{ else }}
            <div class="cd-video-info J_sourceInfo" data-id="{{value.videoId}}" data-agentId="{{value.agentVideoId}}" data-name="{{value.videoName}}" data-size="{{value.videoSize}}" data-type="{{value.videoType}}" data-status="{{value.status}}" data-time="{{value.time}}" data-imgurl="{{value.imageUrl}}">
            {{ /if }}
               <div class="cd-video-show" style="background-image: url('{{value.imageUrl}}');"></div>
            {{if value.status == 4}}
                 {{if fileSelectType === 'radio'}}
                 <span class="cd-check-wrap">
                     <input type="radio" id="itemRadio{{value.videoId}}" {{value.agentVideoId | getItemhasChoosedChecked currentChooseIds}} class="cd-simulink-radio cd-video-radio" name="cd-file-select{{randomId}}" value="{{value.imageId}}" />
                     <label for="itemRadio{{value.videoId}}"></label>
                 </span>
                 {{else if fileSelectType === 'checkbox'}}
                 <span class="cd-check-wrap">
                    <input type="checkbox" id="itemCheckbox{{value.videoId}}" {{value.agentVideoId | getItemhasChoosedChecked currentChooseIds}} class="cd-simulink-radio cd-video-checkbox" name="cd-file-select{{randomId}}" value="{{value.imageId}}" />
                    <label for="itemCheckbox{{value.videoId}}"></label>
                 </span>
                 {{/if}}
               {{else}}
                    <div class="cd-video-mask">
                        <span class="cd-icons cd-icons-whiteNotice"></span>
                        {{if value.status == 3}}
                        <p>待审核</p>
                        {{else if value.status == 5}}
                        <p>审核失败</p>
                        <p><span class="cd-fail-desc J_failDesc" data-tooltips data-direction="bottom" data-content="{{value.verifyDesc}}">详情</span></p>
                        {{/if}}
                    </div>
               {{/if}}
               <p class="cd-video-time">{{value.time | sourceTimeFormat}}</p>
             </div>	
             <p class="cd-source-name" title="{{value.videoName}}">{{value.videoName}}</p>		
          </li>
    {{/each}}
{{else}}
    <div class="cd-list-empty">
        <div class="cd-icons cd-icons-videoListEmpty"></div>
        <div class="cd-empty-tip">{{'视频' | getNoRecoredText}}</div>
    </div>
{{/if}}
`;