中航光电热表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.

183 lines
5.9 KiB

<template>
<basic-container>
<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">删除</el-button>
</template>
<template #menu-right>
<el-button type="primary">导入</el-button>
</template>
<template #menu="scope">
<el-button type="text" size="mini" @click="handle(scope.row.tbId)">处理</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
export default {
data() {
return {
selectionList: [],
option: {
height: 'auto',
calcHeight: 32,
tip: false,
size: 'medium',
simplePage: true,
searchShow: true,
5 months ago
searchMenuSpan: 12,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: true,
viewBtn: false,
delBtn: true,
addBtn: true,
editBtnText: '修改',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
viewBtnText: '详情',
5 months ago
labelWidth: 90,
menuWidth: 180,
5 months ago
dialogWidth: 440,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
index: false,
showOverflowTooltip: true,
5 months ago
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
align: 'center',
column: [
{
5 months ago
label: '工艺编号',
prop: 'bopCode',
sortable: true,
filter: true,
span: 12,
search: true,
5 months ago
display: false,
},
{
5 months ago
label: '工序',
prop: 'bopName',
search: true,
sortable: true,
filter: true,
5 months ago
span: 24,
searchLabelWidth: 50,
type: 'select',
filterable: true,
dicData: [
{
label: '工序1',
value: 1
},
{
label: '工序2',
value: 2
}
],
rules: [
{
required: true,
message: '请输入工艺能力',
trigger: 'blur',
},
],
},
{
label: '工艺能力',
prop: 'caNameTest',
search: false,
sortable: true,
filter: true,
5 months ago
span: 24,
type: 'select',
multiple: true,
filterable: true,
dicData: [
{
label: '工序1',
value: 1
},
{
label: '工序2',
value: 2
}
],
rules: [
{
required: true,
message: '请输入工艺能力',
trigger: 'blur',
},
],
},
]
},
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(() => {
})
},
// 多选
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>
<style lang="scss" scoped></style>