fuliqi
2024-03-21 e0208124183d65bd4c2228ccd6dce35b04876784
违约单、核算报告,运维打分修改
6个文件已修改
3个文件已添加
1830 ■■■■■ 已修改文件
src/views/system/calculate/duty/index.vue 263 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/calculate/order/index.vue 430 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/calculate/record/index.vue 450 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/calculate/report/index.vue 441 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/check-result/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/check-rule/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/default-auditing/index.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/score/index.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/calculate/duty/index.vue
New file
@@ -0,0 +1,263 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="违约名" prop="examineId">
        <el-input v-model="queryParams.examineId" placeholder="请输入违约名" clearable @keyup.enter.native="handleQuery" />
      </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="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleUpdate">修改</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>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></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="examineName" />
      <el-table-column label="违约对象" align="center" prop="unitName" />
      <el-table-column label="分值" align="center" prop="score" />
      <el-table-column label="违约规则" align="center" prop="scoreCategory">
        <template slot-scope="scope">
          <div v-if="scope.row.scoreCategory === 1">视频在线率</div>
          <div v-else-if="scope.row.scoreCategory === 2">存储故障</div>
          <div v-else-if="scope.row.scoreCategory === 4">一机一档24小时未修复</div>
          <div v-else-if="scope.row.scoreCategory === 5">时钟不同步24小时未修复</div>
        </template>
      </el-table-column>
      <el-table-column label="创建人" align="center" prop="createBy" />
      <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="handleUpdate(scope.row)">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
    <!-- 添加或修改违约计分对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="分值" prop="score">
          <el-input v-model="form.score" placeholder="请输入分值" />
        </el-form-item>
        <el-form-item label="单位名" prop="unitId">
          <el-select v-model="form.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="examineId">
          <el-select v-model="form.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="scoreCategory">
          <el-select v-model="form.scoreCategory" placeholder="请选择">
            <el-option v-for="item in scoreCategoryList" :key="item.id" :label="item.value" :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score";
