You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1197 lines
28 KiB

  1. <template>
  2. <view class="pages">
  3. <!-- 日报内容部分 -->
  4. <view class="container">
  5. <!-- 头部日报卡 -->
  6. <view class="c-head-card">
  7. <view class="c-title-text">
  8. {{ projectName || '' }}数智工牌周报
  9. </view>
  10. <text class="date">{{ weekObj.createTimeName }}</text>
  11. <view class="creative-time">
  12. 生成时间:{{ weekObj.createTime || '--' }}
  13. </view>
  14. </view>
  15. </view>
  16. <view class="nodata-box" v-if="nodata" style="background: url(../../static/images/nodata.png)no-repeat;background-size: contain;" >
  17. 此项目本周还没有接待量哦~
  18. </view>
  19. <view v-if="!nodata" >
  20. <!-- 简报 -->
  21. <view class="briefing">
  22. <view class="briefing-title">
  23. 简报
  24. </view>
  25. <!-- 简报表格部分 -->
  26. <view class="briefing-box">
  27. <block v-for="(data, index) in numlist" :key="index">
  28. <view class="briefing-box-item" @click="toAuthPage(data)">
  29. <view class="tops" :class="[data.class || '']">
  30. {{ data.name }}
  31. </view>
  32. <view class="middle" :class="[data.class || '']">
  33. {{ data.num || 0 }}
  34. </view>
  35. <view class="bottom">
  36. 对比上周: {{ data.preNum || 0 }}
  37. <text class="b-text"
  38. :class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent || '0' }}</text>
  39. <template v-if="data.percent != 0">
  40. <text style="margin-left: 8rpx;font-size: 34rpx;font-weight: bold;"
  41. :class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent > 0 ? '↑' : '↓' }}</text>
  42. </template>
  43. </view>
  44. </view>
  45. </block>
  46. </view>
  47. </view>
  48. <!-- 销讲场景执行排名 -->
  49. <view class="execution-ranking">
  50. <view class="execution-ranking-title">
  51. 销讲场景执行排名
  52. </view>
  53. <template v-if="isShowXJTop1List">
  54. <view class="execution-ranking-desc" v-if="false">
  55. <text>销讲场景平均执行对比上周</text>
  56. <text>{{ rankTop('fractionPKName') }}</text>
  57. <text>{{ rankTop('fractionPK') }}</text>
  58. <text>%</text>
  59. <template v-if="rankTop('fractionBastValue') > 0">
  60. <text>,其中【{{ rankTop('fractionBastName') }}】最强为</text>
  61. <text class="up">{{ rankTop('fractionBastValue') }}</text>
  62. <text>%</text>
  63. </template>
  64. <template v-if="rankTop('fractionLastValue') < 0">
  65. <text>,【{{ rankTop('fractionLastName') }}】执行最弱为</text>
  66. <text class="down">{{ rankTop('fractionLastValue') }}</text>
  67. <text>%;</text>
  68. </template>
  69. </view>
  70. <!-- 排名百分比列表 -->
  71. <view class="ranking-box" @click="toTrendAnalysis('销讲数据')">
  72. <block v-for="(percent, index) in weekObj.XJTop1List" :key="index">
  73. <view class="ranking-item">
  74. <view class="left">{{ percent.title }}</view>
  75. <view class="middle">
  76. <u-line-progress :active-color="$options.filters.setColor(index)"
  77. inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
  78. </u-line-progress>
  79. </view>
  80. <view class="right"> {{ percent.value || '0' }} %</view>
  81. </view>
  82. </block>
  83. </view>
  84. </template>
  85. <template v-else>
  86. <view class="empity">
  87. 暂无数据
  88. </view>
  89. </template>
  90. </view>
  91. <!-- 接待统计 -->
  92. <view class="statistics">
  93. <view class="statistics-title">
  94. 接待统计
  95. </view>
  96. <template v-if="isShowStatistics">
  97. <view class="statistics-desc" v-if="false">
  98. <text>
  99. 顾问平均执行率对比上周
  100. </text>
  101. <text>
  102. {{ rankTop('ranktype') || '' }}
  103. </text>
  104. <text :class="[rankTop('class')]">{{ rankTop('people') || '' }}</text>
  105. <text class="">
  106. 人,其中{{ rankTop('topName') || '' }}上升
  107. </text>
  108. <text class="up">{{ rankTop('topPk') || '0' }}</text>
  109. <text class="">
  110. %为最高,{{ rankTop('lastName') || '' }}下降
  111. </text>
  112. <text class="down">{{ rankTop('lastPk') || '0' }}</text>
  113. <text class="">
  114. %降幅最大。
  115. </text>
  116. </view>
  117. <view class="table">
  118. <view class="thead">
  119. <block v-for="(head, headIndex) in tableHead" :key="headIndex">
  120. <view class="thead-item" :style="[head.style]">
  121. {{ head.title }}
  122. </view>
  123. </block>
  124. </view>
  125. <view class="tbody" @click="toEmployeesstatistics('顾问排名')">
  126. <block v-for="(data, index) in weekObj.customerInfo1" :key="index">
  127. <view class="tbody-item">
  128. <view class="tbody-items name">{{ data.name }}</view>
  129. <view class="tbody-items nums">{{ data.activeCustomer }}</view>
  130. <view class="tbody-items time">{{ data.avgDuration }}m</view>
  131. <view class="tbody-items percent">{{ data.fraction }}%</view>
  132. <view class="tbody-items week" :class="{up: data.pk > 0, down: data.pk < 0}">
  133. {{ data.pk > 0 ? `+${data.pk}` : data.pk }}%
  134. </view>
  135. </view>
  136. </block>
  137. </view>
  138. </view>
  139. </template>
  140. <template v-else>
  141. <view class="empity">
  142. 暂无数据
  143. </view>
  144. </template>
  145. </view>
  146. <!-- 顾问销讲执行率排名 -->
  147. <view class="guwen-ranking">
  148. <view class="guwen-ranking-title">
  149. 顾问销讲执行率排名(TOP10)
  150. </view>
  151. <template v-if="isShowZXLTopList">
  152. <!-- 排名百分比列表 -->
  153. <view class="ranking-box">
  154. <block v-for="(percent, index) in weekObj.ZXLTopList" :key="index">
  155. <view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
  156. <view class="left">{{ percent.title }}</view>
  157. <view class="middle">
  158. <u-line-progress :active-color="$options.filters.setColor(index)"
  159. inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
  160. </u-line-progress>
  161. </view>
  162. <view class="right"> {{ percent.value || '0' }} %</view>
  163. </view>
  164. </block>
  165. </view>
  166. </template>
  167. <template v-else>
  168. <view class="empity">
  169. 暂无数据
  170. </view>
  171. </template>
  172. </view>
  173. <!-- 顾问接待量排名 -->
  174. <view class="guwen-ranking">
  175. <view class="guwen-ranking-title">
  176. 顾问接待量排名(TOP10)
  177. </view>
  178. <template v-if="isShowJDLTopList">
  179. <!-- 排名百分比列表 -->
  180. <view class="ranking-box">
  181. <block v-for="(percent, index) in weekObj.JDLTopList" :key="index">
  182. <view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
  183. <view class="left">{{ percent.title }}</view>
  184. <view class="middle">
  185. <u-line-progress :active-color="$options.filters.setColor(index)"
  186. inactive-color="#F2F2F2" :show-percent="false" :percent="percent.values">
  187. </u-line-progress>
  188. </view>
  189. <view class="right"> {{ percent.value || '0' }} </view>
  190. </view>
  191. </block>
  192. </view>
  193. </template>
  194. <template v-else>
  195. <view class="empity">
  196. 暂无数据
  197. </view>
  198. </template>
  199. </view>
  200. <!-- 使用建议 -->
  201. <view class="proposal" v-if="weekObj.suggest">
  202. <view class="proposal-title">
  203. 使用建议
  204. </view>
  205. <!-- 建议的文字 -->
  206. <view class="proposal-box">
  207. <u-parse class="ql-editor" :content="weekObj.suggest" />
  208. </view>
  209. </view>
  210. <!-- 底部按钮 -->
  211. <view class="nav-footer">
  212. <view class="footer-item" @click="toHome">
  213. 回到管理端
  214. </view>
  215. <view class="footer-item full" style="margin-left: 24rpx;">
  216. <button open-type="share" class="fulls">
  217. 一键转发
  218. </button>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </template>
  224. <script>
  225. import uParse from '@/components/gaoyia-parse/parse.vue'
  226. export default {
  227. components: {
  228. uParse
  229. },
  230. data() {
  231. return {
  232. nodata: false,
  233. tableHead: [{
  234. title: '顾问',
  235. style: {
  236. flex: 1
  237. }
  238. },
  239. {
  240. title: '接待量',
  241. style: {
  242. flex: 1
  243. }
  244. },
  245. {
  246. title: '平均接待时长',
  247. style: {
  248. flex: 2
  249. }
  250. },
  251. {
  252. title: '平均执行率',
  253. style: {
  254. flex: 2
  255. }
  256. },
  257. {
  258. title: '对比上周',
  259. style: {
  260. flex: 1.5
  261. }
  262. },
  263. ],
  264. id: '', // id
  265. needList: ['JDLTop', 'ZXLTop', 'XJTop1'], // 需要转换数组的内容
  266. // 简报
  267. numlist: [{
  268. name: '接待量 (次)',
  269. num: '',
  270. setName: 'receptionCount1',
  271. percent: '',
  272. percentName: 'receptionCountPK',
  273. preNum: '', // 上周数量
  274. preNumName: 'receptionCount2', //
  275. path: '/pages/center/records/index',
  276. pathParms: '?activeTotal=4&refresh=refresh', // 参数
  277. auth: '接待记录', //
  278. }, {
  279. name: '有效接待 (次)',
  280. num: '',
  281. setName: 'activeCustomer1',
  282. percent: '',
  283. percentName: 'activeCustomerPK',
  284. preNum: '', // 上周数量
  285. preNumName: 'activeCustomer2', //
  286. path: '/pages/center/records/index',
  287. pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
  288. auth: '接待记录', //
  289. },
  290. {
  291. name: '平均执行率(%)',
  292. num: '',
  293. setName: 'fraction1',
  294. percent: '',
  295. percentName: 'fractionPK',
  296. preNum: '', // 上周数量
  297. preNumName: 'fraction2', //
  298. path: '/pages/center/records/index',
  299. pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
  300. auth: '接待记录', //
  301. },
  302. {
  303. name: '平均接待时长(分)',
  304. num: '',
  305. setName: 'avgDuration1',
  306. percent: '',
  307. percentName: 'avgDurationPK',
  308. preNum: '', // 上周数量
  309. preNumName: 'avgDuration2', //
  310. path: '/pages/center/records/index',
  311. pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
  312. auth: '接待记录', //
  313. },
  314. {
  315. name: '违禁接待 (次)',
  316. num: '',
  317. setName: 'prohibitedNum1',
  318. percent: '',
  319. percentName: 'prohibitedNumPK',
  320. preNum: '', // 上周数量
  321. preNumName: 'prohibitedNum2', //
  322. class: 'down',
  323. path: '/pages/center/prohibited/index',
  324. pathParms: '?activeTotal=4&violatedStatus=1&refresh=refresh', // 参数
  325. auth: '违禁记录',
  326. },
  327. {
  328. name: '客户画像触达 (次)',
  329. num: '',
  330. setName: 'reachSum1',
  331. percent: '',
  332. percentName: 'reachSumPK',
  333. preNum: '', // 上周数量
  334. preNumName: 'reachSum2', //
  335. path: '/pages/center/Piabodata/Userinsightinto',
  336. pathParms: '?activeTotal=3', // 参数
  337. auth: '销讲数据',
  338. },
  339. {
  340. name: '已标记',
  341. num: '',
  342. setName: 'labelledReceptionNum1',
  343. percent: '',
  344. percentName: 'labelledReceptionNumPK',
  345. preNum: '', // 上周数量
  346. preNumName: 'labelledReceptionNum2', //
  347. path: '/pages/center/records/index',
  348. pathParms: '?activeTotal=4&refresh=refresh&markAdvisor=1', // 参数
  349. auth: '接待记录', //
  350. },
  351. {
  352. name: '未标记',
  353. num: '',
  354. setName: 'unlabelledReceptionNum1',
  355. percent: '',
  356. percentName: 'unlabelledReceptionNumPK',
  357. preNum: '', // 上周数量
  358. preNumName: 'unlabelledReceptionNum2', //
  359. class: 'down',
  360. path: '/pages/center/records/index',
  361. pathParms: '?activeTotal=4&refresh=refresh&markAdvisor=0', // 参数
  362. auth: '接待记录', //
  363. },
  364. ],
  365. // 周报详情
  366. weekObj: {},
  367. projectName: '', // 项目名称
  368. }
  369. },
  370. computed: {
  371. // 获取本地存储的权限列表
  372. menuList() {
  373. return uni.getStorageSync('weapp_session_Menu_data')
  374. },
  375. // 排名最高与最低
  376. rankTop() {
  377. return name => {
  378. let obj = {}
  379. try {
  380. if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) {
  381. obj.ranktype = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) >
  382. 0 ? '上升' : '下降'
  383. obj.people = Math.abs(this.weekObj.customerInfo1.length - this.weekObj.customerInfo2
  384. .length)
  385. }
  386. if (this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0) {
  387. obj.topName = this.weekObj.customerInfo1[0].name
  388. obj.topPk = Math.abs(this.weekObj.customerInfo1[0].pk)
  389. obj.lastName = this.weekObj.customerInfo1[this.weekObj.customerInfo1.length - 1].name,
  390. obj.lastPk = Math.abs(this.weekObj.customerInfo1[this.weekObj.customerInfo1.length - 1]
  391. .pk)
  392. }
  393. if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) {
  394. obj.class = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ?
  395. 'up' : 'down'
  396. }
  397. if (this.weekObj.fractionPK) {
  398. obj.fractionPKName = this.weekObj.fractionPK > 0 ? '上涨' : '下跌'
  399. obj.fractionPK = Math.abs(this.weekObj.fractionPK)
  400. }
  401. if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) {
  402. obj.fractionBastName = this.weekObj.XJTop1List[0].title
  403. obj.fractionBastValue = this.weekObj.XJTop1List[0].value
  404. }
  405. if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) {
  406. obj.fractionLastName = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length - 1].title
  407. obj.fractionLastValue = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length - 1].value
  408. }
  409. return obj[name] || ''
  410. } catch (e) {
  411. console.log(e)
  412. return ''
  413. }
  414. }
  415. },
  416. // 接待统计
  417. isShowStatistics() {
  418. // return this.rankTop('ranktype') && this.rankTop('class') && this.rankTop('people') && this.rankTop('topName') && this.rankTop('topPk') && this.rankTop('lastName') && this.rankTop('lastPk') && this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0
  419. return this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0
  420. },
  421. isShowXJTop1List() {
  422. // return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0 && this.rankTop('fractionPKName') && this.rankTop('fractionPK') && this.rankTop('fractionBastName') && this.rankTop('fractionBastValue') && this.rankTop('fractionLastName') && this.rankTop('fractionLastName') && this.rankTop('fractionLastValue')
  423. return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0
  424. },
  425. isShowZXLTopList() {
  426. return this.weekObj.ZXLTopList && this.weekObj.ZXLTopList.length > 0
  427. },
  428. isShowJDLTopList() {
  429. return this.weekObj.JDLTopList && this.weekObj.JDLTopList.length > 0
  430. },
  431. },
  432. onLoad(option) {
  433. if (option.id) this.id = option.id
  434. this.getMessage()
  435. },
  436. onShareAppMessage() {
  437. return {
  438. title: `${this.projectName}数智工牌周报`,
  439. path: `/pages/reportExcel/weekReport?id=${this.id}`
  440. }
  441. },
  442. methods: {
  443. // 趋势分析
  444. toTrendAnalysis(name) {
  445. return
  446. let date = this.weekObj.weekDate.split('~')
  447. let [t1, t2] = [date[0], date[1]]
  448. let time1 = new Date(t1.replace(/-/g, '/'))
  449. let time2 = new Date(t2.replace(/-/g, '/'))
  450. time1.setDate(time1.getDate() - 7)
  451. time2.setDate(time2.getDate() - 7)
  452. let res1 = `${time1.getFullYear()}-${time1.getMonth() + 1}-${time1.getDate()}`
  453. let res2 = `${time2.getFullYear()}-${time2.getMonth() + 1}-${time2.getDate()}`
  454. if (this.isPassWatch(name)) {
  455. uni.navigateTo({
  456. url: `/pages/center/Piabodata/TrendAnalysis?type=1&staTime=${date[0]}&endtime=${date[1]}&staTime1=${res1}&endtime1=${res2}`
  457. })
  458. } else {
  459. uni.showToast({
  460. title: '暂无权限',
  461. icon: "none"
  462. })
  463. }
  464. },
  465. // 顾问排名
  466. toEmployeesstatistics(name) {
  467. let date = this.weekObj.weekDate.split('~')
  468. let [t1, t2] = [date[0], date[1]]
  469. if (this.isPassWatch(name)) {
  470. uni.navigateTo({
  471. url: `/pages/center/Piabodata/Employeesstatistics?type=1&staTime=${date[0]}&endtime=${date[1]}`
  472. })
  473. } else {
  474. uni.showToast({
  475. title: '暂无权限',
  476. icon: "none"
  477. })
  478. }
  479. },
  480. // 员工分析
  481. toStaffAnalysis(name, data) {
  482. let obj = this.weekObj.customerInfo1.find(item => {return item.name == data.title})
  483. console.log(obj)
  484. let time = this.weekObj.weekDate.split('~')
  485. if (this.isPassWatch(name)) {
  486. uni.navigateTo({
  487. url: `/pages/center/Piabodata/StaffAnalysis?type=1&id=${obj.id}&startDate=${time[0]}&endDate=${time[1]}`
  488. });
  489. } else {
  490. uni.showToast({
  491. title: '暂无权限',
  492. icon: "none"
  493. })
  494. }
  495. },
  496. // 跳转对应页面
  497. toAuthPage(data) {
  498. if (!uni.getStorageSync('weapp_session_login_data').token) {
  499. this.toHome()
  500. return
  501. }
  502. if (this.isPassWatch(data.auth)) {
  503. let time = this.weekObj.weekDate.split('~')
  504. data.pathParms = `${data.pathParms}&staTime=${time[0]}&endtime=${time[1]}`
  505. uni.navigateTo({
  506. url: `${data.path}${data.pathParms}`
  507. })
  508. } else {
  509. uni.showToast({
  510. title: '暂无权限',
  511. icon: "none"
  512. })
  513. }
  514. },
  515. // 是否有权限观看
  516. isPassWatch(name) {
  517. return this.menuList.findIndex(item => {
  518. return item.name == name
  519. }) == -1 ? false : true
  520. },
  521. // 跳转首页
  522. toHome() {
  523. uni.navigateTo({
  524. url: '/pages/index/guide'
  525. })
  526. },
  527. // 获取周报详情
  528. getMessage() {
  529. this.$u.get('/zkMessage/findByProjectId', {
  530. id: this.id
  531. }).then(res => {
  532. // console.log(res)
  533. let data = {}
  534. if(res.zkMessage.content){
  535. data = JSON.parse(res.zkMessage.content)
  536. }else{
  537. this.nodata = true
  538. this.weekObj = {
  539. ...res.zkMessage,
  540. }
  541. }
  542. this.bubbleSort(data.customerInfo1, 'pk')
  543. this.bubbleSort(data.customerInfo2, 'pk')
  544. data.customerInfo1.reverse()
  545. data.customerInfo2.reverse()
  546. if(res.zkMessage.content){
  547. data = JSON.parse(res.zkMessage.content)
  548. this.weekObj = {
  549. ...res.zkMessage,
  550. ...data
  551. }
  552. }
  553. this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1)
  554. console.log(this.weekObj, 'this.weekObj')
  555. this.projectName = res.projectName
  556. this.numlist.forEach(item => {
  557. if (data[item.setName]) {
  558. item.num = data[item.setName]
  559. }
  560. if (data[item.percentName]) {
  561. item.percent = data[item.percentName]
  562. }
  563. if (data[item.preNumName]) {
  564. item.preNum = data[item.preNumName]
  565. }
  566. })
  567. this.init()
  568. }).catch(e => {
  569. console.log(e)
  570. })
  571. },
  572. // 把对象转成数组并在后续的步骤方便处理
  573. init() {
  574. console.log(this.weekObj, 'this.weekObj')
  575. this.needList.forEach(item => {
  576. if (this.weekObj[item] && Object.keys(this.weekObj[item]).length > 0) {
  577. this.weekObj[item + 'List'] = [] // 销讲执行
  578. for (let i in this.weekObj[item]) {
  579. this.weekObj[item + 'List'].push({
  580. title: i,
  581. value: this.weekObj[item][i]
  582. })
  583. }
  584. }
  585. })
  586. this.sortInitArr()
  587. },
  588. // 排序对象转换后的数组
  589. sortInitArr() {
  590. this.needList.forEach(item => {
  591. if (this.weekObj[item + 'List']) {
  592. this.bubbleSort(this.weekObj[item + 'List'])
  593. this.weekObj[item + 'List'] = this.dealData(this.weekObj[item + 'List'])
  594. }
  595. })
  596. this.reverseList()
  597. },
  598. // 反转数组
  599. reverseList() {
  600. this.needList.forEach(item => {
  601. if (this.weekObj[item + 'List']) {
  602. this.weekObj[item + 'List'].reverse()
  603. }
  604. })
  605. console.log(this.weekObj, '12312312312')
  606. },
  607. // 冒泡排序
  608. bubbleSort(arr, keys = 'value') {
  609. for (let i = 0; i < arr.length - 1; i += 1) {
  610. //通过 arr.length 次把第一位放到最后,完成排序
  611. //-i是因为最后的位置是会动态改变的,当完成一次后,最后一位会变成倒数第二位
  612. for (let j = 0; j < arr.length - 1 - i; j += 1) {
  613. if (arr[j][keys] > arr[j + 1][keys]) {
  614. const temp = arr[j];
  615. arr[j] = arr[j + 1];
  616. arr[j + 1] = temp;
  617. }
  618. }
  619. }
  620. },
  621. // 定义一个公共方法对数据进行处理
  622. dealData(arr) {
  623. // 获取最大值
  624. let num = Math.max.apply(Math, arr.map((o) => {
  625. return o.value
  626. }))
  627. arr.map(item => {
  628. item.values = Math.floor(item.value / num * 100)
  629. })
  630. return arr
  631. },
  632. // 转换时间
  633. getTimeLine(date, type = 1) {
  634. let resu = '--'
  635. if (!date) return resu
  636. let time = new Date(date.replace(/-/g, '/'))
  637. time.setDate(time.getDate() - 7)
  638. let arr = date.split(' ')
  639. let str = arr[0]
  640. let result = str.split('-')
  641. let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1)
  642. let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate()
  643. if (type == 1) {
  644. resu = `${m}.${d}-${result[1]}.${result[2]}`
  645. } else {
  646. resu = `${m}月${d}日~${result[1]}月${result[2]}日`
  647. }
  648. return resu
  649. },
  650. // 转换时间
  651. getTimeLines(date) {
  652. if (!date) return ''
  653. let arr = date.split('~')
  654. let str0 = arr[0].split('-')
  655. let str1 = arr[1].split('-')
  656. return `${str0[1]}月${str0[2]}日~${str1[1]}月${str1[2]}日`
  657. },
  658. },
  659. filters: {
  660. // 时间格式转换
  661. fomatDate(date) {
  662. if (!date) return '--'
  663. let arr = date.split(' ')
  664. let str = arr[0]
  665. let result = str.split('-')
  666. return `${result[1]}-${result[2]}`
  667. },
  668. // 转换时间
  669. getTimeLine(date, type = 1) {
  670. if (!date) return '--'
  671. console.log(date.replace(/-/g, '/'))
  672. let time = new Date(date.replace(/-/g, '/'))
  673. time.setDate(time.getDate() - 7)
  674. let arr = date.split(' ')
  675. let str = arr[0]
  676. let result = str.split('-')
  677. let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1)
  678. let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate()
  679. if (type == 1) {
  680. return `${m}.${d}-${result[1]}.${result[2]}`
  681. } else {
  682. return `${m}月${d}日~${result[1]}月${result[2]}日`
  683. }
  684. },
  685. // 设置颜色
  686. setColor(index) {
  687. let color = ''
  688. switch (index) {
  689. case 0:
  690. color = '#E7483C';
  691. break;
  692. case 1:
  693. color = '#FF8C13';
  694. break;
  695. case 2:
  696. color = '#FFCC00';
  697. break;
  698. default:
  699. color = '#4FC78F';
  700. break;
  701. }
  702. return color
  703. },
  704. }
  705. }
  706. </script>
  707. <style lang="scss" scoped>
  708. @import '@/static/css/quill/quill.core.css';
  709. @import '@/static/css/quill/quill.snow.css';
  710. @import '@/static/css/quill/quill.bubble.css';
  711. .pages {
  712. width: 100vw;
  713. min-height: 100vh;
  714. display: flex;
  715. flex-direction: column;
  716. background: #F8F8F8;
  717. .nav-header {
  718. flex-shrink: 0;
  719. }
  720. .container {
  721. padding: 30rpx 30rpx 40rpx;
  722. display: flex;
  723. flex-direction: column;
  724. background: #fff;
  725. .c-head-card {
  726. padding: 30rpx;
  727. width: 100%;
  728. min-height: 252rpx;
  729. border: 2rpx solid #000000;
  730. border-radius: 12rpx;
  731. box-shadow: 10rpx 10rpx #2671E2;
  732. display: flex;
  733. flex-direction: column;
  734. .c-title-text {
  735. // position: relative;
  736. flex-grow: 1;
  737. font-size: 48rpx;
  738. font-weight: bold;
  739. color: #303030;
  740. }
  741. .date {
  742. // position: absolute;
  743. // right: 0;
  744. // bottom: 6rpx;
  745. font-size: 30rpx;
  746. color: #303030;
  747. }
  748. .creative-time {
  749. margin: 20rpx 0 0 0;
  750. flex-shrink: 0;
  751. }
  752. }
  753. }
  754. .nodata-box{
  755. width: 400rpx;
  756. height: 400rpx;
  757. font-size: 28rpx;
  758. font-family: PingFangSC-Regular, PingFang SC;
  759. font-weight: 400;
  760. color: #666666;
  761. line-height: 40rpx;
  762. padding-top: 360rpx;
  763. margin: 0 auto;
  764. text-align: center;
  765. }
  766. .briefing {
  767. background: #fff;
  768. .briefing-title {
  769. padding: 0 30rpx;
  770. height: 90rpx;
  771. display: flex;
  772. align-items: center;
  773. border: 1rpx solid #E0E0E0;
  774. font-size: 32rpx;
  775. font-weight: bold;
  776. }
  777. .briefing-box {
  778. width: 100%;
  779. display: flex;
  780. flex-wrap: wrap;
  781. .briefing-box-item {
  782. padding: 20rpx 30rpx;
  783. width: 50%;
  784. height: 186rpx;
  785. border: 1px solid #E0E0E0;
  786. border-left: none;
  787. border-top: none;
  788. &:nth-of-type(2n) {
  789. border-right: none;
  790. }
  791. .top {
  792. font-size: 28rpx;
  793. }
  794. .middle {
  795. margin: 14rpx 0 12rpx;
  796. font-size: 32rpx;
  797. font-weight: 600;
  798. color: #333333;
  799. }
  800. .bottom {
  801. font-size: 26rpx;
  802. color: #666666;
  803. .b-text {
  804. margin-left: 20rpx;
  805. &.down {
  806. color: #43CD80;
  807. font-size: 34rpx;
  808. }
  809. &.up {
  810. font-size: 34rpx;
  811. color: #E7483C;
  812. }
  813. }
  814. }
  815. }
  816. }
  817. }
  818. .execution-ranking {
  819. margin: 20rpx 0 0 0;
  820. padding: 30rpx;
  821. background: #fff;
  822. .execution-ranking-title {
  823. font-size: 32rpx;
  824. font-weight: bold;
  825. }
  826. .execution-ranking-desc {
  827. margin-top: 20rpx;
  828. font-size: 30rpx;
  829. }
  830. .ranking-box {
  831. margin: 30rpx 0 0 0;
  832. .ranking-item {
  833. margin-bottom: 18rpx;
  834. display: flex;
  835. &:nth-last-of-type(1) {
  836. margin-bottom: 0;
  837. }
  838. .left {
  839. flex-shrink: 0;
  840. width: 140rpx;
  841. font-size: 30rpx;
  842. overflow: hidden;
  843. text-overflow: ellipsis;
  844. white-space: nowrap;
  845. }
  846. .middle {
  847. flex-grow: 1;
  848. }
  849. .right {
  850. flex-shrink: 0;
  851. width: 118rpx;
  852. font-size: 30rpx;
  853. text-align: center;
  854. }
  855. }
  856. }
  857. }
  858. .statistics {
  859. margin: 20rpx 0 0 0;
  860. background: #fff;
  861. .statistics-title {
  862. padding: 30rpx 30rpx 0;
  863. width: 100%;
  864. font-size: 32rpx;
  865. font-weight: bold;
  866. }
  867. .statistics-desc {
  868. padding: 0 30rpx;
  869. margin-top: 20rpx;
  870. }
  871. .table {
  872. margin: 30rpx 0 0 0;
  873. .thead {
  874. padding: 0 30rpx;
  875. width: 100%;
  876. height: 72rpx;
  877. display: flex;
  878. align-items: center;
  879. border: 1rpx solid #E0E0E0;
  880. border-left: none;
  881. border-right: none;
  882. font-size: 26rpx;
  883. .thead-item {
  884. text-align: center;
  885. }
  886. }
  887. .tbody {
  888. .tbody-item {
  889. padding: 0 30rpx;
  890. display: flex;
  891. align-items: center;
  892. height: 72rpx;
  893. background: #FAFCFF;
  894. &:nth-of-type(2n) {
  895. background: #FFFFFF;
  896. }
  897. .tbody-items {
  898. flex: 1;
  899. display: flex;
  900. justify-content: center;
  901. }
  902. .name {
  903. justify-content: flex-start;
  904. overflow: hidden;
  905. text-overflow: ellipsis;
  906. white-space: nowrap;
  907. }
  908. .time {
  909. flex: 2;
  910. }
  911. .percent {
  912. flex: 2;
  913. }
  914. .week {
  915. flex: 1.5;
  916. }
  917. }
  918. }
  919. .tbottom {
  920. width: 100%;
  921. height: 72rpx;
  922. display: flex;
  923. justify-content: center;
  924. align-items: center;
  925. font-size: 30rpx;
  926. color: #2671E2;
  927. background: #FAFCFF;
  928. }
  929. }
  930. }
  931. .guwen-ranking {
  932. margin: 20rpx 0 0 0;
  933. width: 100%;
  934. padding: 30rpx;
  935. background: #fff;
  936. .guwen-ranking-title {
  937. font-size: 32rpx;
  938. font-weight: 500;
  939. }
  940. .guwen-ranking-desc {
  941. margin-top: 20rpx;
  942. font-size: 30rpx;
  943. }
  944. .ranking-box {
  945. margin: 30rpx 0 0 0;
  946. .ranking-item {
  947. margin-bottom: 18rpx;
  948. display: flex;
  949. &:nth-last-of-type(1) {
  950. margin-bottom: 0;
  951. }
  952. .left {
  953. flex-shrink: 0;
  954. width: 140rpx;
  955. font-size: 30rpx;
  956. overflow: hidden;
  957. text-overflow: ellipsis;
  958. white-space: nowrap;
  959. }
  960. .middle {
  961. flex-grow: 1;
  962. }
  963. .right {
  964. flex-shrink: 0;
  965. width: 118rpx;
  966. font-size: 30rpx;
  967. text-align: center;
  968. }
  969. }
  970. }
  971. }
  972. .proposal {
  973. margin: 20rpx 0 0 0;
  974. padding: 30rpx;
  975. background: #fff;
  976. .proposal-title {
  977. font-size: 32rpx;
  978. font-weight: 500;
  979. }
  980. .proposal-box {
  981. margin: 30rpx 0 0 0;
  982. .proposal-item {
  983. margin: 20rpx 0 0 0;
  984. display: flex;
  985. .lside {
  986. flex-shrink: 0;
  987. margin: 0 12rpx 0 0;
  988. width: 44rpx;
  989. height: 44rpx;
  990. border-radius: 50%;
  991. background: #2671E2;
  992. text-align: center;
  993. line-height: 44rpx;
  994. color: #fff;
  995. }
  996. .rside {
  997. .rside-title {
  998. font-size: 32rpx;
  999. }
  1000. .rside-box {
  1001. margin: 16rpx 0 0 0;
  1002. }
  1003. }
  1004. }
  1005. }
  1006. }
  1007. .nav-footer {
  1008. position: sticky;
  1009. bottom: 0;
  1010. padding: 32rpx;
  1011. width: 100%;
  1012. display: flex;
  1013. justify-content: center;
  1014. background: #fff;
  1015. .footer-item {
  1016. flex: 1;
  1017. height: 88rpx;
  1018. display: flex;
  1019. justify-content: center;
  1020. align-items: center;
  1021. color: #2671E2;
  1022. border: 2rpx solid #2671E2;
  1023. border-radius: 8rpx;
  1024. overflow: hidden;
  1025. font-size: 32rpx;
  1026. &.full {
  1027. background: #2671E2;
  1028. color: #fff;
  1029. .fulls {
  1030. box-sizing: border-box;
  1031. width: 100%;
  1032. height: 100%;
  1033. background: transparent;
  1034. color: #fff;
  1035. font-size: 32rpx;
  1036. font-weight: normal;
  1037. line-height: 88rpx;
  1038. }
  1039. }
  1040. }
  1041. }
  1042. .up {
  1043. color: #43CD80 !important;
  1044. }
  1045. .down {
  1046. color: #E6273A !important;
  1047. }
  1048. .empity {
  1049. width: 100%;
  1050. height: 300rpx;
  1051. display: flex;
  1052. justify-content: center;
  1053. align-items: center;
  1054. font-size: 28rpx;
  1055. color: #666666;
  1056. }
  1057. }
  1058. </style>