index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. <template>
  2. <div class="page" id="page">
  3. <div class="top-title wow fadeInUp" data-wow-duration="2s" data-wow-delay="0s" data-wow-offset="0">
  4. <div class="report-nav-container top-container">
  5. <n-icon :component="IosFiling" size="40" style="vertical-align: middle" />
  6. <span>{{ t("common.navigate.report") }}</span>
  7. </div>
  8. </div>
  9. <div class="page-nav">
  10. <div class="report-page-nav page-nav-container">
  11. <div class="nav-txt wow fadeInLeft" data-wow-duration="2s" data-wow-delay="0s" data-wow-offset="0">
  12. <n-breadcrumb separator=">">
  13. <n-breadcrumb-item>
  14. <n-icon :component="MdHome" /><router-link to="/home">{{
  15. t("common.navigate.home")
  16. }}</router-link>
  17. </n-breadcrumb-item>
  18. <n-breadcrumb-item>
  19. <n-icon :component="IosFiling" />{{ t("common.navigate.report") }}
  20. </n-breadcrumb-item>
  21. </n-breadcrumb>
  22. </div>
  23. <div class="content">
  24. <div class="content-search">
  25. <div class="report-category wow fadeInLeft" data-wow-duration="3s" data-wow-delay="0s" data-wow-offset="0">
  26. <div class="report-category-title">
  27. {{ t("report.category.fsttitle") }}
  28. </div>
  29. <ul>
  30. <template v-for="item in categories" :key="item">
  31. <li>
  32. <a>
  33. <span class="category-name">{{ item.marketTypeName }}({{ item.marketCount }})</span>
  34. <span class="category-check">
  35. <n-checkbox size="large" :checked="item.marketType === record.marketType" @update:checked="
  36. handleCategory(
  37. $event,
  38. item.marketType,
  39. item.marketTypeName
  40. )
  41. " />
  42. </span>
  43. </a>
  44. </li>
  45. </template>
  46. </ul>
  47. </div>
  48. <div class="report-search wow fadeInLeft" data-wow-duration="3s" data-wow-delay="0s" data-wow-offset="0">
  49. <div class="report-search-name">
  50. {{ t("report.category.sndtitle") }}
  51. </div>
  52. <div class="report-search-content">
  53. <n-input-number :show-button="false" clearable v-model:value="record.priceStr" :min="0" />
  54. <span class="report-search-line">-</span>
  55. <n-input-number :show-button="false" clearable v-model:value="record.priceEnd" :min="0" />
  56. <n-button type="primary" @click="queryPrice">{{
  57. t("report.category.ok")
  58. }}</n-button>
  59. </div>
  60. <div class="report-search-range">
  61. <!--<template v-for="item in prices" :key="item">-->
  62. <div class="price-range range">
  63. <!--({{ item.marketCount }})-->
  64. <span>{{ t("report.price.eight") }}</span>
  65. <n-checkbox size="large" :checked="8000 === record.queryPrice" @update:checked="handlePrice($event, 8000)" />
  66. </div>
  67. <div class="price-range range">
  68. <!--({{ item.marketCount }})-->
  69. <span>{{ t("report.price.twelve") }}</span>
  70. <n-checkbox size="large" :checked="12000 === record.queryPrice" @update:checked="handlePrice($event, 12000)" />
  71. </div>
  72. <div class="price-range range">
  73. <!--({{ item.marketCount }})-->
  74. <span>{{ t("report.price.fifteen") }}</span>
  75. <n-checkbox size="large" :checked="15000 === record.queryPrice" @update:checked="handlePrice($event, 15000)" />
  76. </div>
  77. <div class="price-range range">
  78. <!--({{ item.marketCount }})-->
  79. <span>{{ t("report.price.fifteens") }}</span>
  80. <n-checkbox size="large" :checked="15001 === record.queryPrice" @update:checked="handlePrice($event, 15001)" />
  81. </div>
  82. <!--</template>-->
  83. <!-- <div class="price-range range">
  84. <span>&lt;¥3000(1000)</span>
  85. <n-checkbox size="large"
  86. :checked="3000 === record.queryPrice"
  87. @update:checked="handlePrice($event,3000)"/>
  88. </div>-->
  89. </div>
  90. </div>
  91. <div class="report-search wow fadeInLeft" data-wow-duration="3s" data-wow-delay="0s" data-wow-offset="0">
  92. <div class="report-search-name">
  93. {{ t("report.category.trdtitle") }}
  94. </div>
  95. <div class="report-search-content">
  96. <n-date-picker type="date" clearable v-model:value="publishDateStr" />
  97. <span class="report-search-line">-</span>
  98. <n-date-picker type="date" clearable v-model:value="publishDateEnd" />
  99. <n-button type="primary" @click="queryPublishDate">{{
  100. t("report.category.ok")
  101. }}</n-button>
  102. </div>
  103. <div class="report-search-range">
  104. <template v-for="item in publishDates" :key="item">
  105. <div class="date-range range">
  106. <span>{{ item.marketTypeName }}({{ item.marketCount }})</span>
  107. <n-checkbox size="large" :checked="
  108. item.publishDateValue === record.queryPublishDate
  109. " @update:checked="
  110. handlePublishDate(
  111. $event,
  112. item.publishDateValue,
  113. item.marketTypeName
  114. )
  115. " />
  116. </div>
  117. </template>
  118. </div>
  119. </div>
  120. <div class="report-search wow fadeInLeft" data-wow-duration="3s" data-wow-delay="0s" data-wow-offset="0">
  121. <div class="report-search-name">
  122. {{ t("report.content.area") }}
  123. </div>
  124. <div class="report-search-range">
  125. <div class="range">
  126. <span>{{ t("report.content.global") }}</span>
  127. <n-checkbox size="large" :checked="record.reportRegion === '1'" @update:checked="handleRegion($event, '1')" />
  128. </div>
  129. </div>
  130. <div class="report-search-range">
  131. <div class="range">
  132. <span>{{ t("report.content.china") }}</span>
  133. <n-checkbox size="large" :checked="record.reportRegion === '0'" @update:checked="handleRegion($event, '0')" />
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="report-content wow fadeInRight" data-wow-duration="3s" data-wow-delay="0s" data-wow-offset="0">
  139. <div class="search">
  140. <div class="search-text">
  141. <n-tag v-if="categoryTag" type="success" closable @close="handleCloseTag($event, 'marketType')">{{ categoryTag }}</n-tag>
  142. <n-tag v-if="priceTag" type="success" closable @close="handleCloseTag($event, 'price')">{{ priceTag }}</n-tag>
  143. <n-tag v-if="publishDateTag" type="success" closable @close="handleCloseTag($event, 'publishDate')">{{ publishDateTag }}</n-tag>
  144. <n-tag v-if="regionTag" type="success" closable @close="handleCloseTag($event, 'region')">{{ regionTag }}</n-tag>
  145. </div>
  146. <div class="search-keyword">
  147. <!-- <n-input type="text" size="large" round :placeholder="t('report.content.keyword')" v-model:value="record.queryKeyword" clearable>
  148. <template #suffix>
  149. <a class="search-btn" @click="handleSearch"><n-icon :component="MdSearch" size="30" color="#0e7a0d"/></a>
  150. </template>
  151. </n-input> -->
  152. <!-- <n-input-group>
  153. <n-button size="large" type="primary" @click="handleSearch" style="padding: 0 10px;"><n-icon :component="MdSearch" size="30" color="#fff"/></n-button>
  154. <n-input type="text" size="large" :placeholder="t('report.content.keyword')" v-model:value="record.queryKeyword" clearable/>
  155. </n-input-group> -->
  156. </div>
  157. </div>
  158. <div class="box">
  159. <ul v-if="pageList?.count > 0">
  160. <template v-for="item in pageList?.list" :key="item">
  161. <li>
  162. <div class="img">
  163. <img :src="BaseUrl + '/report/' + item.fileName" />
  164. </div>
  165. <div class="text">
  166. <!-- <a @click="viewDetail(item)"><h3>{{ item.title }}</h3></a> -->
  167. <a :href="
  168. (lang === 'zh-CN' ? '' : '/en') +
  169. '/reports/' +
  170. item.webTitle +
  171. '-' +
  172. item.id
  173. ">
  174. <h2>{{ item.title }}</h2>
  175. </a>
  176. <p>{{ item.outline }}</p>
  177. <div v-if="pcShow" class="time pc-time">
  178. <n-icon :component="MdTime" color="#0e7a0d" depth="1" size="18" />
  179. <span>{{ item.publishDate }}</span>
  180. <span class="text-type">
  181. {{ t("report.detail.formTitle") }}
  182. <span class="desc-icon">
  183. <img src="@/assets/images/doc.png" />
  184. <img src="@/assets/images/pdf.png" />
  185. <img src="@/assets/images/xlsx.png" />
  186. </span>
  187. </span>
  188. <span class="text-price">
  189. {{ t("report.content.version") }}:<b>{{
  190. (item.lang == "zh-CN" ? "¥ " : "") +
  191. item.price?.toFixed(2) +
  192. (item.lang == "en-US" ? " USD" : "")
  193. }}</b>
  194. </span>
  195. </div>
  196. <div v-if="pcShow" class="operate">
  197. <n-button class="btn" @click="handleDemand(item, '1')" type="warning">{{ t("report.content.sample") }}</n-button>
  198. <n-button class="btn" v-if="lang === 'zh-CN'" type="info" @click="handleDemand(item, '2')">{{ t("report.content.buy") }}</n-button>
  199. <n-button class="btn" v-else type="info" @click="tocontentBuy(item)">{{ t("report.content.buy") }}</n-button>
  200. </div>
  201. </div>
  202. <div v-if="!pcShow" class="time mobile-time">
  203. <n-icon :component="MdTime" color="#0e7a0d" depth="1" size="18" />
  204. <span>{{ item.publishDate }}</span>
  205. <span class="text-price">
  206. {{ t("report.content.version") }}:<b>{{
  207. (item.lang == "zh-CN" ? "¥ " : "") +
  208. item.price?.toFixed(2) +
  209. (item.lang == "en-US" ? " USD" : "")
  210. }}</b>
  211. </span>
  212. </div>
  213. </li>
  214. </template>
  215. <div class="pagination">
  216. <n-pagination :page="pageList?.pageNo" :page-count="pageList?.count" :page-size="pageList?.pageSize" size="large" :on-update-page="changePage" :page-slot="7" />
  217. </div>
  218. </ul>
  219. <div class="box-empty" v-if="pageList?.count === 0">
  220. <n-empty :description="t('report.detail.empty')">
  221. <template #extra>
  222. <n-button @click="handleDemand({ id: '', price: 0 }, '0')" round type="primary">{{ t("report.detail.custom") }}</n-button>
  223. </template>
  224. </n-empty>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. <div class="load">
  232. <n-spin size="large">
  233. <template #description>{{ t("report.content.loading") }}</template>
  234. </n-spin>
  235. </div>
  236. <n-modal :show="demandShow" preset="dialog" :title="t('report.detail.subscribe')" @close="demandShow = false" @esc="demandShow = false" @mask-click="demandShow = false" :style="'min-width: 40%'">
  237. <Demand :rowId="rowId" :rowPrice="rowPrice" :rowType="rowType" :rowRegion="rowRegion" @closeDialog="handleCloseDiag" />
  238. </n-modal>
  239. </div>
  240. </template>
  241. <script lang="ts" setup>
  242. import { ref, onMounted, watch, onServerPrefetch, nextTick } from "vue";
  243. import { MdSearch, MdHome, IosFiling, MdTime } from "@vicons/ionicons4";
  244. // import {
  245. // NBreadcrumb,
  246. // NBreadcrumbItem,
  247. // NInput,
  248. // NPagination,
  249. // NIcon,
  250. // NModal,
  251. // NCheckbox,
  252. // NTag,
  253. // NInputNumber,
  254. // NButton,
  255. // NDatePicker,
  256. // NSpin,
  257. // PaginationInfo,
  258. // NInputGroup,
  259. // NEmpty,
  260. // } from "naive-ui";
  261. import {
  262. useRouter,
  263. useRoute,
  264. onBeforeRouteLeave,
  265. onBeforeRouteUpdate,
  266. } from "vue-router";
  267. import { useI18n } from "#imports";
  268. import { useUserStore } from "@/store/user";
  269. const record = ref({ pageSize: pageSize, pageNo: 1, queryKeyword: "" } as any); // 参数
  270. const router = useRouter(); // 传递参数
  271. const route = useRoute(); // 接收参数
  272. const demandShow = ref(false); // 需求页面
  273. const categoryTag = ref<string>(); // 类型tag
  274. const priceTag = ref<string>(); // 价格tag
  275. const publishDateTag = ref<string>(); // 发布日期tag
  276. const regionTag = ref<string>(); // 地区
  277. const pageList = ref(); // 列表数据
  278. const publishDateStr = ref<number>(); // 发布日期
  279. const publishDateEnd = ref<number>();
  280. const rowId = ref<string>(); // id
  281. const rowPrice = ref<string>(); // 单价
  282. const rowType = ref<string>(); // 类型
  283. const rowRegion = ref<string>(); //版本
  284. const { t } = useI18n();
  285. const pcShow = ref<boolean>(true);
  286. const userStore = useUserStore();
  287. const lang = userStore.getLang;
  288. const config = useRuntimeConfig();
  289. const BaseUrl = ref(config.public.baseUrl);
  290. const pageSize = 10;
  291. const websiteToken = computed(() => userStore.getToken);
  292. const userInfo = computed(() => userStore.getUserInfo);
  293. function viewDetail(item: any) {
  294. const language = lang === "zh-CN" ? "" : "en";
  295. router.push({
  296. name: "reportDetail",
  297. params: {
  298. webTitle: item.webTitle + "-" + item.id,
  299. lang: language,
  300. keyword: record.value.queryKeyword,
  301. },
  302. });
  303. }
  304. const spinShow = ref("none");
  305. const categories = ref();
  306. //const prices = ref<ResearchReport[]>();
  307. const publishDates = ref();
  308. // onBeforeRouteUpdate((to) => {
  309. // const keyword = to.params.keyword;
  310. // console.log(keyword);
  311. // if(keyword && keyword != 'undefined'){
  312. // record.value.queryKeyword = keyword;
  313. // setTimeout(async() => {
  314. // await getData()
  315. // }, 1000);
  316. // }
  317. // })
  318. onMounted(async () => {
  319. if (typeof window !== "undefined") {
  320. window.scrollTo(0, 1);
  321. }
  322. // 接收参数,导航栏进入
  323. const marketType = route.params.category;
  324. record.value.marketType = marketType;
  325. const keyword = route.params.keyword;
  326. if (keyword) {
  327. record.value.queryKeyword = keyword;
  328. }
  329. // 列表
  330. await getData();
  331. // 此段代码解决无法监听home页面跳转显示tag问题
  332. const item = containsType(categories.value, marketType);
  333. categoryTag.value = item?.marketTypeName;
  334. pcShow.value = !isMobile();
  335. });
  336. watch(
  337. () => [route.params.category, route.params.keyword],
  338. async ([newCate, newKeyword], [oldCate, oldKeyword]) => {
  339. record.value.marketType = newCate;
  340. record.value.queryKeyword = newKeyword;
  341. await getData();
  342. const item = containsType(categories.value, newCate);
  343. categoryTag.value = item?.marketTypeName;
  344. }
  345. );
  346. async function getData() {
  347. spinShow.value = "block";
  348. record.value.lang = lang;
  349. const ret = await researchReportListData(record.value);
  350. pageList.value = ret;
  351. spinShow.value = "none";
  352. const ret2 = await researchReportCategoryList(record.value);
  353. categories.value = ret2;
  354. const ret3 = await researchReportPublishDateList(record.value);
  355. // prices.value = ret2.data.prices;
  356. publishDates.value = ret3;
  357. }
  358. // 选择/取消类别
  359. function handleCategory(
  360. checked: boolean,
  361. value: string | undefined,
  362. label: string | undefined
  363. ) {
  364. //const lang = useLocaleStore().getLocale;
  365. const language = lang === "zh-CN" ? "" : "en";
  366. if (checked) {
  367. record.value.marketType = value;
  368. // categoryTag.value = label;
  369. router.push({
  370. name: "reports",
  371. params: { category: value, lang: language },
  372. });
  373. } else {
  374. record.value.marketType = "";
  375. // categoryTag.value = "";
  376. router.push({ name: "reports", params: { lang: language } });
  377. }
  378. }
  379. // 关闭tag
  380. function handleCloseTag(_e: MouseEvent, type: string) {
  381. if ("marketType" === type) {
  382. record.value.marketType = "";
  383. categoryTag.value = "";
  384. //const lang = useLocaleStore().getLocale;
  385. const language = lang === "zh-CN" ? "" : "en";
  386. router.push({ name: "reports", params: { lang: language } });
  387. } else {
  388. if ("price" === type) {
  389. record.value.queryPrice = "";
  390. priceTag.value = "";
  391. }
  392. if ("publishDate" === type) {
  393. record.value.queryPublishDate = "";
  394. publishDateTag.value = "";
  395. }
  396. if ("region" === type) {
  397. record.value.reportRegion = "";
  398. regionTag.value = "";
  399. }
  400. getData();
  401. }
  402. }
  403. // 价格
  404. function handlePrice(checked: boolean, price: number | undefined) {
  405. if (checked) {
  406. if (price === 5001) {
  407. priceTag.value = ">¥5000";
  408. } else {
  409. priceTag.value = "<¥" + price;
  410. }
  411. record.value.queryPrice = price;
  412. record.value.priceEnd = "";
  413. record.value.priceStr = "";
  414. } else {
  415. record.value.queryPrice = "";
  416. priceTag.value = "";
  417. }
  418. getData();
  419. }
  420. // 发布日期
  421. function handlePublishDate(
  422. checked: boolean,
  423. day: number | undefined,
  424. dayStr: string | undefined
  425. ) {
  426. if (checked) {
  427. record.value.queryPublishDate = day;
  428. publishDateTag.value = dayStr;
  429. } else {
  430. record.value.queryPublishDate = "";
  431. publishDateTag.value = "";
  432. }
  433. record.value.publishDateStr = "";
  434. record.value.publishDateEnd = "";
  435. getData();
  436. }
  437. // 地区
  438. function handleRegion(checked: boolean, region: string) {
  439. if (checked) {
  440. record.value.reportRegion = region;
  441. if ("1" === region) {
  442. regionTag.value = lang == "zh-CN" ? "全球与中国" : "Global";
  443. } else {
  444. regionTag.value = lang == "zh-CN" ? "中国" : "China";
  445. }
  446. } else {
  447. record.value.reportRegion = "";
  448. regionTag.value = "";
  449. }
  450. getData();
  451. }
  452. // 价格区间查询
  453. function queryPrice() {
  454. const price01 = record.value.priceStr,
  455. price02 = record.value.priceEnd;
  456. if (price01) {
  457. // 价格end不存在或者小于价格str,则只计算大于价格str
  458. let priceDesc = "";
  459. if (price02) {
  460. if (price02 > price01) {
  461. priceDesc = "¥" + price01 + "~" + price02;
  462. } else {
  463. priceDesc = ">¥" + price01;
  464. }
  465. } else {
  466. priceDesc = ">¥" + price01;
  467. }
  468. priceTag.value = priceDesc;
  469. } else {
  470. if (price02 && price02 > 0) {
  471. priceTag.value = "<¥" + price02;
  472. } else {
  473. priceTag.value = "";
  474. }
  475. }
  476. record.value.queryPrice = ""; //去掉价格
  477. getData();
  478. }
  479. // 发布日期区间查询
  480. function queryPublishDate() {
  481. const dateStr = publishDateStr.value,
  482. dateEnd = publishDateEnd.value;
  483. if (dateStr) {
  484. const date01 = formatDate(dateStr, "yyyy-MM-dd");
  485. let dateTag = "",
  486. date02;
  487. if (dateEnd) {
  488. date02 = formatDate(dateEnd, "yyyy-MM-dd");
  489. if (dateEnd > dateStr) {
  490. dateTag = date01 + "~" + date02;
  491. } else {
  492. dateTag = ">" + date01;
  493. }
  494. } else {
  495. dateTag = ">" + date01;
  496. }
  497. publishDateTag.value = dateTag;
  498. record.value.publishDateStr = date01;
  499. record.value.publishDateEnd = date02;
  500. } else {
  501. if (dateEnd) {
  502. const date02 = formatDate(dateEnd, "yyyy-MM-dd");
  503. publishDateTag.value = "<" + date02;
  504. record.value.publishDateEnd = date02;
  505. }
  506. }
  507. record.value.queryPublishDate = "";
  508. getData();
  509. }
  510. // 关键字查询
  511. // function handleSearch(){
  512. // getData();
  513. // }
  514. // 提交需求
  515. function handleDemand(item: any, type: string) {
  516. rowId.value = item.id;
  517. rowPrice.value = item.price?.toString();
  518. rowType.value = type;
  519. rowRegion.value = item.reportRegion;
  520. demandShow.value = true;
  521. }
  522. const tocontentBuy = (item: any) => {
  523. if (userInfo.value?.id && websiteToken.value) {
  524. let param = {
  525. researchReportId: item.id,
  526. payMethod: "paypal",
  527. payPrice: item.price,
  528. payResearchKey: item.priceKey,
  529. payResearchType:
  530. item.priceName.split("-")[2] == "企业数据"
  531. ? t("report.detail.EnterpriseMarketShare")
  532. : t("report.detail.integrity"),
  533. payResearchVersion: "",
  534. };
  535. param.payResearchVersion =
  536. item.priceName.split("-")[3] == "单用户版单价"
  537. ? t("report.detail.singlePrice")
  538. : item.priceName.split("-")[3] == "多用户版单价"
  539. ? t("report.detail.multiPrice")
  540. : t("report.detail.enterprisePrice02");
  541. item.btnLoading = true;
  542. createOrder_Api(param)
  543. .then((res) => {
  544. window.open(res.data.orderPayUrl);
  545. })
  546. .finally(() => {
  547. item.btnLoading = false;
  548. });
  549. } else {
  550. userStore.setShowLoginDialog(true);
  551. // errorMsg("请先登录");
  552. }
  553. };
  554. // 关闭diag
  555. function handleCloseDiag() {
  556. demandShow.value = false;
  557. }
  558. // 改变页数
  559. function changePage(page: number) {
  560. document.documentElement.scrollTop = 0;
  561. record.value.pageNo = page;
  562. getData();
  563. }
  564. onServerPrefetch(async () => {
  565. try {
  566. const marketType = route.params.category;
  567. record.value.marketType = marketType;
  568. const keyword = route.params.keyword;
  569. if (keyword) {
  570. record.value.queryKeyword = keyword;
  571. }
  572. // 列表
  573. await getData();
  574. // 此段代码解决无法监听home页面跳转显示tag问题
  575. const item = containsType(categories.value, marketType);
  576. categoryTag.value = item?.marketTypeName;
  577. } catch (error) {
  578. console.log(error);
  579. }
  580. });
  581. useHead({
  582. title: t("common.navigate.report") + "-" + t("defaultSettings.title"),
  583. viewport: "width=device-width,initial-scale=1,maximum-scale=1 ",
  584. charset: "utf-8",
  585. meta: [
  586. {
  587. hid: "keywords",
  588. name: "keywords",
  589. content: t("defaultSettings.keyword"),
  590. },
  591. {
  592. hid: "description",
  593. name: "description",
  594. content: t("defaultSettings.desc"),
  595. },
  596. ],
  597. });
  598. </script>
  599. <style lang="scss" scoped>
  600. .content {
  601. display: flex;
  602. justify-content: space-between;
  603. padding: 10px 0 30px;
  604. flex-wrap: wrap;
  605. .content-search {
  606. width: 22%;
  607. .report-category {
  608. background-color: #fff;
  609. padding: 20px;
  610. .report-category-title {
  611. font-size: 18px;
  612. font-weight: 600;
  613. padding: 10px 0;
  614. }
  615. ul {
  616. padding: 0;
  617. li {
  618. height: 50px;
  619. line-height: 50px;
  620. margin: 0;
  621. list-style: none;
  622. padding: 0;
  623. > a {
  624. display: flex;
  625. justify-content: space-between;
  626. align-items: center;
  627. > .category-name {
  628. font-size: 16px;
  629. margin: 0;
  630. line-height: 20px;
  631. overflow: hidden;
  632. text-overflow: ellipsis;
  633. width: 80%;
  634. }
  635. > .category-check {
  636. font-size: 16px;
  637. color: #999999;
  638. text-align: center;
  639. vertical-align: middle;
  640. }
  641. }
  642. }
  643. }
  644. }
  645. .report-search {
  646. padding: 20px;
  647. background-color: #fff;
  648. margin-top: 20px;
  649. .report-search-name {
  650. font-size: 18px;
  651. font-weight: 600;
  652. padding: 10px 0;
  653. }
  654. .report-search-content {
  655. display: flex;
  656. justify-content: space-around;
  657. padding-bottom: 20px;
  658. .n-input-number {
  659. width: 35%;
  660. }
  661. .n-date-pick {
  662. width: 35%;
  663. .n-input .n-input-wrapper {
  664. .n-input__suffix {
  665. display: none !important;
  666. }
  667. }
  668. }
  669. .report-search-line {
  670. line-height: 30px;
  671. }
  672. }
  673. .report-search-range {
  674. .range {
  675. display: flex;
  676. justify-content: space-between;
  677. padding-bottom: 15px;
  678. }
  679. }
  680. }
  681. }
  682. .report-content {
  683. width: 77%;
  684. background-color: #fff;
  685. padding: 30px 50px;
  686. .search {
  687. display: flex;
  688. justify-content: space-between;
  689. padding-bottom: 20px;
  690. border-bottom: 1px solid #d1d1d1;
  691. align-items: center;
  692. .search-text {
  693. padding-top: 10px;
  694. font-size: 16px;
  695. font-weight: 700;
  696. width: 30%;
  697. .n-tag {
  698. margin: 0 5px 5px 0;
  699. }
  700. }
  701. .search-keyword {
  702. width: 60%;
  703. }
  704. }
  705. .box > ul > li {
  706. padding: 0.3rem 0;
  707. display: flex;
  708. justify-content: space-between;
  709. align-items: center;
  710. border-bottom: 1px solid #d1d1d1;
  711. flex-wrap: wrap;
  712. > .img {
  713. max-width: 11em;
  714. max-height: 14em;
  715. overflow: hidden;
  716. box-shadow: 7px 0px 15px rgb(0 87 149 / 33%);
  717. > img {
  718. width: 100%;
  719. transition: all 0.4s ease;
  720. border: none;
  721. vertical-align: middle;
  722. }
  723. // >img:hover{
  724. // transform: scale(1.1);
  725. // }
  726. }
  727. .text {
  728. width: calc(100% - 13em);
  729. > a {
  730. > h3 {
  731. //word-break: break-all;
  732. }
  733. }
  734. > .time {
  735. vertical-align: sub;
  736. padding: 10px 0;
  737. > span {
  738. padding: 0px 20px 0 2px;
  739. vertical-align: text-bottom;
  740. > b {
  741. color: #f00;
  742. }
  743. }
  744. .desc-icon {
  745. img {
  746. width: 1.7em;
  747. height: 1.7em;
  748. vertical-align: bottom;
  749. margin-right: 0.6em;
  750. }
  751. }
  752. }
  753. > p {
  754. font-size: 14px;
  755. color: #999999;
  756. line-height: 26px;
  757. margin: 0.15rem 0;
  758. overflow: hidden;
  759. text-overflow: ellipsis;
  760. display: -webkit-box;
  761. -webkit-line-clamp: 3;
  762. -webkit-box-orient: vertical;
  763. //word-break: break-all;
  764. }
  765. }
  766. }
  767. .box {
  768. .box-empty {
  769. padding: 50px 0;
  770. border-bottom: 1px solid #d1d1d1;
  771. }
  772. .operate {
  773. width: 100%;
  774. text-align: right;
  775. .btn {
  776. margin: 5px;
  777. }
  778. }
  779. }
  780. }
  781. }
  782. .search-btn > .n-icon {
  783. vertical-align: middle;
  784. }
  785. .pagination {
  786. width: 100%;
  787. display: flex;
  788. justify-content: center;
  789. padding: 20px;
  790. }
  791. .n-input .n-input__suffix {
  792. display: none !important;
  793. }
  794. .n-input .n-input-wrapper {
  795. padding: 0 1px;
  796. }
  797. .load {
  798. display: v-bind("spinShow");
  799. }
  800. </style>