2024-2-28 设备模块故障信息格式修改+故障报修图片展示优化

master
A0010407 9 months ago
parent e5b8733b22
commit 6548a2d8bc

@ -1,20 +1,18 @@
<template>
<el-tabs type="border-card">
<el-tab-pane label="故障类型" >
<el-tab-pane label="故障类型">
<ItemFaultType></ItemFaultType>
</el-tab-pane>
<el-tab-pane label="故障描述" >
<el-tab-pane label="故障描述">
<ItemFaultDescription></ItemFaultDescription>
</el-tab-pane>
<el-tab-pane label="故障原因" >
<el-tab-pane label="故障原因">
<ItemFaultReason></ItemFaultReason>
</el-tab-pane>
<el-tab-pane label="维修措施" >
<el-tab-pane label="维修措施">
<ItemFaultMeasures></ItemFaultMeasures>
</el-tab-pane>
</el-tabs>
</template>
<script>
@ -24,89 +22,92 @@ import ItemFaultDescription from "./itemFaultDescription.vue";
import ItemFaultMeasures from "./itemFaultMeasures.vue";
export default {
name: "FaultInformation",
components: { ItemFaultType , ItemFaultReason , ItemFaultDescription , ItemFaultMeasures },
data() {
return {
name: "FaultInformation",
components: {
ItemFaultType,
ItemFaultReason,
ItemFaultDescription,
ItemFaultMeasures,
},
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultTypeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultTypeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
},
methods: {
}
},
//
form: {},
//
rules: {},
};
},
created() {},
methods: {},
};
</script>

