报表样式修改

This commit is contained in:
2023-06-26 16:03:30 +08:00
parent 0aa208aa0b
commit a11ef7da48
23 changed files with 947 additions and 98 deletions

View File

@@ -149,18 +149,26 @@ export default {
window.addEventListener('resize', () => {
this.tableH = tableHeight(330)
})
this.formConfig[2].defaultSelect = [
moment().format('yyyy-MM-DD') + 'T00:00:00',
moment().format('yyyy-MM-DD') + 'T23:59:59'
]
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
const { listQuery } = this.$route.params
if (listQuery) {
let obj = JSON.parse(listQuery)
this.listQuery = obj
this.formConfig[0].defaultSelect = obj.glassId
this.formConfig[1].defaultSelect = obj.grindType
this.formConfig[2].defaultSelect = [obj.startTime, obj.endTime]
} else {
this.formConfig[2].defaultSelect = [
moment().format('yyyy-MM-DD') + 'T00:00:00',
moment().format('yyyy-MM-DD') + 'T23:59:59'
]
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
}
this.getList()
},
methods: {
getList() {
processCompleteInspetion({ ...this.listQuery }).then((res) => {
console.log(res)
if (res.code === 0 && res.data) {
this.tableData = res.data.records
this.total = res.data.total
@@ -207,11 +215,13 @@ export default {
console.log(val)
if (val.type === 'detail') {
this.$router.push({
path: '/qualityManagement/processFullInspection/fullInspectionDetail',
query: {
// path: '/qualityManagement/processFullInspection/fullInspectionDetail',
name: 'fullInspectionDetail',
params: {
virtualcode: val.data.virtualcode,
filetype: encodeURIComponent(val.data.filetype),
time: val.data.time
time: val.data.time,
listQuery: JSON.stringify(this.listQuery)
}
})
}

View File

@@ -106,6 +106,13 @@ export default {
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
],
formConfig: [
{
type: 'input',
label: '玻璃ID',
param: 'glassId',
defaultSelect: '',
disabled: true
},
{
type: 'select',
label: '缺陷类型',
@@ -147,12 +154,15 @@ export default {
defectType: ''
},
// 查看图片
centervisible: false
centervisible: false,
beforeListQuery: ''
}
},
mounted() {
const { virtualcode, filetype, time } = this.$route.query
const { virtualcode, filetype, time, listQuery } = this.$route.params
this.beforeListQuery = listQuery
this.listQuery.glassId = virtualcode
this.formConfig[0].defaultSelect = virtualcode
this.getDetail(virtualcode, filetype, time)
window.addEventListener('resize', () => {
this.tableH = tableHeight(425)
@@ -179,7 +189,7 @@ export default {
size: 500,
current: 1
}).then((res) => {
this.formConfig[0].selectOptions = res.data
this.formConfig[1].selectOptions = res.data
})
},
getList() {
@@ -200,7 +210,11 @@ export default {
break
default:
this.$router.push({
path: '/qualityManagement/processFullInspection/fullInspection'
// path: '/qualityManagement/processFullInspection/fullInspection',
name: 'fullInspection',
params: {
listQuery: this.beforeListQuery
}
})
}
},