产品上架页面优化
Showing
1 changed file
with
33 additions
and
92 deletions
| ... | @@ -236,29 +236,29 @@ const toSearch = (val: any, clear: boolean = false) => { | ... | @@ -236,29 +236,29 @@ const toSearch = (val: any, clear: boolean = false) => { |
| 236 | page.value.curr = 1; | 236 | page.value.curr = 1; |
| 237 | tableInfo.value.page.curr = 1; | 237 | tableInfo.value.page.curr = 1; |
| 238 | getTableData(); | 238 | getTableData(); |
| 239 | getListingCountData(); | 239 | // getListingCountData(); |
| 240 | }; | 240 | }; |
| 241 | 241 | ||
| 242 | // 获取产品上架数量 | 242 | // 获取产品上架数量 |
| 243 | const getListingCountData = () => { | 243 | // const getListingCountData = () => { |
| 244 | flowDetailLoading.value = true; | 244 | // flowDetailLoading.value = true; |
| 245 | getListingCount({ | 245 | // getListingCount({ |
| 246 | currentStaffGuid: userData.staffGuid | 246 | // currentStaffGuid: userData.staffGuid |
| 247 | }).then((res: any) => { | 247 | // }).then((res: any) => { |
| 248 | flowDetailLoading.value = false; | 248 | // flowDetailLoading.value = false; |
| 249 | if (res.code == proxy.$passCode) { | 249 | // if (res.code == proxy.$passCode) { |
| 250 | demandListData.value = res.data || []; | 250 | // demandListData.value = res.data || []; |
| 251 | if (demandListData.value?.length) { | 251 | // if (demandListData.value?.length) { |
| 252 | demandListData.value = [demandListData.value[0]]; | 252 | // demandListData.value = [demandListData.value[0]]; |
| 253 | } | 253 | // } |
| 254 | let valueData = chunk(demandListData.value, 4); | 254 | // let valueData = chunk(demandListData.value, 4); |
| 255 | carouselInfo.value.list = valueData; | 255 | // carouselInfo.value.list = valueData; |
| 256 | carouselInfo.value.arrow = valueData.length > 1 ? 'hover' : 'never'; | 256 | // carouselInfo.value.arrow = valueData.length > 1 ? 'hover' : 'never'; |
| 257 | } else { | 257 | // } else { |
| 258 | proxy.$ElMessage.error(res.msg); | 258 | // proxy.$ElMessage.error(res.msg); |
| 259 | } | 259 | // } |
| 260 | }) | 260 | // }) |
| 261 | } | 261 | // } |
| 262 | 262 | ||
| 263 | const tableSwitchBeforeChange = (scope, field, callback) => { | 263 | const tableSwitchBeforeChange = (scope, field, callback) => { |
| 264 | ElMessageBox.confirm( | 264 | ElMessageBox.confirm( |
| ... | @@ -298,12 +298,12 @@ const tableSwitchChange = (val, scope, field) => { | ... | @@ -298,12 +298,12 @@ const tableSwitchChange = (val, scope, field) => { |
| 298 | message: res.msg, | 298 | message: res.msg, |
| 299 | }); | 299 | }); |
| 300 | getTableData(); | 300 | getTableData(); |
| 301 | getListingCountData(); | 301 | // getListingCountData(); |
| 302 | reject(false) | 302 | reject(false) |
| 303 | } | 303 | } |
| 304 | }).catch(() => { | 304 | }).catch(() => { |
| 305 | getTableData(); | 305 | getTableData(); |
| 306 | getListingCountData(); | 306 | // getListingCountData(); |
| 307 | reject(false) | 307 | reject(false) |
| 308 | }) | 308 | }) |
| 309 | }) | 309 | }) |
| ... | @@ -376,7 +376,7 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -376,7 +376,7 @@ const tableBtnClick = (scope, btn) => { |
| 376 | if (res.code == '00000') { | 376 | if (res.code == '00000') { |
| 377 | ElMessage.success('删除成功') | 377 | ElMessage.success('删除成功') |
| 378 | getTableData(); | 378 | getTableData(); |
| 379 | getListingCountData(); | 379 | // getListingCountData(); |
| 380 | } else { | 380 | } else { |
| 381 | ElMessage.error(res.msg) | 381 | ElMessage.error(res.msg) |
| 382 | } | 382 | } |
| ... | @@ -398,7 +398,7 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -398,7 +398,7 @@ const tableBtnClick = (scope, btn) => { |
| 398 | if (res.code == '00000') { | 398 | if (res.code == '00000') { |
| 399 | ElMessage.success('撤销成功!') | 399 | ElMessage.success('撤销成功!') |
| 400 | getTableData(); | 400 | getTableData(); |
| 401 | getListingCountData(); | 401 | // getListingCountData(); |
| 402 | } else { | 402 | } else { |
| 403 | ElMessage.error(res.msg) | 403 | ElMessage.error(res.msg) |
| 404 | } | 404 | } |
| ... | @@ -548,7 +548,7 @@ const passSubmit = () => { | ... | @@ -548,7 +548,7 @@ const passSubmit = () => { |
| 548 | ElMessage.success('审批通过!') | 548 | ElMessage.success('审批通过!') |
| 549 | dialogVisible.value = false; | 549 | dialogVisible.value = false; |
| 550 | getTableData(); | 550 | getTableData(); |
| 551 | getListingCountData(); | 551 | // getListingCountData(); |
| 552 | } else { | 552 | } else { |
| 553 | ElMessage.error(res.msg) | 553 | ElMessage.error(res.msg) |
| 554 | } | 554 | } |
| ... | @@ -587,7 +587,7 @@ const rejectSubmit = async () => { | ... | @@ -587,7 +587,7 @@ const rejectSubmit = async () => { |
| 587 | ElMessage.success('驳回成功!') | 587 | ElMessage.success('驳回成功!') |
| 588 | dialogVisible.value = false; | 588 | dialogVisible.value = false; |
| 589 | getTableData(); | 589 | getTableData(); |
| 590 | getListingCountData(); | 590 | // getListingCountData(); |
| 591 | } else { | 591 | } else { |
| 592 | ElMessage.error(res.msg) | 592 | ElMessage.error(res.msg) |
| 593 | } | 593 | } |
| ... | @@ -613,7 +613,7 @@ const getFirstPageData = () => { | ... | @@ -613,7 +613,7 @@ const getFirstPageData = () => { |
| 613 | 613 | ||
| 614 | onActivated(() => { | 614 | onActivated(() => { |
| 615 | if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 | 615 | if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 |
| 616 | getListingCountData(); | 616 | // getListingCountData(); |
| 617 | page.value.curr = 1 | 617 | page.value.curr = 1 |
| 618 | tableInfo.value.page.curr = 1; | 618 | tableInfo.value.page.curr = 1; |
| 619 | getTableData(currExchangeGuid.value); | 619 | getTableData(currExchangeGuid.value); |
| ... | @@ -649,19 +649,7 @@ const assetsSafeInfo = ref<any>() | ... | @@ -649,19 +649,7 @@ const assetsSafeInfo = ref<any>() |
| 649 | const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href | 649 | const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href |
| 650 | const demandListData: any = ref([ | 650 | const demandListData: any = ref([ |
| 651 | ]); | 651 | ]); |
| 652 | const flowDetailLoading = ref(false); | 652 | const btnClick = () => { |
| 653 | const btnClick = (item) => { | ||
| 654 | console.log(item) | ||
| 655 | if (item.exchangeGuid) { | ||
| 656 | router.push({ | ||
| 657 | name: "productListingDetail", | ||
| 658 | query: { | ||
| 659 | exchangeGuid: item.exchangeGuid, | ||
| 660 | exchangeName: item.exchangeName, | ||
| 661 | type: 'add', | ||
| 662 | }, | ||
| 663 | }); | ||
| 664 | } else { | ||
| 665 | router.push({ | 653 | router.push({ |
| 666 | name: "productListingDetail", | 654 | name: "productListingDetail", |
| 667 | query: { | 655 | query: { |
| ... | @@ -669,7 +657,6 @@ const btnClick = (item) => { | ... | @@ -669,7 +657,6 @@ const btnClick = (item) => { |
| 669 | case: '2', | 657 | case: '2', |
| 670 | }, | 658 | }, |
| 671 | }); | 659 | }); |
| 672 | } | ||
| 673 | } | 660 | } |
| 674 | 661 | ||
| 675 | const currExchangeGuid = ref(''); | 662 | const currExchangeGuid = ref(''); |
| ... | @@ -933,57 +920,11 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -933,57 +920,11 @@ const rejectDialogBtnClick = (btn, info) => { |
| 933 | <div class="container_wrap"> | 920 | <div class="container_wrap"> |
| 934 | <div class="table_tool_wrap"> | 921 | <div class="table_tool_wrap"> |
| 935 | <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" /> | 922 | <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" /> |
| 936 | <!-- <div class="tools_btns"> | 923 | <div class="tools_btns"> |
| 937 | <el-button type="primary" @click="toPatn('add')" v-preReClick>新建</el-button> | 924 | <el-button type="primary" @click="btnClick()" v-preReClick>新建产品上架</el-button> |
| 938 | <el-button type="primary" @click="toPatn1('add', 'add1')" v-preReClick>新建</el-button> | ||
| 939 | </div> --> | ||
| 940 | </div> | ||
| 941 | <div v-loading="flowDetailLoading"> | ||
| 942 | <CarouselPanel :carousel-info="carouselInfo"> | ||
| 943 | <template v-slot:default="{ carousel }"> | ||
| 944 | <div class="card-content" v-for="(item, i) in carousel" :key="item.guid" @click="cardBtnClick(item)" | ||
| 945 | :class="{ active: currExchangeGuid == item.exchangeGuid, mr16: i < carousel.length - 1 && (i + 1) % 4 !== 0 }"> | ||
| 946 | <div class="header"> | ||
| 947 | <div class="header-top"> | ||
| 948 | <img class="left-img" | ||
| 949 | :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : (item.exchangeName?.indexOf('门户') > -1 ? sjsLogo : defaultItemLogo)" | ||
| 950 | alt="" /> | ||
| 951 | <div class="title"> <ellipsis-tooltip :content="item.exchangeName ?? '--'" class-name="w100f" | ||
| 952 | :refName="'tooltipOver'"></ellipsis-tooltip></div> | ||
| 953 | </div> | ||
| 954 | <div class="right-main"> | ||
| 955 | <div class="count-group"> | ||
| 956 | <div class="count-item"> | ||
| 957 | <div class="item-label">已上架产品数</div> | ||
| 958 | <div class="item-num">{{ changeNum(item.listingNum || 0) }}</div> | ||
| 959 | </div> | ||
| 960 | <div class="count-item"> | ||
| 961 | <div class="item-label">审批中产品数</div> | ||
| 962 | <div class="item-num">{{ changeNum(item.underReviewNum || 0) }}</div> | ||
| 963 | </div> | ||
| 964 | </div> | ||
| 965 | </div> | ||
| 966 | </div> | ||
| 967 | <div class="operator-btn" @click.stop="btnClick(item)"> | ||
| 968 | <!-- <div class="left-btn">更新模板</div> --> | ||
| 969 | <div class="right-btn">产品上架</div> | ||
| 970 | </div> | ||
| 971 | </div> | ||
| 972 | </template> | ||
| 973 | </CarouselPanel> | ||
| 974 | <!-- <div class="list-content" v-if="demandListData.length > 0"> | ||
| 975 | |||
| 976 | </div> --> | ||
| 977 | <!-- <div class="v-tip"> | ||
| 978 | <div class="tip-icon"></div> | ||
| 979 | <div class="tip-des"> | ||
| 980 | 在各数交所上架时,会同时在门户、专区和主平台门户进行展示;在门户上架则只会在门户上架,不会在数交所、专区及主平台门户上架。 | ||
| 981 | </div> | 925 | </div> |
| 982 | </div> --> | ||
| 983 | </div> | 926 | </div> |
| 984 | <div class="table_panel_wrap" :style="{ | 927 | <div class="table_panel_wrap" :style="{ height: 'calc(100% - 84px)' }"> |
| 985 | height: 'calc(100% - 240px)' | ||
| 986 | }"> | ||
| 987 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" | 928 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" |
| 988 | @tableSwitchBeforeChange="tableSwitchBeforeChange" /> | 929 | @tableSwitchBeforeChange="tableSwitchBeforeChange" /> |
| 989 | </div> | 930 | </div> |
| ... | @@ -1015,11 +956,11 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -1015,11 +956,11 @@ const rejectDialogBtnClick = (btn, info) => { |
| 1015 | 956 | ||
| 1016 | .table_tool_wrap { | 957 | .table_tool_wrap { |
| 1017 | width: 100%; | 958 | width: 100%; |
| 1018 | height: 50px !important; | 959 | // height: 40px !important; |
| 1019 | padding: 0 8px; | 960 | padding: 0 8px; |
| 1020 | 961 | ||
| 1021 | .tools_btns { | 962 | .tools_btns { |
| 1022 | padding: 0px 0 0; | 963 | padding: 0px 0 8px; |
| 1023 | } | 964 | } |
| 1024 | } | 965 | } |
| 1025 | 966 | ... | ... |
-
Please register or sign in to post a comment