xiangpei
2024-04-28 a8d27205b3971fd23b7ea64815a0dd6939702a44
Merge remote-tracking branch 'origin/master'
8个文件已修改
804 ■■■■■ 已修改文件
src/api/platform/calculate-money-rule.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/platform/check-score.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ImagePreview/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/contract/index.vue 188 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/report/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/result/detail/detail.vue 511 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/result/detail/index1.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/platform/calculate-money-rule.js
@@ -9,6 +9,14 @@
  })
}
// 根据合同id查询违约规则列表
export function getMoneyRulesByContractId(data) {
  return request({
    url: '/system/contract/selectMoneyRules?contractId=' + data,
    method: 'get'
  })
}
// 查询核算规则详细
export function getRule(id) {
  return request({
src/api/platform/check-score.js
@@ -1,6 +1,6 @@
import request from '@/utils/request'
// 查询考核积分明细列表
// 查询考核积分卡片列表
export function listScore(query) {
  return request({
    url: '/check/score/list',
@@ -8,11 +8,19 @@
    params: query
  })
}
// 查询考核积分明细列表
export function detailScore(query) {
  return request({
    url: '/check/score/detail',
    method: 'get',
    params: query
  })
}
// 查询考核积分明细详细
export function getScore(id) {
export function getScoreIndex(id) {
  return request({
    url: '/check/score/' + id,
    url: '/check/score/detail/' + id,
    method: 'get'
  })
}
@@ -35,7 +43,7 @@
  })
}
// 修改考核积分明细
// 发布考核积分
export function publishScore(data) {
  return request({
    url: '/check/score/publish',
src/components/ImagePreview/index.vue
@@ -13,7 +13,7 @@
<script>
import { isExternal } from "@/utils/validate";
const DEFAULT_IMAGE = 'https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357';
export default {
  name: "ImagePreview",
  props: {
@@ -33,7 +33,7 @@
  computed: {
    realSrc() {
      if (!this.src) {
        return;
        return DEFAULT_IMAGE;
      }
      let real_src = this.src.split(",")[0];
      if (isExternal(real_src)) {
@@ -43,7 +43,7 @@
    },
    realSrcList() {
      if (!this.src) {
        return;
        return [DEFAULT_IMAGE];
      }
      let real_src_list = this.src.split(",");
      let srcList = [];
src/views/system/contract/index.vue
@@ -1,12 +1,11 @@
<template>
  <div class="app-container">
    <el-row>
      <el-col :span="8" v-for="(item) in contractList" :key="item" style="margin: 10px;width: 30%;">
    <el-row v-loading="loading">
      <el-col :span="8" v-for="(item, index) in contractList" :key="index" style="margin: 10px;width: 30%;">
        <el-card :body-style="{ padding: '0px' }">
          <el-image style="width: 420px;height: 187px;"
            :preview-src-list="['https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357']"
            fit="cover" src="https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357"
          <ImagePreview style="width: 100%;height: 187px;"
            fit="cover" :src="item.attachment"
            class="image" />
          <div style="padding: 14px;">
            <span>{{ item.name }}</span>
@@ -30,14 +29,26 @@
    <!-- 合同详情 -->
    <el-dialog :title="detailName" :visible.sync="detail" width="800px" append-to-body>
      <el-form label-position="left" inline class="table-expand">
        <el-collapse v-model="activeNames" @change="handleChange">
        <el-collapse v-model="activeNames">
          <el-collapse-item  v-for="(item, index) in ruleData" :key="index" :title="item.ruleName" :name="index">
            <div class="inline-input-container" v-for="(item, index) in item.children" :key="index">
              <b>{{ item.ruleDesc }}</b> <br v-if="item.ruleDesc"/>
              <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory + ' ' + item.calcFraction + (item.calcUnit ? '/' + item.calcUnit : '')" placement="top">
              <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory == '分数乘以数量' ? '扣' + item.calcFraction  + '乘以数量 ' : item.deductCategory == '除以数量后乘以分数' ? '扣' + item.calcFraction + '分/' +  item.calcUnit + '小时' : item.deductCategory + ' ' + item.calcFraction" placement="top">
                <span>{{ item.ruleCondition }}<br/></span>
                <!-- {{ item.deductCategory }} {{ item.calcFraction }}{{ item.calcUnit ? "/" + item.calcUnit : ''  }} -->
            </el-tooltip>
            </div>
          </el-collapse-item>
          <el-collapse-item title="考核结果应用规则" :name="ruleData.length">
            <div class="inline-input-container">
                <span v-for="(item, index) in moneyRules" :key="index">
                    <div>
                      <span>{{ item.scoreCondition }}</span>
                      <el-tooltip class="item" effect="dark" :content="item.description" placement="top">
                        <span style="margin-left: 20px;">{{ item.description }}</span>
                      </el-tooltip>
                    </div>
                </span>
            </div>
          </el-collapse-item>
          <el-form-item label="合同附件" prop="attachment" class="top">
@@ -52,35 +63,70 @@
    </el-dialog>
    <!-- 合同导入对话框 -->
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="550px" append-to-body>
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="1000px" append-to-body>
      <el-form ref="form" :model="upload" :rules="rules" label-width="80px">
        <el-form-item label="合同名称" prop="name">
          <el-input v-model="upload.name" />
        </el-form-item>
        <el-form-item label="公司名称" prop="unitId">
          <el-select v-model="upload.unitId" placeholder="请选择">
            <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="合同时间" prop="timezone">
          <el-date-picker :disabled="title === '修改合同时间'" @change="dateChange" v-model="upload.timezone"
            value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" align="right" unlink-panels range-separator="至"
            start-placeholder="开始时间" end-placeholder="结束时间">
          </el-date-picker>
        </el-form-item>
      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
        :action="upload.url + '?unitId=' + upload.unitId + '&startTime=' + upload.startTime + '&endTime=' + upload.endTime + '&name=' + upload.name"
        :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
        :auto-upload="false" drag style="text-align: center;">
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
            @click="importTemplate">下载模板</el-link>
        <el-divider content-position="left">合同信息</el-divider>
        <div class="row-warp">
          <div class="row">
            <div class="row-left">
              <div class="block">
                <el-form-item label="合同名称" prop="name">
                  <el-input v-model="upload.name" />
                </el-form-item>
                <el-form-item label="公司名称" prop="unitId">
                  <el-select v-model="upload.unitId" placeholder="请选择">
                    <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="合同时间" prop="timezone">
                  <el-date-picker :disabled="title === '修改合同时间'" @change="dateChange" v-model="upload.timezone"
                    value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" align="right" unlink-panels range-separator="至"
                    start-placeholder="开始时间" end-placeholder="结束时间">
                  </el-date-picker>
                </el-form-item>
              </div>
            </div>
            <div class="row-right" style="margin-left: 80px;">
              <div class="margin-5">
                <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
                  :action="upload.url"
                  :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
                  :data="upload"
                  :auto-upload="false" drag style="text-align: center;">
                  <i class="el-icon-upload"></i>
                  <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
                  <div class="el-upload__tip text-center" slot="tip">
                    <span>仅允许导入xls、xlsx格式文件。</span>
                    <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
                      @click="importTemplate">下载模板</el-link>
                  </div>
                </el-upload>
              </div>
            </div>
          </div>
        </div>
      </el-upload>
        <el-divider content-position="left">考核结果应用规则</el-divider>
        <div class="row-warp">
          <div class="row" v-for="(item, index) in upload.ruleList" :key="index">
            <div class="row-left" style="flex: 0.7;">
              <div class="block">
                <el-form-item label="考核条件" prop="ruleList">
                  <el-input v-model="item.scoreCondition" style="width: 250px;" />
                </el-form-item>
              </div>
            </div>
            <div class="row-right">
              <div class="margin-5">
                <el-form-item label="规则描述" prop="ruleList">
                  <el-input type="textarea" v-model="item.description" style="width: 300px;" />
                  <el-button style="margin-left: 50px;" type="danger" icon="el-icon-delete" circle @click="deleteRule(index)"></el-button>
                </el-form-item>
              </div>
            </div>
          </div>
        </div>
        <el-button style="margin-left: 50px;" type="success" icon="el-icon-plus" circle @click="addRule"></el-button>
    </el-form>
      <div slot="footer" class="dialog-footer">
@@ -95,14 +141,18 @@
<script>
import { listContract, getContract, updateContract } from "@/api/platform/contract";
import { getRuleListByContractId } from "../../../api/platform/calculate-rule";
import { getMoneyRulesByContractId } from "../../../api/platform/calculate-money-rule";
import { unitSelect } from "../../../api/platform/unit";
import { deptSelect } from "../../../api/system/dept";
import { getToken } from "@/utils/auth";
import { ImagePreview } from "@/components/ImagePreview";
export default {
  name: "Contract",
  comments: { ImagePreview },
  data() {
    return {
      loading: false,
      contractInfo: {},
      // 合同导入参数
      upload: {
@@ -116,6 +166,7 @@
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/system/contract/importData",
        ruleList: [],
        unitId: '',
        startTime: '',
        endTime: ''
@@ -154,6 +205,7 @@
      // 是否显示详情
      detail: false,
      ruleData: [],
      moneyRules: [],
      // 表单参数
      form: {
      },
@@ -167,6 +219,9 @@
        ],
        timezone: [
          { type: "array", required: true, message: "合同时间不能为空", trigger: "change" }
        ],
        ruleList: [
          { type: "array", required: true, message: "考核结果应用规则不能为空", trigger: "submit" }
        ]
      }
    };
@@ -177,6 +232,15 @@
    this.selectDept();
  },
  methods: {
    addRule() {
      this.upload.ruleList.push({
        scoreCondition: '',
        description: ''
      });
    },
    deleteRule(index) {
      this.upload.ruleList.splice(index, 1);
    },
    submitForm() {
      updateContract(this.form).then(response => {
        this.detail = false;
@@ -218,7 +282,13 @@
      let that = this;
      this.$refs["form"].validate(valid => {
        if (valid) {
          that.$refs.upload.submit();
          that.upload.ruleList = JSON.stringify(this.upload.ruleList);
          that.loading = true;
          that.upload.open = false;
          that.$refs.upload.submit().then(() => {
            that.loading = false;
            that.reset();
          });
        }
      })
    },
@@ -262,6 +332,9 @@
        this.form.id = item.id;
        this.contractInfo = item;
      });
      getMoneyRulesByContractId(item.id).then(response => {
        this.moneyRules = response.data;
      });
    },
    /** 新增按钮操作 */
    handleAdd() {
@@ -288,6 +361,16 @@
    /** 下载按钮操作 */
    handleDownload (data) {
      this.$download.resource(data);
    },
    reset () {
      this.upload = {
        open: false,
        name: undefined,
        unitId: undefined,
        timezone: undefined,
        ruleList: []
      };
      this.resetForm("form");
    }
  }
};
@@ -346,3 +429,38 @@
  margin-top: 10px;
}
</style>
<style scoped>
.margin-5 {
  margin-left: 5px;
}
.row-warp {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 5px 0;
}
.row-left {
  flex: 1;
  display: flex;
  flex-direction: row;
}
.row-right {
  flex: 1;
  display: flex;
  flex-direction: row;
}
</style>
<style>
.el-cascader-node {
  max-width: 300px;
}
.el-divider--horizontal {
  margin-top: 50px;
  margin-bottom: 50px;
}
</style>
src/views/system/report/index.vue
@@ -60,7 +60,8 @@
            <div class="info-item">
              <div class="info-label">上报材料</div>
              <div class="info-list">
                <div class="list-item" v-for="file in formatFileList(scope.row.reportMaterials)" :key="file" @click="showFile(file)">
                <div class="list-item" v-for="file in formatFileList(scope.row.reportMaterials)" :key="file"
                  @click="showFile(file)">
                  <div class="item-icon">
                    <i class="el-icon-document"></i>
                  </div>
@@ -141,7 +142,7 @@
          <editor v-model="form.reportContent" :min-height="192" />
        </el-form-item>
        <el-form-item label="上报材料" prop="reportMaterials">
          <file-upload v-model="form.reportMaterials" />
          <file-upload v-model="form.reportMaterials" :fileType='fileType' />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -211,6 +212,8 @@
  name: "Report",
  data() {
    return {
      fileType: ["doc", "xls", "xlsx", "ppt", "txt", "pdf", "png", "jpg"],
      // 点位list
      pointList: [],
      // 遮罩层
src/views/system/result/detail/detail.vue
@@ -6,10 +6,10 @@
    <el-container>
      <el-main>
        <h2>考核规则</h2>
        <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange">
        <el-table v-loading="loading" :data="checkRuleList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="规则名称" align="center" prop="ruleName" />
          <el-table-column label="规则权重" align="center" prop="ruleWeight" />
          <el-table-column label="规则名称" align="center" prop="checkRuleName" />
          <el-table-column label="规则权重" align="center" prop="weight" />
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
@@ -47,37 +47,37 @@
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="checkResultList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="考核日期" align="center" prop="date" width="120px" fixed/>
          <el-table-column label="考核对象" align="center" prop="target" width="120px"/>
          <el-table-column label="平台在线率(权重:0.5)" align="center" prop="platformOnline" width="120px"/>
          <el-table-column label="一机一档合格率(权重:0.5)" align="center" prop="monitorQualification" width="120px"/>
          <el-table-column label="一机一档注册率(权重:0.5)" align="center" prop="monitorRegistration" width="120px"/>
          <el-table-column label="档案考核比(权重:0.5)" align="center" prop="archivesRate" width="120px"/>
          <el-table-column label="点位在线率(权重:1)" align="center" prop="siteOnline" width="120px"/>
          <el-table-column label="录像可用率(权重:1)" align="center" prop="videoAvailable" width="120px"/>
          <el-table-column label="标注正确率(权重:0.5)" align="center" prop="annotationAccuracy" width="120px"/>
          <el-table-column label="校时正确率(权重:0.5)" align="center" prop="timingAccuracy" width="120px"/>
          <el-table-column label="重点点位在线率(权重:0.5)" align="center" prop="keySiteOnline" width="120px"/>
          <el-table-column label="重点点位录像可用率(权重:0.5)" align="center" prop="keyVideoAvailable" width="120px"/>
          <el-table-column label="重点点位标注正确率(权重:0.5)" align="center" prop="keyAnnotationAccuracy" width="120px"/>
          <el-table-column label="重点点位按时正确率(权重:0.5)" align="center" prop="keyTimingAccuracy" width="120px"/>
          <el-table-column label="重点指挥图像公安部巡检结果(权重:0.2)" align="center" prop="keyCommandImageInspection" width="120px"/>
          <el-table-column label="重点指挥图像目录树(权重:0.8)" align="center" prop="keyCommandImageDirectoryTree" width="120px"/>
          <el-table-column label="在线检查平台部署及运行率(权重:0.075)" align="center" prop="onlineInspectionPlatform" width="120px"/>
          <el-table-column label="视频传输网资产准确率(权重:0.075)" align="center" prop="videoTransmissionAssetsAccuracy" width="120px"/>
          <el-table-column label="视频传输网资产弱口令得分比例(权重:0.075)" align="center" prop="videoTransmissionAssetsWeakPasswordScore" width="120px"/>
          <el-table-column label="视频传输网危险资产得分比重(权重:0.075)" align="center" prop="videoTransmissionDangerousAssetsScore" width="120px"/>
          <el-table-column label="视频传输网边界完整性检测扣分项(权重:0.2)" align="center" prop="videoTransmissionBoundaryIntegrityDetection" width="120px"/>
          <el-table-column label="月运行率" align="center" prop="operatingRate"/>
        <el-table  v-loading="loading" :data="dataMap" @selection-change="handleSelectionChange">
          <el-table-column label="考核日期" align="center" prop="create_time" width="120px" fixed>
            <template slot-scope="scope">
              <span>{{ scope.row.create_time.split('T')[0] }}</span>
            </template>
          </el-table-column>
          <el-table-column label="考核对象" align="center" prop="dept_id" width="120px" fixed>
            <template slot-scope="scope">
              <span>{{ translateDeptId(scope.row.dept_id) }}</span>
            </template>
          </el-table-column>
          <template v-for="item in tableData">
            <el-table-column
              :key="item.ruleName"
              :label="item.ruleName"
              align="center"
              width = "120px"
            >
              <template slot-scope="scope">
                <span>{{ scope.row[item.ruleIndex] }}</span>
              </template>
            </el-table-column>
          </template>
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  fixed="right">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row,scope.index)"
                @click="handleIndexUpdate(scope.row,scope.index)"
              >修改</el-button>
            </template>
          </el-table-column>
@@ -85,56 +85,14 @@
      </el-main>
    </el-container>
    <!-- 添加或修改考核规则对话框 -->
    <!-- 修改考核权重对话框 -->
    <el-dialog :title="title" :visible.sync="ruleOpen" width="600px" append-to-body>
      <el-form ref="form" :model="ruleForm" :rules="rules" label-width="80px">
        <el-form-item label="规则名称" prop="ruleName">
          <el-input v-model="ruleForm.ruleName" placeholder="请输入规则名称" />
        <el-form-item label="规则名称" prop="checkRuleName">
          <el-input v-model="ruleForm.checkRuleName" placeholder="请输入规则名称" disabled/>
        </el-form-item>
        <el-form-item label="规则类型" prop="category">
          <el-select v-model="ruleForm.category" placeholder="规则类型">
            <el-option
              v-for="item in categoryList"
              :key="item.id"
              :label="item.value"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="规则描述" prop="ruleDetail">
          <el-input v-model="ruleForm.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="请输入规则描述"/>
        </el-form-item>
        <el-form-item label="参数配置" prop="ruleDetail">
          <div class="row-warp">
            <div class="row">
              <div class="row-left">参数名</div>
              <div class="row-right">条件</div>
            </div>
            <div class="row">
              <div class="row-left">天网视频点位数</div>
              <div class="row-right">
                <div>不少于</div>
                <div>
                  <el-input class="input-w" type="number" v-model="ruleForm.videoPointNum"/>{{" %"}}
                </div>
              </div>
            </div>
            <div class="row">
              <div class="row-left">车辆卡口点位数</div>
              <div class="row-right">
                <div>不少于</div>
                <div><el-input class="input-w" type="number" v-model="ruleForm.vehicleCheckpointNum"/></div>{{" %"}}
              </div>
            </div>
            <div class="row">
              <div class="row-left">人脸卡口点位数</div>
              <div class="row-right">
                <div>不少于</div>
                <div>
                  <el-input class="input-w" type="number" v-model="ruleForm.faceChceckpointNum" /></div>{{" %"}}
              </div>
            </div>
          </div>
        <el-form-item label="规则权重" prop="weight">
          <el-input-number v-model="ruleForm.weight" :precision="1" placeholder="请输入规则权重" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -143,76 +101,22 @@
      </div>
    </el-dialog>
    <!-- 规则详情 -->
    <el-dialog title="规则详情" :visible.sync="ruleDetailOpen" width="50%" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="规则名称" prop="ruleName">
          <el-input class="input" disabled v-model="form.ruleName" placeholder="请输入规则名称" />
        </el-form-item>
        <el-form-item label="运维公司" prop="companyName">
          <el-input class="input" disabled :value ="companyName" placeholder="请输入运维公司名称"></el-input>
        </el-form-item>
        <el-form-item label="规则描述" prop="ruleDesc">
          <el-input class="input" disabled v-model="form.ruleDesc" placeholder="请输入规则描述" />
        </el-form-item>
        <el-form-item label="规则设置">
          <div >
            <div class="line">
              <div class="line-left">时钟同步(超过±3秒为不合格)24小时内未修复的:扣除相关镜头数量*</div>
              <div class="line-right"><el-input disabled v-model="jsonRule.overTime" type="text"/></div>分
            </div>
            <div class="line">
              <div class="line-left">OSD标识不满足《GAT 751-2008 视频图像文字标注规范》,24小时内未修复的:标扣除相关镜头数量*</div>
              <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>分
            </div>
            <div class="line">
              <div class="line-left">用户抽检,一机一档数据项不合格(提供虚假数据或错误数据为不合格),24小时内未修复的:扣除相关镜头数量*</div>
              <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>分
            </div>
          </div>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">关闭</el-button>
      </div>
    </el-dialog>
    <!-- 修改考核指标对话框 -->
    <el-dialog :title="title" :visible.sync="indexOpen" width="600px" append-to-body>
      <el-form ref="form" :model="indexForm" :rules="rules" label-width="150px">
        <el-form-item label="考核日期" prop="create_time">
          <el-input v-model="ruleForm.create_time" placeholder="请输入规则名称" disabled>
    <!-- 添加或修改考核计分对话框 -->
    <el-dialog :title="title" :visible.sync="scoreOpen" width="500px" append-to-body>
      <el-form ref="form" :model="scoreForm" :rules="rules" label-width="80px">
        <el-form-item label="分值" prop="score">
          <el-input v-model="scoreForm.score" placeholder="请输入分值" />
          </el-input>
        </el-form-item>
        <el-form-item label="考核名" prop="examineId">
          <el-select v-model="scoreForm.examineId" placeholder="请选择">
            <el-option
              v-for="item in examineList"
              :key="item.id"
              :label="item.value"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="考核对象" prop="unitId">
          <el-select v-model="scoreForm.unitId" placeholder="请选择">
            <el-option
              v-for="item in unitList"
              :key="item.id"
              :label="item.value"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="考核规则" prop="ruleCategory">
          <el-select v-model="scoreForm.ruleCategory" placeholder="请选择">
            <el-option
              v-for="item in ruleCategoryList"
              :key="item.id"
              :label="item.value"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
<!--        <el-form-item label="考核对象" prop="checkRuleName">-->
<!--          <el-input v-model="ruleForm.checkRuleName" placeholder="请输入规则名称" disabled/>-->
<!--        </el-form-item>-->
        <div v-for="item in tableData" :key="item.ruleIndex">
          <el-form-item :label="item.ruleName" :prop="item.ruleIndex">
            <el-input-number v-model="indexForm[item.ruleIndex]" :precision="4" placeholder="请输入指标"></el-input-number>
          </el-form-item>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -224,59 +128,20 @@
<script>
import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result";
import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule";
import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/check-score";
import {unitSelect} from "@/api/platform/unit";
import {publishSelect} from "@/api/platform/check-publish";
import { listScore, getScoreIndex, delScore, addScore, updateScore } from "@/api/platform/check-score";
import { areaSelect } from '@/api/system/dept'
export default {
  name: "CheckResult",
  dicts: ['platform_audit_state'],
  data() {
    return {
      activeIndex: '1',
      activeIndex2: '1',
      activeNames: ['1'],
      companyName: "成都x运维公司",
      detailTitle: '',
      detailOpen: false,
      detail:{
      },
      examineList: [],
      unitList: [
        {id:2,value: '成都x运维'},
        {id:3,value: '自流井区'},
      ],
      ruleCategoryList: [
        { id: 1, value: '视频在线率' },
        { id: 2, value: '存储故障' },
        { id: 3, value: '视图库对接稳定性' },
        { id: 4, value: '一机一档24小时未修复' },
        { id: 5, value: '时钟不同步24小时未修复' },
      ],
      tableData: [{
        name: '视频平均在线率',
        content: '97%',
        score: '-5'
      }, {
        name: '一机一档24小时未修复',
        content: '5个',
        score: '-0.5'
      }, {
        name: '存储故障',
        content: '5小时',
        score: '-0.3'
      }, {
        name: '时钟不同步24小时未修复',
        content: '3个',
        score: '-0.5'
      }],
      // 运维类型
      categoryList: [
        { id: 1, value: '视频监控' },
        { id: 2, value: '车辆识别' },
        { id: 3, value: '人脸识别' },
      ],
      id: null,
      examineTag: null,
      deptId: null,
      areaList:[],
      tableData: [],
      dataMap: [],
      manualScoreOpen: false,
      manualScoreForm: {},
      manualScoreTitle: '',
@@ -293,223 +158,72 @@
      // 总条数
      total: 0,
      // 考核结果表格数据
      checkResultList: [
        {
          date: '2024-04-02',
          target: '自流井区',
          platformOnline: '97%',
          monitorQualification: '97%',
          monitorRegistration: '97%',
          archivesRate: '97%',
          siteOnline: '97%',
          videoAvailable: '97%',
          annotationAccuracy: '97%',
          timingAccuracy: '97%',
          keySiteOnline: '97%',
          keyVideoAvailable: '97%',
          keyAnnotationAccuracy: '97%',
          keyTimingAccuracy: '97%',
          keyCommandImageInspection: '97%',
          keyCommandImageDirectoryTree: '97%',
          onlineInspectionPlatform: '97%',
          videoTransmissionAssetsAccuracy: '97%',
          videoTransmissionAssetsWeakPasswordScore: '97%',
          videoTransmissionDangerousAssetsScore: '97%',
          videoTransmissionBoundaryIntegrityDetection: '97%',
          operatingRate: '97%',
        },
        {
          date: '2024-04-03',
          target: '自流井区',
          platformOnline: '97%',
          monitorQualification: '97%',
          monitorRegistration: '97%',
          archivesRate: '97%',
          siteOnline: '97%',
          videoAvailable: '97%',
          annotationAccuracy: '97%',
          timingAccuracy: '97%',
          keySiteOnline: '97%',
          keyVideoAvailable: '97%',
          keyAnnotationAccuracy: '97%',
          keyTimingAccuracy: '97%',
          keyCommandImageInspection: '97%',
          keyCommandImageDirectoryTree: '97%',
          onlineInspectionPlatform: '97%',
          videoTransmissionAssetsAccuracy: '97%',
          videoTransmissionAssetsWeakPasswordScore: '97%',
          videoTransmissionDangerousAssetsScore: '97%',
          videoTransmissionBoundaryIntegrityDetection: '97%',
          operatingRate: '97%',
        }
      ],
      checkRuleList: [],
      scoreTotal: 3,
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      scoreOpen: false,
      ruleOpen: false,
      ruleDetailOpen: false,
      indexOpen: false,
      // 逻辑删除时间范围
      daterangeCheckTime: [],
      // 表单参数
      form: {},
      scoreForm: {},
      indexForm: {},
      ruleForm: {},
      jsonRule: {},
      // 考核规则列表
      ruleList: [
        {ruleName: '平台在线率',ruleWeight: 0.5},
        {ruleName: '一机一档合格率',ruleWeight: 0.5},
        {ruleName: '一机一档在线率',ruleWeight: 0.5},
      ],
      // 考核计分表格数据
      scoreList: [],
      //违约规则请求参数
      //请求参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        ruleName: null,
        ruleStatus: null,
        createTime: null,
        id: null,
      },
      //考核分数请求参数
      scoreQueryParams: {
        pageNum: 1,
        pageSize: 10,
        examineCategory: 2,
      },
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
        },
        shortcuts: [{
          text: '今天',
          onClick(picker) {
            picker.$emit('pick', new Date());
          }
        }, {
          text: '昨天',
          onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24);
            picker.$emit('pick', date);
          }
        }, {
          text: '一周前',
          onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', date);
          }
        }]
      },
      value1: '',
      value2: '',
      // 表单校验
      rules: {
      }
      rules: {}
    };
  },
  created() {
    //考核成绩详情跳转参数接收
    if(this.$route.query.detail){
      this.detail = this.$route.query.detail
      console.log(this.$route.query.detail,"detail------------")
    if(this.$route.query.id){
      this.id = this.$route.query.id
    }
    // 考核规则列表
    // this.getRuleList();
    // 考核积分列表
    this.getScoreList();
    // this.selectUnit();
    this.selectExamine();
    this.getList();
    this.areaSelect();
  },
  methods: {
    handleChange(val) {
      console.log(val);
    },
    // 运维公司下拉数据
    // selectUnit() {
    //   unitSelect().then(res => {
    //     this.unitList = res.data;
    //   })
    // },
    // 考核下拉数据
    selectExamine() {
      publishSelect().then(res => {
        this.examineList = res.data;
      })
    },
    /** 查询考核计分列表 */
    getScoreList() {
    getList() {
      this.loading = true;
      listScore(this.scoreQueryParams).then(response => {
        this.scoreList = response.rows;
        this.loading = false;
      });
    },
    /** 查询违约规则列表 */
    getRuleList() {
      this.loading = true;
      if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
        this.queryParams["start"] = this.daterangeCreateTime[0];
        this.queryParams["end"] = this.daterangeCreateTime[1];
      }
      listCheckRule(this.queryParams).then(response => {
        this.ruleList = response.data;
        this.total = response.total;
        this.loading = false;
      });
    },
    frequencyFormatter(row) {
      if (row.frequency === "1") {
        return "月度考核"
      }
      if (row.frequency === "2") {
        return "季度考核"
      }
    },
    examineRangeFormatter(row) {
      if (row.examineRange === "1") {
        return "分局考核"
      }
      if (row.examineRange === "2") {
        return "市局考核"
      }
    },
    /** 查询考核结果列表 */
    getCheckResult() {
      this.loading = true;
      getCheckResult(id).then(response => {
        this.detail = response.data;
      getScoreIndex(this.id).then(response => {
        this.checkRuleList = response.data.checkRuleList;
        this.dataMap = response.data.scoreMap.dataMap;
        this.tableData = response.data.scoreMap.tableData
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.scoreOpen = false;
      this.ruleOpen = false;
      this.ruleDetailOpen = false;
      this.ruleDetailOpen = false;
      this.reset();
      this.indexOpen = false;
      this.reset("ruleForm");
      this.reset("indexForm");
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        checkUnitId: null,
        checkPublishId: null,
        checkScore: null,
        systemScore: null,
        manualScore: null,
        checkTime: null,
        createTime: null,
        updateTime: null,
        deleted: null
    reset(formName) {
      this.ruleForm = {
        checkRuleName: null,
        weight: null,
      };
      this.resetForm("form");
      this.indexForm = {
      };
      this.resetForm(formName);
    },
    translateDeptId(deptId) {
      const department = this.areaList.find(dept => dept.id == deptId);
      return department ? department.value : '未知';
    },
    // 区域下拉数据
    areaSelect() {
      areaSelect().then(res => {
        this.areaList = res.data;
      })
    },
    cancelManualScore() {
      this.manualScoreForm = {};
@@ -534,20 +248,8 @@
      this.manualScoreOpen = true;
    },
    handlePublish(row) {
      let text = row.publish == 1 ? '取消发布' : '发布';
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认' + text + '考核结果编号为"' + ids + '"的数据项?').then(function() {
        return publishCheckResult(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess(text + "成功");
      }).catch(() => {});
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
@@ -568,32 +270,19 @@
      this.open = true;
      this.title = "添加考核结果";
    },
    /** 修改积分按钮操作 */
    handleScoreUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getScore(id).then(response => {
        this.scoreForm = response.data;
        this.scoreOpen = true;
        this.title = "修改考核计分";
      });
    /** 修改指标按钮操作 */
    handleIndexUpdate(row) {
      this.reset("indexForm");
      this.indexForm = row;
      this.indexOpen = true;
      this.title = "修改考核指标";
    },
    /** 修改按钮操作 */
    handleRuleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getCheckRule(id).then(response => {
        this.ruleForm = response.data;
        this.ruleOpen = true;
        this.title = "修改考核规则";
      });
    },
    // 详情按钮
    handleRuleDetail(row) {
      this.ruleDetailOpen = true;
      this.form = row;
      this.jsonRule = JSON.parse(this.form.ruleDetail);
      this.reset("ruleForm");
      this.ruleForm = row;
      this.ruleOpen = true;
      this.title = "修改考核规则";
    },
    /** 提交按钮 */
    submitForm() {
src/views/system/result/detail/index1.vue
@@ -26,8 +26,8 @@
      </el-card>
    </div>
    <div style="margin-top: 35px">
      <el-table :data="tableData" style="width: 100%" v-loading="loading">
    <div style="margin-top: 35px;margin-bottom: 35px">
      <el-table :data="tableData" style="width: 100%" v-loading="tableLoading">
        <el-table-column label="考核时间" prop="createTime" align="center">
        </el-table-column>
        <el-table-column label="考核对象" prop="deptId" align="center">
@@ -55,27 +55,22 @@
          <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" type="text" icon="el-icon-view"
              @click="handleDetail(scope.row, scope.index)">详细</el-button>
            <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row.id)">详细</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div style="text-align: right; margin-top: 10px">
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
        :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50]" :page-size="queryParams.pageSize"
        layout="total, sizes, prev, pager, next, jumper" :total="tableData.length">
      </el-pagination>
      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
        @pagination="getList" />
    </div>
  </div>
</template>
<script>
import { listScore, getScore, delScore, addScore, updateScore, publishScore } from "@/api/platform/check-score";
import { listScore, getScore, delScore, addScore, updateScore, publishScore, detailScore } from "@/api/platform/check-score";
import { areaSelect } from '@/api/system/dept';
import { mapState } from 'vuex';
import * as echarts from 'echarts';
let lineChart = null;
let observer = null;
@@ -88,14 +83,17 @@
      areaList: [],
      date: '',
      dateRange: '',
      // 总条数
      total: 0,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        deptId: null,
        examinTag:0
        examineTag: 0
      },
      tableData: [],
      loading: false,
      tableLoading: false,
      searchForm: {
        time: null,
      }
@@ -113,6 +111,7 @@
    this.date = year + '-' + month;
    this.queryParams.date = this.date;
    this.areaSelect();
    this.getList(this.$route.query.index);
  },
  computed: {
@@ -131,17 +130,26 @@
    /** 导航切换 */
    handleSelect(key) {
      this.activeIndex = key;
      this.queryParams.examinTag = key;
      this.queryParams.examineTag = key;
      this.getChart(this.queryParams.deptId);
      this.getList(this.queryParams.deptId);
    },
    /** 查询考核模板列表 */
    getList(deptId) {
    getChart(deptId) {
      this.loading = true;
      lineChart.showLoading();
      listScore(this.queryParams).then(response => {
        this.tableData = response.data[deptId];
        this.loading = false;
        this.initChart(response.data[deptId]);
        this.loading = false;
      });
    },
    /** 查询考核模板列表 */
    getList() {
      this.tableLoading = true;
      detailScore(this.queryParams).then(response => {
        this.tableData = response.rows;
        this.total = response.total;
        this.tableLoading = false;
      });
    },
    handleSizeChange(val) {
@@ -150,9 +158,13 @@
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
    handleDetail(index, row) {
      console.log(index, row);
      this.$router.push("/examine/detail/detail")
    handleDetail(id) {
      this.$router.push({
        path: '/examine/detail/detail',
        query: {
          id: id,
        }
      })
    },
    handleDelete(index, row) {
      console.log(index, row);
@@ -179,7 +191,7 @@
          data: dataList.map((item) => item[0]),
        },
        yAxis: {
          min: 90,
          min: 'dataMin'
        },
        series: [
          {
@@ -270,14 +282,14 @@
    dateChange() {
      this.queryParams.date = this.date;
      console.log(this.queryParams);
      this.getChart(this.queryParams.deptId);
      this.getList(this.queryParams.deptId);
    }
  },
  mounted() {
    lineChart = echarts.init(this.$refs.chartContent);
    this.getList(this.$route.query.index);
    this.getChart(this.$route.query.index);
    this.observe();
  },
  beforeDestroy() {
vue.config.js
@@ -35,9 +35,15 @@
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target: `http://localhost:8080`,
        // target: `http://192.168.3.64:8080`,
        // target: `http://localhost:8080`,
        // 付立麒
        target: `http://192.168.3.64:8080`,
        // 龚焕茏
        // target: `http://192.168.3.87:8080`,
        // 向培
        // target: `http://192.168.3.88:8085`,
        changeOrigin: true,
        pathRewrite: {