|
|
|
@ -16,6 +16,7 @@ |
|
|
|
@size-change="sizeChange" |
|
|
|
@size-change="sizeChange" |
|
|
|
@refresh-change="refreshChange" |
|
|
|
@refresh-change="refreshChange" |
|
|
|
@on-load="onLoad" |
|
|
|
@on-load="onLoad" |
|
|
|
|
|
|
|
@sort-change="sortChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #menu-left> |
|
|
|
<template #menu-left> |
|
|
|
<el-button type="primary" @click="handleAdd">新增 </el-button> |
|
|
|
<el-button type="primary" @click="handleAdd">新增 </el-button> |
|
|
|
@ -50,12 +51,11 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import basicImport from '@/components/basic-import/main.vue'; |
|
|
|
import basicImport from '@/components/basic-import/main.vue'; |
|
|
|
import { getList, add, remove, update } from '@/api/safetyManagement/safetyInspectionPoint.js'; |
|
|
|
import { getList, add, remove, update } from '@/api/safetyManagement/safetyInspectionPoint.js'; |
|
|
|
import addInspectDailog from './addInspectDailog.vue' |
|
|
|
import addInspectDailog from './addInspectDailog.vue'; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
basicImport, |
|
|
|
basicImport, |
|
|
|
addInspectDailog |
|
|
|
addInspectDailog, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
@ -206,7 +206,7 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 点击导入按钮 |
|
|
|
// 点击导入按钮 |
|
|
|
handleImport() { |
|
|
|
handleImport() { |
|
|
|
this.isShowImport = true |
|
|
|
this.isShowImport = true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 保存 |
|
|
|
// 保存 |
|
|
|
rowSave(row, done, loading) { |
|
|
|
rowSave(row, done, loading) { |
|
|
|
@ -297,13 +297,27 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 搜索重置 |
|
|
|
// 搜索重置 |
|
|
|
searchReset() { |
|
|
|
searchReset() { |
|
|
|
this.query = {} |
|
|
|
this.query = {}; |
|
|
|
this.onLoad(this.page) |
|
|
|
this.onLoad(this.page); |
|
|
|
}, |
|
|
|
}, |
|
|
|
selectionClear() { |
|
|
|
selectionClear() { |
|
|
|
this.selectionList = []; |
|
|
|
this.selectionList = []; |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 排序 |
|
|
|
|
|
|
|
sortChange({ prop, order }) { |
|
|
|
|
|
|
|
if (!prop) { |
|
|
|
|
|
|
|
// 如果取消排序,清空排序参数 |
|
|
|
|
|
|
|
this.query.orderByField = undefined; |
|
|
|
|
|
|
|
this.query.isAsc = undefined; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
|
|
|
this.query.orderByField = orderByField; |
|
|
|
|
|
|
|
this.query.isAsc = order === 'ascending' ? true : false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// // 重新加载数据 |
|
|
|
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
|
|
|
}, |
|
|
|
// 加载页面数据 |
|
|
|
// 加载页面数据 |
|
|
|
onLoad(page, params = {}) { |
|
|
|
onLoad(page, params = {}) { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
@ -326,9 +340,8 @@ export default { |
|
|
|
searchChange(params, done) { |
|
|
|
searchChange(params, done) { |
|
|
|
this.query = params; |
|
|
|
this.query = params; |
|
|
|
this.page.currentPage = 1; |
|
|
|
this.page.currentPage = 1; |
|
|
|
this.onLoad(this.page, params) |
|
|
|
this.onLoad(this.page, params); |
|
|
|
done() |
|
|
|
done(); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 关闭弹窗 |
|
|
|
// 关闭弹窗 |
|
|
|
closeDialog() { |
|
|
|
closeDialog() { |
|
|
|
|