Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/views/system/result/detail/index1.vue
| | |
| | | |
| | | # websocket地址 |
| | | VUE_APP_WEB_SOCKET_URL = 'ws://127.0.0.1:8044/ws' |
| | | |
| | | VUE_APP_FILE_URL = 'http://192.168.3.88:8085' |
| | | |
| | | |
| | |
| | | |
| | | # websocket地址 |
| | | VUE_APP_WEB_SOCKET_URL = 'ws://127.0.0.1:8044/ws' |
| | | |
| | | |
| | | VUE_APP_FILE_URL = 'http://192.168.3.88:8085' |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | <style> |
| | | #app .theme-picker { |
| | | display: none; |
| | | } |
| | | .el-dialog__body { |
| | | padding: 10px 20px !important; |
| | | } |
| | | </style> |
| | |
| | | }) |
| | | } |
| | | |
| | | // 根据合同id查询违约规则列表 |
| | | export function getMoneyRulesByContractId(data) { |
| | | return request({ |
| | | url: '/system/contract/selectMoneyRules?contractId=' + data, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 查询核算规则详细 |
| | | export function getRule(id) { |
| | | return request({ |
| | |
| | | } |
| | | |
| | | // 添加核算报告 |
| | | export const addCalculateReport = (params) => { |
| | | export const addCalculateReport = (data) => { |
| | | return axios({ |
| | | url: "/calculate-report/", |
| | | method: "POST", |
| | | data: params |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 回填金额 |
| | | export const backfill = (data) => { |
| | | return axios({ |
| | | url: "/calculate-report/backfill/money", |
| | | method: "POST", |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改发布状态 |
| | | export const updatePublishStatus = (data) => { |
| | | return axios({ |
| | | url: "/calculate-report/status/" + data, |
| | | method: "PUT", |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 根据运维单位查询违约规则列表 |
| | | export function getRuleListByUnitId(data) { |
| | | return request({ |
| | | url: '/calculate/rule/getRuleListByUnitId?unitId=' + data, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 查询违约规则详细 |
| | | export function getRule(id) { |
| | | return request({ |
| | |
| | | export function listAuditing(data) { |
| | | return request({ |
| | | url: '/contract/score/list', |
| | | method: 'get', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | |
| | | NProgress.configure({ showSpinner: false }) |
| | | |
| | | const whiteList = ['/login', '/register','/screen'] |
| | | const whiteList = ['/login', '/register'] |
| | | |
| | | router.beforeEach((to, from, next) => { |
| | | NProgress.start() |
| | |
| | | this.loginInfo = loginInfo.user |
| | | //如果返回为1正常跳转 |
| | | if (this.loginInfo.firstLogin == 1) { |
| | | this.$router.push({ path: "/" }).catch(() => { }); |
| | | return; |
| | | this.$router.push({ path: this.redirect || "/" }).catch(() => { }); |
| | | // this.$router.push({ path: "/" }).catch(() => { }); |
| | | // return; |
| | | this.$router.push({ path: this.redirect || "/screen" }).catch(() => { }); |
| | | } else { |
| | | localStorage.setItem('firstLogin', 0) |
| | | } |
| | |
| | | <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-row style="margin-left: 10px" :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | >导出</el-button> |
| | | >导出所有数据</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>{{ checkUnitName }}</span> |
| | | <span>{{ item.unitName }}</span> |
| | | <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">核算</el-button> |
| | | </div> |
| | | <div class="text item">合同<span class="time">{{ checkUnitName }}</span></div> |
| | | <div class="text item">扣减金额<span class="time">{{ "10元" }}</span></div> |
| | | <div class="text item">最新核算时间 |
| | | <span class="time">{{ item.checkTime }}</span> |
| | | <div class="text item">合同<span class="time">{{ item.contractName }}</span></div> |
| | | <div class="text item">最近扣减金额<span class="time">{{ item.latestDeductMoney }}</span></div> |
| | | <div class="text item">累计扣减金额<span class="time">{{ item.deductMoney }}</span></div> |
| | | <div class="text item">最近核算月份 |
| | | <span v-if="item.latestTime" class="time">{{ new Date(item.latestTime).getFullYear() }}年{{ new Date(item.latestTime).getMonth() }}月</span> |
| | | <span v-else class="time">暂无</span> |
| | | </div> |
| | | <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish != 1" v-hasPermi="['result:contract:publish']">确认发布</el-button> |
| | | <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-show="item.publish == 1" v-hasPermi="['result:contract:publish']">已发布</el-button> |
| | | <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-if="item.status === 'not_publish'" :disabled="!item.canPublish" v-hasPermi="['system:calculate:report:status']">确认发布</el-button> |
| | | <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-if="item.status === 'published'" v-hasPermi="['system:calculate:report:status']">取消发布</el-button> |
| | | </el-card> |
| | | |
| | | <pagination |
| | |
| | | /> |
| | | |
| | | <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="760px" append-to-body> |
| | | <div style="display: flex; flex-direction: row; width: 100%;margin-bottom: 10px; justify-content: center; align-items: center"> |
| | | <div style="line-height: 16px">应用规则:</div> |
| | | <div v-for="ruleItem in detail.ruleList" style="display: flex; margin-right: 50px;"> |
| | | <div style="line-height: 16px;margin-right: 10px;display: flex; align-items: center">{{ ruleItem.scoreCondition }}分</div> |
| | | <div style="line-height: 16px;max-width: 300px;word-wrap:break-word;word-break:normal;color: #2273b9">{{ ruleItem.description }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-descriptions class="margin-top" :column="3" border> |
| | | <!-- <template slot="extra">--> |
| | | <!-- <el-button type="primary" size="small">操作</el-button>--> |
| | |
| | | <i class="el-icon-user"></i> |
| | | 核算对象 |
| | | </template> |
| | | {{checkUnitName}} |
| | | {{detail.unitName}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i class="el-icon-s-management"></i> |
| | | 合同名称 |
| | | </template> |
| | | {{checkUnitName}} |
| | | {{detail.contractName}} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-table |
| | | :data="tableData" |
| | | align="center" |
| | | :data="detail.recordList" |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | style="width: 100%;text-align:center"> |
| | | <el-table-column |
| | | prop="time" |
| | | prop="createTime" |
| | | label="核算日期" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="score" |
| | | label="考核分数" |
| | | doNotSum |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-link @click="toScorePage(scope.row)">{{scope.row.score}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ruleName" |
| | | label="适用规则" |
| | | doNotSum> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="score" |
| | | label="扣分系数" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tooltip class="item" effect="dark" :content="'考核规则:' + scope.row.description" placement="top"> |
| | | <span>{{ scope.row.value }}</span> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="扣减金额(元)" |
| | | prop="money" |
| | | prop="deductMoney" |
| | | width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input type="number" |
| | | <el-input |
| | | :disabled="!scope.row.latest" |
| | | type="number" |
| | | :precision="2" :step="0.1" |
| | | :min="0" :max="1000000" |
| | | v-model="scope.row.money" |
| | | disabled |
| | | v-model="scope.row.deductMoney" |
| | | placeholder="请输入扣减金额"> |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button type="primary" @click="submitForm">保 存</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCalculateReports, getCalculateReportById, deleteCalculateReportByIds, addCalculateReport, editCalculateReport } from "@/api/platform/calculate-report"; |
| | | import { getCalculateReports, getCalculateReportById, backfill, updatePublishStatus } from "@/api/platform/calculate-report"; |
| | | |
| | | export default { |
| | | name: "CheckResult", |
| | | data() { |
| | | return { |
| | | manualOpen: false, |
| | | detailTitle: '', |
| | | detailOpen: false, |
| | | detail:{ |
| | | |
| | | }, |
| | | checkUnitName:'成都x运维', |
| | | tableData: [{ |
| | | time: '2024-03-03', |
| | | score: '94', |
| | | value: '1%', |
| | | ruleName: '<95', |
| | | money: '10', |
| | | description: '每少1分扣当月总服务费的1%。例如:当月考核得分91.5分,扣除当月服务费3.5%的金额', |
| | | }, { |
| | | time: '2024-04-03', |
| | | score: '95', |
| | | value: '0', |
| | | ruleName: '≥95', |
| | | money: '0', |
| | | description: '不扣款', |
| | | }, ], |
| | | detail:{}, |
| | | manualScoreOpen: false, |
| | | manualScoreForm: {}, |
| | | manualScoreTitle: '', |
| | |
| | | this.queryParams["end"] = this.daterangeCheckTime[1]; |
| | | } |
| | | getCalculateReports(this.queryParams).then(response => { |
| | | this.checkResultList = response.rows; |
| | | this.checkResultList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | |
| | | // }) |
| | | }, |
| | | handleDetail(row) { |
| | | console.log("row", row) |
| | | this.detail = row; |
| | | this.detail.carOnlineRate = '97%'; |
| | | this.detailTitle = this.checkUnitName + '考核结果'; |
| | | this.detailOpen = true; |
| | | |
| | | getCalculateReportById(row.id).then(res => { |
| | | this.detail = res.data |
| | | this.detailTitle = row.unitName + '考核结果' |
| | | this.detailOpen = true |
| | | }) |
| | | }, |
| | | handlePublish(row) { |
| | | let text = row.publish == 1 ? '取消发布' : '发布'; |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认' + text + '考核结果编号为"' + ids + '"的数据项?').then(function() { |
| | | let text = row.status === 'published' ? '取消发布' : '发布'; |
| | | this.$modal.confirm('确认要【' + text + "】【" + row.contractName + "】【" + new Date(row.latestTime).getMonth() + "月】" + '的核算报告吗?').then(function() { |
| | | // return publishCheckResult(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess(text + "成功"); |
| | | updatePublishStatus(row.id).then(res => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess(text + "成功"); |
| | | }) |
| | | }).catch(() => {}); |
| | | |
| | | }, |
| | |
| | | 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 |
| | | getCalculateReportById(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改考核结果"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | /** 回填金额 */ |
| | | submitForm() { |
| | | this.detailOpen = false; |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | editCalculateReport(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addCalculateReport(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | let data = { |
| | | id: this.detail.id, |
| | | recordList: this.detail.recordList.filter(item => item.latest) |
| | | } |
| | | if (data.recordList.length > 0) { |
| | | backfill(data).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.detailOpen = false; |
| | | this.getList(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除考核结果编号为"' + ids + '"的数据项?').then(function() { |
| | | return deleteCalculateReportByIds(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }) |
| | | } else { |
| | | this.detailOpen = false; |
| | | } |
| | | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | |
| | | sums[index] = '合计'; |
| | | return; |
| | | } |
| | | |
| | | const values = data.map(item => Number(item[column.property])); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | |
| | | return prev; |
| | | } |
| | | }, 0); |
| | | sums[index] += ' 元'; |
| | | if (column.property === 'score') { |
| | | sums[index] = '-'; // 或者其他你想要显示的内容 |
| | | sums[index] = '-'; |
| | | } |
| | | if (column.property === 'value') { |
| | | sums[index] = '-'; // 或者其他你想要显示的内容 |
| | | if (column.property === 'deductMoney') { |
| | | sums[index] += ' 元'; |
| | | } |
| | | } else { |
| | | sums[index] = '-'; |
| | | } |
| | | }); |
| | | |
| | | return sums; |
| | | }, |
| | | toScorePage() { |
| | | // 使用Vue Router进行页面跳转 |
| | | this.$router.push('/contract/score/index'); |
| | | }, |
| | | |
| | | // 删除按钮 |
| | | handleDelete() { |
| | | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | clear: both |
| | | } |
| | | .box-card { |
| | | width: 480px; |
| | | width: calc(33% - 20px); |
| | | min-width: 300px; |
| | | margin: 15px 10px; |
| | | } |
| | | </style> |
| | |
| | | <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']" |
| | |
| | | <!-- 合同详情 --> |
| | | <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" effect="dark" :content="item.deductCategory + ' ' + item.calcFraction + (item.calcUnit ? '/' + item.calcUnit : '')" placement="top"> |
| | | <span>{{ item.ruleCondition }}</span> |
| | | <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"> |
| | | <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"> |
| | |
| | | </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"> |
| | |
| | | <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"; |
| | |
| | | name: "Contract", |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | contractInfo: {}, |
| | | // 合同导入参数 |
| | | upload: { |
| | |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: process.env.VUE_APP_BASE_API + "/system/contract/importData", |
| | | ruleList: [], |
| | | unitId: '', |
| | | startTime: '', |
| | | endTime: '' |
| | |
| | | // 是否显示详情 |
| | | detail: false, |
| | | ruleData: [], |
| | | moneyRules: [], |
| | | // 表单参数 |
| | | form: { |
| | | }, |
| | |
| | | ], |
| | | timezone: [ |
| | | { type: "array", required: true, message: "合同时间不能为空", trigger: "change" } |
| | | ], |
| | | ruleList: [ |
| | | { type: "array", required: true, message: "考核结果应用规则不能为空", trigger: "submit" } |
| | | ] |
| | | } |
| | | }; |
| | |
| | | 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; |
| | | if (response.code != 200) { |
| | | this.$message.error("操作失败"); |
| | | } else { |
| | |
| | | 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(); |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.form.id = item.id; |
| | | this.contractInfo = item; |
| | | }); |
| | | getMoneyRulesByContractId(item.id).then(response => { |
| | | this.moneyRules = response.data; |
| | | }); |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | |
| | | /** 下载按钮操作 */ |
| | | handleDownload (data) { |
| | | this.$download.resource(data); |
| | | }, |
| | | reset () { |
| | | this.upload = { |
| | | open: false, |
| | | name: undefined, |
| | | unitId: undefined, |
| | | timezone: undefined, |
| | | ruleList: [] |
| | | }; |
| | | this.resetForm("form"); |
| | | } |
| | | } |
| | | }; |
| | |
| | | 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> |
| | |
| | | <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="peopleId"> |
| | | <el-input |
| | | v-model="queryParams.peopleId" |
| | | placeholder="运维人员姓名" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-input v-model="queryParams.peopleId" placeholder="运维人员姓名" clearable @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="点位" prop="pointId"> |
| | | <el-input |
| | | v-model="queryParams.pointId" |
| | | placeholder="点位" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-input v-model="queryParams.pointId" placeholder="点位" clearable @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="报备类型" prop="reportType"> |
| | | <el-select |
| | | v-model="queryParams.reportType" |
| | | placeholder="报备类型" |
| | | clearable |
| | | > |
| | | <el-select v-model="queryParams.reportType" placeholder="报备类型" clearable> |
| | | <el-option label="事前报备" value="事前报备" /> |
| | | <el-option label="事后报备" value="事后报备" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="报备时间"> |
| | | <el-date-picker |
| | | v-model="daterangeCreateTime" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="daterangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" 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-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:report:add']" |
| | | >新增</el-button> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['system:report:add']">新增</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="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" |
| | | v-hasPermi="['system:report:remove']" |
| | | >删除</el-button> |
| | | <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" |
| | | v-hasPermi="['system:report:remove']">删除</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:report:export']" |
| | | >导出</el-button> |
| | | <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" |
| | | v-hasPermi="['system:report:export']">导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="expand"> |
| | | <template slot-scope="scope"> |
| | | <div class="info-container"> |
| | | <div class="info-item"> |
| | | <div class="info-label">上报内容</div> |
| | | <div class="info-text" v-html="scope.row.reportContent"></div> |
| | | </div> |
| | | <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="item-icon"> |
| | | <i class="el-icon-document"></i> |
| | | </div> |
| | | <div class="item-text">{{ file }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="运维单位" align="center" prop="unitName" /> |
| | | <el-table-column label="报备人员" align="center" prop="peopleName" /> |
| | | <el-table-column label="点位" align="center" prop="pointName" /> |
| | | <el-table-column label="报备类型" align="center" prop="reportType" /> |
| | | <el-table-column label="报备内容" align="center" prop="reportContent" show-overflow-tooltip="true" /> |
| | | <!-- <el-table-column label="报备内容" align="center" prop="reportContent" show-overflow-tooltip="true" /> |
| | | <el-table-column label="上报材料" align="center" prop="reportMaterials" show-overflow-tooltip="true"> |
| | | <template slot-scope="scope"> |
| | | <div v-for="(item, index) in scope.row.reportMaterials.split(',')" :key="index">{{ item.substring(item.lastIndexOf("/") + 1) }}</div> |
| | | <div v-for="(item, index) in scope.row.reportMaterials.split(',')" :key="index">{{ |
| | | item.substring(item.lastIndexOf("/") + 1) }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column label="故障类型" align="center" prop="errorType" /> |
| | | <el-table-column label="审核时间" align="center" prop="auditingTime" width="180"> |
| | | <template slot-scope="scope"> |
| | |
| | | </el-table-column> |
| | | <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)"--> |
| | | <!-- v-hasPermi="['system:report:edit']"--> |
| | | <!-- >修改</el-button>--> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['system:report:edit']" |
| | | v-if="scope.row.status === 0" |
| | | >审核</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:report:remove']" |
| | | >删除</el-button> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- v-hasPermi="['system:report:edit']"--> |
| | | <!-- >修改</el-button>--> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['system:report:edit']" v-if="scope.row.status === 0">审核</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:report:remove']">删除</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="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="pointId"> |
| | | <el-select |
| | | v-model="form.pointId" |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | | placeholder="请选择点位" |
| | | :remote-method="remoteGetPoints" |
| | | :loading="selectLoading"> |
| | | <el-option |
| | | v-for="item in pointList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | <el-select v-model="form.pointId" filterable remote reserve-keyword placeholder="请选择点位" |
| | | :remote-method="remoteGetPoints" :loading="selectLoading"> |
| | | <el-option v-for="item in pointList" :key="item.id" :label="item.value" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="报备类型" prop="reportType"> |
| | | <el-select v-model="form.reportType"> |
| | | <el-option label="事前报备" value="事前报备"/> |
| | | <el-option label="事后报备" value="事后报备"/> |
| | | <el-option label="事前报备" value="事前报备" /> |
| | | <el-option label="事后报备" value="事后报备" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="故障类型" prop="errorType"> |
| | | <el-select v-model="form.errorType"> |
| | | <el-option label="市政施工" value="市政施工"/> |
| | | <el-option label="设备故障" value="设备故障"/> |
| | | <el-option label="设备遗失" value="设备遗失"/> |
| | | <el-option label="市政施工" value="市政施工" /> |
| | | <el-option label="设备故障" value="设备故障" /> |
| | | <el-option label="设备遗失" value="设备遗失" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="报备时间" prop="expirTime"> |
| | | <el-date-picker |
| | | v-model="form.expirTime" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | @change="handleExpirTimeChange" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="form.expirTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" |
| | | range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" |
| | | @change="handleExpirTimeChange"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="报备内容" prop="reportContent"> |
| | | <editor v-model="form.reportContent" :min-height="192"/> |
| | | <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" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | <el-input type="textarea" v-html="auditingForm.reportContent" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="上报材料"> |
| | | <el-link v-for="item in auditingForm.reportMaterials != null ? auditingForm.reportMaterials.split(',') : auditingForm.reportMaterials" :underline="false" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) }}</el-link> |
| | | <el-link |
| | | v-for="item in auditingForm.reportMaterials != null ? auditingForm.reportMaterials.split(',') : auditingForm.reportMaterials" |
| | | :underline="false" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) |
| | | }}</el-link> |
| | | </el-form-item> |
| | | <el-form-item label="审核结果"> |
| | | <el-radio-group v-model="auditingForm.status"> |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="审核意见" prop="suggest"> |
| | | <el-input v-model="auditingForm.auditOpinion"/> |
| | | <el-input v-model="auditingForm.auditOpinion" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | }, |
| | | handleAuditing(row) { |
| | | this.auditingOpen = true; |
| | | this.auditingForm.id =row.id |
| | | this.auditingForm.pointId =row.pointId |
| | | this.auditingForm.pointName =row.pointName |
| | | this.auditingForm.unitName =row.unitName |
| | | this.auditingForm.peopleName =row.peopleName |
| | | this.auditingForm.errorType =row.errorType |
| | | this.auditingForm.reportContent =row.reportContent |
| | | this.auditingForm.reportType =row.reportType |
| | | this.auditingForm.endCreateTime =row.endCreateTime |
| | | this.auditingForm.beginCreateTime =row.beginCreateTime |
| | | this.auditingForm.reportMaterials =row.reportMaterials |
| | | this.auditingForm.id = row.id |
| | | this.auditingForm.pointId = row.pointId |
| | | this.auditingForm.pointName = row.pointName |
| | | this.auditingForm.unitName = row.unitName |
| | | this.auditingForm.peopleName = row.peopleName |
| | | this.auditingForm.errorType = row.errorType |
| | | this.auditingForm.reportContent = row.reportContent |
| | | this.auditingForm.reportType = row.reportType |
| | | this.auditingForm.endCreateTime = row.endCreateTime |
| | | this.auditingForm.beginCreateTime = row.beginCreateTime |
| | | this.auditingForm.reportMaterials = row.reportMaterials |
| | | }, |
| | | // 远程搜索点位 |
| | | remoteGetPoints(query) { |
| | |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.single = selection.length !== 1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** 新增按钮操作 */ |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除报备编号为"' + ids + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除报备编号为"' + ids + '"的数据项?').then(function () { |
| | | return delReport(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }).catch(() => { }); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | |
| | | }, `report_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | /** 下载按钮操作 */ |
| | | handleDownload (data) { |
| | | handleDownload(data) { |
| | | this.$download.resource(data); |
| | | }, |
| | | |
| | | formatFileList(data) { |
| | | if (!data) return []; |
| | | return data.split(','); |
| | | }, |
| | | showFile(filePath) { |
| | | console.log(process.env.VUE_APP_FILE_URL + filePath); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .info-container { |
| | | width: 100%; |
| | | max-height: 400px; |
| | | overflow-y: scroll; |
| | | } |
| | | |
| | | .info-item { |
| | | display: flex; |
| | | margin-bottom: 20px; |
| | | |
| | | .info-label { |
| | | font-size: 14px; |
| | | font-weight: bold; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .info-text { |
| | | width: 30%; |
| | | padding: 20px; |
| | | border-radius: 10px; |
| | | border: 1px solid #c0c0c0; |
| | | } |
| | | |
| | | .info-list { |
| | | width: 30%; |
| | | |
| | | .list-item { |
| | | width: 100%; |
| | | border-radius: 5px; |
| | | border: 1px solid #c0c0c0; |
| | | padding: 10px 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 10px; |
| | | cursor: pointer; |
| | | |
| | | .item-icon { |
| | | flex-shrink: 0; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .item-text { |
| | | flex-grow: 1; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | &:hover { |
| | | border-color: #1890ff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div style="padding: 0px 10px"> |
| | | <div> |
| | | <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" style="margin-bottom: 10px"> |
| | | <el-menu-item index="1">省厅考核</el-menu-item> |
| | | <el-menu-item index="2">区域考核</el-menu-item> |
| | | <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" |
| | | style="margin-bottom: 10px"> |
| | | <el-menu-item index="0">省厅考核</el-menu-item> |
| | | <el-menu-item index="1">区域考核</el-menu-item> |
| | | </el-menu> |
| | | </div> |
| | | |
| | |
| | | <div class="card-content"> |
| | | <div class="title-container"> |
| | | <h1>考核成绩</h1> |
| | | <div class="select-container"> |
| | | <el-date-picker v-model="date" format="yyyy-MM" value-format="yyyy-MM" type="month" placeholder="选择日期" |
| | | @change="dateChange"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="chart-container"> |
| | | <div id="chartContent" ref="chartContent"></div> |
| | |
| | | </div> |
| | | |
| | | <div style="margin-top: 35px"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | label="考核时间" |
| | | prop="createTime" |
| | | align="center"> |
| | | <el-table :data="tableData" style="width: 100%" v-loading="loading"> |
| | | <el-table-column label="考核时间" prop="createTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="考核对象" |
| | | prop="deptId" |
| | | align="center"> |
| | | <el-table-column label="考核对象" prop="deptId" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ translateDeptId(scope.row.deptId) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="标签" |
| | | prop="examineTag" |
| | | align="center"> |
| | | <el-table-column label="标签" prop="examineTag" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.examineTag == 0 ? '省厅考核' : '市局考核' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="考核类型" |
| | | prop="examineCategory" |
| | | align="center"> |
| | | <el-table-column label="考核类型" prop="examineCategory" align="center"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory"/> |
| | | <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory" /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | |
| | | <el-table-column |
| | | label="分数" |
| | | prop="score" |
| | | align="center"> |
| | | <el-table-column label="分数" prop="score" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="状态" |
| | | prop="publish" |
| | | align="center"> |
| | | <el-table-column label="状态" prop="publish" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | |
| | | </div> |
| | | |
| | | <div style="text-align: right; margin-top: 10px"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage4" |
| | | :page-sizes="[5, 10, 20]" |
| | | :page-size="5" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="4"> |
| | | <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> |
| | | </div> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listScore, getScore, delScore, addScore, updateScore,publishScore} from "@/api/platform/check-score"; |
| | | import { areaSelect } from '@/api/system/dept' |
| | | import { listScore, getScore, delScore, addScore, updateScore, publishScore } 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; |
| | | export default { |
| | | name: 'index', |
| | | dicts: ['platform_examine_use','platform_examine_category'], |
| | | dicts: ['platform_examine_use', 'platform_examine_category'], |
| | | data() { |
| | | return { |
| | | activeIndex: '1', |
| | | areaList:[], |
| | | activeIndex: '0', |
| | | areaList: [], |
| | | date: '', |
| | | dateRange: '', |
| | | company: '', |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | deptId: null, |
| | | examinTag:0 |
| | | }, |
| | | dataList: [ |
| | | { |
| | | name: '全部', |
| | | complete: { '4.5': 95.5, '4.6': 95.3, '4.7': 96.0, '4.8': 97.2, '4.9': 96.5 , |
| | | '4.10': 95.5, '4.11': 95.3, '4.12': 96.0, '4.13': 97.2, '4.14': 96.5 , |
| | | '4.15': 95.5, '4.16': 95.3, '4.17': 96.0, '4.18': 97.2, '4.19': 96.5 , |
| | | '4.20': 95.5, '4.21': 95.3, '4.22': 96.0, '4.23': 97.2, '4.24': 96.5, |
| | | '4.25': 95.5, '4.26': 95.3, '4.27': 96.0, '4.28': 97.2, '4.29': 96.5 |
| | | }, |
| | | waiting: { '4.5': 94.8, '4.6': 91.3, '4.7': 95.3, '4.8': 92.3, '4.9': 93.3, |
| | | '4.10': 94.8, '4.11': 91.3, '4.12': 95.3, '4.13': 92.3, '4.14': 93.3 }, |
| | | pending: { '4.5': 91.6, '4.6': 92.6, '4.7': 93.7, '4.8': 94.0, '4.9': 95.9 |
| | | ,'4.10': 91.6, '4.11': 92.6, '4.12': 93.7, '4.13': 94.0, '4.14': 95.9 } |
| | | } |
| | | ], |
| | | tableData: [], |
| | | loading: false, |
| | | searchForm: { |
| | | time: null, |
| | | } |
| | |
| | | created() { |
| | | //考核成绩详情跳转参数接收 |
| | | console.log(this.$route.query.index) |
| | | if(this.$route.query.index){ |
| | | if (this.$route.query.index) { |
| | | this.queryParams.deptId = this.$route.query.index |
| | | } |
| | | this.getList(this.$route.query.index); |
| | | const date = new Date(); |
| | | const year = date.getFullYear(); |
| | | const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1); |
| | | this.date = year + '-' + month; |
| | | this.queryParams.date = this.date; |
| | | this.areaSelect(); |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | methods: { |
| | | // 区域下拉数据 |
| | |
| | | return department ? department.value : '未知'; |
| | | }, |
| | | /** 导航切换 */ |
| | | handleSelect(key){ |
| | | this.activeIndex = key; // 更新当前激活的菜单项 |
| | | this.getList(); |
| | | handleSelect(key) { |
| | | this.activeIndex = key; |
| | | this.queryParams.examinTag = key; |
| | | this.getList(this.queryParams.deptId); |
| | | }, |
| | | /** 查询考核模板列表 */ |
| | | getList(deptId) { |
| | | this.loading = true; |
| | | lineChart.showLoading(); |
| | | listScore(this.queryParams).then(response => { |
| | | this.tableData = response.data[deptId]; |
| | | this.loading = false; |
| | | this.initChart(response.data[deptId]); |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | |
| | | handleDelete(index, row) { |
| | | console.log(index, row); |
| | | }, |
| | | initChart() { |
| | | initChart(data) { |
| | | const dataList = this.groupByData(data); |
| | | const option = { |
| | | legend: { |
| | | right: 'right', |
| | | top: 'top', |
| | | icon: 'rect', |
| | | orient: "vertical", |
| | | data: [ |
| | | { |
| | | name: '车辆考核', |
| | | itemStyle: { |
| | | color: 'rgba(62, 144, 247, 1)' |
| | | } |
| | | }, |
| | | { |
| | | name: '人脸考核', |
| | | itemStyle: { |
| | | color: 'rgba(85, 192, 191, 1)' |
| | | } |
| | | }, |
| | | { |
| | | name: '视频考核', |
| | | itemStyle: { |
| | | color: 'rgba(255, 165, 0, 1)' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | grid: { |
| | | left: 0, |
| | |
| | | tooltip: {}, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: Object.keys(this.acitveData.complete), |
| | | data: dataList.map((item) => item[0]), |
| | | }, |
| | | yAxis: { |
| | | min: 90, |
| | |
| | | series: [ |
| | | { |
| | | name: '车辆考核', |
| | | data: Object.entries(this.acitveData.complete).map(([key, value]) => value), |
| | | data: this.filterData(dataList, 0), |
| | | type: 'line', |
| | | itemStyle: { |
| | | color: 'rgba(62, 144, 247, 1)' |
| | |
| | | }, |
| | | { |
| | | name: '人脸考核', |
| | | data: Object.entries(this.acitveData.waiting).map(([key, value]) => value), |
| | | data: this.filterData(dataList, 1), |
| | | type: 'line', |
| | | itemStyle: { |
| | | color: 'rgba(85, 192, 191, 1)' |
| | |
| | | }, |
| | | { |
| | | name: '视频考核', |
| | | data: Object.entries(this.acitveData.pending).map(([key, value]) => value), |
| | | data: this.filterData(dataList, 2), |
| | | type: 'line', |
| | | itemStyle: { |
| | | color: 'rgba(255, 165, 0, 1)' |
| | |
| | | ] |
| | | }; |
| | | lineChart.setOption(option, true); |
| | | lineChart.hideLoading(); |
| | | }, |
| | | |
| | | groupByData(data) { |
| | | if (!data) return this.getAllDay().map((item) => [item, []]); |
| | | const tempGroup = {}; |
| | | data.forEach((item) => { |
| | | let { createTime } = item; |
| | | let tempTime = createTime.split('-'); |
| | | createTime = tempTime[1] + '-' + tempTime[2]; |
| | | if (!tempGroup[createTime]) { |
| | | tempGroup[createTime] = []; |
| | | } |
| | | tempGroup[createTime].push(item); |
| | | }) |
| | | const tempArray = Object.entries(tempGroup).sort(([keyA], [keyB]) => new Date([keyA]) - new Date([keyB])); |
| | | return tempArray; |
| | | }, |
| | | filterData(data, tag) { |
| | | const scoreList = data.map((item) => { |
| | | let temp = item[1].find((exam) => exam.examineCategory === tag); |
| | | if (temp) { |
| | | return temp.score; |
| | | } else { |
| | | return; |
| | | } |
| | | }); |
| | | return scoreList; |
| | | }, |
| | | |
| | | getAllDay() { |
| | | const currentDate = this.date.split('-'); |
| | | const currentYear = currentDate[0]; |
| | | const currentMonth = currentDate[1]; |
| | | const daysInMonth = new Date(currentYear, currentMonth, 0).getDate(); |
| | | const datesOfMonth = []; |
| | | for (var day = 1; day <= daysInMonth; day++) { |
| | | const formattedDate = currentMonth + '-' + (day.toString().padStart(2, '0')); |
| | | datesOfMonth.push(formattedDate); |
| | | } |
| | | return datesOfMonth; |
| | | }, |
| | | |
| | | // 监听变化 |
| | |
| | | if (lineChart) { |
| | | lineChart.resize(); |
| | | } |
| | | }, |
| | | |
| | | dateChange() { |
| | | this.queryParams.date = this.date; |
| | | console.log(this.queryParams); |
| | | this.getList(this.queryParams.deptId); |
| | | } |
| | | |
| | | }, |
| | | mounted() { |
| | | this.acitveData = this.dataList[0]; |
| | | this.company = this.acitveData.name; |
| | | lineChart = echarts.init(this.$refs.chartContent); |
| | | this.initChart(); |
| | | this.getList(this.$route.query.index); |
| | | this.observe(); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | handleSelect(key, keyPath) { |
| | | console.log(key, keyPath); |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | |
| | | } |
| | | |
| | | .chart-container { |
| | | |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | |
| | | margin: 0 20px; |
| | | width: 180px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div id="warp"> |
| | | <div> |
| | | <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" style="margin-bottom: 10px"> |
| | | <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" |
| | | style="margin-bottom: 10px"> |
| | | <el-menu-item index="1">省厅考核</el-menu-item> |
| | | <el-menu-item index="2">市局考核</el-menu-item> |
| | | </el-menu> |
| | |
| | | <div class="title-container"> |
| | | <h1>考核成绩</h1> |
| | | <div class="select-container"> |
| | | <el-date-picker v-model="date" type="date" placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </div> |
| | | <el-date-picker v-model="date" type="date" placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="echart-container"> |
| | | <div id="barChart" ref="barChart"></div> |
| | |
| | | <div class="city-warp"> |
| | | <div class="city"> |
| | | <div class="title"> |
| | | {{ translateDeptId(parseInt(index)) }} |
| | | {{ translateDeptId(parseInt(index)) }} |
| | | </div> |
| | | <div class="score-warp"> |
| | | <div class="score-item"> |
| | | <div class="score-item"> |
| | | <div style="font-size: 15px; margin-bottom: 15px">{{ formatCreateDate(city[0].createTime) }}</div> |
| | | </div> |
| | | </div> |
| | | <div v-for="(score, scoreIndex) in city" :key="scoreIndex"> |
| | | <div class="score-item"> |
| | | <div v-if="score.examineCategory == 0">车辆:</div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="bottom-publish"> |
| | | <el-button |
| | | size="medium" |
| | | :type="isAnyUnpublished(city) ? 'success' : 'danger'" |
| | | @click="publish(city)" |
| | | > |
| | | <el-button size="medium" :type="isAnyUnpublished(city) ? 'success' : 'danger'" @click="publish(city)"> |
| | | {{ isAnyUnpublished(city) ? '发布' : '取消' }} |
| | | </el-button> |
| | | <el-button size="medium" @click="jumpDetail(index)" type="info">详情</el-button> |
| | |
| | | |
| | | <script> |
| | | import { areaSelect } from '@/api/system/dept'; |
| | | import { listScore, getScore, delScore, addScore, updateScore,publishScore} from "@/api/platform/check-score"; |
| | | import { listScore, getScore, delScore, addScore, updateScore, publishScore } from "@/api/platform/check-score"; |
| | | import * as echarts from 'echarts'; |
| | | let observer = null; |
| | | let chart = null; |
| | |
| | | name: 'index', |
| | | data() { |
| | | return { |
| | | province:{ |
| | | province: { |
| | | id: [], |
| | | publish: null, |
| | | }, |
| | | checkScoreList:[], |
| | | areaList:[], |
| | | checkScoreList: [], |
| | | areaList: [], |
| | | activeIndex: '1', |
| | | activeIndex2: '2', |
| | | date: '', |
| | |
| | | } |
| | | chart.setOption(option, true); |
| | | }, |
| | | |
| | | // 设置chart |
| | | setChartOption(data) { |
| | | if (!data) return; |
| | | const mapData = Object.keys(data).map(key => { |
| | | return { |
| | | name: this.translateDeptId(parseInt(key)), |
| | | data: data[key] |
| | | } |
| | | }); |
| | | const nameArray = mapData.map(item => item.name); |
| | | const data1 = this.filterData(mapData, 0); |
| | | const data2 = this.filterData(mapData, 1); |
| | | const data3 = this.filterData(mapData, 2); |
| | | const option = { |
| | | grid: { |
| | | left: 0, |
| | | right: 0, |
| | | bottom: 0, |
| | | top: '20%', |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | right: 'right', |
| | | top: 'top', |
| | | icon: 'rect', |
| | | orient: "vertical", |
| | | }, |
| | | tooltip: {}, |
| | | xAxis: { |
| | | type: 'category', |
| | | axisLabel: { |
| | | }, |
| | | data: nameArray |
| | | }, |
| | | yAxis: { |
| | | min: 90, |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'bar', |
| | | name: '视频考核', |
| | | data: data1, |
| | | itemStyle: { |
| | | color: 'rgba(255, 165, 0, 1)' |
| | | } |
| | | }, |
| | | { |
| | | type: 'bar', |
| | | name: '人脸考核', |
| | | data: data2, |
| | | itemStyle: { |
| | | color: 'rgba(85, 192, 191, 1)' |
| | | } |
| | | }, |
| | | { |
| | | type: 'bar', |
| | | name: '车辆考核', |
| | | data: data3, |
| | | itemStyle: { |
| | | color: 'rgba(62, 144, 247, 1)' |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | chart.setOption(option, true); |
| | | }, |
| | | filterData(data, tag) { |
| | | if (!data) return; |
| | | if(!Array.isArray(data)) return; |
| | | const tempArray = []; |
| | | data.forEach((item) => { |
| | | if(item.data.length) { |
| | | item.data.forEach((examine) => { |
| | | if(examine.examineCategory === tag) { |
| | | tempArray.push(examine.score); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | return tempArray; |
| | | }, |
| | | // 区域下拉数据 |
| | | areaSelect() { |
| | | areaSelect().then(res => { |
| | |
| | | return `${year}年${formattedMonth}月${formattedDay}号`; |
| | | }, |
| | | /** 导航切换 */ |
| | | handleSelect(key){ |
| | | handleSelect(key) { |
| | | this.activeIndex = key; // 更新当前激活的菜单项 |
| | | this.getList(); |
| | | }, |
| | |
| | | this.checkScoreList = response.data; |
| | | console.log(this.checkScoreList); |
| | | this.loading = false; |
| | | this.setChartOption(this.checkScoreList); |
| | | }); |
| | | }, |
| | | publish(city){ |
| | | let text = this.isAnyUnpublished(city) ? "发布":"取消发布"; |
| | | publish(city) { |
| | | let text = this.isAnyUnpublished(city) ? "发布" : "取消发布"; |
| | | const cityName = this.translateDeptId(parseInt(city[0].deptId)); |
| | | this.province.publish = text === "发布" ? "PUBLISHED" : "UNPUBLISHED"; |
| | | this.province.id = city.map(city => city.id); |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang = "scss" scoped> |
| | | <style lang="scss" scoped> |
| | | .score-warp { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | align-items: center; |
| | | color: #797777 |
| | | } |
| | | |
| | | .score-item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | |
| | | } |
| | | |
| | | .score { |
| | | width: 60px; |
| | | text-align: right; |
| | | padding: 3px 0; |
| | | } |
| | | |
| | | #warp { |
| | | padding: 0 10px; |
| | | } |
| | | |
| | | .city-warp { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | height: 210px; |
| | | margin-bottom: 25px; |
| | | } |
| | | |
| | | .city { |
| | | width: 240px; |
| | | height: 100%; |
| | |
| | | text-align: center; |
| | | padding: 10px 0px; |
| | | } |
| | | |
| | | .bottom-publish { |
| | | width: 100%; |
| | | position: absolute; |
| | | bottom: 10px; |
| | | } |
| | | |
| | | .title { |
| | | font-size: larger; |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .data-chart-container { |
| | | height: 400px; |
| | | margin-bottom: 20px; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .title-container { |
| | | position: absolute; |
| | | display: flex; |
| | |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | .select-container { |
| | | margin: 0 20px; |
| | | width: 180px; |
| | |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> |
| | | <el-form-item label="运维考核单位" prop="belongUnit"> |
| | | <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 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="审核时间"> |
| | | <el-date-picker |
| | | v-model="daterangeAuditingTime" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="daterangeAuditingTime" 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 label="创建时间"> |
| | | <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-date-picker> |
| | | <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-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | |
| | | |
| | | <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:template:add']" |
| | | >新增</el-button> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['platform:score:add']">新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['system:template:edit']" |
| | | >修改</el-button> |
| | | <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" |
| | | v-hasPermi="['platform:score:edit']">修改</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:template:remove']" |
| | | >删除</el-button> |
| | | <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" |
| | | v-hasPermi="['platform:score:remove']">删除</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:template:export']" |
| | | >导出</el-button> |
| | | <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" |
| | | v-hasPermi="['platform:score:export']">导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <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="checkPublishId" width="180"> |
| | | <el-table-column label="考核单位" align="center" prop="unitName" width="180" /> |
| | | <el-table-column label="考核合同" align="center" prop="contractName" width="180" /> |
| | | <el-table-column label="考核规则" align="center" prop="ruleName" width="120" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="考核指标" align="center" prop="num" width="120" /> |
| | | <el-table-column label="考核扣分" align="center" prop="score" width="120" /> |
| | | <el-table-column label="创建人" align="center" prop="createUser" /> |
| | | <el-table-column label="审核状态" align="center" prop="auditingStatus"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.checkPublishId === 5">视频考核</div> |
| | | <el-tag |
| | | :type="scope.row.auditingStatus === '通过' ? 'success' : scope.row.auditingStatus === '未通过' ? 'danger' : 'primary'" |
| | | disable-transitions>{{ scope.row.auditingStatus }}</el-tag> |
| | | </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"/> |
| | | <el-table-column label="审核时间" align="center" prop="auditingTime" width="180"/> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"/> |
| | | <el-table-column label="审核人" align="center" prop="auditingUser" /> |
| | | <el-table-column label="操作" align="center" fixed="right" 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="['default:audit']" |
| | | >审核</el-button> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- v-hasPermi="['system:auditing:edit']"--> |
| | | <!-- >修改</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-s-check" @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['default:audit']" v-if="scope.row.auditingStatus === '待审核'">审核</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-if="scope.row.auditingStatus === '待审核'" v-hasPermi="['system:auditing:edit']">修改</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="运维考核审核" :visible.sync="auditingOpen" width="500px" append-to-body> |
| | | <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="120px"> |
| | | <el-form-item label="运维考核单位"> |
| | | <el-input v-model="auditingForm.unitName" disabled/> |
| | | <el-input v-model="auditingForm.unitName" disabled /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="运维考核规则"> |
| | | <el-input v-model="auditingForm.defaultRuleName" disabled/> |
| | | <el-input v-model="auditingForm.ruleName" type="textarea" autosize disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维考核指标"> |
| | | <el-input v-model="auditingForm.num" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维考核扣分"> |
| | | <el-input v-model="auditingForm.score" disabled/> |
| | | <el-input v-model="auditingForm.score" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="审核结果" prop="auditingStatus"> |
| | | <el-radio v-model="auditingForm.auditingResult" label="pass">通过</el-radio> |
| | | <el-radio v-model="auditingForm.auditingResult" label="return">驳回</el-radio> |
| | | <el-radio v-model="auditingForm.auditingStatus" label="通过">通过</el-radio> |
| | | <el-radio v-model="auditingForm.auditingStatus" label="未通过">驳回</el-radio> |
| | | </el-form-item> |
| | | <el-form-item label="审核说明" prop="remark"> |
| | | <el-input v-model="auditingForm.remark" type="textarea" show-word-limit maxlength="100"/> |
| | | <el-input v-model="auditingForm.remark" type="textarea" show-word-limit maxlength="100" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 新增或修改 --> |
| | | <el-dialog title="运维积分审核" :visible.sync="open" width="700px"append-to-body> |
| | | <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="120px"> |
| | | <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-dialog :title="title" :visible.sync="open" width="700px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="运维考核单位" prop="unitId"> |
| | | <el-select v-model="form.unitId" placeholder="运维考核单位" @change="handleChangeUnit"> |
| | | <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="tempRuleFormList"> |
| | | <el-form-item label="运维考核规则" prop="ruleIdsArray"> |
| | | <div class="row-warp"> |
| | | <div class="row" v-for="(form) in tempRuleFormList"> |
| | | <div class="row"> |
| | | <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> |
| | | <el-cascader ref="cascader" v-model="form.ruleIdsArray" :options="options" @change="handleChange"> |
| | | <template slot-scope="{ data }"> |
| | | <el-tooltip class="item" :disabled="data.label.length < 16 && !data.deductCategory" effect="dark" |
| | | :content="data.label.length < 16 ? data.deductCategory ? data.deductCategory + ' ' + data.calcFraction + (data.calcUnit ? '/' + data.calcUnit : '') : '' : (data.deductCategory ? data.label + ' ' + data.deductCategory + ' ' + data.calcFraction + (data.calcUnit ? '/' + data.calcUnit : '') : data.label)" |
| | | placement="left"> |
| | | <span>{{ data.label }}</span> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-cascader> |
| | | </div> |
| | | </div> |
| | | <div class="row-right"> |
| | | <div class="row-right" v-if="needNum"> |
| | | <div>指标</div> |
| | | <div class="margin-5"> |
| | | <el-input type="number" v-model="form.weight"/> |
| | | <el-input placeholder="请输入" v-model="form.num" @input="handleChangeNum" /> |
| | | </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 label="运维考核扣分" style="width: 51%" prop="score"> |
| | | <el-input v-model="form.score"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitAuditing">确 定</el-button> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listAuditing, getAuditing, delAuditing, addAuditing, updateAuditing,auditing } from "@/api/platform/contract-score"; |
| | | import { listAuditing, getAuditing, delAuditing, addAuditing, updateAuditing, auditing } from "@/api/platform/contract-score"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | import { getRuleListByUnitId, getRule } from "@/api/platform/calculate-rule"; |
| | | |
| | | export default { |
| | | name: "Auditing", |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | value: 'city', |
| | | label: '前端感知源治理工作', |
| | | children: [{ |
| | | value: 'fushun', |
| | | label: '时钟同步', |
| | | }, { |
| | | value: 'rong', |
| | | label: 'OSD标识未修复', |
| | | }, { |
| | | value: 'rong', |
| | | label: '一机一档不合格', |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | needNum: false, |
| | | options: [], |
| | | auditingOpen: false, |
| | | auditingForm: {}, |
| | | unitList: [], |
| | | unitNameList: [ |
| | | {id:2 , value:"成都x运维"} |
| | | ], |
| | | // 考核模板 |
| | | examineList: [ |
| | | {id:1 , value:"车辆考核"}, |
| | | {id:2 , value:"视频考核"} |
| | | { id: 1, value: "车辆考核" }, |
| | | { id: 2, value: "视频考核" } |
| | | ], |
| | | // 临时规则表单 |
| | | tempRuleForm: {}, |
| | | // 临时规则表单列表 |
| | | tempRuleFormList: [{"ruleId": null, "adjustCoefficient": null}], |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | defaultId: null, |
| | | unitId: null, |
| | | auditingStatus: null, |
| | | auditingTime: null, |
| | | auditingUser: null, |
| | | createTime: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | form: { |
| | | score: '', |
| | | temp: '' |
| | | }, |
| | | // 表单校验 |
| | | auditingRules: { |
| | | auditingStatus: [ |
| | | { required: true, message: "请先完成审核结果", trigger: "blur" } |
| | | { required: true, message: "请先完成审核结果", trigger: "blur", }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (value === '待审核') { |
| | | callback(new Error("请先完成审核结果")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | rules: { |
| | | unitId: [ |
| | | { required: true, message: "请选择运维考核单位", trigger: "blur" } |
| | | ], |
| | | ruleIdsArray: [ |
| | | { required: true, message: "请选择运维考核规则", trigger: "blur" } |
| | | ], |
| | | score: [ |
| | | { required: true, message: "分数不能为空", trigger: "blur" } |
| | | ] |
| | | }, |
| | | calcObj: {} |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.getUnitSelect(); |
| | | }, |
| | | methods: { |
| | | handleChange(value) { |
| | | console.log(value); |
| | | /** |
| | | * 选择规则 |
| | | */ |
| | | handleChange() { |
| | | let item = this.$refs['cascader'].getCheckedNodes()[0].data; |
| | | this.calcObj = item; |
| | | this.form.contractId = item.contractId; |
| | | if (item.deductCategory == "扣指定分数") { |
| | | this.needNum = false; |
| | | this.form.score = item.calcFraction; |
| | | } else { |
| | | this.needNum = true; |
| | | this.form.score = ''; |
| | | } |
| | | if (this.form.num != null && this.needNum) { |
| | | this.handleChangeNum(); |
| | | } |
| | | }, |
| | | /** |
| | | * 输入指标 |
| | | */ |
| | | handleChangeNum() { |
| | | if (this.calcObj.deductCategory == "分数乘以数量") { |
| | | this.form.score = Math.floor(this.calcObj.calcFraction * this.form.num * 100) / 100; |
| | | } else if (this.calcObj.deductCategory == "除以数量后乘以分数") { |
| | | this.form.score = Math.floor(Math.ceil(this.form.num / this.calcObj.calcUnit) * this.calcObj.calcFraction * 100) / 100; |
| | | } |
| | | }, |
| | | |
| | | handleChangeUnit(value) { |
| | | getRuleListByUnitId(value).then((res) => { |
| | | this.options = this.getTreeData(res.data); |
| | | }) |
| | | }, |
| | | getTreeData(data) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (data[i].children.length < 1) { |
| | | // children若为空数组,则将children设为undefined |
| | | data[i].children = undefined; |
| | | } else { |
| | | // children若不为空数组,则继续 递归调用 本方法 |
| | | this.getTreeData(data[i].children); |
| | | } |
| | | } |
| | | return data; |
| | | }, |
| | | // 提交审核 |
| | | submitAuditing() { |
| | |
| | | // 打开审核 |
| | | handleAuditing(row) { |
| | | this.auditingOpen = true; |
| | | this.auditingForm = row; |
| | | this.auditingForm.auditingStatus = this.auditingForm.auditingStatus ? this.auditingForm.auditingStatus : null |
| | | this.auditingForm = { ...row }; |
| | | }, |
| | | // 关闭审核 |
| | | closeAuditing() { |
| | |
| | | this.queryParams["createStartTime"] = this.daterangeCreateTime[0]; |
| | | this.queryParams["createEndTime"] = this.daterangeCreateTime[1]; |
| | | } |
| | | console.log("this.queryParams", this.queryParams) |
| | | listAuditing(this.queryParams).then(response => { |
| | | this.auditingList = response.data; |
| | | this.auditingList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | defaultId: null, |
| | | auditingStatus: null, |
| | | remark: null, |
| | | auditingTime: null, |
| | | auditingUser: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | deleted: null |
| | | score: '' |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.single = selection.length !== 1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** 新增按钮操作 */ |
| | |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | if (row.auditingStatus != '待审核') { |
| | | this.$message.warning("该记录已审核,不能修改"); |
| | | return; |
| | | } |
| | | getAuditing(id).then(response => { |
| | | this.form = response.data; |
| | | this.form = { ...response.data }; |
| | | this.open = true; |
| | | this.title = "修改运维考核审核"; |
| | | this.title = "修改运维考核积分"; |
| | | this.handleChangeUnit(this.form.unitId); |
| | | getRule(this.form.ruleId).then(res => { |
| | | this.calcObj = res.data; |
| | | if (this.calcObj.deductCategory != "扣指定分数") { |
| | | this.needNum = true; |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.form.ruleId = this.calcObj.id; |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除运维考核审核编号为"' + ids + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除运维考核审核编号为"' + ids + '"的数据项?').then(function () { |
| | | return delAuditing(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }).catch(() => { }); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('/default-auditing/export', { |
| | | this.download('/contract/score/export', { |
| | | ...this.queryParams |
| | | }, `auditing_${new Date().getTime()}.xlsx`) |
| | | }, `合同考核积分_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | |
| | | .margin-5 { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .row-warp { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .row { |
| | | display: flex; |
| | | flex-direction: row; |
| | |
| | | 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; |
| | | } |
| | | </style> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row> |
| | | <el-col :span="8" v-for="item in workOrderList" :key="item" style="width: 390px;margin-left: 40px;margin-top:20px;"> |
| | | <el-card :body-style="{ padding: '0px' }"> |
| | | <el-row :gutter="20"> |
| | | <el-col :xl="6" :lg="8" :md="12" :sm="24" v-for="item in workOrderList" :key="item" style="margin-bottom: 20px;"> |
| | | <el-card :body-style="{ padding: '0px',display: 'flex' }"> |
| | | <el-image :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" class="image"/> |
| | | <div style="padding-right: 10px;padding-top: 10px;float: right;"> |
| | | <div style="padding-right: 10px;padding-top: 10px;"> |
| | | <el-row> |
| | | <el-col :span="24" class="time">故障类型:<el-tag size="small" type="danger">市政施工</el-tag></el-col> |
| | | </el-row> |
| | |
| | | // 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://192.168.3.87:8080`, |
| | | // target: `http://192.168.3.88:8085`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |