Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1

This commit is contained in:
fan 2022-11-03 16:27:47 +08:00
commit 0d6f548e6e

View File

@ -25,13 +25,13 @@
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">缓存命令</div>
<div class="contant-icon" @click="active1=!active1">
<div class="contant-icon" @click="activeChange('active1')">
<i v-if="active1" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active1" class="left-table1">
<el-table ref="table1" :data="filterDisCmdData('Cache')" border style="width: 100%" height="100" highlight-current-row @current-change="handleCurrentChange($event, 'table1')">
<el-table ref="table1" :data="filterDisCmdData('Cache')" border style="width: 100%" :height="operateTableHeight" highlight-current-row @current-change="handleCurrentChange($event, 'table1')">
<el-table-column prop="cmdCode" label="命令号" width="80" />
<el-table-column prop="transitId" label="识别号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
@ -57,13 +57,13 @@
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">接受命令</div>
<div class="contant-icon" @click="active2=!active2">
<div class="contant-icon" @click="activeChange('active2')">
<i v-if="active2" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active2" class="left-table1">
<el-table ref="table2" :data="filterDisCmdData('Receive')" border style="width: 100%" height="100" highlight-current-row @current-change="handleCurrentChange($event, 'table2')">
<el-table ref="table2" :data="filterDisCmdData('Receive')" border style="width: 100%" :height="operateTableHeight" highlight-current-row @current-change="handleCurrentChange($event, 'table2')">
<el-table-column prop="cmdCode" label="命令号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column label="接收单位" show-overflow-tooltip width="160">
@ -89,13 +89,13 @@
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">发送命令</div>
<div class="contant-icon" @click="active3=!active3">
<div class="contant-icon" @click="activeChange('active3')">
<i v-if="active3" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active3" class="left-table1">
<el-table ref="table3" :data="filterDisCmdData('Sent')" border style="width: 100%" height="150" highlight-current-row @current-change="handleCurrentChange($event, 'table3')">
<el-table ref="table3" :data="filterDisCmdData('Sent')" border style="width: 100%" :height="operateTableHeight" highlight-current-row @current-change="handleCurrentChange($event, 'table3')">
<el-table-column prop="cmdCode" label="命令号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column label="接收单位" show-overflow-tooltip width="160">
@ -121,13 +121,13 @@
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">签收完成</div>
<div class="contant-icon" @click="active4=!active4">
<div class="contant-icon" @click="activeChange('active4')">
<i v-if="active4" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active4" class="left-table1">
<el-table ref="table4" :data="filterDisCmdData('Signed')" border style="width: 100%" height="170" highlight-current-row @current-change="handleCurrentChange($event, 'table4')">
<el-table ref="table4" :data="filterDisCmdData('Signed')" border style="width: 100%" :height="operateTableHeight" highlight-current-row @current-change="handleCurrentChange($event, 'table4')">
<el-table-column prop="cmdCode" label="命令号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column label="接收单位" show-overflow-tooltip width="160">
@ -157,7 +157,7 @@
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">查询条件</div>
<div class="contant-icon" @click="active5=!active5">
<div class="contant-icon" @click="activeChange('active5')">
<i v-if="active1" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
@ -216,7 +216,7 @@
<el-button type="primary" style="width: 100px" @click="clearCondition">清除</el-button>
</div>
</div>
<el-table ref="table5" class="search-table" :data="searchTable" border style="width: 100%" height="100%" highlight-current-row @current-change="handleCurrentChange($event, 'table5')">
<el-table ref="table5" class="search-table" :data="searchTable" border style="width: 100%" :height="searchTableHeight" highlight-current-row @current-change="handleCurrentChange($event, 'table5')">
<el-table-column prop="cmdCode" label="命令号" width="80" />
<el-table-column prop="transitId" label="识别号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
@ -380,7 +380,7 @@
<!-- <el-checkbox v-model="tableChecked">全选</el-checkbox> -->
</div>
<div class="table">
<el-table ref="table" :data="getTableData" border style="width: 100%" :header-cell-class-name="cellClass" height="200" highlight-current-row @select="selectionChange" @select-all="selectionChange" @row-click="tableRowChange">
<el-table ref="table" :data="getTableData" border style="width: 100%" :header-cell-class-name="cellClass" :height="tableHeight" highlight-current-row @select="selectionChange" @select-all="selectionChange" @row-click="tableRowChange">
<el-table-column type="selection" :selectable="selectableFn" width="50" />
<el-table-column prop="name" label="受令单位" width="160" />
<el-table-column prop="copyers" label="抄送" width="120" show-overflow-tooltip />
@ -425,6 +425,9 @@ export default {
name:'DispatcherCmd',
data() {
return {
operateTableHeight: 100,
searchTableHeight: 260,
tableHeight: 200,
activeTab: 'operate',
cmdTab: 'cmd',
textTab: 'text',
@ -623,6 +626,11 @@ export default {
this.$set(this.queryResData.companyStateMap, item.cpId, item);
}
});
},
'$store.state.app.height': function (val) {
this.getOperateTableHeight();
this.getSearchTableHeight();
this.getTableHeight();
}
},
beforeDestroy() {},
@ -631,7 +639,59 @@ export default {
this.searchCmd();
this.getSenderName();
},
created() {
this.getOperateTableHeight();
this.getSearchTableHeight();
this.getTableHeight();
},
methods:{
activeChange(key) {
this[key] = !this[key];
this.getOperateTableHeight();
if (key == 'active5') {
this.getSearchTableHeight();
}
},
getOperateTableHeight() {
const allH = this.$store.state.app.height;
const heardH = 100;
const titleH = 28 * 4;
let r = allH - heardH - titleH;
r = r > 0 ? r : 0;
const arr = ['active1', 'active2', 'active3', 'active4'];
let num = 0;
arr.forEach(key => {
if (this[key]) {
num += 1;
}
});
if (num > 0) {
this.operateTableHeight = r / num;
}
},
getSearchTableHeight() {
const allH = this.$store.state.app.height;
const heardH = 42;
const titleH = 28;
const sH = 436;
let h = allH - heardH - titleH;
if (this.active5) {
h -= sH;
}
h = h > 0 ? h : 0;
this.searchTableHeight = h;
},
getTableHeight() {
const allH = this.$store.state.app.height;
const heardH = 29;
const sH = 250;
const textH = 181;
const tableTitleH = 22;
const btnH = 40;
let h = allH - heardH - sH - textH - tableTitleH - btnH;
h = h > 0 ? h : 0;
this.tableHeight = h;
},
cellClass(row) {
if (row.columnIndex === 0 && this.disabledSent) {
return 'DisableSelection';
@ -1136,10 +1196,10 @@ export default {
}
}
.search-box {
height: 720px;
display: flex;
flex-direction: column;
justify-content: center;
// min-height: 720px;
// display: flex;
// flex-direction: column;
// justify-content: center;
.search-condition {
padding: 5px;
.condition-top {