网络设备-设备维保模块开发
This commit is contained in:
parent
681cb0faf0
commit
1a9abfed00
340
god-ui/src/views/netFacilityMaintenance/faultType/index.vue
Normal file
340
god-ui/src/views/netFacilityMaintenance/faultType/index.vue
Normal file
@ -0,0 +1,340 @@
|
||||
<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="reserveFive">
|
||||
<el-input
|
||||
v-model="queryParams.reserveFive"
|
||||
placeholder="请输入故障名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="" prop="reserveTwo">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.reserveTwo"-->
|
||||
<!-- placeholder="请输入"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="故障等级" prop="reserveFour">
|
||||
<el-input
|
||||
v-model="queryParams.reserveFour"
|
||||
placeholder="请输入故障等级"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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"
|
||||
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="godUniversalElectricMeterList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="故障名称" align="center" prop="reserveFive"/>
|
||||
<el-table-column label="故障标识" align="center" prop="reserveTwo"/>
|
||||
<!-- <el-table-column label="识别例图" align="center" prop="reserveThree">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.reserveThree" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="故障等级" align="center" prop="reserveFour"/>
|
||||
<!-- <el-table-column label="是否报警" align="center" prop="reserveFive"/>-->
|
||||
<!-- <el-table-column label="上传人" align="center" prop="reserveSix"/>-->
|
||||
<el-table-column label="创建时间" align="center" prop="reserveSeven">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.reserveSeven, '{y}-{m}-{d} {h}:{i}:{s}') }}</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)"
|
||||
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改AI识别算法开发对话框 -->
|
||||
<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="reserveFive">
|
||||
<el-input v-model="form.reserveFive" placeholder="请输入故障名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障标识" prop="reserveTwo">
|
||||
<el-input v-model="form.reserveTwo" placeholder="请输入故障标识"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="识别例图" prop="reserveThree">-->
|
||||
<!-- <image-upload v-model="form.reserveThree"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="故障等级" prop="reserveFour">
|
||||
<el-input v-model="form.reserveFour" placeholder="请输入故障等级"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="是否报警" prop="reserveFive">-->
|
||||
<!-- <el-input v-model="form.reserveFive" placeholder="请输入是否报警"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="上传人" prop="reserveSix">-->
|
||||
<!-- <el-input v-model="form.reserveSix" placeholder="请输入上传人"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="创建时间" prop="reserveSeven">
|
||||
<el-date-picker
|
||||
v-model="form.reserveSeven"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="yyyy-MM-dd HH:mm:ss ">
|
||||
</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="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listGodUniversalElectricMeter,
|
||||
getGodUniversalElectricMeter,
|
||||
delGodUniversalElectricMeter,
|
||||
addGodUniversalElectricMeter,
|
||||
updateGodUniversalElectricMeter
|
||||
} from "@/api/aiRecognition/godUniversalElectricMeter";
|
||||
|
||||
export default {
|
||||
name: "GodUniversalElectricMeter",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// AI识别算法开发表格数据
|
||||
godUniversalElectricMeterList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
reserveOne: null,
|
||||
reserveTwo: null,
|
||||
reserveThree: null,
|
||||
reserveFour: null,
|
||||
reserveFive: null,
|
||||
reserveSix: null,
|
||||
reserveSeven: null,
|
||||
reserveEight: null,
|
||||
reserveNine: null,
|
||||
reserveTen: null,
|
||||
reserveEleven: null,
|
||||
reserveTwelve: null,
|
||||
reserveThirteen: null,
|
||||
reserveFourteen: null,
|
||||
sysType: null,
|
||||
moduleType: 'faultType',
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询AI识别算法开发列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGodUniversalElectricMeter(this.queryParams).then(response => {
|
||||
this.godUniversalElectricMeterList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
reserveOne: null,
|
||||
reserveTwo: null,
|
||||
reserveThree: null,
|
||||
reserveFour: null,
|
||||
reserveFive: null,
|
||||
reserveSix: null,
|
||||
reserveSeven: null,
|
||||
reserveEight: null,
|
||||
reserveNine: null,
|
||||
reserveTen: null,
|
||||
reserveEleven: null,
|
||||
reserveTwelve: null,
|
||||
reserveThirteen: null,
|
||||
reserveFourteen: null,
|
||||
sysType: null,
|
||||
moduleType: 'faultType',
|
||||
remark: 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
|
||||
getGodUniversalElectricMeter(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) {
|
||||
updateGodUniversalElectricMeter(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addGodUniversalElectricMeter(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 delGodUniversalElectricMeter(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('aiRecognition/godUniversalElectricMeter/export', {
|
||||
...this.queryParams
|
||||
}, `godUniversalElectricMeter_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
337
god-ui/src/views/netFacilityMaintenance/maintainInfo/index.vue
Normal file
337
god-ui/src/views/netFacilityMaintenance/maintainInfo/index.vue
Normal file
@ -0,0 +1,337 @@
|
||||
<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="reserveOne">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.reserveOne"-->
|
||||
<!-- placeholder="请输入"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="设备名称" prop="reserveTwo">
|
||||
<el-input
|
||||
v-model="queryParams.reserveTwo"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="" prop="reserveThree">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.reserveThree"-->
|
||||
<!-- placeholder="请输入"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </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"
|
||||
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="godUniversalElectricMeterList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="保养编号" align="center" prop="reserveOne"/>
|
||||
<el-table-column label="设备名称" align="center" prop="reserveTwo"/>
|
||||
<el-table-column label="保养内容" align="center" prop="reserveFour"/>
|
||||
<!-- <el-table-column label="是否报警" align="center" prop="reserveFive"/>-->
|
||||
<el-table-column label="保养人" align="center" prop="reserveSix"/>
|
||||
<el-table-column label="保养图片" align="center" prop="reserveThree">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.reserveThree" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="保养时间" align="center" prop="reserveSeven">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.reserveSeven, '{y}-{m}-{d} {h}:{i}:{s}') }}</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)"
|
||||
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改AI识别算法开发对话框 -->
|
||||
<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="reserveTwo">
|
||||
<el-input v-model="form.reserveTwo" placeholder="请输入设备名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保养内容" prop="reserveFour">
|
||||
<el-input v-model="form.reserveFour" placeholder="请输入保养内容"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="是否报警" prop="reserveFive">-->
|
||||
<!-- <el-input v-model="form.reserveFive" placeholder="请输入是否报警"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="保养人" prop="reserveSix">
|
||||
<el-input v-model="form.reserveSix" placeholder="请输入保养人"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保养图片" prop="reserveThree">
|
||||
<image-upload v-model="form.reserveThree"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保养时间" prop="reserveSeven">
|
||||
<el-date-picker
|
||||
v-model="form.reserveSeven"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="yyyy-MM-dd HH:mm:ss ">
|
||||
</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="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listGodUniversalElectricMeter,
|
||||
getGodUniversalElectricMeter,
|
||||
delGodUniversalElectricMeter,
|
||||
addGodUniversalElectricMeter,
|
||||
updateGodUniversalElectricMeter
|
||||
} from "@/api/aiRecognition/godUniversalElectricMeter";
|
||||
|
||||
export default {
|
||||
name: "GodUniversalElectricMeter",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// AI识别算法开发表格数据
|
||||
godUniversalElectricMeterList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
reserveOne: null,
|
||||
reserveTwo: null,
|
||||
reserveThree: null,
|
||||
reserveFour: null,
|
||||
reserveFive: null,
|
||||
reserveSix: null,
|
||||
reserveSeven: null,
|
||||
reserveEight: null,
|
||||
reserveNine: null,
|
||||
reserveTen: null,
|
||||
reserveEleven: null,
|
||||
reserveTwelve: null,
|
||||
reserveThirteen: null,
|
||||
reserveFourteen: null,
|
||||
sysType: null,
|
||||
moduleType: 'maintainInfo',
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询AI识别算法开发列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGodUniversalElectricMeter(this.queryParams).then(response => {
|
||||
this.godUniversalElectricMeterList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
reserveOne: null,
|
||||
reserveTwo: null,
|
||||
reserveThree: null,
|
||||
reserveFour: null,
|
||||
reserveFive: null,
|
||||
reserveSix: null,
|
||||
reserveSeven: null,
|
||||
reserveEight: null,
|
||||
reserveNine: null,
|
||||
reserveTen: null,
|
||||
reserveEleven: null,
|
||||
reserveTwelve: null,
|
||||
reserveThirteen: null,
|
||||
reserveFourteen: null,
|
||||
sysType: null,
|
||||
moduleType: 'maintainInfo',
|
||||
remark: 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
|
||||
getGodUniversalElectricMeter(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) {
|
||||
updateGodUniversalElectricMeter(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addGodUniversalElectricMeter(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 delGodUniversalElectricMeter(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('aiRecognition/godUniversalElectricMeter/export', {
|
||||
...this.queryParams
|
||||
}, `godUniversalElectricMeter_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,342 @@
|
||||
<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="reserveTwo">
|
||||
<el-input
|
||||
v-model="queryParams.reserveTwo"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障名称" prop="reserveFour">
|
||||
<el-input
|
||||
v-model="queryParams.reserveFour"
|
||||
placeholder="请输入故障名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否维修" prop="reserveEight">
|
||||
<el-input
|
||||
v-model="queryParams.reserveEight"
|
||||
placeholder="请输入是否维修"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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"
|
||||
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="godUniversalElectricMeterList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<!-- <el-table-column label="识别编号" align="center" prop="reserveOne"/>-->
|
||||
<el-table-column label="设备名称" align="center" prop="reserveTwo"/>
|
||||
<el-table-column label="故障名称" align="center" prop="reserveFour"/>
|
||||
<el-table-column label="故障等级" align="center" prop="reserveFive"/>
|
||||
<el-table-column label="是否维修" align="center" prop="reserveEight"/>
|
||||
<el-table-column label="维修人" align="center" prop="reserveSix"/>
|
||||
<el-table-column label="维修内容" align="center" prop="reserveThree"/>
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.reserveThree" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="维修时间" align="center" prop="reserveSeven">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.reserveSeven, '{y}-{m}-{d} {h}:{i}:{s}') }}</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)"
|
||||
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改AI识别算法开发对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="设备名称" prop="reserveTwo">
|
||||
<el-input v-model="form.reserveTwo" placeholder="请输入设备名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障名称" prop="reserveFour">
|
||||
<el-input v-model="form.reserveFour" placeholder="请输入故障名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障等级" prop="reserveFive">
|
||||
<el-input v-model="form.reserveFive" placeholder="请输入故障等级"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否维修" prop="reserveEight">
|
||||
<el-input v-model="form.reserveEight" placeholder="请输入是否维修"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修人" prop="reserveSix">
|
||||
<el-input v-model="form.reserveSix" placeholder="请输入维修人"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修内容" prop="reserveThree">
|
||||
<el-input v-model="form.reserveThree" placeholder="请输入维修内容"/>
|
||||
<!-- <image-upload v-model="form.reserveThree"/>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="维修时间" prop="reserveSeven">
|
||||
<el-date-picker
|
||||
v-model="form.reserveSeven"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="yyyy-MM-dd HH:mm:ss ">
|
||||
</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="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listGodUniversalElectricMeter,
|
||||
getGodUniversalElectricMeter,
|
||||
delGodUniversalElectricMeter,
|
||||
addGodUniversalElectricMeter,
|
||||
updateGodUniversalElectricMeter
|
||||
} from "@/api/aiRecognition/godUniversalElectricMeter";
|
||||
|
||||
export default {
|
||||
name: "GodUniversalElectricMeter",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// AI识别算法开发表格数据
|
||||
godUniversalElectricMeterList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
reserveOne: null,
|
||||
reserveTwo: null,
|
||||
reserveThree: null,
|
||||
reserveFour: null,
|
||||
reserveFive: null,
|
||||
reserveSix: null,
|
||||
reserveSeven: null,
|
||||
reserveEight: null,
|
||||
reserveNine: null,
|
||||
reserveTen: null,
|
||||
reserveEleven: null,
|
||||
reserveTwelve: null,
|
||||
reserveThirteen: null,
|
||||
reserveFourteen: null,
|
||||
sysType: null,
|
||||
moduleType: 'maintenanceHistory',
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询AI识别算法开发列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGodUniversalElectricMeter(this.queryParams).then(response => {
|
||||
this.godUniversalElectricMeterList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
reserveOne: null,
|
||||
reserveTwo: null,
|
||||
reserveThree: null,
|
||||
reserveFour: null,
|
||||
reserveFive: null,
|
||||
reserveSix: null,
|
||||
reserveSeven: null,
|
||||
reserveEight: null,
|
||||
reserveNine: null,
|
||||
reserveTen: null,
|
||||
reserveEleven: null,
|
||||
reserveTwelve: null,
|
||||
reserveThirteen: null,
|
||||
reserveFourteen: null,
|
||||
sysType: null,
|
||||
moduleType: 'maintenanceHistory',
|
||||
remark: 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
|
||||
getGodUniversalElectricMeter(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) {
|
||||
updateGodUniversalElectricMeter(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addGodUniversalElectricMeter(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 delGodUniversalElectricMeter(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('aiRecognition/godUniversalElectricMeter/export', {
|
||||
...this.queryParams
|
||||
}, `godUniversalElectricMeter_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user