| | |
| | | <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 label="考核对象" prop="unitId"> |
| | | <el-select v-model="queryParams.unitId" @change="handleQuery" clearable 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="unitId"> |
| | | <el-select v-model="queryParams.publish" @change="handleQuery" clearable placeholder="发布状态"> |
| | | <el-option label="未发布" :value="0" /> |
| | | <el-option label="已发布" :value="1" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="考核时间"> |
| | | <el-date-picker |
| | |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-card class="box-card" v-for="item in checkResultList" :key="item.id"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{ item.contractName }}</span> |
| | | <el-button style="float: right; padding: 3px 6px" type="text" @click="handleDetail(item)">详情</el-button> |
| | | </div> |
| | | <div class="text item">考核<span class="time">{{ item.unitName }}</span></div> |
| | | <div class="text item">考核分数<span class="time">{{ item.score }}</span></div> |
| | | <div class="text item">考核时间 |
| | | <span class="time">{{ item.checkTime }}</span> |
| | | <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">确认发布</el-button> |
| | | <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">已发布</el-button> |
| | | </div> |
| | | </el-card> |
| | | <el-row v-loading="loading"> |
| | | <el-col :span="8" v-for="(item, index) in checkResultList" :key="index"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{ item.contractName }}</span> |
| | | <el-button style="float: right; padding: 3px 6px" type="text" @click="handleDetail(item)">详情</el-button> |
| | | </div> |
| | | <div class="text item">考核对象<span class="time">{{ item.unitName }}</span></div> |
| | | <div class="text item">考核分数<span class="time">{{ item.score }}</span></div> |
| | | <div class="text item">考核时间 |
| | | <span class="time">{{ item.checkTime }}</span> |
| | | <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">确认发布</el-button> |
| | | <el-button size="small" round style="float: right;" disabled v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">已发布</el-button> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | <pagination |
| | |
| | | show-summary |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | prop="name" |
| | | prop="ruleName" |
| | | label="规则名" |
| | | width="180"> |
| | | :show-overflow-tooltip="true" |
| | | width="300"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="content" |
| | | label="指标" |
| | | width="180"> |
| | | label="扣减方式" |
| | | align="center" |
| | | prop="deductCategory" |
| | | width="180px"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="num" |
| | | label="指标"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="score" |
| | | label="得分"> |
| | | label="扣分"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; |
| | | import { resultRecord, listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | |
| | | export default { |
| | | name: "CheckResult", |
| | |
| | | detail:{ |
| | | |
| | | }, |
| | | 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' |
| | | }], |
| | | tableData: [], |
| | | manualScoreOpen: false, |
| | | manualScoreForm: {}, |
| | | manualScoreTitle: '', |
| | |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | } |
| | | }, |
| | | unitList: [] |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getUnitSelect(); |
| | | }, |
| | | 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 "市局考核" |
| | | } |
| | | getUnitSelect() { |
| | | // 运维单位下拉列表 |
| | | unitSelect().then((res) => { |
| | | this.unitList = res.data; |
| | | }) |
| | | }, |
| | | /** 查询考核结果列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) { |
| | | this.queryParams["start"] = this.daterangeCheckTime[0]; |
| | | this.queryParams["end"] = this.daterangeCheckTime[1]; |
| | | this.queryParams["createStartTime"] = this.daterangeCheckTime[0]; |
| | | this.queryParams["createEndTime"] = this.daterangeCheckTime[1]; |
| | | } |
| | | console.log("this.queryParams", this.queryParams) |
| | | listCheckResult(this.queryParams).then(response => { |
| | | this.checkResultList = response.rows; |
| | | this.total = response.total; |
| | |
| | | this.manualScoreOpen = true; |
| | | }, |
| | | handleDetail(row) { |
| | | resultRecord(row.id).then(res => { |
| | | this.tableData = res.rows; |
| | | }) |
| | | this.detail = row; |
| | | this.detail.carOnlineRate = '97%'; |
| | | this.detailTitle = '考核结果'; |
| | | this.detailTitle = '考核结果详情'; |
| | | this.detailOpen = true; |
| | | |
| | | }, |
| | | handlePublish(row) { |
| | | let text = row.publish == 1 ? '取消发布' : '发布'; |
| | |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeCheckTime = []; |
| | | this.resetForm("queryForm"); |
| | | this.queryParams = {}; |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/checkResult/export', { |
| | | this.download('check/result/export', { |
| | | ...this.queryParams |
| | | }, `checkResult_${new Date().getTime()}.xlsx`) |
| | | }, `合同考核结果_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | |
| | | } |
| | |
| | | clear: both |
| | | } |
| | | .box-card { |
| | | width: 350px; |
| | | width: 400px; |
| | | margin-bottom: 20px; |
| | | } |
| | | </style> |