This commit is contained in:
zmj 2023-12-08 23:00:43 +08:00
parent 4d1a70932a
commit d5a48e128c
17 changed files with 95 additions and 62 deletions

View File

@ -1,9 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { areaObj } from "@/store/index.js"
const areaStroe = areaObj()
let userInfo = JSON.parse(localStorage.getItem('TRADE_USER'))
let { area_code, street_code } = userInfo.user
areaStroe.changeArea({ areaCode: area_code, streetCode: street_code })
</script> </script>
<template> <template>
<!-- <div>sadas</div> -->
<div class="main-box"> <div class="main-box">
<router-view></router-view> <router-view></router-view>
</div> </div>

View File

@ -23,7 +23,6 @@ instacne.interceptors.request.use(
instacne.interceptors.response.use( instacne.interceptors.response.use(
(res) => { (res) => {
console.log(res.data)
if (res.data.status != 200) { if (res.data.status != 200) {
ElMessage({ ElMessage({
message: res.data.message, message: res.data.message,

View File

@ -39,6 +39,7 @@ const area = reactive({
const init = () => { const init = () => {
console.log(props)
getUserTradeCountApi(props.areaCodes).then(res => { getUserTradeCountApi(props.areaCodes).then(res => {

View File

@ -296,7 +296,7 @@ getUserNumApi(
}); });
pageNum.value = Math.ceil(merchatCountList.length / 8) pageNum.value = Math.ceil(merchatCountList.length / 8)
initCharts('user', Option) initCharts('user', Option)
console.log(merchatCountList,65656)
initStoreOption(merchatCountList.slice(0, 8), merchantTotalCount) initStoreOption(merchatCountList.slice(0, 8), merchantTotalCount)
}) })

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="dv-scroll-board" :ref="ref"> <div class="dv-scroll-board" :ref="ref">
<div class="header" v-if="header.length && mergedConfig" :style="mergedConfig.headerStyle"> <div class="header" v-if="header.length && mergedConfig" :style="mergedConfig.headerStyle">
<div class="header-item" v-for="(headerItem, i) in header" :key="`${headerItem}${i}`" :style="` <div class="header-item" v-for="(headerItem, i) in header" :key="`${headerItem}${i}`" :style="`
height: ${mergedConfig.headerHeight}px; height: ${mergedConfig.headerHeight}px;
${headerStyle} ${headerStyle}
line-height: ${mergedConfig.headerHeight}px; line-height: ${mergedConfig.headerHeight}px;
width: ${widths[i]}px; width: ${widths[i]}px;
`" :align="aligns[i]" v-html="headerItem" /> `" :align="aligns[i]" v-html="headerItem" />
</div> </div>
@ -15,12 +15,25 @@
<div class="row-item" v-for="(row, ri) in rows" :key="`${row.toString()}${row.scroll}`" :style="` <div class="row-item" v-for="(row, ri) in rows" :key="`${row.toString()}${row.scroll}`" :style="`
height: ${heights[ri]}px; height: ${heights[ri]}px;
line-height: ${heights[ri]}px; line-height: ${heights[ri]}px;
background-color: ${mergedConfig[row.rowIndex % 2 === 0 ? 'evenRowBGC' : 'oddRowBGC']
}; };
`"> `">
<div class="ceil" v-for="(ceil, ci) in row.ceils" :key="`${ceil}${ri}${ci}`" :style="`width: ${widths[ci]}px;`" <div v-for="(ceil, ci) in row.ceils" :key="`${ceil}${ri}${ci}`">
<div v-if="ci!=9" class="ceil" :style="`width: ${widths[ci]}px;`"
:align="aligns[ci]" v-html="ceil" @click="emitEvent('click', ri, ci, row, ceil)" :align="aligns[ci]" v-html="ceil" @click="emitEvent('click', ri, ci, row, ceil)"
@mouseenter="handleHover(true, ri, ci, row, ceil)" @mouseleave="handleHover(false)" /> @mouseenter="handleHover(true, ri, ci, row, ceil)" @mouseleave="handleHover(false)" />
<div class="ceil" :style="`width: ${widths[ci]}px;`"
:align="aligns[ci]" @click="emitEvent('click', ri, ci, row, ceil)" style="background-color: #102B3E;"
v-else>
<input type="radio" v-for="item in ceil" name="rate" readonly>
{{ ceil }}
<!-- sasdas -->
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -469,4 +482,20 @@ export default {
border-radius: 3px; border-radius: 3px;
padding: 0px 3px; padding: 0px 3px;
} }
[type="radio"]{
-webkit-appearance: none;
width: 20px;
height: 20px;
-webkit-mask: url("data:image/svg+xml,%3Csvg width='12' height='11' viewBox='0 0 12 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 0l1.693 3.67 4.013.476L8.74 6.89l.788 3.964L6 8.88l-3.527 1.974.788-3.964L.294 4.146l4.013-.476L6 0z' fill='%23F67600'/%3E%3C/svg%3E");
-webkit-mask-size: 20px;
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
background-color: coral; /*默认是选中的样式,橙色*/
margin: 0;
transition: .2s;
}
[type="radio"]:checked~[type="radio"]{
background-color: #E8EAED; /*未选中的样式,灰色*/
}
</style> </style>

View File

@ -11,9 +11,11 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, reactive } from "vue" import { ref, reactive,defineProps } from "vue"
import { getSalesRankApi } from "@/api.js" import { getSalesRankApi } from "@/api.js"
const props = defineProps({
code: Object,
})
const addFn = (data) => { const addFn = (data) => {
let list = [] let list = []
data.forEach((item, i) => { data.forEach((item, i) => {
@ -36,13 +38,6 @@ const addFn = (data) => {
} }
let townProductCount = '' let townProductCount = ''
// getSalesRankApi({
// areaCode: 510524, streetCode: 510524100
// }).then(res => {
// townProductCount = res.data.townProductCount
// // config3.data = addFn(res.data.merchantRankingList)
// })
const aa = () => { const aa = () => {
let list = [] let list = []

View File

@ -36,13 +36,16 @@
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { street_currday_order_countApi } from "@/api.js" import { street_currday_order_countApi } from "@/api.js"
import { ref, reactive } from "vue" import { ref, reactive,defineProps } from "vue"
import { areaObj } from '../../store'; import { areaObj } from '../../store';
const props = defineProps({
code: Object,
})
const areaStore = areaObj() const areaStore = areaObj()
street_currday_order_countApi( street_currday_order_countApi(
{ ...areaStore.area } { ...areaStore.area,streetCode:props.code }
).then(res => { ).then(res => {

View File

@ -23,10 +23,13 @@
<script setup> <script setup>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { onMounted } from "vue" import { onMounted } from "vue"
import {defineProps} from "vue"
const props = defineProps({
code: Object,
})

View File

@ -56,9 +56,11 @@
</style> </style>
<script setup> <script setup>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { onMounted } from "vue" import { onMounted ,defineProps} from "vue"
const props = defineProps({
code: Object,
})
const orderData = { const orderData = {
tooltip: { tooltip: {

View File

@ -4,9 +4,10 @@ import {
export const areaObj = defineStore('counter', { export const areaObj = defineStore('counter', {
state: () => ({ state: () => ({
userInfo:{},
area: { area: {
areaCode: 510524, // areaCode: 510524,
streetCode: 51052410 // streetCode: 51052410
} }
}), }),
@ -14,6 +15,7 @@ export const areaObj = defineStore('counter', {
actions: { actions: {
changeArea(obj) { changeArea(obj) {
this.area = obj this.area = obj
} },
} }
}) })

View File

@ -22,6 +22,9 @@
import { ref, reactive, onMounted } from "vue" import { ref, reactive, onMounted } from "vue"
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { merchant_listApi } from "@/api.js" import { merchant_listApi } from "@/api.js"
import { areaObj } from '@/store/index.js'
const areaStore=areaObj()
const route = useRouter() const route = useRouter()
let status = ref(0) let status = ref(0)
@ -33,8 +36,7 @@ const changeTable = (num) => {
status.value = num status.value = num
merchant_listApi( merchant_listApi(
{ {
areaCode: 510524, ...areaStore.area,
streetCode: 510524100,
status: status.value, status: status.value,
limit: 50 limit: 50
} }

View File

@ -17,10 +17,13 @@
<div @click="initProduct(3)" class="manageBtn" :class="{ actmanageBtn: type == 3 }">审核未通过商品</div> --> <div @click="initProduct(3)" class="manageBtn" :class="{ actmanageBtn: type == 3 }">审核未通过商品</div> -->
</div> </div>
<div class="table" v-if="ShwostoreType && configs.data.length"> <div class="table" v-if="ShwostoreType && configs.data.length">
<dv-scroll-board @click="tableClick" :config="configs" style="width:95vw;height:100%" /> <dv-scroll-board @click="tableClick" :config="configs" style="width:95vw;height:100%" />
</div> </div>
<div class="table" v-if="!ShwostoreType && configs2.data.length"> <div class="table" v-if="!ShwostoreType && configs2.data.length">
<dv-scroll-board :config="configs2" style="width:95vw;height:100%" />
<scrollTable :config="configs2" style="width:95vw;height:100%"></scrollTable>
<!-- <dv-scroll-board :config="configs2" style="width:95vw;height:100%" /> -->
</div> </div>
</div> </div>
</div> </div>
@ -32,6 +35,8 @@
import { ref, reactive, onMounted } from "vue" import { ref, reactive, onMounted } from "vue"
import { getProductCategoryListApi, getProductListApi, product_status_filterApi } from "@/api.js" import { getProductCategoryListApi, getProductListApi, product_status_filterApi } from "@/api.js"
import { areaObj } from "../store"; import { areaObj } from "../store";
import scrollTable from "@/components/scrollTable.vue"
const areaStore = areaObj() const areaStore = areaObj()
getProductCategoryListApi( getProductCategoryListApi(
@ -115,7 +120,7 @@ const a = (aaa, data, flag) => {
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>排序</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>排序</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${item.attrValue[0].sales}</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${item.attrValue[0].sales}</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${item.attrValue[0].stock}</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${item.attrValue[0].stock}</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${item.star}</div>`, `${item.star}`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${item.update_time}</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${item.update_time}</div>`,
] ]
) )
@ -132,14 +137,7 @@ const a = (aaa, data, flag) => {
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>排序</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>排序</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${item.attrValue[0].sales}</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${item.attrValue[0].sales}</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${item.attrValue[0].stock}</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${item.attrValue[0].stock}</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'> ` ${item.star}`,
<el-button type="warning" disabled>Warning</el-button>
</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${item.update_time}</div>`, `<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${item.update_time}</div>`,
] ]
) )

View File

@ -139,6 +139,11 @@ import { ref, reactive, onMounted } from "vue"
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import Bill from "@/components/Bill.vue" import Bill from "@/components/Bill.vue"
import { financial_record_titleApi, financial_recordApi, financial_record_detailApi, financial_record_detailApi2, bill_listApi, withdraw_listApi } from "@/api.js" import { financial_record_titleApi, financial_recordApi, financial_record_detailApi, financial_record_detailApi2, bill_listApi, withdraw_listApi } from "@/api.js"
import { areaObj } from '@/store/index.js'
const areaStore=areaObj()
const billType = ref(1) const billType = ref(1)
const changeBill = (num) => { const changeBill = (num) => {
billType.value = num billType.value = num
@ -221,8 +226,7 @@ const billList = reactive([
financial_record_titleApi( financial_record_titleApi(
{ {
areaCode: 510524, ...areaStore.area
streetCode: 510524100
} }

View File

@ -26,7 +26,6 @@
</template> </template>
<script setup> <script setup>
import { onMounted } from 'vue';
import { ref, reactive } from "vue" import { ref, reactive } from "vue"
import topLeft from "@/components/index/topLeft.vue" import topLeft from "@/components/index/topLeft.vue"
import topCenter from "@/components/index/topCenter.vue" import topCenter from "@/components/index/topCenter.vue"
@ -34,7 +33,6 @@ import topRight from "@/components/index/topRight.vue"
import bottomLeft from "@/components/index/bottomLeft.vue" import bottomLeft from "@/components/index/bottomLeft.vue"
import bottomCenter from "@/components/index/bottomCenter.vue" import bottomCenter from "@/components/index/bottomCenter.vue"
import bottomRight from "@/components/index/bottomRight.vue" import bottomRight from "@/components/index/bottomRight.vue"
import { areaObj } from '@/store/index.js' import { areaObj } from '@/store/index.js'
const areaStore = areaObj() const areaStore = areaObj()
@ -42,6 +40,8 @@ const areaCodes = reactive({
...areaStore.area ...areaStore.area
}) })
console.log(areaCodes,44545)
const loading = ref(false) const loading = ref(false)

View File

@ -103,8 +103,8 @@ import { useRouter } from "vue-router";
import { loginApi } from "@/api.js" import { loginApi } from "@/api.js"
const router = useRouter() const router = useRouter()
const show = ref(false) const show = ref(false)
const account = ref('') const account = ref('泸县')
const password = ref('') const password = ref('luxian')
const isAccount = ref(false) const isAccount = ref(false)
const isPassword = ref(false) const isPassword = ref(false)
@ -129,19 +129,10 @@ const submit = () => {
account: account.value, account: account.value,
password: password.value password: password.value
}).then(res => { }).then(res => {
console.log(res) console.log(res)
localStorage.setItem("TRADE_USER", JSON.stringify(res.data))
localStorage.setItem("TRADE_USER", res.token) router.replace('/')
// if (res.role_type == 0) {
// router.replace('/')
// }
// else if (res.role_type == 1) {
// router.replace('/detail')
// }
}) })

View File

@ -41,6 +41,9 @@
import { ref, reactive, onMounted } from "vue" import { ref, reactive, onMounted } from "vue"
import Bill from "@/components/Bill.vue" import Bill from "@/components/Bill.vue"
import { order_listApi, order_list_count_titleApi, refund_order_listApi, take_order_listApi, take_order_count_titleApi } from "@/api.js" import { order_listApi, order_list_count_titleApi, refund_order_listApi, take_order_listApi, take_order_count_titleApi } from "@/api.js"
import { areaObj } from "../store";
const areaStore=areaObj()
const value = ref(1) const value = ref(1)
@ -118,8 +121,7 @@ const hdClick = (i) => {
configs.data.splice(0, configs.data.length) configs.data.splice(0, configs.data.length)
order_listApi( order_listApi(
{ {
areaCode: 510524, ...areaStore.area,
streetCode: 510524100,
limit: 50 limit: 50
} }
).then(res => { ).then(res => {

View File

@ -1,13 +1,13 @@
<template> <template>
<div class="top box"> <div class="top box">
<div class="l"> <div class="l">
<topLeft></topLeft> <topLeft :code="route.query.code"></topLeft>
</div> </div>
<div class="c" id=""> <div class="c" id="">
<topCenter :code="route.query.code"></topCenter> <topCenter :code="route.query.code"></topCenter>
</div> </div>
<div class="r"> <div class="r">
<topRight></topRight> <topRight :code="route.query.code"></topRight>
</div> </div>
@ -15,14 +15,14 @@
<div class="bottom box"> <div class="bottom box">
<div class="l"> <div class="l">
<bottomleft></bottomleft> <bottomleft :code="route.query.code"></bottomleft>
</div> </div>
<div class="c"> <div class="c">
<img class="img-cls" src="/static/town/CJYH.png" alt=""> <img class="img-cls" src="/static/town/CJYH.png" alt="">
<div id="transactionUsers" class="transactionUsers"></div> <div id="transactionUsers" class="transactionUsers"></div>
</div> </div>
<div class="r"> <div class="r">
<bottomRight></bottomRight> <bottomRight :code="route.query.code"></bottomRight>
</div> </div>
</div> </div>