| | |
| | | columns: _columns, |
| | | arr_field: _arrField.join(','), |
| | | search: _search ? 'where (' + _search + ')' : '', |
| | | orderColumn: config.setting.orderColumn, |
| | | // orderColumn: config.setting.orderColumn, |
| | | loading: true |
| | | }, () => { |
| | | this.improveSearch() |
| | |
| | | |
| | | async loadmaindata () { |
| | | const { arr_field, pageIndex, pageSize, orderColumn, orderType, search, setting } = this.state |
| | | console.log(setting) |
| | | // 获取列表数据 |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | func: setting.innerFunc || 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | arr_field: arr_field |
| | | } |
| | | |
| | | let LText = `select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderColumn} ${orderType}) as rows from ${setting.dataresource} ${search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows` |
| | | let DateCount = `select count(1) as total from ${setting.dataresource} ${search}` |
| | | let orderBy = orderColumn ? (orderColumn + ' ' + orderType) : setting.order |
| | | |
| | | let LText = `select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${setting.dataresource} ${search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows` |
| | | let DateCount = `select count(1) as total from ${setting.dataresource} ${search}` |
| | | console.log(LText) |
| | | param.LText = Utils.formatOptions(LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | |
| | | UNSAFE_componentWillMount () { |
| | | // 组件加载时,获取菜单数据 |
| | | this.loadconfig() |
| | | |
| | | console.log(Utils.getfunc()) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |