您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

1330 行
40 KiB

  1. <template>
  2. <div class="box-center">
  3. <div class="app-top">
  4. <div class="app-titel" v-if="role != 3" style="margin-bottom: 10px">
  5. <div class="titel-text">项目选择:</div>
  6. <div style="margin-left: 26px">
  7. <el-select
  8. v-model="houseId"
  9. filterable
  10. placeholder="请选择"
  11. @change="houseChange"
  12. >
  13. <el-option
  14. v-for="item in houseList"
  15. :key="item.id"
  16. :label="item.propertyName"
  17. :value="item.id"
  18. >
  19. </el-option>
  20. </el-select>
  21. </div>
  22. </div>
  23. <div class="app-titel">
  24. <div style="text-indent: 30px">接待时间:</div>
  25. <div class="toptimeqhuan">
  26. <div :class="{ tophove: dateType == 4 }" @click="tabtimetap(4)">
  27. 近7天
  28. </div>
  29. <div :class="{ tophove: dateType == 5 }" @click="tabtimetap(5)">
  30. 近15天
  31. </div>
  32. <div :class="{ tophove: dateType == 6 }" @click="tabtimetap(6)">
  33. 近30天
  34. </div>
  35. </div>
  36. <div style="margin-left: 26px">
  37. <el-date-picker
  38. v-model="customtime"
  39. @change="confirmtime()"
  40. type="daterange"
  41. range-separator="-"
  42. :default-time="['00:00:00', '23:59:59']"
  43. value-format="yyyy-MM-dd"
  44. start-placeholder="开始日期"
  45. end-placeholder="结束日期"
  46. >
  47. </el-date-picker>
  48. </div>
  49. <div style="margin-left: 26px" class="div-lab">
  50. <div class="label">团队</div>
  51. <el-select
  52. v-model="deptId"
  53. filterable
  54. @change="deptChange"
  55. placeholder="请选择"
  56. class="div-inp"
  57. >
  58. <el-option
  59. v-for="item in options"
  60. :key="item.deptId"
  61. :label="item.name"
  62. :value="item.deptId"
  63. >
  64. </el-option>
  65. </el-select>
  66. </div>
  67. </div>
  68. </div>
  69. <!-- 表格 -->
  70. <div class="cen-tab" :style="{'margin-top':role != 3?'110px':'70px'}">
  71. <div class="app-titel1">
  72. <!-- <div class="toptimeqhuan"> -->
  73. <!-- <div :class="{ tophove: tabFlag == 0 }" @click="tabFlagChange(0)">
  74. 销讲统计
  75. </div>
  76. <div :class="{ tophove: tabFlag == 1 }" @click="tabFlagChange(1)">
  77. 违禁统计
  78. </div> -->
  79. <el-radio-group @change="tabFlagChange" v-model="tabFlag">
  80. <el-radio-button :label="0">销讲统计</el-radio-button>
  81. <el-radio-button :label="1">违禁统计</el-radio-button>
  82. </el-radio-group>
  83. <!-- </div> -->
  84. <div
  85. style="margin-left: auto; margin-right: 10px"
  86. v-if="sta_men_downLoad"
  87. >
  88. <el-button @click="downLoad">导出</el-button>
  89. </div>
  90. </div>
  91. <el-table max-height="300" :data="tableData" stripe style="width: 100%" height="390">
  92. <el-table-column prop="batchId" label="序号" align="center">
  93. <template slot-scope="scope">
  94. {{
  95. scope.$index == tableData.length - 1
  96. ? "合计/平均"
  97. : scope.$index + 1
  98. }}
  99. </template>
  100. </el-table-column>
  101. <el-table-column prop="accountName" label="顾问" align="center">
  102. </el-table-column>
  103. <el-table-column prop="deptName" label="归属团队" align="center">
  104. </el-table-column>
  105. <el-table-column
  106. prop="activeCustomer"
  107. label="接待量"
  108. align="center"
  109. sortable
  110. >
  111. <template slot-scope="{ row }"> {{ row.activeCustomer }}次 </template>
  112. </el-table-column>
  113. <el-table-column
  114. prop="activeCustomer"
  115. label="未标顾问"
  116. align="center"
  117. sortable
  118. >
  119. <template slot-scope="{ row }"> {{ row.unTagCustomer }}个 </template>
  120. </el-table-column>
  121. <el-table-column
  122. v-if="tabFlag == 1"
  123. prop="prohibitedCustomer"
  124. label="违禁接待次数"
  125. align="center"
  126. sortable
  127. >
  128. <template slot-scope="{ row }">
  129. {{ row.prohibitedCustomer }}次
  130. </template>
  131. </el-table-column>
  132. <el-table-column
  133. v-if="tabFlag == 1"
  134. prop="prohibitedZb"
  135. label="违禁接待占比"
  136. align="center"
  137. sortable
  138. >
  139. <template slot-scope="{ row }"> {{ row.prohibitedZb }}% </template>
  140. </el-table-column>
  141. <el-table-column
  142. v-if="tabFlag == 0"
  143. prop="realityEquipmentCount"
  144. label="接待时长"
  145. align="center"
  146. sortable
  147. width="110"
  148. >
  149. <template slot-scope="{ row }">
  150. {{ Math.floor(row.sumDuration / 60) }}分钟
  151. </template>
  152. </el-table-column>
  153. <el-table-column
  154. v-if="tabFlag == 0"
  155. prop="fraction"
  156. label="销讲执行率"
  157. align="center"
  158. sortable
  159. width="110"
  160. >
  161. <template slot-scope="{ row }"> {{ row.fraction }}% </template>
  162. </el-table-column>
  163. <el-table-column
  164. v-for="(item, idx) in tablist"
  165. :key="idx"
  166. :prop="item.props"
  167. :label="item.label"
  168. align="center"
  169. width="100"
  170. >
  171. <template slot-scope="{ row }"> {{ row[item.props] }}% </template>
  172. </el-table-column>
  173. </el-table>
  174. <div style="display: flex; justify-content: flex-end; margin-top: 10px">
  175. <el-pagination
  176. @size-change="handleSizeChange"
  177. @current-change="handleCurrentChange"
  178. :current-page="current"
  179. :page-sizes="[10, 30, 50]"
  180. :page-size="size"
  181. layout="total, sizes, prev, pager, next, jumper"
  182. :total="total"
  183. >
  184. </el-pagination>
  185. </div>
  186. </div>
  187. <div class="app-box-san">
  188. <div class="zuo">
  189. <div class="title">
  190. <div class="text1">接待量排名(TOP10)</div>
  191. </div>
  192. <div class="hejisan">
  193. <div class="sanbox1" style="width: 35%;text-align: center;">
  194. <div class="text1-1">接待合计</div>
  195. <div class="text1-2">{{ sum1 }}次</div>
  196. </div>
  197. <div class="sanbox1" style="width: 40%;text-align: center;">
  198. <div class="text1-1">顾问人数</div>
  199. <div class="text1-2">{{ num1 }}个</div>
  200. </div>
  201. <div class="sanbox1" style="width: 25%;text-align: center;">
  202. <div class="text1-1">人均接待</div>
  203. <div class="text1-2">{{ avg1 }}次</div>
  204. </div>
  205. </div>
  206. <div
  207. v-if="echarlist.length != 0"
  208. style="min-height: 258px; width: 94%; margin: 0 auto;padding: 0 0 20px 0;"
  209. >
  210. <div class="jinbox" v-for="(item, i) in echarlist" :key="i">
  211. <!-- <div class="jinboxtit">{{ item.name }}</div> -->
  212. <span class="sequenceNum" :style="{
  213. 'background': i + 1 == 1 ? 'linear-gradient(180deg, #FFA395 0%, #F54D3F 100%)' : i + 1 == 2 ? 'linear-gradient(180deg, #FFBE70 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(180deg, #FFE683 0%, #FFCC00 100%)' : '#E5F0FF',
  214. 'color': i + 1 == 1 ? '#FFF' : i + 1 == 2 ? '#FFF' : i + 1 == 3 ? '#FFF' : '#333',
  215. 'box-shadow': i + 1 == 1 ? '0px 0px 6px 1px #F54D3F' : i + 1 == 2 ? '0px 0px 6px 1px #FF981E' : i + 1 == 3 ? '0px 0px 6px 1px #FFCC00' : '#E5F0FF',
  216. }">{{ i + 1 }}</span>
  217. <div class="jinboxtit">
  218. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start">
  219. <span class="name">{{ item.name }}</span>
  220. </el-tooltip>
  221. </div>
  222. <div class="jinbox-box">
  223. <!-- <div
  224. class="boxbaifenbi"
  225. :style="'width:' + item.zxl1 + '%;'"
  226. ></div> -->
  227. <div class="boxbaifenbi"
  228. :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': item.zxl1 + '%' }">
  229. </div>
  230. </div>
  231. <div class="jinboxbott">{{ item.zxl }}次</div>
  232. </div>
  233. </div>
  234. <div
  235. class="nulllist"
  236. style="height: 250px"
  237. v-if="echarlist.length == 0"
  238. >
  239. <div class="imgboxc">
  240. <!-- <img class="imgboxc-img" src="/img/nullnull.png" alt="" /> -->
  241. <div class="nulltext" style="font-size:14px;">暂无数据</div>
  242. </div>
  243. </div>
  244. </div>
  245. <div class="you">
  246. <div class="title">
  247. <div class="text1">接待时长排名(TOP10)</div>
  248. </div>
  249. <div class="hejisan">
  250. <div class="sanbox1" style="width: 35%;text-align: center;">
  251. <div class="text1-1">接待时长合计</div>
  252. <div class="text1-2">{{ Math.floor(sum2 / 60) }}分钟</div>
  253. </div>
  254. <div class="sanbox1" style="width: 40%;text-align: center;">
  255. <div class="text1-1">顾问人数</div>
  256. <div class="text1-2">{{ num2 }}个</div>
  257. </div>
  258. <div class="sanbox1" style="width: 25%;text-align: center;">
  259. <div class="text1-1">均值</div>
  260. <div class="text1-2">{{ Math.floor(avg2 / 60) }}分钟</div>
  261. </div>
  262. </div>
  263. <div
  264. v-if="echarlist2.length != 0"
  265. style="min-height: 258px; width: 94%; margin: 0 auto;padding: 0 0 20px 0;"
  266. >
  267. <div class="jinbox" v-for="(item, i) in echarlist2" :key="i">
  268. <!-- <div class="jinboxtit">{{ item.name }}</div> -->
  269. <span class="sequenceNum" :style="{
  270. 'background': i + 1 == 1 ? 'linear-gradient(180deg, #FFA395 0%, #F54D3F 100%)' : i + 1 == 2 ? 'linear-gradient(180deg, #FFBE70 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(180deg, #FFE683 0%, #FFCC00 100%)' : '#E5F0FF',
  271. 'color': i + 1 == 1 ? '#FFF' : i + 1 == 2 ? '#FFF' : i + 1 == 3 ? '#FFF' : '#333',
  272. 'box-shadow': i + 1 == 1 ? '0px 0px 6px 1px #F54D3F' : i + 1 == 2 ? '0px 0px 6px 1px #FF981E' : i + 1 == 3 ? '0px 0px 6px 1px #FFCC00' : '#E5F0FF',
  273. }">{{ i + 1 }}</span>
  274. <div class="jinboxtit">
  275. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start">
  276. <span class="name">{{ item.name }}</span>
  277. </el-tooltip>
  278. </div>
  279. <div class="jinbox-box">
  280. <!-- <div
  281. class="boxbaifenbi"
  282. :style="'width:' + item.percentage + '%;'"
  283. ></div> -->
  284. <div class="boxbaifenbi"
  285. :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': item.percentage + '%' }">
  286. </div>
  287. </div>
  288. <div class="jinboxbott">{{ item.zxl }}分钟</div>
  289. </div>
  290. </div>
  291. <div
  292. class="nulllist"
  293. style="height: 250px"
  294. v-if="echarlist2.length == 0"
  295. >
  296. <div class="imgboxc">
  297. <!-- <img class="imgboxc-img" src="/img/nullnull.png" alt="" /> -->
  298. <div class="nulltext" style="font-size:14px;">暂无数据</div>
  299. </div>
  300. </div>
  301. </div>
  302. </div>
  303. <div class="app-box-san">
  304. <div class="zuo">
  305. <div class="title">
  306. <div class="text1">平均执行率排名(TOP10)</div>
  307. <div class="text2">
  308. <el-select
  309. @change="teamAllLevelidtap()"
  310. style="width: 90%; margin: 0 auto"
  311. v-model="teamAllLevelid"
  312. placeholder="请选择"
  313. >
  314. <el-option
  315. v-for="item in teamAllLevel"
  316. :key="item.value"
  317. :label="item.name"
  318. :value="item.value"
  319. >
  320. </el-option>
  321. </el-select>
  322. </div>
  323. </div>
  324. <div class="hejisan">
  325. <div class="sanbox1" style="width: 50%;text-align: center;">
  326. <div class="text1-1">顾问人数</div>
  327. <div class="text1-2">{{ num3 }}个</div>
  328. </div>
  329. <div class="sanbox1" style="width: 50%;text-align: center;">
  330. <div class="text1-1">平均执行</div>
  331. <div class="text1-2">{{ avg3 }}%</div>
  332. </div>
  333. </div>
  334. <div
  335. v-if="echarlist1.length != 0"
  336. style="min-height: 258px; width: 94%; margin: 0 auto;padding: 0 0 20px 0;"
  337. >
  338. <div class="jinbox" v-for="(item, i) in echarlist1" :key="i">
  339. <!-- <div class="jinboxtit">{{ item.name }}</div> -->
  340. <span class="sequenceNum" :style="{
  341. 'background': topThreeColor(i),
  342. 'color': i < 3 ? '#FFF' : '#333',
  343. 'box-shadow': i < 3 ? '0px 0px 6px 1px' + topThreeColor(i) : '0px 0px 6px 1px' + '#E5F0FF',
  344. }">{{ i + 1 }}</span>
  345. <div class="jinboxtit">
  346. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start">
  347. <span class="name">{{ item.name }}</span>
  348. </el-tooltip>
  349. </div>
  350. <div class="jinbox-box">
  351. <!-- <div
  352. class="boxbaifenbi"
  353. :style="'width:' + item.zxl + '%;'"
  354. ></div> -->
  355. <div class="boxbaifenbi"
  356. :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': item.zxl + '%' }">
  357. </div>
  358. </div>
  359. <div class="jinboxbott">{{ item.zxl }}%</div>
  360. </div>
  361. </div>
  362. <div
  363. class="nulllist"
  364. style="height: 250px"
  365. v-if="echarlist1.length == 0"
  366. >
  367. <div class="imgboxc">
  368. <!-- <img class="imgboxc-img" src="/img/nullnull.png" alt="" /> -->
  369. <div class="nulltext" style="font-size:14px;">暂无数据</div>
  370. </div>
  371. </div>
  372. </div>
  373. <div class="you">
  374. <div class="title">
  375. <div class="text1">违禁接待次数排名(TOP10)</div>
  376. <div class="text2">
  377. <el-select
  378. @change="teamAllLeve2tap()"
  379. style="width: 90%; margin: 0 auto"
  380. v-model="teamAllLeve2id"
  381. placeholder="请选择"
  382. >
  383. <el-option
  384. v-for="item in teamAllLeve2"
  385. :key="item.value"
  386. :label="item.name"
  387. :value="item.value"
  388. >
  389. </el-option>
  390. </el-select>
  391. </div>
  392. </div>
  393. <div class="hejisan">
  394. <div class="sanbox1" style="width: 35%;text-align: center;">
  395. <div class="text1-1">违禁合计</div>
  396. <div class="text1-2">{{ sum4 }}次</div>
  397. </div>
  398. <div class="sanbox1" style="width: 40%;text-align: center;">
  399. <div class="text1-1">顾问人数</div>
  400. <div class="text1-2">{{ num4 }}个</div>
  401. </div>
  402. <div class="sanbox1" style="width: 25%;text-align: center;">
  403. <div class="text1-1">均值</div>
  404. <div class="text1-2">{{ avg4 }}次</div>
  405. </div>
  406. </div>
  407. <div
  408. v-if="echarlist3.length != 0"
  409. style="min-height: 258px; width: 94%; margin: 0 auto;padding: 0 0 20px 0;"
  410. >
  411. <div class="jinbox" v-for="(item, i) in echarlist3" :key="i">
  412. <!-- <div class="jinboxtit">{{ item.name }}</div> -->
  413. <span class="sequenceNum" :style="{
  414. 'background': i + 1 == 1 ? 'linear-gradient(180deg, #FFA395 0%, #F54D3F 100%)' : i + 1 == 2 ? 'linear-gradient(180deg, #FFBE70 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(180deg, #FFE683 0%, #FFCC00 100%)' : '#E5F0FF',
  415. 'color': i + 1 == 1 ? '#FFF' : i + 1 == 2 ? '#FFF' : i + 1 == 3 ? '#FFF' : '#333',
  416. 'box-shadow': i + 1 == 1 ? '0px 0px 6px 1px #F54D3F' : i + 1 == 2 ? '0px 0px 6px 1px #FF981E' : i + 1 == 3 ? '0px 0px 6px 1px #FFCC00' : '#E5F0FF',
  417. }">{{ i + 1 }}</span>
  418. <div class="jinboxtit">
  419. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start">
  420. <span class="name">{{ item.name }}</span>
  421. </el-tooltip>
  422. </div>
  423. <div class="jinbox-box">
  424. <!-- <div
  425. class="boxbaifenbi"
  426. :style="'width:' + item.zxl1 + '%;'"
  427. ></div> -->
  428. <div class="boxbaifenbi"
  429. :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': item.zxl1 + '%' }">
  430. </div>
  431. </div>
  432. <div class="jinboxbott">{{ item.zxl }}次</div>
  433. </div>
  434. </div>
  435. <div
  436. class="nulllist"
  437. style="height: 250px"
  438. v-if="echarlist3.length == 0"
  439. >
  440. <div class="imgboxc">
  441. <!-- <img class="imgboxc-img" src="/img/nullnull.png" alt="" /> -->
  442. <div class="nulltext" style="font-size:14px;">暂无数据</div>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. <!-- 接待未标顾问排名(TOP10) -->
  448. <div class="app-box-san">
  449. <div class="zuo">
  450. <div class="title">
  451. <div class="text1">接待未标顾问排名(TOP10)</div>
  452. <div class="text2">
  453. <el-select
  454. style="width: 90%; margin: 0 auto"
  455. v-model="teamAllLevelsId"
  456. placeholder="请选择"
  457. >
  458. <el-option
  459. v-for="item in teamAllLevels"
  460. :key="item.value"
  461. :label="item.name"
  462. :value="item.value"
  463. >
  464. </el-option>
  465. </el-select>
  466. </div>
  467. </div>
  468. <div class="hejisan">
  469. <div class="sanbox1" style="width: 50%;text-align: center;">
  470. <div class="text1-1">未标记合计</div>
  471. <div class="text1-2">{{ num5 }}个</div>
  472. </div>
  473. <div class="sanbox1" style="width: 50%;text-align: center;">
  474. <div class="text1-1">均值</div>
  475. <div class="text1-2">{{ avg5 }}个</div>
  476. </div>
  477. </div>
  478. <div
  479. v-if="echarlist1.length != 0"
  480. style="min-height: 258px; width: 94%; margin: 0 auto;padding: 0 0 20px 0;"
  481. >
  482. <div class="jinbox" v-for="(item, i) in echarlist4" :key="i">
  483. <!-- <div class="jinboxtit">{{ item.name }}</div> -->
  484. <span class="sequenceNum" :style="{
  485. 'background': topThreeColor(i),
  486. 'color': i < 3 ? '#FFF' : '#333',
  487. 'box-shadow': '0px 0px 6px 1px' + topThreeColor(i)
  488. }">{{ i + 1 }}</span>
  489. <div class="jinboxtit">
  490. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start">
  491. <span class="name">{{ item.name }}</span>
  492. </el-tooltip>
  493. </div>
  494. <div class="jinbox-box">
  495. <!-- <div
  496. class="boxbaifenbi"
  497. :style="'width:' + item.zxl + '%;'"
  498. ></div> -->
  499. <div class="boxbaifenbi"
  500. :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': item.zxl1 + '%' }">
  501. </div>
  502. </div>
  503. <div class="jinboxbott">{{ item.zxl }}个</div>
  504. </div>
  505. </div>
  506. <div
  507. class="nulllist"
  508. style="height: 250px"
  509. v-if="echarlist4.length == 0"
  510. >
  511. <div class="imgboxc">
  512. <!-- <img class="imgboxc-img" src="/img/nullnull.png" alt="" /> -->
  513. <div class="nulltext" style="font-size:14px;">暂无数据</div>
  514. </div>
  515. </div>
  516. </div>
  517. <div class="you" style="opacity: 0;">
  518. <div class="title">
  519. <div class="text1">违禁接待次数排名(TOP10)</div>
  520. <div class="text2">
  521. <el-select
  522. @change="teamAllLeve2tap()"
  523. style="width: 90%; margin: 0 auto"
  524. v-model="teamAllLeve2id"
  525. placeholder="请选择"
  526. >
  527. <el-option
  528. v-for="item in teamAllLeve2"
  529. :key="item.value"
  530. :label="item.name"
  531. :value="item.value"
  532. >
  533. </el-option>
  534. </el-select>
  535. </div>
  536. </div>
  537. <div class="hejisan">
  538. <div class="sanbox1" style="width: 35%;text-align: center;">
  539. <div class="text1-1">违禁合计</div>
  540. <div class="text1-2">{{ sum4 }}次</div>
  541. </div>
  542. <div class="sanbox1" style="width: 40%;text-align: center;">
  543. <div class="text1-1">顾问人数</div>
  544. <div class="text1-2">{{ num4 }}个</div>
  545. </div>
  546. <div class="sanbox1" style="width: 25%;text-align: center;">
  547. <div class="text1-1">均值</div>
  548. <div class="text1-2">{{ avg4 }}次</div>
  549. </div>
  550. </div>
  551. <div
  552. v-if="echarlist3.length != 0"
  553. style="min-height: 258px; width: 94%; margin: 0 auto;padding: 0 0 20px 0;"
  554. >
  555. <div class="jinbox" v-for="(item, i) in echarlist3" :key="i">
  556. <!-- <div class="jinboxtit">{{ item.name }}</div> -->
  557. <span class="sequenceNum" :style="{
  558. 'background': i + 1 == 1 ? 'linear-gradient(180deg, #FFA395 0%, #F54D3F 100%)' : i + 1 == 2 ? 'linear-gradient(180deg, #FFBE70 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(180deg, #FFE683 0%, #FFCC00 100%)' : '#E5F0FF',
  559. 'color': i + 1 == 1 ? '#FFF' : i + 1 == 2 ? '#FFF' : i + 1 == 3 ? '#FFF' : '#333',
  560. 'box-shadow': i + 1 == 1 ? '0px 0px 6px 1px #F54D3F' : i + 1 == 2 ? '0px 0px 6px 1px #FF981E' : i + 1 == 3 ? '0px 0px 6px 1px #FFCC00' : '#E5F0FF',
  561. }">{{ i + 1 }}</span>
  562. <div class="jinboxtit">
  563. <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start">
  564. <span class="name">{{ item.name }}</span>
  565. </el-tooltip>
  566. </div>
  567. <div class="jinbox-box">
  568. <!-- <div
  569. class="boxbaifenbi"
  570. :style="'width:' + item.zxl1 + '%;'"
  571. ></div> -->
  572. <div class="boxbaifenbi"
  573. :style="{ 'background': i + 1 == 1 ? 'linear-gradient(270deg, #F88881 0%, #E6625B 100%)' : i + 1 == 2 ? 'linear-gradient(270deg, #FFC940 0%, #FF981E 100%)' : i + 1 == 3 ? 'linear-gradient(270deg, #FFE800 0%, #FFCC00 100%)' : 'inear-gradient(270deg, #7BB1FF 0%, #618FFF 100%)', 'width': item.zxl1 + '%' }">
  574. </div>
  575. </div>
  576. <div class="jinboxbott">{{ item.zxl }}次</div>
  577. </div>
  578. </div>
  579. <div
  580. class="nulllist"
  581. style="height: 250px"
  582. v-if="echarlist3.length == 0"
  583. >
  584. <div class="imgboxc">
  585. <!-- <img class="imgboxc-img" src="/img/nullnull.png" alt="" /> -->
  586. <div class="nulltext" style="font-size:14px;">暂无数据</div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. </div>
  592. </template>
  593. <script>
  594. import * as echarts from "echarts";
  595. import { mapGetters } from "vuex";
  596. import { exportMethodPost } from "@/util/util";
  597. export default {
  598. name: "consultantBrand",
  599. data() {
  600. return {
  601. houseId: "",
  602. buildingoptions: [],
  603. houseList: [],
  604. dateType: 2,
  605. tabFlag: 0,
  606. current: 1,
  607. size: 30,
  608. total: 20,
  609. customtime: [],
  610. tablist: [],
  611. deptId: "",
  612. tableData: [],
  613. orgType: localStorage.getItem("orgType"),
  614. options: [],
  615. value: "1",
  616. statDateStart: "",
  617. statDateEnd: "",
  618. echarlist: [],
  619. echarlist1: [],
  620. echarlist2: [],
  621. echarlist3: [],
  622. echarlist4: [],
  623. teamAllLevel: [],
  624. teamAllLevels: [],
  625. teamAllLevelid: "",
  626. teamAllLeve2id: "",
  627. teamAllLeve2: [],
  628. teamAllLevels: [],
  629. teamAllLevelsId: '',
  630. sum1: "",
  631. avg1: "",
  632. num1: "",
  633. sum2: "",
  634. avg2: "",
  635. num2: "",
  636. sum3: "",
  637. avg3: "",
  638. num3: "",
  639. sum4: "",
  640. avg4: "",
  641. num4: "",
  642. sum5: "",
  643. avg5: "",
  644. num5: "",
  645. houseList: [],
  646. role: "",
  647. };
  648. },
  649. computed: {
  650. ...mapGetters(["permissions"]),
  651. },
  652. created() {
  653. this.sta_men_downLoad = this.permissions["sta_men_downLoad"];
  654. },
  655. mounted() {
  656. this.role = localStorage.getItem("orgType");
  657. if (this.role == 3) {
  658. this.houseId = localStorage.getItem("houseId");
  659. this.tabtimetap(4);
  660. this.deptFindList();
  661. this.teamAllLeve();
  662. } else {
  663. this.zkhousePage();
  664. }
  665. },
  666. methods: {
  667. // 排名颜色
  668. topThreeColor(index) {
  669. let str = ''
  670. switch (index) {
  671. case 0:
  672. str = '#F54D3F'
  673. break
  674. case 1:
  675. str = '#FF981E'
  676. break
  677. case 2:
  678. str = '#FFCC00'
  679. break
  680. default:
  681. str = '#E5F0FF'
  682. break
  683. }
  684. return str
  685. },
  686. downLoad() {
  687. let obj = {
  688. houseId: this.houseId,
  689. statDateStart: this.statDateStart,
  690. statDateEnd: this.statDateEnd,
  691. deptId: this.deptId,
  692. dateType: this.dateType == 7 ? null : this.dateType,
  693. type: 1,
  694. current: 1,
  695. size: 1,
  696. };
  697. // exportMethodPost()
  698. exportMethodPost(
  699. "autoSR/cusStageStatistics/accountRankExport",
  700. "顾问排名",
  701. obj
  702. );
  703. },
  704. houseChange() {
  705. this.customtime = [];
  706. this.TimetoAhoose = 4;
  707. this.statDateStart = "";
  708. this.statDateEnd = "";
  709. this.sum1 = "";
  710. this.avg1 = "";
  711. this.num1 = "";
  712. this.sum2 = "";
  713. this.avg2 = "";
  714. this.num2 = "";
  715. this.sum3 = "";
  716. this.avg3 = "";
  717. this.num3 = "";
  718. this.sum4 = "";
  719. this.avg4 = "";
  720. this.num4 = "";
  721. this.sum5 = "";
  722. this.avg5 = "";
  723. this.num5 = "";
  724. this.tableData = [];
  725. this.tabFlag = 0;
  726. this.echarlist = [];
  727. this.echarlist1 = [];
  728. this.echarlist2 = [];
  729. this.echarlist3 = [];
  730. this.echarlist4 = [];
  731. this.tabtimetap(4);
  732. this.deptFindList();
  733. this.teamAllLeve();
  734. },
  735. zkhousePage() {
  736. this.$api.api
  737. .findHouseByUser({
  738. orgType: localStorage.getItem("orgType"),
  739. })
  740. .then((res) => {
  741. this.houseList = res.data;
  742. this.houseId = res.data[0].id;
  743. this.tabtimetap(4);
  744. this.deptFindList();
  745. this.teamAllLeve();
  746. });
  747. },
  748. async deptChange() {
  749. await this.init();
  750. },
  751. // 获取一级
  752. teamAllLeve() {
  753. this.teamAllLevel = [{ name: "平均执行", value: "" }];
  754. this.teamAllLeve2 = [{ name: "总次数", value: "" }];
  755. this.teamAllLevels = [{name: '总次数', value: ''}]
  756. let pamaet = {
  757. houseId: this.houseId,
  758. dateType: 0,
  759. statDateStart: this.statDateStart,
  760. statDateEnd: this.statDateEnd,
  761. };
  762. if (this.dateType == 7) {
  763. pamaet.dateType = null;
  764. } else {
  765. pamaet.dateType = this.dateType;
  766. }
  767. this.$api.http.teamAllLevel(pamaet).then((res) => {
  768. let arr1 = res.data.resultsList || [];
  769. let arr2 = res.data.sensitiveWordsList || [];
  770. arr1.map((item) => {
  771. this.teamAllLevel.push({
  772. name: item.name,
  773. value: item.marketingId,
  774. });
  775. });
  776. arr2.map((item) => {
  777. this.teamAllLeve2.push({
  778. name: item.words,
  779. value: item.words,
  780. });
  781. });
  782. this.teamAllLevelid = "";
  783. this.teamAllLeve2id = "";
  784. });
  785. },
  786. deptFindList() {
  787. this.options = [];
  788. // 获取团队
  789. this.$api.http
  790. .overviewfindList({
  791. houseId: this.houseId,
  792. })
  793. .then((res) => {
  794. let userinfo = JSON.parse(sessionStorage.getItem("zk-userInfo"));
  795. if (userinfo.content.deptType == 1) {
  796. this.options.push(...res.data);
  797. this.deptId = this.options[0].deptId;
  798. } else {
  799. this.options = [
  800. {
  801. name: "全部",
  802. deptId: "",
  803. },
  804. ];
  805. this.deptId = "";
  806. this.options.push(...res.data);
  807. }
  808. this.accountRank();
  809. });
  810. },
  811. async init() {
  812. this.accountRank();
  813. this.echarlist = await this.accountRankTOP10(1);
  814. this.echarlist1 = await this.accountRankTOP10(3, this.teamAllLevelid, "");
  815. this.echarlist2 = await this.accountRankTOP10(2);
  816. this.echarlist3 = await this.accountRankTOP10(4, "", this.teamAllLeve2id);
  817. this.echarlist4 = await this.accountRankTOP10(5, "", this.teamAllLeve2id);
  818. },
  819. // 获取图标
  820. async accountRankTOP10(type, marketingId = "", words = "") {
  821. let res = await this.$api.api.accountRankTOP10({
  822. houseId: this.houseId,
  823. statDateStart: this.statDateStart,
  824. statDateEnd: this.statDateEnd,
  825. deptId: this.deptId,
  826. dateType: this.dateType == 7 ? null : this.dateType,
  827. type,
  828. marketingId,
  829. words,
  830. });
  831. this["sum" + type] = res.data.sum || 0;
  832. this["num" + type] = res.data.num || 0;
  833. this["avg" + type] = res.data.avg || 0;
  834. let arr = [];
  835. let max = 0;
  836. let newarr = res.data.list || [];
  837. if (newarr.length != 0) {
  838. res.data.list.map((item) => {
  839. let obj = {};
  840. if (type == 1) {
  841. obj.name = item.accountName;
  842. obj.zxl = item.activeCustomer;
  843. arr.push(obj);
  844. } else if (type == 2) {
  845. obj.name = item.accountName;
  846. obj.zxl = Math.floor(item.sumDuration / 60);
  847. if (max < obj.zxl) {
  848. max = obj.zxl;
  849. }
  850. arr.push(obj);
  851. } else if (type == 3) {
  852. obj.name = item.accountName;
  853. obj.zxl = item.fraction;
  854. arr.push(obj);
  855. } else if(type == 5) {
  856. obj.name = item.accountName;
  857. obj.zxl = item.unTagCustomer;
  858. arr.push(obj);
  859. } else {
  860. obj.name = item.accountName;
  861. obj.zxl = item.prohibitedCustomer;
  862. arr.push(obj);
  863. }
  864. });
  865. }
  866. if (type == 2) {
  867. arr.forEach((item) => {
  868. item.percentage = (item.zxl / max) * 100;
  869. });
  870. }
  871. if (type == 3) {
  872. arr = arr;
  873. }
  874. if (type == 4) {
  875. console.log(
  876. arr,
  877. "arr4,ajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjaksl"
  878. );
  879. arr = this.dealData(arr);
  880. }
  881. if (type == 5) {
  882. arr = this.dealData(arr);
  883. }
  884. return arr;
  885. },
  886. accountRank() {
  887. this.$api.api
  888. .accountRank({
  889. houseId: this.houseId,
  890. statDateStart: this.statDateStart,
  891. statDateEnd: this.statDateEnd,
  892. current: this.current,
  893. size: this.size,
  894. deptId: this.deptId,
  895. dateType: this.dateType == 7 ? null : this.dateType,
  896. })
  897. .then((res) => {
  898. this.tableData = res.data.records;
  899. // 数据处理
  900. // 需要两个数组,一个用来展示
  901. this.deailDate();
  902. this.total = res.data.total;
  903. });
  904. },
  905. confirmtime() {
  906. this.dateType = 7;
  907. this.statDateStart = this.customtime[0];
  908. this.statDateEnd = this.customtime[1];
  909. this.init();
  910. },
  911. deailDate() {
  912. this.tablist = [];
  913. // 当他是第一个 小将
  914. if (this.tabFlag == 0) {
  915. this.tableData[0].resultsList.map((item, idx) => {
  916. let obj = {};
  917. obj.label = item.name;
  918. obj.props = "str" + idx;
  919. this.tablist.push(obj);
  920. });
  921. this.tableData.map((item) => {
  922. this.tablist.map((item1, idx) => {
  923. item[item1.props] = item.resultsList[idx].zxl;
  924. });
  925. });
  926. } else {
  927. this.tableData[0].sensitiveWordsList.map((item, idx) => {
  928. let obj = {};
  929. obj.label = item.words;
  930. obj.props = "str" + idx;
  931. this.tablist.push(obj);
  932. });
  933. this.tableData.map((item) => {
  934. this.tablist.map((item1, idx) => {
  935. item[item1.props] = item.sensitiveWordsList[idx].num;
  936. });
  937. });
  938. }
  939. },
  940. //平均执行率切换一级
  941. async teamAllLevelidtap() {
  942. // this.teamData3();
  943. this.echarlist1 = await this.accountRankTOP10(3, this.teamAllLevelid, "");
  944. },
  945. //违禁接待次数一级切换
  946. async teamAllLeve2tap() {
  947. // this.teamData5();
  948. this.echarlist3 = await this.accountRankTOP10(4, "", this.teamAllLeve2id);
  949. },
  950. echarCreat() {
  951. let myChart = echarts.init(document.getElementById("echar"));
  952. let option = {
  953. tooltip: {
  954. trigger: "axis",
  955. axisPointer: {
  956. type: "shadow",
  957. },
  958. },
  959. color: [
  960. "#66AFF5",
  961. "#FABD2B",
  962. "#6F8EDC",
  963. "#FFCF8F",
  964. "#F98120",
  965. "#1CC99E",
  966. "#9474FB",
  967. "#657292",
  968. "#7A6A99",
  969. "#BF5D52",
  970. "#EE6666",
  971. "#77B7E4",
  972. "#E6A065",
  973. "#9D5139",
  974. "#C1AA88",
  975. "#F87F7A",
  976. "#F6CF74",
  977. "#7F5506",
  978. "#88BB9B",
  979. "#6E99AA",
  980. "#5789D0",
  981. ],
  982. legend: {},
  983. grid: {
  984. left: "3%",
  985. right: "4%",
  986. bottom: "3%",
  987. containLabel: true,
  988. },
  989. xAxis: {
  990. type: "value",
  991. boundaryGap: [0, 0.01],
  992. },
  993. yAxis: {
  994. type: "category",
  995. data: ["Brazil", "Indonesia", "USA", "India", "China", "World"],
  996. },
  997. series: [
  998. {
  999. type: "bar",
  1000. data: [19325, 23438, 31000, 121594, 134141, 681807],
  1001. },
  1002. ],
  1003. };
  1004. myChart.setOption(option);
  1005. },
  1006. handleCurrentChange(e) {
  1007. this.current = e;
  1008. this.accountRank();
  1009. },
  1010. handleSizeChange(e) {
  1011. this.size = e;
  1012. this.accountRank();
  1013. },
  1014. //切换时间
  1015. tabtimetap(index) {
  1016. this.statDateStart = "";
  1017. this.statDateEnd = "";
  1018. this.dateType = index;
  1019. this.init();
  1020. },
  1021. tabFlagChange(idx) {
  1022. this.tabFlag = idx;
  1023. this.deailDate();
  1024. },
  1025. dealData(arr) {
  1026. console.log(arr, "arr");
  1027. let num = Math.max.apply(
  1028. Math,
  1029. arr.map(function (o) {
  1030. return o.zxl;
  1031. })
  1032. ); //结果:3
  1033. console.log(num, "nums");
  1034. arr.map((item) => {
  1035. if (num != 0) {
  1036. item.zxl1 = Math.floor((item.zxl / num) * 100);
  1037. } else {
  1038. item.zxl1 = 0;
  1039. }
  1040. });
  1041. console.log(arr, "arr2");
  1042. return arr;
  1043. },
  1044. },
  1045. };
  1046. </script>
  1047. <style scoped="scoped" lang="scss" >
  1048. .sequenceNum {
  1049. display: flex;
  1050. width: 28px;
  1051. height: 24px;
  1052. justify-content: center;
  1053. align-items: center;
  1054. background: #E5F0FF;
  1055. border-radius: 15px;
  1056. color: #333333;
  1057. margin-right: 10px;
  1058. }
  1059. .box-center {
  1060. width: 100%;
  1061. padding: 15px;
  1062. min-width: 1000px;
  1063. padding-bottom: 100px;
  1064. }
  1065. .cen-tab {
  1066. width: 100%;
  1067. padding: 15px;
  1068. background: #ffffff;
  1069. margin-top: 15px;
  1070. }
  1071. .tophove {
  1072. color: #ffffff;
  1073. background: #2671e2;
  1074. }
  1075. .app-titel1 {
  1076. width: 100%;
  1077. height: 70px;
  1078. background: #ffffff;
  1079. // box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  1080. border-radius: 4px;
  1081. display: flex;
  1082. align-items: center;
  1083. flex-wrap: wrap;
  1084. .titel-text {
  1085. height: 100%;
  1086. font-size: 18px;
  1087. font-weight: 600;
  1088. color: #32363d;
  1089. line-height: 70px;
  1090. margin-left: 30px;
  1091. }
  1092. .toptimeqhuan {
  1093. width: 190px;
  1094. height: 32px;
  1095. background: #ffffff;
  1096. border-radius: 4px;
  1097. border: 1px solid #e0e0e0;
  1098. display: flex;
  1099. align-items: center;
  1100. overflow: hidden;
  1101. margin-left: 20px;
  1102. cursor: pointer;
  1103. }
  1104. .toptimeqhuan div {
  1105. flex: 1;
  1106. text-align: center;
  1107. line-height: 32px;
  1108. font-size: 16px;
  1109. }
  1110. }
  1111. .app-top {
  1112. // width: 100%;
  1113. width: calc(100% - 270px);
  1114. position: fixed;
  1115. z-index: 999;
  1116. margin-top: -16px;
  1117. background: #ffffff;
  1118. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  1119. box-shadow: 0px 0px 10px 0px #dadada;
  1120. border-radius: 4px;
  1121. padding-top: 15px;
  1122. padding-bottom: 15px;
  1123. .app-titel {
  1124. width: 100%;
  1125. display: flex;
  1126. align-items: center;
  1127. .titel-text {
  1128. height: 100%;
  1129. font-size: 16px;
  1130. font-weight: 600;
  1131. color: #32363d;
  1132. text-indent: 30px;
  1133. }
  1134. .toptimeqhuan {
  1135. width: 190px;
  1136. height: 32px;
  1137. background: #ffffff;
  1138. border-radius: 4px;
  1139. border: 1px solid #e0e0e0;
  1140. display: flex;
  1141. align-items: center;
  1142. overflow: hidden;
  1143. margin-left: 20px;
  1144. cursor: pointer;
  1145. }
  1146. .toptimeqhuan div {
  1147. flex: 1;
  1148. text-align: center;
  1149. line-height: 32px;
  1150. font-size: 14px;
  1151. }
  1152. }
  1153. }
  1154. .app-box-san {
  1155. width: 100%;
  1156. min-height: 400px;
  1157. display: flex;
  1158. margin-top: 15px;
  1159. .zuo {
  1160. flex: 1;
  1161. height: 100%;
  1162. margin-right: 15px;
  1163. background: #ffffff;
  1164. border-radius: 4px;
  1165. .title {
  1166. width: 100%;
  1167. height: 55px;
  1168. border-bottom: 1px solid #e0e0e0;
  1169. display: flex;
  1170. align-content: center;
  1171. .text1 {
  1172. flex: 2;
  1173. line-height: 55px;
  1174. text-indent: 20px;
  1175. font-weight: 500;
  1176. font-size: 16px;
  1177. color: #333333;
  1178. }
  1179. .text2 {
  1180. flex: 1;
  1181. height: 55px;
  1182. display: flex;
  1183. align-items: center;
  1184. }
  1185. }
  1186. }
  1187. .you {
  1188. height: 100%;
  1189. flex: 1;
  1190. background: #ffffff;
  1191. border-radius: 4px;
  1192. .title {
  1193. width: 100%;
  1194. height: 55px;
  1195. border-bottom: 1px solid #e0e0e0;
  1196. display: flex;
  1197. align-content: center;
  1198. .text1 {
  1199. flex: 2;
  1200. line-height: 55px;
  1201. text-indent: 20px;
  1202. font-weight: 500;
  1203. font-size: 16px;
  1204. color: #333333;
  1205. }
  1206. .text2 {
  1207. flex: 1;
  1208. height: 55px;
  1209. display: flex;
  1210. align-items: center;
  1211. }
  1212. }
  1213. }
  1214. }
  1215. .hejisan {
  1216. width: 92%;
  1217. margin: 0 auto;
  1218. display: flex;
  1219. padding-top: 10px;
  1220. padding-bottom: 10px;
  1221. .text1-1 {
  1222. color: #666666;
  1223. }
  1224. .text1-2 {
  1225. color: #333333;
  1226. margin-top: 10px;
  1227. font-weight: bold;
  1228. }
  1229. }
  1230. // 进度条
  1231. .jinbox {
  1232. width: 100%;
  1233. height: 18px;
  1234. line-height: 18px;
  1235. display: flex;
  1236. font-size: 16px;
  1237. color: #2c3542;
  1238. margin-top: 24px;
  1239. .jinboxtit {
  1240. width: 14%;
  1241. height: 18px;
  1242. padding-right: 6px;
  1243. white-space: nowrap;
  1244. text-overflow: ellipsis;
  1245. overflow: hidden;
  1246. }
  1247. .jinbox-box {
  1248. position: relative;
  1249. width: 75%;
  1250. height: 100%;
  1251. border-radius: 8px;
  1252. background: #f2f2f2;
  1253. }
  1254. .boxbaifenbi {
  1255. height: 100%;
  1256. background: #60d7a0;
  1257. border-radius: 8px;
  1258. }
  1259. .boxbaifenbi2 {
  1260. height: 100%;
  1261. background: #5b8ff9;
  1262. }
  1263. .jinboxbott {
  1264. width: 16%;
  1265. display: flex;
  1266. justify-content: flex-end;
  1267. }
  1268. }
  1269. .div-lab {
  1270. display: flex;
  1271. margin: 5px;
  1272. }
  1273. .div-inp {
  1274. width: 200px;
  1275. }
  1276. .label {
  1277. font-size: 14px;
  1278. font-weight: 400;
  1279. color: #32363d;
  1280. line-height: 32px;
  1281. margin-left: 15px;
  1282. min-width: 40px;
  1283. }
  1284. /deep/ .el-table__header-wrapper{
  1285. thead{
  1286. tr{
  1287. th{
  1288. background: #F5F7FA;
  1289. color: #333333;
  1290. }
  1291. }
  1292. }
  1293. }
  1294. </style>