store.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. var store2 = {
  2. debug: true,
  3. state: {
  4. xzqdm: "", //当前选择的行政区代码
  5. isInitViewer: false,
  6. // 控制界面显隐,0默认隐藏,1显示
  7. ToolBarShow: false,
  8. toolBarActive: 0,
  9. toolBar: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  10. addLayer: [1, 0, 0],
  11. sceneAtttribute: [1, 0, 0, 0, 0],
  12. terrain: [1, 0, 0, 0, 0],
  13. clip: [1, 0, 0, 0],
  14. analysis: [1, 0, 0, 0, 0, 0],
  15. cityPlan: [1, 0, 0, 0, 0],
  16. onlineEdit: [1, 0, 0],
  17. specialEffects: [0, 0, 0], //特效
  18. hotSpots: [0, 0], //热点
  19. compass: true,
  20. // 图层管理
  21. S3MLayerManage: null,
  22. imgLayerManage: null,
  23. terrainLayerManage: null,
  24. LayerAttributeToolbar: false, //图层属性显隐
  25. LayerAttribute: [1, 0, 0, 0],
  26. selectedLayerName: null, //当前选中编辑图层name
  27. // 编辑
  28. isEdit: false,
  29. isEditZ: false,
  30. vectorlayerlist: [],
  31. modellayerlist: [],
  32. layerparamslist:[],//影像
  33. chooseLayer: [],
  34. flattenNames: [],//存储压平的名称数组
  35. S3MList: [],
  36. splitType: 'NONE',//分屏类型
  37. rollerType: '',//影像卷帘
  38. checkedData: null,
  39. sceneLayerlist: [],
  40. flattenNames: [],//存储压平的名称数组
  41. cockpit_date: null,
  42. viewer_flag: true,
  43. cockpit_hysy: {
  44. text: {
  45. xzqhdm_number: 0,
  46. zhmj: 0,
  47. },
  48. echart: {
  49. x: [],
  50. bar: [],
  51. }
  52. },
  53. cockpit_tdsc: {
  54. flag: true,
  55. text: {
  56. xzqhdm_number: 0,
  57. zhmj: 0,
  58. },
  59. echart: {
  60. x: [],
  61. bar: [],
  62. }
  63. },
  64. regional_information: {
  65. id: 4602,
  66. name: '',
  67. },
  68. cockpit_gkzb: {
  69. // 生态保护红线面积
  70. mj: 0,
  71. // 路域生态保护红线
  72. ly_mj: 0,
  73. // 近海岸面积
  74. hy_mj: 0,
  75. // 永久基本农田保护面积
  76. yjjbntmj: 0,
  77. // 城市开发边界
  78. kfbjmj: 0,
  79. // 覆盖城镇开发边界
  80. bfb: 0,
  81. ghdkmj: 0,//已入库管控范围
  82. }
  83. },
  84. setisInitViewer(newValue) {
  85. this.state.isInitViewer = newValue;
  86. },
  87. setXzqdm(newValue) {
  88. this.state.xzqdm = newValue;
  89. },
  90. setVectorLayerList(newValue) {
  91. this.state.vectorlayerlist = newValue;
  92. },
  93. setSceneLayersList(newValue) {
  94. this.state.sceneLayerlist = newValue;
  95. },
  96. setLayerList(newValue) {//分层分户
  97. this.state.chooseLayer = newValue;
  98. },
  99. setFlattenNames(newValue) {//压平
  100. this.state.flattenNames = newValue;
  101. },
  102. setS3MList(newValue) {//压平
  103. this.state.S3MList = newValue;
  104. },
  105. setRegionalInformation(newValue) {//行政区划信息存储
  106. this.state.regional_information = newValue;
  107. },
  108. setModelLayerList(newValue) {
  109. this.state.modellayerlist = newValue;
  110. },
  111. setlayerparamsList(newValue) {
  112. this.state.layerparamslist = newValue;
  113. },
  114. setToolBarShow(newValue) {
  115. this.state.ToolBarShow = newValue;
  116. },
  117. setSpecialEffects(id, val) {
  118. this.state.specialEffects[id] = val;
  119. this.state.specialEffects = [...this.state.specialEffects];
  120. },
  121. setHotSpots(id, val) {
  122. this.state.hotSpots[id] = val;
  123. this.state.hotSpots = [...this.state.hotSpots];
  124. },
  125. setCompass(newValue) {
  126. this.state.compass = newValue;
  127. },
  128. // 设置导航工具显隐
  129. setToolBarAction(newValue) {
  130. if (typeof (newValue) != "undefined") {
  131. if (this.state.toolBarActive != newValue) {
  132. this.hideToolBar();
  133. }
  134. this.state.toolBar[newValue] = !this.state.toolBar[newValue];
  135. } else {
  136. this.hideToolBar();
  137. }
  138. this.state.toolBarActive = newValue;
  139. this.state.toolBar = [...this.state.toolBar];
  140. },
  141. hideToolBar(newValue) {
  142. this.state.toolBar = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  143. },
  144. // 设置各功能组件子组件显隐
  145. setAddLayerAction(newValue) {
  146. this.state.addLayer = newValue;
  147. },
  148. setTerrainAction(newValue) {
  149. this.state.terrain = newValue;
  150. },
  151. setSceneAtttribute(newValue) {
  152. this.state.sceneAtttribute = newValue;
  153. },
  154. setsplitType(newValue) {
  155. this.state.splitType = newValue;
  156. },
  157. setrollerType(newValue) {
  158. this.state.rollerType = newValue;
  159. },
  160. setCheckedData(newValue) {
  161. this.state.checkedData = newValue;
  162. },
  163. setClipAction(newValue) {
  164. this.state.clip = newValue;
  165. },
  166. setAnalysisAction(newValue) {
  167. this.state.analysis = newValue;
  168. },
  169. setCityPlanAction(newValue) {
  170. this.state.cityPlan = newValue;
  171. },
  172. setOnlineEditrAction(newValue) {
  173. this.state.onlineEdit = newValue;
  174. },
  175. // 设置图层管理
  176. setS3MLayerManage(newValue) {
  177. this.state.S3MLayerManage = newValue;
  178. },
  179. setImgLayerManage(newValue) {
  180. this.state.imgLayerManage = newValue;
  181. },
  182. setTerrainLayerManage(newValue) {
  183. this.state.terrainLayerManage = newValue;
  184. },
  185. setLayerAttributeToolbal(newValue) {
  186. this.state.LayerAttributeToolbar = newValue;
  187. },
  188. setLayerAttribute(newValue) {
  189. this.state.LayerAttribute = newValue;
  190. },
  191. setSelectedLayerName(newValue) {
  192. this.state.selectedLayerName = newValue;
  193. },
  194. setIsEdit(newValue) {
  195. this.state.isEdit = newValue;
  196. },
  197. setIsEditZ(newValue) {
  198. this.state.isEditZ = newValue;
  199. },
  200. setCockpitHysyEchart(newValue) {
  201. this.state.cockpit_hysy.echart = newValue;
  202. },
  203. setCockpitHysyText(newValue) {
  204. this.state.cockpit_hysy.text = newValue;
  205. },
  206. setCockpitTdsc(newValue) {
  207. this.state.cockpit_tdsc.flag = newValue;
  208. }, setCockpitDate(newValue) {
  209. this.state.cockpit_date = newValue;
  210. }, setCockpitGkzb(newValue) {
  211. this.state.cockpit_gkzb = newValue;
  212. }, setViewerFlagb(newValue) {
  213. this.state.viewer_flag = newValue;
  214. },
  215. }
  216. // import store from "@/store/store.js"
  217. // sharedState: store.state
  218. // console.log(this.sharedState.message)
  219. // store.setMessageAction("dajiahao")
  220. export default store2