|
@@ -0,0 +1,200 @@
|
|
|
+<template>
|
|
|
+ <div class="sop-analysis">
|
|
|
+ <report-header
|
|
|
+ title="SOP预警监控"
|
|
|
+ v-model:dateRange="curTimeRange"
|
|
|
+ @timeChange="timeChange"
|
|
|
+ >
|
|
|
+ <t-select
|
|
|
+ style="width: 200px; margin-right: 10px"
|
|
|
+ :options="serviceOptions"
|
|
|
+ v-model="serviceId"
|
|
|
+ :keys="{ label: 'name', value: 'id' }"
|
|
|
+ ></t-select>
|
|
|
+ </report-header>
|
|
|
+ <div class="page-main">
|
|
|
+ <div class="scroll-content">
|
|
|
+ <div class="col1">
|
|
|
+ <div class="card">
|
|
|
+ <div class="title">
|
|
|
+ <t-select v-model="sort1" style="width: calc(100% - 50px)">
|
|
|
+ <t-option
|
|
|
+ value="PENDING"
|
|
|
+ label="项目预警待处理TOP10"
|
|
|
+ ></t-option>
|
|
|
+ <t-option
|
|
|
+ value="SLOWEST"
|
|
|
+ label="项目预警处理最慢TOP10"
|
|
|
+ ></t-option>
|
|
|
+ <t-option
|
|
|
+ value="FASTEST"
|
|
|
+ label="项目预警处理最快TOP10"
|
|
|
+ ></t-option>
|
|
|
+ </t-select>
|
|
|
+ </div>
|
|
|
+ <div class="chart-wrap">
|
|
|
+ <table-loop :data="tableDataHandle(result1)"></table-loop>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card">
|
|
|
+ <div class="title">
|
|
|
+ <t-select v-model="sort2" style="width: calc(100% - 50px)">
|
|
|
+ <t-option
|
|
|
+ value="PENDING"
|
|
|
+ label="大区预警待处理TOP10"
|
|
|
+ ></t-option>
|
|
|
+ <t-option
|
|
|
+ value="SLOWEST"
|
|
|
+ label="大区预警处理最慢TOP10"
|
|
|
+ ></t-option>
|
|
|
+ <t-option
|
|
|
+ value="FASTEST"
|
|
|
+ label="大区预警处理最快TOP10"
|
|
|
+ ></t-option>
|
|
|
+ </t-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card">
|
|
|
+ <div class="title">
|
|
|
+ <t-select v-model="sort3" style="width: calc(100% - 50px)">
|
|
|
+ <t-option
|
|
|
+ value="PENDING"
|
|
|
+ label="供应商预警待处理TOP10"
|
|
|
+ ></t-option>
|
|
|
+ <t-option
|
|
|
+ value="SLOWEST"
|
|
|
+ label="供应商预警处理最慢TOP10"
|
|
|
+ ></t-option>
|
|
|
+ <t-option
|
|
|
+ value="FASTEST"
|
|
|
+ label="供应商预警处理最快TOP10"
|
|
|
+ ></t-option>
|
|
|
+ </t-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col2">
|
|
|
+ <div class="card"></div>
|
|
|
+ <div class="card"></div>
|
|
|
+ </div>
|
|
|
+ <div class="col3">
|
|
|
+ <div class="card"></div>
|
|
|
+ <div class="card"></div>
|
|
|
+ <div class="card"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup name="DispatchAnalysis">
|
|
|
+import { ref, computed, watch } from 'vue';
|
|
|
+import SelectServiceUnit from '@/components/common/select-service-unit/index.vue';
|
|
|
+import TableLoop from '@/components/common/table-loop/index.vue';
|
|
|
+import { useRequest } from 'vue-request';
|
|
|
+import { sopServiceList, warningTop } from '@/api/report';
|
|
|
+const curTimeRange = ref([]);
|
|
|
+const serviceOptions = ref([]);
|
|
|
+
|
|
|
+const timeParams = computed(() => {
|
|
|
+ return {
|
|
|
+ startTime: new Date(curTimeRange.value[0]).getTime(),
|
|
|
+ endTime: new Date(curTimeRange.value[1]).getTime(),
|
|
|
+ };
|
|
|
+});
|
|
|
+const serviceId = ref('');
|
|
|
+const timeChange = (time) => {
|
|
|
+ sopServiceList(timeParams.value).then((res) => {
|
|
|
+ serviceOptions.value = res || [];
|
|
|
+ res?.length && (serviceId.value = res[0].id);
|
|
|
+ });
|
|
|
+};
|
|
|
+const sort1 = ref('PENDING');
|
|
|
+const sort2 = ref('PENDING');
|
|
|
+const sort3 = ref('PENDING');
|
|
|
+
|
|
|
+const { data: result1, loading: loading1, run: run1 } = useRequest(warningTop); //服务单元概览
|
|
|
+const tableDataHandle = (data) => {
|
|
|
+ return data || [];
|
|
|
+};
|
|
|
+watch(serviceId, (serviceId) => {
|
|
|
+ sort1.value = sort2.value = sort3.value = 'PENDING';
|
|
|
+ run1({
|
|
|
+ group: 'CRM',
|
|
|
+ serviceId,
|
|
|
+ sort: sort1.value,
|
|
|
+ });
|
|
|
+ run1({
|
|
|
+ group: 'REGION',
|
|
|
+ serviceId,
|
|
|
+ sort: sort1.value,
|
|
|
+ });
|
|
|
+ run1({
|
|
|
+ group: 'SUPPLIER',
|
|
|
+ serviceId,
|
|
|
+ sort: sort1.value,
|
|
|
+ });
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.sop-analysis {
|
|
|
+ .page-main {
|
|
|
+ height: calc(100vh - 57px);
|
|
|
+ padding: 15px;
|
|
|
+ overflow: auto;
|
|
|
+ .scroll-content {
|
|
|
+ height: 100%;
|
|
|
+ min-height: 600px;
|
|
|
+ min-width: 1000px;
|
|
|
+ display: flex;
|
|
|
+ .title {
|
|
|
+ height: 36px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .label {
|
|
|
+ color: #262626;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .chart-wrap {
|
|
|
+ height: calc(100% - 36px);
|
|
|
+ }
|
|
|
+ .col1,
|
|
|
+ .col3 {
|
|
|
+ width: 268px;
|
|
|
+ height: 100%;
|
|
|
+ .card {
|
|
|
+ height: calc((100% - 30px) / 3);
|
|
|
+ &:not(:first-child) {
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .col2 {
|
|
|
+ width: calc(100% - 566px);
|
|
|
+ margin-left: 15px;
|
|
|
+ margin-right: 15px;
|
|
|
+ .card {
|
|
|
+ &:first-child {
|
|
|
+ height: calc((100% - 30px) * 2 / 3 + 15px);
|
|
|
+ }
|
|
|
+ &:last-child {
|
|
|
+ height: calc((100% - 30px) / 3);
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .card {
|
|
|
+ padding: 4px 10px 10px 10px;
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid #e5e5e5;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|