fuliqi
2024-04-11 da81d1bd13bb180c9d1ee6d02df6d2036da30d86
考核结果
4个文件已修改
553 ■■■■ 已修改文件
src/views/system/calculate/order/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/platform/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/result/detail/detail.vue 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/result/detail/index1.vue 348 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/calculate/order/index.vue
@@ -82,6 +82,8 @@
      <div class="text item">考核分数<span class="time">{{ item.checkScore }}</span></div>
      <div class="text item">考核时间
        <span class="time">{{ item.checkTime }}</span>
        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1"  v-hasPermi="['result:contract:publish']">确认发布</el-button>
        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish == 1"  v-hasPermi="['result:contract:publish']">已发布</el-button>
      </div>
    </el-card>
@@ -430,7 +432,8 @@
      this.download('system/checkResult/export', {
        ...this.queryParams
      }, `checkResult_${new Date().getTime()}.xlsx`)
    }
    },
  }
};
</script>
src/views/system/platform/index.vue
@@ -21,10 +21,6 @@
              <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3>
              <p>异常数</p >
            </div>
            <div class="dashboard-item">
              <h3>{{ count.totalViews }}</h3>
              <p>生成异常工单数</p >
            </div>
          </div>
        </el-col>
      </el-row>
@@ -61,21 +57,7 @@
        />
        </el-select>
      </el-form-item>
       <el-form-item label="是否生成异常工单" prop="defaultOrder" label-width="130px">
         <el-select
           v-model="queryParams.status"
           placeholder="是否生成异常工单"
           clearable
           style="width: 170px"
         >
         <el-option
           v-for="dict in dict.type.platform_yes_no"
           :key="dict.value"
           :label="dict.label"
           :value="dict.value"
         />
         </el-select>
        </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -164,7 +146,7 @@
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
@@ -409,4 +391,4 @@
.dashboard-item {
  text-align: center;
}
</style>
</style>
src/views/system/result/detail/detail.vue
@@ -2,136 +2,10 @@
  <div class="app-container">
    <el-page-header @back="goBack" content="详情页面">
    </el-page-header>
    <el-container>
      <el-main style="padding-top: 0px">
        <h2>考核分数明细</h2>
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!--          <el-form-item label="考核对象" prop="ruleName">-->
<!--            <el-select-->
<!--              v-model="queryParams.address"-->
<!--              placeholder="请选择区域"-->
<!--              clearable-->
<!--            >-->
<!--              <el-option label="自贡市" value="自贡市"/>-->
<!--              <el-option label="沿滩区" value="沿滩区"/>-->
<!--              <el-option label="大安区" value="大安区"/>-->
<!--              <el-option label="贡井区" value="贡井区"/>-->
<!--              <el-option label="自流井区" value="自流井区"/>-->
<!--              <el-option label="高新区" value="高新区"/>-->
<!--              <el-option label="荣县" value="荣县"/>-->
<!--              <el-option label="富顺县" value="富顺县"/>-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item label="考核日期" prop="createTime">
            <div class="block">
              <el-date-picker
                v-model="value2"
                align="right"
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions">
              </el-date-picker>
            </div>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="mini"
              :disabled="single"
              @click="handleScoreUpdate"
            >修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="mini"
              :disabled="multiple"
              @click="handleDelete"
            >删除</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getScoreList"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="考核规则" align="center" prop="ruleId">
            <template slot-scope="scope">
              <div v-if="scope.row.ruleId == 5">一机一档注册率</div>
              <div v-else-if="scope.row.ruleId == 4">一机一档合格率</div>
              <div v-else-if="scope.row.ruleId == 3">平台在线率</div>
            </template>
          </el-table-column>
          <el-table-column label="考核对象" align="center" prop="unitName">
            <template slot-scope="scope">
              <div v-if="scope.row.unitName ==='成都x运维' ">成都x运维</div>
              <div v-else>自流井区</div>
            </template>
          </el-table-column>
          <el-table-column label="分值" align="center" prop="score" />
          <el-table-column label="考核时间" align="center" prop="createTime" />
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleScoreUpdate(scope.row)"
              >修改</el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="handleScoreDelete(scope.row)"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total>0"
          :total="scoreTotal"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getRuleList"
        />
      </el-main>
    </el-container>
    <el-container>
      <el-main>
        <h2>考核规则</h2>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="mini"
              :disabled="single"
              @click="handleRuleUpdate"
            >修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="mini"
              :disabled="multiple"
              @click="handleDelete"
            >删除</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="规则名称" align="center" prop="ruleName" />
