Merge remote-tracking branch 'origin/master'
New file |
| | |
| | | import axios from "./request"; |
| | | |
| | | // 获取通知分页 |
| | | export const getNotifys = (params) => { |
| | | return axios({ |
| | | url: "/notify/page", |
| | | method: "GET", |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | // 获取通知列表 |
| | | export const getNotifyList = () => { |
| | | return axios({ |
| | | url: "/notify/list", |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id获取通知 |
| | | export const getNotifyById = (params) => { |
| | | return axios({ |
| | | url: "/notify/" + params, |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id删除通知 |
| | | export const deleteNotifyById = (params) => { |
| | | return axios({ |
| | | url: "/notify/" + params, |
| | | method: "DELETE" |
| | | }) |
| | | } |
| | | |
| | | // 批量删除通知 |
| | | export const deleteNotifyByIds = (params) => { |
| | | return axios({ |
| | | url: "/notify/batch", |
| | | method: "DELETE", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 修改通知 |
| | | export const editNotify = (params) => { |
| | | return axios({ |
| | | url: "/notify/", |
| | | method: "PUT", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 添加通知 |
| | | export const addNotify = (params) => { |
| | | return axios({ |
| | | url: "/notify/", |
| | | method: "POST", |
| | | data: params |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 根据运维单位查询运维人员详细 |
| | | export function getPeopleByUnitId(id) { |
| | | return request({ |
| | | url: '/yw-people/getPeopleByUnitId/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增运维人员 |
| | | export function addPeople(data) { |
| | | return request({ |
| | |
| | | <div class="button-container"> |
| | | <el-button type="primary" @click="toScreen">可视化大屏</el-button> |
| | | </div> |
| | | <div class="button-container"> |
| | | <el-button type="primary" @click="toSystemB">跳转B系统</el-button> |
| | | </div> |
| | | <div class="button-container"> |
| | | <el-button type="primary" @click="toSystemA">跳转A系统</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | this.$router.push({ |
| | | path: '/screen' |
| | | }) |
| | | }, |
| | | toSystemA() { |
| | | this.$router.push({ |
| | | path: '/screen' |
| | | }) |
| | | }, |
| | | toSystemB() { |
| | | this.$router.push({ |
| | | path: '/screen' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <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" /> |
| | | <el-table-column label="报备内容" align="center" prop="reportContent" show-overflow-tooltip="true" /> |
| | | <el-table-column label="上报材料" align="center" prop="reportMaterials" /> |
| | | <el-table-column label="故障类型" align="center" prop="errorType" /> |
| | | <el-table-column label="审核时间" align="center" prop="auditingTime" width="180"> |
| | |
| | | icon="el-icon-edit" |
| | | @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['system:report:audit']" |
| | | v-if="scope.row.status === 0" |
| | | >审核</el-button> |
| | | <el-button |
| | | size="mini" |
| | |
| | | <el-date-picker v-model="auditingForm.endCreateTime" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="报备内容"> |
| | | <el-input v-model="auditingForm.pointName" disabled /> |
| | | <el-input type="textarea" v-html="auditingForm.reportContent" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="上报材料"> |
| | | <el-upload v-model="auditingForm.reportMaterials" disabled/> |
| | | <el-link :href="auditingForm.reportMaterials" :underline="false">{{ auditingForm.reportMaterials }}</el-link> |
| | | </el-form-item> |
| | | <el-form-item label="审核结果" prop="auditing"> |
| | | <el-radio v-model="auditingForm.auditing" label="pass">通过</el-radio> |
| | | <el-radio v-model="auditingForm.auditing" label="reject">驳回</el-radio> |
| | | <el-form-item label="审核结果"> |
| | | <el-radio-group v-model="auditingForm.status"> |
| | | <el-radio :label="1">通过</el-radio> |
| | | <el-radio :label="2">驳回</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="审核意见" prop="suggest"> |
| | | <el-input v-model="auditingForm.suggest"/> |
| | | <el-input v-model="auditingForm.auditOpinion"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary">确 定</el-button> |
| | | <el-button type="primary" @click="auditingSubmit">确 定</el-button> |
| | | <el-button @click="auditingCancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | reportType: [ |
| | | { required: true, message: "请选择报备类型", trigger: "blur" } |
| | | ], |
| | | errorType: [ |
| | | { required: true, message: "请选择故障类型", trigger: "blur" } |
| | | ], |
| | | expirTime: [ |
| | | { required: true, message: "请选择有效时间", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | |
| | | 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.reportType =row.reportType |
| | | this.auditingForm.endCreateTime =row.endCreateTime |
| | | this.auditingForm.beginCreateTime =row.beginCreateTime |
| | | this.auditingForm.reportMaterials =row.reportMaterials |
| | | }, |
| | | // 远程搜索点位 |
| | | remoteGetPoints(query) { |
| | |
| | | resetQuery() { |
| | | this.daterangeCreateTime = []; |
| | | this.daterangeAuditingTime = []; |
| | | this.queryParams["beginCreateTime"] = null; |
| | | this.queryParams["endCreateTime"] = null; |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改报备"; |
| | | }); |
| | | }, |
| | | /** 审核按钮操作 */ |
| | | auditingSubmit() { |
| | | this.auditingForm.auditingTime = new Date(); |
| | | updateReport(this.auditingForm).then(response => { |
| | | this.$modal.msgSuccess("审核成功"); |
| | | this.auditingOpen = false |
| | | this.getList(); |
| | | this.auditingForm = {} |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/report/export', { |
| | | this.download('report/export', { |
| | | ...this.queryParams |
| | | }, `report_${new Date().getTime()}.xlsx`) |
| | | } |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="超时天数" align="center" prop="timeout"/> |
| | | <el-table-column label="指标" align="center" prop="indicator"> |
| | | <el-table-column label="工单阈值" align="center" prop="indicator"> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in JSON.parse(scope.row.indicator)" :key="item"> |
| | | {{ item.label }}:{{ item.value }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="下发阈值" align="center" prop="indicator"> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in JSON.parse(scope.row.indicator)" :key="item"> |
| | | {{ item.label }}:{{ item.value2 }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input type="number" min="0" max="1000" v-model="form.timeout" placeholder="请输入超时天数"/> |
| | | </el-form-item> |
| | | <el-form-item :label="indicator.label" prop="indexOneValue" v-for="indicator in indicators" label-width="150px"> |
| | | <el-input class="el-input-width" v-model="indicator.value" :placeholder="'请输入' + indicator.label"/> |
| | | <el-input class="el-input-half-width" v-model="indicator.value" placeholder="工单阈值"/> |
| | | <el-input style="float: right;" class="el-input-half-width" v-model="indicator.value2" placeholder="下发阈值"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .el-input-half-width { |
| | | width: calc(50% - 6px); /* 减去一些间隔 */ |
| | | } |
| | | </style> |
| | |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeCreateTime = []; |
| | | this.queryParams.start = null; |
| | | this.queryParams.end = null; |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/unit/export', { |
| | | this.download('yw-unit/export', { |
| | | ...this.queryParams |
| | | }, `unit_${new Date().getTime()}.xlsx`) |
| | | } |
| | |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="故障类型" prop="errorType"> |
| | | <el-select v-model="fastDistributeForm.errorType"> |
| | | <el-option label="市政施工" value="市政施工"/> |
| | | <el-option label="设备故障" value="设备故障"/> |
| | | <el-option label="设备遗失" value="设备遗失"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="数量限制" prop="fastNumLimit"> |
| | | <el-input v-model="fastDistributeForm.fastNumLimit" size="small" type="number" placeholder="此次工单下发最大数量"></el-input> |
| | | </el-form-item> |
| | |
| | | </el-form> |
| | | <el-button slot="reference" type="primary" size="small">快捷下发</el-button> |
| | | </el-popover> |
| | | <el-button size="small" type="primary" @click="page" class="op">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="page">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="handleAdd">新增</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | |
| | | <!-- 添加或修改【请填写功能名称】对话框 --> |
| | | <el-dialog :title="detailName" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="运维单位" prop="unitId"> |
| | | <el-select v-model="form.unitId" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工单来源" prop="source"> |
| | | <el-select |
| | | v-model="form.source" |
| | | 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.value"> |
| | | </el-option> |
| | | </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-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {distributeWorkOrder, fastDistribute} from '@/api/platform/work-order' |
| | | import {distributeWorkOrder, fastDistribute, addWorkOrder, updateWorkOrder} from '@/api/platform/work-order' |
| | | import {unitSelect} from "@/api/platform/unit"; |
| | | import { pointSelectData } from "@/api/platform/point"; |
| | | export default { |
| | | name: 'index', |
| | | data() { |
| | |
| | | fastNumLimit: [ |
| | | { required: true, message: "请输入快速分发数量限制", trigger: "change" } |
| | | ], |
| | | errorType: [ |
| | | { required: true, message: "请故障类型", trigger: "change" } |
| | | ], |
| | | }, |
| | | queryParams: { |
| | | unitId: null, |
| | |
| | | activeIndex: '0', |
| | | loading: false, |
| | | workOrderList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 表单参数 |
| | | form: { |
| | | }, |
| | | // 下拉加载 |
| | | selectLoading: false, |
| | | // 点位list |
| | | pointList: [], |
| | | // 表单校验 |
| | | rules: { |
| | | source: [ |
| | | { required: true, message: "工单来源不能为空", trigger: "blur" } |
| | | ], |
| | | workOrderNo: [ |
| | | { required: true, message: "工单号不能为空", trigger: "blur" } |
| | | ], |
| | | unitId: [ |
| | | { required: true, message: "运维单位不能为空", trigger: "blur" } |
| | | ], |
| | | errorType: [ |
| | | { required: true, message: "请选择故障类型", trigger: "blur" } |
| | | ], |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.page(); |
| | | this.selectUnit(); |
| | | }, |
| | | methods: { |
| | | submitSetting() { |
| | |
| | | handleSelectionChange(selection) { |
| | | this.multipleSelection = selection.map(item => item.id) |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "添加合同"; |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = {}; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateWorkOrder(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.page(); |
| | | }); |
| | | } else { |
| | | addWorkOrder(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.page(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 运维公司下拉数据 |
| | | selectUnit() { |
| | | unitSelect().then(res => { |
| | | this.unitList = res.data; |
| | | }) |
| | | }, |
| | | // 远程搜索点位 |
| | | remoteGetPoints(query) { |
| | | if (query !== '') { |
| | | this.selectLoading = true; |
| | | let data = { |
| | | "keyword": query |
| | | } |
| | | pointSelectData(data).then(res => { |
| | | this.pointList = res.data; |
| | | this.selectLoading = false; |
| | | }) |
| | | } else { |
| | | this.pointList = []; |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |