Browse Source

正式环境首页卡顿问题--临时注释掉

master_hella_20240701
yufei0306 6 months ago
parent
commit
834768cc32
  1. 62
      src/views/home/components/material.vue
  2. 2
      src/views/home/components/produce.vue
  3. 8
      src/views/home/components/product.vue
  4. 2
      src/views/home/components/supplierIndex.vue
  5. 13
      src/views/home/index.vue

62
src/views/home/components/material.vue

@ -32,7 +32,8 @@
</div> </div>
</div> </div>
<div class="two-row mt-14px"> <div class="two-row mt-14px">
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]" >
<!-- 呆滞库存预警 -->
<div class="title">{{ t('home.slack_stock_warning')}}</div> <div class="title">{{ t('home.slack_stock_warning')}}</div>
<el-table <el-table
:data="materialData?.stagnantBalanceList" :data="materialData?.stagnantBalanceList"
@ -87,8 +88,19 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <el-pagination style="margin-top:10px"
v-model:current-page="currentPage_stagnantBalance"
v-model:page-size="pageSize_stagnantBalance"
:page-sizes="[10, 20, 30, 50, 100]"
:small="true"
:background="false"
layout="total, sizes, prev, pager, next, jumper"
:total="total_stagnantBalance"
@current-change="handleCurrentChange_stagnantBalance"
/> -->
</div> </div>
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]">
<!-- 超期库存预警 -->
<div class="title">{{ t('home.overstock_warning') }}</div> <div class="title">{{ t('home.overstock_warning') }}</div>
<el-table <el-table
:data="materialData?.overdueBalanceList" :data="materialData?.overdueBalanceList"
@ -143,10 +155,21 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <el-pagination style="margin-top:10px"
v-model:current-page="currentPage_overdueBalance"
v-model:page-size="pageSize_overdueBalance"
:page-sizes="[10, 20, 30, 50, 100]"
:small="true"
:background="false"
layout="total, sizes, prev, pager, next, jumper"
:total="total_overdueBalance"
@current-change="handleCurrentChange_overdueBalance"
/> -->
</div> </div>
</div> </div>
<div class="two-row mt-14px"> <div class="two-row mt-14px">
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]">
<!-- 高低储预警 -->
<div class="title">{{ t('home.high_and_low_storage_warning') }}</div> <div class="title">{{ t('home.high_and_low_storage_warning') }}</div>
<el-table <el-table
:data="materialData?.warningBalanceList" :data="materialData?.warningBalanceList"
@ -201,8 +224,19 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <el-pagination style="margin-top:10px"
v-model:current-page="currentPage_warningBalance"
v-model:page-size="pageSize_warningBalance"
:page-sizes="[10, 20, 30, 50, 100]"
:small="true"
:background="false"
layout="total, sizes, prev, pager, next, jumper"
:total="total_warningBalance"
@current-change="handleCurrentChange_warningBalance"
/> -->
</div> </div>
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]">
<!-- 待处理任务 -->
<div class="title">{{ t('home.waiting_tasks') }}</div> <div class="title">{{ t('home.waiting_tasks') }}</div>
<Echart :options="barOptions" :height="280" :key="lineIndex" /> <Echart :options="barOptions" :height="280" :key="lineIndex" />
</div> </div>
@ -251,8 +285,32 @@ const getJobCharts = async () => {
lineIndex.value++ lineIndex.value++
} }
onMounted(() => { onMounted(() => {
getMaterialData() // getMaterialData()
}) })
//
const currentPage_stagnantBalance = ref(1)
const pageSize_stagnantBalance = ref(10)
const total_stagnantBalance= ref(100)
const handleCurrentChange_stagnantBalance = (val)=>{
console.log('呆滞库存预警',val)
}
//
const currentPage_overdueBalance = ref(1)
const pageSize_overdueBalance = ref(10)
const total_overdueBalance= ref(100)
const handleCurrentChange_overdueBalance = (val)=>{
console.log('超期库存预警',val)
}
//
const currentPage_warningBalance = ref(1)
const pageSize_warningBalance = ref(10)
const total_warningBalance= ref(100)
const handleCurrentChange_warningBalance = (val)=>{
console.log('高低储预警',val)
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.title { .title {

2
src/views/home/components/produce.vue

@ -202,7 +202,7 @@ const getJobCharts = async () => {
lineIndex.value++ lineIndex.value++
} }
onMounted( () => { onMounted( () => {
getProduceData() // getProduceData()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

8
src/views/home/components/product.vue

@ -11,7 +11,8 @@
</div> </div>
</div> </div>
<div class="two-row mt-14px"> <div class="two-row mt-14px">
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]" style="border:1px solid red">
<!-- 呆滞库存预警 -->
<div class="title">{{ t('home.slack_stock_warning') }}</div> <div class="title">{{ t('home.slack_stock_warning') }}</div>
<el-table <el-table
:data="productData?.stagnantBalanceList" :data="productData?.stagnantBalanceList"
@ -68,6 +69,7 @@
</el-table> </el-table>
</div> </div>
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]">
<!-- 超期库存预警 -->
<div class="title">{{ t('home.overstock_warning') }}</div> <div class="title">{{ t('home.overstock_warning') }}</div>
<el-table <el-table
:data="productData?.overdueBalanceList" :data="productData?.overdueBalanceList"
@ -126,6 +128,7 @@
</div> </div>
<div class="two-row mt-14px"> <div class="two-row mt-14px">
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]">
<!-- 高低储预警 -->
<div class="title">{{ t('home.high_and_low_storage_warning') }}</div> <div class="title">{{ t('home.high_and_low_storage_warning') }}</div>
<el-table <el-table
:data="productData?.warningBalanceList" :data="productData?.warningBalanceList"
@ -182,6 +185,7 @@
</el-table> </el-table>
</div> </div>
<div class="data1 w-[47.3%]"> <div class="data1 w-[47.3%]">
<!-- 待处理任务 -->
<div class="title">{{ t('home.waiting_tasks') }}</div> <div class="title">{{ t('home.waiting_tasks') }}</div>
<Echart :options="barOptions" :height="280" :key="lineIndex" /> <Echart :options="barOptions" :height="280" :key="lineIndex" />
</div> </div>
@ -229,7 +233,7 @@ const getJobCharts = async () => {
lineIndex.value++ lineIndex.value++
} }
onMounted( () => { onMounted( () => {
getProductData() // getProductData()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

2
src/views/home/components/supplierIndex.vue

@ -355,7 +355,7 @@ const formatter = (type,dict) => {
return str return str
} }
onMounted( () => { onMounted( () => {
getSupplierData() // getSupplierData()
getList() getList()
}) })
</script> </script>

13
src/views/home/index.vue

@ -1,9 +1,14 @@
<template> <template>
<div> <div>
<supplierIndex v-hasRole="['super_admin','supplier']"/> <!-- <supplierIndex v-hasRole="['super_admin','supplier']"/>
<material v-hasRole="['super_admin']"/> <material v-hasRole="['super_admin']"/>
<product v-hasRole="['super_admin']"/> <product v-hasRole="['super_admin']"/>
<produce v-hasRole="['super_admin']"/> <produce v-hasRole="['super_admin']"/> -->
<supplierIndex />
<material/>
<!-- material 中四个table重复了先去掉了 -->
<!-- <product/> -->
<produce/>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

Loading…
Cancel
Save