|
@@ -3,9 +3,41 @@
|
|
|
<report-header
|
|
|
title="项目进度监控"
|
|
|
v-model:dateRange="curTimeRange"
|
|
|
- ></report-header>
|
|
|
+ @timeChange="timeChange"
|
|
|
+ >
|
|
|
+ <t-select
|
|
|
+ style="width: 200px"
|
|
|
+ :options="serviceOptions"
|
|
|
+ v-model="serviceId"
|
|
|
+ :keys="{ label: 'name', value: 'id' }"
|
|
|
+ ></t-select>
|
|
|
+ </report-header>
|
|
|
<div class="page-main">
|
|
|
- <div class="scroll-content"> </div>
|
|
|
+ <div class="scroll-content">
|
|
|
+ <div class="row1 flex items-center">
|
|
|
+ <div class="card">
|
|
|
+ <div class="title">
|
|
|
+ <span class="label">大区在服务人数分布及对比</span>
|
|
|
+ </div>
|
|
|
+ <div class="chart-wrap"> </div>
|
|
|
+ </div>
|
|
|
+ <div class="card">
|
|
|
+ <div class="title">
|
|
|
+ <span class="label">设备供应商设备使用占比</span>
|
|
|
+ </div>
|
|
|
+ <div class="chart-wrap"> </div>
|
|
|
+ </div>
|
|
|
+ <div class="card">
|
|
|
+ <div class="title">
|
|
|
+ <span class="label">供应商项目阶段分布及对比</span>
|
|
|
+ </div>
|
|
|
+ <div class="chart-wrap"> </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row2">
|
|
|
+ <div class="card"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -14,7 +46,7 @@
|
|
|
import { ref, computed, onMounted } from 'vue';
|
|
|
import { useRequest } from 'vue-request';
|
|
|
import { createCakePieOption } from '@/utils/chart';
|
|
|
-import {} from '@/api/report';
|
|
|
+import { serviceServiceList } from '@/api/report';
|
|
|
const curTimeRange = ref([]);
|
|
|
const timeParams = computed(() => {
|
|
|
return {
|
|
@@ -22,6 +54,14 @@ const timeParams = computed(() => {
|
|
|
endTime: new Date(curTimeRange.value[1]).getTime(),
|
|
|
};
|
|
|
});
|
|
|
+const serviceOptions = ref([]);
|
|
|
+const serviceId = ref('');
|
|
|
+const timeChange = (time) => {
|
|
|
+ serviceServiceList(timeParams.value).then((res) => {
|
|
|
+ serviceOptions.value = res || [];
|
|
|
+ res?.length && (serviceId.value = res[0].id);
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -34,64 +74,39 @@ const timeParams = computed(() => {
|
|
|
height: 100%;
|
|
|
min-height: 600px;
|
|
|
min-width: 1000px;
|
|
|
+ .row1 {
|
|
|
+ height: calc((100% - 16px) / 2);
|
|
|
+ .card {
|
|
|
+ width: calc((100% - 30px) / 3);
|
|
|
+ height: 100%;
|
|
|
+ &:not(:first-child) {
|
|
|
+ margin-left: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .row2 {
|
|
|
+ margin-top: 15px;
|
|
|
+ height: calc((100% - 16px) / 2);
|
|
|
+ .card {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.card {
|
|
|
- padding: 10px;
|
|
|
+ padding: 4px 10px 10px 10px;
|
|
|
background-color: #fff;
|
|
|
border: 1px solid #e5e5e5;
|
|
|
border-radius: 4px;
|
|
|
.title {
|
|
|
- color: #262626;
|
|
|
- font-size: 14px;
|
|
|
- font-weight: bold;
|
|
|
height: 36px;
|
|
|
- }
|
|
|
- .chart-wrap {
|
|
|
- height: calc(100% - 36px);
|
|
|
- &.service-box {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- justify-content: space-between;
|
|
|
- align-content: flex-start;
|
|
|
- }
|
|
|
- .service-item {
|
|
|
- height: 54px;
|
|
|
- width: calc(50% - 8px);
|
|
|
- margin-bottom: 8px;
|
|
|
- padding: 6px 8px;
|
|
|
- background-color: #f7f7f7;
|
|
|
- border-radius: 2px;
|
|
|
-
|
|
|
- .head {
|
|
|
- font-size: 12px;
|
|
|
- color: #262626;
|
|
|
- }
|
|
|
- .body {
|
|
|
- font-size: 12px;
|
|
|
- .label {
|
|
|
- color: #8c8c8c;
|
|
|
- }
|
|
|
- .status {
|
|
|
- color: #ff7d00;
|
|
|
- &.finished {
|
|
|
- color: #00b42a;
|
|
|
- }
|
|
|
- }
|
|
|
- .process-box {
|
|
|
- flex: 1;
|
|
|
- margin-left: 30px;
|
|
|
- background-color: #d9d9d9;
|
|
|
- height: 6px;
|
|
|
- border-radius: 3px;
|
|
|
- width: 90%;
|
|
|
- overflow: hidden;
|
|
|
- .process {
|
|
|
- background-color: #4080ff;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .label {
|
|
|
+ color: #262626;
|
|
|
+ font-size: 14px;
|
|
|
+ // font-weight: bold;
|
|
|
}
|
|
|
}
|
|
|
}
|