|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172 |
- <template>
- <view class="pages">
- <!-- 日报内容部分 -->
- <view class="container">
- <!-- 头部日报卡 -->
- <view class="c-head-card">
- <view class="c-title-text">
- {{ projectName || '' }}数智工牌周报
- </view>
- <text class="date">{{ weekObj.createTimeName }}</text>
- <view class="creative-time">
- 生成时间:{{ weekObj.createTime || '--' }}
- </view>
- </view>
- </view>
-
-
- <!-- 简报 -->
- <view class="briefing">
- <view class="briefing-title">
- 简报
- </view>
- <!-- 简报表格部分 -->
- <view class="briefing-box">
- <block v-for="(data, index) in numlist" :key="index">
- <view class="briefing-box-item" @click="toAuthPage(data)">
- <view class="tops" :class="[data.class || '']">
- {{ data.name }}
- </view>
- <view class="middle" :class="[data.class || '']">
- {{ data.num || 0 }}
- </view>
- <view class="bottom">
- 对比上周: {{ data.preNum || 0 }}
- <text class="b-text"
- :class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent || '0' }}</text>
- <template v-if="data.percent != 0">
- <text style="margin-left: 8rpx;font-size: 34rpx;font-weight: bold;"
- :class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent > 0 ? '↑' : '↓' }}</text>
- </template>
- </view>
- </view>
- </block>
- </view>
- </view>
-
-
- <!-- 销讲场景执行排名 -->
- <view class="execution-ranking">
- <view class="execution-ranking-title">
- 销讲场景执行排名
- </view>
- <template v-if="isShowXJTop1List">
- <view class="execution-ranking-desc" v-if="false">
- <text>销讲场景平均执行对比上周</text>
- <text>{{ rankTop('fractionPKName') }}</text>
- <text>{{ rankTop('fractionPK') }}</text>
- <text>%</text>
- <template v-if="rankTop('fractionBastValue') > 0">
- <text>,其中【{{ rankTop('fractionBastName') }}】最强为</text>
- <text class="up">{{ rankTop('fractionBastValue') }}</text>
- <text>%</text>
- </template>
- <template v-if="rankTop('fractionLastValue') < 0">
- <text>,【{{ rankTop('fractionLastName') }}】执行最弱为</text>
- <text class="down">{{ rankTop('fractionLastValue') }}</text>
- <text>%;</text>
- </template>
- </view>
-
- <!-- 排名百分比列表 -->
- <view class="ranking-box" @click="toTrendAnalysis('销讲数据')">
- <block v-for="(percent, index) in weekObj.XJTop1List" :key="index">
- <view class="ranking-item">
- <view class="left">{{ percent.title }}</view>
- <view class="middle">
- <u-line-progress :active-color="$options.filters.setColor(index)"
- inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
- </u-line-progress>
- </view>
- <view class="right"> {{ percent.value || '0' }} %</view>
- </view>
- </block>
- </view>
- </template>
- <template v-else>
- <view class="empity">
- 暂无数据
- </view>
- </template>
- </view>
-
- <!-- 接待统计 -->
- <view class="statistics">
- <view class="statistics-title">
- 接待统计
- </view>
- <template v-if="isShowStatistics">
- <view class="statistics-desc" v-if="false">
- <text>
- 顾问平均执行率对比上周
- </text>
- <text>
- {{ rankTop('ranktype') || '' }}
- </text>
- <text :class="[rankTop('class')]">{{ rankTop('people') || '' }}</text>
- <text class="">
- 人,其中{{ rankTop('topName') || '' }}上升
- </text>
- <text class="up">{{ rankTop('topPk') || '0' }}</text>
- <text class="">
- %为最高,{{ rankTop('lastName') || '' }}下降
- </text>
- <text class="down">{{ rankTop('lastPk') || '0' }}</text>
- <text class="">
- %降幅最大。
- </text>
- </view>
- <view class="table">
- <view class="thead">
- <block v-for="(head, headIndex) in tableHead" :key="headIndex">
- <view class="thead-item" :style="[head.style]">
- {{ head.title }}
- </view>
- </block>
- </view>
-
- <view class="tbody" @click="toEmployeesstatistics('顾问排名')">
- <block v-for="(data, index) in weekObj.customerInfo1" :key="index">
- <view class="tbody-item">
- <view class="tbody-items name">{{ data.name }}</view>
- <view class="tbody-items nums">{{ data.activeCustomer }}</view>
- <view class="tbody-items time">{{ data.avgDuration }}m</view>
- <view class="tbody-items percent">{{ data.fraction }}%</view>
- <view class="tbody-items week" :class="{up: data.pk > 0, down: data.pk < 0}">
- {{ data.pk > 0 ? `+${data.pk}` : data.pk }}%
- </view>
- </view>
- </block>
- </view>
- </view>
- </template>
-
- <template v-else>
- <view class="empity">
- 暂无数据
- </view>
- </template>
- </view>
-
- <!-- 顾问销讲执行率排名 -->
- <view class="guwen-ranking">
- <view class="guwen-ranking-title">
- 顾问销讲执行率排名(TOP10)
- </view>
- <template v-if="isShowZXLTopList">
- <!-- 排名百分比列表 -->
- <view class="ranking-box">
- <block v-for="(percent, index) in weekObj.ZXLTopList" :key="index">
- <view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
- <view class="left">{{ percent.title }}</view>
- <view class="middle">
- <u-line-progress :active-color="$options.filters.setColor(index)"
- inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
- </u-line-progress>
- </view>
- <view class="right"> {{ percent.value || '0' }} %</view>
- </view>
- </block>
- </view>
- </template>
-
- <template v-else>
- <view class="empity">
- 暂无数据
- </view>
- </template>
- </view>
-
- <!-- 顾问接待量排名 -->
- <view class="guwen-ranking">
- <view class="guwen-ranking-title">
- 顾问接待量排名(TOP10)
- </view>
-
- <template v-if="isShowJDLTopList">
- <!-- 排名百分比列表 -->
- <view class="ranking-box">
- <block v-for="(percent, index) in weekObj.JDLTopList" :key="index">
- <view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
- <view class="left">{{ percent.title }}</view>
- <view class="middle">
- <u-line-progress :active-color="$options.filters.setColor(index)"
- inactive-color="#F2F2F2" :show-percent="false" :percent="percent.values">
- </u-line-progress>
- </view>
- <view class="right"> {{ percent.value || '0' }} </view>
- </view>
- </block>
- </view>
- </template>
-
- <template v-else>
- <view class="empity">
- 暂无数据
- </view>
- </template>
- </view>
-
- <!-- 使用建议 -->
- <view class="proposal" v-if="weekObj.suggest">
- <view class="proposal-title">
- 使用建议
- </view>
- <!-- 建议的文字 -->
- <view class="proposal-box">
- <u-parse class="ql-editor" :content="weekObj.suggest" />
- </view>
- </view>
-
- <!-- 底部按钮 -->
- <view class="nav-footer">
-
- <view class="footer-item" @click="toHome">
- 回到管理端
- </view>
-
- <view class="footer-item full" style="margin-left: 24rpx;">
- <button open-type="share" class="fulls">
- 一键转发
- </button>
- </view>
- </view>
- </view>
- </template>
-
- <script>
- import uParse from '@/components/gaoyia-parse/parse.vue'
- export default {
-
- components: {
- uParse
- },
- data() {
- return {
- tableHead: [{
- title: '顾问',
- style: {
- flex: 1
- }
- },
- {
- title: '接待量',
- style: {
- flex: 1
- }
- },
- {
- title: '平均接待时长',
- style: {
- flex: 2
- }
- },
- {
- title: '平均执行率',
- style: {
- flex: 2
- }
- },
- {
- title: '对比上周',
- style: {
- flex: 1.5
- }
- },
- ],
- id: '', // id
-
- needList: ['JDLTop', 'ZXLTop', 'XJTop1'], // 需要转换数组的内容
-
- // 简报
- numlist: [{
- name: '接待量 (次)',
- num: '',
- setName: 'receptionCount1',
- percent: '',
- percentName: 'receptionCountPK',
- preNum: '', // 上周数量
- preNumName: 'receptionCount2', //
- path: '/pages/center/records/index',
- pathParms: '?activeTotal=4&refresh=refresh', // 参数
- auth: '接待记录', //
-
- }, {
- name: '有效接待 (次)',
- num: '',
- setName: 'activeCustomer1',
- percent: '',
- percentName: 'activeCustomerPK',
- preNum: '', // 上周数量
- preNumName: 'activeCustomer2', //
- path: '/pages/center/records/index',
- pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
- auth: '接待记录', //
- },
- {
- name: '平均执行率(%)',
- num: '',
- setName: 'fraction1',
- percent: '',
- percentName: 'fractionPK',
- preNum: '', // 上周数量
- preNumName: 'fraction2', //
- path: '/pages/center/records/index',
- pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
- auth: '接待记录', //
- },
- {
- name: '平均接待时长(分)',
- num: '',
- setName: 'avgDuration1',
- percent: '',
- percentName: 'avgDurationPK',
- preNum: '', // 上周数量
- preNumName: 'avgDuration2', //
- path: '/pages/center/records/index',
- pathParms: '?activeTotal=4&refresh=refresh&validInvalid=0', // 参数
- auth: '接待记录', //
- },
- {
- name: '违禁接待 (次)',
- num: '',
- setName: 'prohibitedNum1',
- percent: '',
- percentName: 'prohibitedNumPK',
- preNum: '', // 上周数量
- preNumName: 'prohibitedNum2', //
- class: 'down',
- path: '/pages/center/prohibited/index',
- pathParms: '?activeTotal=4&violatedStatus=1&refresh=refresh', // 参数
- auth: '违禁记录',
- },
- {
- name: '客户画像触达 (次)',
- num: '',
- setName: 'reachSum1',
- percent: '',
- percentName: 'reachSumPK',
- preNum: '', // 上周数量
- preNumName: 'reachSum2', //
- path: '/pages/center/Piabodata/Userinsightinto',
- pathParms: '?activeTotal=3', // 参数
- auth: '销讲数据',
- },
- {
- name: '已标记',
- num: '',
- setName: 'labelledReceptionNum1',
- percent: '',
- percentName: 'labelledReceptionNumPK',
- preNum: '', // 上周数量
- preNumName: 'labelledReceptionNum2', //
- path: '/pages/center/records/index',
- pathParms: '?activeTotal=4&refresh=refresh&markAdvisor=1', // 参数
- auth: '接待记录', //
- },
- {
- name: '未标记',
- num: '',
- setName: 'unlabelledReceptionNum1',
- percent: '',
- percentName: 'unlabelledReceptionNumPK',
- preNum: '', // 上周数量
- preNumName: 'unlabelledReceptionNum2', //
- class: 'down',
- path: '/pages/center/records/index',
- pathParms: '?activeTotal=4&refresh=refresh&markAdvisor=0', // 参数
- auth: '接待记录', //
- },
- ],
-
- // 周报详情
- weekObj: {},
- projectName: '', // 项目名称
- }
- },
-
-
- computed: {
- // 获取本地存储的权限列表
- menuList() {
- return uni.getStorageSync('weapp_session_Menu_data')
- },
-
- // 排名最高与最低
- rankTop() {
- return name => {
- let obj = {}
- try {
-
- if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) {
- obj.ranktype = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) >
- 0 ? '上升' : '下降'
- obj.people = Math.abs(this.weekObj.customerInfo1.length - this.weekObj.customerInfo2
- .length)
- }
-
- if (this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0) {
- obj.topName = this.weekObj.customerInfo1[0].name
- obj.topPk = Math.abs(this.weekObj.customerInfo1[0].pk)
- obj.lastName = this.weekObj.customerInfo1[this.weekObj.customerInfo1.length - 1].name,
- obj.lastPk = Math.abs(this.weekObj.customerInfo1[this.weekObj.customerInfo1.length - 1]
- .pk)
- }
-
- if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) {
- obj.class = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ?
- 'up' : 'down'
- }
-
- if (this.weekObj.fractionPK) {
- obj.fractionPKName = this.weekObj.fractionPK > 0 ? '上涨' : '下跌'
- obj.fractionPK = Math.abs(this.weekObj.fractionPK)
- }
-
- if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) {
- obj.fractionBastName = this.weekObj.XJTop1List[0].title
- obj.fractionBastValue = this.weekObj.XJTop1List[0].value
- }
-
- if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) {
- obj.fractionLastName = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length - 1].title
- obj.fractionLastValue = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length - 1].value
- }
-
- return obj[name] || ''
- } catch (e) {
- console.log(e)
- return ''
- }
- }
- },
-
- // 接待统计
- isShowStatistics() {
- // 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
- return this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0
- },
-
- isShowXJTop1List() {
- // 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')
- return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0
- },
-
- isShowZXLTopList() {
- return this.weekObj.ZXLTopList && this.weekObj.ZXLTopList.length > 0
- },
-
- isShowJDLTopList() {
- return this.weekObj.JDLTopList && this.weekObj.JDLTopList.length > 0
- },
- },
-
- onLoad(option) {
- if (option.id) this.id = option.id
- this.getMessage()
- },
-
-
- onShareAppMessage() {
- return {
- title: `${this.projectName}数智工牌周报`,
- path: `/pages/reportExcel/weekReport?id=${this.id}`
- }
- },
-
- methods: {
- // 趋势分析
- toTrendAnalysis(name) {
- return
- let date = this.weekObj.weekDate.split('~')
- let [t1, t2] = [date[0], date[1]]
- let time1 = new Date(t1.replace(/-/g, '/'))
- let time2 = new Date(t2.replace(/-/g, '/'))
- time1.setDate(time1.getDate() - 7)
- time2.setDate(time2.getDate() - 7)
- let res1 = `${time1.getFullYear()}-${time1.getMonth() + 1}-${time1.getDate()}`
- let res2 = `${time2.getFullYear()}-${time2.getMonth() + 1}-${time2.getDate()}`
- if (this.isPassWatch(name)) {
- uni.navigateTo({
- url: `/pages/center/Piabodata/TrendAnalysis?type=1&staTime=${date[0]}&endtime=${date[1]}&staTime1=${res1}&endtime1=${res2}`
- })
- } else {
- uni.showToast({
- title: '暂无权限',
- icon: "none"
- })
- }
- },
-
- // 顾问排名
- toEmployeesstatistics(name) {
- let date = this.weekObj.weekDate.split('~')
- let [t1, t2] = [date[0], date[1]]
- if (this.isPassWatch(name)) {
- uni.navigateTo({
- url: `/pages/center/Piabodata/Employeesstatistics?type=1&staTime=${date[0]}&endtime=${date[1]}`
- })
- } else {
- uni.showToast({
- title: '暂无权限',
- icon: "none"
- })
- }
- },
-
- // 员工分析
- toStaffAnalysis(name, data) {
- let obj = this.weekObj.customerInfo1.find(item => {return item.name == data.title})
- console.log(obj)
- let time = this.weekObj.weekDate.split('~')
- if (this.isPassWatch(name)) {
- uni.navigateTo({
- url: `/pages/center/Piabodata/StaffAnalysis?type=1&id=${obj.id}&startDate=${time[0]}&endDate=${time[1]}`
- });
- } else {
- uni.showToast({
- title: '暂无权限',
- icon: "none"
- })
- }
- },
-
- // 跳转对应页面
- toAuthPage(data) {
- if (!uni.getStorageSync('weapp_session_login_data').token) {
- this.toHome()
- return
- }
- if (this.isPassWatch(data.auth)) {
- let time = this.weekObj.weekDate.split('~')
- data.pathParms = `${data.pathParms}&staTime=${time[0]}&endtime=${time[1]}`
- uni.navigateTo({
- url: `${data.path}${data.pathParms}`
- })
- } else {
- uni.showToast({
- title: '暂无权限',
- icon: "none"
- })
- }
- },
-
-
- // 是否有权限观看
- isPassWatch(name) {
- return this.menuList.findIndex(item => {
- return item.name == name
- }) == -1 ? false : true
- },
-
- // 跳转首页
- toHome() {
- uni.navigateTo({
- url: '/pages/index/guide'
- })
- },
- // 获取周报详情
- getMessage() {
- this.$u.get('/zkMessage/findByProjectId', {
- id: this.id
- }).then(res => {
- console.log(res)
- let data = JSON.parse(res.zkMessage.content)
- console.log(data)
- this.bubbleSort(data.customerInfo1, 'pk')
- this.bubbleSort(data.customerInfo2, 'pk')
- data.customerInfo1.reverse()
- data.customerInfo2.reverse()
-
- this.weekObj = {
- ...res.zkMessage,
- ...data
- }
- this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1)
- console.log(this.weekObj, 'this.weekObj')
- this.projectName = res.projectName
- this.numlist.forEach(item => {
- if (data[item.setName]) {
- item.num = data[item.setName]
- }
- if (data[item.percentName]) {
- item.percent = data[item.percentName]
- }
- if (data[item.preNumName]) {
- item.preNum = data[item.preNumName]
- }
- })
- this.init()
- }).catch(e => {
- console.log(e)
- })
- },
-
-
- // 把对象转成数组并在后续的步骤方便处理
- init() {
- console.log(this.weekObj, 'this.weekObj')
- this.needList.forEach(item => {
- if (this.weekObj[item] && Object.keys(this.weekObj[item]).length > 0) {
- this.weekObj[item + 'List'] = [] // 销讲执行
- for (let i in this.weekObj[item]) {
- this.weekObj[item + 'List'].push({
- title: i,
- value: this.weekObj[item][i]
- })
- }
- }
- })
- this.sortInitArr()
- },
-
- // 排序对象转换后的数组
- sortInitArr() {
- this.needList.forEach(item => {
- if (this.weekObj[item + 'List']) {
- this.bubbleSort(this.weekObj[item + 'List'])
- this.weekObj[item + 'List'] = this.dealData(this.weekObj[item + 'List'])
- }
- })
-
- this.reverseList()
- },
-
- // 反转数组
- reverseList() {
- this.needList.forEach(item => {
- if (this.weekObj[item + 'List']) {
- this.weekObj[item + 'List'].reverse()
- }
- })
- console.log(this.weekObj, '12312312312')
- },
-
- // 冒泡排序
- bubbleSort(arr, keys = 'value') {
- for (let i = 0; i < arr.length - 1; i += 1) {
- //通过 arr.length 次把第一位放到最后,完成排序
- //-i是因为最后的位置是会动态改变的,当完成一次后,最后一位会变成倒数第二位
- for (let j = 0; j < arr.length - 1 - i; j += 1) {
- if (arr[j][keys] > arr[j + 1][keys]) {
- const temp = arr[j];
- arr[j] = arr[j + 1];
- arr[j + 1] = temp;
- }
- }
- }
- },
- // 定义一个公共方法对数据进行处理
- dealData(arr) {
- // 获取最大值
- let num = Math.max.apply(Math, arr.map((o) => {
- return o.value
- }))
- arr.map(item => {
- item.values = Math.floor(item.value / num * 100)
- })
- return arr
-
- },
-
- // 转换时间
- getTimeLine(date, type = 1) {
- let resu = '--'
- if (!date) return resu
- let time = new Date(date.replace(/-/g, '/'))
- time.setDate(time.getDate() - 7)
- let arr = date.split(' ')
- let str = arr[0]
- let result = str.split('-')
-
- let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1)
- let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate()
-
- if (type == 1) {
- resu = `${m}.${d}-${result[1]}.${result[2]}`
- } else {
- resu = `${m}月${d}日~${result[1]}月${result[2]}日`
- }
- return resu
- },
-
- // 转换时间
- getTimeLines(date) {
- if (!date) return ''
- let arr = date.split('~')
- let str0 = arr[0].split('-')
- let str1 = arr[1].split('-')
-
- return `${str0[1]}月${str0[2]}日~${str1[1]}月${str1[2]}日`
- },
-
-
- },
-
- filters: {
- // 时间格式转换
- fomatDate(date) {
- if (!date) return '--'
- let arr = date.split(' ')
- let str = arr[0]
- let result = str.split('-')
- return `${result[1]}-${result[2]}`
- },
-
- // 转换时间
- getTimeLine(date, type = 1) {
- if (!date) return '--'
- console.log(date.replace(/-/g, '/'))
- let time = new Date(date.replace(/-/g, '/'))
- time.setDate(time.getDate() - 7)
- let arr = date.split(' ')
- let str = arr[0]
- let result = str.split('-')
-
- let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1)
- let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate()
-
- if (type == 1) {
- return `${m}.${d}-${result[1]}.${result[2]}`
- } else {
- return `${m}月${d}日~${result[1]}月${result[2]}日`
- }
- },
-
- // 设置颜色
- setColor(index) {
- let color = ''
- switch (index) {
- case 0:
- color = '#E7483C';
- break;
- case 1:
- color = '#FF8C13';
- break;
- case 2:
- color = '#FFCC00';
- break;
- default:
- color = '#4FC78F';
- break;
- }
- return color
- },
- }
- }
- </script>
-
- <style lang="scss" scoped>
- @import '@/static/css/quill/quill.core.css';
- @import '@/static/css/quill/quill.snow.css';
- @import '@/static/css/quill/quill.bubble.css';
-
- .pages {
- width: 100vw;
- min-height: 100vh;
- display: flex;
- flex-direction: column;
- background: #F8F8F8;
-
- .nav-header {
- flex-shrink: 0;
- }
-
- .container {
- padding: 30rpx 30rpx 40rpx;
- display: flex;
- flex-direction: column;
- background: #fff;
-
- .c-head-card {
- padding: 30rpx;
- width: 100%;
- min-height: 252rpx;
- border: 2rpx solid #000000;
- border-radius: 12rpx;
- box-shadow: 10rpx 10rpx #2671E2;
- display: flex;
- flex-direction: column;
-
- .c-title-text {
- // position: relative;
- flex-grow: 1;
- font-size: 48rpx;
- font-weight: bold;
- color: #303030;
- }
-
- .date {
- // position: absolute;
- // right: 0;
- // bottom: 6rpx;
- font-size: 30rpx;
- color: #303030;
- }
-
- .creative-time {
- margin: 20rpx 0 0 0;
- flex-shrink: 0;
- }
- }
- }
-
-
-
- .briefing {
- background: #fff;
-
- .briefing-title {
- padding: 0 30rpx;
- height: 90rpx;
- display: flex;
- align-items: center;
- border: 1rpx solid #E0E0E0;
- font-size: 32rpx;
- font-weight: bold;
- }
-
- .briefing-box {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
-
- .briefing-box-item {
- padding: 20rpx 30rpx;
- width: 50%;
- height: 186rpx;
- border: 1px solid #E0E0E0;
- border-left: none;
- border-top: none;
-
- &:nth-of-type(2n) {
- border-right: none;
- }
-
- .top {
- font-size: 28rpx;
- }
-
- .middle {
- margin: 14rpx 0 12rpx;
- font-size: 32rpx;
- font-weight: 600;
- color: #333333;
- }
-
- .bottom {
- font-size: 26rpx;
- color: #666666;
-
- .b-text {
- margin-left: 20rpx;
-
-
- &.down {
- color: #43CD80;
- font-size: 34rpx;
- }
-
- &.up {
- font-size: 34rpx;
- color: #E7483C;
- }
- }
- }
- }
- }
- }
-
-
- .execution-ranking {
- margin: 20rpx 0 0 0;
- padding: 30rpx;
- background: #fff;
-
- .execution-ranking-title {
- font-size: 32rpx;
- font-weight: bold;
- }
-
- .execution-ranking-desc {
- margin-top: 20rpx;
- font-size: 30rpx;
- }
-
- .ranking-box {
- margin: 30rpx 0 0 0;
-
- .ranking-item {
- margin-bottom: 18rpx;
- display: flex;
-
- &:nth-last-of-type(1) {
- margin-bottom: 0;
- }
-
- .left {
- flex-shrink: 0;
- width: 140rpx;
- font-size: 30rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .middle {
- flex-grow: 1;
- }
-
- .right {
- flex-shrink: 0;
- width: 118rpx;
- font-size: 30rpx;
- text-align: center;
- }
- }
- }
- }
-
- .statistics {
- margin: 20rpx 0 0 0;
- background: #fff;
-
- .statistics-title {
- padding: 30rpx 30rpx 0;
- width: 100%;
- font-size: 32rpx;
- font-weight: bold;
- }
-
- .statistics-desc {
- padding: 0 30rpx;
- margin-top: 20rpx;
- }
-
- .table {
- margin: 30rpx 0 0 0;
-
- .thead {
- padding: 0 30rpx;
- width: 100%;
- height: 72rpx;
- display: flex;
- align-items: center;
- border: 1rpx solid #E0E0E0;
- border-left: none;
- border-right: none;
- font-size: 26rpx;
-
- .thead-item {
- text-align: center;
- }
- }
-
- .tbody {
-
- .tbody-item {
- padding: 0 30rpx;
- display: flex;
- align-items: center;
- height: 72rpx;
- background: #FAFCFF;
-
- &:nth-of-type(2n) {
- background: #FFFFFF;
- }
-
- .tbody-items {
- flex: 1;
- display: flex;
- justify-content: center;
- }
-
- .name {
- justify-content: flex-start;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .time {
- flex: 2;
- }
-
- .percent {
- flex: 2;
- }
-
- .week {
- flex: 1.5;
- }
- }
- }
-
- .tbottom {
- width: 100%;
- height: 72rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 30rpx;
- color: #2671E2;
- background: #FAFCFF;
- }
- }
- }
-
- .guwen-ranking {
- margin: 20rpx 0 0 0;
- width: 100%;
- padding: 30rpx;
- background: #fff;
-
- .guwen-ranking-title {
- font-size: 32rpx;
- font-weight: 500;
- }
-
- .guwen-ranking-desc {
- margin-top: 20rpx;
- font-size: 30rpx;
- }
-
- .ranking-box {
- margin: 30rpx 0 0 0;
-
- .ranking-item {
- margin-bottom: 18rpx;
- display: flex;
-
- &:nth-last-of-type(1) {
- margin-bottom: 0;
- }
-
- .left {
- flex-shrink: 0;
- width: 140rpx;
- font-size: 30rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .middle {
- flex-grow: 1;
- }
-
- .right {
- flex-shrink: 0;
- width: 118rpx;
- font-size: 30rpx;
- text-align: center;
- }
- }
- }
- }
-
- .proposal {
- margin: 20rpx 0 0 0;
- padding: 30rpx;
- background: #fff;
-
- .proposal-title {
- font-size: 32rpx;
- font-weight: 500;
- }
-
- .proposal-box {
- margin: 30rpx 0 0 0;
-
- .proposal-item {
- margin: 20rpx 0 0 0;
- display: flex;
-
- .lside {
- flex-shrink: 0;
- margin: 0 12rpx 0 0;
- width: 44rpx;
- height: 44rpx;
- border-radius: 50%;
- background: #2671E2;
- text-align: center;
- line-height: 44rpx;
- color: #fff;
- }
-
- .rside {
-
- .rside-title {
- font-size: 32rpx;
- }
-
- .rside-box {
- margin: 16rpx 0 0 0;
- }
- }
- }
- }
-
- }
-
-
-
- .nav-footer {
- position: sticky;
- bottom: 0;
- padding: 32rpx;
- width: 100%;
- display: flex;
- justify-content: center;
- background: #fff;
-
- .footer-item {
- flex: 1;
- height: 88rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #2671E2;
- border: 2rpx solid #2671E2;
- border-radius: 8rpx;
- overflow: hidden;
- font-size: 32rpx;
-
- &.full {
- background: #2671E2;
- color: #fff;
-
- .fulls {
- box-sizing: border-box;
- width: 100%;
- height: 100%;
- background: transparent;
- color: #fff;
- font-size: 32rpx;
- font-weight: normal;
- line-height: 88rpx;
- }
- }
- }
-
- }
-
- .up {
- color: #43CD80 !important;
- }
-
- .down {
- color: #E6273A !important;
- }
-
- .empity {
- width: 100%;
- height: 300rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 28rpx;
- color: #666666;
- }
- }
- </style>
|