SeoKeywordsRankList.vue 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307
  1. <template>
  2. <div class="seo_keywords_rank_wrap">
  3. <a-row class="r1 search-form">
  4. <a-col :span="24" class="search-form-container">
  5. <div class="choose-site">
  6. <span class="t1">站点:</span>
  7. <select-site @set-site-info="changeSite" selectWidth="300px" />
  8. <span style="margin-left: 16px" class="t1">{{ comprehenInfo.planName ? comprehenInfo.planName : '暂无SEO推广套餐~' }}
  9. <a-popover placement="bottom"
  10. v-show="comprehenInfo.planName">
  11. <template #content>
  12. <span> 指定关键词数:{{ comprehenInfo.planAppointKeywordNum }}&nbsp; </span>
  13. <span> 长尾关键词数:{{ comprehenInfo.planLongTailKeywordNum }}&nbsp; </span>
  14. <span> 外链数:{{ comprehenInfo.planOuterLinkNum }}&nbsp; </span>
  15. <span> 文章数:{{ comprehenInfo.planArticleNum }} </span>
  16. </template>
  17. <img
  18. src="https://cutomer-static-bucket.s3.cn-northwest-1.amazonaws.com.cn/public/material/220803883dfy/document/changjianwenti_1676606434975.png"
  19. alt="issue" width="25px" height="25px" />
  20. </a-popover>
  21. </span>
  22. </div>
  23. </a-col>
  24. </a-row>
  25. <a-row class="r2" type="flex" justify="center" align="middle">
  26. <a-col :span="6">
  27. <p class="t1"><img src="../../../assets/seo/zhidingci.svg" />指定关键词数</p>
  28. <p class="t2" v-if="comprehenInfo.appointKeywordNum == null"> - </p>
  29. <p class="t2" v-else>
  30. <a @click="changeKeywordType()">{{ comprehenInfo.appointKeywordNum }}</a>
  31. </p>
  32. </a-col>
  33. <a-col :span="6">
  34. <p class="t1"><img src="../../../assets/seo/changweici.svg" />长尾关键词数</p>
  35. <p class="t2" v-if="comprehenInfo.longTailKeywordNum == null"> - </p>
  36. <p class="t2" v-else>
  37. <a @click="longChangeKeywordType()">{{ comprehenInfo.longTailKeywordNum }}</a>
  38. </p>
  39. </a-col>
  40. <a-col :span="6">
  41. <p class="t1"><img src="../../../assets/seo/lianjieshu.svg" />外链数</p>
  42. <p class="t2" v-if="comprehenInfo.outerLinkNum == null"> - </p>
  43. <p class="t2">
  44. <span>{{ comprehenInfo.outerLinkNum }}</span>
  45. </p>
  46. </a-col>
  47. <a-col :span="6">
  48. <p class="t1"><img src="../../../assets/seo/wenzhangshu.svg" />文章数</p>
  49. <p class="t2" v-if="comprehenInfo.articleNum == null"> - </p>
  50. <p class="t2">
  51. <span>{{ comprehenInfo.articleNum }}</span>
  52. </p>
  53. </a-col>
  54. </a-row>
  55. <a-row class="r3" type="flex" :gutter="16">
  56. <a-col :span="8">
  57. <div class="wrap">
  58. <p class="t1">指定关键词排名</p>
  59. <div v-if="serverTimeLoading">
  60. <a-spin tip="加载中..."></a-spin>
  61. </div>
  62. <template v-else>
  63. <div style="display: none;">
  64. rankInfo: {{ JSON.stringify(rankInfo) }}
  65. </div>
  66. <div class="content">
  67. <div class="d1"><img src="../../../assets/seo/NO1.svg" />1-10位</div>
  68. <div class="d2">
  69. <a @click="getTableInfoRank(3, 1)">{{ (rankInfo.appointKeyword && rankInfo.appointKeyword.firstNum) || 0 }}</a>个
  70. </div>
  71. </div>
  72. <div class="content">
  73. <div class="d1"><img src="../../../assets/seo/NO2.svg" />11-30位</div>
  74. <div class="d2">
  75. <a @click="getTableInfoRank(7, 1)">{{ (rankInfo.appointKeyword && rankInfo.appointKeyword.secondNum) || 0 }}</a>个
  76. </div>
  77. </div>
  78. <div class="content">
  79. <div class="d1"><img src="../../../assets/seo/NO3.svg" />31-100位</div>
  80. <div class="d2">
  81. <a @click="getTableInfoRank(8, 1)">{{ (rankInfo.appointKeyword && rankInfo.appointKeyword.thirdType) || 0 }}</a>个
  82. </div>
  83. </div>
  84. </template>
  85. </div>
  86. </a-col>
  87. <a-col :span="8">
  88. <div class="wrap">
  89. <p class="t1">长尾关键词排名</p>
  90. <div v-if="serverTimeLoading">
  91. <a-spin tip="加载中..."></a-spin>
  92. </div>
  93. <template v-else>
  94. <div class="content">
  95. <div class="d1"><img src="../../../assets/seo/NO1.svg" />1-10位</div>
  96. <div class="d2">
  97. <a @click="longGetTableInfoRank(3)">{{ rankInfo.longTailKeyword && rankInfo.longTailKeyword.firstNum || 0 }}</a>个
  98. </div>
  99. </div>
  100. <div class="content">
  101. <div class="d1"><img src="../../../assets/seo/NO2.svg" />11-30位</div>
  102. <div class="d2">
  103. <a @click="longGetTableInfoRank(7)">{{ rankInfo.longTailKeyword && rankInfo.longTailKeyword.secondNum || 0 }}</a>个
  104. </div>
  105. </div>
  106. <div class="content">
  107. <div class="d1"><img src="../../../assets/seo/NO3.svg" />31-100位</div>
  108. <div class="d2">
  109. <a @click="longGetTableInfoRank(8)">{{ rankInfo.longTailKeyword && rankInfo.longTailKeyword.thirdType || 0 }}</a>个
  110. </div>
  111. </div>
  112. </template>
  113. </div>
  114. </a-col>
  115. <a-col :span="8">
  116. <div class="wrap">
  117. <p class="t1">服务情况</p>
  118. <div v-if="serverTimeLoading">
  119. <a-spin tip="加载中..."></a-spin>
  120. </div>
  121. <template v-else>
  122. <div class="content">
  123. <div class="d1"><img src="../../../assets/seo/dachengshijian.svg"/>达成时间</div>
  124. <div class="d2 d3"><span>{{
  125. rankInfo.serverTime.reachStandardTime != null ? rankInfo.serverTime.reachStandardTime.substring(0,10) : '-'
  126. }}</span></div>
  127. </div>
  128. <template v-if="rankInfo.serverTime && rankInfo.serverTime.planServiceEndStatus === 1">
  129. <div class="content">
  130. <div class="d1"><img src="../../../assets/seo/dachengtianshu.svg"/>服务天数</div>
  131. <div class="d2 d3"><span>{{getServiceDays(rankInfo.serverTime.planStartTime)}}</span>天</div>
  132. </div>
  133. </template>
  134. <template v-else-if="rankInfo.serverTime">
  135. <div class="content">
  136. <div class="d1"><img src="../../../assets/seo/dachengtianshu.svg"/>达成天数</div>
  137. <div class="d2 d3"><span>{{
  138. rankInfo.serverTime.reachStandardDays | filtr_null }}</span>天</div>
  139. </div>
  140. </template>
  141. <div class="content" v-if="rankInfo.serverTime">
  142. <div class="d1"><img src="../../../assets/seo/shengyufuwutianshu.svg"/>剩余服务天数</div>
  143. <div class="d2 d3"><span>{{
  144. rankInfo.serverTime.remainServerDays | filtr_null}}</span>天</div>
  145. </div>
  146. </template>
  147. </div>
  148. </a-col>
  149. </a-row>
  150. <a-row class="r4">
  151. <a-card title="指定关键词" :bordered="false" style="width: 100%">
  152. <a-col :span="24">
  153. <a-row class="table-tool-wrap" type="flex">
  154. <a-col :span="8">
  155. <ul>
  156. <li :class="{ active: show == 1 }" @click="getTableInfoRank(1)">全部</li>
  157. <li :class="{ active: show == 3 }" @click="getTableInfoRank(3)">第一页</li>
  158. <li :class="{ active: show == 4 }" @click="getTableInfoRank(4)">前三页</li>
  159. <li :class="{ active: show == 5 }" @click="getTableInfoRank(5)">前五页</li>
  160. <li :class="{ active: show == 6 }" @click="getTableInfoRank(6)">前十页</li>
  161. </ul>
  162. </a-col>
  163. <a-col :span="16" style="text-align: right">
  164. <a-button type="link" @click="rankingClick" :style="rankingButtonStatus == false ? 'border-style: none;color: black !important;' : 'border-style: none;color: #544BEB !important;'
  165. ">
  166. 按排名
  167. <a-icon :type="rankingButtonArrow" v-if="rankingButtonStatus" />
  168. </a-button>
  169. <a-button type="link" :style="wordsButtonStatus == false
  170. ? 'margin-right: 16px;border-style: none;color: black !important;'
  171. : 'margin-right: 16px;border-style: none;color: #544BEB !important;'
  172. " @click="wordsClick">
  173. 按字数
  174. <a-icon :type="wordsButtonArrow" v-if="wordsButtonStatus" />
  175. </a-button>
  176. <a-input placeholder="请输入关键词" style="width: 200px; margin-right: 8px" v-model:value="keywords" />
  177. <a-button type="primary" preIcon="ant-design:search-outlined" style="margin-right: 8px" @click="setTable">
  178. 查询
  179. </a-button>
  180. <a-button ghost type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"> 重置 </a-button>
  181. <!-- <a-button ghost type="primary" @click="handleExportXlsLU('关键词排名',1)" style="margin-left: 8px" :loading="excelLoading">导出Excel</a-button>-->
  182. </a-col>
  183. </a-row>
  184. </a-col>
  185. <a-col :span="24">
  186. <a-table ref="table" size="middle" :scroll="{ x: true }" rowKey="id" :columns="columns"
  187. :dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
  188. @change="handleTableChange">
  189. <template #bodyCell="{ column, record, index, text }">
  190. <template v-if="column.key === 'rowIndex'">
  191. {{ (ipagination.current - 1) * ipagination.pageSize + index + 1 }}
  192. </template>
  193. <template class="title" v-if="column.key === 'keywords'">
  194. <span style="white-space: pre">{{ text }}</span>
  195. <span v-if="comprehenInfo.specifyKeywordNum != null && comprehenInfo.longTailKeywordNum != null">
  196. <a-tag v-if="record.keywordType == 1" color="blue" style="margin-left: 8px">指定</a-tag>
  197. </span>
  198. </template>
  199. <template class="tag" v-if="column.key === 'tag'">
  200. <a-popover v-if="text != 0" placement="bottom" overlayClassName="self-pop">
  201. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 1 && text <= 10"
  202. src="../../../assets/seo/NO1.svg" />
  203. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 11 && text <= 20"
  204. src="../../../assets/seo/NO2.svg" />
  205. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 21 && text <= 30"
  206. src="../../../assets/seo/NO3.svg" />
  207. <template #content>
  208. <p style="margin-bottom: 0">第{{ parseInt((text - 1) / 10) + 1 }}页,总排名{{ text }}</p>
  209. </template>
  210. <span style="cursor: default; margin-left: 5px">{{ text }}</span>
  211. </a-popover>
  212. <span v-else>
  213. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 1 && text <= 10"
  214. src="../../../assets/seo/NO1.svg" />
  215. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 11 && text <= 20"
  216. src="../../../assets/seo/NO2.svg" />
  217. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 21 && text <= 30"
  218. src="../../../assets/seo/NO3.svg" />
  219. {{ text }}</span>
  220. </template>
  221. <template v-if="column.key === 'action'">
  222. <a-button size="small" @click="gotoSearch(record.keywords)" type="primary">去查询 </a-button>
  223. </template>
  224. </template>
  225. </a-table>
  226. </a-col>
  227. </a-card>
  228. </a-row>
  229. <a-row class="r4" style="margin-top: 10px">
  230. <a-card title="长尾关键词" :bordered="false" style="width: 100%">
  231. <a-col :span="24">
  232. <a-row class="table-tool-wrap" type="flex">
  233. <a-col :span="8">
  234. <ul>
  235. <li :class="{ active: longShow == 1 }" @click="longGetTableInfoRank(1)">全部</li>
  236. <li :class="{ active: longShow == 3 }" @click="longGetTableInfoRank(3)">第一页</li>
  237. <li :class="{ active: longShow == 4 }" @click="longGetTableInfoRank(4)">前三页</li>
  238. <li :class="{ active: longShow == 5 }" @click="longGetTableInfoRank(5)">前五页</li>
  239. <li :class="{ active: longShow == 6 }" @click="longGetTableInfoRank(6)">前十页</li>
  240. </ul>
  241. </a-col>
  242. <a-col :span="16" style="text-align: right">
  243. <a-button type="link" @click="longRankingClick" :style="longRankingButtonStatus == false ? 'border-style: none;color: black !important;' : 'border-style: none;color: #544BEB !important;'
  244. ">
  245. 按排名
  246. <a-icon :type="longRankingButtonArrow" v-if="longRankingButtonStatus" />
  247. </a-button>
  248. <a-button type="link" :style="longWordsButtonStatus == false
  249. ? 'margin-right: 16px;border-style: none;color: black !important;'
  250. : 'margin-right: 16px;border-style: none;color: #544BEB !important;'
  251. " @click="longWordsClick">
  252. 按字数
  253. <a-icon :type="longWordsButtonArrow" v-if="longWordsButtonStatus" />
  254. </a-button>
  255. <a-input placeholder="请输入关键词" style="width: 200px; margin-right: 8px" v-model:value="longKeywords" />
  256. <a-button type="primary" preIcon="ant-design:search-outlined" style="margin-right: 8px"
  257. @click="longSetTable">
  258. 查询 </a-button>
  259. <a-button ghost type="primary" preIcon="ant-design:reload-outlined" @click="longSearchReset"> 重置
  260. </a-button>
  261. <!-- <a-button ghost type="primary" @click="handleExportXlsLU('关键词排名',2)" style="margin-left: 8px" :loading="longExcelLoading">导出Excel</a-button>-->
  262. </a-col>
  263. </a-row>
  264. </a-col>
  265. <a-col :span="24">
  266. <a-table ref="table" size="middle" :scroll="{ x: true }" rowKey="id" :columns="longColumns"
  267. :dataSource="longDataSource" :pagination="longIpagination" :loading="longLoading"
  268. class="j-table-force-nowrap" @change="handleLongTableChange">
  269. <template #bodyCell="{ column, record, index, text }">
  270. <template v-if="column.key === 'rowIndex'">
  271. {{ (longIpagination.current - 1) * longIpagination.pageSize + index + 1 }}
  272. </template>
  273. <template class="tag" v-if="column.key === 'tag'">
  274. <a-popover v-if="text != 0" placement="bottom" overlayClassName="self-pop">
  275. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 1 && text <= 10"
  276. src="../../../assets/seo/NO1.svg" />
  277. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 11 && text <= 20"
  278. src="../../../assets/seo/NO2.svg" />
  279. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 21 && text <= 30"
  280. src="../../../assets/seo/NO3.svg" />
  281. <template #content>
  282. <p style="margin-bottom: 0">第{{ parseInt((text - 1) / 10) + 1 }}页,总排名{{ text }}</p>
  283. </template>
  284. <span style="cursor: default; margin-left: 5px">{{ text }}</span>
  285. </a-popover>
  286. <span v-else>
  287. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 1 && text <= 10"
  288. src="../../../assets/seo/NO1.svg" />
  289. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 11 && text <= 20"
  290. src="../../../assets/seo/NO2.svg" />
  291. <img style="width: 18px; position: relative; top: -2px" v-if="text >= 21 && text <= 30"
  292. src="../../../assets/seo/NO3.svg" />
  293. {{ text }}</span>
  294. </template>
  295. <template slot="action" v-if="column.key === 'action'">
  296. <a-button size="small" @click="gotoSearch(record.keywords)" type="primary">去查询 </a-button>
  297. </template>
  298. </template>
  299. </a-table>
  300. </a-col>
  301. </a-card>
  302. </a-row>
  303. </div>
  304. </template>
  305. <script lang="js">
  306. import { getAction, downFile } from '@/api/manage/manage';
  307. import selectSite from '@/components/Adweb/selectSite.vue';
  308. import { filterObj } from '/@/utils/common/compUtils';
  309. export default {
  310. name: 'SeoKeywordsRankList',
  311. components: {
  312. selectSite,
  313. },
  314. data() {
  315. return {
  316. siteinfo: [],
  317. subscriptionId: '',
  318. selectSiteInfo: {},
  319. siteCode: '',
  320. planId: '',
  321. columns: [
  322. {
  323. title: '序号',
  324. dataIndex: 'rowIndex',
  325. key: 'rowIndex',
  326. width: 40,
  327. align: 'center',
  328. fixed: 'left',
  329. },
  330. {
  331. title: '关键词',
  332. dataIndex: 'keywords',
  333. key: 'keywords',
  334. fixed: 'left',
  335. width: 350,
  336. },
  337. ],
  338. longColumns: [
  339. {
  340. title: '序号',
  341. dataIndex: 'rowIndex',
  342. key: 'rowIndex',
  343. width: 40,
  344. align: 'center',
  345. fixed: 'left',
  346. },
  347. {
  348. title: '关键词',
  349. dataIndex: 'keywords',
  350. key: 'keywords',
  351. fixed: 'left',
  352. width: 350,
  353. },
  354. ],
  355. show: 1,
  356. keywordType: undefined,
  357. keywords: '',
  358. url: {
  359. list: '/seo/seoKeywords/keywordList',
  360. },
  361. ipagination: {
  362. pageSize: 10,
  363. pageSizeOptions: ['10', '15', '30', '50'],
  364. },
  365. disableMixinCreated: true,
  366. comprehenInfo: {},
  367. rankInfo: {
  368. appointKeyword: {
  369. firstNum: 0,
  370. secondNum: 0,
  371. thirdType: 0
  372. },
  373. longTailKeyword: {
  374. firstNum: 0,
  375. secondNum: 0,
  376. thirdType: 0
  377. },
  378. serverTime: {}
  379. },
  380. excelLoading: false,
  381. queryParam: {
  382. buttonColmn: 'words',
  383. buttonSort: 'asc',
  384. },
  385. baseInfo: {
  386. createTime: '',
  387. },
  388. routerQuery: {},
  389. /* 排序参数 */
  390. isorter: {
  391. column: 'keywords',
  392. order: 'desc',
  393. },
  394. rankingButtonArrow: 'arrow-up',
  395. wordsButtonArrow: 'arrow-up',
  396. rankingButtonStatus: false,
  397. wordsButtonStatus: true,
  398. longIpagination: {
  399. current: 1,
  400. pageSize: 10,
  401. pageSizeOptions: ['10', '15', '30', '50'],
  402. showTotal: (total, range) => {
  403. return range[0] + '-' + range[1] + ' 共' + total + '条';
  404. },
  405. showQuickJumper: true,
  406. showSizeChanger: true,
  407. total: 0,
  408. },
  409. longQueryParam: {
  410. buttonColmn: 'words',
  411. buttonSort: 'asc',
  412. },
  413. dataSource: [],
  414. longDataSource: [],
  415. longLoading: false,
  416. longExcelLoading: false,
  417. longKeywords: '',
  418. longShow: 1,
  419. /* 排序参数 */
  420. longIsorter: {
  421. column: 'keywords',
  422. order: 'desc',
  423. },
  424. longRankingButtonArrow: 'arrow-up',
  425. longWordsButtonArrow: 'arrow-up',
  426. longRankingButtonStatus: false,
  427. longWordsButtonStatus: true,
  428. /* 筛选参数 */
  429. filters: {},
  430. serverTimeLoading: false,
  431. };
  432. },
  433. watch: {
  434. '$route.query': {
  435. handler: function (val) {
  436. this.routerQuery = val;
  437. },
  438. immediate: true, // 初次变化立即查询
  439. },
  440. },
  441. mounted() {
  442. this.siteCode = localStorage.getItem('siteCode');
  443. // 确保先获取站点信息,再加载其他数据
  444. if (this.siteCode) {
  445. this.getSiteInfo().then(() => {
  446. // 确保站点信息加载完成后再获取其他信息
  447. this.getAllInfo();
  448. });
  449. }
  450. },
  451. methods: {
  452. filterOption(input, option) {
  453. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
  454. },
  455. getAllInfo() {
  456. // 初始化状态
  457. this.serverTimeLoading = true;
  458. // 使用Promise链确保顺序执行
  459. this.getComprehenInfo()
  460. .then(() => {
  461. return this.getRankInfo();
  462. })
  463. .then(() => {
  464. // 所有数据加载完成后,再加载表格数据
  465. this.setTableQuery();
  466. this.longSetTableQuery();
  467. })
  468. .catch(err => {
  469. console.error('Failed to load data:', err);
  470. });
  471. },
  472. resetAllInfo() {
  473. this.comprehenInfo = {};
  474. this.rankInfo.appointKeyword = {firstNum: 0, secondNum: 0, thirdType: 0};
  475. this.rankInfo.longTailKeyword = {firstNum: 0, secondNum: 0, thirdType: 0};
  476. this.rankInfo.serverTime = {};
  477. this.dataSource = [];
  478. this.ipagination.current = 1;
  479. this.ipagination.total = 0;
  480. this.longDataSource = [];
  481. this.longIpagination.current = 1;
  482. this.longIpagination.total = 0;
  483. },
  484. //由于页面的业务关联很多,故将所有的查询条件封装
  485. setTableQuery() {
  486. this.queryParam.siteCode = this.siteCode;
  487. if (this.show == 3) {
  488. this.queryParam.rankStart = '1';
  489. this.queryParam.rankEnd = '10';
  490. } else if (this.show == 4) {
  491. this.queryParam.rankStart = '1';
  492. this.queryParam.rankEnd = '30';
  493. } else if (this.show == 5) {
  494. this.queryParam.rankStart = '1';
  495. this.queryParam.rankEnd = '50';
  496. } else if (this.show == 6) {
  497. this.queryParam.rankStart = '1';
  498. this.queryParam.rankEnd = '100';
  499. } else if (this.show == 7) {
  500. this.queryParam.rankStart = '11';
  501. this.queryParam.rankEnd = '30';
  502. } else if (this.show == 8) {
  503. this.queryParam.rankStart = '31';
  504. this.queryParam.rankEnd = '100';
  505. } else {
  506. this.queryParam.rankStart = undefined;
  507. this.queryParam.rankEnd = undefined;
  508. }
  509. this.queryParam.keywordType = this.keywordType;
  510. this.queryParam.keywords = this.keywords;
  511. this.loadData(1);
  512. },
  513. setTable() {
  514. this.queryParam.reachStandard = undefined;
  515. this.setTableQuery();
  516. },
  517. searchReset() {
  518. this.show = 1;
  519. this.queryParam.reachStandard = undefined;
  520. this.keywords = '';
  521. this.rankingButtonStatus = false;
  522. this.rankingButtonArrow = '';
  523. this.wordsButtonStatus = true;
  524. this.wordsButtonArrow = 'arrow-up';
  525. this.queryParam.buttonColmn = 'words';
  526. this.queryParam.buttonSort = 'desc';
  527. this.setTableQuery();
  528. },
  529. loadData(arg) {
  530. let that = this;
  531. let a = [];
  532. if (arg === 1) {
  533. this.ipagination.current = 1;
  534. }
  535. var params = this.getQueryParams(); //查询条件
  536. params.subscriptionId = that.subscriptionId;
  537. params.keywordType = 1;
  538. this.loading = true;
  539. getAction(this.url.list, params).then((res) => {
  540. if (res.success) {
  541. let alldata = res.result.records;
  542. if (alldata.length > 0) {
  543. for (let i in alldata) {
  544. let rankInfo = alldata[i].rankInfo;
  545. a.push({
  546. id: alldata[i].id,
  547. keywords: alldata[i].keywords,
  548. keywordType: alldata[i].keywordType,
  549. keywordsLength: alldata[i].keywordsLength,
  550. rankInfo: rankInfo,
  551. ...rankInfo,
  552. });
  553. }
  554. this.dataSource = a;
  555. this.getTableColums();
  556. this.ipagination.total = res.result.total;
  557. } else {
  558. this.dataSource = a;
  559. this.ipagination.total = 0;
  560. }
  561. }
  562. if (res.code === 510) {
  563. // createMessage.warning(res.message)
  564. }
  565. this.loading = false;
  566. });
  567. },
  568. //先执行获取site信息,只有在获取到siteCode之后,才能执行以下方法
  569. getSiteInfo() {
  570. let that = this;
  571. let data = {
  572. siteCode: that.siteCode,
  573. };
  574. return new Promise((resolve) => {
  575. getAction('/seo/seoKeywordsRank/getSubscriptionIdBySiteCode', data).then(function (res) {
  576. if (res.code == 200) {
  577. that.subscriptionId = res.result[0]?.id || '';
  578. that.planId = res.result[0]?.planId || '';
  579. }
  580. resolve();
  581. }).catch(() => {
  582. resolve(); // 即使出错也继续流程
  583. });
  584. });
  585. },
  586. handleTableChange(pagination, filters, sorter) {
  587. //分页、排序、筛选变化时触发
  588. //TODO 筛选
  589. if (Object.keys(sorter).length > 0 && sorter.column) {
  590. this.isorter.column = sorter.field;
  591. this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc';
  592. } else {
  593. this.isorter.column = '';
  594. this.isorter.order = '';
  595. }
  596. this.ipagination = pagination;
  597. this.loadData();
  598. },
  599. getQueryParams() {
  600. //获取查询条件
  601. let sqp = {};
  602. if (this.superQueryParams) {
  603. sqp['superQueryParams'] = encodeURI(this.superQueryParams);
  604. sqp['superQueryMatchType'] = this.superQueryMatchType;
  605. }
  606. var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
  607. param.field = this.getQueryField();
  608. param.pageNo = this.ipagination.current;
  609. param.pageSize = this.ipagination.pageSize;
  610. return filterObj(param);
  611. },
  612. getQueryField() {
  613. //TODO 字段权限控制
  614. var str = 'id,';
  615. this.columns.forEach(function (value) {
  616. str += ',' + value.dataIndex;
  617. });
  618. return str;
  619. },
  620. //切换站点
  621. changeSite(selectedSiteInfo) {
  622. this.selectSiteInfo = selectedSiteInfo;
  623. this.siteCode = selectedSiteInfo.code;
  624. this.getSiteInfo();
  625. this.keywordType = undefined;
  626. this.queryParam.reachStandard = undefined;
  627. this.keywords = '';
  628. this.show = 1;
  629. localStorage.setItem('siteCode', this.siteCode);
  630. this.resetAllInfo();
  631. this.getAllInfo();
  632. },
  633. //获取关键词等五个指标
  634. getComprehenInfo() {
  635. let that = this;
  636. let d = {
  637. siteCode: that.siteCode,
  638. planId: that.planId ? that.planId : '',
  639. };
  640. return new Promise((resolve, reject) => {
  641. getAction('/seo/seoKeywordsRank/comprehensiveInfo', d)
  642. .then((res) => {
  643. if (res.code == 200) {
  644. that.comprehenInfo = res.result;
  645. resolve(res);
  646. } else {
  647. reject(res);
  648. }
  649. })
  650. .catch(err => {
  651. reject(err);
  652. });
  653. });
  654. },
  655. //获取三个list的数据
  656. getRankInfo() {
  657. let that = this;
  658. let d = {
  659. siteCode: that.siteCode,
  660. subscriptionId: that.subscriptionId ? that.subscriptionId : '',
  661. };
  662. // 添加专门的加载状态标志
  663. this.serverTimeLoading = true;
  664. return new Promise((resolve, reject) => {
  665. getAction('/seo/seoKeywordsRank/getRankInfo', d)
  666. .then((res) => {
  667. if (res.code == 200 && res.result) {
  668. console.log('RankInfo API response:', res.result);
  669. // 先创建一个完整的数据对象,确保所有属性都有初始值
  670. const newRankInfo = {
  671. appointKeyword: {
  672. firstNum: 0,
  673. secondNum: 0,
  674. thirdType: 0,
  675. ...res.result.appointKeyword
  676. },
  677. longTailKeyword: {
  678. firstNum: 0,
  679. secondNum: 0,
  680. thirdType: 0,
  681. ...res.result.longTailKeyword
  682. },
  683. serverTime: res.result.serverTime || {}
  684. };
  685. // 完全替换整个对象,而不是单独设置属性
  686. this.rankInfo = newRankInfo;
  687. // 打印出处理后的数据,检查数据结构
  688. console.log('Processed rankInfo:', this.rankInfo);
  689. resolve(res);
  690. } else {
  691. console.error('RankInfo API error or empty result:', res);
  692. // 保持默认值
  693. reject(res);
  694. }
  695. })
  696. .catch(err => {
  697. console.error('RankInfo API exception:', err);
  698. reject(err);
  699. })
  700. .finally(() => {
  701. this.serverTimeLoading = false;
  702. });
  703. });
  704. },
  705. //动态处理表格列
  706. getTableColums() {
  707. let that = this;
  708. that.columns = [
  709. {
  710. title: '序号',
  711. dataIndex: 'rowIndex',
  712. key: 'rowIndex',
  713. width: 40,
  714. align: 'center',
  715. fixed: 'left',
  716. scopedSlots: { customRender: 'dataNo' },
  717. },
  718. {
  719. title: '关键词',
  720. dataIndex: 'keywords',
  721. key: 'keywords',
  722. fixed: 'left',
  723. scopedSlots: { customRender: 'keywords' },
  724. width: 350,
  725. },
  726. ];
  727. let obj = that.dataSource[0].rankInfo;
  728. let dateInfo = Object.keys(obj);
  729. dateInfo.sort().reverse();
  730. for (let i in dateInfo) {
  731. that.columns.push({
  732. title: dateInfo[i],
  733. dataIndex: dateInfo[i],
  734. key: dateInfo[i],
  735. scopedSlots: { customRender: 'tag' },
  736. align: 'center',
  737. });
  738. }
  739. that.columns.push({
  740. title: '操作',
  741. dataIndex: 'action',
  742. key: 'action',
  743. align: 'center',
  744. scopedSlots: { customRender: 'action' },
  745. fixed: 'right',
  746. width: 50,
  747. });
  748. },
  749. //点击排名数量事件
  750. getTableInfoRank(d, keywordType) {
  751. this.show = d;
  752. this.queryParam.reachStandard = undefined;
  753. if (keywordType) {
  754. this.keywordType = keywordType;
  755. }
  756. this.setTableQuery();
  757. },
  758. //点击第一行五个指标的种类
  759. changeKeywordType() {
  760. this.queryParam.reachStandard = 1;
  761. this.queryParam.rankStart = undefined;
  762. this.queryParam.rankEnd = undefined;
  763. this.show = 1;
  764. this.setTableQuery();
  765. },
  766. //表格内的去查询按钮
  767. gotoSearch(word) {
  768. window.open('http://www.google.com/search?q=' + word, '_blank');
  769. },
  770. handleExportXlsLU(fileName, keywordType) {
  771. let that = this;
  772. let param = {
  773. siteCode: that.queryParam.siteCode,
  774. subscriptionId: that.subscriptionId ? that.subscriptionId : '',
  775. keywordType: keywordType,
  776. };
  777. if (param.siteCode === '') {
  778. // createMessage.warning("请先选择站点!");
  779. return;
  780. }
  781. if (keywordType == 1) {
  782. this.excelLoading = true;
  783. } else {
  784. this.longExcelLoading = true;
  785. }
  786. downFile('/seo/seoKeywords/exportExcel', param).then((data) => {
  787. if (keywordType === 1) {
  788. this.excelLoading = false;
  789. } else {
  790. this.longExcelLoading = false;
  791. }
  792. if (!data) {
  793. console.log(321);
  794. // createMessage.warning("文件下载失败")
  795. return;
  796. }
  797. if (data.size === 0) {
  798. console.log(111);
  799. // createMessage.warning("当前站点未有关键词数据,文件导出失败")
  800. return;
  801. }
  802. if (typeof window.navigator.msSaveBlob !== 'undefined') {
  803. window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx');
  804. } else {
  805. let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }));
  806. let link = document.createElement('a');
  807. link.style.display = 'none';
  808. link.href = url;
  809. link.setAttribute('download', fileName + '.xlsx');
  810. document.body.appendChild(link);
  811. link.click();
  812. document.body.removeChild(link); //下载完成移除元素
  813. window.URL.revokeObjectURL(url); //释放掉blob对象
  814. }
  815. });
  816. },
  817. //按排名排序
  818. rankingClick() {
  819. let that = this;
  820. if (that.rankingButtonStatus == false) {
  821. that.rankingButtonStatus = true;
  822. that.rankingButtonArrow = 'arrow-up';
  823. that.wordsButtonStatus = false;
  824. that.wordsButtonArrow = '';
  825. that.queryParam.buttonColmn = 'ranking';
  826. that.queryParam.buttonSort = 'asc';
  827. } else if (that.rankingButtonStatus == true && that.rankingButtonArrow == 'arrow-up') {
  828. that.rankingButtonArrow = 'arrow-down';
  829. that.queryParam.buttonColmn = 'ranking';
  830. that.queryParam.buttonSort = 'desc';
  831. } else if (that.rankingButtonArrow == 'arrow-down') {
  832. that.rankingButtonStatus = false;
  833. that.queryParam.buttonColmn = '';
  834. that.queryParam.buttonSort = '';
  835. }
  836. that.setTableQuery();
  837. },
  838. //按字数排序
  839. wordsClick() {
  840. let that = this;
  841. if (that.wordsButtonStatus == false) {
  842. that.wordsButtonStatus = true;
  843. that.wordsButtonArrow = 'arrow-up';
  844. that.rankingButtonStatus = false;
  845. that.rankingButtonArrow = '';
  846. that.queryParam.buttonColmn = 'words';
  847. that.queryParam.buttonSort = 'asc';
  848. } else if (that.wordsButtonStatus == true && that.wordsButtonArrow == 'arrow-up') {
  849. that.wordsButtonArrow = 'arrow-down';
  850. that.queryParam.buttonColmn = 'words';
  851. that.queryParam.buttonSort = 'desc';
  852. } else if (that.wordsButtonArrow == 'arrow-down') {
  853. that.wordsButtonStatus = false;
  854. that.queryParam.buttonColmn = '';
  855. that.queryParam.buttonSort = '';
  856. }
  857. that.setTableQuery();
  858. },
  859. //-----一下全是长尾词列表功能方法
  860. longLoadData(arg) {
  861. let that = this;
  862. let a = [];
  863. if (arg === 1) {
  864. this.longIpagination.current = 1;
  865. }
  866. var params = this.getLongQueryParams(); //查询条件
  867. params.subscriptionId = that.subscriptionId;
  868. params.keywordType = 2;
  869. this.longLoading = true;
  870. getAction(this.url.list, params).then((res) => {
  871. if (res.success) {
  872. let alldata = res.result.records;
  873. if (alldata.length > 0) {
  874. for (let i in alldata) {
  875. let rankInfo = alldata[i].rankInfo;
  876. a.push({
  877. id: alldata[i].id,
  878. keywords: alldata[i].keywords,
  879. keywordType: alldata[i].keywordType,
  880. keywordsLength: alldata[i].keywordsLength,
  881. rankInfo: rankInfo,
  882. ...rankInfo,
  883. });
  884. }
  885. this.longDataSource = a;
  886. this.longGetTableColums();
  887. this.longIpagination.total = res.result.total;
  888. } else {
  889. this.longDataSource = a;
  890. this.longIpagination.total = 0;
  891. }
  892. }
  893. if (res.code === 510) {
  894. // createMessage.warning(res.message)
  895. }
  896. this.longLoading = false;
  897. });
  898. },
  899. //动态处理表格列
  900. longGetTableColums() {
  901. let that = this;
  902. that.longColumns = [
  903. {
  904. title: '序号',
  905. dataIndex: 'rowIndex',
  906. key: 'rowIndex',
  907. width: 40,
  908. align: 'center',
  909. fixed: 'left',
  910. scopedSlots: { customRender: 'dataNo' },
  911. },
  912. {
  913. title: '关键词',
  914. dataIndex: 'keywords',
  915. key: 'keywords',
  916. fixed: 'left',
  917. scopedSlots: { customRender: 'keywords' },
  918. width: 350,
  919. // sorter: (a, b) => a.keywords - b.keywords,
  920. // defaultSortOrder: 'ascend',
  921. },
  922. // {
  923. // title: '关键词长度',
  924. // dataIndex: 'keywordsLength',
  925. // key: 'keywordsLength',
  926. // fixed: 'left',
  927. // width: 40,
  928. // scopedSlots: { customRender: 'keywordsLength' },
  929. // },
  930. ];
  931. let obj = that.longDataSource[0].rankInfo;
  932. let dateInfo = Object.keys(obj);
  933. dateInfo.sort().reverse();
  934. for (let i in dateInfo) {
  935. that.longColumns.push({
  936. title: dateInfo[i],
  937. dataIndex: dateInfo[i],
  938. key: dateInfo[i],
  939. scopedSlots: { customRender: 'tag' },
  940. align: 'center',
  941. });
  942. }
  943. that.longColumns.push({
  944. title: '操作',
  945. dataIndex: 'action',
  946. key: 'action',
  947. align: 'center',
  948. scopedSlots: { customRender: 'action' },
  949. fixed: 'right',
  950. width: 50,
  951. });
  952. },
  953. //由于页面的业务关联很多,故将所有的查询条件封装
  954. longSetTableQuery() {
  955. let that = this;
  956. that.longQueryParam.siteCode = this.siteCode;
  957. console.log(that.longQueryParam);
  958. if (that.longShow == 3) {
  959. that.longQueryParam.rankStart = '1';
  960. that.longQueryParam.rankEnd = '10';
  961. } else if (that.longShow == 4) {
  962. that.longQueryParam.rankStart = '1';
  963. that.longQueryParam.rankEnd = '30';
  964. } else if (that.longShow == 5) {
  965. that.longQueryParam.rankStart = '1';
  966. that.longQueryParam.rankEnd = '50';
  967. } else if (that.longShow == 6) {
  968. that.longQueryParam.rankStart = '1';
  969. that.longQueryParam.rankEnd = '100';
  970. } else if (that.longShow == 7) {
  971. that.longQueryParam.rankStart = '11';
  972. that.longQueryParam.rankEnd = '30';
  973. } else if (that.longShow == 8) {
  974. that.longQueryParam.rankStart = '31';
  975. that.longQueryParam.rankEnd = '100';
  976. } else {
  977. that.longQueryParam.rankStart = undefined;
  978. that.longQueryParam.rankEnd = undefined;
  979. }
  980. that.longQueryParam.keywords = that.longKeywords;
  981. that.longLoadData(1);
  982. },
  983. longSetTable() {
  984. this.longQueryParam.reachStandard = undefined;
  985. this.longSetTableQuery();
  986. },
  987. longSearchReset() {
  988. this.longShow = 1;
  989. this.longQueryParam.reachStandard = undefined;
  990. this.longKeywords = '';
  991. this.longRankingButtonStatus = false;
  992. this.longRankingButtonArrow = '';
  993. this.longWordsButtonStatus = true;
  994. this.longWordsButtonArrow = 'arrow-up';
  995. this.longQueryParam.buttonColmn = 'words';
  996. this.longQueryParam.buttonSort = 'asc';
  997. this.longSetTableQuery();
  998. },
  999. //点击排名数量事件
  1000. longGetTableInfoRank(d) {
  1001. this.longShow = d;
  1002. this.longQueryParam.reachStandard = undefined;
  1003. this.longSetTableQuery();
  1004. },
  1005. //点击第一行五个指标的种类
  1006. longChangeKeywordType() {
  1007. this.longQueryParam.reachStandard = 1;
  1008. this.longQueryParam.rankStart = undefined;
  1009. this.longQueryParam.rankEnd = undefined;
  1010. this.longShow = 1;
  1011. this.longSetTableQuery();
  1012. },
  1013. handleLongTableChange(pagination, filters, sorter) {
  1014. //分页、排序、筛选变化时触发
  1015. //TODO 筛选
  1016. if (Object.keys(sorter).length > 0 && sorter.column) {
  1017. this.longIsorter.column = sorter.field;
  1018. this.longIsorter.order = 'ascend' == sorter.order ? 'asc' : 'desc';
  1019. } else {
  1020. this.longIsorter.column = '';
  1021. this.longIsorter.order = '';
  1022. }
  1023. this.longIpagination = pagination;
  1024. this.longLoadData();
  1025. },
  1026. getLongQueryParams() {
  1027. //获取查询条件
  1028. let sqp = {};
  1029. var param = Object.assign(sqp, this.longQueryParam, this.longIsorter, this.filters);
  1030. param.field = this.getLongQueryField();
  1031. param.pageNo = this.longIpagination.current;
  1032. param.pageSize = this.longIpagination.pageSize;
  1033. return filterObj(param);
  1034. },
  1035. getLongQueryField() {
  1036. //TODO 字段权限控制
  1037. var str = 'id,';
  1038. this.longColumns.forEach(function (value) {
  1039. str += ',' + value.dataIndex;
  1040. });
  1041. return str;
  1042. },
  1043. //按排名排序
  1044. longRankingClick() {
  1045. let that = this;
  1046. if (that.longRankingButtonStatus == false) {
  1047. that.longRankingButtonStatus = true;
  1048. that.longRankingButtonArrow = 'arrow-up';
  1049. that.longWordsButtonStatus = false;
  1050. that.longWordsButtonArrow = '';
  1051. that.longQueryParam.buttonColmn = 'ranking';
  1052. that.longQueryParam.buttonSort = 'asc';
  1053. } else if (that.longRankingButtonStatus == true && that.longRankingButtonArrow == 'arrow-up') {
  1054. that.longRankingButtonArrow = 'arrow-down';
  1055. that.longQueryParam.buttonColmn = 'ranking';
  1056. that.longQueryParam.buttonSort = 'desc';
  1057. } else if (that.longRankingButtonArrow == 'arrow-down') {
  1058. that.longRankingButtonStatus = false;
  1059. that.longQueryParam.buttonColmn = '';
  1060. that.longQueryParam.buttonSort = '';
  1061. }
  1062. that.longSetTableQuery();
  1063. },
  1064. //按字数排序
  1065. longWordsClick() {
  1066. let that = this;
  1067. if (that.longWordsButtonStatus == false) {
  1068. that.longWordsButtonStatus = true;
  1069. that.longWordsButtonArrow = 'arrow-up';
  1070. that.longRankingButtonStatus = false;
  1071. that.longRankingButtonArrow = '';
  1072. that.longQueryParam.buttonColmn = 'words';
  1073. that.longQueryParam.buttonSort = 'asc';
  1074. } else if (that.longWordsButtonStatus == true && that.longWordsButtonArrow == 'arrow-up') {
  1075. that.longWordsButtonArrow = 'arrow-down';
  1076. that.longQueryParam.buttonColmn = 'words';
  1077. that.longQueryParam.buttonSort = 'desc';
  1078. } else if (that.longWordsButtonArrow == 'arrow-down') {
  1079. that.longWordsButtonStatus = false;
  1080. that.longQueryParam.buttonColmn = '';
  1081. that.longQueryParam.buttonSort = '';
  1082. }
  1083. that.longSetTableQuery();
  1084. },
  1085. },
  1086. };
  1087. </script>
  1088. <style lang="less">
  1089. .self-pop {
  1090. .ant-popover-inner-content {
  1091. background: rgb(245, 243, 254);
  1092. p {
  1093. font-size: 13px;
  1094. }
  1095. }
  1096. .ant-popover-arrow {
  1097. border-color: rgb(245, 243, 254) !important;
  1098. }
  1099. }
  1100. </style>
  1101. <style lang="less" scoped>
  1102. .r1 {
  1103. .choose-site {
  1104. display: flex;
  1105. }
  1106. .t1 {
  1107. font-size: 18px;
  1108. }
  1109. .ant-calendar-picker {
  1110. margin-right: 20px;
  1111. }
  1112. /deep/ .ant-btn {
  1113. background: transparent;
  1114. margin-right: 10px;
  1115. &.active {
  1116. color: @primary-color;
  1117. }
  1118. }
  1119. }
  1120. .r2 {
  1121. background: #fff;
  1122. padding: 30px;
  1123. margin: 10px;
  1124. .ant-col {
  1125. text-align: center;
  1126. color: #000;
  1127. img {
  1128. width: 13px;
  1129. margin: -3px 5px 0 0;
  1130. }
  1131. .t1 {
  1132. font-size: 14px;
  1133. }
  1134. .t2 {
  1135. font-size: 27px;
  1136. margin-bottom: 0;
  1137. font-weight: 500;
  1138. }
  1139. }
  1140. }
  1141. .r3 {
  1142. padding-left: 10px;
  1143. padding-right: 10px;
  1144. padding-bottom: 10px;
  1145. .wrap {
  1146. padding: 20px;
  1147. background: #fff;
  1148. .t1 {
  1149. color: #000;
  1150. font-size: 14px;
  1151. font-weight: 500;
  1152. }
  1153. .content {
  1154. display: block;
  1155. overflow: hidden;
  1156. line-height: 1;
  1157. border-bottom: 1px solid #ddd;
  1158. padding: 20px 0;
  1159. &:last-child {
  1160. border-bottom: none;
  1161. padding-bottom: 0;
  1162. }
  1163. .d1 {
  1164. float: left;
  1165. width: 50%;
  1166. line-height: 25px;
  1167. color: #000;
  1168. img {
  1169. width: 15px;
  1170. margin: -4px 5px 0 0;
  1171. }
  1172. }
  1173. .d2 {
  1174. float: right;
  1175. width: 50%;
  1176. text-align: right;
  1177. &.d3 {
  1178. span {
  1179. color: #000;
  1180. }
  1181. }
  1182. a {
  1183. font-size: 25px;
  1184. font-weight: 500;
  1185. }
  1186. }
  1187. }
  1188. }
  1189. }
  1190. .r4 {
  1191. padding: 20px;
  1192. margin-left: 10px;
  1193. margin-right: 10px;
  1194. background: #fff;
  1195. .table-tool-wrap {
  1196. margin-bottom: 15px;
  1197. ul {
  1198. list-style-type: none;
  1199. display: block;
  1200. overflow: hidden;
  1201. margin: 0;
  1202. padding: 0;
  1203. li {
  1204. float: left;
  1205. margin: 0 10px;
  1206. color: #333;
  1207. font-size: 14px;
  1208. font-weight: 500;
  1209. cursor: pointer;
  1210. text-decoration: underline;
  1211. &.active {
  1212. color: @primary-color;
  1213. }
  1214. }
  1215. }
  1216. }
  1217. }
  1218. </style>