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">
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>
<template>
<!-- <div>sadas</div> -->
<div class="main-box">
<router-view></router-view>
</div>

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<template>
<div class="dv-scroll-board" :ref="ref">
<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;
${headerStyle}
line-height: ${mergedConfig.headerHeight}px;
@ -15,12 +15,25 @@
<div class="row-item" v-for="(row, ri) in rows" :key="`${row.toString()}${row.scroll}`" :style="`
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)"
@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>
@ -469,4 +482,20 @@ export default {
border-radius: 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>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,10 +17,13 @@
<div @click="initProduct(3)" class="manageBtn" :class="{ actmanageBtn: type == 3 }">审核未通过商品</div> -->
</div>
<div class="table" v-if="ShwostoreType && configs.data.length">
<dv-scroll-board @click="tableClick" :config="configs" style="width:95vw;height:100%" />
</div>
<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>
@ -32,6 +35,8 @@
import { ref, reactive, onMounted } from "vue"
import { getProductCategoryListApi, getProductListApi, product_status_filterApi } from "@/api.js"
import { areaObj } from "../store";
import scrollTable from "@/components/scrollTable.vue"
const areaStore = areaObj()
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;'>${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.star}</div>`,
`${item.star}`,
`<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;'>${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;'>
<el-button type="warning" disabled>Warning</el-button>
</div>`,
` ${item.star}`,
`<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 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 { areaObj } from '@/store/index.js'
const areaStore=areaObj()
const billType = ref(1)
const changeBill = (num) => {
billType.value = num
@ -221,8 +226,7 @@ const billList = reactive([
financial_record_titleApi(
{
areaCode: 510524,
streetCode: 510524100
...areaStore.area
}

View File

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

View File

@ -103,8 +103,8 @@ import { useRouter } from "vue-router";
import { loginApi } from "@/api.js"
const router = useRouter()
const show = ref(false)
const account = ref('')
const password = ref('')
const account = ref('泸县')
const password = ref('luxian')
const isAccount = ref(false)
const isPassword = ref(false)
@ -129,19 +129,10 @@ const submit = () => {
account: account.value,
password: password.value
}).then(res => {
console.log(res)
localStorage.setItem("TRADE_USER", JSON.stringify(res.data))
router.replace('/')
localStorage.setItem("TRADE_USER", res.token)
// 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 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 { areaObj } from "../store";
const areaStore=areaObj()
const value = ref(1)
@ -118,8 +121,7 @@ const hdClick = (i) => {
configs.data.splice(0, configs.data.length)
order_listApi(
{
areaCode: 510524,
streetCode: 510524100,
...areaStore.area,
limit: 50
}
).then(res => {

View File

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