-
-
18516843105 数据达人Lv4
发表于2021-5-16 11:13
悬赏1
未解决
楼主
报错脚本定位到为如下脚本:
报错信息详见附件
/***
*** 四本预算自动切换
***
***/
var grid = g_rptpage.getGridById("GRID28");//文本组件所在表格代号
var _selectedBgcolor = "#356298";//选中背景色
var _delay = 1000 * 7;//自动刷新间隔时间,7秒
var _widgetTextArrays = [["GRID28.A1", "一般公共预算"], ["GRID28.C1", "政府性基金"], ["GRID28.E1", "国有资本经营"], ["GRID28.G1", "社会保险基金"]]; //文本组件所在表元行列号,热区钻取传参参数值
var _index = 0;//选中文本组件序号
var _timeoutFunc = -1;
var _timeoutFunc0 = window.setTimeout(function(){
grid.selectedBgcolor = _selectedBgcolor;
//_func_start();//默认没有选中状态,7秒后第一次选中和执行热区刷新
_func_autoPlay();//默认选中第一项,且执行一次热区刷新
window.clearTimeout(_timeoutFunc0);
}, 500);
function _func_start(){
_timeoutFunc = window.setTimeout(_func_autoPlay, _delay);
}
function _func_stop(){
if (_timeoutFunc > -1) {
window.clearTimeout(_timeoutFunc);
_timeoutFunc = -1;
}
}
function _func_autoPlay(){
if(!_widgetTextArrays || _widgetTextArrays.length <= 0){
_func_stop();
return;
}
var _arrayLen = _widgetTextArrays.length;
for(var i = 0; i < _arrayLen; i++){
var _widgetTextArray = _widgetTextArrays;
var _gridCellTd = document.getElementById(_widgetTextArray[0]);
if(!_gridCellTd){
continue;
}
var widgetTextDiv = _gridCellTd.firstChild.firstChild;
if(!widgetTextDiv){
continue;
}
if(_index == i){
widgetTextDiv.style.cssText += ";background-color:" + _selectedBgcolor + ";";
_zcalcn([["Widget1", "HHH361"], ["Widget2", "HHH362"]],"@zjxz=" + _widgetTextArray[1]); //修改刷新组件
}else{
widgetTextDiv.style.cssText += ";background-color:transparent;";
}
}
if(_index == _arrayLen - 1){
_index = 0;
}else{
_index++;
}
_func_stop();
_func_start();
}
报错信息详见附件
/***
*** 四本预算自动切换
***
***/
var grid = g_rptpage.getGridById("GRID28");//文本组件所在表格代号
var _selectedBgcolor = "#356298";//选中背景色
var _delay = 1000 * 7;//自动刷新间隔时间,7秒
var _widgetTextArrays = [["GRID28.A1", "一般公共预算"], ["GRID28.C1", "政府性基金"], ["GRID28.E1", "国有资本经营"], ["GRID28.G1", "社会保险基金"]]; //文本组件所在表元行列号,热区钻取传参参数值
var _index = 0;//选中文本组件序号
var _timeoutFunc = -1;
var _timeoutFunc0 = window.setTimeout(function(){
grid.selectedBgcolor = _selectedBgcolor;
//_func_start();//默认没有选中状态,7秒后第一次选中和执行热区刷新
_func_autoPlay();//默认选中第一项,且执行一次热区刷新
window.clearTimeout(_timeoutFunc0);
}, 500);
function _func_start(){
_timeoutFunc = window.setTimeout(_func_autoPlay, _delay);
}
function _func_stop(){
if (_timeoutFunc > -1) {
window.clearTimeout(_timeoutFunc);
_timeoutFunc = -1;
}
}
function _func_autoPlay(){
if(!_widgetTextArrays || _widgetTextArrays.length <= 0){
_func_stop();
return;
}
var _arrayLen = _widgetTextArrays.length;
for(var i = 0; i < _arrayLen; i++){
var _widgetTextArray = _widgetTextArrays;
var _gridCellTd = document.getElementById(_widgetTextArray[0]);
if(!_gridCellTd){
continue;
}
var widgetTextDiv = _gridCellTd.firstChild.firstChild;
if(!widgetTextDiv){
continue;
}
if(_index == i){
widgetTextDiv.style.cssText += ";background-color:" + _selectedBgcolor + ";";
_zcalcn([["Widget1", "HHH361"], ["Widget2", "HHH362"]],"@zjxz=" + _widgetTextArray[1]); //修改刷新组件
}else{
widgetTextDiv.style.cssText += ";background-color:transparent;";
}
}
if(_index == _arrayLen - 1){
_index = 0;
}else{
_index++;
}
_func_stop();
_func_start();
}
