tradeScreen/src/view/commodity.vue

199 lines
8.7 KiB
Vue
Raw Normal View History

2023-11-24 19:32:45 +08:00
<template>
<div class="box">
<div class="img-cls">
2023-11-25 18:35:23 +08:00
<img src="/static/town/TABBG.png" style="width: 100%;height: 100%;position: absolute;z-index: -10000;" alt="">
2023-11-24 19:32:45 +08:00
<div class="content">
2023-11-25 18:35:23 +08:00
<div class="btns" style="position: absolute;">
<div class="btn" @click="test">商品分类</div>
<div class="btn" @click="hdClick(false)">商品管理</div>
</div>
<div style="display: flex;color: white;justify-content: flex-end;margin-right: 5vw;">
<div class="manageBtn">出售中商品</div>
<div class="manageBtn">仓库中商品</div>
<div class="manageBtn">待审核商品</div>
<div class="manageBtn">审核未通过商品</div>
2023-11-24 19:32:45 +08:00
</div>
2023-11-25 18:35:23 +08:00
<div class="table" v-if="ShwostoreType">
<dv-scroll-board :config="configs" style="width:95vw;height:100%" />
</div>
<div class="table" v-else>
<dv-scroll-board :config="configs2" style="width:95vw;height:100%" />
2023-11-24 19:32:45 +08:00
</div>
</div>
</div>
</div>
</template>
<script setup>
// 102B3
import { ref, reactive, onMounted } from "vue"
2023-11-25 18:35:23 +08:00
const ShwostoreType = ref(true)
const test = (e) => {
alert(4145)
// if (e.columnIndex == 1) {
// console.log(e)
// }
}
const hdClick = (b) => {
ShwostoreType.value = b
alert(565)
}
const a = (aaa) => {
2023-11-24 19:32:45 +08:00
for (let i = 0; i < 100; i++) {
if (i % 2 == 0) {
2023-11-25 18:35:23 +08:00
aaa.data.push(
2023-11-24 19:32:45 +08:00
[
`<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;' >排sd序</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;'>排序</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;'>排序</div>`,
2023-11-25 18:35:23 +08:00
`<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;'>排序</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;'>排序</div>`,
2023-11-24 19:32:45 +08:00
]
)
} else {
2023-11-25 18:35:23 +08:00
aaa.data.push(
2023-11-24 19:32:45 +08:00
[
`<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;'>排sd序</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;'>排序</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;'>排序</div>`,
2023-11-25 18:35:23 +08:00
`<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;'>排序</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;'>排序</div>`,
2023-11-24 19:32:45 +08:00
]
)
}
}
}
const configs = reactive({
headerBGC: "linear-gradient(to right, #ff0000, #00ff00)",
oddRowBGC: '',
evenRowBGC: "",
rowNum: 20,
header: [
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>排序</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>分类名称</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>分类图标</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>是否显示</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>是否推荐</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>创建时间</div>`,
],
data: [
]
})
2023-11-25 18:35:23 +08:00
// 商品管理
const configs2 = reactive({
headerBGC: "linear-gradient(to right, #ff0000, #00ff00)",
oddRowBGC: '',
evenRowBGC: "",
rowNum: 20,
header: [
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>ID</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商品图</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商品名称</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商户名称</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商户分类</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商品售价</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>平台分类</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>销量</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>库存</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>推荐级别</div>`,
`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>更新时间</div>`,
],
data: [
]
})
onMounted(() => {
a(configs2)
console.log(5656)
})
2023-11-24 19:32:45 +08:00
</script>
<style lang="scss" scoped>
.box {
margin-top: 3vh;
width: 100vw;
height: 90vh;
position: relative;
.img-cls {
width: 99%;
height: 90vh;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// background-color: #fff;
box-sizing: border-box;
.content {
width: 100%;
height: 100%;
padding: 2vw;
}
}
.btns {
display: flex;
2023-11-25 18:35:23 +08:00
cursor: pointer;
2023-11-24 19:32:45 +08:00
.btn {
color: white;
border: 1px solid #BF6D5D;
padding: 3px 10px;
border-radius: 20px;
margin-right: 10px;
}
}
.table {
width: 100%;
2023-11-25 18:35:23 +08:00
height: 75vh;
2023-11-24 19:32:45 +08:00
margin-top: 2vh;
}
}
2023-11-25 18:35:23 +08:00
.manageBtn {
padding: 2px 10px;
border: 1px solid #6377C8;
border-radius: 20px;
margin-right: 10px;
}
2023-11-24 19:32:45 +08:00
:deep(.ceil) {
padding: 0 !important;
margin-bottom: 5px;
margin-right: 2px;
}
:deep(.header-item) {
padding: 0 !important;
}
.row {}
</style>