P10.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta name="renderer" content="webkit">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  7. <meta http-equiv="pragma" content="no-cache">
  8. <meta http-equiv="Cache" content="no-cache">
  9. <meta http-equiv="cache-control" content="no-cache, must-revalidate">
  10. <meta http-equiv="expires" content="0">
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  12. <title>区域管理</title>
  13. <link rel="stylesheet" href="../css/index.css">
  14. <link rel="stylesheet" href="../css/style.css">
  15. <link rel="stylesheet" href="../css/comm.css">
  16. <link rel="stylesheet" href="../css/iconfont.css">
  17. <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
  18. <script src="../js/vue.min.js"></script>
  19. <script src="https://webapi.amap.com/maps?v=1.4.15&key=3705e0f15b2b36d6902e9ebdf24a93d8&plugin=AMap.CircleEditor&plugin=AMap.MouseTool&plugin=AMap.PolyEditor"></script>
  20. <script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script>
  21. <script src="../js/index.js"></script>
  22. <script src="../js/jquery.min.js"></script>
  23. <script type="text/javascript">
  24. document.write('<script src="../assets/init.js?id='+(new Date().getTime())+'" type="text/javascript" charset="utf-8"><\/script>');
  25. </script>
  26. <script>
  27. checkLogin();
  28. </script>
  29. </head>
  30. <style>
  31. .yz_aside{
  32. width: 180px;
  33. }
  34. .yz_aside ul{
  35. padding: 5px;
  36. }
  37. .yz_aside ul li{
  38. cursor: pointer;
  39. list-style: none;
  40. padding:0 0 0 10px;
  41. color: rgba(255,255,255,1);
  42. }
  43. .yz_aside .iconfont{
  44. color: rgb(85, 170, 255);
  45. }
  46. .yz_aside .el-button{
  47. padding: 0;
  48. border-radius: 0;
  49. }
  50. .yz_aside .el-button [class*=el-icon-]+span{
  51. font-size: 12px;
  52. margin: 0;
  53. }
  54. .yz_aside .el-button+.el-button{
  55. margin: 0;
  56. }
  57. .yz_dialog{
  58. position: absolute;
  59. left: 10px;
  60. top: 30%;
  61. width: 300px;
  62. columns: #000;
  63. background-color: #fff;
  64. }
  65. .el-dialog__header{
  66. background-color: #0081ff;
  67. }
  68. .el-dialog__title{
  69. color: #fff;
  70. }
  71. .el-dialog__body .el-input__inner,.yz_dialog .el-input__inner{
  72. border: none;
  73. background-color: #06162d;
  74. }
  75. .el-tree{
  76. font-size: 14px;
  77. color: #fff;
  78. background-color: #06162d;
  79. }
  80. .el-tree-node:focus>.el-tree-node__content,.el-tree-node__content:hover{
  81. background-color: rgba(255, 255, 255, 0.2);
  82. }
  83. .yz_aside .el-tree .el-tree-node__expand-icon.expanded {
  84. -webkit-transform: rotate(0deg);
  85. transform: rotate(0deg);
  86. }
  87. .yz_aside .el-tree .el-icon-caret-right:before {
  88. content: '\e783';
  89. font-size: 18px;
  90. color: rgb(85, 170, 255);
  91. }
  92. .yz_aside .el-tree .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
  93. content: '\e781';
  94. font-size: 18px;
  95. color: rgb(85, 170, 255);
  96. }
  97. .yz_aside .el-tree .el-tree-node__expand-icon.is-leaf::before {
  98. display: none;
  99. }
  100. .el-radio{
  101. color: #e8e8e8;
  102. }
  103. .brigCen{
  104. position: absolute;
  105. left: 10px;
  106. top: 10px;
  107. display: flex;
  108. }
  109. .brigCen>div{
  110. margin-right: 10px;
  111. background-color: #082041;
  112. }
  113. .brigCen .el-input__inner,.brigCen input[type=text] {
  114. color: #ececec;
  115. border-color: transparent;
  116. background-color: transparent;
  117. }
  118. </style>
  119. <body>
  120. <div id="app" style="height: 100vh;">
  121. <div class="yz_aside">
  122. <div style="height: calc(100% - 36px);overflow: auto;">
  123. <el-tree :data="areaLi" :props="defaultProps"
  124. :default-expanded-keys="[0]"
  125. node-key="id" @node-click="nodeClick">
  126. <span class="custom-tree-node" slot-scope="{node,data}">
  127. <span>
  128. <i class="iconfont" :class="data.icon"></i>{{ data.group_name }}
  129. </span>
  130. </span>
  131. </el-tree>
  132. </div>
  133. <div class="flex padding-xs justify-between text-center" style="height: 36px;">
  134. <el-button type="primary" style="width: 25%;" icon="el-icon-plus" @click="reSet">分类</el-button>
  135. <el-button type="primary" style="width: 25%;" icon="el-icon-plus" @click="reTrSet">区域</el-button>
  136. <el-button type="primary" style="width: 21%;" :disabled="nowArea.type == -1" @click="editArea" icon="el-icon-edit"></el-button>
  137. <el-button type="primary" style="width: 21%;" :disabled="nowArea.type != 1" @click="delArea" icon="el-icon-delete"></el-button>
  138. </div>
  139. </div>
  140. <div class="yz_main" style="width: calc(100% - 180px);position: relative;">
  141. <div id="areaMap" style="width: 100%;height: 100%;"></div>
  142. <div class="brigCen">
  143. <div class="br_all flex algin-center">
  144. <div class="padding-tb-xs text-center"
  145. style="width: 80px;background-color: #4c4c4c;color: #fff;">中心经纬度</div>
  146. <div style="width:240px;">
  147. <el-input placeholder="经纬度" v-model="centerVal"></el-input>
  148. </div>
  149. </div>
  150. <el-button type="primary" size="mini" icon="el-icon-search" @click="setCenter">获取</el-button>
  151. </div>
  152. </div>
  153. <el-dialog title="区域分类管理" :visible.sync="logVis" width="300px">
  154. <div>
  155. <div class="br_all flex algin-center">
  156. <div class="bg-gray padding-tb-xs text-center" style="width: 94px;">所属分类</div>
  157. <el-tree style="width: calc(100% - 94px);" :data="treeArea" :props="defaultProps" node-key="id" @node-click="treeAreaClick"></el-tree>
  158. </div>
  159. <div class="br_all flex algin-center margin-top-sm">
  160. <div class="bg-gray padding-tb-xs text-center" style="width: 94px;">分类名称</div>
  161. <div style="width: calc(100% - 94px);background-color: #06162d;"><el-input v-model="treeAreaForm.group_name" placeholder="请输入分类名称"></el-input></div>
  162. </div>
  163. </div>
  164. <div slot="footer" class="dialog-footer">
  165. <el-button size="small" @click="hideM">取 消</el-button>
  166. <el-button size="small" type="primary" @click="saveTreeArea">保 存</el-button>
  167. </div>
  168. </el-dialog>
  169. <div class="yz_dialog" v-if="treeVis">
  170. <div class="padding-tb-sm padding-lr-lg flex justify-between algin-center bg-blue" style="font-size: 15px;">
  171. <span>区域管理</span>
  172. <span class="el-icon-close yz_cursor" @click="hideM"></span>
  173. </div>
  174. <div class="padding-tb-sm padding-lr-lg">
  175. <div class="br_all flex algin-center">
  176. <div class="bg-gray padding-tb-xs text-center" style="width: 94px;">所属分类</div>
  177. <el-tree style="width: calc(100% - 94px);" :data="treeLi" :props="defaultProps" node-key="id" @node-click="treeClick"></el-tree>
  178. </div>
  179. <div class="br_all flex algin-center margin-top-sm">
  180. <div class="bg-gray padding-tb-xs text-center" style="width: 94px;">区域名称</div>
  181. <div style="width: calc(100% - 94px);background-color: #06162d;"><el-input v-model="treeForm.group_name" placeholder="请输入区域名称"></el-input></div>
  182. </div>
  183. <div class="br_all flex algin-center margin-top-sm">
  184. <div class="bg-gray padding-tb-xs text-center" style="width: 94px;">区域类型</div>
  185. <div style="width: calc(100% - 94px);background-color: #06162d;padding:6px 6px 0;">
  186. <el-radio-group v-model="treeForm.fence_type" @change="changFence">
  187. <el-radio :label="0">圆形</el-radio>
  188. <el-radio :label="1">多边形</el-radio>
  189. </el-radio-group>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="padding-tb-sm padding-lr-lg text-right">
  194. <el-button size="small" @click="hideM">取 消</el-button>
  195. <el-button size="small" type="primary" @click="saveTree">保 存</el-button>
  196. </div>
  197. </div>
  198. <!-- <el-dialog title="区域管理" :visible.sync="treeVis" width="300px" :modal="false">
  199. <div>
  200. <div class="br_all flex algin-center">
  201. <div class="bg-gray padding-tb-xs text-center" style="width: 94px;">所属分类</div>
  202. <el-tree style="width: calc(100% - 94px);" :data="treeLi" :props="defaultProps" node-key="id" @node-click="treeClick"></el-tree>
  203. </div>
  204. <div class="br_all flex algin-center margin-top-sm">
  205. <div class="bg-gray padding-tb-xs text-center" style="width: 94px;">分类名称</div>
  206. <div style="width: calc(100% - 94px);"><el-input v-model="treeForm.group_name" placeholder="请输入分类名称"></el-input></div>
  207. </div>
  208. </div>
  209. <div slot="footer" class="dialog-footer">
  210. <el-button size="small" @click="hideM">取 消</el-button>
  211. <el-button size="small" type="primary" @click="saveTree">保 存</el-button>
  212. </div>
  213. </el-dialog> -->
  214. </div>
  215. <script type="text/javascript">
  216. document.write('<script src="../assets/areaManage.js?id='+(new Date().getTime())+'" type="text/javascript" charset="utf-8"><\/script>');
  217. </script>
  218. </body>
  219. </html>