@@ -167,40 +41,6 @@
    <el-container>
      <el-main>
        <h2>考核成绩</h2>
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!--          <el-form-item label="考核对象" prop="ruleName">-->
<!--            <el-select-->
<!--              v-model="queryParams.address"-->
<!--              placeholder="请选择区域"-->
<!--              clearable-->
<!--            >-->
<!--              <el-option label="自贡市" value="自贡市"/>-->
<!--              <el-option label="沿滩区" value="沿滩区"/>-->
<!--              <el-option label="大安区" value="大安区"/>-->
<!--              <el-option label="贡井区" value="贡井区"/>-->
<!--              <el-option label="自流井区" value="自流井区"/>-->
<!--              <el-option label="高新区" value="高新区"/>-->
<!--              <el-option label="荣县" value="荣县"/>-->
<!--              <el-option label="富顺县" value="富顺县"/>-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item label="考核日期" prop="createTime">
            <div class="block">
              <el-date-picker
                v-model="value2"
                align="right"
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions">
              </el-date-picker>
            </div>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
@@ -391,6 +231,8 @@
  dicts: ['platform_audit_state'],
  data() {
    return {
      activeIndex: '1',
      activeIndex2: '1',
      activeNames: ['1'],
      companyName: "成都x运维公司",
      detailTitle: '',
@@ -785,7 +627,10 @@
      this.download('system/checkResult/export', {
        ...this.queryParams
      }, `checkResult_${new Date().getTime()}.xlsx`)
    }
    },
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
  }
};
</script>
@@ -838,4 +683,13 @@
  flex-direction: row;
  justify-content: center;
}
.header-container {
  display: flex;
  align-items: center; /* 垂直居中 */
}
.header-container h2 {
  margin-right: 10px; /* 根据需要调整标题和菜单之间的间距 */
}
</style>
src/views/system/result/detail/index1.vue
@@ -1,39 +1,23 @@
<template>
  <div style="padding: 15px">
    <div style="display: flex;flex-direction: row;">
      <div class="now-item">
        <div class="box now">
          <div class="title">
            视频
  <div style="padding: 5px">
    <div>
      <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" style="margin-bottom: 10px">
        <el-menu-item index="1">省厅考核</el-menu-item>
        <el-menu-item index="2">区域考核</el-menu-item>
      </el-menu>
    </div>
    <div class="data-chart-container">
      <el-card class="data-card" :body-style="{ height: '100%' }">
        <div class="card-content">
          <div class="title-container">
            <h1>考核成绩</h1>
          </div>
          <div>
            98
          <div class="chart-container">
            <div id="chartContent" ref="chartContent"></div>
          </div>
        </div>
      </div>
      <div class="now-item">
        <div class="box now">
          <div class="title">
            人脸
          </div>
          <div>
            98
          </div>
        </div>
      </div>
      <div class="now-item">
        <div class="box now">
          <div class="title">
            监控
          </div>
          <div>
            98
          </div>
        </div>
      </div>
      <div style="justify-content: center;align-items: center;display: flex;width: 80px">
        <i class="el-icon-caret-left">本月</i>
      </div>
      </el-card>
    </div>
    <div style="margin-top: 35px">
