Browse Source

Merge branch 'master' of gitea.intra.yunpaper.com:zhangqi/kuailelunwen_new_houtai into clientSet-zq-1128

clientSet-zq-1128
zq 1 month ago
parent
commit
48f5dfecd6
  1. 3
      src/App.vue
  2. 1
      src/components/CustomDropdown.vue
  3. 1
      src/components/HoverButton.vue
  4. 2
      src/components/PageTitle.vue
  5. 266
      src/components/SetLeftMenu.vue
  6. 2
      src/components/SliderScondThree.vue
  7. 1
      src/components/preview/logoBack_color.vue
  8. 1
      src/components/site/addSiteStep/step2.vue
  9. 4
      src/components/super/DateSelect.vue
  10. 85
      src/store/index.js
  11. 25
      src/style/theme/common.scss
  12. 3
      src/views/ConfigureServicePrices.vue
  13. 6
      src/views/agent/checkOrderList.vue
  14. 7
      src/views/agent/domainList.vue
  15. 1
      src/views/agent/home.vue
  16. 18
      src/views/agent/supplyList.vue
  17. 1
      src/views/super/Ranking/Purchase.vue
  18. 42
      src/views/super/Ranking/RankBatchList.vue
  19. 1
      src/views/super/Ranking/RankDetail.vue
  20. 2
      src/views/super/Ranking/RankList.vue
  21. 1
      src/views/super/Ranking/Ranking.vue

3
src/App.vue

