opt:设备故障功能wql改成mybatis plus
This commit is contained in:
@@ -90,40 +90,34 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip width="150px" />
|
||||
<el-table-column prop="device_name" label="设备名称 " show-overflow-tooltip width="300px" />
|
||||
<el-table-column prop="is_fault" label="状态 " show-overflow-tooltip width="100px">
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip width="300px" />
|
||||
<el-table-column prop="plant_code" label="所属车间" show-overflow-tooltip width="100px" :formatter="formatType1" />
|
||||
<el-table-column prop="region_code" label="所属区域" show-overflow-tooltip width="100px" :formatter="formatType2" />
|
||||
<el-table-column prop="is_fault" label="状态" show-overflow-tooltip width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.is_fault==='1'" type="danger" circle />
|
||||
<el-button v-if="scope.row.is_fault==='0'" type="success" circle />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="plant_code" label="所属车间 " show-overflow-tooltip width="100px" :formatter="formatType1" />
|
||||
<el-table-column prop="region_code" label="所属区域 " show-overflow-tooltip width="100px" :formatter="formatType2" />
|
||||
<el-table-column prop="fault_type" label="异常类型 " show-overflow-tooltip width="100px" :formatter="formatType3" />
|
||||
<el-table-column prop="fault_type" label="异常类型" show-overflow-tooltip width="100px" :formatter="formatType3" />
|
||||
<el-table-column prop="fault_info" label="故障信息" show-overflow-tooltip width="250px" />
|
||||
<el-table-column prop="solve_mode" label="解决方式" show-overflow-tooltip width="250px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<!-- <pagination />-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudFaultdevice from '@/views/wms/basedata/master/faultdevice/faultdevice'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Devicecharge',
|
||||
dicts: ['DEVICE_ERROR_TYPE', 'IS_OR_NOT', 'DEVICE_REGION_TYPE', 'product_area'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
components: { crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备故障监控',
|
||||
@@ -136,8 +130,7 @@ export default {
|
||||
plant_code: 'A1'
|
||||
},
|
||||
idField: 'device_id',
|
||||
sort: 'device_id,desc',
|
||||
crudMethod: { ...crudFaultdevice }
|
||||
sort: 'device_id,desc'
|
||||
})
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -1,21 +1,5 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/faultdevice',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/faultdevice/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/faultdevice',
|
||||
@@ -39,4 +23,4 @@ export function deviceCharge(params) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, syncInfo, deviceCharge }
|
||||
export default { edit, syncInfo, deviceCharge }
|
||||
|
||||
@@ -77,10 +77,8 @@
|
||||
v-model="form.fault_type"
|
||||
size="mini"
|
||||
:disabled="true"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 300px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.DEVICE_ERROR_TYPE"
|
||||
@@ -149,8 +147,8 @@ const defaultForm = {
|
||||
fault_id: null,
|
||||
fault_code: null,
|
||||
fault_info: null,
|
||||
acs_type: null,
|
||||
solve_mode: null,
|
||||
fault_type: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
@@ -171,8 +169,8 @@ export default {
|
||||
add: false,
|
||||
reset: true
|
||||
},
|
||||
idField: 'device_id',
|
||||
sort: 'device_id,desc',
|
||||
idField: 'fault_id',
|
||||
sort: 'create_time',
|
||||
crudMethod: { ...crudFaultdevice }
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user