update calcTableHeight

This commit is contained in:
g7hoo 2022-09-01 08:50:46 +08:00
parent 3fe0d26d8f
commit 6e06159250
33 changed files with 57 additions and 58 deletions

View File

@ -7,7 +7,6 @@
<el-form-item> <el-form-item>
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
<el-button v-if="$hasPermission('monitoring:equipmenalarmlog:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> <el-button v-if="$hasPermission('monitoring:equipmenalarmlog:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;"> <!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
@ -33,7 +32,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> --> </el-table> -->
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" /> <base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -69,12 +68,15 @@ const tableConfigs = [
{ prop: 'updaterId', name: '更新人' }, { prop: 'updaterId', name: '更新人' },
{ prop: 'updaterName', name: '更新人姓名' }, { prop: 'updaterName', name: '更新人姓名' },
{ prop: 'updateTime', name: '更新时间' }, { prop: 'updateTime', name: '更新时间' },
{ prop: 'version', name: '版本号' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } { prop: 'version', name: '版本号' },
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
] ]
export default { export default {
data() { data() {
return {tableConfigs, return {
tableConfigs,
calcMaxHeight,
dataForm: { dataForm: {
key: '' key: ''
}, },
@ -88,7 +90,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate,BaseTable AddOrUpdate,
BaseTable
}, },
activated() { activated() {
this.getDataList() this.getDataList()

View File

@ -7,7 +7,6 @@
<el-form-item> <el-form-item>
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
<el-button v-if="$hasPermission('monitoring:equipmenfile:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> <el-button v-if="$hasPermission('monitoring:equipmenfile:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;"> <!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
@ -83,6 +82,7 @@ export default {
data() { data() {
return { return {
tableConfigs, tableConfigs,
calcMaxHeight,
dataForm: { dataForm: {
key: '' key: ''
}, },

View File

@ -58,6 +58,7 @@ export default {
data() { data() {
return { return {
addOrUpdateConfigs, addOrUpdateConfigs,
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -126,6 +126,7 @@ export default {
data() { data() {
return { return {
addOrUpdateConfigs, addOrUpdateConfigs,
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -95,6 +95,7 @@ export default {
data() { data() {
return { return {
tableConfigs, tableConfigs,
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -121,6 +121,7 @@ export default {
data() { data() {
return { return {
addOrUpdateConfigs, addOrUpdateConfigs,
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -63,6 +63,7 @@ export default {
data() { data() {
return { return {
tableConfigs, tableConfigs,
calcMaxHeight,
dataForm: { dataForm: {
key: '' key: ''
}, },

View File

@ -62,6 +62,7 @@ export default {
data() { data() {
return { return {
tableConfigs, tableConfigs,
calcMaxHeight,
dataForm: { dataForm: {
key: '' key: ''
}, },

View File

@ -58,6 +58,7 @@ export default {
data() { data() {
return { return {
tableConfigs, tableConfigs,
calcMaxHeight,
dataForm: { dataForm: {
key: '' key: ''
}, },

View File

@ -77,6 +77,7 @@ export default {
data() { data() {
return { return {
addOrUpdateConfigs, addOrUpdateConfigs,
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -58,6 +58,7 @@ export default {
data() { data() {
return { return {
tableConfigs, tableConfigs,
calcMaxHeight,
dataForm: { dataForm: {
key: '' key: ''
}, },

View File

@ -1,25 +1,12 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item> <el-form-item>
<el-input <el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
v-model="dataForm.key"
placeholder="参数名"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
<el-button <el-button v-if="$hasPermission('monitoring:equipmenattr:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
v-if="$hasPermission('monitoring:equipmenattr:save')"
type="primary"
@click="addOrUpdateHandle()"
>新增</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;"> <!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
@ -44,11 +31,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> --> </el-table> -->
<base-table <base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="500"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -60,11 +43,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
</div> </div>
</template> </template>
@ -103,6 +82,7 @@ export default {
data() { data() {
return { return {
tableConfigs, tableConfigs,
calcMaxHeight,
dataForm: { dataForm: {
key: '' key: ''
}, },
@ -174,15 +154,11 @@ export default {
: this.dataListSelections.map(item => { : this.dataListSelections.map(item => {
return item.id return item.id
}) })
this.$confirm( this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, confirmButtonText: '确定',
'提示', cancelButtonText: '取消',
{ type: 'warning'
confirmButtonText: '确定', }).then(() => {
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/monitoring/equipmentAttr'), url: this.$http.adornUrl('/monitoring/equipmentAttr'),
method: 'delete', method: 'delete',

View File

@ -70,6 +70,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {

View File

@ -127,6 +127,7 @@ export default {
mixins: [dictListMixin], mixins: [dictListMixin],
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -110,6 +110,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {

View File

@ -78,6 +78,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {

View File

@ -64,6 +64,7 @@ const tableConfigs = [
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -99,6 +99,7 @@ const FakeChart = {
}, },
data() { data() {
return { return {
calcMaxHeight,
chart: null, chart: null,
defaultOpts: { defaultOpts: {
title: { title: {

View File

@ -62,6 +62,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {

View File

@ -93,6 +93,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {

View File

@ -55,6 +55,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {

View File

@ -24,6 +24,7 @@ export default {
components: { BaseTable, SmallTitle }, components: { BaseTable, SmallTitle },
data() { data() {
return { return {
calcMaxHeight,
loadTable: false, loadTable: false,
tableProps: [{ label: 'default', prop: 'default' }], tableProps: [{ label: 'default', prop: 'default' }],
stepOneArray: [], stepOneArray: [],

View File

@ -24,6 +24,7 @@ export default {
components: { BaseTable, SmallTitle }, components: { BaseTable, SmallTitle },
data() { data() {
return { return {
calcMaxHeight,
loadTable: false, loadTable: false,
dynamicPropSet: false, dynamicPropSet: false,
tableProps: [{ label: 'default', prop: 'default' }], tableProps: [{ label: 'default', prop: 'default' }],

View File

@ -8,8 +8,8 @@
</template> </template>
<script> <script>
// @ts-nocheck // @ts-nocheck
/* eslint-disable */ /* eslint-disable */
import BaseTable from '@/components/base-table' import BaseTable from '@/components/base-table'
import SmallTitle from '@/components/small-title' import SmallTitle from '@/components/small-title'
import moment from 'moment' import moment from 'moment'
@ -21,6 +21,7 @@ export default {
components: { BaseTable, SmallTitle }, components: { BaseTable, SmallTitle },
data() { data() {
return { return {
calcMaxHeight,
loadTable: false, loadTable: false,
// dynamicPropSet: false, // dynamicPropSet: false,
tableProps: [{ label: 'default', prop: 'default' }], tableProps: [{ label: 'default', prop: 'default' }],
@ -40,11 +41,11 @@ export default {
}) })
this.intervalId = setInterval(() => { this.intervalId = setInterval(() => {
this.clearData() this.clearData()
this.fetchList().then(res => { this.fetchList().then(res => {
this.testData = res this.testData = res
this.handleData() this.handleData()
}) })
}, 1000 * 60 * 5) }, 1000 * 60 * 5)
}, },

View File

@ -62,6 +62,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
addOrUpdateConfigs, addOrUpdateConfigs,
dataForm: { dataForm: {

View File

@ -46,9 +46,7 @@ const CategoryList = {
} }
}, },
data() { data() {
return { return { calcMaxHeight, pickedId: null }
pickedId: null
}
}, },
mounted() { mounted() {
console.log(this.injectData) console.log(this.injectData)

View File

@ -25,13 +25,7 @@
<script> <script>
export default { export default {
data() { data() {
return { return { calcMaxHeight, dataList: [], pageIndex: 1, pageSize: 10, totalPage: 0, allNum: 0 }
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
allNum: 0
}
}, },
created() { created() {
this.getDataList() this.getDataList()

View File

@ -59,6 +59,7 @@ const tableConfigs = [
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -78,6 +78,7 @@ const tableConfigs = [
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -54,6 +54,7 @@ const tableConfigs = [
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -51,6 +51,7 @@ const tableConfigs = [
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''

View File

@ -65,6 +65,7 @@ const addOrUpdateConfigs = {
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {

View File

@ -73,6 +73,7 @@ const tableConfigs = [
export default { export default {
data() { data() {
return { return {
calcMaxHeight,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '' key: ''