wjx преди 2 години
родител
ревизия
dfb6b73355

+ 7 - 7
src/components/FileBoxAD/components/tree/index.less

@@ -1,14 +1,14 @@
-.tree{
-    // min-width: 199px;
+.tree {
+    // max-width: 180px;
     border-right: 1px solid #efefef;
     height: calc(100vh - 200px);
     margin-right: 5px;
-    overflow-x:auto;
+    overflow-x: auto;
     overflow-y: auto;
-    >div{
-        // width: 350px;
-    }
-    img{
+    padding-right: 10px;
+    padding-top: 10px;
+
+    img {
         width: 15px;
         margin-right: 5px;
     }

+ 1 - 1
src/components/FileBoxAD/components/tree/index.tsx

@@ -49,7 +49,7 @@ function TreeBox(props: { data: any[], belongUser: any }): any {
         <Tree
             treeData={arr}
             showIcon
-            draggable
+            // draggable
             blockNode
             defaultExpandAll={true}
             autoExpandParent={true}

+ 10 - 7
src/components/FileBoxAD/index.less

@@ -20,6 +20,7 @@
   padding: 10px 0;
   position: relative;
   font-size: 12px;
+  user-select: none;
 
   &:hover {
     background-color: #c5d8f0;
@@ -393,6 +394,7 @@
   justify-content: center;
   margin-bottom: 10px;
   margin-top: 5px;
+  min-height: 32px;
 }
 
 .wxSelect {
@@ -410,21 +412,22 @@
   position: relative;
 
   .pagePreview {
-    display: inline-block;
-    width: 130px;
-    height: 100px;
     position: absolute;
-    top: 0;
-    left: 0;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
     z-index: 10;
     background-color: rgba(0, 0, 0, 0.6);
     color: #FFF;
     font-size: 14px;
-    text-align: center;
-    line-height: 100px;
     opacity: 0;
     transition: opacity 0.3s;
     cursor: pointer;
+    border-radius: 6px;
+    width: 60px;
+    height: 27px;
+    line-height: 27px;
+    text-align: center;
   }
 
   &:hover .pagePreview {

+ 46 - 33
src/components/FileBoxAD/index.tsx

@@ -83,7 +83,7 @@ function FlieBox(props: Props) {
                 </> : <>
                     <li onClick={() => { editFile() }}>编辑</li>
                 </>}
-                {mediaType !== 'PAGE' && !rightClickPup.folder &&  <li onClick={()=>{copy(rightClickPup?.url)}}>复制链接</li>}
+                {mediaType !== 'PAGE' && !rightClickPup.folder && <li onClick={() => { copy(rightClickPup?.url) }}>复制链接</li>}
                 <li onClick={() => { set({ actionItem: rightClickPup, sortVisible: true }) }}>编辑排序</li>
                 <li onClick={() => { set({ fileVisible: true }) }}>新建文件夹</li>
                 <li onClick={() => { set({ imgVisrible: true }) }}>新建素材</li>
@@ -178,11 +178,11 @@ function FlieBox(props: Props) {
         }
     }, [folderId, moveId, mediaType])
 
-    return <div style={{ display: 'flex', flexFlow: 'row' }}>
+    return <div style={{ display: 'flex', flexFlow: 'row', width: '100%' }}>
         {get_folder_tree?.data?.length > 0 && <div style={{ flexShrink: 0 }}>
             {treeEl}
         </div>}
-        <div style={{ flexShrink: 1 }}>
+        <div style={{ flex: 1, paddingTop: 10 }}>
             <div className={style.files} onContextMenu={rightMenu} style={height ? { height } : {}}>
                 {/* 关联公众号筛选 */}
                 <div className={style.wxSelect}>
@@ -230,9 +230,6 @@ function FlieBox(props: Props) {
                                                     e.preventDefault()
                                                 }}
                                             >
-                                                {/* {isAll && <span className={`${style.select}`} onClick={(e) => { changeClickFile(e, item, isAll, noFile) }}>
-                                                <span role="img" aria-label="check" style={{ color: '#fff' }}><svg viewBox="64 64 896 896" focusable="false" data-icon="check" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path></svg></span>
-                                            </span>} */}
                                                 <img src={fileImg}
                                                     className={style.flex_box_img}
                                                     onClick={(e: any) => { e.stopPropagation(); fileClick(item) }}
@@ -286,28 +283,46 @@ function FlieBox(props: Props) {
                                         switch (topPageElements?.elementType) {
                                             case 'TOP_IMAGE':
                                                 topName = "顶部图片"
-                                                El = <Image src={topPageElements?.topImageSpec?.imageUrl} preview={{ visible: false }} onClick={(e) => { e.stopPropagation(); setPage && setPage(1, item.id) }} />
+                                                El = <Image
+                                                    src={topPageElements?.topImageSpec?.imageUrl}
+                                                    preview={{ visible: false, maskClassName: style.maskClass }}
+                                                    onClick={(e) => {
+                                                        e.stopPropagation()
+                                                        let className = (e.target as any).className
+                                                        if (className === 'ant-image-mask-info') {
+                                                            setPage && setPage(1, item.id)
+                                                        } else {
+                                                            changeClickFile(e, item, isAll, noFile)
+                                                        }
+                                                    }}
+                                                />
                                                 break
                                             case 'TOP_SLIDER':
                                                 topName = "顶部轮播图"
                                                 El = <>
                                                     <Carousel autoplay style={{ width: 150, textAlign: 'center' }}>
                                                         {topPageElements?.topSliderSpec?.imageUrlList?.map((url: string, index: number) => <div key={index}>
-                                                            <Image preview={{ visible: false }} src={url} onClick={(e) => { e.stopPropagation(); /*setImgVisible(true)*/ setPage && setPage(1, item.id) }} />
+                                                            <Image
+                                                                preview={{ visible: false, maskClassName: style.maskClass }}
+                                                                src={url}
+                                                                onClick={(e) => {
+                                                                    e.stopPropagation()
+                                                                    let className = (e.target as any).className
+                                                                    if (className === 'ant-image-mask-info') {
+                                                                        setPage && setPage(1, item.id)
+                                                                    } else {
+                                                                        changeClickFile(e, item, isAll, noFile)
+                                                                    }
+                                                                }} />
                                                         </div>)}
                                                     </Carousel>
-                                                    {/* <div style={{ display: 'none' }}>
-                                                    <Image.PreviewGroup preview={{ visible: imgVisible, onVisibleChange: vis => setImgVisible(vis) }}>
-                                                        {topPageElements?.topSliderSpec?.imageUrlList?.map((item: string, index: number) => <Image src={item} key={index} />)}
-                                                    </Image.PreviewGroup>
-                                                </div> */}
                                                 </>
                                                 break
                                             case 'TOP_VIDEO':
                                                 topName = "顶部视频"
                                                 El = <div className={style.pageVideo}>
-                                                    <span className={style.pagePreview} onClick={(e) => { e.stopPropagation(); setPage && setPage(1, item.id) }}><EyeOutlined /> 预览</span>
-                                                    <video src={topPageElements?.topVideoSpec?.videoUrl} style={{ width: 130, height: 100 }} controls />
+                                                    <div className={style.pagePreview} onClick={(e) => { e.stopPropagation(); setPage && setPage(1, item.id) }}><EyeOutlined /> 预览</div>
+                                                    <video src={topPageElements?.topVideoSpec?.videoUrl} style={{ width: 130, height: 100 }} />
                                                 </div>
                                                 break
                                         }
@@ -352,24 +367,22 @@ function FlieBox(props: Props) {
                 {imgVisrible && <ImgModal isAll={isAll} />}
                 {imgsVisrible && <ImgsModal isAll={isAll} />}
             </div>
-            {
-                listData?.records?.length > 0 && <div className={style.pagination}>
-                    {/* 分页 */}
-                    <Pagination
-                        showSizeChanger
-                        onChange={(page: number, pageSize?: number) => {
-                            getList({ pageSize, pageNum: page })
-                        }}
-                        onShowSizeChange={(current: number, size: number) => {
-                            getList({ pageSize: size, pageNum: current })
-                        }}
-                        pageSizeOptions={['10', '20', '30', '50', '100']}
-                        current={listData?.current}
-                        defaultPageSize={30}
-                        total={listData?.total}
-                    />
-                </div>
-            }
+            <div className={style.pagination}>
+                {/* 分页 */}
+                {listData?.records?.length > 0 && <Pagination
+                    showSizeChanger
+                    onChange={(page: number, pageSize?: number) => {
+                        getList({ pageSize, pageNum: page })
+                    }}
+                    onShowSizeChange={(current: number, size: number) => {
+                        getList({ pageSize: size, pageNum: current })
+                    }}
+                    pageSizeOptions={['10', '20', '30', '50', '100']}
+                    current={listData?.current}
+                    defaultPageSize={30}
+                    total={listData?.total}
+                />}
+            </div>
         </div>
     </div>
 }

+ 1 - 0
src/pages/launchSystemNew/launchManage/createAd/tacticsS/userTactics.tsx

@@ -62,6 +62,7 @@ const UserTactics: React.FC<Props> = ({ setQueryForm: setQuery, setAccountCreate
                 setQuery({ ...queryForm })
                 setAccountCreateLogs(accountCreateLogs)
                 message.success('设置成功')
+                setSelectedRowKeys([])
                 hide()
                 setLoading(false)
                 setVisible(false)

+ 1 - 1
src/pages/launchSystemNew/material/cloud/index.tsx

@@ -43,7 +43,7 @@ function Cloud() {
             {
                 ['IMG', 'VIDEO', 'PAGE'].map((key: any) => {
                     return <TabPane tab={typeEnum[key]} key={key} style={{ backgroundColor: '#fff', padding: '0 15px' }} >
-                        <Tabs onChange={(activeKey: any) => { set({ belongUser: activeKey }) }} activeKey={belongUser} tabBarExtraContent={<Space>
+                        <Tabs tabBarStyle={{ marginBottom: 0 }} onChange={(activeKey: any) => { set({ belongUser: activeKey }) }} activeKey={belongUser} tabBarExtraContent={<Space>
                             {
                                 mediaType === 'PAGE' ? <Button type="primary" size='small' onClick={() => { setVisible(true) }}>新建素材</Button> : <Button size='small' type="primary" onClick={() => { set({ imgVisrible: true }) }}>新建素材</Button>
                             }