index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <div class="base-container">
  3. <fnHeader :hideSwitch="true" :hideShadow="true" showDate></fnHeader>
  4. <div class="content">
  5. <div class="content-left">
  6. <div class="btn" @click="goBack">
  7. <img src="@/assets/images/common/back-icon.png" alt="" />
  8. 返回
  9. </div>
  10. <chart-box class="left-cont" name="品种列表" color="yellow">
  11. <div class="box">
  12. <div class="add-cont">
  13. <div>暂无数据</div>
  14. <div class="tips-text">请先添加品种,再框选右侧区域,进行品种确权</div>
  15. <div class="button" @click="handleAdd">
  16. <el-icon class="icon"><Plus /></el-icon>
  17. 添加品种
  18. </div>
  19. </div>
  20. </div>
  21. </chart-box>
  22. </div>
  23. <div class="content-right">
  24. <div class="map-header">
  25. <div class="title">
  26. <img src="@/assets/images/common/area-icon.png" alt="" />
  27. 品种确权
  28. </div>
  29. </div>
  30. <div ref="mapRef" class="map">
  31. <div class="checkbox-list">
  32. <span class="text">全部设置为</span>
  33. <el-checkbox-group class="checkbox" v-model="checkedCities" @change="handleCheckedCitiesChange">
  34. <el-checkbox v-for="city in cities" :key="city" :label="city.label" :value="city.value">
  35. {{ city.label }}
  36. </el-checkbox>
  37. </el-checkbox-group>
  38. <div class="add">
  39. <el-icon class="icon"><Plus /></el-icon>
  40. 添加品种
  41. </div>
  42. </div>
  43. <div class="footer-btn">
  44. <div class="cancel">取消</div>
  45. <div>保存</div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. <!-- 添加品种弹窗 -->
  52. <el-dialog
  53. v-model="dialogVisible"
  54. body-class="custom-dialog"
  55. title="添加品种"
  56. width="500"
  57. align-center
  58. :before-close="handleClose"
  59. >
  60. <el-input class="input" size="large" v-model="input" placeholder="请输入品种名称" />
  61. <template #footer>
  62. <div class="dialog-footer">
  63. <div class="btn" @click="dialogVisible = false">取消</div>
  64. <div @click="dialogVisible = false">确定</div>
  65. </div>
  66. </template>
  67. </el-dialog>
  68. </template>
  69. <script setup>
  70. import { onMounted, ref } from "vue";
  71. import { ElMessage } from "element-plus";
  72. import fnHeader from "@/components/fnHeader.vue";
  73. import VarietyMap from "./varietyMap";
  74. import chartBox from "@/components/chartBox.vue";
  75. import { useRouter, useRoute } from "vue-router";
  76. import { useStore } from "vuex";
  77. const store = useStore();
  78. const varietyMap = new VarietyMap();
  79. const router = useRouter();
  80. const route = useRoute();
  81. const mapRef = ref();
  82. onMounted(() => {
  83. getList();
  84. varietyMap.initMap("POINT(113.61448114737868 23.585550924763083)", mapRef.value);
  85. });
  86. const getList = () => {
  87. console.log("000");
  88. };
  89. const checkedCities = ref(["0"]);
  90. const cities = [
  91. {
  92. label:"品种1",
  93. value:"0"
  94. },
  95. {
  96. label:"品种2",
  97. value:"1"
  98. }
  99. ];
  100. const handleCheckedCitiesChange = (value) => {
  101. };
  102. const goBack = () => {
  103. router.go(-1);
  104. };
  105. //添加品种弹窗
  106. const dialogVisible = ref(false);
  107. const input = ref("");
  108. const handleAdd = () => {
  109. dialogVisible.value = true;
  110. };
  111. const handleClose = () => {
  112. dialogVisible.value = false;
  113. input.value = "";
  114. };
  115. </script>
  116. <style lang="scss" scoped>
  117. .base-container {
  118. width: 100%;
  119. height: 100vh;
  120. color: #fff;
  121. position: relative;
  122. box-sizing: border-box;
  123. z-index: 1;
  124. background: #000;
  125. .content {
  126. width: 100%;
  127. height: calc(100% - 74px);
  128. display: flex;
  129. justify-content: space-between;
  130. box-sizing: border-box;
  131. padding: 20px;
  132. .content-left {
  133. width: 473px;
  134. height: 100%;
  135. box-sizing: border-box;
  136. .btn {
  137. display: flex;
  138. align-items: center;
  139. justify-content: center;
  140. border: 1px solid rgba(255, 255, 255, 0.78);
  141. border-radius: 4px;
  142. padding: 9px;
  143. margin-bottom: 13px;
  144. width: 104px;
  145. cursor: pointer;
  146. img {
  147. width: 14px;
  148. margin-right: 5px;
  149. }
  150. }
  151. .left-cont {
  152. width: 100%;
  153. height: calc(100% - 48px - 4px);
  154. .box {
  155. width: 100%;
  156. height: calc(100% - 58px);
  157. padding: 16px 12px;
  158. box-sizing: border-box;
  159. overflow-y: auto;
  160. .add-cont {
  161. display: flex;
  162. flex-direction: column;
  163. align-items: center;
  164. font-size: 16px;
  165. .tips-text {
  166. width: 220px;
  167. text-align: center;
  168. color: #9f9f9f;
  169. font-size: 15px;
  170. margin: 8px 0 24px 0;
  171. }
  172. .button {
  173. color: #ffd489;
  174. display: flex;
  175. align-items: center;
  176. border-radius: 8px;
  177. border: 1px solid #ffd489;
  178. padding: 8px 16px;
  179. background: rgba(255, 212, 137, 0.1);
  180. cursor: pointer;
  181. .icon {
  182. margin-right: 4px;
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. .content-right {
  190. width: calc(100% - 473px - 18px);
  191. margin-left: 18px;
  192. height: 100%;
  193. background: #191919;
  194. border: 0.6px solid #444444;
  195. padding: 20px;
  196. box-sizing: border-box;
  197. border-radius: 8px;
  198. .map-header {
  199. display: flex;
  200. justify-content: space-between;
  201. .title {
  202. font-size: 22px;
  203. display: flex;
  204. align-items: flex-end;
  205. font-family: "PangMenZhengDao";
  206. margin-bottom: 16px;
  207. img {
  208. margin-right: 8px;
  209. }
  210. }
  211. }
  212. .map {
  213. width: 100%;
  214. clip-path: inset(0px round 4px);
  215. height: calc(100% - 31px - 16px);
  216. position: relative;
  217. .checkbox-list{
  218. position: absolute;
  219. z-index: 2;
  220. right: 42px;
  221. bottom: 150px;
  222. background: rgba(0, 0, 0, 0.8);
  223. border-radius: 8px;
  224. display: flex;
  225. flex-direction: column;
  226. padding: 20px;
  227. .text{
  228. color: #9f9f9f;
  229. margin-bottom: 12px;
  230. font-size: 16px;
  231. }
  232. .checkbox{
  233. display: flex;
  234. flex-direction: column;
  235. ::v-deep{
  236. .el-checkbox__label{
  237. color: #fff;
  238. font-size: 16px;
  239. }
  240. .el-checkbox__inner{
  241. width: 18px;
  242. height: 18px;
  243. }
  244. .el-checkbox__input.is-checked .el-checkbox__inner{
  245. background: #FFD489;
  246. border-color: #FFD489;
  247. &::after{
  248. border-color: #000;
  249. height: 10px;
  250. left: 4px;
  251. width: 5px;
  252. top: 0;
  253. border: 2px solid transparent;
  254. }
  255. }
  256. }
  257. }
  258. .add{
  259. margin-top: 12px;
  260. border: 1px solid #fff;
  261. border-radius: 4px;
  262. background: rgba(255, 255, 255, 0.2);
  263. display: flex;
  264. align-items: center;
  265. padding: 8px;
  266. .icon{
  267. margin-right: 4px;
  268. }
  269. }
  270. }
  271. .footer-btn {
  272. position: absolute;
  273. right: 42px;
  274. bottom: 28px;
  275. z-index: 2;
  276. display: flex;
  277. width: 520px;
  278. div {
  279. text-align: center;
  280. width: calc(100% - 20px - 200px);
  281. font-size: 20px;
  282. color: #1d1d1d;
  283. background: #f7be5a;
  284. border-radius: 8px;
  285. border: 2px solid #fff;
  286. padding: 13px;
  287. cursor: pointer;
  288. }
  289. .cancel {
  290. margin-right: 20px;
  291. width: 200px;
  292. background: rgba(0, 0, 0, 0.6);
  293. color: #fff;
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. .custom-dialog {
  301. .el-dialog__body {
  302. margin-top: 10px;
  303. }
  304. .input {
  305. width: 100%;
  306. }
  307. }
  308. .dialog-footer {
  309. display: flex;
  310. width: 100%;
  311. margin-top: 25px;
  312. div {
  313. flex: 1;
  314. padding: 10px;
  315. background: #ffd489;
  316. border-radius: 5px;
  317. color: #1d1d1d;
  318. text-align: center;
  319. }
  320. .btn {
  321. border: 1px solid #9f9f9f;
  322. background: #fff;
  323. margin-right: 14px;
  324. }
  325. }
  326. </style>