@@ -41,38 +25,48 @@
        :data="tableData"
        style="width: 100%">
        <el-table-column
          label="月份"
          prop="month">
          label="考核时间"
          prop="time"
          align="center">
        </el-table-column>
        <el-table-column
          label="人脸"
          prop="renlian">
          label="标签"
          prop="tag"
          align="center">
        </el-table-column>
        <el-table-column
          label="视频"
          prop="shipin">
          label="考核类型"
          prop="category"
          align="center">
        </el-table-column>
        <el-table-column
          label="车辆"
          prop="cheliang">
          label="考核频率"
          prop="frequency"
          align="center">
        </el-table-column>
        <el-table-column
          align="right">
          <template slot="header" slot-scope="scope">
            <el-date-picker
              size="mini"
              style="width: 100%"
              v-model="searchForm.time"
              type="monthrange"
              range-separator="~"
              start-placeholder="开始月"
              end-placeholder="结束月">
            </el-date-picker>
          </template>
          label="分数"
          prop="score"
          align="center">
        </el-table-column>
        <el-table-column
          label="状态"
          prop="state"
          align="center">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.platform_examine_use" :value="scope.row.state"/>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button size="small" type="text"  v-show="scope.row.publish != 1">确认发布</el-button>
            <el-button size="small" type="text"  v-show="scope.row.publish == 1">取消发布</el-button>
            <el-button
              size="mini"
              @click="handleDetail(scope.$index, scope.row)">详情</el-button>
              type="text"
              icon="el-icon-view"
              @click="handleDetail(scope.row,scope.index)"
            >详细</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -86,7 +80,7 @@
        :page-sizes="[5, 10, 20]"
        :page-size="5"
        layout="total, sizes, prev, pager, next, jumper"
        :total="5">
        :total="4">
      </el-pagination>
    </div>
