store.js 7.0 KB

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