提交代码
This commit is contained in:
parent
75f7045101
commit
42c4b9f48a
|
@ -20,7 +20,7 @@ export const getDeviceList = (query) => {
|
||||||
// app 警告分析
|
// app 警告分析
|
||||||
export const getWarningAnalysis = (query) => {
|
export const getWarningAnalysis = (query) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/tenant/index/warning-analysis',
|
url: '/app/index/warning-analysis',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -29,7 +29,7 @@ export const getWarningAnalysis = (query) => {
|
||||||
// 首页数据
|
// 首页数据
|
||||||
export function homeCount(query) {
|
export function homeCount(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/tenant/index',
|
url: '/app/index',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -38,7 +38,7 @@ export function homeCount(query) {
|
||||||
// app 项目设备
|
// app 项目设备
|
||||||
export function appProjectDeviceList(query) {
|
export function appProjectDeviceList(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/tenant/device/table',
|
url: '/app/device/table',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -47,7 +47,7 @@ export function appProjectDeviceList(query) {
|
||||||
// app 项目列表
|
// app 项目列表
|
||||||
export function appProjectList(query) {
|
export function appProjectList(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/tenant/project/list',
|
url: '/app/project/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -56,7 +56,7 @@ export function appProjectList(query) {
|
||||||
// app 告警列表
|
// app 告警列表
|
||||||
export function appAlarmRecordList(query) {
|
export function appAlarmRecordList(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/tenant/alarm/table',
|
url: '/app/alarm/table',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
@ -65,7 +65,7 @@ export function appAlarmRecordList(query) {
|
||||||
// app 模型统计
|
// app 模型统计
|
||||||
export function appDeviceStatistics(query) {
|
export function appDeviceStatistics(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/tenant/index/device-statistics',
|
url: '/app/index/device-statistics',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,6 +9,16 @@ export function listDevice(query) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询设备列表
|
||||||
|
export function myListDevice(query) {
|
||||||
|
return request({
|
||||||
|
url: "/iot/device/my/list",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 查询设备详细
|
// 查询设备详细
|
||||||
export function getDevice(deviceId) {
|
export function getDevice(deviceId) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||||
// 首页数据
|
// 首页数据
|
||||||
export function homeCount(query) {
|
export function homeCount(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/tenant/index',
|
url: '/app/index',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
|
|
@ -144,3 +144,12 @@ export function roleOptionselectList(tenantId) {
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询工单处理人列表
|
||||||
|
export function gdListUser(query) {
|
||||||
|
return request({
|
||||||
|
url: '/app/maintenance/maintenance-user',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status === 0">启用</span>
|
<span v-if="scope.row.status === '0' || scope.row.status === 0">启用</span>
|
||||||
<span v-else>停用</span>
|
<span v-else>停用</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
@ -17,7 +17,12 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="故障类型" prop="faultType">
|
<el-form-item label="故障类型" prop="faultType">
|
||||||
<el-select v-model="queryParams.faultType" placeholder="请选择故障类型" clearable size="small">
|
<el-select
|
||||||
|
v-model="queryParams.faultType"
|
||||||
|
placeholder="请选择故障类型"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in faultTypeOptions"
|
v-for="dict in faultTypeOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
|
@ -46,17 +51,30 @@
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<el-option :label="keys" :value="val" v-for="(keys, val) in workStateList" :key="keys" />
|
<el-option
|
||||||
|
:label="keys"
|
||||||
|
:value="val"
|
||||||
|
v-for="(keys, val) in workStateList"
|
||||||
|
:key="keys"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<!-- <el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
@ -64,8 +82,9 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['iot:maintenance:add']"
|
v-hasPermi="['iot:maintenance:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
</el-col> -->
|
>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
|
@ -74,13 +93,23 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['iot:maintenance:export']"
|
v-hasPermi="['iot:maintenance:export']"
|
||||||
>导出</el-button>
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="maintenanceList">
|
<el-table v-loading="loading" :data="maintenanceList">
|
||||||
<el-table-column type="index" label="序号" align="center" :index="indexFormatter" width="80px"></el-table-column>
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
:index="indexFormatter"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="设备名称" align="left" prop="deviceName" />
|
<el-table-column label="设备名称" align="left" prop="deviceName" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="故障类型"
|
label="故障类型"
|
||||||
|
@ -91,19 +120,38 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="上报人" align="left" prop="reporterName" />
|
<el-table-column label="上报人" align="left" prop="reporterName" />
|
||||||
<el-table-column label="处理人" align="left" prop="handlerName" />
|
<el-table-column label="处理人" align="left" prop="handlerName" />
|
||||||
<el-table-column label="工作内容" align="left" prop="maintenanceContext" />
|
<el-table-column
|
||||||
<el-table-column label="处理时间" align="center" prop="handleTime" width="120">
|
label="工作内容"
|
||||||
|
align="left"
|
||||||
|
prop="maintenanceContext"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="处理时间"
|
||||||
|
align="center"
|
||||||
|
prop="handleTime"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.handleTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.handleTime, "{y}-{m}-{d}") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="工单状态" align="center" width="120" prop="maintenanceStatus">
|
<el-table-column
|
||||||
|
label="工单状态"
|
||||||
|
align="center"
|
||||||
|
width="120"
|
||||||
|
prop="maintenanceStatus"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ workStateList[scope.row.workOrderStatus] }}</span>
|
<span>{{ workStateList[scope.row.workOrderStatus] }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
width="200"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -112,19 +160,22 @@
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['iot:maintenance:edit']"
|
v-hasPermi="['iot:maintenance:edit']"
|
||||||
>修改</el-button> -->
|
>修改</el-button> -->
|
||||||
<el-button size="mini" type="text" @click="handleDetails(scope.row)">工单追踪</el-button>
|
<el-button size="mini" type="text" @click="handleDetails(scope.row)"
|
||||||
|
>工单追踪</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['iot:maintenance:remove']"
|
v-hasPermi="['iot:maintenance:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@ -132,13 +183,27 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改工单信息对话框 -->
|
<!-- 添加或修改工单信息对话框 -->
|
||||||
<el-dialog class="eldialog-wrap" :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px">
|
<el-dialog
|
||||||
|
class="eldialog-wrap"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="500px"
|
||||||
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="设备名称" prop="deviceName">
|
<el-form-item label="设备名称" prop="deviceName">
|
||||||
<el-input v-model="form.deviceName" @focus="openTableSelectDialog" placeholder="请输入设备名称" />
|
<el-input
|
||||||
|
v-model="form.deviceName"
|
||||||
|
@focus="openTableSelectDialog"
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="故障类型" prop="faultType">
|
<el-form-item label="故障类型" prop="faultType">
|
||||||
<el-select v-model="form.faultType" style="width: 100%;" placeholder="请选择故障类型">
|
<el-select
|
||||||
|
v-model="form.faultType"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择故障类型"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in faultTypeOptions"
|
v-for="dict in faultTypeOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
|
@ -149,11 +214,15 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="上报人" prop="reporterName">
|
<el-form-item label="上报人" prop="reporterName">
|
||||||
<el-input v-model="form.reporterName" disabled placeholder="请输入上报人昵称" />
|
<el-input
|
||||||
|
v-model="form.reporterName"
|
||||||
|
disabled
|
||||||
|
placeholder="请输入上报人昵称"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="处理人" prop="handlerId">
|
<el-form-item label="处理人" prop="handlerId">
|
||||||
<treeselect
|
<!-- <treeselect
|
||||||
ref="treeselect"
|
ref="treeselect"
|
||||||
@select="treeselect"
|
@select="treeselect"
|
||||||
noChildrenText="暂无"
|
noChildrenText="暂无"
|
||||||
|
@ -164,15 +233,33 @@
|
||||||
:disable-branch-nodes="true"
|
:disable-branch-nodes="true"
|
||||||
:show-count="true"
|
:show-count="true"
|
||||||
placeholder="请选择处理人"
|
placeholder="请选择处理人"
|
||||||
|
/> -->
|
||||||
|
<el-select
|
||||||
|
v-model="form.handlerId"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择处理人"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in gdUserList"
|
||||||
|
:key="dict.userId"
|
||||||
|
:label="dict.nickName"
|
||||||
|
:value="dict.userId"
|
||||||
/>
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="工作内容" prop="maintenanceContext">
|
<el-form-item label="工作内容" prop="maintenanceContext">
|
||||||
<el-input v-model="form.maintenanceContext" type="textarea" placeholder="请输入内容" />
|
<el-input
|
||||||
|
v-model="form.maintenanceContext"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -196,8 +283,18 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="resuleClick">确 定</el-button>
|
<el-button size="mini" type="primary" @click="resuleClick"
|
||||||
<el-button size="mini" @click="() =>{selectTableShow = false}">取 消</el-button>
|
>确 定</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
selectTableShow = false;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>取 消</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
@ -210,7 +307,11 @@
|
||||||
width="800px"
|
width="800px"
|
||||||
>
|
>
|
||||||
<div class="dialot-details">
|
<div class="dialot-details">
|
||||||
<details-wrap v-if="openDestail" tempType="workList" :maintenanceId="workDetails.maintenanceId" />
|
<details-wrap
|
||||||
|
v-if="openDestail"
|
||||||
|
tempType="workList"
|
||||||
|
:maintenanceId="workDetails.maintenanceId"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -223,24 +324,24 @@ import {
|
||||||
delMaintenance,
|
delMaintenance,
|
||||||
addMaintenance,
|
addMaintenance,
|
||||||
updateMaintenance,
|
updateMaintenance,
|
||||||
exportMaintenance
|
exportMaintenance,
|
||||||
} from "@/api/power/maintenance";
|
} from "@/api/power/maintenance";
|
||||||
import { listDevice } from "@/api/iot/device";
|
import { myListDevice } from "@/api/iot/device";
|
||||||
import { listUser } from "@/api/system/user";
|
import { listUser, gdListUser } from "@/api/system/user";
|
||||||
import { listDept } from "@/api/system/dept";
|
import { listDept } from "@/api/system/dept";
|
||||||
import DetailsWrap from '../mywork/details'
|
import DetailsWrap from "../mywork/details";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
import SelectTableWrap from "@/components/SelectTable/index";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
// 工单状态(0:上报人创建工单 1:驳回上报人工单 2:处理人确认工单 3:处理人完成工单 4:驳回处理人工单 5:领导审批通过流程结束)
|
// 工单状态(0:上报人创建工单 1:驳回上报人工单 2:处理人确认工单 3:处理人完成工单 4:驳回处理人工单 5:领导审批通过流程结束)
|
||||||
const workStateList = {
|
const workStateList = {
|
||||||
"0": "工单已创建",
|
0: "工单已创建",
|
||||||
"1": "退回工单",
|
1: "退回工单",
|
||||||
"2": "确认工单",
|
2: "确认工单",
|
||||||
"3": "处理完成",
|
3: "处理完成",
|
||||||
"4": "退回处理",
|
4: "退回处理",
|
||||||
"5": "审核通过"
|
5: "审核通过",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -248,7 +349,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Treeselect,
|
Treeselect,
|
||||||
SelectTableWrap,
|
SelectTableWrap,
|
||||||
DetailsWrap
|
DetailsWrap,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -294,22 +395,23 @@ export default {
|
||||||
scenePictures: null,
|
scenePictures: null,
|
||||||
feedbackInformation: null,
|
feedbackInformation: null,
|
||||||
advice: null,
|
advice: null,
|
||||||
maintenanceStatus: null
|
maintenanceStatus: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {},
|
rules: {},
|
||||||
deptOptions: []
|
deptOptions: [],
|
||||||
|
gdUserList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 获取故障类型(字典)
|
// 获取故障类型(字典)
|
||||||
this.getDicts("fault_type").then(response => {
|
this.getDicts("fault_type").then((response) => {
|
||||||
this.faultTypeOptions = response.data;
|
this.faultTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeselect();
|
// this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dialogCloes() {
|
dialogCloes() {
|
||||||
|
@ -325,7 +427,7 @@ export default {
|
||||||
this.selectResult = {};
|
this.selectResult = {};
|
||||||
this.tableSelectOption = {
|
this.tableSelectOption = {
|
||||||
otherOption: {
|
otherOption: {
|
||||||
tableType: "device"
|
tableType: "device",
|
||||||
},
|
},
|
||||||
queryOpt: {
|
queryOpt: {
|
||||||
disable: false,
|
disable: false,
|
||||||
|
@ -334,12 +436,12 @@ export default {
|
||||||
deviceName: "",
|
deviceName: "",
|
||||||
modelId: "",
|
modelId: "",
|
||||||
parentId: 0,
|
parentId: 0,
|
||||||
deviceType: "GATEWAY_CONTROLLER"
|
deviceType: "GATEWAY_CONTROLLER",
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
total: 0
|
total: 0,
|
||||||
},
|
},
|
||||||
inline: true,
|
inline: true,
|
||||||
queryChilds: [
|
queryChilds: [
|
||||||
|
@ -351,9 +453,9 @@ export default {
|
||||||
type: "input",
|
type: "input",
|
||||||
key: "deviceName",
|
key: "deviceName",
|
||||||
size: "small",
|
size: "small",
|
||||||
value: ""
|
value: "",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
tableOpt: {
|
tableOpt: {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
@ -369,7 +471,7 @@ export default {
|
||||||
align: "left",
|
align: "left",
|
||||||
width: "",
|
width: "",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "span"
|
tempType: "span",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
style: "",
|
style: "",
|
||||||
|
@ -379,7 +481,7 @@ export default {
|
||||||
align: "left",
|
align: "left",
|
||||||
width: "",
|
width: "",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "span"
|
tempType: "span",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
style: "",
|
style: "",
|
||||||
|
@ -389,7 +491,7 @@ export default {
|
||||||
align: "left",
|
align: "left",
|
||||||
width: "",
|
width: "",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "span"
|
tempType: "span",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
style: "",
|
style: "",
|
||||||
|
@ -399,21 +501,21 @@ export default {
|
||||||
align: "center",
|
align: "center",
|
||||||
width: "160",
|
width: "160",
|
||||||
"show-overflow-tooltip": false,
|
"show-overflow-tooltip": false,
|
||||||
tempType: "span"
|
tempType: "span",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
tableList: {
|
tableList: {
|
||||||
type: Array
|
type: Array,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
tableList: []
|
},
|
||||||
|
tableList: [],
|
||||||
};
|
};
|
||||||
this.selectTableShow = true;
|
this.selectTableShow = true;
|
||||||
},
|
},
|
||||||
// 查询回调
|
// 查询回调
|
||||||
childGetList(data) {
|
childGetList(data) {
|
||||||
listDevice(Object.assign(data.page, data.param, { selected: 1 })).then(
|
myListDevice(Object.assign(data.page, data.param, { selected: 1 })).then(
|
||||||
response => {
|
(response) => {
|
||||||
this.tableSelectOption.tableList = response.rows;
|
this.tableSelectOption.tableList = response.rows;
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
||||||
}
|
}
|
||||||
|
@ -437,14 +539,20 @@ export default {
|
||||||
this.form.deviceName = this.selectResult.deviceName;
|
this.form.deviceName = this.selectResult.deviceName;
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
},
|
},
|
||||||
|
// 获取 工单 处理人列表
|
||||||
|
gdListUser() {
|
||||||
|
gdListUser().then((response) => {
|
||||||
|
this.gdUserList = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
// 获取到用户列表 并且赋值到 部门表
|
// 获取到用户列表 并且赋值到 部门表
|
||||||
getUserList(data) {
|
getUserList(data) {
|
||||||
var userList = [];
|
var userList = [];
|
||||||
var _this = this;
|
var _this = this;
|
||||||
listUser().then(response => {
|
listUser().then((response) => {
|
||||||
userList = response.rows;
|
userList = response.rows;
|
||||||
if (userList) {
|
if (userList) {
|
||||||
userList.forEach(v => {
|
userList.forEach((v) => {
|
||||||
if (v.deptId) {
|
if (v.deptId) {
|
||||||
let deptId = v.deptId;
|
let deptId = v.deptId;
|
||||||
v.deptId = v.userId;
|
v.deptId = v.userId;
|
||||||
|
@ -458,7 +566,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 查询部门人员列表 */
|
/** 查询部门人员列表 */
|
||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
listDept({ pageNum: 1, pageSize: 99999 }).then(response => {
|
listDept({ pageNum: 1, pageSize: 99999 }).then((response) => {
|
||||||
this.getUserList(response.data);
|
this.getUserList(response.data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -469,7 +577,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
id: node.deptId,
|
id: node.deptId,
|
||||||
label: node.deptName ? node.deptName : node.nickName,
|
label: node.deptName ? node.deptName : node.nickName,
|
||||||
children: node.children
|
children: node.children,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
treeselect(node, instanceId) {
|
treeselect(node, instanceId) {
|
||||||
|
@ -487,7 +595,7 @@ export default {
|
||||||
/** 查询工单信息列表 */
|
/** 查询工单信息列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listMaintenance(this.queryParams).then(response => {
|
listMaintenance(this.queryParams).then((response) => {
|
||||||
this.maintenanceList = response.rows;
|
this.maintenanceList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -521,7 +629,7 @@ export default {
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateId: null,
|
updateId: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null
|
remark: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -537,13 +645,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.maintenanceId);
|
this.ids = selection.map((item) => item.maintenanceId);
|
||||||
this.single = selection.length !== 1;
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.gdListUser();
|
||||||
this.form.reporterName = this.$store.getters.name;
|
this.form.reporterName = this.$store.getters.name;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加工单信息";
|
this.title = "添加工单信息";
|
||||||
|
@ -552,24 +661,25 @@ export default {
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const maintenanceId = row.maintenanceId || this.ids;
|
const maintenanceId = row.maintenanceId || this.ids;
|
||||||
getMaintenance(maintenanceId).then(response => {
|
getMaintenance(maintenanceId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.gdListUser();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改工单信息";
|
this.title = "修改工单信息";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.maintenanceId != null) {
|
if (this.form.maintenanceId != null) {
|
||||||
updateMaintenance(this.form).then(response => {
|
updateMaintenance(this.form).then((response) => {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addMaintenance(this.form).then(response => {
|
addMaintenance(this.form).then((response) => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -584,9 +694,9 @@ export default {
|
||||||
this.$confirm("是否删除该选项?", "警告", {
|
this.$confirm("是否删除该选项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delMaintenance(maintenanceIds);
|
return delMaintenance(maintenanceIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -600,16 +710,16 @@ export default {
|
||||||
this.$confirm("是否确认导出所有工单信息数据项?", "警告", {
|
this.$confirm("是否确认导出所有工单信息数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return exportMaintenance(queryParams);
|
return exportMaintenance(queryParams);
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -389,7 +389,7 @@ export default {
|
||||||
resuleClick() {
|
resuleClick() {
|
||||||
this.form.deviceName = this.selectResult.deviceName;
|
this.form.deviceName = this.selectResult.deviceName;
|
||||||
this.form.deviceId = this.selectResult.deviceId;
|
this.form.deviceId = this.selectResult.deviceId;
|
||||||
this.form.prodId = this.selectResult.prodKey;
|
this.form.prodId = this.selectResult.prodId;
|
||||||
this.form.deviceKey = this.selectResult.deviceKey;
|
this.form.deviceKey = this.selectResult.deviceKey;
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
this.form.cmdKey = "";
|
this.form.cmdKey = "";
|
||||||
|
|
Loading…
Reference in New Issue