setting.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. const { post,get } = require('./request')
  2. const { readConfigFile } = require('../utils/config');
  3. module.exports = {
  4. getDeviceConfigs(data){
  5. return post({
  6. url: '/get_device_configs',
  7. data: data,
  8. headers:{
  9. 'Content-Type':"application/json",
  10. }
  11. })
  12. },
  13. getDeviceTabs(data){
  14. return get({
  15. url: '/get_device_tabs',
  16. data: data,
  17. })
  18. },
  19. getDeviceConfigDetail(data){
  20. return post({
  21. url: '/device_config_detail',
  22. data: data,
  23. headers:{
  24. 'Content-Type':"application/json",
  25. }
  26. })
  27. },
  28. //根据条件查询可执行程序-单条
  29. getDeviceConfigDetailQuery(data){
  30. return post({
  31. url: '/device_config_detail_query',
  32. data: data,
  33. headers:{
  34. 'Content-Type':"application/json",
  35. }
  36. })
  37. },
  38. //删除
  39. removeConfig(data){
  40. return post({
  41. url: '/remove_config',
  42. data: data,
  43. headers:{
  44. 'Content-Type':"application/json",
  45. }
  46. })
  47. },
  48. //保存
  49. saveDeviceConfig(data){
  50. return post({
  51. url: '/save_device_config',
  52. data: data,
  53. headers:{
  54. 'Content-Type':"application/json",
  55. }
  56. })
  57. },
  58. resetDeviceConfig(data){
  59. return post({
  60. url: '/reset_config',
  61. data: data,
  62. headers:{
  63. 'Content-Type':"application/json",
  64. }
  65. })
  66. },
  67. //读取系统配置
  68. getSysConfig(data){
  69. return get({
  70. url: '/get_sys_config',
  71. data: data,
  72. headers:{
  73. 'Content-Type':"application/json",
  74. }
  75. })
  76. },
  77. //更新系统配置
  78. updateSysConfigs(data){
  79. return post({
  80. url: '/update_sys_configs',
  81. data: data,
  82. headers:{
  83. 'Content-Type':"application/json",
  84. }
  85. })
  86. },
  87. //更新左右脚配置
  88. updateLeftRightConfig(data){
  89. return post({
  90. url: '/update_left_right_config',
  91. data: data
  92. })
  93. },
  94. //更新顶部tab名称
  95. updateTabName(data){
  96. return post({
  97. url: '/update_tab_name',
  98. data: data
  99. })
  100. },
  101. //同步配置接口
  102. syncSysConfigs(data){
  103. console.log("syncSysConfigs===============", data);
  104. return post({
  105. url: '/sync_sys_configs',
  106. data: {
  107. ...data,
  108. env:readConfigFile().env
  109. }
  110. })
  111. },
  112. //同步左右脚配置
  113. syncActions(data){
  114. console.log("syncActions===============", data);
  115. return post({
  116. url: '/sync_actions',
  117. data: {
  118. ...data,
  119. env:readConfigFile().env
  120. }
  121. })
  122. },
  123. }