import { unitSelect } from "@/api/platform/unit";
import { publishSelect } from "@/api/platform/publish";
export default {
  name: "Score",
  dicts: ['platform_operate_category'],
  data() {
    return {
      operateCategoryList: [
        { id: 2, value: '人工打分' },
        { id: 1, value: '系统打分' },
      ],
      scoreCategoryList: [
        { id: 2, value: '存储故障' },
        { id: 1, value: '视频在线率' },
        { id: 3, value: '保障工作' },
      ],
      unitList: [],
      examineList: [],
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 违约计分表格数据
      scoreList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        score: null,
        unitId: 2,
        examineId: null,
        operateCategory: null,
        scoreCategory: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
    this.selectUnit();
    this.selectExamine();
  },
  methods: {
    // 运维公司下拉数据
    selectUnit() {
      unitSelect().then(res => {
        this.unitList = res.data;
      })
    },
    // 违约下拉数据
    selectExamine() {
      publishSelect().then(res => {
        this.examineList = res.data;
      })
    },
    /** 查询违约计分列表 */
    getList() {
      this.loading = true;
      listScore(this.queryParams).then(response => {
        this.scoreList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        score: null,
        unitId: null,
        examineId: null,
        operateCategory: null,
        scoreCategory: null,
        createTime: null,
        createBy: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加违约计分";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getScore(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改违约计分";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateScore(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addScore(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除违约计分编号为"' + ids + '"的数据项?').then(function () {
        return delScore(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => { });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('platform/score/export', {
        ...this.queryParams
      }, `score_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
src/views/system/calculate/order/index.vue
@@ -1,8 +1,49 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="违约名" prop="examineId">
        <el-input v-model="queryParams.examineId" placeholder="请输入违约名" clearable @keyup.enter.native="handleQuery" />
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
      <el-form-item label="考核对象" prop="checkUnitId">
        <el-input
          v-model="queryParams.checkUnitName"
          placeholder="请输入考核对象"
          clearable
          @clear="handleQuery"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="考核频率" prop="frequency">
        <el-select v-model="queryParams.frequency" clearable @clear="handleQuery" placeholder="考核频率">
          <el-option
            label="月度考核"
            value="1">
          </el-option>
          <el-option
            label="季度考核"
            value="2">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="考核范围" prop="examineRange">
        <el-select v-model="queryParams.examineRange" clearable  @clear="handleQuery" placeholder="考核范围">
          <el-option
            label="市局考核"
            value="2">
          </el-option>
          <el-option
            label="分局考核"
            value="1">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="考核时间">
        <el-date-picker
          v-model="daterangeCheckTime"
          style="width: 240px"
          value-format="yyyy-MM-dd HH:mm:ss"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -11,73 +52,164 @@
    </el-form>
    <el-row :gutter="10" class="mb8">
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="primary"-->
<!--          plain-->
<!--          icon="el-icon-plus"-->
<!--          size="mini"-->
<!--          @click="handleAdd"-->
<!--          v-hasPermi="['system:checkResult:add']"-->
<!--        >新增</el-button>-->
<!--      </el-col>-->
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleUpdate">修改</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>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="scoreList" @selection-change="handleSelectionChange">
    <el-card class="box-card" v-for="(item) in checkResultList">
      <div slot="header" class="clearfix">
        <span>{{ item.checkUnitName }}</span>
        <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">详情</el-button>
      </div>
      <div class="text item">考核<span class="time">{{ item.examineName }}</span></div>
      <div class="text item">考核频率<span class="time">{{ "季度考核" }}</span></div>
      <div class="text item">考核分数<span class="time">{{ item.checkScore }}</span></div>
      <div class="text item">考核时间
        <span class="time">{{ item.checkTime }}</span>
      </div>
    </el-card>
    <!-- <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="examineName" />
      <el-table-column label="违约对象" align="center" prop="unitName" />
      <el-table-column label="分值" align="center" prop="score" />
      <el-table-column label="违约规则" align="center" prop="scoreCategory">
        <template slot-scope="scope">
          <div v-if="scope.row.scoreCategory === 1">视频在线率</div>
          <div v-else-if="scope.row.scoreCategory === 2">存储故障</div>
          <div v-else-if="scope.row.scoreCategory === 4">一机一档24小时未修复</div>
          <div v-else-if="scope.row.scoreCategory === 5">时钟不同步24小时未修复</div>
        </template>
      </el-table-column>
      <el-table-column label="创建人" align="center" prop="createBy" />
      <el-table-column label="创建时间" align="center" prop="createTime" />
      <el-table-column label="考核对象" align="center" prop="checkUnitName" />
      <el-table-column label="考核" align="center" prop="examineName" />
      <el-table-column label="考核范围":formatter="examineRangeFormatter" align="center" prop="examineRange" />
      <el-table-column label="考核频率" :formatter="frequencyFormatter" align="center" prop="frequency" />
      <el-table-column label="考核分数" falign="center" prop="checkScore" />
      <el-table-column label="考核时间" align="center" prop="checkTime" />
      <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="handleUpdate(scope.row)">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleDetail(scope.row)"
          >详情</el-button>
         <el-button
           type="text"
           size="mini"
           icon="el-icon-edit"
           @click="handleSetManualScore(scope.row)"
         >人工打分</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    /> -->
    <!-- 添加或修改违约计分对话框 -->
    <el-dialog :title="manualScoreTitle" :visible.sync="manualScoreOpen" width="500px" append-to-body>
      <el-input v-model="manualScoreForm.manualScore" type="number" placeholder="请为该单位打分"/>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitManualScore">确 定</el-button>
        <el-button @click="cancelManualScore">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="700px" append-to-body>
      <el-descriptions class="margin-top" :column="3" border>
<!--        <template slot="extra">-->
<!--          <el-button type="primary" size="small">操作</el-button>-->
<!--        </template>-->
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-user"></i>
            考核对象
          </template>
          {{detail.checkUnitName}}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-s-management"></i>
            考核名称
          </template>
          {{detail.examineName}}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-full-screen"></i>
            考核范围
          </template>
          <el-tag size="small">{{detail.examineRange === 1 ? '分局考核' : '市局考核'}}</el-tag>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-timer"></i>
            考核频率
          </template>
          <el-tag size="small">{{detail.frequency === 1 ? '月度考核' : '季度考核'}}</el-tag>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-medal"></i>
            综合分数
          </template>
          <el-tag type="danger" size="small">{{detail.checkScore}}</el-tag>
        </el-descriptions-item>
      </el-descriptions>
        <el-table
          :data="tableData"
          show-summary
          style="width: 100%">
          <el-table-column
            prop="name"
            label="规则名"
            width="180">
          </el-table-column>
          <el-table-column
            prop="content"
            label="指标"
            width="180">
          </el-table-column>
          <el-table-column
            prop="score"
            label="得分">
          </el-table-column>
        </el-table>
    </el-dialog>
    <!-- 添加或修改考核结果对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="分值" prop="score">
          <el-input v-model="form.score" placeholder="请输入分值" />
        </el-form-item>
        <el-form-item label="单位名" prop="unitId">
          <el-select v-model="form.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="examineId">
          <el-select v-model="form.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="scoreCategory">
          <el-select v-model="form.scoreCategory" placeholder="请选择">
            <el-option v-for="item in scoreCategoryList" :key="item.id" :label="item.value" :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -88,27 +220,37 @@
</template>
<script>
import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/score";
import { unitSelect } from "@/api/platform/unit";
import { publishSelect } from "@/api/platform/publish";
import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result";
export default {
  name: "Score",
  dicts: ['platform_operate_category'],
  name: "CheckResult",
  data() {
    return {
      operateCategoryList: [
        { id: 2, value: '人工打分' },
        { id: 1, value: '系统打分' },
      ],
      scoreCategoryList: [
        { id: 2, value: '存储故障' },
        { id: 1, value: '视频在线率' },
        { id: 3, value: '保障工作' },
      ],
      detailTitle: '',
      detailOpen: false,
      detail:{
      unitList: [],
      examineList: [],
      },
      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'
      }],
      manualScoreOpen: false,
      manualScoreForm: {},
      manualScoreTitle: '',
      // 遮罩层
      loading: true,
      // 选中数组
@@ -121,21 +263,20 @@
      showSearch: true,
      // 总条数
      total: 0,
      // 违约计分表格数据
      scoreList: [],
      // 考核结果表格数据
      checkResultList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 逻辑删除时间范围
      daterangeCheckTime: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        score: null,
        unitId: null,
        examineId: null,
        operateCategory: null,
        scoreCategory: null,
        checkUnitId: null,
        checkTime: null,
      },
      // 表单参数
      form: {},
@@ -146,27 +287,33 @@
  },
  created() {
    this.getList();
    this.selectUnit();
    this.selectExamine();
  },
  methods: {
    // 运维公司下拉数据
    selectUnit() {
      unitSelect().then(res => {
        this.unitList = res.data;
      })
    frequencyFormatter(row) {
      if (row.frequency === "1") {
        return "月度考核"
      }
      if (row.frequency === "2") {
        return "季度考核"
      }
    },
    // 违约下拉数据
    selectExamine() {
      publishSelect().then(res => {
        this.examineList = res.data;
      })
    examineRangeFormatter(row) {
      if (row.examineRange === "1") {
        return "分局考核"
      }
      if (row.examineRange === "2") {
        return "市局考核"
      }
    },
    /** 查询违约计分列表 */
    /** 查询考核结果列表 */
    getList() {
      this.loading = true;
      listScore(this.queryParams).then(response => {
        this.scoreList = response.rows;
      if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) {
        this.queryParams["start"] = this.daterangeCheckTime[0];
        this.queryParams["end"] = this.daterangeCheckTime[1];
      }
      listCheckResult(this.queryParams).then(response => {
        this.checkResultList = response.data;
        this.total = response.total;
        this.loading = false;
      });
@@ -180,15 +327,57 @@
    reset() {
      this.form = {
        id: null,
        score: null,
        unitId: null,
        examineId: null,
        operateCategory: null,
        scoreCategory: null,
        checkUnitId: null,
        checkPublishId: null,
        checkScore: null,
        systemScore: null,
        manualScore: null,
        checkTime: null,
        createTime: null,
        createBy: null
        updateTime: null,
        deleted: null
      };
      this.resetForm("form");
    },
    cancelManualScore() {
      this.manualScoreForm = {};
      this.manualScoreTitle = "";
      this.manualScoreOpen = false;
    },
    submitManualScore() {
      if (! this.manualScoreForm.manualScore) {
        this.$modal.msgWarning("请填写分数");
        return
      }
      manualScore(this.manualScoreForm).then(res => {
        this.$modal.msgSuccess("操作成功");
        this.cancelManualScore();
        this.getList();
      })
    },
    handleSetManualScore(row) {
      this.manualScoreForm.id = row.id;
      this.manualScoreForm.manualScore = parseInt(row.manualScore);
      this.manualScoreTitle = row.checkUnitName + '人工打分'
      this.manualScoreOpen = true;
    },
    handleDetail(row) {
      this.detail = row;
      this.detail.carOnlineRate =  '97%';
      this.detailTitle = row.checkUnitName + '考核结果';
      this.detailOpen = 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() {
@@ -197,29 +386,30 @@
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.daterangeCheckTime = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加违约计分";
      this.title = "添加考核结果";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getScore(id).then(response => {
      getCheckResult(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改违约计分";
        this.title = "修改考核结果";
      });
    },
    /** 提交按钮 */
@@ -227,13 +417,13 @@
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateScore(this.form).then(response => {
            updateCheckResult(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addScore(this.form).then(response => {
            addCheckResult(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
@@ -245,19 +435,43 @@
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除违约计分编号为"' + ids + '"的数据项?').then(function () {
        return delScore(ids);
      this.$modal.confirm('是否确认删除考核结果编号为"' + ids + '"的数据项?').then(function() {
        return delCheckResult(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => { });
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('platform/score/export', {
      this.download('system/checkResult/export', {
        ...this.queryParams
      }, `score_${new Date().getTime()}.xlsx`)
      }, `checkResult_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
<style>
  .text {
    font-size: 14px;
  }
  .time {
    font-size: 13px;
    color: #999;
    margin-left: 10px;
  }
  .item {
    margin-bottom: 18px;
  }
  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }
  .clearfix:after {
    clear: both
  }
  .box-card {
    width: 480px;
  }
</style>
src/views/system/calculate/record/index.vue
New file
@@ -0,0 +1,450 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="核算规则" prop="ruleName">
        <el-input
          v-model="queryParams.ruleName"
          placeholder="请输入规则名称"
          clearable
          @clear="handleQuery"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="创建时间" prop="createTime">
        <el-date-picker
          v-model="daterangeCreateTime"
          style="width: 240px"
          value-format="yyyy-MM-dd HH:mm:ss"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        />
      </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="handleUpdate"
        >修改</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>
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="warning"-->
<!--          plain-->
<!--          icon="el-icon-download"-->
<!--          size="mini"-->
<!--          @click="handleExport"-->
<!--          v-hasPermi="['system:checkRule:export']"-->
<!--        >导出</el-button>-->
<!--      </el-col>-->
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <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="category">
        <template slot-scope="scope">
        <div v-if="scope.row.category === 1">视频监控</div>
        <div v-else-if="scope.row.category === 2">车辆识别</div>
        <div v-else-if="scope.row.category === 3">人脸识别</div>
        </template>
      </el-table-column>
      <el-table-column label="合同名" align="center" prop="ruleDetail" />
      <el-table-column label="金额" align="center" prop="ruleDetail" />
      <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-s-check"
              @click="handleAudit(scope.row)"
              v-hasPermi="['check:rule:audit']"
            >审核</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
            >修改</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
            >删除</el-button>
          </template>
        </el-table-column>
       </el-table>
          <pagination
            v-show="total>0"
            :total="total"
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
            @pagination="getList"
          />
  <div>
    <!-- 添加或修改考核规则对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="规则名称" prop="ruleName">
          <el-input v-model="form.ruleName" placeholder="请输入规则名称" />
        </el-form-item>
        <el-form-item label="规则类型" prop="category">
          <el-select v-model="form.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="form.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="form.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="form.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="form.faceChceckpointNum" /></div>{{" %"}}
                </div>
            </div>
          </div>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
  <!-- 审核考核规则对话框 -->
  <el-dialog :title="title" :visible.sync="auditOpen" width="600px" append-to-body>
    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
      <el-form-item label="规则名称" prop="ruleName">
        <el-input v-model="form.ruleName" placeholder="请输入规则名称" disabled/>
      </el-form-item>
      <el-form-item label="规则类型" prop="category">
        <el-select v-model="form.category" placeholder="规则类型" disabled>
          <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="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="请输入规则描述" disabled/>
      </el-form-item>
      <el-form-item label="参数配置" prop="ruleDetail" disabled>
        <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="form.videoPointNum" disabled/>
              </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="form.vehicleCheckpointNum" disabled/></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="form.faceChceckpointNum" disabled/></div>
            </div>
          </div>
        </div>
      </el-form-item>
      <el-form-item label="审核结果" prop="auditState" >
        <el-radio-group v-model="form.auditState">
        <el-radio :label="1">通过</el-radio>
        <el-radio :label="2">驳回</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="审核说明" prop="auditDescription" >
        <el-input v-model="form.auditDescription" type="textarea" show-word-limit maxlength="100" />
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="submitForm">确 定</el-button>
      <el-button @click="cancel">取 消</el-button>
    </div>
  </el-dialog>
  </div>
</template>
<script>
import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule";
export default {
  name: "CheckRule",
  dicts: ['platform_audit_state'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 运维类型
      categoryList: [
        { id: 1, value: '视频监控' },
        { id: 2, value: '车辆识别' },
        { id: 3, value: '人脸识别' },
      ],
      // 考核规则表格数据
      checkRuleList: [],
      daterangeCreateTime: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 是否显示弹出层
      auditOpen: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        ruleName: null,
        createTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        ruleName: [
          { required: true, message: "规则名称不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询考核规则列表 */
    getList() {
      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.checkRuleList = response.data;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.auditOpen = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        ruleName: null,
        ruleDetail: null,
        videoPointNum: null,
        vehicleCheckpointNum: null,
        faceChceckpointNum: null,
        createTime: null,
        updateTime: null,
        deleted: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加考核规则";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getCheckRule(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改考核规则";
      });
    },
    /** 审核按钮操作 */
    handleAudit(row) {
      this.reset();
      const id = row.id || this.ids
      getCheckRule(id).then(response => {
        this.form = response.data;
        this.auditOpen = true;
        this.title = "审核考核规则";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateCheckRule(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.auditOpen = false;
              this.getList();
            });
          } else {
            addCheckRule(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.auditOpen = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除考核规则编号为"' + ids + '"的数据项?').then(function() {
        return delCheckRule(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/checkRule/export', {
        ...this.queryParams
      }, `checkRule_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
<style scoped>
.input-w {
  margin-left: 5px;
  width: 70px;
}
.row-warp {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border: solid 1px gray;
  /*padding: 3px;*/
}
.row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-bottom: solid 1px gray;
  padding: 3px;
}
.row:last-of-type {
  border-bottom: none;
}
.row-left {
  flex: 2;
  border-right: solid 1px gray;
}
.row-right {
  flex: 4;
  display: flex;
  flex-direction: row;
  justify-content: center;
}
</style>
src/views/system/calculate/report/index.vue
New file
@@ -0,0 +1,441 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
      <el-form-item label="核算对象" prop="checkUnitId">
        <el-input
          v-model="queryParams.checkUnitName"
          placeholder="请输入核算对象"
          clearable
          @clear="handleQuery"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="核算时间">
        <el-date-picker
          v-model="daterangeCheckTime"
          style="width: 240px"
          value-format="yyyy-MM-dd HH:mm:ss"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </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="primary"-->
<!--          plain-->
<!--          icon="el-icon-plus"-->
<!--          size="mini"-->
<!--          @click="handleAdd"-->
<!--          v-hasPermi="['system:checkResult:add']"-->
<!--        >新增</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>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-card class="box-card" v-for="(item) in checkResultList">
      <div slot="header" class="clearfix">
        <span>{{ item.checkUnitName }}</span>
        <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">详情</el-button>
      </div>
      <div class="text item">合同<span class="time">{{ item.checkUnitName }}</span></div>
      <div class="text item">核算金额<span class="time">{{ "40090" }}</span></div>
      <div class="text item">考核分数<span class="time">{{ item.checkScore }}</span></div>
      <div class="text item">核算时间
        <span class="time">{{ item.checkTime }}</span>
      </div>
    </el-card>
    <!-- <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="checkUnitName" />
      <el-table-column label="考核" align="center" prop="examineName" />
      <el-table-column label="考核范围":formatter="examineRangeFormatter" align="center" prop="examineRange" />
      <el-table-column label="考核频率" :formatter="frequencyFormatter" align="center" prop="frequency" />
      <el-table-column label="考核分数" falign="center" prop="checkScore" />
      <el-table-column label="考核时间" align="center" prop="checkTime" />
      <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-view"
            @click="handleDetail(scope.row)"
          >详情</el-button>
         <el-button
           type="text"
           size="mini"
           icon="el-icon-edit"
           @click="handleSetManualScore(scope.row)"
         >人工打分</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    /> -->
    <el-dialog :title="manualScoreTitle" :visible.sync="manualScoreOpen" width="500px" append-to-body>
      <el-input v-model="manualScoreForm.manualScore" type="number" placeholder="请为该单位打分"/>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitManualScore">确 定</el-button>
        <el-button @click="cancelManualScore">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="700px" append-to-body>
      <el-descriptions class="margin-top" :column="3" border>
<!--        <template slot="extra">-->
<!--          <el-button type="primary" size="small">操作</el-button>-->
<!--        </template>-->
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-user"></i>
            核算对象
          </template>
          {{detail.checkUnitName}}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-s-management"></i>
            合同名称
          </template>
          {{detail.checkUnitName}}
        </el-descriptions-item>
      </el-descriptions>
        <el-table
          :data="tableData"
          show-summary
          style="width: 100%">
          <el-table-column
            prop="name"
            label="规则名"
            width="180">
          </el-table-column>
          <el-table-column
            prop="amount"
            label="数量"
            width="180">
          </el-table-column>
          <el-table-column
            prop="money"
            label="金额(元)">
          </el-table-column>
          <el-table-column
            prop="total"
            label="合计(元)">
          </el-table-column>
        </el-table>
    </el-dialog>
    <!-- 添加或修改考核结果对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result";
export default {
  name: "CheckResult",
  data() {
    return {
      detailTitle: '',
      detailOpen: false,
      detail:{
      },
      tableData: [{
        name: '拆除点位',
        amount: '100',
        money: '100',
        total: '10000'
      }, {
        name: '连续两天',
        amount: '100',
        money: '100.45',
        total: '10045'
      }, {
        name: '间隔三天',
        amount: '100',
        money: '100',
        total: '10000'
      }, {
        name: '运行率(96%)',
        amount: '100',
        money: '100.45',
        total: '10045'
      }],
      manualScoreOpen: false,
      manualScoreForm: {},
      manualScoreTitle: '',
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 考核结果表格数据
      checkResultList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 逻辑删除时间范围
      daterangeCheckTime: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        checkUnitId: null,
        checkTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    frequencyFormatter(row) {
      if (row.frequency === "1") {
        return "月度考核"
      }
      if (row.frequency === "2") {
        return "季度考核"
      }
    },
    examineRangeFormatter(row) {
      if (row.examineRange === "1") {
        return "分局考核"
      }
      if (row.examineRange === "2") {
        return "市局考核"
      }
    },
    /** 查询考核结果列表 */
    getList() {
      this.loading = true;
      if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) {
        this.queryParams["start"] = this.daterangeCheckTime[0];
        this.queryParams["end"] = this.daterangeCheckTime[1];
      }
      listCheckResult(this.queryParams).then(response => {
        this.checkResultList = response.data;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        checkUnitId: null,
        checkPublishId: null,
        checkScore: null,
        systemScore: null,
        manualScore: null,
        checkTime: null,
        createTime: null,
        updateTime: null,
        deleted: null
      };
      this.resetForm("form");
    },
    cancelManualScore() {
      this.manualScoreForm = {};
      this.manualScoreTitle = "";
      this.manualScoreOpen = false;
    },
    submitManualScore() {
      if (! this.manualScoreForm.manualScore) {
        this.$modal.msgWarning("请填写分数");
        return
      }
      manualScore(this.manualScoreForm).then(res => {
        this.$modal.msgSuccess("操作成功");
        this.cancelManualScore();
        this.getList();
      })
    },
    handleSetManualScore(row) {
      this.manualScoreForm.id = row.id;
      this.manualScoreForm.manualScore = parseInt(row.manualScore);
      this.manualScoreTitle = row.checkUnitName + '人工打分'
      this.manualScoreOpen = true;
    },
    handleDetail(row) {
      this.detail = row;
      this.detail.carOnlineRate =  '97%';
      this.detailTitle = row.checkUnitName + '考核结果';
      this.detailOpen = 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();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.daterangeCheckTime = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加考核结果";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getCheckResult(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改考核结果";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateCheckResult(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addCheckResult(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除考核结果编号为"' + ids + '"的数据项?').then(function() {
        return delCheckResult(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/checkResult/export', {
        ...this.queryParams
      }, `checkResult_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
<style>
  .text {
    font-size: 14px;
  }
  .time {
    font-size: 13px;
    color: #999;
    margin-left: 10px;
  }
  .item {
    margin-bottom: 18px;
  }
  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }
  .clearfix:after {
    clear: both
  }
  .box-card {
    width: 480px;
  }
</style>
src/views/system/check-result/index.vue
@@ -244,11 +244,11 @@
      }, {
        name: '存储故障',
        content: '5小时',
        score: '-0.5'
        score: '-0.3'
      }, {
        name: '时钟不同步24小时未修复',
        content: '3个',
        score: '-0.3'
        score: '-0.5'
      }],
      manualScoreOpen: false,
      manualScoreForm: {},
src/views/system/check-rule/index.vue
@@ -30,15 +30,6 @@
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
src/views/system/data-manage/index.vue
@@ -114,7 +114,7 @@
        { name: '', icon: 'el-icon-connection', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }
      ],
      carData: [
        { name: '视图库对接稳定性×1', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '视图库对接稳定性', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '点位在线率', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '联网卡口设备目录一致率', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '车辆卡口信息采集准确率', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
@@ -124,7 +124,7 @@
      carData2: [
        { name: '车辆卡口设备时钟准确性', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '车辆卡口设备抓拍数据上传及时性', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '车辆卡口设备url可用性×0.5', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '车辆卡口设备url可用性', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '车辆卡口设备抓拍数据大图可用性', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' },
        { name: '', icon: 'el-icon-truck', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }
src/views/system/default-auditing/index.vue
@@ -86,8 +86,14 @@
    <el-table v-loading="loading" :data="auditingList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="违约单位" align="center" prop="unitName" width="180"/>
      <el-table-column label="违约规则" align="center" prop="defaultRuleName"width="120" />
      <el-table-column label="违约扣分" align="center" prop="score"width="120" />
      <el-table-column label="考核名" align="center" prop="checkPublishId" width="180">
        <template slot-scope="scope">
          <div v-if="scope.row.checkPublishId === 5">视频考核</div>
        </template>
      </el-table-column>
      <el-table-column label="违约规则" align="center" prop="defaultRuleName" width="180" />
      <el-table-column label="违约扣分" align="center" prop="score" width="120" />
      <el-table-column label="创建人" align="center" prop="createBy" />
      <el-table-column label="审核人" align="center" prop="auditingUserName" />
      <el-table-column label="审核状态" align="center" prop="auditingStatus" />
      <el-table-column label="审核说明" align="center" prop="remark" width="180"/>
@@ -100,6 +106,7 @@
            type="text"
            icon="el-icon-s-check"
            @click="handleAuditing(scope.row)"
            v-hasPermi="['default:audit']"
          >审核</el-button>
<!--          <el-button-->
<!--            size="mini"-->
@@ -132,6 +139,7 @@
        <el-form-item label="违约单位">
          <el-input v-model="auditingForm.unitName" disabled/>
        </el-form-item>
        <el-form-item label="违约规则">
          <el-input v-model="auditingForm.defaultRuleName" disabled/>
        </el-form-item>
@@ -151,6 +159,68 @@
        <el-button @click="closeAuditing">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 新增或修改 -->
    <el-dialog title="违约审核" :visible.sync="open" width="700px"append-to-body>
      <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="80px">
        <el-form-item label="违约单位" prop="unitName">
          <el-select v-model="form.unitNameList" placeholder="违约单位">
            <el-option
              v-for="item in unitNameList"
              :key="item.id"
              :label="item.value"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="考核名" prop="examineId">
          <el-select v-model="form.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="tempRuleFormList">
          <div class="row-warp">
            <div class="row" v-for="(form) in tempRuleFormList">
              <div class="row-left">
                <div>规则</div>
                <div class="block">
                  <span class="demonstration"></span>
                  <el-cascader
                    v-model="value"
                    :options="options"
                    :props = "props"
                    @change="handleChange"></el-cascader>
                </div>
              </div>
              <div class="row-right">
                <div>数量</div>
                <div class="margin-5">
                  <el-input type="number" v-model="form.weight"/>
                </div>
              </div>
              <div class="item-op">
                <el-button @click="removeRule(form)" type="danger" icon="el-icon-delete" circle></el-button>
              </div>
            </div>
            <div style="margin-top: 25px">
              <el-button type="success" @click="nextAdd" size="mini" plain>添加</el-button>
            </div>
          </div>
        </el-form-item>
        <el-form-item label="违约扣分"  style="width: 20%">
          <el-input v-model="auditingForm.score"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitAuditing">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
@@ -162,9 +232,37 @@
  name: "Auditing",
  data() {
    return {
      options: [{
        value: 'city',
        label: '前端感知源治理工作',
        children: [{
          value: 'fushun',
          label: '时钟同步',
        }, {
          value: 'rong',
          label: 'OSD标识未修复',
        }, {
          value: 'rong',
          label: '一机一档不合格',
        }
        ]
      },
      ],
      auditingOpen: false,
      auditingForm: {},
      unitList: [],
      unitNameList: [
        {id:2 , value:"成都x运维"}
        ],
      // 考核模板
      examineList: [
        {id:1 , value:"车辆考核"},
        {id:2 , value:"视频考核"}
      ],
      // 临时规则表单
      tempRuleForm: {},
      // 临时规则表单列表
      tempRuleFormList: [{"ruleId": null, "adjustCoefficient": null}],
      // 遮罩层
      loading: true,
      // 选中数组
@@ -183,6 +281,7 @@
      title: "",
      // 是否显示弹出层
      open: false,
      auditOpen: false,
      // 逻辑删除时间范围
      daterangeAuditingTime: [],
      // 逻辑删除时间范围
@@ -212,6 +311,9 @@
    this.getUnitSelect();
  },
  methods: {
    handleChange(value) {
      console.log(value);
    },
    // 提交审核
    submitAuditing() {
      this.$refs["auditingForm"].validate(valid => {
@@ -239,6 +341,8 @@
      this.auditingForm = {};
      this.auditingOpen = false;
    },
    getUnitSelect() {
      // 运维单位下拉列表
      unitSelect().then((res) => {
@@ -265,6 +369,7 @@
    // 取消按钮
    cancel() {
      this.open = false;
      this.auditOpen = false;
      this.reset();
    },
    // 表单重置
@@ -304,7 +409,7 @@
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加违规审核";
      this.title = "添加违规记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
@@ -355,3 +460,30 @@
  }
};
</script>
<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>
src/views/system/score/index.vue
@@ -1,14 +1,7 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!--      <el-form-item label="单位名" prop="unitId">-->
<!--        <el-input-->
<!--          v-model="queryParams.unitId"-->
<!--          placeholder="请输入单位名"-->
<!--          clearable-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
      <el-form-item label="考核名" prop="examineId">
        <el-input
          v-model="queryParams.examineId"
@@ -17,14 +10,16 @@
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
<!--      <el-form-item label="积分类型" prop="scoreCategory">-->
<!--        <el-input-->
<!--          v-model="queryParams.scoreCategory"-->
<!--          placeholder="请输入积分类型"-->
<!--          clearable-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
      <el-form-item label="考核对象" prop="unitName">
        <el-cascader
          v-model="value"
          :options="options"
          :props = "props"
          :show-all-levels="false"
          @change="handleChange"></el-cascader>
      </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>
@@ -32,15 +27,6 @@
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
@@ -76,14 +62,18 @@
    <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="examineName" />
      <el-table-column label="考核对象" align="center" >
        {{"成都x运维"}}
      <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="scoreCategory">
      <template slot-scope="scope">
        <div v-if="scope.row.scoreCategory === 1">视频在线率</div>
        <div v-else-if="scope.row.scoreCategory === 2">存储故障</div>
        <div v-else-if="scope.row.scoreCategory === 3">视图库对接稳定性</div>
        <div v-else-if="scope.row.scoreCategory === 4">一机一档24小时未修复</div>
        <div v-else-if="scope.row.scoreCategory === 5">时钟不同步24小时未修复</div>
      </template>
@@ -92,13 +82,6 @@
      <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-s-check"
            @click="handleAuditing(scope.row)"
            v-hasPermi="['score:publish:audit']"
          >审核</el-button>
          <el-button
            size="mini"
            type="text"
@@ -178,6 +161,44 @@
  dicts: ['platform_operate_category'],
  data() {
    return {
      options: [{
        value: 'city',
        label: '区县',
        children: [{
          value: 'fushun',
          label: '富顺县',
        }, {
          value: 'rong',
          label: '荣县',
        },{
          value: 'gaoxin',
          label: '高新区',
        },{
          value: 'ziliujing',
          label: '自流井区',
        },{
          value: 'gongjing',
          label: '贡井区',
        },{
          value: 'daan',
          label: '大安区',
        },{
          value: 'yantan',
          label: '沿滩区',
        },
        ]
      }, {
        value: 'company',
        label: '公司',
        children: [{
          value: 'yunwei',
          label: '成都x运维',
        }, {
          value: 'yunwei2',
          label: '自贡x运维',
        }, ]
      },
      ],
      scoreCategoryList: [
        { id: 2, value: '存储故障' },
        { id: 1, value: '视频在线率' },
@@ -185,8 +206,6 @@
        { id: 4, value: '一机一档24小时未修复' },
        { id: 5, value: '时钟不同步24小时未修复' },
      ],
      unitList: [],
      examineList: [],
      // 遮罩层
      loading: true,