工单详情ui

This commit is contained in:
helloDy
2023-12-22 16:35:03 +08:00
parent 3aec5ee86c
commit df7bc08f71
3 changed files with 219 additions and 138 deletions

View File

@@ -44,6 +44,7 @@ import { Message } from 'element-ui';
import LocalDataManager from './utils/local-data-manager';
// import response from './response';
import moment from 'moment';
import { parseTime } from '@/utils/ruoyi'
export default {
name: 'EquipmentFullParams',
@@ -51,9 +52,9 @@ export default {
props: {},
data() {
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const aWeekAgo = today - 3600 * 1000 * 24 * 7;
// const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date().getTime();
const tenminAgo = today - (10 * 60 * 1000);
return {
searchBarFormConfig: [
{
@@ -73,7 +74,7 @@ export default {
{
type: 'datePicker',
label: '时间段',
dateType: 'daterange', // datetimerange
dateType: 'datetimerange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'timestamp',
@@ -94,13 +95,19 @@ export default {
],
queryParams: {
id: null,
time: [new Date(aWeekAgo), new Date(today)],
time: [tenminAgo, today],
},
tableList: [
// {
// key: 'base-table__key__1',
// tableProps: [],
// list: [],
// tableProps: [{
// prop: 'name',
// label: 'name'
// }],
// dataManager: {dataList: [{name: '1'}]},
// list: [{
// name: '11'
// }],
// pageNo: 1,
// pageSize: 3,
// total: 0,
@@ -122,6 +129,11 @@ export default {
'defaultSelect',
to.params.equipmentCode
);
vm.$set(
vm.searchBarFormConfig[2],
'defaultSelect',
vm.queryParams.time
);
vm.handleQuery();
});
} else {
@@ -268,11 +280,17 @@ export default {
async handleSearchBarBtnClick({ btnName, timeVal }) {
if (timeVal && timeVal.length > 0) {
this.queryParams.time = timeVal;
if (timeVal[1] - timeVal[0] <= 10 * 60 * 1000) {
this.queryParams.time = timeVal;
await this.handleQuery();
} else {
this.$message.warning('时间范围最大一小时限制!')
}
} else {
this.queryParams.time = [];
this.$message.warning('时间段必选!')
}
await this.handleQuery();
},
handleEmitFun(table, val) {
@@ -295,9 +313,12 @@ export default {
}
.tables {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 18px;
/* display: grid; */
/* grid-template-columns: 1fr 1fr; */
/* gap: 18px; */
display: flex;
flex-direction: column;
width: 100%;
}
.tables >>> .baseTable {
@@ -306,5 +327,6 @@ export default {
.custom-table {
overflow-x: hidden;
margin-bottom: 10px;
}
</style>