更新成本 #319

Merged
zwq merged 1 commits from projects/mesxc-zwq into projects/mesxc-test 2024-04-09 11:06:14 +08:00
5 changed files with 16 additions and 27 deletions

View File

@ -32,6 +32,7 @@ import {
import { getEnergyTypeListAll } from '@/api/base/energyType'; import { getEnergyTypeListAll } from '@/api/base/energyType';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import moment from 'moment'; import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -61,7 +62,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage], mixins: [basicPage,tableHeightMixin],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -70,7 +71,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -113,9 +113,6 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
getEnergyTypeListAll().then((response) => { getEnergyTypeListAll().then((response) => {
this.formConfig[0].selectOptions = response.data; this.formConfig[0].selectOptions = response.data;
}); });

View File

@ -32,6 +32,7 @@ import {
import { getEnergyTypeListAll } from '@/api/base/energyType'; import { getEnergyTypeListAll } from '@/api/base/energyType';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import moment from 'moment'; import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -71,7 +72,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage], mixins: [basicPage,tableHeightMixin],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -80,7 +81,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -137,9 +137,6 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);

View File

@ -12,7 +12,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:max-height="tableH" :max-height="tableH"
:table-data="tableData"> :table-data="tableData">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
@ -53,6 +53,7 @@ import {
} from '@/api/cost/costMaterialSet'; } from '@/api/cost/costMaterialSet';
import { getHotMaterialList } from '@/api/base/coreHotMaterial'; import { getHotMaterialList } from '@/api/base/coreHotMaterial';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -91,7 +92,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage], mixins: [basicPage,tableHeightMixin],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -99,7 +100,6 @@ export default {
deleteURL: deleteCostMaterialSet, deleteURL: deleteCostMaterialSet,
}, },
tableProps, tableProps,
tableH: this.tableHeight(260),
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`cost:rawMaterialConfig:update`) this.$auth.hasPermi(`cost:rawMaterialConfig:update`)
? { ? {
@ -132,7 +132,11 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: 'separate', type:
this.$auth.hasPermi('cost:rawMaterialConfig:create') &&
this.$auth.hasPermi('cost:rawMaterialConfig:query')
? 'separate'
: '',
}, },
{ {
type: this.$auth.hasPermi('cost:rawMaterialConfig:create') type: this.$auth.hasPermi('cost:rawMaterialConfig:create')
@ -150,9 +154,6 @@ export default {
AddOrUpdate, AddOrUpdate,
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
getHotMaterialList().then((response) => { getHotMaterialList().then((response) => {
this.formConfig[0].selectOptions = response.data; this.formConfig[0].selectOptions = response.data;
}); });

View File

@ -32,6 +32,7 @@ import {
import { getHotMaterialList } from '@/api/base/coreHotMaterial'; import { getHotMaterialList } from '@/api/base/coreHotMaterial';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import moment from 'moment'; import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -66,7 +67,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage], mixins: [basicPage,tableHeightMixin],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -75,7 +76,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -118,9 +118,6 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
getHotMaterialList().then((response) => { getHotMaterialList().then((response) => {
this.formConfig[0].selectOptions = response.data; this.formConfig[0].selectOptions = response.data;
}); });

View File

@ -32,6 +32,7 @@ import {
import { getHotMaterialList } from '@/api/base/coreHotMaterial'; import { getHotMaterialList } from '@/api/base/coreHotMaterial';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import moment from 'moment'; import moment from 'moment';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
const tableProps = [ const tableProps = [
{ {
@ -70,7 +71,7 @@ const tableProps = [
]; ];
export default { export default {
mixins: [basicPage], mixins: [basicPage,tableHeightMixin],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -79,7 +80,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -136,9 +136,6 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);