store.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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_tdsc: {
  44. scjd: {
  45. percentage: 0,
  46. sj_mj: 0, //完成收储
  47. jh_xzqdm_number: 0,//计划收储项目个数
  48. jh_mj: 0,//计划收储面积
  49. sj_xzqdm_number: 1//完成收储项目个数
  50. },
  51. echart: {
  52. x: [],
  53. bar: [],
  54. }
  55. },
  56. cockpit_tdgy: {//土地供应
  57. gy_jg: {
  58. xdata: [],
  59. result: [],
  60. },
  61. },
  62. cockpit_hysy: {//海域使用
  63. info: {
  64. jh_mj:0,//计划出让海域
  65. sj_number:0,//实际出让海域面积
  66. jh_number:0,//计划出让项目
  67. sj_mj:0,//完成出让海域面积
  68. },
  69. },
  70. regional_information: {
  71. id: 4602,
  72. name: '',
  73. },
  74. cockpit_gkzb: {
  75. // 生态保护红线面积
  76. mj: 0,
  77. // 路域生态保护红线
  78. ly_mj: 0,
  79. // 近海岸面积
  80. hy_mj: 0,
  81. // 永久基本农田保护面积
  82. yjjbntmj: 0,
  83. // 城市开发边界
  84. kfbjmj: 0,
  85. // 覆盖城镇开发边界
  86. bfb: 0,
  87. ghdkmj: 0,//已入库管控范围
  88. tbmj_ys: 0,
  89. isNightSwitch: false, //夜景状态(中图)
  90. }
  91. },
  92. setisInitViewer(newValue) {
  93. this.state.isInitViewer = newValue;
  94. },
  95. setXzqdm(newValue) {
  96. this.state.xzqdm = newValue;
  97. },
  98. setVectorLayerList(newValue) {
  99. this.state.vectorlayerlist = newValue;
  100. },
  101. setSceneLayersList(newValue) {
  102. this.state.sceneLayerlist = newValue;
  103. },
  104. setLayerList(newValue) {//分层分户
  105. this.state.chooseLayer = newValue;
  106. },
  107. setFlattenNames(newValue) {//压平
  108. this.state.flattenNames = newValue;
  109. },
  110. setS3MList(newValue) {//压平
  111. this.state.S3MList = newValue;
  112. },
  113. setRegionalInformation(newValue) {//行政区划信息存储
  114. this.state.regional_information = newValue;
  115. },
  116. setModelLayerList(newValue) {
  117. this.state.modellayerlist = newValue;
  118. },
  119. setlayerparamsList(newValue) {
  120. this.state.layerparamslist = newValue;
  121. },
  122. setToolBarShow(newValue) {
  123. this.state.ToolBarShow = newValue;
  124. },
  125. setSpecialEffects(id, val) {
  126. this.state.specialEffects[id] = val;
  127. this.state.specialEffects = [...this.state.specialEffects];
  128. },
  129. setHotSpots(id, val) {
  130. this.state.hotSpots[id] = val;
  131. this.state.hotSpots = [...this.state.hotSpots];
  132. },
  133. setCompass(newValue) {
  134. this.state.compass = newValue;
  135. },
  136. // 设置导航工具显隐
  137. setToolBarAction(newValue) {
  138. if (typeof (newValue) != "undefined") {
  139. if (this.state.toolBarActive != newValue) {
  140. this.hideToolBar();
  141. }
  142. this.state.toolBar[newValue] = !this.state.toolBar[newValue];
  143. } else {
  144. this.hideToolBar();
  145. }
  146. this.state.toolBarActive = newValue;
  147. this.state.toolBar = [...this.state.toolBar];
  148. },
  149. hideToolBar(newValue) {
  150. this.state.toolBar = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  151. },
  152. // 设置各功能组件子组件显隐
  153. setAddLayerAction(newValue) {
  154. this.state.addLayer = newValue;
  155. },
  156. setTerrainAction(newValue) {
  157. this.state.terrain = newValue;
  158. },
  159. setSceneAtttribute(newValue) {
  160. this.state.sceneAtttribute = newValue;
  161. },
  162. setsplitType(newValue) {
  163. this.state.splitType = newValue;
  164. },
  165. setrollerType(newValue) {
  166. this.state.rollerType = newValue;
  167. },
  168. setCheckedData(newValue) {
  169. this.state.checkedData = newValue;
  170. },
  171. setClipAction(newValue) {
  172. this.state.clip = newValue;
  173. },
  174. setAnalysisAction(newValue) {
  175. this.state.analysis = newValue;
  176. },
  177. setCityPlanAction(newValue) {
  178. this.state.cityPlan = newValue;
  179. },
  180. setOnlineEditrAction(newValue) {
  181. this.state.onlineEdit = newValue;
  182. },
  183. // 设置图层管理
  184. setS3MLayerManage(newValue) {
  185. this.state.S3MLayerManage = newValue;
  186. },
  187. setImgLayerManage(newValue) {
  188. this.state.imgLayerManage = newValue;
  189. },
  190. setTerrainLayerManage(newValue) {
  191. this.state.terrainLayerManage = newValue;
  192. },
  193. setLayerAttributeToolbal(newValue) {
  194. this.state.LayerAttributeToolbar = newValue;
  195. },
  196. setLayerAttribute(newValue) {
  197. this.state.LayerAttribute = newValue;
  198. },
  199. setSelectedLayerName(newValue) {
  200. this.state.selectedLayerName = newValue;
  201. },
  202. setIsEdit(newValue) {
  203. this.state.isEdit = newValue;
  204. },
  205. setIsEditZ(newValue) {
  206. this.state.isEditZ = newValue;
  207. },
  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. setIsNightSwitch(newValue) {
  217. this.state.isNightSwitch = newValue;
  218. },
  219. }
  220. // import store from "@/store/store.js"
  221. // sharedState: store.state
  222. // console.log(this.sharedState.message)
  223. // store.setMessageAction("dajiahao")
  224. export default store2