@ -1,16 +1,27 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label-width="100px" label="故障描述编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障描述编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="98px"
>
<el-form-item label-width="100px" label="故障描述编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障描述编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障描述类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择故障描述类型" clearable>
<el-select
v-model="queryParams.faultType"
placeholder="请选择故障描述类型"
clearable
>
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
@ -19,14 +30,14 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障描述" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障描述" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-input
class="my-select-input"
@ -46,7 +57,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
@ -68,121 +80,211 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</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-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="['device:faultDescription: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="['device:faultDescription: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="['device:faultDescriptionn: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="['device:faultDescription:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<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="['device:faultDescription: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="['device:faultDescription: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="['device:faultDescriptionn: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="['device:faultDescription:export']"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障描述编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障描述类型" align="center" prop="faultType" >
<el-table
v-loading="loading"
:data="faultList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
width="60"
align="center"
label="序号"
type="index"
></el-table-column>
<el-table-column
v-if="false"
label="主键"
align="center"
prop="faultId"
/>
<el-table-column
width="150"
label="故障描述编码"
align="center"
prop="faultCode"
/>
<el-table-column
width="150"
label="故障描述类型"
align="center"
prop="faultType"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_type" :value="scope.row.faultType"/>
<dict-tag
:options="dict.type.device_fault_type"
:value="scope.row.faultType"
/>
</template>
</el-table-column>
<el-table-column width="150" label="故障描述" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultDescription:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultDescription:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table-column
width="150"
label="故障描述"
align="center"
prop="faultSubclass"
/>
<el-table-column
width="180"
label="备注"
align="center"
prop="faultRemark"
/>
<el-table-column
width="100"
label="创建人"
align="center"
prop="createBy"
/>
<el-table-column
width="180"
label="创建时间"
align="center"
prop="createTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
label="更新人"
align="center"
prop="updateBy"
/>
<el-table-column
width="180"
label="更新时间"
align="center"
prop="updateTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="180"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultDescription:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultDescription: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"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障描述维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障描述编码" prop="faultCode">
<el-input v-model="form.faultCode" placeholder="请输入故障描述编码" style="width: 300px"/>
</el-form-item>
<!-- 添加或修改故障描述维护对话框 -->
<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 v-if="false" label="故障描述编码" prop="faultCode">
<el-input
v-model="form.faultCode"
placeholder="请输入故障描述编码"
style="width: 300px"
/>
</el-form-item>
<el-form-item label="故障描述" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障描述" clearable style="width: 300px">
<el-select
v-model="form.faultType"
placeholder="请选择故障描述"
clearable
style="width: 300px"
>
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
@ -191,234 +293,251 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input
v-model="form.faultSubclass"
placeholder="请输入故障子类"
style="width: 300px"
/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input
v-model="form.faultRemark"
placeholder="请输入备注"
style="width: 300px"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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 { listFaultDescription, getFaultDescription, delFaultDescription, addFaultDescription, updateFaultDescription } from "@/api/device/faultDescription";
import {
listFaultDescription,
getFaultDescription,
delFaultDescription,
addFaultDescription,
updateFaultDescription,
} from "@/api/device/faultDescription";
export default {
name: "FaultType",
dicts: ['device_fault_description'],
data() {
return {
//
faultCategory : null,
name: "FaultType",
dicts: ["device_fault_description"],
data() {
return {
//
faultCategory: null,
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
//
faultCategory: null,
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
//
faultCategory: null,
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询故障描述维护列表 */
getList() {
this.loading = true;
this.queryParams.faultCategory = "des";
listFaultDescription(this.queryParams).then(response => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
},
//
form: {},
//
rules: {},
};
},
created() {
this.getList();
},
methods: {
/** 查询故障描述维护列表 */
getList() {
this.loading = true;
this.queryParams.faultCategory = "des";
listFaultDescription(this.queryParams).then((response) => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.faultId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障描述维护";
},
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.faultId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障描述维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const faultId = row.faultId || this.ids
getFaultDescription(faultId).then(response => {
const faultId = row.faultId || this.ids;
getFaultDescription(faultId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改故障描述维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.faultId != null) {
updateFaultDescription(this.form).then(response => {
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.faultId != null) {
updateFaultDescription(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFaultDescription(this.form).then(response => {
});
} else {
addFaultDescription(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = '';
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = "";
//
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
faultCodes = faultCodes + this.faultList[i].faultCode + ",";
}
}
}
if (faultCodes == '') {
if (faultCodes == "") {
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
@ -426,19 +545,27 @@ export default {
}
}
this.$modal.confirm('是否确认删除故障描述维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultDescription(faultIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/faultDescription/export', {
...this.queryParams
}, `faultType_${new Date().getTime()}.xlsx`)
}
}
this.$modal
.confirm('是否确认删除故障描述维护编号为"' + faultCodes + '"的数据项?')
.then(function () {
return delFaultDescription(faultIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"device/faultDescription/export",
{
...this.queryParams,
},
`faultType_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

@ -1,16 +1,27 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label-width="100px" label="故障措施编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障措施编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="98px"
>
<el-form-item label-width="100px" label="故障措施编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障措施编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障措施类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择故障措施类型" clearable>
<el-select
v-model="queryParams.faultType"
placeholder="请选择故障措施类型"
clearable
>
<el-option
v-for="dict in dict.type.device_fault_measures"
:key="dict.value"
@ -19,14 +30,14 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障措施" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障措施"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障措施" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障措施"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-input
class="my-select-input"
@ -46,7 +57,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
@ -59,121 +71,211 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</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-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="['device:faultMeasures: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="['device:faultMeasures: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="['device:faultMeasures: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="['device:faultMeasures:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<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="['device:faultMeasures: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="['device:faultMeasures: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="['device:faultMeasures: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="['device:faultMeasures:export']"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障措施编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障措施类型" align="center" prop="faultType" >
<el-table
v-loading="loading"
:data="faultList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
width="60"
align="center"
label="序号"
type="index"
></el-table-column>
<el-table-column
v-if="false"
label="主键"
align="center"
prop="faultId"
/>
<el-table-column
width="150"
label="故障措施编码"
align="center"
prop="faultCode"
/>
<el-table-column
width="150"
label="故障措施类型"
align="center"
prop="faultType"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_measures" :value="scope.row.faultType"/>
<dict-tag
:options="dict.type.device_fault_measures"
:value="scope.row.faultType"
/>
</template>
</el-table-column>
<el-table-column width="150" label="故障措施" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultMeasures:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultMeasures:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table-column
width="150"
label="故障措施"
align="center"
prop="faultSubclass"
/>
<el-table-column
width="180"
label="备注"
align="center"
prop="faultRemark"
/>
<el-table-column
width="100"
label="创建人"
align="center"
prop="createBy"
/>
<el-table-column
width="180"
label="创建时间"
align="center"
prop="createTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
label="更新人"
align="center"
prop="updateBy"
/>
<el-table-column
width="180"
label="更新时间"
align="center"
prop="updateTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="180"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultMeasures:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultMeasures: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"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障措施维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障措施编码" prop="faultCode">
<el-input v-model="form.faultCode" placeholder="请输入故障措施编码" style="width: 300px"/>
</el-form-item>
<!-- 添加或修改故障措施维护对话框 -->
<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 v-if="false" label="故障措施编码" prop="faultCode">
<el-input
v-model="form.faultCode"
placeholder="请输入故障措施编码"
style="width: 300px"
/>
</el-form-item>
<el-form-item label="故障措施" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障措施" clearable style="width: 300px">
<el-select
v-model="form.faultType"
placeholder="请选择故障措施"
clearable
style="width: 300px"
>
<el-option
v-for="dict in dict.type.device_fault_measures"
:key="dict.value"
@ -182,229 +284,246 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input
v-model="form.faultSubclass"
placeholder="请输入故障子类"
style="width: 300px"
/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input
v-model="form.faultRemark"
placeholder="请输入备注"
style="width: 300px"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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 { listFaultMeasures, getFaultMeasures, delFaultMeasures, addFaultMeasures, updateFaultMeasures } from "@/api/device/faultMeasures";
import {
listFaultMeasures,
getFaultMeasures,
delFaultMeasures,
addFaultMeasures,
updateFaultMeasures,
} from "@/api/device/faultMeasures";
export default {
name: "FaultType",
dicts: ['device_fault_measures'],
data() {
return {
name: "FaultType",
dicts: ["device_fault_measures"],
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询故障措施维护列表 */
getList() {
this.loading = true;
listFaultMeasures(this.queryParams).then(response => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
},
//
form: {},
//
rules: {},
};
},
created() {
this.getList();
},
methods: {
/** 查询故障措施维护列表 */
getList() {
this.loading = true;
listFaultMeasures(this.queryParams).then((response) => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.faultId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障措施维护";
},
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.faultId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障措施维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const faultId = row.faultId || this.ids
getFaultMeasures(faultId).then(response => {
const faultId = row.faultId || this.ids;
getFaultMeasures(faultId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改故障措施维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.faultId != null) {
updateFaultMeasures(this.form).then(response => {
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.faultId != null) {
updateFaultMeasures(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFaultMeasures(this.form).then(response => {
});
} else {
addFaultMeasures(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = '';
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = "";
//
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
faultCodes = faultCodes + this.faultList[i].faultCode + ",";
}
}
}
if (faultCodes == '') {
if (faultCodes == "") {
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
@ -412,19 +531,27 @@ export default {
}
}
this.$modal.confirm('是否确认删除故障措施维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultMeasures(faultIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/faultMeasures/export', {
...this.queryParams
}, `faultType_${new Date().getTime()}.xlsx`)
}
}
this.$modal
.confirm('是否确认删除故障措施维护编号为"' + faultCodes + '"的数据项?')
.then(function () {
return delFaultMeasures(faultIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"device/faultMeasures/export",
{
...this.queryParams,
},
`faultType_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

@ -1,17 +1,29 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="故障原因编码" prop="faultCode">
<el-input
style="width: 150px"
v-model="queryParams.faultCode"
placeholder="请输入编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="98px"
>
<el-form-item label="故障原因编码" prop="faultCode">
<el-input
style="width: 150px"
v-model="queryParams.faultCode"
placeholder="请输入编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障原因类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择原因类型" clearable style="width: 150px">
<el-select
v-model="queryParams.faultType"
placeholder="请选择原因类型"
clearable
style="width: 150px"
>
<el-option
v-for="dict in dict.type.device_fault_reason"
:key="dict.value"
@ -20,16 +32,16 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障原因" prop="faultSubclass" >
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障原因"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy" >
<el-form-item label="故障原因" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障原因"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-input
class="my-select-input"
v-model="queryParams.createBy"
@ -59,7 +71,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
@ -72,122 +85,217 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</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-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="['device:faultReason: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="['device:faultReason: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="['device:faultReason: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="['device:faultReason:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<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="['device:faultReason: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="['device:faultReason: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="['device:faultReason: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="['device:faultReason:export']"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障原因编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障原因类型" align="center" prop="faultType" >
<el-table
v-loading="loading"
:data="faultList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
width="60"
align="center"
label="序号"
type="index"
></el-table-column>
<el-table-column
v-if="false"
label="主键"
align="center"
prop="faultId"
/>
<el-table-column
width="150"
label="故障原因编码"
align="center"
prop="faultCode"
/>
<el-table-column
width="150"
label="故障原因类型"
align="center"
prop="faultType"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_reason" :value="scope.row.faultType"/>
<dict-tag
:options="dict.type.device_fault_reason"
:value="scope.row.faultType"
/>
</template>
</el-table-column>
<el-table-column width="200" label="故障原因" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultReason:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultReason:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table-column
width="200"
label="故障原因"
align="center"
prop="faultSubclass"
/>
<el-table-column
width="180"
label="备注"
align="center"
prop="faultRemark"
/>
<el-table-column
v-if="false"
label="删除标志"
align="center"
prop="delFlag"
/>
<el-table-column
width="100"
label="创建人"
align="center"
prop="createBy"
/>
<el-table-column
width="180"
label="创建时间"
align="center"
prop="createTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
label="更新人"
align="center"
prop="updateBy"
/>
<el-table-column
width="180"
label="更新时间"
align="center"
prop="updateTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="180"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultReason:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultReason: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"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障原因维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障原因编码" prop="faultCode">
<el-input v-model="form.faultCode" placeholder="请输入故障原因编码" style="width: 300px"/>
</el-form-item>
<!-- 添加或修改故障原因维护对话框 -->
<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 v-if="false" label="故障原因编码" prop="faultCode">
<el-input
v-model="form.faultCode"
placeholder="请输入故障原因编码"
style="width: 300px"
/>
</el-form-item>
<el-form-item label="故障原因" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障原因" clearable style="width: 300px">
<el-select
v-model="form.faultType"
placeholder="请选择故障原因"
clearable
style="width: 300px"
>
<el-option
v-for="dict in dict.type.device_fault_reason"
:key="dict.value"
@ -196,229 +304,246 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input
v-model="form.faultSubclass"
placeholder="请输入故障子类"
style="width: 300px"
/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input
v-model="form.faultRemark"
placeholder="请输入备注"
style="width: 300px"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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 { listFaultReason, getFaultReason, delFaultReason, addFaultReason, updateFaultReason } from "@/api/device/faultReason";
import {
listFaultReason,
getFaultReason,
delFaultReason,
addFaultReason,
updateFaultReason,
} from "@/api/device/faultReason";
export default {
name: "FaultType",
dicts: ['device_fault_reason'],
data() {
return {
name: "FaultType",
dicts: ["device_fault_reason"],
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询故障原因维护列表 */
getList() {
this.loading = true;
listFaultReason(this.queryParams).then(response => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
},
//
form: {},
//
rules: {},
};
},
created() {
this.getList();
},
methods: {
/** 查询故障原因维护列表 */
getList() {
this.loading = true;
listFaultReason(this.queryParams).then((response) => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.faultId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障原因维护";
},
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.faultId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障原因维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const faultId = row.faultId || this.ids
getFaultReason(faultId).then(response => {
const faultId = row.faultId || this.ids;
getFaultReason(faultId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改故障原因维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.faultId != null) {
updateFaultReason(this.form).then(response => {
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.faultId != null) {
updateFaultReason(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFaultReason(this.form).then(response => {
});
} else {
addFaultReason(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = '';
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = "";
//
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
faultCodes = faultCodes + this.faultList[i].faultCode + ",";
}
}
}
if (faultCodes == '') {
if (faultCodes == "") {
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
@ -426,19 +551,27 @@ export default {
}
}
this.$modal.confirm('是否确认删除故障原因维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultReason(faultIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/faultReason/export', {
...this.queryParams
}, `faultType_${new Date().getTime()}.xlsx`)
}
}
this.$modal
.confirm('是否确认删除故障原因维护编号为"' + faultCodes + '"的数据项?')
.then(function () {
return delFaultReason(faultIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"device/faultReason/export",
{
...this.queryParams,
},
`faultType_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

@ -1,17 +1,29 @@
<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-width="100px" label="故障类型编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障类型编码"
style="width: 180px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label-width="100px" label="故障类型编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障类型编码"
style="width: 180px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择故障类型" clearable style="width: 180px">
<el-select
v-model="queryParams.faultType"
placeholder="请选择故障类型"
clearable
style="width: 180px"
>
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
@ -20,63 +32,63 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障子类"
clearable
style="width: 180px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备注" prop="faultRemark">
<el-input
v-model="queryParams.faultRemark"
placeholder="请输入备注"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input
v-model="queryParams.factoryCode"
placeholder="请输入工厂编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input
v-model="queryParams.attr1"
placeholder="请输入备用字段1"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input
v-model="queryParams.attr2"
placeholder="请输入备用字段2"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input
v-model="queryParams.attr3"
placeholder="请输入备用字段3"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input
v-model="queryParams.delFlag"
placeholder="请输入删除标志"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障子类"
clearable
style="width: 180px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备注" prop="faultRemark">
<el-input
v-model="queryParams.faultRemark"
placeholder="请输入备注"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input
v-model="queryParams.factoryCode"
placeholder="请输入工厂编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input
v-model="queryParams.attr1"
placeholder="请输入备用字段1"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input
v-model="queryParams.attr2"
placeholder="请输入备用字段2"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input
v-model="queryParams.attr3"
placeholder="请输入备用字段3"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input
v-model="queryParams.delFlag"
placeholder="请输入删除标志"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-input
class="my-select-input"
@ -107,7 +119,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
@ -120,126 +133,242 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</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-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="['device:faultType: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="['device:faultType: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="['device:faultType: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="['device:faultType:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<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="['device:faultType: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="['device:faultType: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="['device:faultType: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="['device:faultType:export']"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障类型编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障类型" align="center" prop="faultType" >
<el-table
v-loading="loading"
:data="faultList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
width="60"
align="center"
label="序号"
type="index"
></el-table-column>
<el-table-column
v-if="false"
label="主键"
align="center"
prop="faultId"
/>
<el-table-column
width="150"
label="故障类型编码"
align="center"
prop="faultCode"
/>
<el-table-column
width="150"
label="故障类型"
align="center"
prop="faultType"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_fault_type"
:value="scope.row.faultType"
/>
</template>
</el-table-column>
<el-table-column
width="150"
label="故障子类"
align="center"
prop="faultSubclass"
/>
<el-table-column
width="180"
label="备注"
align="center"
prop="faultRemark"
/>
<el-table-column
v-if="false"
label="工厂编码"
align="center"
prop="factoryCode"
/>
<el-table-column
v-if="false"
label="备用字段1"
align="center"
prop="attr1"
/>
<el-table-column
v-if="false"
label="备用字段2"
align="center"
prop="attr2"
/>
<el-table-column
v-if="false"
label="备用字段3"
align="center"
prop="attr3"
/>
<el-table-column
v-if="false"
label="删除标志"
align="center"
prop="delFlag"
/>
<el-table-column
width="100"
label="创建人"
align="center"
prop="createBy"
/>
<el-table-column
width="180"
label="创建时间"
align="center"
prop="createTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="100"
label="更新人"
align="center"
prop="updateBy"
/>
<el-table-column
width="180"
label="更新时间"
align="center"
prop="updateTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
width="180"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_type" :value="scope.row.faultType"/>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultType:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultType:remove']"
>删除</el-button
>
</template>
</el-table-column>
<el-table-column width="150" label="故障子类" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column v-if="false" label="工厂编码" align="center" prop="factoryCode" />
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultType:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultType:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障类型维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障类型编码" prop="faultCode" style="width: 300px">
<el-input v-model="form.faultCode" placeholder="请输入故障类型编码" />
</el-form-item>
<!-- 添加或修改故障类型维护对话框 -->
<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
v-if="false"
label="故障类型编码"
prop="faultCode"
style="width: 300px"
>
<el-input v-model="form.faultCode" placeholder="请输入故障类型编码" />
</el-form-item>
<el-form-item label="故障类型" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障类型" clearable style="width: 300px">
<el-select
v-model="form.faultType"
placeholder="请选择故障类型"
clearable
style="width: 300px"
>
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
@ -248,229 +377,246 @@
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input
v-model="form.faultSubclass"
placeholder="请输入故障子类"
style="width: 300px"
/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input
v-model="form.faultRemark"
placeholder="请输入备注"
style="width: 300px"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" 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 { listFaultType, getFaultType, delFaultType, addFaultType, updateFaultType } from "@/api/device/faultType";
import {
listFaultType,
getFaultType,
delFaultType,
addFaultType,
updateFaultType,
} from "@/api/device/faultType";
export default {
name: "FaultType",
dicts: ['device_fault_type'],
data() {
return {
name: "FaultType",
dicts: ["device_fault_type"],
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询故障类型维护列表 */
getList() {
this.loading = true;
listFaultType(this.queryParams).then(response => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
},
//
form: {},
//
rules: {},
};
},
created() {
this.getList();
},
methods: {
/** 查询故障类型维护列表 */
getList() {
this.loading = true;
listFaultType(this.queryParams).then((response) => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.faultId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障类型维护";
},
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.faultId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障类型维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const faultId = row.faultId || this.ids
getFaultType(faultId).then(response => {
const faultId = row.faultId || this.ids;
getFaultType(faultId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改故障类型维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.faultId != null) {
updateFaultType(this.form).then(response => {
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.faultId != null) {
updateFaultType(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFaultType(this.form).then(response => {
});
} else {
addFaultType(this.form).then((response) => {
if (response.code != 500) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = '';
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = "";
//
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
faultCodes = faultCodes + this.faultList[i].faultCode + ",";
}
}
}
if (faultCodes == '') {
if (faultCodes == "") {
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
@ -478,19 +624,27 @@ export default {
}
}
this.$modal.confirm('是否确认删除故障类型维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultType(faultIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/faultType/export', {
...this.queryParams
}, `faultType_${new Date().getTime()}.xlsx`)
}
}
this.$modal
.confirm('是否确认删除故障类型维护编号为"' + faultCodes + '"的数据项?')
.then(function () {
return delFaultType(faultIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"device/faultType/export",
{
...this.queryParams,
},
`faultType_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

@ -64,13 +64,13 @@
placeholder="请选择组线"
style="width: 160px"
>
<el-option
v-for="item in options"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
<el-option
v-for="item in options"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
</el-select>
</template>
</el-form-item>
@ -155,7 +155,7 @@ import {
getGroupLineList,
} from "@/api/device/faultReport";
import {getEquList} from "@/api/device/plan";
import { getEquList } from "@/api/device/plan";
import { treeselect } from "@/api/wms/equipment";
import { Message } from "element-ui";
@ -215,7 +215,7 @@ export default {
itemId: null,
itemCode: null,
itemType: null,
groupLine :null,
groupLine: null,
};
this.resetForm("form");
},
@ -257,7 +257,6 @@ export default {
});
},
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
@ -291,7 +290,7 @@ export default {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.queryParams.pageNum = 1;
this.getList()
this.getList();
},
//

@ -207,6 +207,7 @@
align="center"
prop="orderDesc"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
label="故障时间"
@ -218,7 +219,10 @@
<span>{{ parseTime(scope.row.orderBreakdownTime) }}</span>
</template>
</el-table-column>
<el-table-column label="报修来源" align="center" prop="orderSource" />
<el-table-column
label="报修来源"
align="center"
prop="orderSource" />
<el-table-column
label="报修时间"
align="center"
@ -240,6 +244,7 @@
align="center"
prop="orderRepairmanName"
width="150"
:show-overflow-tooltip="true"
/>
<el-table-column
label="联系方式"
@ -247,14 +252,22 @@
prop="orderConnection"
width="120"
/>
<el-table-column label="处理状态" align="center" prop="orderStatus" />
<el-table-column
label="处理状态"
align="center"
prop="orderStatus" />
<el-table-column
label="报修去向"
align="center"
prop="repairDestination"
width="120"
/>
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column
label="创建人"
align="center"
prop="createBy"
:show-overflow-tooltip="true"
/>
<el-table-column
label="创建时间"
align="center"
@ -362,7 +375,12 @@
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%" :span-method="objectSpanMethod">
<el-table
:data="checkList"
border
style="width: 100%"
:span-method="objectSpanMethod"
>
<el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="160">
@ -705,7 +723,12 @@
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%" :span-method="objectSpanMethod">
<el-table
:data="checkList"
border
style="width: 100%"
:span-method="objectSpanMethod"
>
<el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="160">
@ -967,23 +990,23 @@
</el-col>
<el-col :span="8">
<el-form-item label="故障描述" prop="orderDesc">
<el-select
v-model="form.orderDesc"
@change="$forceUpdate()"
@blur="selectBlur"
clearable
filterable
style="width: 200px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in orderDescOption"
:key="item.faultCode"
:label="item.faultSubclass"
:value="item.faultSubclass"
></el-option>
</el-select>
</el-form-item>
<el-select
v-model="form.orderDesc"
@change="$forceUpdate()"
@blur="selectBlur"
clearable
filterable
style="width: 200px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in orderDescOption"
:key="item.faultCode"
:label="item.faultSubclass"
:value="item.faultSubclass"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -1045,16 +1068,23 @@
:contentStyle="CS"
:label-style="LSP"
>
<el-image
v-for="(item, index) in urlLists"
:key="index"
:src="item"
></el-image
></el-descriptions-item>
<div class="view_picture_body">
<el-image
v-for="(item, index) in urlLists"
:key="index"
:src="item"
></el-image>
</div>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%" :span-method="objectSpanMethod">
<el-table
:data="checkList"
border
style="width: 100%"
:span-method="objectSpanMethod"
>
<el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="160">
@ -1160,7 +1190,7 @@ export default {
pageSize: 1000,
},
//
orderDescOption : [],
orderDescOption: [],
teamOption: [],
//
fileList: [],
@ -1330,8 +1360,6 @@ export default {
second
);
}
console.log(time);
console.log(nowDate(time));
this.form.workPlanTime = nowDate(time);
},
/** 查询维修措施列表 */
@ -1531,7 +1559,6 @@ export default {
});
this.checkList = standards;
console.log(this.checkList);
}
this.openView = true;
@ -1543,7 +1570,6 @@ export default {
this.reset();
const orderId = row.orderId || this.ids;
getMaintenanceTeamList(this.queryParams).then((response) => {
console.log(response.rows);
this.teamOption = response.rows;
});
getFaultReport(orderId).then((response) => {
@ -1609,7 +1635,6 @@ export default {
});
this.checkList = standards;
console.log(this.checkList);
}
if (
@ -1655,7 +1680,6 @@ export default {
if (Array.isArray(this.form.fileList)) {
this.form.fileList = this.listToString(this.form.fileList);
}
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.orderId != null) {
@ -1757,7 +1781,6 @@ export default {
}
}
},
},
};
</script>
@ -1767,4 +1790,9 @@ export default {
height: 400px;
overflow-y: auto;
}
.view_picture_body {
height: 300px;
overflow-y: auto;
}
</style>

Loading…
Cancel
Save