中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
3.7 KiB

<template>
5 months ago
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete">
</el-button> -->
5 months ago
</template>
<template #menu-right>
<el-button type="success" icon="el-icon-upload" @click="handleImport"
>导入
</el-button>
</template>
</avue-crud>
</template>
<script>
export default {
5 months ago
data() {
return {
selectionList: [],
option: {
height: "auto",
calcHeight: 32,
tip: false,
size: "medium",
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtnText: "修改",
addBtnIcon: " ",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
viewBtnText: "详情",
labelWidth: 120,
menuWidth: 120,
dialogWidth: 1040,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
index: false,
showOverflowTooltip: true,
menu: false,
header: false,
searchLabelPosition: "left",
searchGutter: 24,
searchSpan: 6,
menuAlign: "left",
gridBtn: false,
searchMenuPosition: "right",
align: "center",
column: [
{
label: "池体名称",
prop: "name",
sortable: true,
filter: true,
span: 12,
search: false,
searchLabelWidth: 140,
},
{
label: "测量值",
prop: "gageValue",
search: false,
sortable: true,
filter: true,
span: 12,
},
{
label: "设定值",
align: "center",
children: [
{
label: "上限",
prop: "lowerLimit",
},
{
label: "下限",
prop: "superiorLimit",
},
],
},
5 months ago
{
label: "参考值",
prop: "consultValue",
search: false,
sortable: true,
filter: true,
span: 12,
},
],
},
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
};
},
methods: {
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {});
},
5 months ago
// 多选
selectionChange(list) {
this.selectionList = list;
},
onLoad() {
this.loading = true;
this.data = [];
this.page.total = this.data.length;
this.loading = false;
setTimeout(() => {
this.selectionClear();
}, 500);
},
},
};
</script>
5 months ago
<style lang="scss" scoped></style>