priceKeyword.js 1.1 KB

123456789101112131415161718192021222324252627
  1. // 关键字表
  2. const KEYWORD_BOOK = (() => {
  3. const setting = {
  4. header: [
  5. { headerName: '关键字', headerWidth: 200, dataCode: 'keyword', dataType: 'String', hAlign: 'left', vAlign: 'center' },
  6. { headerName: '单位', headerWidth: 70, dataCode: 'unit', dataType: 'String', hAlign: 'center', vAlign: 'center' },
  7. { headerName: '关键字效果', headerWidth: 100, dataCode: 'coe', dataType: 'String', hAlign: 'center', vAlign: 'center' },
  8. { headerName: '组别', headerWidth: 50, dataCode: 'group', dataType: 'String', hAlign: 'center', vAlign: 'center' },
  9. { headerName: '选项号', headerWidth: 70, dataCode: 'optionCode', dataType: 'String', hAlign: 'center', vAlign: 'center' },
  10. ],
  11. };
  12. // 初始化表格
  13. const workBook = initSheet($('#keyword-spread')[0], setting);
  14. workBook.options.allowUserDragDrop = false;
  15. workBook.options.allowUserDragFill = false;
  16. lockUtil.lockSpreads([workBook], true);
  17. const sheet = workBook.getSheet(0);
  18. // 显示关键字数据
  19. const showKeywordData = (keywordList) => {
  20. showData(sheet, keywordList, setting.header);
  21. }
  22. return {
  23. showKeywordData
  24. }
  25. })();