@@ -94,41 +88,65 @@
</template>
<script>
import * as echarts from 'echarts';
let lineChart = null;
let observer = null;
export default {
  name: 'index',
  dicts: ['platform_examine_use'],
  data() {
    return {
      activeIndex: '1',
      activeIndex2: '1',
      dateRange: '',
      company: '',
      dataList: [
        {
          name: '全部',
          complete: { '4.5': 95.5, '4.6': 95.3, '4.7': 96.0, '4.8': 97.2, '4.9': 96.5 ,
            '4.10': 95.5, '4.11': 95.3, '4.12': 96.0, '4.13': 97.2, '4.14': 96.5 },
          waiting: { '4.5': 94.8, '4.6': 91.3, '4.7': 95.3, '4.8': 92.3, '4.9': 93.3,
            '4.10': 94.8, '4.11': 91.3, '4.12': 95.3, '4.13': 92.3, '4.14': 93.3 },
          pending: { '4.5': 91.6, '4.6': 92.6, '4.7': 93.7, '4.8': 94.0, '4.9': 95.9
            ,'4.10': 91.6, '4.11': 92.6, '4.12': 93.7, '4.13': 94.0, '4.14': 95.9 }
        }
      ],
      tableData: [
        {
          renlian: 94,
          shipin: 89.5,
          cheliang: 92,
          month: "2024年3月"
          time: '2024-04-15',
          tag: '省厅考核',
          category: '车辆考核',
          frequency: '月度考核',
          score: '96.5',
          state: '0',
          publish: '0'
        },
        {
          renlian: 94,
          shipin: 89.5,
          cheliang: 92,
          month: "2024年2月"
          time: '2024-04-15',
          tag: '省厅考核',
          category: '人脸考核',
          frequency: '月度考核',
          score: '93.3',
          state: '0',
          publish: '0'
        },
        {
          renlian: 94,
          shipin: 89.5,
          cheliang: 92,
          month: "2024年1月"
          time: '2024-04-15',
          tag: '省厅考核',
          category: '视频考核',
          frequency: '月度考核',
          score: '95.9',
          state: '0',
          publish: '0'
        },
        {
          renlian: 94,
          shipin: 89.5,
          cheliang: 92,
          month: "2023年12月"
        },
        ,
        {
          renlian: 94,
          shipin: 89.5,
          cheliang: 92,
          month: "2023年11月"
          time: '2024-04-14',
          tag: '省厅考核',
          category: '车辆考核',
          frequency: '月度考核',
          score: '96.5',
          state: '1',
          publish: '1'
        },
      ],
      searchForm: {
@@ -137,6 +155,7 @@
    }
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
@@ -149,37 +168,162 @@
    },
    handleDelete(index, row) {
      console.log(index, row);
    },
    initChart() {
      const option = {
        legend: {
          right: 'right',
          top: 'top',
          icon: 'rect',
          orient: "vertical",
          data: [
            {
              name: '车辆考核',
              itemStyle: {
                color: 'rgba(62, 144, 247, 1)'
              }
            },
            {
              name: '人脸考核',
              itemStyle: {
                color: 'rgba(85, 192, 191, 1)'
              }
            },
            {
              name: '视频考核',
              itemStyle: {
                color: 'rgba(255, 165, 0, 1)'
              }
            },
          ],
        },
        grid: {
          left: 0,
          right: 0,
          bottom: 0,
          top: '20%',
          containLabel: true
        },
        tooltip: {},
        xAxis: {
          type: 'category',
          data: Object.keys(this.acitveData.complete),
        },
        yAxis: {
          min: 90,
        },
        series: [
          {
            name: '车辆考核',
            data: Object.entries(this.acitveData.complete).map(([key, value]) => value),
            type: 'line',
            itemStyle: {
              color: 'rgba(62, 144, 247, 1)'
            }
          },
          {
            name: '人脸考核',
            data: Object.entries(this.acitveData.waiting).map(([key, value]) => value),
            type: 'line',
            itemStyle: {
              color: 'rgba(85, 192, 191, 1)'
            }
          },
          {
            name: '视频考核',
            data: Object.entries(this.acitveData.pending).map(([key, value]) => value),
            type: 'line',
            itemStyle: {
              color: 'rgba(255, 165, 0, 1)'
            }
          }
        ]
      };
      lineChart.setOption(option, true);
    },
    // 监听变化
    observe() {
      if (!observer) {
        observer = new ResizeObserver(entries => {
          this.handleResize();
        })
      }
      observer.observe(this.$refs.chartContent);
    },
    // 窗口变换
    handleResize() {
      if (lineChart) {
        lineChart.resize();
      }
    }
  },
  mounted() {
    this.acitveData = this.dataList[0];
    this.company = this.acitveData.name;
    lineChart = echarts.init(this.$refs.chartContent);
    this.initChart();
    this.observe();
  },
  beforeDestroy() {
    if (lineChart) {
      lineChart.dispose();
      observer.unobserve(this.$refs.chartContent);
    }
  },
  handleSelect(key, keyPath) {
    console.log(key, keyPath);
  },
}
</script>
<style scoped>
.now-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.now {
  /*background-color: #42b983;*/
  height: 80px !important;
}
.box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px hsla(0, 0%, 7%, .1);
  border-radius: 10px;
  width: 240px;
  height: 50px;
}
.box:hover{
  cursor: pointer;
<style lang="scss" scoped>
.data-chart-container {
  height: 400px;
  margin-bottom: 20px;
  .data-card {
    height: 100%;
    .card-content {
      width: 100%;
      height: 100%;
      position: relative;
    }
  }
}
.title {
  font-size: larger;
.title-container {
  position: absolute;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  .more-button {
    cursor: pointer;
    font-size: 16px;
    padding: 0 10px;
  }
}
.chart-container {
  width: 100%;
  height: 100%;
  #chartContent {
    width: 100%;
    height: 100%;
  }
}
.select-container {
  margin: 0 20px;
  width: 180px;
}
</style>