核算记录去除金额相关列、核算报告扣除金额改为输入并展示考核规则,新增运维平台、资产管理
4个文件已修改
3个文件已添加
2 文件已重命名
1个文件已删除
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 查询平台运行监控列表 |
| | | export function listPlatform(query) { |
| | | return request({ |
| | | url: '/platform/platformMonitor/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 查询平台运行监控详细 |
| | | export function getPlatform(id) { |
| | | return request({ |
| | | url: '/platform/platformMonitor/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增平台运行监控 |
| | | export function addPlatform(data) { |
| | | return request({ |
| | | url: '/platform/platformMonitor', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改平台运行监控 |
| | | export function updatePlatform(data) { |
| | | return request({ |
| | | url: '/platform/platformMonitor', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 删除平台运行监控 |
| | | export function delPlatform(id) { |
| | | return request({ |
| | | url: '/platform/platformMonitor/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/car/equipment', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | | name: 'equipment', |
| | | component: () => import('@/views/system/equipment/index'), |
| | | meta: { title: '资产管理', activeMenu: '/system/equipment' } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/check-result/contract', |
| | | component: Layout, |
| | | hidden: true, |
| | |
| | | <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="checkUnitId"> |
| | | <el-select v-model="queryParams.checkUnitId" clearable @clear="handleQuery" placeholder="请选择单位"> |
| | | <el-select v-model="form.unitId" placeholder="请选择"> |
| | | <el-option |
| | | label="成都x运维" |
| | | value="1"> |
| | | </el-option> |
| | | <el-option |
| | | label="成都a运维" |
| | | value="2"> |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <div v-if="scope.row.unitId == 2">成都x运维</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="总服务费" align="center" prop="totalAmount" /> |
| | | <el-table-column label="扣减服务费" align="center" prop="deductAmount" /> |
| | | <!-- <el-table-column label="总服务费" align="center" prop="totalAmount" /> --> |
| | | <!-- <el-table-column label="扣减服务费" align="center" prop="deductAmount" /> --> |
| | | <el-table-column label="考核分数" align="center" prop="score" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="核算对象" prop="checkUnitId"> |
| | | <el-select v-model="queryParams.checkUnitId" clearable @clear="handleQuery" placeholder="核算对象"> |
| | | <el-select v-model="form.unitId" placeholder="请选择"> |
| | | <el-option |
| | | label="成都x运维" |
| | | value="1"> |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | <el-option |
| | | label="成都a运维" |
| | | value="2"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="核算规则" prop="ruleId"> |
| | | <el-select v-model="form.ruleId" placeholder="请选择"> |
| | | <el-option label="成都x运维考核结果应用规则" value="1">成都x运维考核结果应用规则</el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="核算记录日期" prop="date" > |
| | |
| | | placeholder="请选择核算记录日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="总服务费" prop="totalAmount"> |
| | | <!-- <el-form-item label="总服务费" prop="totalAmount"> |
| | | <el-input v-model="form.totalAmount" placeholder="请输入总服务费" /> |
| | | </el-form-item> |
| | | <el-form-item label="扣减服务费" prop="deductAmount"> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="扣减服务费" prop="deductAmount"> |
| | | <el-input v-model="form.deductAmount" placeholder="请输入扣减服务费" /> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item label="考核分数" prop="score"> |
| | | <el-input v-model="form.score" placeholder="请输入考核分数" /> |
| | | </el-form-item> |
| | |
| | | |
| | | <script> |
| | | import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/platform/calculate-record"; |
| | | |
| | | import {unitSelect} from "@/api/platform/unit"; |
| | | export default { |
| | | name: "Record", |
| | | data() { |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.selectUnit(); |
| | | }, |
| | | methods: { |
| | | // 运维公司下拉数据 |
| | | selectUnit() { |
| | | unitSelect().then(res => { |
| | | this.unitList = res.data; |
| | | }) |
| | | }, |
| | | /** 查询核算记录列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | <el-card class="box-card" v-for="(item) in checkResultList"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{ checkUnitName }}</span> |
| | | <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">详情</el-button> |
| | | <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">{{ "1000元" }}</span></div> |
| | |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="700px" append-to-body> |
| | | <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="760px" append-to-body> |
| | | <el-descriptions class="margin-top" :column="3" border> |
| | | <!-- <template slot="extra">--> |
| | | <!-- <el-button type="primary" size="small">操作</el-button>--> |
| | |
| | | :data="tableData" |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | style="width: 100%"> |
| | | style="width: 100%;text-align:center"> |
| | | <el-table-column |
| | | prop="time" |
| | | label="核算日期" |
| | |
| | | doNotSum> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="score" |
| | | label="扣分系数" |
| | | width="180"> |
| | | <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" |
| | | label="扣减金额(元)"> |
| | | width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input type="number" |
| | | :precision="2" :step="0.1" |
| | | :min="0" :max="1000000" |
| | | v-model="scope.row.money" |
| | | 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 @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 添加或修改考核结果对话框 --> |
| | |
| | | tableData: [{ |
| | | time: '2024-03-03', |
| | | score: '94', |
| | | money: '10', |
| | | value: '0.01', |
| | | money: '', |
| | | description: '每少1分扣当月总服务费的1%。例如:当月考核得分91.5分,扣除当月服务费3.5%的金额', |
| | | }, { |
| | | time: '2024-04-03', |
| | | score: '95', |
| | | money: '0', |
| | | value: '0', |
| | | money: '', |
| | | description: '每少1分扣当月总服务费的1%。例如:当月考核得分91.5分,扣除当月服务费3.5%的金额', |
| | | }, ], |
| | | manualScoreOpen: false, |
| | | manualScoreForm: {}, |
| | |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.detailOpen = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | |
| | | }) |
| | | }, |
| | | handleDetail(row) { |
| | | console.log("row", row) |
| | | this.detail = row; |
| | | this.detail.carOnlineRate = '97%'; |
| | | this.detailTitle = row.checkUnitName + '考核结果'; |
| | | this.detailTitle = this.checkUnitName + '考核结果'; |
| | | this.detailOpen = true; |
| | | |
| | | }, |
| | |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.detailOpen = false; |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | |
| | | if (column.property === 'score') { |
| | | sums[index] = '-'; // 或者其他你想要显示的内容 |
| | | } |
| | | if (column.property === 'value') { |
| | | sums[index] = '-'; // 或者其他你想要显示的内容 |
| | | } |
| | | } else { |
| | | sums[index] = 'N/A'; |
| | | } |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <div class="container"> |
| | | <el-row type="flex" justify="center"> |
| | | <el-col :span="24"> |
| | | <h3 style="color: rgb(104,104,103);padding-top: 20px;padding-bottom: 20px;">资产管理</h3> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row type="flex" justify="center"> |
| | | <el-col :span="6" v-for="(item, index) in equipment" :key="index"> |
| | | <el-link @click="handleDetail(item)" :style="item.name == '' ? 'display:none' : ''"> |
| | | <el-card style="width:150px;height: 150px;text-align: center;"> |
| | | <i style="font-size: 40px;padding: 15px;" :class="item.icon"></i> |
| | | <div>{{ item.name }}</div> |
| | | </el-card> |
| | | </el-link> |
| | | </el-col> |
| | | </el-row> |
| | | <br/> |
| | | </div> |
| | | <br/><br/><br/><br/> |
| | | </div> |
| | | </template> |
| | |
| | | { name: '', icon: 'el-icon-timer', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | { name: '', icon: 'el-icon-money', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | { name: '', icon: 'el-icon-data-analysis', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | ], |
| | | equipment: [ |
| | | { name: '资产管理', icon: 'el-icon-wallet', description: '描述信息', routerUrl: '/car/equipment/index' }, |
| | | { name: '', icon: 'el-icon-pie-chart', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | { name: '', icon: 'el-icon-data-line', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | { name: '', icon: 'el-icon-timer', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | { name: '', icon: 'el-icon-money', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | { name: '', icon: 'el-icon-data-analysis', description: '描述信息', routerUrl: '/car/vehicle-data-monitor/index' }, |
| | | ] |
| | | } |
| | | }, |
New file |
| | |
| | | <template> |
| | | |
| | | <div class="app-container"> |
| | | |
| | | <el-card class="box-card" > |
| | | <el-row type="flex" align="middle" justify="space-between"> |
| | | <el-col :xl="8" :lg="8" :md="10" :sm="8" :xs="6"> |
| | | <div class="icon-container" style="background-color: #5599F7"> |
| | | <i class="el-icon-wallet"></i> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> |
| | | <div class="dashboard"> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> |
| | | <p>设备总数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> |
| | | <p>正常数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> |
| | | <p>异常数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.totalViews }}</h3> |
| | | <p>生成异常工单数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.noStore }}</h3> |
| | | <p>无存储</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.partStore }}</h3> |
| | | <p>部分存储</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.viewsPercentage }}%</h3> |
| | | <p>设备运行率</p > |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form-item label="关键字" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | placeholder="请输入关键字" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="区域" prop="onState"> |
| | | <el-select |
| | | v-model="queryParams.address" |
| | | placeholder="请选择区域" |
| | | clearable |
| | | > |
| | | <el-option label="自贡市" value="自贡市"/> |
| | | <el-option label="沿滩区" value="沿滩区"/> |
| | | <el-option label="大安区" value="大安区"/> |
| | | <el-option label="贡井区" value="贡井区"/> |
| | | <el-option label="自流井区" value="自流井区"/> |
| | | <el-option label="高新区" value="高新区"/> |
| | | <el-option label="荣县" value="荣县"/> |
| | | <el-option label="富顺县" value="富顺县"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设备状态" prop="onState"> |
| | | <el-select |
| | | v-model="queryParams.onState" |
| | | placeholder="设备状态" |
| | | clearable |
| | | style="width: 100px" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.camera_state" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="是否生成异常工单" prop="defaultOrder" label-width="130px"> |
| | | <el-select |
| | | v-model="queryParams.defaultOrder" |
| | | placeholder="是否生成异常工单" |
| | | clearable |
| | | style="width: 170px" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.platform_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <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" :columns="columns"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" align="center" /> |
| | | <el-table-column label="设备名称" align="center" prop="name" width="280" fixed/> |
| | | <el-table-column label="设备编码" align="center" prop="serialNumber" width="180"/> |
| | | <el-table-column label="标签" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/> |
| | | <el-table-column label="区域" align="center" prop="address" width="180" v-if="columns[1].visible"/> |
| | | <el-table-column label="设备状态" align="center" prop="onState" v-if="columns[2].visible"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否生成异常工单" align="center" prop="defaultOrder" width="180" v-if="columns[3].visible"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="数据时间" align="center" prop="installedTime" width="180" v-if="columns[4].visible"/> |
| | | <el-table-column label="管理单位" align="center" prop="managementUnit" width="180" v-if="columns[5].visible"/> |
| | | <el-table-column label="信令时延(ms)" align="center" prop="sipDelay" width="180" v-if="columns[6].visible"/> |
| | | <el-table-column label="视频时延(ms)" align="center" prop="videoDelay" width="180" v-if="columns[7].visible"/> |
| | | <el-table-column label="关键帧时延(ms)" align="center" prop="iframeDelay" width="180" v-if="columns[8].visible"/> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleView(scope.row,scope.index)" |
| | | >详细</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="操作日志详细" :visible.sync="open" width="800px" append-to-body> |
| | | <el-form ref="form" :model="form" label-width="150px" size="mini"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item> |
| | | <el-form-item label="设备名称:">{{ form.name }} </el-form-item> |
| | | <el-form-item label="地区:">{{ form.address }} </el-form-item> |
| | | <el-form-item label="上报部门:">{{ form.deptName }} </el-form-item> |
| | | <el-form-item label="设备状态:"> |
| | | <div v-if="form.onState === 1">可用</div> |
| | | <div v-else-if="form.onState === 2">不可用</div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="地址:">{{ form.address }}</el-form-item> |
| | | <el-form-item label="是否生成异常工单:"> |
| | | <div v-if="form.defaultOrder === 1">是</div> |
| | | <div v-else-if="form.defaultOrder === 2">否</div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="安装时间:">{{ form.installedTime }}</el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="管理单位:">{{ form.managementUnit }}</el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="信令时延(ms):"></el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="视频时延(ms):"></el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="关键帧时延(ms):"></el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="open = false">关 闭</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; |
| | | export default { |
| | | name: "Monitor", |
| | | dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'], |
| | | data() { |
| | | return { |
| | | // 列信息 |
| | | columns: [ |
| | | { key: 0, label: `标签`, visible: true }, |
| | | { key: 1, label: `区域`, visible: true }, |
| | | { key: 2, label: `设备状态`, visible: true }, |
| | | { key: 3, label: `是否生成异常工单`, visible: true }, |
| | | { key: 4, label: `数据时间`, visible: true }, |
| | | { key: 5, label: `管理单位`, visible: true }, |
| | | { key: 6, label: `信令时延`, visible: true }, |
| | | { key: 7, label: `视频时延`, visible: true }, |
| | | { key: 8, label: `关键帧时延`, visible: true } |
| | | ], |
| | | count: { |
| | | totalPosts: 0, |
| | | totalMembers: 0, |
| | | postsPercentage: 0, |
| | | totalViews: 0, |
| | | noStore: 0, |
| | | partStore: 0, |
| | | viewsPercentage: 0 |
| | | }, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 设备资产表格数据 |
| | | monitorList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | serialNumber: null, |
| | | name: null, |
| | | onState: null, |
| | | address: null, |
| | | installedTime: null, |
| | | managementUnit: null, |
| | | defaultOrder: null, |
| | | cameraFunType: 1, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | serialNumber: [ |
| | | { required: true, message: "设备编码不能为空", trigger: "blur" } |
| | | ], |
| | | name: [ |
| | | { required: true, message: "设备名称不能为空", trigger: "blur" } |
| | | ], |
| | | onState: [ |
| | | { required: true, message: "设备状态", trigger: "blur" } |
| | | ], |
| | | address: [ |
| | | { required: true, message: "地址不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getVideoCount(); |
| | | this.getList(); |
| | | this.getCountyList(); |
| | | }, |
| | | methods: { |
| | | /** 查询设备资产列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listMonitor(this.queryParams).then(response => { |
| | | this.monitorList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 查询设备资产统计数 */ |
| | | getVideoCount() { |
| | | videoCount('1').then(response => { |
| | | this.count = response.data; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | serialNumber: null, |
| | | name: null, |
| | | onState: null, |
| | | address: null, |
| | | installedTime: null, |
| | | managementUnit: null, |
| | | defaultOrder: null, |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.queryParams.cameraFunType = 1; |
| | | this.getList(); |
| | | this.getVideoCount(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | 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 = "添加设备资产"; |
| | | }, |
| | | /** 详细按钮操作 */ |
| | | handleView(row) { |
| | | this.open = true; |
| | | this.form = row; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getMonitor(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) { |
| | | updateMonitor(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addMonitor(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 delMonitor(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/monitor/export', { |
| | | ...this.queryParams |
| | | }, `monitor_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | .box-card { |
| | | background-color: #F5F9FE; |
| | | width: 100%; |
| | | margin-bottom: 20px; |
| | | height: 120px |
| | | } |
| | | .icon-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-radius: 20px; |
| | | width: 20%; |
| | | height: 80px; |
| | | margin-left: 5%; |
| | | } |
| | | .el-icon-wallet { |
| | | font-size: 50px; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .dashboard { |
| | | display: flex; |
| | | gap: 10%; |
| | | align-items: center; |
| | | margin-left: -50%; |
| | | } |
| | | |
| | | .dashboard-item { |
| | | text-align: center; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card" > |
| | | <el-row type="flex" align="middle" justify="space-between"> |
| | | <el-col :xl="8" :lg="8" :md="10" :sm="8" :xs="6"> |
| | | <div class="icon-container" style="background-color: #5599F7"> |
| | | <i class="el-icon-connection"></i> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> |
| | | <div class="dashboard"> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> |
| | | <p>设备总数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> |
| | | <p>正常数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> |
| | | <p>异常数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.totalViews }}</h3> |
| | | <p>生成异常工单数</p > |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="平台编码" prop="platformCode"> |
| | | <el-input |
| | | v-model="queryParams.platformCode" |
| | | placeholder="请输入平台编码" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="平台名称" prop="platformName"> |
| | | <el-input |
| | | v-model="queryParams.platformName" |
| | | placeholder="请输入平台名称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设备状态" prop="onState"> |
| | | <el-select |
| | | v-model="queryParams.status" |
| | | placeholder="设备状态" |
| | | clearable |
| | | style="width: 100px" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.camera_state" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="是否生成异常工单" prop="defaultOrder" label-width="130px"> |
| | | <el-select |
| | | v-model="queryParams.status" |
| | | placeholder="是否生成异常工单" |
| | | clearable |
| | | style="width: 170px" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.platform_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </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="['platform:platform: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="['platform:platform: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="['platform:platform: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="['platform:platform:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="platformList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="平台编码" align="center" prop="platformCode" /> |
| | | <el-table-column label="平台名称" align="center" prop="platformName" /> |
| | | <!-- <el-table-column label="平台联系人" align="center" prop="platformContact" /> |
| | | <el-table-column label="平台联系人电话" align="center" prop="platformContactPhone" /> --> |
| | | <el-table-column label="状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.camera_state" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否生成异常工单" align="center" prop="defaultOrder" width="180"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="备注" align="center" prop="remark" /> --> |
| | | <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="['platform:platform:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['platform:platform: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" |
| | | /> |
| | | |
| | | <!-- 添加或修改平台运行监控对话框 --> |
| | | <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="platformCode"> |
| | | <el-input v-model="form.platformCode" placeholder="请输入平台编码" /> |
| | | </el-form-item> |
| | | <el-form-item label="平台名称" prop="platformName"> |
| | | <el-input v-model="form.platformName" placeholder="请输入平台名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="平台联系人" prop="platformContact"> |
| | | <el-input v-model="form.platformContact" placeholder="请输入平台联系人" /> |
| | | </el-form-item> |
| | | <el-form-item label="平台联系人电话" prop="platformContactPhone"> |
| | | <el-input v-model="form.platformContactPhone" placeholder="请输入平台联系人电话" /> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请输入备注" /> |
| | | </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 { listPlatform, getPlatform, delPlatform, addPlatform, updatePlatform } from "@/api/platform/platform"; |
| | | import { videoCount } from "@/api/platform/monitor"; |
| | | export default { |
| | | name: "Platform", |
| | | dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'], |
| | | data() { |
| | | return { |
| | | count: { |
| | | totalPosts: 0, |
| | | totalMembers: 0, |
| | | postsPercentage: 0, |
| | | totalViews: 0, |
| | | noStore: 0, |
| | | partStore: 0, |
| | | viewsPercentage: 0 |
| | | }, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 平台运行监控表格数据 |
| | | platformList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | platformCode: null, |
| | | platformName: null, |
| | | platformContact: null, |
| | | platformContactPhone: null, |
| | | status: null, |
| | | remark: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | platformCode: [ |
| | | { required: true, message: "平台编码不能为空", trigger: "blur" } |
| | | ], |
| | | platformName: [ |
| | | { required: true, message: "平台名称不能为空", trigger: "blur" } |
| | | ], |
| | | platformContact: [ |
| | | { required: true, message: "平台联系人不能为空", trigger: "blur" } |
| | | ], |
| | | platformContactPhone: [ |
| | | { required: true, message: "平台联系人电话不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getVideoCount(); |
| | | }, |
| | | methods: { |
| | | /** 查询平台运行监控列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listPlatform(this.queryParams).then(response => { |
| | | this.platformList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 查询设备资产统计数 */ |
| | | getVideoCount() { |
| | | videoCount('1').then(response => { |
| | | this.count = response.data; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | platformCode: null, |
| | | platformName: null, |
| | | platformContact: null, |
| | | platformContactPhone: null, |
| | | status: null, |
| | | remark: 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 |
| | | getPlatform(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) { |
| | | updatePlatform(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addPlatform(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 delPlatform(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('platform/platform/export', { |
| | | ...this.queryParams |
| | | }, `platform_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | .box-card { |
| | | background-color: #F5F9FE; |
| | | width: 100%; |
| | | margin-bottom: 20px; |
| | | height: 120px |
| | | } |
| | | .icon-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-radius: 20px; |
| | | width: 20%; |
| | | height: 80px; |
| | | margin-left: 5%; |
| | | } |
| | | .el-icon-connection { |
| | | font-size: 50px; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .dashboard { |
| | | display: flex; |
| | | gap: 10%; |
| | | align-items: center; |
| | | margin-left: -50%; |
| | | } |
| | | |
| | | .dashboard-item { |
| | | text-align: center; |
| | | } |
| | | </style> |