From d54db34a27eedb50c7290aad79d9ec75590a68fa Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期三, 18 十月 2023 16:38:07 +0800
Subject: [PATCH] Merge branch 'dev' into songshankun/adjust-style
---
src/views/overview/index.vue | 90 +++++++++++++++++++++++----------------------
1 files changed, 46 insertions(+), 44 deletions(-)
diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue
index 536bea9..ab51daf 100644
--- a/src/views/overview/index.vue
+++ b/src/views/overview/index.vue
@@ -10,31 +10,32 @@
v-for="item in tableList"
:key="item.id"
:class="{
- overview_active: item.status === 'active',
- overview_done: item.status === 'done',
- overview_todo: item.status === 'todo'
+ overview_active: item.baseOperationType === 1,
+ overview_done: item.baseOperationType === 2,
+ overview_todo: item.baseOperationType === 3
}"
+ @click="labelClick(item)"
>
<div class="top">
<div class="label">
- <span style="cursor: pointer" @click="labelClick(item.name)">{{ item.name }}</span>
+ <span style="cursor: pointer">{{ item.name }}</span>
</div>
<div class="set">...</div>
</div>
<div class="bottom">
<div class="left">
<div class="left_view">
- <span>2</span>
- <span style="margin-left: 5px">寰呭鐞�</span>
+ <span>{{ item.readyCount }}</span>
+ <span style="margin-left: 5px">灏辩华</span>
</div>
</div>
<div class="right">
<div class="right_status">
- <span style="cursor: pointer">2 姝e湪绛夊緟</span>
+ <span style="cursor: pointer">{{ item.finishCount + " 瀹屾垚" }}</span>
</div>
- <div class="right_status" style="margin-top: 5px">
+ <!-- <div class="right_status" style="margin-top: 5px">
<span style="cursor: pointer">4 寤舵湡</span>
- </div>
+ </div> -->
</div>
</div>
</div>
@@ -48,6 +49,7 @@
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+import { getOperationType } from "@/api/overview/overview"
export default {
name: "OverView",
@@ -57,36 +59,7 @@
computed: {},
data() {
return {
- tableList: [
- {
- name: "閲囪喘鍏ュ簱",
- status: "active"
- },
- {
- name: "鍐呴儴璋冩嫧",
- status: "done"
- },
- {
- name: "3",
- status: "done"
- },
- {
- name: "2",
- status: "active"
- },
- {
- name: "3",
- status: "todo"
- },
- {
- name: "2",
- status: "active"
- },
- {
- name: "3",
- status: "todo"
- }
- ],
+ tableList: [],
editConfig: {
visible: false,
title: "鏂板缓",
@@ -94,15 +67,38 @@
}
}
},
- created() {},
+ created() {
+ this.getData()
+ },
methods: {
getList(val) {
console.log(val)
},
- labelClick(name) {
- this.$router.push({ path: "/overview/overviewList", query: { name: name } })
+ labelClick(item) {
+ console.log(item)
+ this.$router.push({
+ name: "overviewList",
+ params: { name: item.name, workType: item.baseOperationType, id: item.id }
+ })
},
- getData() {}
+ async getData() {
+ await getOperationType({
+ keyword: "",
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
+ }).then((res) => {
+ console.log(res.data.data)
+ if (res.data.code === 200) {
+ const list = res.data.data.map((item) => {
+ return {
+ ...item
+ }
+ })
+ this.tableList = list || []
+ this.pagerOptions.totalCount = res.data.total
+ }
+ })
+ }
}
}
</script>
@@ -110,7 +106,7 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.content {
- height: calc(100% - 150px);
+ height: calc(100% - 112px);
background: #fff;
border-radius: 12px;
.list-view {
@@ -130,6 +126,7 @@
box-shadow: inset 0 0 2px #dee2e6;
-moz-box-shadow: inset 0 0 2px #dee2e6;
-webkit-box-shadow: inset 0 0 2px #dee2e6;
+ cursor: pointer;
.top {
height: 35px;
line-height: 35px;
@@ -170,6 +167,7 @@
.right {
width: 50%;
.right_status {
+ margin-top: 5px;
}
}
}
@@ -185,4 +183,8 @@
}
}
}
+
+.btn-pager {
+ margin-top: 0;
+}
</style>
--
Gitblit v1.8.0