Merge remote-tracking branch 'origin/master'
| | |
| | | yarn-debug.log* |
| | | yarn-error.log* |
| | | **/*.log |
| | | pnpm-lock.yaml |
| | | |
| | | tests/**/coverage/ |
| | | tests/e2e/reports |
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 查询违规审核列表 |
| | | export function listAuditing(query) { |
| | | return request({ |
| | | url: '/default-auditing/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 查询违规审核详细 |
| | | export function getAuditing(id) { |
| | | return request({ |
| | | url: '/default-auditing/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增违规审核 |
| | | export function addAuditing(data) { |
| | | return request({ |
| | | url: '/default-auditing', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改违规审核 |
| | | export function updateAuditing(data) { |
| | | return request({ |
| | | url: '/default-auditing', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 删除违规审核 |
| | | export function delAuditing(id) { |
| | | return request({ |
| | | url: '/default-auditing/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 查询违约规则列表 |
| | | export function listRule(data) { |
| | | return request({ |
| | | url: '/default-rule/page', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 查询违约规则详细 |
| | | export function getRule(id) { |
| | | return request({ |
| | | url: '/default-rule/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增违约规则 |
| | | export function addRule(data) { |
| | | return request({ |
| | | url: '/default-rule', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改违约规则 |
| | | export function updateRule(data) { |
| | | return request({ |
| | | url: '/default-rule', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 删除违约规则 |
| | | export function delRule(id) { |
| | | return request({ |
| | | url: '/default-rule/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | // 启用/停用违约规则 |
| | | export function setRule(data) { |
| | | return request({ |
| | | url: '/default-rule/set', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | // 查询运维人员列表 |
| | | export function listPeople(query) { |
| | | return request({ |
| | | url: '/system/yw-people/page', |
| | | url: '/yw-people/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | |
| | | // 查询运维人员详细 |
| | | export function getPeople(id) { |
| | | return request({ |
| | | url: '/system/yw-people/' + id, |
| | | url: '/yw-people/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | // 新增运维人员 |
| | | export function addPeople(data) { |
| | | return request({ |
| | | url: '/system/yw-people', |
| | | url: '/yw-people', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | |
| | | // 修改运维人员 |
| | | export function updatePeople(data) { |
| | | return request({ |
| | | url: '/system/yw-people', |
| | | url: '/yw-people', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | |
| | | // 删除运维人员 |
| | | export function delPeople(id) { |
| | | return request({ |
| | | url: '/system/yw-people/' + id, |
| | | url: '/yw-people/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 查询运维点位列表 |
| | | export function listPoint(query) { |
| | | return request({ |
| | | url: '/yw-point/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 查询运维点位详细 |
| | | export function getPoint(id) { |
| | | return request({ |
| | | url: '/yw-point/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增运维点位 |
| | | export function addPoint(data) { |
| | | return request({ |
| | | url: '/yw-point', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 新增运维点位-批量 |
| | | export function addPointBatch(data) { |
| | | return request({ |
| | | url: '/yw-point/batch', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改运维点位 |
| | | export function updatePoint(data) { |
| | | return request({ |
| | | url: '/yw-point', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 删除运维点位 |
| | | export function delPoint(id) { |
| | | return request({ |
| | | url: '/yw-point/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | // 查询运维单位列表 |
| | | export function listUnit(query) { |
| | | return request({ |
| | | url: '/system/yw-unit/page', |
| | | method: 'get', |
| | | params: query |
| | | url: '/yw-unit/page', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | // 查询运维单位详细 |
| | | export function getUnit(id) { |
| | | return request({ |
| | | url: '/system/yw-unit/' + id, |
| | | url: '/yw-unit/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | // 新增运维单位 |
| | | export function addUnit(data) { |
| | | return request({ |
| | | url: '/system/yw-unit', |
| | | url: '/yw-unit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | |
| | | // 修改运维单位 |
| | | export function updateUnit(data) { |
| | | return request({ |
| | | url: '/system/yw-unit', |
| | | url: '/yw-unit', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | |
| | | // 删除运维单位 |
| | | export function delUnit(id) { |
| | | return request({ |
| | | url: '/system/yw-unit/' + id, |
| | | url: '/yw-unit/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | // 获取运维单位下拉列表 |
| | | export function unitSelect() { |
| | | return request({ |
| | | url: '/yw-unit/list', |
| | | method: 'get' |
| | | }) |
| | | } |
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 查询运维工单列表 |
| | | export function listWorkOrder(query) { |
| | | return request({ |
| | | url: '/work-order/page', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | // 查询运维工单详细 |
| | | export function getWorkOrder(id) { |
| | | return request({ |
| | | url: '/work-order/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增运维工单 |
| | | export function addWorkOrder(data) { |
| | | return request({ |
| | | url: '/work-order', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改运维工单 |
| | | export function updateWorkOrder(data) { |
| | | return request({ |
| | | url: '/work-order', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 删除运维工单 |
| | | export function delWorkOrder(id) { |
| | | return request({ |
| | | url: '/work-order/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | // 审核工单 |
| | | export function auditing(data) { |
| | | return request({ |
| | | url: '/work-order/auditing', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 工单运维情况 |
| | | export function ywCondition(data) { |
| | | return request({ |
| | | url: '/work-order/yw-condition', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | size: Cookies.get('size') || 'medium' // set element-ui default size |
| | | }) |
| | | |
| | | Vue.config.productionTip = false |
| | | Vue.config.productionTip = true |
| | | |
| | | new Vue({ |
| | | el: '#app', |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="违规" prop="defaultId"> |
| | | <el-input |
| | | v-model="queryParams.defaultId" |
| | | placeholder="请输入违规" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="审核时间"> |
| | | <el-date-picker |
| | | v-model="daterangeAuditingTime" |
| | | 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 label="审核人" prop="auditingUser"> |
| | | <el-input |
| | | v-model="queryParams.auditingUser" |
| | | placeholder="请输入审核人" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </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-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:auditing: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:auditing: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:auditing: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:auditing: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="defaultId" /> |
| | | <el-table-column label="审核状态" align="center" prop="auditingStatus" /> |
| | | <el-table-column label="审核说明" align="center" prop="remark" /> |
| | | <el-table-column label="审核时间" align="center" prop="auditingTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.auditingTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="审核人" align="center" prop="auditingUser" /> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </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:auditing:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:auditing: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> |
| | | <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 { listAuditing, getAuditing, delAuditing, addAuditing, updateAuditing } from "@/api/platform/default-auditing"; |
| | | |
| | | export default { |
| | | name: "Auditing", |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 违规审核表格数据 |
| | | auditingList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 逻辑删除时间范围 |
| | | daterangeAuditingTime: [], |
| | | // 逻辑删除时间范围 |
| | | daterangeCreateTime: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | defaultId: null, |
| | | auditingStatus: null, |
| | | auditingTime: null, |
| | | auditingUser: null, |
| | | createTime: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | defaultId: [ |
| | | { required: true, message: "违规不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 查询违规审核列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | this.queryParams.params = {}; |
| | | if (null != this.daterangeAuditingTime && '' != this.daterangeAuditingTime) { |
| | | this.queryParams.params["beginAuditingTime"] = this.daterangeAuditingTime[0]; |
| | | this.queryParams.params["endAuditingTime"] = this.daterangeAuditingTime[1]; |
| | | } |
| | | if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { |
| | | this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0]; |
| | | this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1]; |
| | | } |
| | | listAuditing(this.queryParams).then(response => { |
| | | this.auditingList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | defaultId: null, |
| | | auditingStatus: null, |
| | | remark: null, |
| | | auditingTime: null, |
| | | auditingUser: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | deleted: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeAuditingTime = []; |
| | | this.daterangeCreateTime = []; |
| | | 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 |
| | | getAuditing(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) { |
| | | updateAuditing(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addAuditing(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 delAuditing(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('/default-auditing/export', { |
| | | ...this.queryParams |
| | | }, `auditing_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="规则名称" prop="ruleName"> |
| | | <el-input |
| | | v-model="queryParams.ruleName" |
| | | placeholder="请输入规则名称" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="创建时间"> |
| | | <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-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:rule: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:rule: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:rule: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:rule:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="规则名称" align="center" prop="ruleName" /> |
| | | <el-table-column label="规则描述" align="center" prop="ruleDesc" /> |
| | | <el-table-column label="规则状态" align="center" prop="ruleStatus" /> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="scope.row.ruleStatus === '未启用'" |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-zoom-in" |
| | | @click="handleUse(scope.row.id, true)" |
| | | v-hasPermi="['system:rule:use']" |
| | | >启用</el-button> |
| | | <el-button |
| | | v-else |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-zoom-in" |
| | | @click="handleUse(scope.row.id, false)" |
| | | v-hasPermi="['system:rule:use']" |
| | | >停用</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-zoom-in" |
| | | @click="handleDetail(scope.row)" |
| | | v-hasPermi="['system:rule:detail']" |
| | | >详情</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:rule:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:rule: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="规则详情" :visible.sync="detailOpen" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="规则名称" prop="ruleName"> |
| | | <el-input disabled v-model="form.ruleName" placeholder="请输入规则名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="规则描述" prop="ruleDesc"> |
| | | <el-input disabled v-model="form.ruleDesc" placeholder="请输入规则描述" /> |
| | | </el-form-item> |
| | | <el-form-item label="规则设置"> |
| | | <div style="margin-top: 30px"> |
| | | <div class="line"> |
| | | <div class="line-left">工单未及时处理数:</div> |
| | | <div class="line-right"><el-input disabled v-model="jsonRule.overTime" type="number"/></div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="line-left">运维失败数量超过:</div> |
| | | <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="number"/></div> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDetail">关闭</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 添加或修改违约规则对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="规则名称" prop="ruleName"> |
| | | <el-input v-model="form.ruleName" placeholder="请输入规则名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="规则描述" prop="ruleDesc"> |
| | | <el-input v-model="form.ruleDesc" placeholder="请输入规则描述" /> |
| | | </el-form-item> |
| | | <el-form-item label="规则设置"> |
| | | <div style="margin-top: 30px"> |
| | | <div class="line"> |
| | | <div class="line-left">工单未及时处理数:</div> |
| | | <div class="line-right"><el-input v-model="jsonRule.overTime" type="number"/></div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="line-left">运维失败数量超过:</div> |
| | | <div class="line-right"><el-input v-model="jsonRule.failNum" type="number"/></div> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listRule, getRule, delRule, addRule, updateRule, setRule } from "@/api/platform/default-rule"; |
| | | |
| | | export default { |
| | | name: "Rule", |
| | | data() { |
| | | return { |
| | | detailOpen: false, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 违约规则表格数据 |
| | | ruleList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 规则状态:启用、未启用时间范围 |
| | | daterangeCreateTime: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | ruleName: null, |
| | | ruleStatus: null, |
| | | createTime: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | jsonRule: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | ruleName: [ |
| | | { required: true, message: "规则名称不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 查询违约规则列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { |
| | | this.queryParams["start"] = this.daterangeCreateTime[0]; |
| | | this.queryParams["end"] = this.daterangeCreateTime[1]; |
| | | } |
| | | listRule(this.queryParams).then(response => { |
| | | this.ruleList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | ruleName: null, |
| | | ruleDetail: null, |
| | | ruleDesc: null, |
| | | ruleStatus: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | deleted: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeCreateTime = []; |
| | | 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 |
| | | getRule(id).then(response => { |
| | | this.form = response.data; |
| | | this.jsonRule = JSON.parse(this.form.ruleDetail) |
| | | this.open = true; |
| | | this.title = "修改违约规则"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.jsonRule.overtime = this.jsonRule.overtime ? this.jsonRule.overtime : 0; |
| | | this.jsonRule.failNum = this.jsonRule.failNum ? this.jsonRule.failNum : 0; |
| | | this.form.ruleDetail = JSON.stringify(this.jsonRule); |
| | | if (this.form.id != null) { |
| | | updateRule(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addRule(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 启用、停用 |
| | | handleUse(id, flag) { |
| | | let data = { |
| | | id: id, |
| | | flag: flag |
| | | } |
| | | setRule(data).then(res => { |
| | | if (res.code === 200) { |
| | | this.$modal.msgSuccess("设置成功"); |
| | | } else { |
| | | this.$modal.msgError(res.msg); |
| | | } |
| | | this.getList(); |
| | | }) |
| | | }, |
| | | // 详情按钮 |
| | | handleDetail(row) { |
| | | this.detailOpen = true; |
| | | this.form = row; |
| | | this.jsonRule = JSON.parse(this.form.ruleDetail); |
| | | }, |
| | | // 关闭详情 |
| | | closeDetail() { |
| | | this.jsonRule = {}; |
| | | this.form = {}; |
| | | this.detailOpen = false; |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除违约规则编号为"' + ids + '"的数据项?').then(function() { |
| | | return delRule(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/rule/export', { |
| | | ...this.queryParams |
| | | }, `rule_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .line { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | .line-left { |
| | | width: 200px; |
| | | text-align: center; |
| | | } |
| | | .line-right { |
| | | width: 100px; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="点位名称" prop="pointName"> |
| | | <el-input |
| | | v-model="queryParams.pointName" |
| | | placeholder="请输入点位名称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="点位开始时间" prop="startTime"> |
| | | <el-date-picker clearable |
| | | v-model="queryParams.startTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请选择点位开始时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="点位结束时间" prop="endTime"> |
| | | <el-date-picker clearable |
| | | v-model="queryParams.endTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | 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="['x:point: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="['x:point: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="['x:point: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="['x:point:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="点位名称" align="center" prop="pointName" /> |
| | | <el-table-column label="点位开始时间" align="center" prop="startTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="点位结束时间" align="center" prop="endTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="运维单位" align="center" prop="unitId" /> |
| | | <el-table-column label="运维状态" align="center" prop="status" /> |
| | | <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="['x:point:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['x:point: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="900px" append-to-body> |
| | | <el-form ref="form" :model="tempForm" :rules="rules" label-width="120px"> |
| | | <el-form-item label="点位名称" prop="pointName"> |
| | | <el-input v-model="tempForm.pointName" placeholder="请输入点位名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitId"> |
| | | <el-select v-model="tempForm.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 |
| | | @change="dateChange" |
| | | v-model="tempForm.timezone" |
| | | type="daterange" |
| | | align="right" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <div style="display: flex;flex-direction: row-reverse"> |
| | | <el-button @click="nextAdd" type="primary" plain>继续添加</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <div class="point-row" v-for="(point,index) in tempFormList"> |
| | | <div class="row-item"> |
| | | <el-input :disabled="editingIndex!==index" v-model="point.pointName" placeholder="点位名称"></el-input> |
| | | </div> |
| | | <div class="row-item"> |
| | | <el-select :disabled="editingIndex!==index" v-model="point.unitId" placeholder="运维单位"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="row-item"> |
| | | <el-date-picker |
| | | :disabled="editingIndex!==index" |
| | | v-model="point.timezone" |
| | | type="daterange" |
| | | align="right" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | <div class="row-item"> |
| | | <el-button v-show="editingIndex!==index" @click="editPointItem(index)" type="danger" size="small" plain>修改</el-button> |
| | | <el-button v-show="editingIndex===index" @click="editFinishItem(index)" type="success" size="small" plain>完成</el-button> |
| | | </div> |
| | | </div> |
| | | </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> |
| | | |
| | | <!-- 修改运维点位对话框 --> |
| | | <el-dialog :title="title" :visible.sync="editOpen" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="点位名称" prop="pointName"> |
| | | <el-input v-model="form.pointName" placeholder="请输入点位名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitId"> |
| | | <el-select v-model="form.unitId" placeholder="运维单位"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="点位时区" prop="timezone"> |
| | | <el-date-picker |
| | | @change="dateChange" |
| | | v-model="form.timezone" |
| | | type="daterange" |
| | | align="right" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="updateCancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listPoint, getPoint, delPoint, addPoint, addPointBatch, updatePoint } from "@/api/platform/point"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | |
| | | export default { |
| | | name: "Point", |
| | | data() { |
| | | return { |
| | | // 正在修改第几个 |
| | | editingIndex: null, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 运维点位表格数据 |
| | | pointList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 修改弹窗 |
| | | editOpen: false, |
| | | // 运维单位 |
| | | unitList: [], |
| | | // 运维时区 |
| | | timezone:[], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | pointName: null, |
| | | startTime: null, |
| | | endTime: null, |
| | | unitId: null, |
| | | status: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 批量表单内容 |
| | | formList:[], |
| | | // 临时表单数据 |
| | | tempForm: {}, |
| | | // 临时表单数据列表 |
| | | tempFormList: [], |
| | | // 表单校验 |
| | | rules: { |
| | | pointName: [ |
| | | { required: true, message: "点位名称不能为空", trigger: "blur" } |
| | | ], |
| | | timezone: [ |
| | | { required: true, message: "点位时区不能为空", trigger: "blur" } |
| | | ], |
| | | unitId: [ |
| | | { required: true, message: "运维单位不能为空", trigger: "change" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getUnitSelect(); |
| | | }, |
| | | methods: { |
| | | // 点位项修改完成 |
| | | editFinishItem(index) { |
| | | this.editingIndex = null; |
| | | let form = this.tempFormList[index]; |
| | | form.startTime = form.timezone[0]; |
| | | form.endTime = form.timezone[1]; |
| | | this.formList[index] = form; |
| | | }, |
| | | // 点位项修改 |
| | | editPointItem(index) { |
| | | if (this.editingIndex !== index && this.editingIndex !== null) { |
| | | this.$modal.msgWarning("请先完成上一个修改"); |
| | | } else { |
| | | this.editingIndex = index; |
| | | this.tempFormList[index] = this.formList[index]; |
| | | } |
| | | }, |
| | | // 时间选择发生变化 |
| | | dateChange() { |
| | | this.tempForm.startTime = this.tempForm.timezone[0]; |
| | | this.tempForm.endTime = this.tempForm.timezone[1]; |
| | | }, |
| | | // 继续添加点位 |
| | | nextAdd() { |
| | | this.formList.push(this.tempForm); |
| | | this.tempFormList.push(this.tempForm); |
| | | this.tempForm = {}; |
| | | }, |
| | | getUnitSelect() { |
| | | // 运维单位下拉列表 |
| | | unitSelect().then((res) => { |
| | | this.unitList = res.data; |
| | | }) |
| | | }, |
| | | /** 查询运维点位列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listPoint(this.queryParams).then(response => { |
| | | this.pointList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | updateCancel() { |
| | | this.editOpen = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | pointName: null, |
| | | startTime: null, |
| | | endTime: null, |
| | | unitId: 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 |
| | | getPoint(id).then(response => { |
| | | this.form = response.data; |
| | | this.form.timezone = [this.form.startTime, this.form.endTime] |
| | | this.editOpen = true; |
| | | this.title = "修改运维点位"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | if (this.formList.length > 0) { |
| | | // 批量增加 |
| | | if (this.formList.every(item => !item.hasOwnProperty("id"))) { |
| | | addPointBatch(this.formList).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | // 重置 |
| | | this.tempForm = {}; |
| | | this.tempFormList = []; |
| | | this.formList = []; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | }else { |
| | | if (this.form.id != null) { |
| | | updatePoint(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.editOpen = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addPoint(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 delPoint(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('x/point/export', { |
| | | ...this.queryParams |
| | | }, `point_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .point-row { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .row-item { |
| | | margin-right: 5px; |
| | | } |
| | | .row-item:nth-last-child { |
| | | margin-right: 0; |
| | | } |
| | | </style> |
| | |
| | | v-model="queryParams.unitCode" |
| | | placeholder="请输入单位编码" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | v-model="queryParams.unitName" |
| | | placeholder="请输入单位名称" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | <el-date-picker |
| | | v-model="daterangeCreateTime" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | |
| | | |
| | | <el-table v-loading="loading" :data="unitList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="主键" align="center" prop="id" /> |
| | | <el-table-column label="单位编码" align="center" prop="unitCode" /> |
| | | <el-table-column label="单位名称" align="center" prop="unitName" /> |
| | | <el-table-column label="单位联系人" align="center" prop="unitContact" /> |
| | | <el-table-column label="单位联系人电话" align="center" prop="unitContactPhone" /> |
| | | <el-table-column label="单位管理员账号" align="center" prop="unitAdminAccount" /> |
| | | <el-table-column label="备注" align="center" prop="remark" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="添加时间" align="center" prop="createTime" /> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | |
| | | <!-- 添加或修改运维单位对话框 --> |
| | | <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 ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="单位编码" prop="unitCode"> |
| | | <el-input v-model="form.unitCode" placeholder="请输入单位编码" /> |
| | | </el-form-item> |
| | | <el-form-item label="单位名称" prop="unitName"> |
| | | <el-input v-model="form.unitName" placeholder="请输入单位名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="单位账号" prop="unitAdminAccount"> |
| | | <el-input v-model="form.unitAdminAccount" placeholder="请输入单位管理员账号" /> |
| | | </el-form-item> |
| | | <el-form-item label="单位联系人" prop="unitContact"> |
| | | <el-input v-model="form.unitContact" placeholder="请输入单位联系人" /> |
| | | </el-form-item> |
| | | <el-form-item label="单位联系人电话" prop="unitContactPhone"> |
| | | <el-form-item label="联系人电话" prop="unitContactPhone"> |
| | | <el-input v-model="form.unitContactPhone" placeholder="请输入单位联系人电话" /> |
| | | </el-form-item> |
| | | <el-form-item label="单位管理员账号" prop="unitAdminAccount"> |
| | | <el-input v-model="form.unitAdminAccount" placeholder="请输入单位管理员账号" /> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请输入备注" /> |
| | | <el-input v-model="form.remark" maxlength="100" show-word-limit rows="3" type="textarea" placeholder="备注信息" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | pageSize: 10, |
| | | unitCode: null, |
| | | unitName: null, |
| | | createTime: null, |
| | | start: null, |
| | | end: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | |
| | | } |
| | | }; |
| | | }, |
| | | // computed: { |
| | | // unitAdminAccount:{ |
| | | // get: function() { |
| | | // let value = this.form.unitCode ? this.form.unitCode + '_admin' : "" |
| | | // this.form.unitAdminAccount = value |
| | | // return value |
| | | // }, |
| | | // set:function (newValue) { |
| | | // this.unitAdminAccount = newValue; |
| | | // this.form.unitAdminAccount = newValue |
| | | // } |
| | | // } |
| | | // }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | |
| | | /** 查询运维单位列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | this.queryParams.params = {}; |
| | | // this.queryParams = {}; |
| | | if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) { |
| | | this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0]; |
| | | this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1]; |
| | | this.queryParams.start = this.daterangeCreateTime[0]; |
| | | this.queryParams.end = this.daterangeCreateTime[1]; |
| | | } |
| | | listUnit(this.queryParams).then(response => { |
| | | this.unitList = response.rows; |
| | | this.unitList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
File was renamed from src/views/system/people/index.vue |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> |
| | | <el-form-item label="运维人员编号" prop="ywPersonCode"> |
| | | <el-input |
| | | v-model="queryParams.ywPersonCode" |
| | | placeholder="请输入运维人员编号" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | v-model="queryParams.ywPersonName" |
| | | placeholder="请输入运维人员姓名" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="所属运维单位" prop="belongUnit"> |
| | | <el-input |
| | | v-model="queryParams.belongUnit" |
| | | placeholder="请输入所属运维单位" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-select v-model="queryParams.belongUnit" @change="handleQuery" clearable placeholder="所属运维单位"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | |
| | | |
| | | <el-table v-loading="loading" :data="peopleList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="主键" align="center" prop="id" /> |
| | | <el-table-column label="运维人员编号" align="center" prop="ywPersonCode" /> |
| | | <el-table-column label="运维人员姓名" align="center" prop="ywPersonName" /> |
| | | <el-table-column label="运维人员账号" align="center" prop="ywPersonAccount" /> |
| | | <el-table-column label="所属运维单位" align="center" prop="belongUnit" /> |
| | | <el-table-column label="联系电话" align="center" prop="phone" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | |
| | | <!-- 添加或修改运维人员对话框 --> |
| | | <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="ywPersonCode"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="人员编号" prop="ywPersonCode"> |
| | | <el-input v-model="form.ywPersonCode" placeholder="请输入运维人员编号" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员姓名" prop="ywPersonName"> |
| | | <el-form-item label="人员姓名" prop="ywPersonName"> |
| | | <el-input v-model="form.ywPersonName" placeholder="请输入运维人员姓名" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员账号" prop="ywPersonAccount"> |
| | | <el-form-item label="人员账号" prop="ywPersonAccount"> |
| | | <el-input v-model="form.ywPersonAccount" placeholder="请输入运维人员账号" /> |
| | | </el-form-item> |
| | | <el-form-item label="所属运维单位" prop="belongUnit"> |
| | | <el-input v-model="form.belongUnit" placeholder="请输入所属运维单位" /> |
| | | <el-form-item label="所属单位" prop="belongUnit"> |
| | | <el-select v-model="form.belongUnit" 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="phone"> |
| | | <el-input v-model="form.phone" placeholder="请输入联系电话" /> |
| | |
| | | |
| | | <script> |
| | | import { listPeople, getPeople, delPeople, addPeople, updatePeople } from "@/api/platform/people"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | |
| | | export default { |
| | | name: "People", |
| | |
| | | ywPersonName: null, |
| | | belongUnit: null, |
| | | }, |
| | | // 运维单位 |
| | | unitList: [], |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | |
| | | belongUnit: [ |
| | | { required: true, message: "所属运维单位不能为空", trigger: "blur" } |
| | | ], |
| | | phone: [ |
| | | { required: true, message: "联系电话不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getUnitSelect() |
| | | }, |
| | | methods: { |
| | | /** 查询运维人员列表 */ |
| | | getUnitSelect() { |
| | | // 运维单位下拉列表 |
| | | unitSelect().then((res) => { |
| | | this.unitList = res.data; |
| | | }) |
| | | }, |
| | | |
| | | /** 查询运维人员分页 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listPeople(this.queryParams).then(response => { |
| | | this.peopleList = response.rows; |
| | | this.peopleList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
New file |
| | |
| | | <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="workOrderNo"> |
| | | <el-input |
| | | v-model="queryParams.workOrderNo" |
| | | placeholder="请输入工单号" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="运维处理时间"> |
| | | <el-date-picker |
| | | clearable |
| | | @clear="handleQuery" |
| | | v-model="daterangeYwHandleTime" |
| | | 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="['x:work-order: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="['x:work-order: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="['x:work-order: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="['x:work-order:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="workOrderList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="工单号" align="center" prop="workOrderNo" width="170"/> |
| | | <el-table-column label="工单来源" align="center" prop="source" width="170"/> |
| | | <el-table-column label="故障类型" align="center" prop="errorType" width="170"/> |
| | | <el-table-column label="运维单位" align="center" prop="unitName" width="150"/> |
| | | <el-table-column label="运维人员" align="center" prop="ywPeopleName" /> |
| | | <el-table-column label="运维处理时间" align="center" prop="ywHandleTime" width="180"/> |
| | | <el-table-column label="运维结果" align="center" prop="ywResult" /> |
| | | <el-table-column label="运维情况" align="center" prop="ywCondition" width="150"/> |
| | | <el-table-column label="运维检测结果" align="center" prop="ywCheckResult" width="230"/> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"/> |
| | | |
| | | <el-table-column label="操作" fixed="right" width="150" 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="['x:work-order:edit']"--> |
| | | <!-- >修改</el-button>--> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['x:work-order:remove']" |
| | | >审核</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | @click="handleYwCondition(scope.row)" |
| | | v-hasPermi="['x:work-order:remove']" |
| | | >运维情况</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | @click="handleYwResult(scope.row)" |
| | | v-hasPermi="['x:work-order:remove']" |
| | | >运维结果</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | @click="handleCheckResult(scope.row)" |
| | | v-hasPermi="['x:work-order: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="工单审核" :visible.sync="auditingOpen" width="500px" append-to-body> |
| | | <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="80px"> |
| | | <el-form-item label="工单号" prop="workOrderNo"> |
| | | <el-input v-model="auditingForm.workOrderNo" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitName"> |
| | | <el-input v-model="auditingForm.unitName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员" prop="ywPeopleName"> |
| | | <el-input v-model="auditingForm.ywPeopleName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="审核结果" prop="auditingResult"> |
| | | <el-radio v-model="auditingForm.auditingResult" label="pass">通过</el-radio> |
| | | <el-radio v-model="auditingForm.auditingResult" label="return">驳回</el-radio> |
| | | </el-form-item> |
| | | <el-form-item label="审核备注" prop="auditingRemark"> |
| | | <el-input v-model="auditingForm.auditingRemark" type="textarea" maxlength="30" show-word-limit/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitAuditing">确 定</el-button> |
| | | <el-button @click="cancelAuditing">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="运维情况记录" :visible.sync="ywConditionOpen" width="500px" append-to-body> |
| | | <el-form ref="ywConditionForm" :model="ywConditionForm" :rules="ywConditionRules" label-width="80px"> |
| | | <el-form-item label="工单号" prop="workOrderNo"> |
| | | <el-input v-model="ywConditionForm.workOrderNo" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitName"> |
| | | <el-input v-model="ywConditionForm.unitName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员" prop="ywPeopleName"> |
| | | <el-input v-model="ywConditionForm.ywPeopleName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维情况" prop="ywCondition"> |
| | | <el-input v-model="ywConditionForm.ywCondition" type="textarea" maxlength="150" show-word-limit/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitYwCondition">确 定</el-button> |
| | | <el-button @click="cancelYwCondition">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-dialog title="运维结果记录" :visible.sync="ywResultOpen" width="500px" append-to-body> |
| | | <el-form ref="ywResultForm" :model="ywResultForm" :rules="ywResultRules" label-width="80px"> |
| | | <el-form-item label="工单号" prop="workOrderNo"> |
| | | <el-input v-model="ywResultForm.workOrderNo" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitName"> |
| | | <el-input v-model="ywResultForm.unitName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员" prop="ywPeopleName"> |
| | | <el-input v-model="ywResultForm.ywPeopleName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维结果" prop="ywResult"> |
| | | <el-input v-model="ywResultForm.ywResult" type="textarea" maxlength="150" show-word-limit/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitYwResult">确 定</el-button> |
| | | <el-button @click="cancelYwResult">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="运维检测结果" :visible.sync="checkResultOpen" width="500px" append-to-body> |
| | | <el-form ref="ywResultForm" :model="checkResultForm" :rules="checkResultRules" label-width="120px"> |
| | | <el-form-item label="工单号" prop="workOrderNo"> |
| | | <el-input v-model="checkResultForm.workOrderNo" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitName"> |
| | | <el-input v-model="checkResultForm.unitName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员" prop="ywPeopleName"> |
| | | <el-input v-model="checkResultForm.ywPeopleName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="运维检测结果" prop="ywCheckResult"> |
| | | <el-input v-model="checkResultForm.ywCheckResult" type="textarea" maxlength="150" show-word-limit/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitYwResult">确 定</el-button> |
| | | <el-button @click="cancelYwResult">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 添加或修改运维工单对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="工单号" prop="workOrderNo"> |
| | | <el-input v-model="form.workOrderNo" placeholder="请输入工单号" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维处理时间" prop="ywHandleTime"> |
| | | <el-date-picker clearable |
| | | v-model="form.ywHandleTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请选择运维处理时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="运维情况" prop="ywCondition"> |
| | | <el-input v-model="form.ywCondition" type="textarea" placeholder="请输入内容" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维检测结果" prop="ywCheckResult"> |
| | | <el-input v-model="form.ywCheckResult" type="textarea" 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 { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition } from "@/api/platform/work-order"; |
| | | |
| | | export default { |
| | | name: "Work-order", |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 运维工单表格数据 |
| | | workOrderList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 运维检测结果时间范围 |
| | | daterangeYwHandleTime: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | workOrderNo: null, |
| | | unitId: null, |
| | | ywPeopleId: null, |
| | | ywHandleTime: null, |
| | | ywResult: null, |
| | | ywCondition: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 审核表单 |
| | | auditingForm: {}, |
| | | auditingOpen: false, |
| | | // 运维情况表单 |
| | | ywConditionForm: {}, |
| | | ywConditionOpen: false, |
| | | // 运维结果表单 |
| | | ywResultForm: { |
| | | |
| | | }, |
| | | ywResultOpen: false, |
| | | // 运维检测结果 |
| | | checkResultForm: { |
| | | |
| | | }, |
| | | checkResultOpen: false, |
| | | // 审核表单校验 |
| | | auditingRules: { |
| | | auditingResult: [ |
| | | { required: true, message: "审核结果不能为空", trigger: "blur" } |
| | | ], |
| | | }, |
| | | // 运维情况校验 |
| | | ywConditionRules: { |
| | | ywCondition: [ |
| | | { required: true, message: "运维情况不能为空", trigger: "blur" } |
| | | ], |
| | | }, |
| | | // 运维结果校验 |
| | | ywResultRules: { |
| | | ywResult: [ |
| | | { required: true, message: "运维结果不能为空", trigger: "blur" } |
| | | ], |
| | | }, |
| | | // 运维检测结果校验 |
| | | checkResultRules: { |
| | | ywCheckResult: [ |
| | | { required: true, message: "运维检测结果不能为空", trigger: "blur" } |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | // 审核按钮 |
| | | handleAuditing(row) { |
| | | this.auditingForm = row; |
| | | this.auditingOpen = true; |
| | | }, |
| | | // 运维情况按钮 |
| | | handleYwCondition(row) { |
| | | this.ywConditionForm = row; |
| | | this.ywConditionOpen = true; |
| | | }, |
| | | // 运维结果按钮 |
| | | handleYwResult(row) { |
| | | this.ywResultForm = row; |
| | | this.ywResultOpen = true; |
| | | }, |
| | | // 运维检测结果按钮 |
| | | handleCheckResult(row) { |
| | | this.checkResultForm = row; |
| | | this.checkResultOpen = true; |
| | | }, |
| | | // 提交审核 |
| | | submitAuditing() { |
| | | this.$refs["auditingForm"].validate(valid => { |
| | | if (valid) { |
| | | auditing(this.auditingForm).then(res => { |
| | | this.auditingOpen = false; |
| | | this.$modal.msgSuccess("操作成功"); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 取消审核 |
| | | cancelAuditing() { |
| | | this.auditingForm = {}; |
| | | this.auditingOpen = false; |
| | | }, |
| | | // 提交运维情况 |
| | | submitYwCondition() { |
| | | this.$refs["ywConditionForm"].validate(valid => { |
| | | if (valid) { |
| | | ywCondition(this.ywConditionForm).then(res => { |
| | | this.ywConditionOpen = false; |
| | | this.$modal.msgSuccess("操作成功"); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | cancelYwCondition() { |
| | | this.ywConditionForm = {}; |
| | | this.ywConditionOpen = false; |
| | | }, |
| | | // 提交运维结果 |
| | | submitYwResult() { |
| | | // todo |
| | | }, |
| | | cancelYwResult() { |
| | | this.ywResultForm = {}; |
| | | this.ywResultOpen = false; |
| | | }, |
| | | // 提交检测结果 |
| | | submitCheckResult() { |
| | | // todo |
| | | }, |
| | | cancelCheckResult() { |
| | | this.checkResultForm = {}; |
| | | this.checkResultOpen = false; |
| | | }, |
| | | /** 查询运维工单列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | this.queryParams.params = {}; |
| | | if (null != this.daterangeYwHandleTime && '' != this.daterangeYwHandleTime) { |
| | | this.queryParams["start"] = this.daterangeYwHandleTime[0]; |
| | | this.queryParams["end"] = this.daterangeYwHandleTime[1]; |
| | | } |
| | | listWorkOrder(this.queryParams).then(response => { |
| | | this.workOrderList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | workOrderNo: null, |
| | | unitId: null, |
| | | ywPeopleId: null, |
| | | ywHandleTime: null, |
| | | ywResult: null, |
| | | ywCondition: null, |
| | | ywCheckResult: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | deleted: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.daterangeYwHandleTime = []; |
| | | 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 |
| | | getWorkOrder(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) { |
| | | updateWorkOrder(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addWorkOrder(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 delWorkOrder(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('/work-order/export', { |
| | | ...this.queryParams |
| | | }, `work-order_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |