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

355 lines
9.3 KiB

<template>
6 months ago
<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">
6 months ago
<template #menu-left>
3 months ago
<el-button type="danger" @click="handleDelete">删除
6 months ago
</el-button>
</template>
<template #menu-right> </template>
<template #menu="scope"> </template>
</avue-crud>
</basic-container>
</template>
<script>
export default {
6 months ago
data() {
return {
selectionList: [],
option: {
height: "auto",
calcHeight: 32,
tip: false,
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: true,
viewBtn: false,
delBtn: true,
addBtn: true,
editBtnText: "修改",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
viewBtnText: "详情",
labelWidth: 120,
menuWidth: 180,
dialogWidth: 1040,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
index: false,
showOverflowTooltip: true,
searchLabelPosition: "left",
searchGutter: 24,
searchSpan: 6,
menuAlign: "left",
gridBtn: false,
searchMenuPosition: "right",
addBtnIcon: " ",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
align: "center",
6 months ago
column: [
{
label: "月份",
prop: "pfvMonth",
sortable: true,
filter: true,
span: 24,
6 months ago
search: true,
width: 220,
type: 'month',
6 months ago
rules: [
{
required: true,
message: "请输入月份",
6 months ago
trigger: "blur",
},
],
},
{
label: "尖时一开始",
prop: "jianTimeStartOne",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
width: 140,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "尖时一结束",
prop: "jianTimeEndOne",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
width: 140,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "峰时一开始",
prop: "fengTimeStartOne",
search: false,
sortable: true,
filter: true,
span: 12,
width: 140,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "峰时一结束",
prop: "fengTimeEndOne",
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "平时一开始",
prop: "pingTimeStartOne",
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "平时一结束",
prop: "pingTimeEndOne",
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "谷时一开始",
prop: "guTimeStartOne",
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "谷时一结束",
prop: "guTimeEndOne",
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "尖时二开始",
prop: "jianTimeStartTwo",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "尖时二结束",
prop: "jianTimeEndTwo",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "峰时二开始",
prop: "fengTimeStartTwo",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "峰时二结束",
prop: "fengTimeEndTwo",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
6 months ago
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "平时二开始",
prop: "pingTimeStartTwo",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
{
label: "平时二结束",
prop: "pingTimeEndTwo",
6 months ago
search: false,
sortable: true,
filter: true,
span: 12,
width: 130,
type: "time",
format: 'HH:mm:ss',
valueFormat: 'HH:mm:ss',
6 months ago
},
6 months ago
],
},
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(() => { });
},
6 months ago
// 多选
selectionChange(list) {
this.selectionList = list;
},
onLoad() {
this.loading = true;
this.data = [
{
createMan: {
accountId: null,
card: null,
createTime: "2023-05-23",
curStatus: 1,
deleted: false,
deptName: null,
dimissionTime: null,
factoryId: 41,
head: 0,
jobName: "开发",
keyValue: 561,
ldapName: "zhx",
mail: null,
mobile: null,
pfDepartment: {
appLink: null,
createTime: "2022-08-31",
deleted: false,
deptCode: "001",
deptId: 1,
deptName: "MES开发部",
deptType: 1,
deptTypeTitle: "厂",
keyValue: 1,
memo: null,
orders: "00",
parentDeptId: null,
parentPath: null,
ucDeptId: null,
updateTime: "2022-08-31 16:32:46",
},
pinyinIndex: "ZHANGXIN,ZX",
ucUserId: null,
updateTime: "2023-05-23 10:58:43",
userCode: "zhx",
userId: 561,
userName: "张欣",
userSex: 1,
userSources: "张欣",
userString: "561:A:张欣",
userType: "A",
},
fengTimeEndOne: "02:00:00",
fengTimeEndTwo: "16:00:00",
fengTimeStartOne: "01:00:00",
fengTimeStartTwo: "13:00:00",
guTimeEndOne: "09:00:00",
guTimeEndTwo: "16:00:00",
guTimeStartOne: "07:00:00",
guTimeStartTwo: "15:00:00",
keyValue: 1,
pfvId: 1,
pfvMonth: "2025-06-01 00:00:00",
pingTimeEndOne: "03:04:00",
pingTimeEndTwo: "15:00:00",
pingTimeStartOne: "02:00:00",
pingTimeStartTwo: "05:00:00",
updateTime: "2025-10-23 11:38:01",
},
6 months ago
];
this.page.total = this.data.length;
this.loading = false;
setTimeout(() => {
this.selectionClear();
}, 500);
},
},
};
</script>
6 months ago
<style lang="scss" scoped></style>