@ -85,8 +85,7 @@ export default {
flex-direction: column;
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
font-family: Microsoft YaHei UI;
font-family: var(--font-chinese);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;

1
src/components/CustomDropdown.vue

@ -156,7 +156,6 @@ export default {
.custom-select {
height: 38px;
position: relative;
font-family: Arial, sans-serif;
}
.select-trigger {

1
src/components/HoverButton.vue

@ -132,7 +132,6 @@ export default {
<style scoped>
.hover-button {
font-family: Microsoft YaHei UI;
display: inline-flex;
align-items: center;
justify-content: center;

2
src/components/PageTitle.vue

@ -37,8 +37,6 @@ export default {
box-sizing: border-box;
b {
/* headline/haeadline_3_bold */
font-family: Microsoft YaHei UI;
font-size: 18px;
font-weight: bold;
line-height: 24px;

266
src/components/SetLeftMenu.vue

@ -3,15 +3,17 @@
<ul style="margin: 0;">
<li v-for="(item, index) in menuList" :key="item.path + random()">
<div
style="gap: 6px;"
:class="[($route.path == item.path) || (!item.path && curIndex == index) ? 'active' : '', 'flex', ($route.path == item.path) ? curIndex = index : '']" @click="gotoPath(item, index)">
:class="[curIndex === index ? 'active' : '','flex']" @click="gotoPath(item, index)">
<SvgIcon1 :iconPath="require(`@/assets/${item.img}`)" defaultColor="#8A9099" :size="16" activeColor="#006AFF"
:isActive="($route.path == item.path || (!item.path && curIndex == index))" v-if="item.img"/>
:isActive="curIndex === index" />
<span class="title_text">{{ item.name }}</span>
</div>
<p :class="['flex', (activeFloor && (activeFloor == item1.desc || activeFloor == item1.path)) ? 'curActive' : '']" v-for="(item1) in item.list"
@click="setActiveCur(item1, item,index)" :key="item1.name">{{ item1.name }}</p>
<p v-for="(item1) in item.list" :key="item1.name" :class="[
'flex',
activeFloor === (item1.desc || item1.path || item1.componentsName) ? 'curActive' : ''
]" @click="setActiveCur(item1, item, index)">
{{ item1.name }}
</p>
</li>
</ul>
</aside>
@ -19,22 +21,16 @@
<script>
import SvgIcon1 from '@/components/SvgIcon1.vue';
// :class="[$route.path != item.path ? 'not-point' : '', 'flex', activeFloor == item1.desc ? 'curActive' : '']"
import { mapState } from 'vuex';
import store from '../store';
export default {
name: 'Sidebar',
props: {
menuList: {
type: Array,
required: true
},
// activeFloor:{
// type:String
// },
// curIndex:{
// type:Number
// }
}
},
components: {
SvgIcon1,
@ -42,33 +38,31 @@ export default {
data() {
return {
activeFloor: null,
curIndex: 0,
curIndex: -1, // -1
scrollLock: false,
componentsName:''
componentsName: '',
//
pathToIndexMap: {}
}
},
watch: {
'$route'() {
// console.log(to, from);
//
this.$nextTick(() => {
this.calculateFloorOffsets();
this.handleScroll(); //
});
'$route.path': {
immediate: true, //
handler(newPath) {
this.updateActiveMenu(newPath);
}
}
},
mounted() {
let curItem = this.menuList[this.curIndex];
//
if(!curItem.list || !curItem.list.length){
this.activeFloor = curItem.path
}else{
this.activeFloor = curItem?.list?.[0]?.desc || curItem?.list?.[0]?.path;
}
this.componentsName = curItem?.list?.[0]?.componentsName;
//
this.buildPathMap();
//
this.updateActiveMenu(this.$route.path);
this.$nextTick(() => {
//
this.scrollContainer = document.querySelector('.main-content') ||
document.getElementById('main-content') ||
window;
@ -81,55 +75,117 @@ export default {
}
});
},
beforeDestroy() {
if (this.scrollContainer) {
this.scrollContainer.removeEventListener('scroll', this.handleScroll);
}
},
created() {
// console.log(this.$parent.$refs.scrollContainer,'this.$refs.sc--rollContainer--');
},
computed: {
...mapState(['pageTitle', 'carryParam']) // VuexshowSidebar
...mapState(['pageTitle', 'carryParam'])
},
methods: {
//
buildPathMap() {
const map = {};
this.menuList.forEach((item, parentIndex) => {
if (item.list && item.list.length) {
item.list.forEach(subItem => {
if (subItem.path) {
map[subItem.path] = parentIndex;
}
});
}
});
this.pathToIndexMap = map;
},
//
updateActiveMenu(currentPath) {
// 1.
const parentIndex = this.pathToIndexMap[currentPath];
if (parentIndex !== undefined) {
this.curIndex = parentIndex;
//
const parentItem = this.menuList[parentIndex];
const subItem = parentItem.list.find(item => item.path === currentPath);
if (subItem) {
//
if (subItem.componentsName) {
this.activeFloor = subItem.componentsName;
store.commit('SET_COMPONENTS_NAME', subItem.componentsName);
} else {
//
this.activeFloor = subItem.desc || subItem.path;
}
return;
}
}
// 2.
for (let i = 0; i < this.menuList.length; i++) {
const item = this.menuList[i];
if (item.path && item.path === currentPath) {
this.curIndex = i;
this.activeFloor = item.path;
//
if (item.list && item.list.length) {
const firstSubItem = item.list[0];
if (firstSubItem.componentsName) {
store.commit('SET_COMPONENTS_NAME', firstSubItem.componentsName);
}
}
return;
}
}
// 3.
if (this.curIndex === -1 && this.menuList.length > 0) {
this.curIndex = 0;
const firstItem = this.menuList[0];
if (firstItem.list && firstItem.list.length) {
const firstSubItem = firstItem.list[0];
this.activeFloor = firstSubItem.desc || firstSubItem.path || firstSubItem.componentsName;
if (firstSubItem.componentsName) {
store.commit('SET_COMPONENTS_NAME', firstSubItem.componentsName);
}
} else {
this.activeFloor = firstItem.path;
}
}
},
random() {
var randomNumber = Math.random();
return randomNumber
return Math.random();
},
calculateFloorOffsets() {
this.menuList.forEach(item => {
item.list?.forEach(every => {
if (this.curIndex === -1 || !this.menuList[this.curIndex]?.list) return;
this.menuList[this.curIndex].list?.forEach(every => {
const el = document.getElementById(every.desc);
if (el) {
//
every.offsetTop = el.getBoundingClientRect().top + window.pageYOffset;
}
});
});
},
handleScroll() {
if (this.scrollLock || !this.menuList[this.curIndex]?.list) return;
if (this.scrollLock || this.curIndex === -1 || !this.menuList[this.curIndex]?.list) return;
const scrollPosition = this.getScrollPosition();
let activeFloor = null;
console.log(this.curIndex,scrollPosition,'this.curIndex===');
//
// for (let i = this.menuList[this.curIndex].list.length - 1; i >= 0; i--) {
// const item = this.menuList[this.curIndex].list[i];
// if (scrollPosition + 100 >= (item.offsetTop || 0)) { // 100
// activeFloor = item.desc;
// break;
// }
// }
//
//
for (let i = 0; i < this.menuList[this.curIndex].list.length; i++) {
const item = this.menuList[this.curIndex].list[i];
if (scrollPosition + 100 >= (item.offsetTop || 0)) { // 100
activeFloor = item.desc;
break;
if (item.offsetTop && scrollPosition + 100 >= item.offsetTop) {
activeFloor = item.desc || item.componentsName;
}
}
@ -144,93 +200,89 @@ export default {
}
return this.scrollContainer.scrollTop;
},
// setActiveCur(dom, item) {
// if (this.$route.path != item.path) {
// this.$router.push(item.path)
// store.commit('SET_PAGETITLE', item.name);
// }
// setTimeout(() => {
// this.activeFloor = dom;
// this.setHighActive(dom)
// }, 500)
// },
// setHighActive(dom) {
// this.scrollLock = true;
// const ele = document.getElementById(dom)
// if (!ele) return
// ele.classList.add('ceshi')
// ele.scrollIntoView({ behavior: 'smooth', block: 'start' })
// setTimeout(() => {
// ele.classList.remove('ceshi')
// }, 1000)
// }
gotoPath(item) {
gotoPath(item, index) {
this.curIndex = index;
let path = item.path;
this.activeFloor = path
if (!path) {
this.curIndex = 0;
// path
if (!path && item.list && item.list.length) {
const firstSubItem = item.list[0];
if (firstSubItem.componentsName) {
this.activeFloor = firstSubItem.componentsName;
store.commit('SET_COMPONENTS_NAME', firstSubItem.componentsName);
} else if (firstSubItem.path) {
//
this.setActiveCur(firstSubItem, item, index);
return;
}
if (this.$route.path != path) {
this.curIndex = 0;
}
this.activeFloor = path;
if (!path) {
this.scrollLock = false;
this.handleScroll();
return;
}
//
if (this.$route.path !== path) {
this.$router.push({
path: path,
query: { ...this.$route.query }, //
params: { ...this.$route.params } //
query: { ...this.$route.query },
params: { ...this.$route.params }
});
//
const dom = document.getElementById('main-content');
if (dom) dom.scrollTop = 0;
}
},
setActiveCur(item1, item,index) {
setActiveCur(item1, item, index) {
this.curIndex = index;
let componentsName = item1?.componentsName;
//
if(componentsName){
//
if (componentsName) {
this.activeFloor = componentsName;
//
store.commit('SET_COMPONENTS_NAME', componentsName);
return
return;
}
//
//
//
let path = item1.path || item.path;
if ( this.$route.path !== path) {
if(this.carryParam){
//
if (path && this.$route.path !== path) {
if (this.carryParam) {
this.$router.push({
path: path,
query: { ...this.$route.query }, //
params: { ...this.$route.params } //
query: { ...this.$route.query },
params: { ...this.$route.params }
});
}else{
} else {
this.$router.push(path);
}
store.commit('SET_PAGETITLE', item.name);
//
const dom = document.getElementById('main-content');
if (dom) dom.scrollTop = 0;
}
this.scrollLock = true;
if(item1.desc){
if (item1.desc) {
this.activeFloor = item1.desc;
}
//
if(item1.path){
if (item1.path) {
this.activeFloor = item1.path;
return
return;
}
this.$nextTick(() => {
if (item1.desc) {
this.setHighActive(item1.desc);
}
setTimeout(() => {
this.scrollLock = false;
}, 1000);
@ -245,9 +297,9 @@ export default {
eles[i].classList.remove('siteMessage-active');
}
ele.classList.add('siteMessage-active');
setTimeout(function (){
setTimeout(() => {
ele.classList.remove('siteMessage-active');
},1000)
}, 1000);
ele.scrollIntoView({
behavior: 'smooth',
block: 'start'
@ -266,10 +318,12 @@ export default {
background: #FFFFFF;
box-shadow: 0px 0px 11px 2px rgba(147, 147, 147, 0.11);
}
ul{
ul {
height: 100%;
overflow-y: auto;
}
.ceshi {
// animation: fadeInOut 2s infinite;
}

2
src/components/SliderScondThree.vue

@ -345,7 +345,6 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
font-family: Microsoft YaHei UI;
gap: 8px;
min-width: 0; /* 重要:防止flex容器溢出 */
}
@ -378,7 +377,6 @@ export default {
background: #BFDAFF;
opacity: 1;
white-space: nowrap;
font-family: Microsoft YaHei;
font-size: 12px;
font-weight: normal;
line-height: 13px;

1
src/components/preview/logoBack_color.vue

@ -129,7 +129,6 @@ export default {
margin-bottom: 20px;
}
button{
font-family: Microsoft YaHei UI;
border-radius: 4px;
border: none;
padding: 7px 10px;

1
src/components/site/addSiteStep/step2.vue

@ -656,7 +656,6 @@ export default {
}
}
.trigger_placeholder{
font-family: Microsoft YaHei UI;
color: #8A9099;
font-size: 14px;
font-weight: normal;

4
src/components/super/DateSelect.vue

@ -182,7 +182,7 @@
<style scoped>
.date-picker {
font-family: Microsoft YaHei UI;
/* width: 300px; */
/* border: 1px solid #ddd; */
border-radius: 4px;
@ -262,7 +262,7 @@
}
.month-grid button, .year-grid button {
font-family: Microsoft YaHei UI;
padding: 8px;
border: none;
display: flex;

85
src/store/index.js

@ -402,91 +402,6 @@ export default new Vuex.Store({
]
}
],
siteSettingData1: [{
name: '基本设置',
path: '/agent/siteBaseSetting',
img: 'site/sitebase.svg',
imgActive: require('@/assets/site/sitebase_active.svg'),
list: [{
name: '站点信息',
desc: 'siteMessage1'
},
{
name: '域名设置',
desc: 'siteMessage2'
},
{
name: '渠道设置',
desc: 'siteMessage14'
},
{
name: '收款方式',
desc: 'siteMessage3'
},
]
},
{
name: '个性化设置',
path: '/agent/sitePersonalization',
img: 'site/gexinghua.svg',
imgActive: require('@/assets/site/sitebase_active.svg'),
list: [{
name: '网页模板',
desc: 'siteMessage4'
},
{
name: '客服设置',
desc: 'siteMessage5'
},
{
name: '功能显隐',
desc: 'siteMessage6'
},
{
name: '安全提交',
desc: 'siteMessage7'
},
{
name: '初始订单数',
desc: 'siteMessage8'
},
]
},
{
name: '移动端设置',
path: '/agent/siteMobileSetting',
img: 'site/siteh5.svg',
imgActive: require('@/assets/site/sitebase_active.svg'),
list: [{
name: '微信H5',
desc: 'siteMessage9'
},
{
name: '小程序',
desc: 'siteMessage10'
},
]
},
{
name: '营销推广',
path: '/siteSetting/siteSem',
img: 'site/sitesem.svg',
imgActive: require('@/assets/site/sitebase_active.svg'),
list: [{
name: 'SEO设置',
desc: 'siteMessage11'
},
{
name: 'SEM设置',
desc: 'siteMessage12'
},
{
name: '访问统计',
desc: 'siteMessage13'
},
]
}
],
siteSettingData: [ //第二种侧边栏 -- 点击单项进行页面滚动
{
name: '基本设置',

25
src/style/theme/common.scss

@ -2,9 +2,13 @@ html {
scroll-behavior: smooth;
/* 使整个页面的滚动平滑 */
}
:root {
--font-chinese: "Microsoft YaHei", "Microsoft YaHei UI", -apple-system,
BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
"Helvetica Neue", Helvetica, Arial, sans-serif;
}
body {
font-family: Microsoft YaHei UI;
font-family: var(--font-chinese) !important;
font-size: 14px;
margin: 0;
width: 100vw;
@ -30,7 +34,6 @@ body {
}
.pageTitle {
font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: normal;
@ -41,7 +44,6 @@ body {
}
.littleTitle {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: bold;
line-height: normal;
@ -355,7 +357,7 @@ body {
.flex-left-desc {
/* body/body 2_regular */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -396,7 +398,7 @@ body {
border-radius: 2px;
width: 96px;
height: 38px;
font-family: Microsoft YaHei UI;
font-size: 14px;
letter-spacing: 0.08em;
display: flex;
@ -612,7 +614,7 @@ body {
.el-input {
border-radius: 2px;
border: 1px solid transparent;
font-family: Microsoft YaHei UI;
}
.el-input:focus-within {
@ -661,7 +663,7 @@ body {
.el-input__inner::placeholder {
color: #BABDC2;
letter-spacing: 0.08em;
font-family: Microsoft YaHei UI;
}
.el-input--prefix .el-input__inner {
@ -696,7 +698,7 @@ body {
// 应用在表格表头上的下拉开框 统一类名修改 字体效果
.tableHeaderSelect ::v-deep .el-input__inner {
font-weight: normal;
font-family: Microsoft YaHei UI;
}
.el-select:hover .el-input__inner {
@ -724,7 +726,7 @@ body {
padding: 10px 12px;
border-radius: 2px;
height: 100% !important;
font-family: Microsoft YaHei UI;
}
.el-textarea__inner:hover {
@ -1207,7 +1209,8 @@ body {
display: flex;
justify-content: space-between;
align-items: center;
font-family: Microsoft YaHei UI;
.left b {
display: block;
text-align: left;

3
src/views/ConfigureServicePrices.vue

@ -322,14 +322,11 @@ export default {
b {
display: inline-block;
margin-right: 32px;
/* body/body 1_bold */
font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
font-variation-settings: "opsz" auto;
/* text/text_1 */
color: #1E2226;
}
}

6
src/views/agent/checkOrderList.vue

@ -887,7 +887,6 @@ a:hover {
}
.fontgreen {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -903,7 +902,6 @@ a:hover {
}
.fontblue {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -919,7 +917,6 @@ a:hover {
}
.fontred {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -959,13 +956,10 @@ a:hover {
}
.checktitle {
/* body/body 2_bold */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
/* text/text_1 */
color: #1E2226;
}

7
src/views/agent/domainList.vue

@ -371,8 +371,6 @@ export default {
padding: 32px 32px;
}
.tip-title {
/* body/body 2_bold */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: bold;
line-height: normal;
@ -420,7 +418,6 @@ export default {
}
.desc-text {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -430,7 +427,6 @@ export default {
}
.expiretime {
font-family: Microsoft YaHei UI;
font-size: 12px;
font-weight: normal;
line-height: 13px;
@ -529,13 +525,10 @@ a {
margin-bottom: 32px;
h3{
margin: 0;
/* body/body 2_bold */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
/* text/text_1 */
color: #1E2226;
}

1
src/views/agent/home.vue

@ -425,7 +425,6 @@ a {
}
.specMoney {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: 22px;

18
src/views/agent/supplyList.vue

@ -145,7 +145,6 @@ export default {
}
.classify-title {
font-family: Microsoft YaHei UI;
font-size: 20px;
font-weight: bold;
text-align: left;
@ -179,14 +178,11 @@ export default {
z-index: 0;
}
.ver-title {
/* body/body 1_bold */
font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: normal;
text-align: justify; /* 浏览器可能不支持 */
letter-spacing: 0.08em;
/* text/text_1 */
color: #1E2226;
}
@ -215,8 +211,6 @@ export default {
}
.anchor {
text-decoration: none;
/* body/body 2_regular */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -227,8 +221,6 @@ export default {
}
.ver-desc {
/* body/body 2_regular */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -240,7 +232,6 @@ export default {
}
.ver-single {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -251,7 +242,6 @@ export default {
}
.ver-single-desc {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -290,8 +280,6 @@ export default {
}
.service-title {
/* body/body 2_regular */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -303,7 +291,6 @@ export default {
}
.service-desc {
font-family: Microsoft YaHei UI;
font-size: 12px;
font-weight: normal;
line-height: 17px;
@ -334,7 +321,6 @@ export default {
z-index: 1;
}
.price {
font-family: Microsoft YaHei UI;
font-size: 20px;
font-weight: normal;
line-height: 20px;
@ -345,7 +331,6 @@ export default {
}
.unit {
font-family: Microsoft YaHei UI;
font-size: 12px;
font-weight: normal;
line-height: 16px;
@ -374,7 +359,6 @@ export default {
}
.fontgreen {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -390,7 +374,6 @@ export default {
}
.fontblue {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
@ -406,7 +389,6 @@ export default {
}
.fontred {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;

1
src/views/super/Ranking/Purchase.vue

@ -399,7 +399,6 @@ export default {
font-size: 14px;
font-weight: normal;
letter-spacing: 0.08em;
font-family: Microsoft YaHei UI;
color: #1E2226;
}

42
src/views/super/Ranking/RankBatchList.vue

@ -2,7 +2,7 @@
<div class="demo-wrap main-content12">
<div class="flex-between flex-end pagetitle">
<h4>{{ pageTitle }}</h4>
<CustomDropdown ref="dropdownRef" :placeholder="'('+viewDesc[this.view]+')'+text" width="280px">
<CustomDropdown ref="dropdownRef" :placeholder="textDesc" width="280px">
<DateSelect slot="normal" :view="view" v-model="selectedDate" @update-count="handleUpdateView"
@change="handleDateChange" />
</CustomDropdown>
@ -23,8 +23,8 @@
</div>
<div class=" flex-common" id="">
<el-form>
<GuipTable :tableData="tableData" style="width: 100%" :border="true" @sort-change="handleSortChange"
:loading="loading" @cell-mouse-enter="handleRowHover">
<GuipTable :tableData="tableData" style="width: 100%" :border="true" @sort-change="handleSortChange" :loading="loading"
@cell-mouse-enter="handleRowHover">
<el-table-column fixed="left" prop="sort" label="排序" width="70"></el-table-column>
<el-table-column fixed="left"
v-if="(dataRank == 1 || dataRank == 2) && (dataType == 'ver_type' || dataType == 'check_type')"
@ -229,10 +229,10 @@ export default {
'check_type': '服务名称',
},
type_select: {
'ver_type': '按品牌名称',
'check_type': '按服务名称',
'ver_type': '按品牌名称',//2
'check_type': '按服务名称',//1
},
selectedType: 'ver_type',
selectedType: 'check_type',
view: 'month',
labels: ['', '', '', ''],
current_month: '',
@ -243,6 +243,7 @@ export default {
sort_by: 4,
sort_order: 2,
text: '',//
textDesc: '',//
selectedDate: new Date(),//
dataType: '',
dataRank: '',
@ -263,22 +264,25 @@ export default {
},
methods: {
init() {
this.selectedType = this.type;
document.title = this.pageTitle;
this.text = this.getNowDate()
this.dataType = this.type
this.dataRank = this.rank_type
this.getRankingData();
},
handleUpdateView(newView) {
this.view = newView;
},
getNowDate() {
const viewdesc = this.viewDesc[this.view];
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // 0
const currentYearMonth = `${year}-${month}`;
this.textDesc = viewdesc + currentYearMonth;
return `${currentYearMonth}`
},
getDate(dateStr) {
@ -292,7 +296,9 @@ export default {
}
},
handleDateChange(date) {
const viewdesc = this.viewDesc[this.view];
this.text = this.getDate(date)
this.textDesc = viewdesc + this.text;
this.selectedDate = date;
localStorage.setItem('date', JSON.stringify(date))
@ -433,17 +439,17 @@ export default {
this.show_detail_index = row.sort
},
changeRankType() {
const dataRankObj = {
'check_type':'1',
'ver_type':'2'
}
// const dataRankObj = {
// 'check_type':'1',
// 'ver_type':'2'
// }
this.dataType = this.selectedType
this.dataRank = dataRankObj[this.selectedType]
// this.dataRank = dataRankObj[this.selectedType]
this.getRankingData()
},
//
getRankingData() {
this.setLabelText();
if (this.dataType == 'agent') {
this.getAgentRanking()
}
@ -466,11 +472,11 @@ export default {
if (this.view === 'month' && year == currentYear && month == currentMonth) {
this.current_month = '(当月)';
}
// label
this.labels = [];
if (this.view === 'year') {
for (let i = 3; i >= 0; i--) {
this.labels.push((year - i) + '年' + this.rank_type_desc[this.dataRank]);
this.labels.push((year - i) + '年' + this.rank_type_desc[this.rank_type]);
}
} else {
const monthLabels = [];
@ -478,7 +484,7 @@ export default {
let m = month - i;
if (m <= 0) m += 12;
monthLabels.push(m + '月' + this.rank_type_desc[this.dataRank]);
monthLabels.push(m + '月' + this.rank_type_desc[this.rank_type]);
}
this.labels = monthLabels;
}
@ -526,6 +532,7 @@ export default {
})
},
getTypeRanking() {
console.log(this.dataRank,'that.dataRank===');
//
const that = this
that.tableData = []
@ -546,6 +553,7 @@ export default {
that.total = response.data.total
})
}).catch(error => {
this.loading = false;
console.error(error, 'error')
})
},
@ -629,7 +637,6 @@ export default {
.pop-top {
h3 {
font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: 18px;
@ -690,7 +697,6 @@ export default {
font-size: 14px;
font-weight: normal;
letter-spacing: 0.08em;
font-family: Microsoft YaHei UI;
color: #1E2226;
height: 100%;
}

1
src/views/super/Ranking/RankDetail.vue

@ -536,7 +536,6 @@ export default {
.pop-top {
h3 {
font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: 18px;

2
src/views/super/Ranking/RankList.vue

@ -705,7 +705,6 @@ export default {
.pop-top {
h3 {
font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: 18px;
@ -755,7 +754,6 @@ export default {
font-size: 14px;
font-weight: normal;
letter-spacing: 0.08em;
font-family: Microsoft YaHei UI;
color: #1E2226;
height: 100%;
}

1
src/views/super/Ranking/Ranking.vue

@ -87,7 +87,6 @@ export default {
.pop-top {
h3 {
font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: 18px;

Loading…
Cancel
Save