List.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. <script setup name="ChartETAList">
  2. //ETA图库页面
  3. import {ref,reactive,watch,computed} from 'vue'
  4. import { useRouter } from 'vue-router'
  5. import { showToast,showDialog} from "vant";
  6. import { useWindowSize } from '@vueuse/core'
  7. import CatalogTree from './components/CatalogTree.vue';
  8. import CatalogItem from './components/CatalogItem.vue';
  9. import OptionPopup from './components/OptionPopup.vue';
  10. import AddChartToMyETA from './components/AddChartToMyETA.vue';
  11. import TreeSelectPop from './components/TreeSelectPop.vue';
  12. import apiChart from '@/api/chart';
  13. import {chartLibBtn,useAuthBtn} from '@/hooks/useAuthBtn'
  14. import { useNoAuth } from '@/hooks/useNoAuth'
  15. const {checkAuthBtn} = useAuthBtn()
  16. import {useCatalogList} from './hooks/useCatalogList';
  17. const { width } = useWindowSize()
  18. const router=useRouter()
  19. const {
  20. optArrChart,//图表操作列表
  21. currentLang,//中英文标识
  22. catalogNodes,//目录列表
  23. getCatalogList,//获取图库目录
  24. UserInfo,//用户信息
  25. optArrNode,
  26. authOptArr,
  27. } = useCatalogList()
  28. const category = ref('')
  29. //跳转至图表详情页
  30. const goChartDetail = (item)=>{
  31. if(!item.HaveOperaAuth) return showToast(useNoAuth().chart)
  32. router.push({
  33. path:'/chartETA/chartdetail',
  34. query:{
  35. id:item.ChartInfoId,
  36. chartType:item.ChartType,
  37. chartClassifyId:listState.cid,
  38. IsShowMe:listState.IsShowMe,
  39. DateType:item.DateType,
  40. StartDate:(item.DateType===5||item.DateType===6)?item.StartDate:'',
  41. EndDate:(item.DateType===5||item.DateType===6)?item.EndDate:'',
  42. Calendar:item.Calendar?item.Calendar:'公历',
  43. SeasonStartDate:item.SeasonStartDate,
  44. SeasonEndDate:item.SeasonEndDate,
  45. StartYear:item.StartYear
  46. }
  47. })
  48. }
  49. //是否展示目录列表
  50. const IsShowCatalog = ref(false)
  51. //展开的目录
  52. const activeCatalogs = ref([])
  53. //展示目录列表
  54. function showCatalog(){
  55. IsShowCatalog.value = true
  56. }
  57. //切换中英文
  58. async function changeLang(){
  59. const res = await apiChart.setUserLang({
  60. ConfigCode:'chart_language',
  61. ConfigValue:currentLang.value==='EN'?'CN':'EN'
  62. })
  63. if(res.Ret!==200) return
  64. showToast({message:`切换${currentLang.value==='EN'?'中文':'英文'}成功`,type:'success'})
  65. currentLang.value = currentLang.value==='EN'?'CN':'EN'
  66. localStorage.setItem('chartETALange',currentLang.value)
  67. }
  68. //激活的目录路径
  69. const catalogMenu = ref('')
  70. //目录被点击 type:['top'一级目录,'node'二级目录,'item'三级目录]
  71. function catalogItemClick({item,type='node',parent={}}){
  72. const topMenu = type==='top'?item.ChartClassifyName:type==='node'?item.parentName:parent.parentName
  73. const nodeMenu = type==='node'?item.ChartClassifyName:type==='item'?parent.ChartClassifyName:''
  74. const itemMenu = type==='item'?item.ChartClassifyName:''
  75. catalogMenu.value = `${topMenu}${nodeMenu.length?`/${nodeMenu}`:''}${itemMenu.length?`/${itemMenu}`:''}`
  76. listState.cid = item.ChartClassifyId
  77. listState.list=[]
  78. listState.page=1
  79. getChartList()
  80. }
  81. //是否展示操作栏
  82. const showOptPopup = ref(false)
  83. //操作项
  84. const currentOptArr = ref([])
  85. //操作的节点
  86. const currentNode = ref({})
  87. //展示操作栏
  88. function showFileOpt({node,optArr}){
  89. currentNode.value = node
  90. currentOptArr.value = authOptArr(node,optArr)
  91. showOptPopup.value = true
  92. }
  93. //目录/图表操作栏被点击,处理事件(添加图表分类,添加子分类,重命名,删除分类,移动分类,加入我的图库,移动图表)
  94. function showFileOptClick({node,opt}){
  95. const eventMap = {
  96. 'addNext':openEditNameDialog,
  97. 'reName':openEditNameDialog,
  98. 'delete':openDeleteDialog,
  99. 'moveTo':openMoveDialog,
  100. 'addChart':openAddChartDialog,
  101. 'moveChart':openMoveChartDialog,
  102. 'cancel':()=>{showOptPopup.value = false}
  103. }
  104. eventMap[opt.id](node,opt)
  105. }
  106. //编辑目录参数
  107. const editNameState = reactive({
  108. isShowDialog:false,//是否展示编辑名称弹窗
  109. ChartClassifyId:0,//目录id,为0表示新增
  110. ChartClassifyName:'',
  111. Level:1,//层级,大于1时parentName有值
  112. parentNames:[],
  113. parentName:'',//上级目录的名称
  114. type:'addNew',//编辑类型
  115. title:'添加图表分类',//弹窗标题 ['添加图表分类','添加子分类','重命名']
  116. })
  117. //编辑目录
  118. function openEditNameDialog(node,opt){
  119. const {Level,ChartClassifyId,ChartClassifyName,parentName} = node
  120. editNameState.Level = Level
  121. if(editNameState.Level>1){
  122. //找到目录的所有父级目录,并获取目录名称
  123. const parentNodes = findParentNodeHandle(catalogNodes.value,ChartClassifyId)
  124. editNameState.parentNames = parentNodes.reverse().map(i=>i.ChartClassifyName)
  125. opt.id!=='addNext'&&editNameState.parentNames.pop()
  126. }else{
  127. editNameState.parentNames = []
  128. }
  129. editNameState.ChartClassifyId = opt.id==='addNext'?0:ChartClassifyId||0
  130. editNameState.ChartClassifyName = opt.id==='addNext'?'':ChartClassifyName||''
  131. editNameState.parentName = opt.id==='addNext'?ChartClassifyName:parentName||''
  132. editNameState.ParentId=opt.id==='addNext'?node.ChartClassifyId:node.ParentId||0
  133. editNameState.title = opt.label
  134. editNameState.type = opt.id
  135. editNameState.isShowDialog = true
  136. }
  137. //根据editNameState调用对应接口
  138. function handleConfirmEditClassify(){
  139. //先判断输入框有无内容
  140. if(!editNameState.ChartClassifyName.length){
  141. showToast('请填写分类名称!')
  142. return
  143. }
  144. if(editNameState.type==='reName'){
  145. editClassify()
  146. }else{
  147. addNewClassify()
  148. }
  149. }
  150. function handleAddClassifyBeforeClose(action){
  151. return action==='cancel'
  152. }
  153. //添加图表分类,添加子分类
  154. async function addNewClassify(){
  155. const {ChartClassifyName,ParentId,Level} = editNameState
  156. const res = await apiChart.addNewClassify({
  157. ChartClassifyName:ChartClassifyName||'',
  158. Level,
  159. ParentId
  160. })
  161. if(res.Ret!==200) return
  162. showToast({message:'添加成功',type:'success'})
  163. getCatalogList()
  164. editNameState.isShowDialog = false
  165. }
  166. //重命名
  167. async function editClassify(){
  168. const {ChartClassifyId,ChartClassifyName} = editNameState
  169. const res = await apiChart.editClassify({
  170. ChartClassifyId,ChartClassifyName
  171. })
  172. if(res.Ret!==200) return
  173. showToast({message:'重命名成功',type:'success'})
  174. getCatalogList()
  175. editNameState.isShowDialog=false
  176. }
  177. //删除分类
  178. async function openDeleteDialog(node){
  179. const res = await apiChart.deleteCheck({
  180. ChartClassifyId:node.ChartClassifyId,
  181. ChartInfoId:node.ChartInfoId
  182. })
  183. if(res.Ret!==200) return
  184. //可删除包括删除图表和删除图表分类两种情况,但列表里只能删除分类
  185. const hintTextMap = {
  186. 0:'确定删除当前分类吗?',
  187. 1:'该分类下关联图表不可删除!',
  188. 2:'确认删除当前分类及包含的子分类吗?'
  189. }
  190. showDialog({
  191. title: '提示',
  192. message: hintTextMap[res.Data.DeleteStatus||0],
  193. showCancelButton:res.Data.DeleteStatus!==1
  194. }).then(() => {
  195. if(res.Data.DeleteStatus!==1){
  196. apiChart.deleteClassify({
  197. ChartClassifyId:node.ChartClassifyId,
  198. ChartInfoId:node.ChartInfoId
  199. }).then(res=>{
  200. if(res.Ret!==200) return
  201. showToast({message:'删除成功',type:'success'})
  202. getCatalogList()
  203. })
  204. }
  205. }).catch(()=>{})
  206. }
  207. //移动分类参数
  208. const moveClassState = reactive({
  209. isShowPopup:false,//是否显示移动分类弹窗
  210. ClassifyId:0,//移动的分类id
  211. ParentClassifyId:0,//移动至哪个分类下
  212. PrevClassifyId:0,//移动后所处的位置,由于不能拖拽,一直为0
  213. NextClassifyId:0,
  214. Level:1,//用于判断移动的是二级目录还是三级目录
  215. ParentId:0,
  216. isShowPickerPop:false,//是否显示移动二级分类弹窗
  217. isShowTreePop:false,//是否显示移动三级分类弹窗
  218. })
  219. moveClassState.isShowPickerPop = computed(()=>{
  220. return moveClassState.isShowPopup&&moveClassState.Level===2
  221. })
  222. moveClassState.isShowTreePop = computed(()=>{
  223. return moveClassState.isShowPopup&&moveClassState.Level!==2
  224. })
  225. //移动分类
  226. function openMoveDialog(node){
  227. const {ChartClassifyId,Level,ParentId} = node
  228. moveClassState.ClassifyId = ChartClassifyId
  229. moveClassState.Level = Level
  230. moveClassState.ParentId = ParentId
  231. moveClassState.isShowPopup = true
  232. }
  233. function handleMoveClassify({selectedValues}){
  234. moveClassState.ParentClassifyId = selectedValues[0]||0
  235. moveClassify()
  236. }
  237. function closeMoveDialog(){
  238. moveClassState.isShowPopup = false
  239. moveClassState.ClassifyId = 0
  240. moveClassState.ParentClassifyId = 0
  241. moveClassState.PrevClassifyId = 0
  242. moveClassState.NextClassifyId = 0
  243. moveClassState.Level = 1
  244. moveClassState.ParentId = 0
  245. }
  246. async function moveClassify(){
  247. const {ClassifyId,ParentClassifyId,PrevClassifyId,NextClassifyId,Level} = moveClassState
  248. const res = await apiChart.moveClassify({
  249. ClassifyId,ParentClassifyId,PrevClassifyId,NextClassifyId
  250. })
  251. if(res.Ret!==200) return
  252. showToast({message:'移动成功',type:'success'})
  253. await getCatalogList()
  254. //选中移动后的目录,并展开父级目录
  255. const parentNodes = findParentNodeHandle(catalogNodes.value,ClassifyId)
  256. catalogItemClick({
  257. item:parentNodes[0],
  258. type:Level===2?'node':'item',
  259. parent:parentNodes[1]
  260. })
  261. console.log(parentNodes)
  262. /* if(Level===2){
  263. const parentNode = catalogNodes.value.find(node=>node.ChartClassifyId===ParentClassifyId)
  264. const moveNode = parentNode?parentNode.Children.find(node=>node.ChartClassifyId===ClassifyId):null
  265. moveNode&&catalogItemClick({item:moveNode,type:'item',parent:parentNode})
  266. }else{
  267. }
  268. */
  269. moveClassState.isShowPopup = false
  270. }
  271. //找到节点的所有父节点
  272. function findParentNodeHandle(arr, id) {
  273. for (let i of arr) {
  274. if (i.ChartClassifyId === id) {
  275. return [i];
  276. }
  277. if (i.Children) {
  278. let node = findParentNodeHandle(i.Children, id);
  279. if (node) {
  280. return node.concat(i);
  281. }
  282. }
  283. }
  284. }
  285. //添加我的图库参数
  286. const addChartState = reactive({
  287. isShowDialog:false,
  288. chartInfo:{}
  289. })
  290. function openAddChartDialog(node){
  291. addChartState.chartInfo = node
  292. addChartState.isShowDialog = true
  293. }
  294. //移动图表参数
  295. const moveChartState = reactive({
  296. isShowDialog:false,
  297. popTitle:'移动至',
  298. catalogNodes:catalogNodes,
  299. chartInfo:{}
  300. })
  301. function openMoveChartDialog(node){
  302. moveChartState.chartInfo = node
  303. moveChartState.isShowDialog = true
  304. }
  305. async function MoveChart(moveId){
  306. const res = await apiChart.moveChart({
  307. ChartClassifyId:moveId,
  308. ChartInfoId:moveChartState.chartInfo.ChartInfoId,
  309. PrevChartInfoId:0,
  310. NextChartInfoId:0
  311. })
  312. if(res.Ret!==200) return
  313. showToast({message:'移动图表成功',type:'success'})
  314. //如果分类id未0 手动修改移动的图表
  315. if(listState.cid===0){
  316. listState.list.find(item=>{
  317. if(item.ChartInfoId===moveChartState.chartInfo.ChartInfoId){
  318. item.ChartClassifyId = moveId
  319. }
  320. })
  321. }else{//如果在分类下,重新获取chartList
  322. window.scrollTo({top:0})
  323. listState.list=[]
  324. listState.page=1
  325. //设置数据已加载完毕,因为当滚动条不在顶部时,清空列表内容会触发onLoad
  326. listState.finished = true
  327. //这个函数调用完成后,会把finished重置成正确的值
  328. getChartList()
  329. }
  330. moveChartState.isShowDialog = false
  331. }
  332. //图表列表
  333. const listState = reactive({
  334. cid:0,
  335. list:[],
  336. page:1,
  337. pageSize:15,
  338. finished:false,
  339. loading:false,
  340. total:0,
  341. IsShowMe:false
  342. })
  343. //获取图表列表
  344. async function getChartList(){
  345. const {pageSize,cid,page,IsShowMe} = listState
  346. const res = await apiChart.pubChartList({
  347. PageSize: pageSize,
  348. CurrentIndex: page,
  349. ChartClassifyId: cid,
  350. IsShowMe,
  351. IsSelected:category.value
  352. })
  353. if(res.Ret!==200) return
  354. const arr = res.Data?res.Data.List:[]
  355. listState.list = [...listState.list,...arr]
  356. listState.total = res.Data?res.Data.Paging.Totals:0
  357. listState.finished = res.Data?res.Data.Paging.IsEnd:true
  358. listState.loading=false
  359. }
  360. watch(()=>listState.IsShowMe,()=>{
  361. window.scrollTo({top:0})
  362. listState.list=[]
  363. listState.page=1
  364. //设置数据已加载完毕,因为当滚动条不在顶部时,清空列表内容会触发onLoad
  365. listState.finished = true
  366. //这个函数调用完成后,会把finished重置成正确的值
  367. getChartList()
  368. })
  369. //下拉加载
  370. function onLoad(){
  371. if(IsShowCatalog.value) return
  372. listState.page++
  373. getChartList()
  374. }
  375. function onClickTab() {
  376. getCatalogList(category.value)
  377. listState.list=[]
  378. listState.page=1
  379. listState.finished = true
  380. getChartList()
  381. }
  382. getCatalogList()
  383. getChartList()
  384. </script>
  385. <template>
  386. <div class="chart-eta-list-wrap">
  387. <div class="select-wrap">
  388. <div class="search-box">
  389. <van-search
  390. shape="round"
  391. readonly
  392. placeholder="请输入图表名称"
  393. style="flex:1;padding-left:0"
  394. @click-input="$router.push('/chartETA/search')"
  395. />
  396. <div class="lang-icon icon" @click="changeLang" v-permission="chartLibBtn.chartLib_switchEn">
  397. <img v-if="currentLang==='CN'" src="@/assets/imgs/chartETA/lang-icon.png" alt="">
  398. <img v-if="currentLang==='EN'" src="@/assets/imgs/chartETA/langEn-icon.png" alt="">
  399. </div>
  400. <div class="list-icon icon" @click="showCatalog">
  401. <img src="@/assets/imgs/chartETA/list-icon.png" alt="">
  402. </div>
  403. </div>
  404. <p style="font-weight: bold;word-break: break-all;margin-bottom: 5px;">{{ catalogMenu }}</p>
  405. <div class="select-box">
  406. <span>共{{listState.total}}张图表</span>
  407. <span v-permission="chartLibBtn.chartLib_isOnlyMine"> <van-checkbox v-model="listState.IsShowMe">只看我的</van-checkbox></span>
  408. </div>
  409. </div>
  410. <div class="chart-list-wrap">
  411. <van-list
  412. v-model:loading="listState.loading"
  413. :finished="listState.finished"
  414. :finished-text="listState.list.length>0?'没有更多了':'暂无图表'"
  415. :immediate-check="false"
  416. @load="onLoad"
  417. >
  418. <img v-if="listState.list.length==0&&listState.finished" class="list-empty-img" src="https://hzstatic.hzinsights.com/static/ETA_mobile/empty_img.png" alt="">
  419. <ul class="chart-list">
  420. <li
  421. class="chart-list-item"
  422. v-for="item in listState.list"
  423. :key="item.ChartInfoId"
  424. @click="goChartDetail(item)"
  425. >
  426. <div class="title">{{currentLang==='EN'?(item.ChartNameEn||item.ChartName):item.ChartName}}</div>
  427. <img class="img" :src="!item.HaveOperaAuth?useNoAuth().noAuthImg:item.ChartImage" alt="">
  428. <div class="time">
  429. <span>{{item.CreateTime.slice(0,10)}}</span>
  430. <span class="tool-icon" @click.stop="showFileOpt({node:item,optArr:optArrChart})" v-if="authOptArr(item,optArrChart).length&&item.HaveOperaAuth">
  431. <img class="icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
  432. </span>
  433. </div>
  434. </li>
  435. </ul>
  436. </van-list>
  437. </div>
  438. <!-- 目录列表 -->
  439. <van-popup v-model:show="IsShowCatalog" position="right" class="catalog-list-wrap" style="height:100%">
  440. <div class="catalog-list">
  441. <div class="top sticky-part">
  442. <!-- <h3>分类</h3>
  443. <h3>精选资源</h3> -->
  444. <van-tabs v-model:active="category" @click-tab="onClickTab" :ellipsis="false">
  445. <van-tab title="分类"></van-tab>
  446. <van-tab title="精选资源"></van-tab>
  447. </van-tabs>
  448. <van-icon name="cross" @click.stop="IsShowCatalog=false"/>
  449. </div>
  450. <!-- 将目录改为三级 -->
  451. <div class="list-box catalog-tree-wrap">
  452. <van-collapse v-model="activeCatalogs" :border="false">
  453. <van-collapse-item
  454. v-for="catalog in catalogNodes" :key="catalog.UniqueCode" :name="catalog.UniqueCode"
  455. @click.stop="catalogItemClick({item:catalog,type:'top'})">
  456. <template #title>
  457. <CatalogItem
  458. :node="catalog"
  459. :optArr="optArrNode"
  460. :authOptArr="authOptArr"
  461. @showPopup="showFileOpt"/>
  462. </template>
  463. <CatalogTree
  464. :catalog-nodes="catalog.Children"
  465. :showFileOpt="showFileOpt"
  466. :activeId="listState.cid"
  467. @handleCatalogItemClick="catalogItemClick"
  468. />
  469. </van-collapse-item>
  470. </van-collapse>
  471. </div>
  472. <div class="bottom sticky-part" v-if="['rai_admin', 'ficc_admin','admin'].includes(UserInfo.RoleTypeCode)&&checkAuthBtn(chartLibBtn.chartLib_classifyOpt_add)">
  473. <span @click.stop="openEditNameDialog({Level:0},{id:'addNew',label:'添加图表分类'})">添加图表分类</span>
  474. </div>
  475. </div>
  476. </van-popup>
  477. <!-- 操作栏 -->
  478. <OptionPopup
  479. :show-popup="showOptPopup"
  480. :node="currentNode"
  481. :optArr="currentOptArr"
  482. :showFileOptClick="showFileOptClick"
  483. @close="showOptPopup=false"
  484. />
  485. <!-- 添加/重命名一二级分类 弹窗 -->
  486. <van-dialog
  487. v-model:show="editNameState.isShowDialog"
  488. :title="editNameState.title"
  489. show-cancel-button
  490. confirmButtonText="确定"
  491. @confirm="handleConfirmEditClassify"
  492. :before-close="handleAddClassifyBeforeClose"
  493. >
  494. <div class="rename-wrap">
  495. <!-- <div class="label" v-if="editNameState.Level>1||editNameState.type==='addNext'">一级目录:{{editNameState.parentName}}</div> -->
  496. <template v-if="editNameState.Level>1||editNameState.type==='addNext'">
  497. <div class="label" v-for="(name,index) in editNameState.parentNames" :key="index">{{index+1===1?'一':'二'}}级目录:{{name}}</div>
  498. </template>
  499. <input type="text" placeholder="请输入分类名称" v-model="editNameState.ChartClassifyName">
  500. </div>
  501. </van-dialog>
  502. <!-- 移动二级分类 弹窗-->
  503. <van-popup
  504. v-model:show="moveClassState.isShowPickerPop" round :position="width>650?'center':'bottom'" class="move-popup">
  505. <van-picker
  506. title="移动至"
  507. :columns="catalogNodes"
  508. :columns-field-names="{text:'ChartClassifyName',value:'ChartClassifyId'}"
  509. @confirm="handleMoveClassify"
  510. @cancel="closeMoveDialog"
  511. />
  512. </van-popup>
  513. <!-- 移动三级分类 弹窗 -->
  514. <TreeSelectPop
  515. :isShowDialog="moveClassState.isShowTreePop"
  516. popTitle="移动至"
  517. renderType="catalog"
  518. :catalogNodes="catalogNodes"
  519. :chartInfo="moveClassState"
  520. :dialogPosition="width>650?'center':'bottom'"
  521. @close="closeMoveDialog"
  522. @confirmMove="(id)=>{moveClassState.ParentClassifyId=id;moveClassify()}"
  523. />
  524. <!-- 加入我的图库 弹窗 -->
  525. <AddChartToMyETA
  526. :isShowDialog="addChartState.isShowDialog"
  527. :chartInfo="addChartState.chartInfo"
  528. :dialogPosition="width>650?'center':'bottom'"
  529. @close="addChartState.isShowDialog=false"
  530. />
  531. <!-- 移动/另存为图表 弹窗 -->
  532. <TreeSelectPop
  533. :isShowDialog="moveChartState.isShowDialog"
  534. :popTitle="moveChartState.popTitle"
  535. :catalogNodes="moveChartState.catalogNodes"
  536. :chartInfo="moveChartState.chartInfo"
  537. :dialogPosition="width>650?'center':'bottom'"
  538. @close="moveChartState.isShowDialog=false"
  539. @confirmMove="MoveChart"
  540. />
  541. </div>
  542. </template>
  543. <style lang="scss">
  544. .chart-eta-list-wrap{
  545. .catalog-list-wrap{
  546. width: 65%;
  547. }
  548. .rename-wrap{
  549. padding:48px;
  550. input{
  551. padding: 24px 32px;
  552. border-radius: 12px;
  553. background-color: #F6F6F6;
  554. width: 100%;
  555. }
  556. .label{
  557. color: #666666;
  558. margin-bottom: 32px;
  559. text-align: center;
  560. }
  561. }
  562. @media screen and (min-width:$media-width){
  563. .catalog-list-wrap{
  564. width: 30%;
  565. }
  566. .move-popup{
  567. width:375px;
  568. }
  569. .rename-wrap{
  570. padding:24px;
  571. input{
  572. padding: 12px 16px;
  573. border-radius: 6px;
  574. background-color: #F6F6F6;
  575. width: 100%;
  576. }
  577. .label{
  578. margin-bottom: 16px;
  579. }
  580. }
  581. }
  582. }
  583. </style>
  584. <style scoped lang="scss">
  585. .chart-eta-list-wrap{
  586. .select-wrap{
  587. padding: 30px;
  588. position: sticky;
  589. top:0;
  590. background-color: #fff;
  591. .search-box{
  592. display: flex;
  593. align-items: center;
  594. .icon{
  595. margin-left: 10px;
  596. width: 70px;
  597. height:70px;
  598. background-color: #F2F3FF;
  599. border-radius: 50%;
  600. display: flex;
  601. align-items: center;
  602. justify-content: center;
  603. img{
  604. width:45px;
  605. height:45px;
  606. }
  607. }
  608. }
  609. .select-box{
  610. display: flex;
  611. justify-content: space-between;
  612. flex-wrap: wrap;
  613. }
  614. }
  615. .chart-list-wrap{
  616. //margin-top:15px;
  617. padding: 0 30px;
  618. padding-bottom: 30px;
  619. .chart-list{
  620. display: flex;
  621. justify-content: space-between;
  622. flex-wrap: wrap;
  623. gap: 30px 0;
  624. .chart-list-item{
  625. box-sizing: border-box;
  626. width: 330px;
  627. padding: 10px 14px;
  628. border: 1px solid $border-color;
  629. border-radius: 12px;
  630. .title{
  631. min-height: 70px;
  632. overflow: hidden;
  633. -webkit-line-clamp: 2;
  634. text-overflow: ellipsis;
  635. display:-webkit-box !important;
  636. -webkit-box-orient:vertical;
  637. word-break: break-word;
  638. }
  639. .img{
  640. width: 100%;
  641. height: 220px;
  642. display: block;
  643. margin: 10px 0;
  644. }
  645. .time{
  646. display: flex;
  647. justify-content: space-between;
  648. font-size: 28px;
  649. color: $font-grey_999;
  650. .tool-icon{
  651. width:30px;
  652. text-align: right;
  653. img{
  654. width:5px;
  655. }
  656. }
  657. }
  658. }
  659. }
  660. }
  661. .catalog-list{
  662. box-sizing: border-box;
  663. height: 100%;
  664. .sticky-part{
  665. position:sticky;
  666. background-color: white;
  667. z-index: 99;
  668. left:0;
  669. right:0;
  670. }
  671. .top{
  672. display: flex;
  673. justify-content: space-between;
  674. border-bottom: 1px solid #DCDFE6;
  675. padding: 0 15px;
  676. align-items: center;
  677. top:0;
  678. }
  679. .bottom{
  680. display: flex;
  681. padding:48px;
  682. bottom:0;
  683. span{
  684. flex: 1;
  685. background-color: #0052D9;
  686. color: white;
  687. text-align: center;
  688. border-radius: 6px;
  689. padding:16px;
  690. box-sizing: border-box;
  691. }
  692. }
  693. }
  694. @media screen and (min-width:$media-width){
  695. .select-wrap{
  696. top:60px;
  697. padding:30px;
  698. .search-box{
  699. .icon{
  700. margin-left: 10px;
  701. width: 40px;
  702. height:40px;
  703. background-color: #F2F3FF;
  704. border-radius: 50%;
  705. img{
  706. width:25px;
  707. height:25px;
  708. }
  709. }
  710. }
  711. .select-box{
  712. margin-top:20px;
  713. }
  714. }
  715. .chart-list-wrap{
  716. padding:0 30px;
  717. .chart-list{
  718. gap: 20px 4%;
  719. justify-content:flex-start;
  720. .chart-list-item{
  721. box-sizing: border-box;
  722. width: 22%;
  723. padding: 10px 14px;
  724. border: 1px solid $border-color;
  725. border-radius: 6px;
  726. .title{
  727. min-height: 36px;
  728. }
  729. .img{
  730. width: 100%;
  731. height: auto;
  732. display: block;
  733. margin: 10px 0;
  734. }
  735. .time{
  736. font-size: 14px;
  737. .tool-icon>img{
  738. width:3px;
  739. }
  740. }
  741. }
  742. }
  743. }
  744. .catalog-list{
  745. .bottom{
  746. display: flex;
  747. padding:24px;
  748. bottom:0;
  749. span{
  750. flex: 1;
  751. background-color: #0052D9;
  752. color: white;
  753. text-align: center;
  754. border-radius: 6px;
  755. padding:8px;
  756. box-sizing: border-box;
  757. }
  758. }
  759. }
  760. }
  761. }
  762. </style>