sjs_setting.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const sjsSettingObj = (function () {
  2. const FxTreeStyle = {
  3. jz: 'jianzhu',
  4. }
  5. const setJzFxTreeStyle = function (setting) {
  6. setting.selectedBackColor = '#fffacd';
  7. setting.tree = {
  8. getFont: function (sheet, data, row, col, defaultFont) {
  9. if (sheet.zh_tree && data.level === 1) {
  10. return 'bold ' + defaultFont;
  11. } else {
  12. return defaultFont;
  13. }
  14. },
  15. getColor: function (sheet, data, row, col, defaultColor) {
  16. if (sheet.zh_tree) {
  17. if (data.level === 2) {
  18. return '#C4CAFB';
  19. } else if ((!data.b_code || data.b_code === '') && data.level > 2) {
  20. return '#DFE8F9';
  21. } else {
  22. return defaultColor;
  23. }
  24. } else {
  25. return defaultColor;
  26. }
  27. }
  28. }
  29. };
  30. const setFxTreeStyle = function (setting, tag) {
  31. switch (tag) {
  32. case FxTreeStyle.jz:
  33. setJzFxTreeStyle(setting);
  34. break;
  35. }
  36. };
  37. const setGridSelectStyle = function (setting) {
  38. setting.selectedBackColor = '#fffacd';
  39. };
  40. return {setFxTreeStyle, FxTreeStyle, setGridSelectStyle};
  41. })();