优化代码

This commit is contained in:
java110 2021-11-13 02:22:13 +08:00
parent 92debdbc12
commit 245d5b0842
3 changed files with 30 additions and 11 deletions

View File

@ -60,7 +60,7 @@
); );
}, },
_initMachineVideo:function(_machines){ _initMachineVideo:function(_machines){
$that._playVideo('rtc_media_player1','webrtc://112.124.21.207/live/34020000002000000010@34020000001320000010'); $that._playVideo('rtc_media_player1','webrtc://117.159.177.191/live/34020000002000000010@34020000001320000010');
$that._playVideo('rtc_media_player2','webrtc://112.124.21.207/live/34020000001320000002@34020000001320000010'); $that._playVideo('rtc_media_player2','webrtc://112.124.21.207/live/34020000001320000002@34020000001320000010');
$that._playVideo('rtc_media_player3','webrtc://112.124.21.207/live/34020000001320000001@34020000001320000010'); $that._playVideo('rtc_media_player3','webrtc://112.124.21.207/live/34020000001320000001@34020000001320000010');
$that._playVideo('rtc_media_player4','webrtc://112.124.21.207/live/34020000001320000002@34020000001320000010'); $that._playVideo('rtc_media_player4','webrtc://112.124.21.207/live/34020000001320000002@34020000001320000010');

View File

@ -43,8 +43,8 @@
</thead> </thead>
<tbody> <tbody>
<tr v-for="(itemData,indexData) in item.data" > <tr v-for="(itemData,indexData) in item.data" >
<td class="text-center" v-for="(itemTd,key) of itemData"> <td class="text-center" v-for="(tmpItemTh,key) in item.th">
{{itemData[key]}}</td> {{itemData[tmpItemTh]}}</td>
</tr> </tr>
</tbody> </tbody>
<tfoot> <tfoot>

View File

@ -3,7 +3,7 @@
**/ **/
(function (vc) { (function (vc) {
var DEFAULT_PAGE = 1; var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10; var DEFAULT_ROWS = 15;
vc.extends({ vc.extends({
data: { data: {
commonReportTableInfo: { commonReportTableInfo: {
@ -22,12 +22,17 @@
$that._listReportCustomTableComponent(); $that._listReportCustomTableComponent();
}) })
vc.on('commonReportTable', 'paginationPlus', 'page_event', function (_currentPage) { vc.on('commonReportTable', 'paginationPlus', 'page_event', function (_currentPage) {
vc.component._listOaWorkflowPools(_currentPage, DEFAULT_ROWS); vc.component._listReportCustomTableDatas(_currentPage, DEFAULT_ROWS,$that.commonReportTableInfo.components[0]);
}); });
}, },
methods: { methods: {
_queryReportTableMethod: function (data) { _queryReportTableMethod: function (item) {
let _condition = {};
item.conditions.forEach(_item => {
_condition[_item.param] = _item.value;
})
$that._listReportCustomTableDatas(1, 15, item, _condition);
}, },
_listReportCustomTableComponent: function () { _listReportCustomTableComponent: function () {
var param = { var param = {
@ -54,11 +59,17 @@
); );
}, },
_listReportCustomTableConditions: function (_component) { _listReportCustomTableConditions: function (_component) {
let _community = vc.getCurrentCommunity();
let _communityId = '';
if (_community) {
_communityId = _community.communityId
}
let param = { let param = {
params: { params: {
page: 1, page: 1,
row: 50, row: 50,
componentId: _component.componentId componentId: _component.componentId,
communityId: _communityId
} }
}; };
//发送get请求 //发送get请求
@ -74,14 +85,22 @@
); );
}, },
_listReportCustomTableDatas: function (_page, _row, _component) { _listReportCustomTableDatas: function (_page, _row, _component, _conditions) {
let param = { if (_conditions) {
params: { _conditions.page = _page;
_conditions.row = _row;
_conditions.componentId = _component.componentId;
} else {
_conditions = {
page: _page, page: _page,
row: _row, row: _row,
componentId: _component.componentId componentId: _component.componentId
} }
}
let param = {
params: _conditions
}; };
//发送get请求 //发送get请求
vc.http.apiGet('/reportCustomComponent.listReportCustomComponentData', vc.http.apiGet('/reportCustomComponent.listReportCustomComponentData',
param, param,
@ -94,7 +113,7 @@
let _data = _componentDataManageInfo.data; let _data = _componentDataManageInfo.data;
_component.th = _data.th; _component.th = _data.th;
_component.data = _data.td; _component.data = _data.td;
vc.emit('commonReportTable', 'pagination', 'init', { vc.emit('commonReportTable', 'paginationPlus', 'init', {
total: _componentDataManageInfo.records, total: _componentDataManageInfo.records,
currentPage: _page currentPage: _page
}); });