Browse Source

管理后台基本信息

liaoyitao 4 days ago
parent
commit
1aa6822ee1
45 changed files with 8415 additions and 3 deletions
  1. 468 0
      package-lock.json
  2. 2 0
      package.json
  3. 1 1
      public/config.js
  4. 53 0
      src/api/info/areaInfo.js
  5. 53 0
      src/api/info/buildingInfo.js
  6. 53 0
      src/api/info/elevatorInfo.js
  7. 53 0
      src/api/info/equipmentInfo.js
  8. 53 0
      src/api/info/forewarningInfo.js
  9. 53 0
      src/api/info/organizationInfo.js
  10. 53 0
      src/api/info/planInfo.js
  11. 53 0
      src/api/info/policyInfo.js
  12. 53 0
      src/api/info/roomInfo.js
  13. 53 0
      src/api/info/stationInfo.js
  14. 53 0
      src/api/info/trafficInfo.js
  15. 53 0
      src/api/type/areaType.js
  16. 53 0
      src/api/type/buildingType.js
  17. 53 0
      src/api/type/equipmentType.js
  18. 53 0
      src/api/type/houseType.js
  19. 53 0
      src/api/type/organizationType.js
  20. 53 0
      src/api/type/planType.js
  21. 53 0
      src/api/type/roomType.js
  22. 53 0
      src/api/type/trafficType.js
  23. 53 0
      src/api/view/synthesisAnalyze.js
  24. 3 2
      src/components/FileUpload/index.vue
  25. 3 0
      src/main.js
  26. 323 0
      src/views/info/areaInfo/index.vue
  27. 363 0
      src/views/info/buildingInfo/index.vue
  28. 356 0
      src/views/info/elevatorInfo/index.vue
  29. 500 0
      src/views/info/equipmentInfo/index.vue
  30. 372 0
      src/views/info/forewarningInfo/index.vue
  31. 510 0
      src/views/info/organizationInfo/index.vue
  32. 376 0
      src/views/info/planInfo/index.vue
  33. 300 0
      src/views/info/policyInfo/index.vue
  34. 473 0
      src/views/info/roomInfo/index.vue
  35. 330 0
      src/views/info/stationInfo/index.vue
  36. 327 0
      src/views/info/trafficInfo/index.vue
  37. 304 0
      src/views/type/areaType/index.vue
  38. 295 0
      src/views/type/buildingType/index.vue
  39. 304 0
      src/views/type/equipmentType/index.vue
  40. 273 0
      src/views/type/houseType/index.vue
  41. 304 0
      src/views/type/organizationType/index.vue
  42. 304 0
      src/views/type/planType/index.vue
  43. 296 0
      src/views/type/roomType/index.vue
  44. 304 0
      src/views/type/trafficType/index.vue
  45. 264 0
      src/views/view/synthesisAnalyze/index.vue

+ 468 - 0
package-lock.json

@@ -1428,6 +1428,16 @@
1428 1428
       "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
1429 1429
       "dev": true
1430 1430
     },
1431
+    "@popperjs/core": {
1432
+      "version": "2.11.8",
1433
+      "resolved": "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.8.tgz",
1434
+      "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A=="
1435
+    },
1436
+    "@remirror/core-constants": {
1437
+      "version": "3.0.0",
1438
+      "resolved": "https://registry.npmmirror.com/@remirror/core-constants/-/core-constants-3.0.0.tgz",
1439
+      "integrity": "sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg=="
1440
+    },
1431 1441
     "@riophae/vue-treeselect": {
1432 1442
       "version": "0.4.0",
1433 1443
       "resolved": "https://registry.npmmirror.com/@riophae/vue-treeselect/-/vue-treeselect-0.4.0.tgz",
@@ -1550,6 +1560,185 @@
1550 1560
       "integrity": "sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==",
1551 1561
       "dev": true
1552 1562
     },
1563
+    "@tiptap/core": {
1564
+      "version": "2.9.1",
1565
+      "resolved": "https://registry.npmmirror.com/@tiptap/core/-/core-2.9.1.tgz",
1566
+      "integrity": "sha512-tifnLL/ARzQ6/FGEJjVwj9UT3v+pENdWHdk9x6F3X0mB1y0SeCjV21wpFLYESzwNdBPAj8NMp8Behv7dBnhIfw=="
1567
+    },
1568
+    "@tiptap/extension-blockquote": {
1569
+      "version": "2.9.1",
1570
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-blockquote/-/extension-blockquote-2.9.1.tgz",
1571
+      "integrity": "sha512-Y0jZxc/pdkvcsftmEZFyG+73um8xrx6/DMfgUcNg3JAM63CISedNcr+OEI11L0oFk1KFT7/aQ9996GM6Kubdqg=="
1572
+    },
1573
+    "@tiptap/extension-bold": {
1574
+      "version": "2.9.1",
1575
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-bold/-/extension-bold-2.9.1.tgz",
1576
+      "integrity": "sha512-e2P1zGpnnt4+TyxTC5pX/lPxPasZcuHCYXY0iwQ3bf8qRQQEjDfj3X7EI+cXqILtnhOiviEOcYmeu5op2WhQDg=="
1577
+    },
1578
+    "@tiptap/extension-bubble-menu": {
1579
+      "version": "2.9.1",
1580
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.9.1.tgz",
1581
+      "integrity": "sha512-DWUF6NG08/bZDWw0jCeotSTvpkyqZTi4meJPomG9Wzs/Ol7mEwlNCsCViD999g0+IjyXFatBk4DfUq1YDDu++Q==",
1582
+      "requires": {
1583
+        "tippy.js": "^6.3.7"
1584
+      }
1585
+    },
1586
+    "@tiptap/extension-bullet-list": {
1587
+      "version": "2.9.1",
1588
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-bullet-list/-/extension-bullet-list-2.9.1.tgz",
1589
+      "integrity": "sha512-0hizL/0j9PragJObjAWUVSuGhN1jKjCFnhLQVRxtx4HutcvS/lhoWMvFg6ZF8xqWgIa06n6A7MaknQkqhTdhKA=="
1590
+    },
1591
+    "@tiptap/extension-code": {
1592
+      "version": "2.9.1",
1593
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-code/-/extension-code-2.9.1.tgz",
1594
+      "integrity": "sha512-WQqcVGe7i/E+yO3wz5XQteU1ETNZ00euUEl4ylVVmH2NM4Dh0KDjEhbhHlCM0iCfLUo7jhjC7dmS+hMdPUb+Tg=="
1595
+    },
1596
+    "@tiptap/extension-code-block": {
1597
+      "version": "2.9.1",
1598
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-code-block/-/extension-code-block-2.9.1.tgz",
1599
+      "integrity": "sha512-A/50wPWDqEUUUPhrwRKILP5gXMO5UlQ0F6uBRGYB9CEVOREam9yIgvONOnZVJtszHqOayjIVMXbH/JMBeq11/g=="
1600
+    },
1601
+    "@tiptap/extension-document": {
1602
+      "version": "2.9.1",
1603
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-document/-/extension-document-2.9.1.tgz",
1604
+      "integrity": "sha512-1a+HCoDPnBttjqExfYLwfABq8MYdiowhy/wp8eCxVb6KGFEENO53KapstISvPzqH7eOi+qRjBB1KtVYb/ZXicg=="
1605
+    },
1606
+    "@tiptap/extension-dropcursor": {
1607
+      "version": "2.9.1",
1608
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-dropcursor/-/extension-dropcursor-2.9.1.tgz",
1609
+      "integrity": "sha512-wJZspSmJRkDBtPkzFz1g7gvZOEOayk8s93UHsgbJxcV4VWHYleZ5XhT74sZunSjefNDm3qC6v2BSgLp3vNHVKQ=="
1610
+    },
1611
+    "@tiptap/extension-floating-menu": {
1612
+      "version": "2.9.1",
1613
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-floating-menu/-/extension-floating-menu-2.9.1.tgz",
1614
+      "integrity": "sha512-MxZ7acNNsoNaKpetxfwi3Z11Bgrh0T2EJlCV77v9N1vWK38+st3H1WJanmLbPNtc2ocvhHJrz+DjDz3CWxQ9rQ==",
1615
+      "requires": {
1616
+        "tippy.js": "^6.3.7"
1617
+      }
1618
+    },
1619
+    "@tiptap/extension-gapcursor": {
1620
+      "version": "2.9.1",
1621
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-gapcursor/-/extension-gapcursor-2.9.1.tgz",
1622
+      "integrity": "sha512-jsRBmX01vr+5H02GljiHMo0n5H1vzoMLmFarxe0Yq2d2l9G/WV2VWX2XnGliqZAYWd1bI0phs7uLQIN3mxGQTw=="
1623
+    },
1624
+    "@tiptap/extension-hard-break": {
1625
+      "version": "2.9.1",
1626
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-hard-break/-/extension-hard-break-2.9.1.tgz",
1627
+      "integrity": "sha512-fCuaOD/b7nDjm47PZ58oanq7y4ccS2wjPh42Qm0B0yipu/1fmC8eS1SmaXmk28F89BLtuL6uOCtR1spe+lZtlQ=="
1628
+    },
1629
+    "@tiptap/extension-heading": {
1630
+      "version": "2.9.1",
1631
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-heading/-/extension-heading-2.9.1.tgz",
1632
+      "integrity": "sha512-SjZowzLixOFaCrV2cMaWi1mp8REK0zK1b3OcVx7bCZfVSmsOETJyrAIUpCKA8o60NwF7pwhBg0MN8oXlNKMeFw=="
1633
+    },
1634
+    "@tiptap/extension-history": {
1635
+      "version": "2.9.1",
1636
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-history/-/extension-history-2.9.1.tgz",
1637
+      "integrity": "sha512-wp9qR1NM+LpvyLZFmdNaAkDq0d4jDJ7z7Fz7icFQPu31NVxfQYO3IXNmvJDCNu8hFAbImpA5aG8MBuwzRo0H9w=="
1638
+    },
1639
+    "@tiptap/extension-horizontal-rule": {
1640
+      "version": "2.9.1",
1641
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.9.1.tgz",
1642
+      "integrity": "sha512-ydUhABeaBI1CoJp+/BBqPhXINfesp1qMNL/jiDcMsB66fsD4nOyphpAJT7FaRFZFtQVF06+nttBtFZVkITQVqg=="
1643
+    },
1644
+    "@tiptap/extension-italic": {
1645
+      "version": "2.9.1",
1646
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-italic/-/extension-italic-2.9.1.tgz",
1647
+      "integrity": "sha512-VkNA6Vz96+/+7uBlsgM7bDXXx4b62T1fDam/3UKifA72aD/fZckeWrbT7KrtdUbzuIniJSbA0lpTs5FY29+86Q=="
1648
+    },
1649
+    "@tiptap/extension-list-item": {
1650
+      "version": "2.9.1",
1651
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-list-item/-/extension-list-item-2.9.1.tgz",
1652
+      "integrity": "sha512-6O4NtYNR5N2Txi4AC0/4xMRJq9xd4+7ShxCZCDVL0WDVX37IhaqMO7LGQtA6MVlYyNaX4W1swfdJaqrJJ5HIUw=="
1653
+    },
1654
+    "@tiptap/extension-ordered-list": {
1655
+      "version": "2.9.1",
1656
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-ordered-list/-/extension-ordered-list-2.9.1.tgz",
1657
+      "integrity": "sha512-6J9jtv1XP8dW7/JNSH/K4yiOABc92tBJtgCsgP8Ep4+fjfjdj4HbjS1oSPWpgItucF2Fp/VF8qg55HXhjxHjTw=="
1658
+    },
1659
+    "@tiptap/extension-paragraph": {
1660
+      "version": "2.9.1",
1661
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-paragraph/-/extension-paragraph-2.9.1.tgz",
1662
+      "integrity": "sha512-JOmT0xd4gd3lIhLwrsjw8lV+ZFROKZdIxLi0Ia05XSu4RLrrvWj0zdKMSB+V87xOWfSB3Epo95zAvnPox5Q16A=="
1663
+    },
1664
+    "@tiptap/extension-strike": {
1665
+      "version": "2.9.1",
1666
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-strike/-/extension-strike-2.9.1.tgz",
1667
+      "integrity": "sha512-V5aEXdML+YojlPhastcu7w4biDPwmzy/fWq0T2qjfu5Te/THcqDmGYVBKESBm5x6nBy5OLkanw2O+KHu2quDdg=="
1668
+    },
1669
+    "@tiptap/extension-text": {
1670
+      "version": "2.9.1",
1671
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-text/-/extension-text-2.9.1.tgz",
1672
+      "integrity": "sha512-3wo9uCrkLVLQFgbw2eFU37QAa1jq1/7oExa+FF/DVxdtHRS9E2rnUZ8s2hat/IWzvPUHXMwo3Zg2XfhoamQpCA=="
1673
+    },
1674
+    "@tiptap/extension-text-style": {
1675
+      "version": "2.9.1",
1676
+      "resolved": "https://registry.npmmirror.com/@tiptap/extension-text-style/-/extension-text-style-2.9.1.tgz",
1677
+      "integrity": "sha512-LAxc0SeeiPiAVBwksczeA7BJSZb6WtVpYhy5Esvy9K0mK5kttB4KxtnXWeQzMIJZQbza65yftGKfQlexf/Y7yg=="
1678
+    },
1679
+    "@tiptap/pm": {
1680
+      "version": "2.9.1",
1681
+      "resolved": "https://registry.npmmirror.com/@tiptap/pm/-/pm-2.9.1.tgz",
1682
+      "integrity": "sha512-mvV86fr7kEuDYEApQ2uMPCKL2uagUE0BsXiyyz3KOkY1zifyVm1fzdkscb24Qy1GmLzWAIIihA+3UHNRgYdOlQ==",
1683
+      "requires": {
1684
+        "prosemirror-changeset": "^2.2.1",
1685
+        "prosemirror-collab": "^1.3.1",
1686
+        "prosemirror-commands": "^1.6.0",
1687
+        "prosemirror-dropcursor": "^1.8.1",
1688
+        "prosemirror-gapcursor": "^1.3.2",
1689
+        "prosemirror-history": "^1.4.1",
1690
+        "prosemirror-inputrules": "^1.4.0",
1691
+        "prosemirror-keymap": "^1.2.2",
1692
+        "prosemirror-markdown": "^1.13.0",
1693
+        "prosemirror-menu": "^1.2.4",
1694
+        "prosemirror-model": "^1.22.3",
1695
+        "prosemirror-schema-basic": "^1.2.3",
1696
+        "prosemirror-schema-list": "^1.4.1",
1697
+        "prosemirror-state": "^1.4.3",
1698
+        "prosemirror-tables": "^1.4.0",
1699
+        "prosemirror-trailing-node": "^3.0.0",
1700
+        "prosemirror-transform": "^1.10.0",
1701
+        "prosemirror-view": "^1.34.3"
1702
+      }
1703
+    },
1704
+    "@tiptap/starter-kit": {
1705
+      "version": "2.9.1",
1706
+      "resolved": "https://registry.npmmirror.com/@tiptap/starter-kit/-/starter-kit-2.9.1.tgz",
1707
+      "integrity": "sha512-nsw6UF/7wDpPfHRhtGOwkj1ipIEiWZS1VGw+c14K61vM1CNj0uQ4jogbHwHZqN1dlL5Hh+FCqUHDPxG6ECbijg==",
1708
+      "requires": {
1709
+        "@tiptap/core": "^2.9.1",
1710
+        "@tiptap/extension-blockquote": "^2.9.1",
1711
+        "@tiptap/extension-bold": "^2.9.1",
1712
+        "@tiptap/extension-bullet-list": "^2.9.1",
1713
+        "@tiptap/extension-code": "^2.9.1",
1714
+        "@tiptap/extension-code-block": "^2.9.1",
1715
+        "@tiptap/extension-document": "^2.9.1",
1716
+        "@tiptap/extension-dropcursor": "^2.9.1",
1717
+        "@tiptap/extension-gapcursor": "^2.9.1",
1718
+        "@tiptap/extension-hard-break": "^2.9.1",
1719
+        "@tiptap/extension-heading": "^2.9.1",
1720
+        "@tiptap/extension-history": "^2.9.1",
1721
+        "@tiptap/extension-horizontal-rule": "^2.9.1",
1722
+        "@tiptap/extension-italic": "^2.9.1",
1723
+        "@tiptap/extension-list-item": "^2.9.1",
1724
+        "@tiptap/extension-ordered-list": "^2.9.1",
1725
+        "@tiptap/extension-paragraph": "^2.9.1",
1726
+        "@tiptap/extension-strike": "^2.9.1",
1727
+        "@tiptap/extension-text": "^2.9.1",
1728
+        "@tiptap/extension-text-style": "^2.9.1",
1729
+        "@tiptap/pm": "^2.9.1"
1730
+      }
1731
+    },
1732
+    "@tiptap/vue-2": {
1733
+      "version": "2.9.1",
1734
+      "resolved": "https://registry.npmmirror.com/@tiptap/vue-2/-/vue-2-2.9.1.tgz",
1735
+      "integrity": "sha512-nHnBxFFkswTzyamXGd96tAwpPJgLfMIQn84kCfjH+rKq8rnd/5BDaN6qdqh78yR743OXBBFdHekS7x1yMLDO0w==",
1736
+      "requires": {
1737
+        "@tiptap/extension-bubble-menu": "^2.9.1",
1738
+        "@tiptap/extension-floating-menu": "^2.9.1",
1739
+        "vue-ts-types": "^1.6.0"
1740
+      }
1741
+    },
1553 1742
     "@transloadit/prettier-bytes": {
1554 1743
       "version": "0.0.7",
1555 1744
       "resolved": "https://registry.npmmirror.com/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz",
@@ -1575,6 +1764,25 @@
1575 1764
       "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
1576 1765
       "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
1577 1766
     },
1767
+    "@types/linkify-it": {
1768
+      "version": "5.0.0",
1769
+      "resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-5.0.0.tgz",
1770
+      "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q=="
1771
+    },
1772
+    "@types/markdown-it": {
1773
+      "version": "14.1.2",
1774
+      "resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-14.1.2.tgz",
1775
+      "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==",
1776
+      "requires": {
1777
+        "@types/linkify-it": "^5",
1778
+        "@types/mdurl": "^2"
1779
+      }
1780
+    },
1781
+    "@types/mdurl": {
1782
+      "version": "2.0.0",
1783
+      "resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-2.0.0.tgz",
1784
+      "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg=="
1785
+    },
1578 1786
     "@types/minimatch": {
1579 1787
       "version": "5.1.2",
1580 1788
       "resolved": "https://registry.npmmirror.com/@types/minimatch/-/minimatch-5.1.2.tgz",
@@ -4871,6 +5079,11 @@
4871 5079
         "sha.js": "^2.4.8"
4872 5080
       }
4873 5081
     },
5082
+    "crelt": {
5083
+      "version": "1.0.6",
5084
+      "resolved": "https://registry.npmmirror.com/crelt/-/crelt-1.0.6.tgz",
5085
+      "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g=="
5086
+    },
4874 5087
     "cross-spawn": {
4875 5088
       "version": "3.0.1",
4876 5089
       "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-3.0.1.tgz",
@@ -8748,6 +8961,14 @@
8748 8961
       "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
8749 8962
       "dev": true
8750 8963
     },
8964
+    "linkify-it": {
8965
+      "version": "5.0.0",
8966
+      "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-5.0.0.tgz",
8967
+      "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==",
8968
+      "requires": {
8969
+        "uc.micro": "^2.0.0"
8970
+      }
8971
+    },
8751 8972
     "lint-staged": {
8752 8973
       "version": "10.5.3",
8753 8974
       "resolved": "https://registry.npmmirror.com/lint-staged/-/lint-staged-10.5.3.tgz",
@@ -9512,6 +9733,31 @@
9512 9733
         "object-visit": "^1.0.0"
9513 9734
       }
9514 9735
     },
9736
+    "markdown-it": {
9737
+      "version": "14.1.0",
9738
+      "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz",
9739
+      "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
9740
+      "requires": {
9741
+        "argparse": "^2.0.1",
9742
+        "entities": "^4.4.0",
9743
+        "linkify-it": "^5.0.0",
9744
+        "mdurl": "^2.0.0",
9745
+        "punycode.js": "^2.3.1",
9746
+        "uc.micro": "^2.1.0"
9747
+      },
9748
+      "dependencies": {
9749
+        "argparse": {
9750
+          "version": "2.0.1",
9751
+          "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
9752
+          "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
9753
+        },
9754
+        "entities": {
9755
+          "version": "4.5.0",
9756
+          "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
9757
+          "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="
9758
+        }
9759
+      }
9760
+    },
9515 9761
     "material-colors": {
9516 9762
       "version": "1.2.6",
9517 9763
       "resolved": "https://registry.npmmirror.com/material-colors/-/material-colors-1.2.6.tgz",
@@ -9534,6 +9780,11 @@
9534 9780
       "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==",
9535 9781
       "dev": true
9536 9782
     },
9783
+    "mdurl": {
9784
+      "version": "2.0.0",
9785
+      "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-2.0.0.tgz",
9786
+      "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w=="
9787
+    },
9537 9788
     "media-typer": {
9538 9789
       "version": "0.3.0",
9539 9790
       "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz",
@@ -10552,6 +10803,11 @@
10552 10803
         }
10553 10804
       }
10554 10805
     },
10806
+    "orderedmap": {
10807
+      "version": "2.1.1",
10808
+      "resolved": "https://registry.npmmirror.com/orderedmap/-/orderedmap-2.1.1.tgz",
10809
+      "integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g=="
10810
+    },
10555 10811
     "os-browserify": {
10556 10812
       "version": "0.3.0",
10557 10813
       "resolved": "https://registry.npmmirror.com/os-browserify/-/os-browserify-0.3.0.tgz",
@@ -11709,6 +11965,185 @@
11709 11965
       "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==",
11710 11966
       "dev": true
11711 11967
     },
11968
+    "prosemirror-changeset": {
11969
+      "version": "2.2.1",
11970
+      "resolved": "https://registry.npmmirror.com/prosemirror-changeset/-/prosemirror-changeset-2.2.1.tgz",
11971
+      "integrity": "sha512-J7msc6wbxB4ekDFj+n9gTW/jav/p53kdlivvuppHsrZXCaQdVgRghoZbSS3kwrRyAstRVQ4/+u5k7YfLgkkQvQ==",
11972
+      "requires": {
11973
+        "prosemirror-transform": "^1.0.0"
11974
+      }
11975
+    },
11976
+    "prosemirror-collab": {
11977
+      "version": "1.3.1",
11978
+      "resolved": "https://registry.npmmirror.com/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz",
11979
+      "integrity": "sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==",
11980
+      "requires": {
11981
+        "prosemirror-state": "^1.0.0"
11982
+      }
11983
+    },
11984
+    "prosemirror-commands": {
11985
+      "version": "1.6.2",
11986
+      "resolved": "https://registry.npmmirror.com/prosemirror-commands/-/prosemirror-commands-1.6.2.tgz",
11987
+      "integrity": "sha512-0nDHH++qcf/BuPLYvmqZTUUsPJUCPBUXt0J1ErTcDIS369CTp773itzLGIgIXG4LJXOlwYCr44+Mh4ii6MP1QA==",
11988
+      "requires": {
11989
+        "prosemirror-model": "^1.0.0",
11990
+        "prosemirror-state": "^1.0.0",
11991
+        "prosemirror-transform": "^1.10.2"
11992
+      }
11993
+    },
11994
+    "prosemirror-dropcursor": {
11995
+      "version": "1.8.1",
11996
+      "resolved": "https://registry.npmmirror.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.1.tgz",
11997
+      "integrity": "sha512-M30WJdJZLyXHi3N8vxN6Zh5O8ZBbQCz0gURTfPmTIBNQ5pxrdU7A58QkNqfa98YEjSAL1HUyyU34f6Pm5xBSGw==",
11998
+      "requires": {
11999
+        "prosemirror-state": "^1.0.0",
12000
+        "prosemirror-transform": "^1.1.0",
12001
+        "prosemirror-view": "^1.1.0"
12002
+      }
12003
+    },
12004
+    "prosemirror-gapcursor": {
12005
+      "version": "1.3.2",
12006
+      "resolved": "https://registry.npmmirror.com/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.2.tgz",
12007
+      "integrity": "sha512-wtjswVBd2vaQRrnYZaBCbyDqr232Ed4p2QPtRIUK5FuqHYKGWkEwl08oQM4Tw7DOR0FsasARV5uJFvMZWxdNxQ==",
12008
+      "requires": {
12009
+        "prosemirror-keymap": "^1.0.0",
12010
+        "prosemirror-model": "^1.0.0",
12011
+        "prosemirror-state": "^1.0.0",
12012
+        "prosemirror-view": "^1.0.0"
12013
+      }
12014
+    },
12015
+    "prosemirror-history": {
12016
+      "version": "1.4.1",
12017
+      "resolved": "https://registry.npmmirror.com/prosemirror-history/-/prosemirror-history-1.4.1.tgz",
12018
+      "integrity": "sha512-2JZD8z2JviJrboD9cPuX/Sv/1ChFng+xh2tChQ2X4bB2HeK+rra/bmJ3xGntCcjhOqIzSDG6Id7e8RJ9QPXLEQ==",
12019
+      "requires": {
12020
+        "prosemirror-state": "^1.2.2",
12021
+        "prosemirror-transform": "^1.0.0",
12022
+        "prosemirror-view": "^1.31.0",
12023
+        "rope-sequence": "^1.3.0"
12024
+      }
12025
+    },
12026
+    "prosemirror-inputrules": {
12027
+      "version": "1.4.0",
12028
+      "resolved": "https://registry.npmmirror.com/prosemirror-inputrules/-/prosemirror-inputrules-1.4.0.tgz",
12029
+      "integrity": "sha512-6ygpPRuTJ2lcOXs9JkefieMst63wVJBgHZGl5QOytN7oSZs3Co/BYbc3Yx9zm9H37Bxw8kVzCnDsihsVsL4yEg==",
12030
+      "requires": {
12031
+        "prosemirror-state": "^1.0.0",
12032
+        "prosemirror-transform": "^1.0.0"
12033
+      }
12034
+    },
12035
+    "prosemirror-keymap": {
12036
+      "version": "1.2.2",
12037
+      "resolved": "https://registry.npmmirror.com/prosemirror-keymap/-/prosemirror-keymap-1.2.2.tgz",
12038
+      "integrity": "sha512-EAlXoksqC6Vbocqc0GtzCruZEzYgrn+iiGnNjsJsH4mrnIGex4qbLdWWNza3AW5W36ZRrlBID0eM6bdKH4OStQ==",
12039
+      "requires": {
12040
+        "prosemirror-state": "^1.0.0",
12041
+        "w3c-keyname": "^2.2.0"
12042
+      }
12043
+    },
12044
+    "prosemirror-markdown": {
12045
+      "version": "1.13.1",
12046
+      "resolved": "https://registry.npmmirror.com/prosemirror-markdown/-/prosemirror-markdown-1.13.1.tgz",
12047
+      "integrity": "sha512-Sl+oMfMtAjWtlcZoj/5L/Q39MpEnVZ840Xo330WJWUvgyhNmLBLN7MsHn07s53nG/KImevWHSE6fEj4q/GihHw==",
12048
+      "requires": {
12049
+        "@types/markdown-it": "^14.0.0",
12050
+        "markdown-it": "^14.0.0",
12051
+        "prosemirror-model": "^1.20.0"
12052
+      }
12053
+    },
12054
+    "prosemirror-menu": {
12055
+      "version": "1.2.4",
12056
+      "resolved": "https://registry.npmmirror.com/prosemirror-menu/-/prosemirror-menu-1.2.4.tgz",
12057
+      "integrity": "sha512-S/bXlc0ODQup6aiBbWVsX/eM+xJgCTAfMq/nLqaO5ID/am4wS0tTCIkzwytmao7ypEtjj39i7YbJjAgO20mIqA==",
12058
+      "requires": {
12059
+        "crelt": "^1.0.0",
12060
+        "prosemirror-commands": "^1.0.0",
12061
+        "prosemirror-history": "^1.0.0",
12062
+        "prosemirror-state": "^1.0.0"
12063
+      }
12064
+    },
12065
+    "prosemirror-model": {
12066
+      "version": "1.23.0",
12067
+      "resolved": "https://registry.npmmirror.com/prosemirror-model/-/prosemirror-model-1.23.0.tgz",
12068
+      "integrity": "sha512-Q/fgsgl/dlOAW9ILu4OOhYWQbc7TQd4BwKH/RwmUjyVf8682Be4zj3rOYdLnYEcGzyg8LL9Q5IWYKD8tdToreQ==",
12069
+      "requires": {
12070
+        "orderedmap": "^2.0.0"
12071
+      }
12072
+    },
12073
+    "prosemirror-schema-basic": {
12074
+      "version": "1.2.3",
12075
+      "resolved": "https://registry.npmmirror.com/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.3.tgz",
12076
+      "integrity": "sha512-h+H0OQwZVqMon1PNn0AG9cTfx513zgIG2DY00eJ00Yvgb3UD+GQ/VlWW5rcaxacpCGT1Yx8nuhwXk4+QbXUfJA==",
12077
+      "requires": {
12078
+        "prosemirror-model": "^1.19.0"
12079
+      }
12080
+    },
12081
+    "prosemirror-schema-list": {
12082
+      "version": "1.4.1",
12083
+      "resolved": "https://registry.npmmirror.com/prosemirror-schema-list/-/prosemirror-schema-list-1.4.1.tgz",
12084
+      "integrity": "sha512-jbDyaP/6AFfDfu70VzySsD75Om2t3sXTOdl5+31Wlxlg62td1haUpty/ybajSfJ1pkGadlOfwQq9kgW5IMo1Rg==",
12085
+      "requires": {
12086
+        "prosemirror-model": "^1.0.0",
12087
+        "prosemirror-state": "^1.0.0",
12088
+        "prosemirror-transform": "^1.7.3"
12089
+      }
12090
+    },
12091
+    "prosemirror-state": {
12092
+      "version": "1.4.3",
12093
+      "resolved": "https://registry.npmmirror.com/prosemirror-state/-/prosemirror-state-1.4.3.tgz",
12094
+      "integrity": "sha512-goFKORVbvPuAQaXhpbemJFRKJ2aixr+AZMGiquiqKxaucC6hlpHNZHWgz5R7dS4roHiwq9vDctE//CZ++o0W1Q==",
12095
+      "requires": {
12096
+        "prosemirror-model": "^1.0.0",
12097
+        "prosemirror-transform": "^1.0.0",
12098
+        "prosemirror-view": "^1.27.0"
12099
+      }
12100
+    },
12101
+    "prosemirror-tables": {
12102
+      "version": "1.6.1",
12103
+      "resolved": "https://registry.npmmirror.com/prosemirror-tables/-/prosemirror-tables-1.6.1.tgz",
12104
+      "integrity": "sha512-p8WRJNA96jaNQjhJolmbxTzd6M4huRE5xQ8OxjvMhQUP0Nzpo4zz6TztEiwk6aoqGBhz9lxRWR1yRZLlpQN98w==",
12105
+      "requires": {
12106
+        "prosemirror-keymap": "^1.1.2",
12107
+        "prosemirror-model": "^1.8.1",
12108
+        "prosemirror-state": "^1.3.1",
12109
+        "prosemirror-transform": "^1.2.1",
12110
+        "prosemirror-view": "^1.13.3"
12111
+      }
12112
+    },
12113
+    "prosemirror-trailing-node": {
12114
+      "version": "3.0.0",
12115
+      "resolved": "https://registry.npmmirror.com/prosemirror-trailing-node/-/prosemirror-trailing-node-3.0.0.tgz",
12116
+      "integrity": "sha512-xiun5/3q0w5eRnGYfNlW1uU9W6x5MoFKWwq/0TIRgt09lv7Hcser2QYV8t4muXbEr+Fwo0geYn79Xs4GKywrRQ==",
12117
+      "requires": {
12118
+        "@remirror/core-constants": "3.0.0",
12119
+        "escape-string-regexp": "^4.0.0"
12120
+      },
12121
+      "dependencies": {
12122
+        "escape-string-regexp": {
12123
+          "version": "4.0.0",
12124
+          "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
12125
+          "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
12126
+        }
12127
+      }
12128
+    },
12129
+    "prosemirror-transform": {
12130
+      "version": "1.10.2",
12131
+      "resolved": "https://registry.npmmirror.com/prosemirror-transform/-/prosemirror-transform-1.10.2.tgz",
12132
+      "integrity": "sha512-2iUq0wv2iRoJO/zj5mv8uDUriOHWzXRnOTVgCzSXnktS/2iQRa3UUQwVlkBlYZFtygw6Nh1+X4mGqoYBINn5KQ==",
12133
+      "requires": {
12134
+        "prosemirror-model": "^1.21.0"
12135
+      }
12136
+    },
12137
+    "prosemirror-view": {
12138
+      "version": "1.36.0",
12139
+      "resolved": "https://registry.npmmirror.com/prosemirror-view/-/prosemirror-view-1.36.0.tgz",
12140
+      "integrity": "sha512-U0GQd5yFvV5qUtT41X1zCQfbw14vkbbKwLlQXhdylEmgpYVHkefXYcC4HHwWOfZa3x6Y8wxDLUBv7dxN5XQ3nA==",
12141
+      "requires": {
12142
+        "prosemirror-model": "^1.20.0",
12143
+        "prosemirror-state": "^1.0.0",
12144
+        "prosemirror-transform": "^1.1.0"
12145
+      }
12146
+    },
11712 12147
     "proto-list": {
11713 12148
       "version": "1.2.4",
11714 12149
       "resolved": "https://registry.npmmirror.com/proto-list/-/proto-list-1.2.4.tgz",
@@ -11799,6 +12234,11 @@
11799 12234
       "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.0.tgz",
11800 12235
       "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA=="
11801 12236
     },
12237
+    "punycode.js": {
12238
+      "version": "2.3.1",
12239
+      "resolved": "https://registry.npmmirror.com/punycode.js/-/punycode.js-2.3.1.tgz",
12240
+      "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA=="
12241
+    },
11802 12242
     "q": {
11803 12243
       "version": "1.5.1",
11804 12244
       "resolved": "https://registry.npmmirror.com/q/-/q-1.5.1.tgz",
@@ -12286,6 +12726,11 @@
12286 12726
         "inherits": "^2.0.1"
12287 12727
       }
12288 12728
     },
12729
+    "rope-sequence": {
12730
+      "version": "1.3.4",
12731
+      "resolved": "https://registry.npmmirror.com/rope-sequence/-/rope-sequence-1.3.4.tgz",
12732
+      "integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ=="
12733
+    },
12289 12734
     "run-async": {
12290 12735
       "version": "2.4.1",
12291 12736
       "resolved": "https://registry.npmmirror.com/run-async/-/run-async-2.4.1.tgz",
@@ -14020,6 +14465,14 @@
14020 14465
       "resolved": "https://registry.npmmirror.com/tiny-warning/-/tiny-warning-1.0.3.tgz",
14021 14466
       "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
14022 14467
     },
14468
+    "tippy.js": {
14469
+      "version": "6.3.7",
14470
+      "resolved": "https://registry.npmmirror.com/tippy.js/-/tippy.js-6.3.7.tgz",
14471
+      "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==",
14472
+      "requires": {
14473
+        "@popperjs/core": "^2.9.0"
14474
+      }
14475
+    },
14023 14476
     "tmp": {
14024 14477
       "version": "0.0.33",
14025 14478
       "resolved": "https://registry.npmmirror.com/tmp/-/tmp-0.0.33.tgz",
@@ -14206,6 +14659,11 @@
14206 14659
       "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
14207 14660
       "dev": true
14208 14661
     },
14662
+    "uc.micro": {
14663
+      "version": "2.1.0",
14664
+      "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz",
14665
+      "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A=="
14666
+    },
14209 14667
     "uglify-js": {
14210 14668
       "version": "3.4.10",
14211 14669
       "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.4.10.tgz",
@@ -14818,6 +15276,11 @@
14818 15276
       "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
14819 15277
       "dev": true
14820 15278
     },
15279
+    "vue-ts-types": {
15280
+      "version": "1.7.1",
15281
+      "resolved": "https://registry.npmmirror.com/vue-ts-types/-/vue-ts-types-1.7.1.tgz",
15282
+      "integrity": "sha512-rurLDfcYvOIRlHd0r+IJDVxQ0EFLyziylFSDNNJIxqWYew3mM+HHYZ/+evegdnwVytEPj3QnyfB7OAbj4Q3Zuw=="
15283
+    },
14821 15284
     "vuedraggable": {
14822 15285
       "version": "2.24.3",
14823 15286
       "resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz",
@@ -14831,6 +15294,11 @@
14831 15294
       "resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.0.tgz",
14832 15295
       "integrity": "sha512-W74OO2vCJPs9/YjNjW8lLbj+jzT24waTo2KShI8jLvJW8OaIkgb3wuAMA7D+ZiUxDOx3ubwSZTaJBip9G8a3aQ=="
14833 15296
     },
15297
+    "w3c-keyname": {
15298
+      "version": "2.2.8",
15299
+      "resolved": "https://registry.npmmirror.com/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
15300
+      "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ=="
15301
+    },
14834 15302
     "watch-size": {
14835 15303
       "version": "2.0.0",
14836 15304
       "resolved": "https://registry.npmmirror.com/watch-size/-/watch-size-2.0.0.tgz",

+ 2 - 0
package.json

@@ -37,6 +37,8 @@
37 37
   },
38 38
   "dependencies": {
39 39
     "@riophae/vue-treeselect": "0.4.0",
40
+    "@tiptap/starter-kit": "^2.9.1",
41
+    "@tiptap/vue-2": "^2.9.1",
40 42
     "@wangeditor/editor": "^5.1.23",
41 43
     "@wangeditor/editor-for-vue": "^1.0.2",
42 44
     "@wangeditor/plugin-upload-attachment": "^1.1.0",

+ 1 - 1
public/config.js

@@ -1,3 +1,3 @@
1
-var BASE_URL = 'http://192.168.4.200:8080'
1
+var BASE_URL = 'http://192.168.4.194:8080/JKC-server'
2 2
 // var BASE_URL = 'http://182.140.29.12:89/ywtb-server'
3 3
 

+ 53 - 0
src/api/info/areaInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询区域对象列表
4
+export function listAreaInfo(query) {
5
+  return request({
6
+    url: '/info/areaInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询区域对象详细
13
+export function getAreaInfo(areaId) {
14
+  return request({
15
+    url: '/info/areaInfo/' + areaId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增区域对象
21
+export function addAreaInfo(data) {
22
+  return request({
23
+    url: '/info/areaInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改区域对象
30
+export function updateAreaInfo(data) {
31
+  return request({
32
+    url: '/info/areaInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除区域对象
39
+export function delAreaInfo(areaId) {
40
+  return request({
41
+    url: '/info/areaInfo/' + areaId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出区域对象
47
+export function exportAreaInfo(query) {
48
+  return request({
49
+    url: '/info/areaInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/buildingInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询大楼信息列表
4
+export function listBuildingInfo(query) {
5
+  return request({
6
+    url: '/info/buildingInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询大楼信息详细
13
+export function getBuildingInfo(buildingId) {
14
+  return request({
15
+    url: '/info/buildingInfo/' + buildingId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增大楼信息
21
+export function addBuildingInfo(data) {
22
+  return request({
23
+    url: '/info/buildingInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改大楼信息
30
+export function updateBuildingInfo(data) {
31
+  return request({
32
+    url: '/info/buildingInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除大楼信息
39
+export function delBuildingInfo(buildingId) {
40
+  return request({
41
+    url: '/info/buildingInfo/' + buildingId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出大楼信息
47
+export function exportBuildingInfo(query) {
48
+  return request({
49
+    url: '/info/buildingInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/elevatorInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询电梯信息列表
4
+export function listElevatorInfo(query) {
5
+  return request({
6
+    url: '/info/elevatorInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询电梯信息详细
13
+export function getElevatorInfo(elevatorId) {
14
+  return request({
15
+    url: '/info/elevatorInfo/' + elevatorId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增电梯信息
21
+export function addElevatorInfo(data) {
22
+  return request({
23
+    url: '/info/elevatorInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改电梯信息
30
+export function updateElevatorInfo(data) {
31
+  return request({
32
+    url: '/info/elevatorInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除电梯信息
39
+export function delElevatorInfo(elevatorId) {
40
+  return request({
41
+    url: '/info/elevatorInfo/' + elevatorId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出电梯信息
47
+export function exportElevatorInfo(query) {
48
+  return request({
49
+    url: '/info/elevatorInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/equipmentInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询设备信息列表
4
+export function listEquipmentInfo(query) {
5
+  return request({
6
+    url: '/info/equipmentInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询设备信息详细
13
+export function getEquipmentInfo(equipmentId) {
14
+  return request({
15
+    url: '/info/equipmentInfo/' + equipmentId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增设备信息
21
+export function addEquipmentInfo(data) {
22
+  return request({
23
+    url: '/info/equipmentInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改设备信息
30
+export function updateEquipmentInfo(data) {
31
+  return request({
32
+    url: '/info/equipmentInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除设备信息
39
+export function delEquipmentInfo(equipmentId) {
40
+  return request({
41
+    url: '/info/equipmentInfo/' + equipmentId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出设备信息
47
+export function exportEquipmentInfo(query) {
48
+  return request({
49
+    url: '/info/equipmentInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/forewarningInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询预警信息列表
4
+export function listForewarningInfo(query) {
5
+  return request({
6
+    url: '/info/forewarningInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询预警信息详细
13
+export function getForewarningInfo(forewarningId) {
14
+  return request({
15
+    url: '/info/forewarningInfo/' + forewarningId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增预警信息
21
+export function addForewarningInfo(data) {
22
+  return request({
23
+    url: '/info/forewarningInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改预警信息
30
+export function updateForewarningInfo(data) {
31
+  return request({
32
+    url: '/info/forewarningInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除预警信息
39
+export function delForewarningInfo(forewarningId) {
40
+  return request({
41
+    url: '/info/forewarningInfo/' + forewarningId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出预警信息
47
+export function exportForewarningInfo(query) {
48
+  return request({
49
+    url: '/info/forewarningInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/organizationInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询主体信息列表
4
+export function listOrganizationInfo(query) {
5
+  return request({
6
+    url: '/info/organizationInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询主体信息详细
13
+export function getOrganizationInfo(organizationId) {
14
+  return request({
15
+    url: '/info/organizationInfo/' + organizationId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增主体信息
21
+export function addOrganizationInfo(data) {
22
+  return request({
23
+    url: '/info/organizationInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改主体信息
30
+export function updateOrganizationInfo(data) {
31
+  return request({
32
+    url: '/info/organizationInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除主体信息
39
+export function delOrganizationInfo(organizationId) {
40
+  return request({
41
+    url: '/info/organizationInfo/' + organizationId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出主体信息
47
+export function exportOrganizationInfo(query) {
48
+  return request({
49
+    url: '/info/organizationInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/planInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询规划对象列表
4
+export function listPlanInfo(query) {
5
+  return request({
6
+    url: '/info/planInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询规划对象详细
13
+export function getPlanInfo(planId) {
14
+  return request({
15
+    url: '/info/planInfo/' + planId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增规划对象
21
+export function addPlanInfo(data) {
22
+  return request({
23
+    url: '/info/planInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改规划对象
30
+export function updatePlanInfo(data) {
31
+  return request({
32
+    url: '/info/planInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除规划对象
39
+export function delPlanInfo(planId) {
40
+  return request({
41
+    url: '/info/planInfo/' + planId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出规划对象
47
+export function exportPlanInfo(query) {
48
+  return request({
49
+    url: '/info/planInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/policyInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询政策信息列表
4
+export function listPolicyInfo(query) {
5
+  return request({
6
+    url: '/info/policyInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询政策信息详细
13
+export function getPolicyInfo(policyId) {
14
+  return request({
15
+    url: '/info/policyInfo/' + policyId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增政策信息
21
+export function addPolicyInfo(data) {
22
+  return request({
23
+    url: '/info/policyInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改政策信息
30
+export function updatePolicyInfo(data) {
31
+  return request({
32
+    url: '/info/policyInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除政策信息
39
+export function delPolicyInfo(policyId) {
40
+  return request({
41
+    url: '/info/policyInfo/' + policyId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出政策信息
47
+export function exportPolicyInfo(query) {
48
+  return request({
49
+    url: '/info/policyInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/roomInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询房间信息列表
4
+export function listRoomInfo(query) {
5
+  return request({
6
+    url: '/info/roomInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询房间信息详细
13
+export function getRoomInfo(roomId) {
14
+  return request({
15
+    url: '/info/roomInfo/' + roomId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增房间信息
21
+export function addRoomInfo(data) {
22
+  return request({
23
+    url: '/info/roomInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改房间信息
30
+export function updateRoomInfo(data) {
31
+  return request({
32
+    url: '/info/roomInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除房间信息
39
+export function delRoomInfo(roomId) {
40
+  return request({
41
+    url: '/info/roomInfo/' + roomId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出房间信息
47
+export function exportRoomInfo(query) {
48
+  return request({
49
+    url: '/info/roomInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/stationInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询站点信息列表
4
+export function listStationInfo(query) {
5
+  return request({
6
+    url: '/info/stationInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询站点信息详细
13
+export function getStationInfo(stationId) {
14
+  return request({
15
+    url: '/info/stationInfo/' + stationId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增站点信息
21
+export function addStationInfo(data) {
22
+  return request({
23
+    url: '/info/stationInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改站点信息
30
+export function updateStationInfo(data) {
31
+  return request({
32
+    url: '/info/stationInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除站点信息
39
+export function delStationInfo(stationId) {
40
+  return request({
41
+    url: '/info/stationInfo/' + stationId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出站点信息
47
+export function exportStationInfo(query) {
48
+  return request({
49
+    url: '/info/stationInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/trafficInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询交通对象列表
4
+export function listTrafficInfo(query) {
5
+  return request({
6
+    url: '/info/trafficInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询交通对象详细
13
+export function getTrafficInfo(trafficId) {
14
+  return request({
15
+    url: '/info/trafficInfo/' + trafficId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增交通对象
21
+export function addTrafficInfo(data) {
22
+  return request({
23
+    url: '/info/trafficInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改交通对象
30
+export function updateTrafficInfo(data) {
31
+  return request({
32
+    url: '/info/trafficInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除交通对象
39
+export function delTrafficInfo(trafficId) {
40
+  return request({
41
+    url: '/info/trafficInfo/' + trafficId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出交通对象
47
+export function exportTrafficInfo(query) {
48
+  return request({
49
+    url: '/info/trafficInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/areaType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询区域类型:area_type列表
4
+export function listAreaType(query) {
5
+  return request({
6
+    url: '/type/areaType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询区域类型:area_type详细
13
+export function getAreaType(typeId) {
14
+  return request({
15
+    url: '/type/areaType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增区域类型:area_type
21
+export function addAreaType(data) {
22
+  return request({
23
+    url: '/type/areaType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改区域类型:area_type
30
+export function updateAreaType(data) {
31
+  return request({
32
+    url: '/type/areaType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除区域类型:area_type
39
+export function delAreaType(typeId) {
40
+  return request({
41
+    url: '/type/areaType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出区域类型:area_type
47
+export function exportAreaType(query) {
48
+  return request({
49
+    url: '/type/areaType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/buildingType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询大楼类别:building_type列表
4
+export function listBuildingType(query) {
5
+  return request({
6
+    url: '/type/buildingType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询大楼类别:building_type详细
13
+export function getBuildingType(typeId) {
14
+  return request({
15
+    url: '/type/buildingType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增大楼类别:building_type
21
+export function addBuildingType(data) {
22
+  return request({
23
+    url: '/type/buildingType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改大楼类别:building_type
30
+export function updateBuildingType(data) {
31
+  return request({
32
+    url: '/type/buildingType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除大楼类别:building_type
39
+export function delBuildingType(typeId) {
40
+  return request({
41
+    url: '/type/buildingType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出大楼类别:building_type
47
+export function exportBuildingType(query) {
48
+  return request({
49
+    url: '/type/buildingType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/equipmentType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询设备类型:equipment_type列表
4
+export function listEquipmentType(query) {
5
+  return request({
6
+    url: '/type/equipmentType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询设备类型:equipment_type详细
13
+export function getEquipmentType(typeId) {
14
+  return request({
15
+    url: '/type/equipmentType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增设备类型:equipment_type
21
+export function addEquipmentType(data) {
22
+  return request({
23
+    url: '/type/equipmentType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改设备类型:equipment_type
30
+export function updateEquipmentType(data) {
31
+  return request({
32
+    url: '/type/equipmentType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除设备类型:equipment_type
39
+export function delEquipmentType(typeId) {
40
+  return request({
41
+    url: '/type/equipmentType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出设备类型:equipment_type
47
+export function exportEquipmentType(query) {
48
+  return request({
49
+    url: '/type/equipmentType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/houseType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询户型信息:house_type列表
4
+export function listHouseType(query) {
5
+  return request({
6
+    url: '/type/houseType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询户型信息:house_type详细
13
+export function getHouseType(typeId) {
14
+  return request({
15
+    url: '/type/houseType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增户型信息:house_type
21
+export function addHouseType(data) {
22
+  return request({
23
+    url: '/type/houseType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改户型信息:house_type
30
+export function updateHouseType(data) {
31
+  return request({
32
+    url: '/type/houseType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除户型信息:house_type
39
+export function delHouseType(typeId) {
40
+  return request({
41
+    url: '/type/houseType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出户型信息:house_type
47
+export function exportHouseType(query) {
48
+  return request({
49
+    url: '/type/houseType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/organizationType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询主体类型列表
4
+export function listOrganizationType(query) {
5
+  return request({
6
+    url: '/type/organizationType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询主体类型详细
13
+export function getOrganizationType(typeId) {
14
+  return request({
15
+    url: '/type/organizationType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增主体类型
21
+export function addOrganizationType(data) {
22
+  return request({
23
+    url: '/type/organizationType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改主体类型
30
+export function updateOrganizationType(data) {
31
+  return request({
32
+    url: '/type/organizationType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除主体类型
39
+export function delOrganizationType(typeId) {
40
+  return request({
41
+    url: '/type/organizationType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出主体类型
47
+export function exportOrganizationType(query) {
48
+  return request({
49
+    url: '/type/organizationType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/planType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询规划类型列表
4
+export function listPlanType(query) {
5
+  return request({
6
+    url: '/type/planType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询规划类型详细
13
+export function getPlanType(typeId) {
14
+  return request({
15
+    url: '/type/planType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增规划类型
21
+export function addPlanType(data) {
22
+  return request({
23
+    url: '/type/planType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改规划类型
30
+export function updatePlanType(data) {
31
+  return request({
32
+    url: '/type/planType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除规划类型
39
+export function delPlanType(typeId) {
40
+  return request({
41
+    url: '/type/planType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出规划类型
47
+export function exportPlanType(query) {
48
+  return request({
49
+    url: '/type/planType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/roomType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询房间类别列表
4
+export function listRoomType(query) {
5
+  return request({
6
+    url: '/type/roomType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询房间类别详细
13
+export function getRoomType(typeId) {
14
+  return request({
15
+    url: '/type/roomType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增房间类别
21
+export function addRoomType(data) {
22
+  return request({
23
+    url: '/type/roomType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改房间类别
30
+export function updateRoomType(data) {
31
+  return request({
32
+    url: '/type/roomType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除房间类别
39
+export function delRoomType(typeId) {
40
+  return request({
41
+    url: '/type/roomType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出房间类别
47
+export function exportRoomType(query) {
48
+  return request({
49
+    url: '/type/roomType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/type/trafficType.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询交通类型列表
4
+export function listTrafficType(query) {
5
+  return request({
6
+    url: '/type/trafficType/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询交通类型详细
13
+export function getTrafficType(typeId) {
14
+  return request({
15
+    url: '/type/trafficType/' + typeId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增交通类型
21
+export function addTrafficType(data) {
22
+  return request({
23
+    url: '/type/trafficType',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改交通类型
30
+export function updateTrafficType(data) {
31
+  return request({
32
+    url: '/type/trafficType',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除交通类型
39
+export function delTrafficType(typeId) {
40
+  return request({
41
+    url: '/type/trafficType/' + typeId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出交通类型
47
+export function exportTrafficType(query) {
48
+  return request({
49
+    url: '/type/trafficType/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/view/synthesisAnalyze.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询综合分析列表
4
+export function listSynthesisAnalyze(query) {
5
+  return request({
6
+    url: '/view/synthesisAnalyze/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询综合分析详细
13
+export function getSynthesisAnalyze(id) {
14
+  return request({
15
+    url: '/view/synthesisAnalyze/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增综合分析
21
+export function addSynthesisAnalyze(data) {
22
+  return request({
23
+    url: '/view/synthesisAnalyze',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改综合分析
30
+export function updateSynthesisAnalyze(data) {
31
+  return request({
32
+    url: '/view/synthesisAnalyze',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除综合分析
39
+export function delSynthesisAnalyze(id) {
40
+  return request({
41
+    url: '/view/synthesisAnalyze/' + id,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出综合分析
47
+export function exportSynthesisAnalyze(query) {
48
+  return request({
49
+    url: '/view/synthesisAnalyze/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 3 - 2
src/components/FileUpload/index.vue

@@ -55,12 +55,12 @@ export default {
55 55
     // 大小限制(MB)
56 56
     fileSize: {
57 57
       type: Number,
58
-      default: 5,
58
+      default: 500,
59 59
     },
60 60
     // 文件类型, 例如['png', 'jpg', 'jpeg']
61 61
     fileType: {
62 62
       type: Array,
63
-      default: () => [".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf"],
63
+      default: () => [".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".mp4"],
64 64
     },
65 65
     // 是否显示提示
66 66
     isShowTip: {
@@ -151,6 +151,7 @@ export default {
151 151
     },
152 152
     // 上传成功回调
153 153
     handleUploadSuccess(res, file) {
154
+      this.$emit('fatherMethod', file.name);
154 155
       this.uploadLoading = false
155 156
       this.$message.success("上传成功");
156 157
       this.fileList.push({ name: res.url, url: this.baseUrl + res.url });

+ 3 - 0
src/main.js

@@ -28,6 +28,8 @@ import Pagination from "@/components/Pagination";
28 28
 import RightToolbar from "@/components/RightToolbar"
29 29
 // 富文本组件
30 30
 import WangEditor from "@/components/WangEditor"
31
+// 富文本组件
32
+import Editor from "@/components/Editor"
31 33
 // 文件上传组件
32 34
 import FileUpload from "@/components/FileUpload"
33 35
 // 图片上传组件
@@ -54,6 +56,7 @@ Vue.component('Pagination', Pagination)
54 56
 Vue.component('VideoPlayer', VideoPlayer)
55 57
 Vue.component('RightToolbar', RightToolbar)
56 58
 Vue.component('WangEditor', WangEditor)
59
+Vue.component('Editor', Editor)
57 60
 Vue.component('FileUpload', FileUpload)
58 61
 Vue.component('ImageUpload', ImageUpload)
59 62
 Vue.use(directive)

+ 323 - 0
src/views/info/areaInfo/index.vue

@@ -0,0 +1,323 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别" prop="typeId">
5
+        <template>
6
+          <el-select v-model="queryParams.typeId" filterable placeholder="请选择">
7
+            <el-option
8
+              v-for="item in AreaType"
9
+              :key="item.typeId"
10
+              :label="item.typeName"
11
+              :value="item.typeId">
12
+            </el-option>
13
+          </el-select>
14
+        </template>
15
+      </el-form-item>
16
+      <el-form-item label="名字" prop="areaName">
17
+        <el-input
18
+          v-model="queryParams.areaName"
19
+          placeholder="请输入名字"
20
+          clearable
21
+          size="small"
22
+          @keyup.enter.native="handleQuery"
23
+        />
24
+      </el-form-item>
25
+      <el-form-item>
26
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
27
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
28
+      </el-form-item>
29
+    </el-form>
30
+
31
+    <el-row :gutter="10" class="mb8">
32
+      <el-col :span="1.5">
33
+        <el-button
34
+          type="primary"
35
+          plain
36
+          icon="el-icon-plus"
37
+          size="mini"
38
+          @click="handleAdd"
39
+          v-hasPermi="['info:areaInfo:add']"
40
+        >新增</el-button>
41
+      </el-col>
42
+      <el-col :span="1.5">
43
+        <el-button
44
+          type="success"
45
+          plain
46
+          icon="el-icon-edit"
47
+          size="mini"
48
+          :disabled="single"
49
+          @click="handleUpdate"
50
+          v-hasPermi="['info:areaInfo:edit']"
51
+        >修改</el-button>
52
+      </el-col>
53
+      <el-col :span="1.5">
54
+        <el-button
55
+          type="danger"
56
+          plain
57
+          icon="el-icon-delete"
58
+          size="mini"
59
+          :disabled="multiple"
60
+          @click="handleDelete"
61
+          v-hasPermi="['info:areaInfo:remove']"
62
+        >删除</el-button>
63
+      </el-col>
64
+      <el-col :span="1.5">
65
+        <el-button
66
+          type="warning"
67
+          plain
68
+          icon="el-icon-download"
69
+          size="mini"
70
+          :loading="exportLoading"
71
+          @click="handleExport"
72
+          v-hasPermi="['info:areaInfo:export']"
73
+        >导出</el-button>
74
+      </el-col>
75
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
76
+    </el-row>
77
+
78
+    <el-table v-loading="loading" :data="areaInfoList" @selection-change="handleSelectionChange">
79
+      <el-table-column type="selection" width="55" align="center" />
80
+      <el-table-column label="区域id" align="center" prop="areaId" />
81
+      <el-table-column label="类别" align="center" prop="typeName" />
82
+      <el-table-column label="名字" align="center" prop="areaName" />
83
+      <el-table-column label="颜色" prop="colour">
84
+        <template slot-scope="scope">
85
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
86
+        </template>
87
+      </el-table-column>
88
+      <el-table-column label="面积" align="center" prop="acreage" />
89
+      <el-table-column label="坐标" align="center" prop="location" />
90
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
91
+        <template slot-scope="scope">
92
+          <el-button
93
+            size="mini"
94
+            type="text"
95
+            icon="el-icon-edit"
96
+            @click="handleUpdate(scope.row)"
97
+            v-hasPermi="['info:areaInfo:edit']"
98
+          >修改</el-button>
99
+          <el-button
100
+            size="mini"
101
+            type="text"
102
+            icon="el-icon-delete"
103
+            @click="handleDelete(scope.row)"
104
+            v-hasPermi="['info:areaInfo:remove']"
105
+          >删除</el-button>
106
+        </template>
107
+      </el-table-column>
108
+    </el-table>
109
+
110
+    <pagination
111
+      v-show="total>0"
112
+      :total="total"
113
+      :page.sync="queryParams.pageNum"
114
+      :limit.sync="queryParams.pageSize"
115
+      @pagination="getList"
116
+    />
117
+
118
+    <!-- 添加或修改区域对象对话框 -->
119
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
120
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
121
+        <el-form-item label="类别" prop="typeId">
122
+          <template>
123
+            <el-select v-model="form.typeId" filterable placeholder="请选择">
124
+              <el-option
125
+                v-for="item in AreaType"
126
+                :key="item.typeId"
127
+                :label="item.typeName"
128
+                :value="item.typeId">
129
+              </el-option>
130
+            </el-select>
131
+          </template>
132
+        </el-form-item>
133
+        <el-form-item label="名字" prop="areaName">
134
+          <el-input v-model="form.areaName" placeholder="请输入名字" />
135
+        </el-form-item>
136
+        <el-form-item label="备注" prop="memo">
137
+          <el-input v-model="form.memo" placeholder="请输入备注" />
138
+        </el-form-item>
139
+        <el-form-item label="颜色">
140
+          <el-color-picker v-model="form.colour"></el-color-picker>
141
+        </el-form-item>
142
+        <el-form-item label="面积" prop="acreage">
143
+          <el-input-number v-model="form.acreage" controls-position="right"   :min="0" placeholder="请输入面积" />
144
+        </el-form-item>
145
+
146
+        <el-form-item label="坐标" prop="location">
147
+          <el-input v-model="form.location" placeholder="请输入坐标" />
148
+        </el-form-item>
149
+      </el-form>
150
+      <div slot="footer" class="dialog-footer">
151
+        <el-button type="primary" @click="submitForm">确 定</el-button>
152
+        <el-button @click="cancel">取 消</el-button>
153
+      </div>
154
+    </el-dialog>
155
+  </div>
156
+</template>
157
+
158
+<script>
159
+import { listAreaInfo, getAreaInfo, delAreaInfo, addAreaInfo, updateAreaInfo, exportAreaInfo } from "@/api/info/areaInfo";
160
+import { listAreaType, getAreaType } from "@/api/type/areaType";
161
+export default {
162
+  name: "AreaInfo",
163
+  data() {
164
+    return {
165
+      AreaType: [],
166
+      // 遮罩层
167
+      loading: true,
168
+      // 导出遮罩层
169
+      exportLoading: false,
170
+      // 选中数组
171
+      ids: [],
172
+      // 非单个禁用
173
+      single: true,
174
+      // 非多个禁用
175
+      multiple: true,
176
+      // 显示搜索条件
177
+      showSearch: true,
178
+      // 总条数
179
+      total: 0,
180
+      // 区域对象表格数据
181
+      areaInfoList: [],
182
+      // 弹出层标题
183
+      title: "",
184
+      // 是否显示弹出层
185
+      open: false,
186
+      // 查询参数
187
+      queryParams: {
188
+        pageNum: 1,
189
+        pageSize: 10,
190
+        typeId: null,
191
+        areaName: null,
192
+      },
193
+      queryAreaTypeParams: {
194
+        pageNum: 1,
195
+        pageSize: 10,
196
+      },
197
+      // 表单参数
198
+      form: {},
199
+      // 表单校验
200
+      rules: {
201
+        areaId: [
202
+          { required: true, message: "区域id不能为空", trigger: "blur" }
203
+        ],
204
+        typeId: [
205
+          { required: true, message: "类别不能为空", trigger: "change" }
206
+        ],
207
+      }
208
+    };
209
+  },
210
+  created() {
211
+    this.getList();
212
+    this.getAreaType();
213
+  },
214
+  methods: {
215
+    getAreaType() {
216
+      listAreaType(this.queryAreaTypeParams).then(response => {
217
+        this.AreaType = response.data.list;
218
+      });
219
+    },
220
+
221
+    /** 查询区域对象列表 */
222
+    getList() {
223
+      this.loading = true;
224
+      listAreaInfo(this.queryParams).then(response => {
225
+        this.areaInfoList = response.data.list;
226
+        this.total = response.data.total;
227
+        this.loading = false;
228
+      });
229
+    },
230
+    // 取消按钮
231
+    cancel() {
232
+      this.open = false;
233
+      this.reset();
234
+    },
235
+    // 表单重置
236
+    reset() {
237
+      this.form = {
238
+        areaId: null,
239
+        typeId: null,
240
+        areaName: null,
241
+        memo: null,
242
+        colour: null,
243
+        acreage: null,
244
+        location: null
245
+      };
246
+      this.resetForm("form");
247
+    },
248
+    /** 搜索按钮操作 */
249
+    handleQuery() {
250
+      this.queryParams.pageNum = 1;
251
+      this.getList();
252
+    },
253
+    /** 重置按钮操作 */
254
+    resetQuery() {
255
+      this.resetForm("queryForm");
256
+      this.handleQuery();
257
+    },
258
+    // 多选框选中数据
259
+    handleSelectionChange(selection) {
260
+      this.ids = selection.map(item => item.areaId)
261
+      this.single = selection.length!==1
262
+      this.multiple = !selection.length
263
+    },
264
+    /** 新增按钮操作 */
265
+    handleAdd() {
266
+      this.reset();
267
+      this.open = true;
268
+      this.title = "添加区域对象";
269
+    },
270
+    /** 修改按钮操作 */
271
+    handleUpdate(row) {
272
+      this.reset();
273
+      const areaId = row.areaId || this.ids
274
+      getAreaInfo(areaId).then(response => {
275
+        this.form = response.data;
276
+        this.open = true;
277
+        this.title = "修改区域对象";
278
+      });
279
+    },
280
+    /** 提交按钮 */
281
+    submitForm() {
282
+      this.$refs["form"].validate(valid => {
283
+        if (valid) {
284
+          if (this.form.areaId != null) {
285
+            updateAreaInfo(this.form).then(response => {
286
+              this.$modal.msgSuccess("修改成功");
287
+              this.open = false;
288
+              this.getList();
289
+            });
290
+          } else {
291
+            addAreaInfo(this.form).then(response => {
292
+              this.$modal.msgSuccess("新增成功");
293
+              this.open = false;
294
+              this.getList();
295
+            });
296
+          }
297
+        }
298
+      });
299
+    },
300
+    /** 删除按钮操作 */
301
+    handleDelete(row) {
302
+      const areaIds = row.areaId || this.ids;
303
+      this.$modal.confirm('是否确认删除区域对象编号为"' + areaIds + '"的数据项?').then(function() {
304
+        return delAreaInfo(areaIds);
305
+      }).then(() => {
306
+        this.getList();
307
+        this.$modal.msgSuccess("删除成功");
308
+      }).catch(() => {});
309
+    },
310
+    /** 导出按钮操作 */
311
+    handleExport() {
312
+      const queryParams = this.queryParams;
313
+      this.$modal.confirm('是否确认导出所有区域对象数据项?').then(() => {
314
+        this.exportLoading = true;
315
+        return exportAreaInfo(queryParams);
316
+      }).then(response => {
317
+        this.$download.name(response.msg);
318
+        this.exportLoading = false;
319
+      }).catch(() => {});
320
+    }
321
+  }
322
+};
323
+</script>

+ 363 - 0
src/views/info/buildingInfo/index.vue

@@ -0,0 +1,363 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类型" prop="typeId">
5
+        <template>
6
+          <el-select v-model="queryParams.typeId" filterable placeholder="请选择">
7
+            <el-option
8
+              v-for="item in buildingTypeList"
9
+              :key="item.typeId"
10
+              :label="item.typeName"
11
+              :value="item.typeId">
12
+            </el-option>
13
+          </el-select>
14
+        </template>
15
+      </el-form-item>
16
+      <el-form-item label="大楼名称" prop="buildingName">
17
+        <el-input
18
+          v-model="queryParams.buildingName"
19
+          placeholder="请输入大楼名称"
20
+          clearable
21
+          size="small"
22
+          @keyup.enter.native="handleQuery"
23
+        />
24
+      </el-form-item>
25
+      <el-form-item>
26
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
27
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
28
+      </el-form-item>
29
+    </el-form>
30
+
31
+    <el-row :gutter="10" class="mb8">
32
+      <el-col :span="1.5">
33
+        <el-button
34
+          type="primary"
35
+          plain
36
+          icon="el-icon-plus"
37
+          size="mini"
38
+          @click="handleAdd"
39
+          v-hasPermi="['info:buildingInfo:add']"
40
+        >新增</el-button>
41
+      </el-col>
42
+      <el-col :span="1.5">
43
+        <el-button
44
+          type="success"
45
+          plain
46
+          icon="el-icon-edit"
47
+          size="mini"
48
+          :disabled="single"
49
+          @click="handleUpdate"
50
+          v-hasPermi="['info:buildingInfo:edit']"
51
+        >修改</el-button>
52
+      </el-col>
53
+      <el-col :span="1.5">
54
+        <el-button
55
+          type="danger"
56
+          plain
57
+          icon="el-icon-delete"
58
+          size="mini"
59
+          :disabled="multiple"
60
+          @click="handleDelete"
61
+          v-hasPermi="['info:buildingInfo:remove']"
62
+        >删除</el-button>
63
+      </el-col>
64
+      <el-col :span="1.5">
65
+        <el-button
66
+          type="warning"
67
+          plain
68
+          icon="el-icon-download"
69
+          size="mini"
70
+          :loading="exportLoading"
71
+          @click="handleExport"
72
+          v-hasPermi="['info:buildingInfo:export']"
73
+        >导出</el-button>
74
+      </el-col>
75
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
76
+    </el-row>
77
+
78
+    <el-table v-loading="loading" :data="buildingInfoList" @selection-change="handleSelectionChange">
79
+      <el-table-column type="selection" width="55" align="center" />
80
+      <el-table-column label="大楼编号" align="center" prop="buildingId" />
81
+      <el-table-column label="类型" align="center" prop="typeName" />
82
+      <el-table-column label="大楼名称" align="center" prop="buildingName" />
83
+      <el-table-column label="二维坐标" align="center" prop="lngLat" />
84
+      <el-table-column label="三维坐标" align="center" prop="rasterLngLat" />
85
+      <el-table-column label="户数" align="center" prop="households" />
86
+      <el-table-column label="面积" align="center" prop="acreage" />
87
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
88
+        <template slot-scope="scope">
89
+          <el-button
90
+            size="mini"
91
+            type="text"
92
+            icon="el-icon-edit"
93
+            @click="handleUpdate(scope.row)"
94
+            v-hasPermi="['info:buildingInfo:edit']"
95
+          >修改</el-button>
96
+          <el-button
97
+            size="mini"
98
+            type="text"
99
+            icon="el-icon-delete"
100
+            @click="handleDelete(scope.row)"
101
+            v-hasPermi="['info:buildingInfo:remove']"
102
+          >删除</el-button>
103
+        </template>
104
+      </el-table-column>
105
+    </el-table>
106
+
107
+    <pagination
108
+      v-show="total>0"
109
+      :total="total"
110
+      :page.sync="queryParams.pageNum"
111
+      :limit.sync="queryParams.pageSize"
112
+      @pagination="getList"
113
+    />
114
+
115
+    <!-- 添加或修改大楼信息对话框 -->
116
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
117
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
118
+        <el-form-item label="类型" prop="typeId">
119
+          <template>
120
+            <el-select v-model="form.typeId" filterable placeholder="请选择">
121
+              <el-option
122
+                v-for="item in buildingTypeList"
123
+                :key="item.typeId"
124
+                :label="item.typeName"
125
+                :value="item.typeId">
126
+              </el-option>
127
+            </el-select>
128
+          </template>
129
+        </el-form-item>
130
+        <el-form-item label="大楼名称" prop="buildingName">
131
+          <el-input v-model="form.buildingName" placeholder="请输入大楼名称" />
132
+        </el-form-item>
133
+        <el-form-item label="地图编码" prop="mapCode">
134
+          <el-input-number v-model="form.mapCode" controls-position="right"   :min="0" placeholder="请输入地图编码" />
135
+        </el-form-item>
136
+
137
+        <el-form-item label="英文名称" prop="enName">
138
+          <el-input v-model="form.enName" placeholder="请输入英文名称" />
139
+        </el-form-item>
140
+        <el-form-item label="别名" prop="alias">
141
+          <el-input v-model="form.alias" placeholder="请输入别名" />
142
+        </el-form-item>
143
+        <el-form-item label="排序" prop="orderId">
144
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
145
+        </el-form-item>
146
+
147
+        <el-form-item label="是否已同步">
148
+          <el-switch v-model="form.synStatus"></el-switch>
149
+        </el-form-item>
150
+        <el-form-item label="简介" prop="brief">
151
+          <el-input v-model="form.brief" placeholder="请输入简介" />
152
+        </el-form-item>
153
+        <el-form-item label="二维坐标" prop="lngLat">
154
+          <el-input v-model="form.lngLat" placeholder="请输入二维坐标" />
155
+        </el-form-item>
156
+        <el-form-item label="备注" prop="memo">
157
+          <el-input v-model="form.memo" placeholder="请输入备注" />
158
+        </el-form-item>
159
+        <el-form-item label="三维坐标" prop="rasterLngLat">
160
+          <el-input v-model="form.rasterLngLat" placeholder="请输入三维坐标" />
161
+        </el-form-item>
162
+        <el-form-item label="地址" prop="address">
163
+          <el-input v-model="form.address" placeholder="请输入地址" />
164
+        </el-form-item>
165
+        <el-form-item label="高度" prop="height">
166
+          <el-input-number v-model="form.height" controls-position="right"   :min="0" placeholder="请输入高度" />
167
+        </el-form-item>
168
+
169
+        <el-form-item label="楼层数" prop="levelNumber">
170
+          <el-input-number v-model="form.levelNumber" controls-position="right"   :min="0" placeholder="请输入楼层数" />
171
+        </el-form-item>
172
+
173
+        <el-form-item label="户数" prop="households">
174
+          <el-input-number v-model="form.households" controls-position="right"   :min="0" placeholder="请输入户数" />
175
+        </el-form-item>
176
+
177
+        <el-form-item label="面积" prop="acreage">
178
+          <el-input-number v-model="form.acreage" controls-position="right"   :min="0" placeholder="请输入面积" />
179
+        </el-form-item>
180
+
181
+      </el-form>
182
+      <div slot="footer" class="dialog-footer">
183
+        <el-button type="primary" @click="submitForm">确 定</el-button>
184
+        <el-button @click="cancel">取 消</el-button>
185
+      </div>
186
+    </el-dialog>
187
+  </div>
188
+</template>
189
+
190
+<script>
191
+import { listBuildingInfo, getBuildingInfo, delBuildingInfo, addBuildingInfo, updateBuildingInfo, exportBuildingInfo } from "@/api/info/buildingInfo";
192
+import { listBuildingType, getBuildingType } from "@/api/type/buildingType";
193
+export default {
194
+  name: "BuildingInfo",
195
+  data() {
196
+    return {
197
+      buildingTypeList: [],
198
+      // 遮罩层
199
+      loading: true,
200
+      // 导出遮罩层
201
+      exportLoading: false,
202
+      // 选中数组
203
+      ids: [],
204
+      // 非单个禁用
205
+      single: true,
206
+      // 非多个禁用
207
+      multiple: true,
208
+      // 显示搜索条件
209
+      showSearch: true,
210
+      // 总条数
211
+      total: 0,
212
+      // 大楼信息表格数据
213
+      buildingInfoList: [],
214
+      // 弹出层标题
215
+      title: "",
216
+      // 是否显示弹出层
217
+      open: false,
218
+      // 查询参数
219
+      queryParams: {
220
+        pageNum: 1,
221
+        pageSize: 10,
222
+        typeId: null,
223
+        buildingName: null,
224
+      },
225
+      queryBuildingTypeParams: {
226
+        pageNum: 1,
227
+        pageSize: 9999,
228
+      },
229
+      // 表单参数
230
+      form: {},
231
+      // 表单校验
232
+      rules: {
233
+        buildingId: [
234
+          { required: true, message: "大楼编号不能为空", trigger: "blur" }
235
+        ],
236
+      }
237
+    };
238
+  },
239
+  created() {
240
+    this.getList();
241
+    this.getBuildingTypeList();
242
+  },
243
+  methods: {
244
+
245
+    getBuildingTypeList() {
246
+      listBuildingType(this.queryBuildingTypeParams).then(response => {
247
+      this.buildingTypeList = response.data.list;
248
+      });
249
+    },
250
+    /** 查询大楼信息列表 */
251
+    getList() {
252
+      this.loading = true;
253
+      listBuildingInfo(this.queryParams).then(response => {
254
+        this.buildingInfoList = response.data.list;
255
+        this.total = response.data.total;
256
+        this.loading = false;
257
+      });
258
+    },
259
+    // 取消按钮
260
+    cancel() {
261
+      this.open = false;
262
+      this.reset();
263
+    },
264
+    // 表单重置
265
+    reset() {
266
+      this.form = {
267
+        buildingId: null,
268
+        typeId: null,
269
+        buildingName: null,
270
+        mapCode: null,
271
+        enName: null,
272
+        alias: null,
273
+        orderId: null,
274
+        synStatus: true,
275
+        delete: true,
276
+        brief: null,
277
+        lngLat: null,
278
+        memo: null,
279
+        rasterLngLat: null,
280
+        address: null,
281
+        height: null,
282
+        levelNumber: null,
283
+        households: null,
284
+        acreage: null
285
+      };
286
+      this.resetForm("form");
287
+    },
288
+    /** 搜索按钮操作 */
289
+    handleQuery() {
290
+      this.queryParams.pageNum = 1;
291
+      this.getList();
292
+    },
293
+    /** 重置按钮操作 */
294
+    resetQuery() {
295
+      this.resetForm("queryForm");
296
+      this.handleQuery();
297
+    },
298
+    // 多选框选中数据
299
+    handleSelectionChange(selection) {
300
+      this.ids = selection.map(item => item.buildingId)
301
+      this.single = selection.length!==1
302
+      this.multiple = !selection.length
303
+    },
304
+    /** 新增按钮操作 */
305
+    handleAdd() {
306
+      this.reset();
307
+      this.open = true;
308
+      this.title = "添加大楼信息";
309
+    },
310
+    /** 修改按钮操作 */
311
+    handleUpdate(row) {
312
+      this.reset();
313
+      const buildingId = row.buildingId || this.ids
314
+      getBuildingInfo(buildingId).then(response => {
315
+        this.form = response.data;
316
+        this.open = true;
317
+        this.title = "修改大楼信息";
318
+      });
319
+    },
320
+    /** 提交按钮 */
321
+    submitForm() {
322
+      this.$refs["form"].validate(valid => {
323
+        if (valid) {
324
+          if (this.form.buildingId != null) {
325
+            updateBuildingInfo(this.form).then(response => {
326
+              this.$modal.msgSuccess("修改成功");
327
+              this.open = false;
328
+              this.getList();
329
+            });
330
+          } else {
331
+            addBuildingInfo(this.form).then(response => {
332
+              this.$modal.msgSuccess("新增成功");
333
+              this.open = false;
334
+              this.getList();
335
+            });
336
+          }
337
+        }
338
+      });
339
+    },
340
+    /** 删除按钮操作 */
341
+    handleDelete(row) {
342
+      const buildingIds = row.buildingId || this.ids;
343
+      this.$modal.confirm('是否确认删除大楼信息编号为"' + buildingIds + '"的数据项?').then(function() {
344
+        return delBuildingInfo(buildingIds);
345
+      }).then(() => {
346
+        this.getList();
347
+        this.$modal.msgSuccess("删除成功");
348
+      }).catch(() => {});
349
+    },
350
+    /** 导出按钮操作 */
351
+    handleExport() {
352
+      const queryParams = this.queryParams;
353
+      this.$modal.confirm('是否确认导出所有大楼信息数据项?').then(() => {
354
+        this.exportLoading = true;
355
+        return exportBuildingInfo(queryParams);
356
+      }).then(response => {
357
+        this.$download.name(response.msg);
358
+        this.exportLoading = false;
359
+      }).catch(() => {});
360
+    }
361
+  }
362
+};
363
+</script>

+ 356 - 0
src/views/info/elevatorInfo/index.vue

@@ -0,0 +1,356 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="电梯型号" prop="elevatorCode">
5
+        <el-input
6
+          v-model="queryParams.elevatorCode"
7
+          placeholder="请输入电梯型号"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item label="大楼" prop="buildingId">
14
+        <template>
15
+          <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
16
+            <el-option
17
+              v-for="item in buildingList"
18
+              :key="item.buildingId"
19
+              :label="item.buildingName"
20
+              :value="item.buildingId">
21
+            </el-option>
22
+          </el-select>
23
+        </template>
24
+      </el-form-item>
25
+      <el-form-item label="电梯状态" prop="status">
26
+        <el-select v-model="queryParams.status" placeholder="请选择电梯状态" clearable size="small">
27
+          <el-option
28
+            v-for="dict in dict.type.elevator_info_status"
29
+            :key="dict.value"
30
+            :label="dict.label"
31
+            :value="dict.value"
32
+          />
33
+        </el-select>
34
+      </el-form-item>
35
+      <el-form-item label="电梯名字" prop="elevatorName">
36
+        <el-input
37
+          v-model="queryParams.elevatorName"
38
+          placeholder="请输入电梯名字"
39
+          clearable
40
+          size="small"
41
+          @keyup.enter.native="handleQuery"
42
+        />
43
+      </el-form-item>
44
+      <el-form-item>
45
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
46
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
47
+      </el-form-item>
48
+    </el-form>
49
+
50
+    <el-row :gutter="10" class="mb8">
51
+      <el-col :span="1.5">
52
+        <el-button
53
+          type="primary"
54
+          plain
55
+          icon="el-icon-plus"
56
+          size="mini"
57
+          @click="handleAdd"
58
+          v-hasPermi="['info:elevatorInfo:add']"
59
+        >新增</el-button>
60
+      </el-col>
61
+      <el-col :span="1.5">
62
+        <el-button
63
+          type="success"
64
+          plain
65
+          icon="el-icon-edit"
66
+          size="mini"
67
+          :disabled="single"
68
+          @click="handleUpdate"
69
+          v-hasPermi="['info:elevatorInfo:edit']"
70
+        >修改</el-button>
71
+      </el-col>
72
+      <el-col :span="1.5">
73
+        <el-button
74
+          type="danger"
75
+          plain
76
+          icon="el-icon-delete"
77
+          size="mini"
78
+          :disabled="multiple"
79
+          @click="handleDelete"
80
+          v-hasPermi="['info:elevatorInfo:remove']"
81
+        >删除</el-button>
82
+      </el-col>
83
+      <el-col :span="1.5">
84
+        <el-button
85
+          type="warning"
86
+          plain
87
+          icon="el-icon-download"
88
+          size="mini"
89
+          :loading="exportLoading"
90
+          @click="handleExport"
91
+          v-hasPermi="['info:elevatorInfo:export']"
92
+        >导出</el-button>
93
+      </el-col>
94
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
95
+    </el-row>
96
+
97
+    <el-table v-loading="loading" :data="elevatorInfoList" @selection-change="handleSelectionChange">
98
+      <el-table-column type="selection" width="55" align="center" />
99
+      <el-table-column label="电梯" align="center" prop="elevatorId" />
100
+      <el-table-column label="电梯型号" align="center" prop="elevatorCode" />
101
+      <el-table-column label="大楼名称" align="center">
102
+        <template slot-scope="scope">
103
+          {{ getBuildingName(scope.row.buildingId) }}
104
+        </template>
105
+      </el-table-column>
106
+      <el-table-column label="电梯状态" align="center" prop="status">
107
+        <template slot-scope="scope">
108
+          <dict-tag :options="dict.type.elevator_info_status" :value="scope.row.status"/>
109
+        </template>
110
+      </el-table-column>
111
+      <el-table-column label="电梯名字" align="center" prop="elevatorName" />
112
+      <el-table-column label="保养次数" align="center" prop="upkeepNum" />
113
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
114
+        <template slot-scope="scope">
115
+          <el-button
116
+            size="mini"
117
+            type="text"
118
+            icon="el-icon-edit"
119
+            @click="handleUpdate(scope.row)"
120
+            v-hasPermi="['info:elevatorInfo:edit']"
121
+          >修改</el-button>
122
+          <el-button
123
+            size="mini"
124
+            type="text"
125
+            icon="el-icon-delete"
126
+            @click="handleDelete(scope.row)"
127
+            v-hasPermi="['info:elevatorInfo:remove']"
128
+          >删除</el-button>
129
+        </template>
130
+      </el-table-column>
131
+    </el-table>
132
+
133
+    <pagination
134
+      v-show="total>0"
135
+      :total="total"
136
+      :page.sync="queryParams.pageNum"
137
+      :limit.sync="queryParams.pageSize"
138
+      @pagination="getList"
139
+    />
140
+
141
+    <!-- 添加或修改电梯信息对话框 -->
142
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
143
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
144
+        <el-form-item label="电梯型号" prop="elevatorCode">
145
+          <el-input v-model="form.elevatorCode" placeholder="请输入电梯型号" />
146
+        </el-form-item>
147
+        <el-form-item label="大楼" prop="buildingId">
148
+          <template>
149
+            <el-select v-model="form.buildingId" filterable placeholder="请选择">
150
+              <el-option
151
+                v-for="item in buildingList"
152
+                :key="item.buildingId"
153
+                :label="item.buildingName"
154
+                :value="item.buildingId">
155
+              </el-option>
156
+            </el-select>
157
+          </template>
158
+        </el-form-item>
159
+        <el-form-item label="电梯状态" prop="status">
160
+          <el-select v-model="form.status" placeholder="请选择电梯状态">
161
+            <el-option
162
+              v-for="dict in dict.type.elevator_info_status"
163
+              :key="dict.value"
164
+              :label="dict.label"
165
+              :value="parseInt(dict.value)"
166
+            ></el-option>
167
+          </el-select>
168
+        </el-form-item>
169
+        <el-form-item label="电梯名字" prop="elevatorName">
170
+          <el-input v-model="form.elevatorName" placeholder="请输入电梯名字" />
171
+        </el-form-item>
172
+        <el-form-item label="保养次数" prop="upkeepNum">
173
+          <el-input-number v-model="form.upkeepNum" controls-position="right"   :min="0" placeholder="请输入保养次数" />
174
+        </el-form-item>
175
+
176
+      </el-form>
177
+      <div slot="footer" class="dialog-footer">
178
+        <el-button type="primary" @click="submitForm">确 定</el-button>
179
+        <el-button @click="cancel">取 消</el-button>
180
+      </div>
181
+    </el-dialog>
182
+  </div>
183
+</template>
184
+
185
+<script>
186
+import { listElevatorInfo, getElevatorInfo, delElevatorInfo, addElevatorInfo, updateElevatorInfo, exportElevatorInfo } from "@/api/info/elevatorInfo";
187
+import { listBuildingInfo, getBuildingInfo } from "@/api/info/buildingInfo";
188
+export default {
189
+  name: "ElevatorInfo",
190
+  dicts: ['elevator_info_status'],
191
+  data() {
192
+    return {
193
+      buildingList: [],
194
+      // 遮罩层
195
+      loading: true,
196
+      // 导出遮罩层
197
+      exportLoading: false,
198
+      // 选中数组
199
+      ids: [],
200
+      // 非单个禁用
201
+      single: true,
202
+      // 非多个禁用
203
+      multiple: true,
204
+      // 显示搜索条件
205
+      showSearch: true,
206
+      // 总条数
207
+      total: 0,
208
+      // 电梯信息表格数据
209
+      elevatorInfoList: [],
210
+      // 弹出层标题
211
+      title: "",
212
+      // 是否显示弹出层
213
+      open: false,
214
+      // 查询参数
215
+      queryParams: {
216
+        pageNum: 1,
217
+        pageSize: 10,
218
+        elevatorCode: null,
219
+        buildingId: null,
220
+        status: null,
221
+        elevatorName: null,
222
+      },
223
+      queryBuildingParams: {
224
+        pageNum: 1,
225
+        pageSize: 999999,
226
+      },
227
+      // 表单参数
228
+      form: {},
229
+      // 表单校验
230
+      rules: {
231
+        elevatorId: [
232
+          { required: true, message: "电梯id不能为空", trigger: "blur" }
233
+        ],
234
+      }
235
+    };
236
+  },
237
+  created() {
238
+    this.getList();
239
+    this.getBuilding();
240
+  },
241
+  methods: {
242
+
243
+    getBuildingName(buildingId) {
244
+      const building = this.buildingList.find(b => b.buildingId === buildingId);
245
+      return building ? building.buildingName : '未知';
246
+    },
247
+
248
+
249
+    getBuilding() {
250
+      listBuildingInfo(this.queryBuildingParams).then(response => {
251
+        this.buildingList = response.data.list;
252
+      });
253
+    },
254
+
255
+    /** 查询电梯信息列表 */
256
+    getList() {
257
+      this.loading = true;
258
+      listElevatorInfo(this.queryParams).then(response => {
259
+        this.elevatorInfoList = response.data.list;
260
+        this.total = response.data.total;
261
+        this.loading = false;
262
+      });
263
+    },
264
+    // 取消按钮
265
+    cancel() {
266
+      this.open = false;
267
+      this.reset();
268
+    },
269
+    // 表单重置
270
+    reset() {
271
+      this.form = {
272
+        elevatorId: null,
273
+        elevatorCode: null,
274
+        buildingId: null,
275
+        status: null,
276
+        elevatorName: null,
277
+        upkeepNum: null
278
+      };
279
+      this.resetForm("form");
280
+    },
281
+    /** 搜索按钮操作 */
282
+    handleQuery() {
283
+      this.queryParams.pageNum = 1;
284
+      this.getList();
285
+    },
286
+    /** 重置按钮操作 */
287
+    resetQuery() {
288
+      this.resetForm("queryForm");
289
+      this.handleQuery();
290
+    },
291
+    // 多选框选中数据
292
+    handleSelectionChange(selection) {
293
+      this.ids = selection.map(item => item.elevatorId)
294
+      this.single = selection.length!==1
295
+      this.multiple = !selection.length
296
+    },
297
+    /** 新增按钮操作 */
298
+    handleAdd() {
299
+      this.reset();
300
+      this.open = true;
301
+      this.title = "添加电梯信息";
302
+    },
303
+    /** 修改按钮操作 */
304
+    handleUpdate(row) {
305
+      this.reset();
306
+      const elevatorId = row.elevatorId || this.ids
307
+      getElevatorInfo(elevatorId).then(response => {
308
+        this.form = response.data;
309
+        this.open = true;
310
+        this.title = "修改电梯信息";
311
+      });
312
+    },
313
+    /** 提交按钮 */
314
+    submitForm() {
315
+      this.$refs["form"].validate(valid => {
316
+        if (valid) {
317
+          if (this.form.elevatorId != null) {
318
+            updateElevatorInfo(this.form).then(response => {
319
+              this.$modal.msgSuccess("修改成功");
320
+              this.open = false;
321
+              this.getList();
322
+            });
323
+          } else {
324
+            addElevatorInfo(this.form).then(response => {
325
+              this.$modal.msgSuccess("新增成功");
326
+              this.open = false;
327
+              this.getList();
328
+            });
329
+          }
330
+        }
331
+      });
332
+    },
333
+    /** 删除按钮操作 */
334
+    handleDelete(row) {
335
+      const elevatorIds = row.elevatorId || this.ids;
336
+      this.$modal.confirm('是否确认删除电梯信息编号为"' + elevatorIds + '"的数据项?').then(function() {
337
+        return delElevatorInfo(elevatorIds);
338
+      }).then(() => {
339
+        this.getList();
340
+        this.$modal.msgSuccess("删除成功");
341
+      }).catch(() => {});
342
+    },
343
+    /** 导出按钮操作 */
344
+    handleExport() {
345
+      const queryParams = this.queryParams;
346
+      this.$modal.confirm('是否确认导出所有电梯信息数据项?').then(() => {
347
+        this.exportLoading = true;
348
+        return exportElevatorInfo(queryParams);
349
+      }).then(response => {
350
+        this.$download.name(response.msg);
351
+        this.exportLoading = false;
352
+      }).catch(() => {});
353
+    }
354
+  }
355
+};
356
+</script>

+ 500 - 0
src/views/info/equipmentInfo/index.vue

@@ -0,0 +1,500 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="房间" prop="roomId">
5
+        <template>
6
+          <el-select v-model="queryParams.roomId" filterable placeholder="请选择">
7
+            <el-option
8
+              v-for="item in roomList"
9
+              :key="item.roomId"
10
+              :label="item.roomName"
11
+              :value="item.roomId">
12
+            </el-option>
13
+          </el-select>
14
+        </template>
15
+      </el-form-item>
16
+      <el-form-item label="大楼" prop="buildingId">
17
+        <template>
18
+          <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
19
+            <el-option
20
+              v-for="item in buildingList"
21
+              :key="item.buildingId"
22
+              :label="item.buildingName"
23
+              :value="item.buildingId">
24
+            </el-option>
25
+          </el-select>
26
+        </template>
27
+      </el-form-item>
28
+      <el-form-item label="区域" prop="areaId">
29
+        <template>
30
+          <el-select v-model="queryParams.areaId" filterable placeholder="请选择">
31
+            <el-option
32
+              v-for="item in areaList"
33
+              :key="item.areaId"
34
+              :label="item.areaName"
35
+              :value="item.areaId">
36
+            </el-option>
37
+          </el-select>
38
+        </template>
39
+      </el-form-item>
40
+      <el-form-item label="名称" prop="equipmentName">
41
+        <el-input
42
+          v-model="queryParams.equipmentName"
43
+          placeholder="请输入名称"
44
+          clearable
45
+          size="small"
46
+          @keyup.enter.native="handleQuery"
47
+        />
48
+      </el-form-item>
49
+      <el-form-item label="二维坐标" prop="lngLat">
50
+        <el-input
51
+          v-model="queryParams.lngLat"
52
+          placeholder="请输入二维坐标"
53
+          clearable
54
+          size="small"
55
+          @keyup.enter.native="handleQuery"
56
+        />
57
+      </el-form-item>
58
+      <el-form-item label="三维坐标" prop="rasterLngLat">
59
+        <el-input
60
+          v-model="queryParams.rasterLngLat"
61
+          placeholder="请输入三维坐标"
62
+          clearable
63
+          size="small"
64
+          @keyup.enter.native="handleQuery"
65
+        />
66
+      </el-form-item>
67
+      <el-form-item label="类型" prop="typeName">
68
+        <template>
69
+          <el-select v-model="queryParams.typeId" filterable placeholder="请选择">
70
+            <el-option
71
+              v-for="item in equipmentTypeList"
72
+              :key="item.typeId"
73
+              :label="item.typeName"
74
+              :value="item.typeId">
75
+            </el-option>
76
+          </el-select>
77
+        </template>
78
+      </el-form-item>
79
+      <el-form-item label="状态" prop="status">
80
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
81
+          <el-option
82
+            v-for="dict in dict.type.equipment_info_type"
83
+            :key="dict.value"
84
+            :label="dict.label"
85
+            :value="dict.value"
86
+          />
87
+        </el-select>
88
+      </el-form-item>
89
+      <el-form-item>
90
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
91
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
92
+      </el-form-item>
93
+    </el-form>
94
+
95
+    <el-row :gutter="10" class="mb8">
96
+      <el-col :span="1.5">
97
+        <el-button
98
+          type="primary"
99
+          plain
100
+          icon="el-icon-plus"
101
+          size="mini"
102
+          @click="handleAdd"
103
+          v-hasPermi="['info:equipmentInfo:add']"
104
+        >新增</el-button>
105
+      </el-col>
106
+      <el-col :span="1.5">
107
+        <el-button
108
+          type="success"
109
+          plain
110
+          icon="el-icon-edit"
111
+          size="mini"
112
+          :disabled="single"
113
+          @click="handleUpdate"
114
+          v-hasPermi="['info:equipmentInfo:edit']"
115
+        >修改</el-button>
116
+      </el-col>
117
+      <el-col :span="1.5">
118
+        <el-button
119
+          type="danger"
120
+          plain
121
+          icon="el-icon-delete"
122
+          size="mini"
123
+          :disabled="multiple"
124
+          @click="handleDelete"
125
+          v-hasPermi="['info:equipmentInfo:remove']"
126
+        >删除</el-button>
127
+      </el-col>
128
+      <el-col :span="1.5">
129
+        <el-button
130
+          type="warning"
131
+          plain
132
+          icon="el-icon-download"
133
+          size="mini"
134
+          :loading="exportLoading"
135
+          @click="handleExport"
136
+          v-hasPermi="['info:equipmentInfo:export']"
137
+        >导出</el-button>
138
+      </el-col>
139
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
140
+    </el-row>
141
+
142
+    <el-table v-loading="loading" :data="equipmentInfoList" @selection-change="handleSelectionChange">
143
+      <el-table-column type="selection" width="55" align="center" />
144
+      <el-table-column label="设备id" align="center" prop="equipmentId" />
145
+      <el-table-column label="房间" align="center">
146
+        <template slot-scope="scope">
147
+          {{ getRoomName(scope.row.roomId) }}
148
+        </template>
149
+      </el-table-column>
150
+      <el-table-column label="大楼" align="center">
151
+        <template slot-scope="scope">
152
+          {{ getBuildingName(scope.row.buildingId) }}
153
+        </template>
154
+      </el-table-column>
155
+      <el-table-column label="区域" align="center">
156
+        <template slot-scope="scope">
157
+          {{ getAreaName(scope.row.areaId) }}
158
+        </template>
159
+      </el-table-column>
160
+      <el-table-column label="名称" align="center" prop="equipmentName" />
161
+      <el-table-column label="二维坐标" align="center" prop="lngLat" />
162
+      <el-table-column label="三维坐标" align="center" prop="rasterLngLat" />
163
+      <el-table-column label="类型" align="center">
164
+        <template slot-scope="scope">
165
+          {{ getEquipmentTypeName(scope.row.typeId) }}
166
+        </template>
167
+      </el-table-column>
168
+      <el-table-column label="状态" align="center" prop="status">
169
+        <template slot-scope="scope">
170
+          <dict-tag :options="dict.type.equipment_info_type" :value="scope.row.status"/>
171
+        </template>
172
+      </el-table-column>
173
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
174
+        <template slot-scope="scope">
175
+          <el-button
176
+            size="mini"
177
+            type="text"
178
+            icon="el-icon-edit"
179
+            @click="handleUpdate(scope.row)"
180
+            v-hasPermi="['info:equipmentInfo:edit']"
181
+          >修改</el-button>
182
+          <el-button
183
+            size="mini"
184
+            type="text"
185
+            icon="el-icon-delete"
186
+            @click="handleDelete(scope.row)"
187
+            v-hasPermi="['info:equipmentInfo:remove']"
188
+          >删除</el-button>
189
+        </template>
190
+      </el-table-column>
191
+    </el-table>
192
+
193
+    <pagination
194
+      v-show="total>0"
195
+      :total="total"
196
+      :page.sync="queryParams.pageNum"
197
+      :limit.sync="queryParams.pageSize"
198
+      @pagination="getList"
199
+    />
200
+
201
+    <!-- 添加或修改设备信息对话框 -->
202
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
203
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
204
+        <el-form-item label="类别" prop="typeId">
205
+          <template>
206
+            <el-select v-model="form.typeId" filterable placeholder="请选择">
207
+              <el-option
208
+                v-for="item in equipmentTypeList"
209
+                :key="item.typeId"
210
+                :label="item.typeName"
211
+                :value="item.typeId">
212
+              </el-option>
213
+            </el-select>
214
+          </template>
215
+        </el-form-item>
216
+        <el-form-item label="房间" prop="roomId">
217
+          <template>
218
+            <el-select v-model="form.roomId" filterable placeholder="请选择">
219
+              <el-option
220
+                v-for="item in roomList"
221
+                :key="item.roomId"
222
+                :label="item.roomName"
223
+                :value="item.roomId">
224
+              </el-option>
225
+            </el-select>
226
+          </template>
227
+        </el-form-item>
228
+        <el-form-item label="大楼" prop="buildingId">
229
+          <template>
230
+            <el-select v-model="form.buildingId" filterable placeholder="请选择">
231
+              <el-option
232
+                v-for="item in buildingList"
233
+                :key="item.buildingId"
234
+                :label="item.buildingName"
235
+                :value="item.buildingId">
236
+              </el-option>
237
+            </el-select>
238
+          </template>
239
+        </el-form-item>
240
+        <el-form-item label="区域" prop="areaId">
241
+          <template>
242
+            <el-select v-model="form.areaId" filterable placeholder="请选择">
243
+              <el-option
244
+                v-for="item in areaList"
245
+                :key="item.areaId"
246
+                :label="item.areaName"
247
+                :value="item.areaId">
248
+              </el-option>
249
+            </el-select>
250
+          </template>
251
+        </el-form-item>
252
+        <el-form-item label="名称" prop="equipmentName">
253
+          <el-input v-model="form.equipmentName" placeholder="请输入名称" />
254
+        </el-form-item>
255
+        <el-form-item label="二维坐标" prop="lngLat">
256
+          <el-input v-model="form.lngLat" placeholder="请输入二维坐标" />
257
+        </el-form-item>
258
+        <el-form-item label="三维坐标" prop="rasterLngLat">
259
+          <el-input v-model="form.rasterLngLat" placeholder="请输入三维坐标" />
260
+        </el-form-item>
261
+        <el-form-item label="状态" prop="status">
262
+          <el-select v-model="form.status" placeholder="请选择状态">
263
+            <el-option
264
+              v-for="dict in dict.type.equipment_info_type"
265
+              :key="dict.value"
266
+              :label="dict.label"
267
+              :value="parseInt(dict.value)"
268
+            ></el-option>
269
+          </el-select>
270
+        </el-form-item>
271
+      </el-form>
272
+      <div slot="footer" class="dialog-footer">
273
+        <el-button type="primary" @click="submitForm">确 定</el-button>
274
+        <el-button @click="cancel">取 消</el-button>
275
+      </div>
276
+    </el-dialog>
277
+  </div>
278
+</template>
279
+
280
+<script>
281
+import { listEquipmentInfo, getEquipmentInfo, delEquipmentInfo, addEquipmentInfo, updateEquipmentInfo, exportEquipmentInfo } from "@/api/info/equipmentInfo";
282
+import { listBuildingInfo, getBuildingInfo } from "@/api/info/buildingInfo";
283
+import { listAreaInfo, getAreaInfo } from "@/api/info/areaInfo";
284
+import { listRoomInfo, getRoomInfo } from "@/api/info/roomInfo";
285
+import { listEquipmentType, getEquipmentType } from "@/api/type/equipmentType";
286
+export default {
287
+  name: "EquipmentInfo",
288
+  dicts: ['equipment_info_type'],
289
+  data() {
290
+    return {
291
+      equipmentTypeList: [],
292
+      areaList: [],
293
+      roomList: [],
294
+      buildingList: [],
295
+      // 遮罩层
296
+      loading: true,
297
+      // 导出遮罩层
298
+      exportLoading: false,
299
+      // 选中数组
300
+      ids: [],
301
+      // 非单个禁用
302
+      single: true,
303
+      // 非多个禁用
304
+      multiple: true,
305
+      // 显示搜索条件
306
+      showSearch: true,
307
+      // 总条数
308
+      total: 0,
309
+      // 设备信息表格数据
310
+      equipmentInfoList: [],
311
+      // 弹出层标题
312
+      title: "",
313
+      // 是否显示弹出层
314
+      open: false,
315
+      // 查询参数
316
+      queryParams: {
317
+        pageNum: 1,
318
+        pageSize: 10,
319
+        roomId: null,
320
+        buildingId: null,
321
+        areaId: null,
322
+        equipmentName: null,
323
+        lngLat: null,
324
+        rasterLngLat: null,
325
+        typeName: null,
326
+        status: null
327
+      },
328
+      queryBuildingParams: {
329
+        pageNum: 1,
330
+        pageSize: 999999,
331
+      },
332
+      // 表单参数
333
+      form: {},
334
+      // 表单校验
335
+      rules: {
336
+        equipmentId: [
337
+          { required: true, message: "设备id不能为空", trigger: "blur" }
338
+        ],
339
+      }
340
+    };
341
+  },
342
+  created() {
343
+    this.getList();
344
+    this.getBuilding();
345
+    this.getRoomList();
346
+    this.getAreaList();
347
+    this.getEquipmentTypeList();
348
+
349
+  },
350
+  methods: {
351
+
352
+    getEquipmentTypeName(typeId) {
353
+      const type = this.equipmentTypeList.find(b => b.typeId === typeId);
354
+      return type ? type.typeName : '未知';
355
+    },
356
+
357
+    getAreaName(areaId) {
358
+      const area = this.areaList.find(b => b.areaId === areaId);
359
+      return area ? area.areaName : '未知';
360
+    },
361
+
362
+    getRoomName(roomId) {
363
+      const room = this.roomList.find(b => b.roomId === roomId);
364
+      return room ? room.roomName : '未知';
365
+    },
366
+
367
+    getBuildingName(buildingId) {
368
+      const building = this.buildingList.find(b => b.buildingId === buildingId);
369
+      return building ? building.buildingName : '未知';
370
+    },
371
+
372
+    getEquipmentTypeList() {
373
+      listEquipmentType(this.queryBuildingParams).then(response => {
374
+        this.equipmentTypeList = response.data.list;
375
+      });
376
+    },
377
+
378
+    getAreaList() {
379
+      listAreaInfo(this.queryBuildingParams).then(response => {
380
+        this.areaList = response.data.list;
381
+      });
382
+    },
383
+
384
+    getRoomList() {
385
+      listRoomInfo(this.queryBuildingParams).then(response => {
386
+        this.roomList = response.data.list;
387
+      });
388
+    },
389
+
390
+    getBuilding() {
391
+      listBuildingInfo(this.queryBuildingParams).then(response => {
392
+        this.buildingList = response.data.list;
393
+      });
394
+    },
395
+    /** 查询设备信息列表 */
396
+    getList() {
397
+      this.loading = true;
398
+      listEquipmentInfo(this.queryParams).then(response => {
399
+        this.equipmentInfoList = response.data.list;
400
+        this.total = response.data.total;
401
+        this.loading = false;
402
+      });
403
+    },
404
+    // 取消按钮
405
+    cancel() {
406
+      this.open = false;
407
+      this.reset();
408
+    },
409
+    // 表单重置
410
+    reset() {
411
+      this.form = {
412
+        equipmentId: null,
413
+        typeId: null,
414
+        roomId: null,
415
+        buildingId: null,
416
+        areaId: null,
417
+        equipmentName: null,
418
+        lngLat: null,
419
+        rasterLngLat: null,
420
+        typeName: null,
421
+        status: null
422
+      };
423
+      this.resetForm("form");
424
+    },
425
+    /** 搜索按钮操作 */
426
+    handleQuery() {
427
+      this.queryParams.pageNum = 1;
428
+      this.getList();
429
+    },
430
+    /** 重置按钮操作 */
431
+    resetQuery() {
432
+      this.resetForm("queryForm");
433
+      this.handleQuery();
434
+    },
435
+    // 多选框选中数据
436
+    handleSelectionChange(selection) {
437
+      this.ids = selection.map(item => item.equipmentId)
438
+      this.single = selection.length!==1
439
+      this.multiple = !selection.length
440
+    },
441
+    /** 新增按钮操作 */
442
+    handleAdd() {
443
+      this.reset();
444
+      this.open = true;
445
+      this.title = "添加设备信息";
446
+    },
447
+    /** 修改按钮操作 */
448
+    handleUpdate(row) {
449
+      this.reset();
450
+      const equipmentId = row.equipmentId || this.ids
451
+      getEquipmentInfo(equipmentId).then(response => {
452
+        this.form = response.data;
453
+        this.open = true;
454
+        this.title = "修改设备信息";
455
+      });
456
+    },
457
+    /** 提交按钮 */
458
+    submitForm() {
459
+      this.$refs["form"].validate(valid => {
460
+        if (valid) {
461
+          if (this.form.equipmentId != null) {
462
+            updateEquipmentInfo(this.form).then(response => {
463
+              this.$modal.msgSuccess("修改成功");
464
+              this.open = false;
465
+              this.getList();
466
+            });
467
+          } else {
468
+            addEquipmentInfo(this.form).then(response => {
469
+              this.$modal.msgSuccess("新增成功");
470
+              this.open = false;
471
+              this.getList();
472
+            });
473
+          }
474
+        }
475
+      });
476
+    },
477
+    /** 删除按钮操作 */
478
+    handleDelete(row) {
479
+      const equipmentIds = row.equipmentId || this.ids;
480
+      this.$modal.confirm('是否确认删除设备信息编号为"' + equipmentIds + '"的数据项?').then(function() {
481
+        return delEquipmentInfo(equipmentIds);
482
+      }).then(() => {
483
+        this.getList();
484
+        this.$modal.msgSuccess("删除成功");
485
+      }).catch(() => {});
486
+    },
487
+    /** 导出按钮操作 */
488
+    handleExport() {
489
+      const queryParams = this.queryParams;
490
+      this.$modal.confirm('是否确认导出所有设备信息数据项?').then(() => {
491
+        this.exportLoading = true;
492
+        return exportEquipmentInfo(queryParams);
493
+      }).then(response => {
494
+        this.$download.name(response.msg);
495
+        this.exportLoading = false;
496
+      }).catch(() => {});
497
+    }
498
+  }
499
+};
500
+</script>

+ 372 - 0
src/views/info/forewarningInfo/index.vue

@@ -0,0 +1,372 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="预警标题" prop="forewarningName">
5
+        <el-input
6
+          v-model="queryParams.forewarningName"
7
+          placeholder="请输入预警标题"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item label="设备" prop="equipmentId">
14
+        <template>
15
+          <el-select v-model="queryParams.equipmentId" filterable placeholder="请选择">
16
+            <el-option
17
+              v-for="item in equipmentList"
18
+              :key="item.equipmentId"
19
+              :label="item.equipmentName"
20
+              :value="item.equipmentId">
21
+            </el-option>
22
+          </el-select>
23
+        </template>
24
+      </el-form-item>
25
+      <el-form-item label="是否解决" prop="isResolve">
26
+        <el-select v-model="queryParams.isResolve" placeholder="请选择是否解决" clearable size="small">
27
+          <el-option
28
+            v-for="dict in dict.type.sys_yes_no"
29
+            :key="dict.value"
30
+            :label="dict.label"
31
+            :value="dict.value"
32
+          />
33
+        </el-select>
34
+      </el-form-item>
35
+      <el-form-item label="解决时间" prop="resolveTime">
36
+        <el-date-picker clearable size="small"
37
+                        v-model="queryParams.resolveTime"
38
+                        type="datetime"
39
+                        value-format="yyyy-MM-dd HH:mm:ss"
40
+                        placeholder="选择解决时间">
41
+        </el-date-picker>
42
+      </el-form-item>
43
+      <el-form-item>
44
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
45
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
46
+      </el-form-item>
47
+    </el-form>
48
+
49
+    <el-row :gutter="10" class="mb8">
50
+      <el-col :span="1.5">
51
+        <el-button
52
+          type="primary"
53
+          plain
54
+          icon="el-icon-plus"
55
+          size="mini"
56
+          @click="handleAdd"
57
+          v-hasPermi="['info:forewarningInfo:add']"
58
+        >新增</el-button>
59
+      </el-col>
60
+      <el-col :span="1.5">
61
+        <el-button
62
+          type="success"
63
+          plain
64
+          icon="el-icon-edit"
65
+          size="mini"
66
+          :disabled="single"
67
+          @click="handleUpdate"
68
+          v-hasPermi="['info:forewarningInfo:edit']"
69
+        >修改</el-button>
70
+      </el-col>
71
+      <el-col :span="1.5">
72
+        <el-button
73
+          type="danger"
74
+          plain
75
+          icon="el-icon-delete"
76
+          size="mini"
77
+          :disabled="multiple"
78
+          @click="handleDelete"
79
+          v-hasPermi="['info:forewarningInfo:remove']"
80
+        >删除</el-button>
81
+      </el-col>
82
+      <el-col :span="1.5">
83
+        <el-button
84
+          type="warning"
85
+          plain
86
+          icon="el-icon-download"
87
+          size="mini"
88
+          :loading="exportLoading"
89
+          @click="handleExport"
90
+          v-hasPermi="['info:forewarningInfo:export']"
91
+        >导出</el-button>
92
+      </el-col>
93
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
94
+    </el-row>
95
+
96
+    <el-table v-loading="loading" :data="forewarningInfoList" @selection-change="handleSelectionChange">
97
+      <el-table-column type="selection" width="55" align="center" />
98
+      <el-table-column label="预警id" align="center" prop="forewarningId" />
99
+      <el-table-column label="预警标题" align="center" prop="forewarningName" />
100
+      <el-table-column label="设备" align="center" prop="equipmentId" />
101
+      <el-table-column label="设备名" align="center" prop="equipmentName" />
102
+      <el-table-column label="记录时间" align="center" prop="createTime" width="180">
103
+        <template slot-scope="scope">
104
+          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
105
+        </template>
106
+      </el-table-column>
107
+      <el-table-column label="是否解决" align="center" prop="isResolve">
108
+        <template slot-scope="scope">
109
+          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isResolve"/>
110
+        </template>
111
+      </el-table-column>
112
+      <el-table-column label="解决时间" align="center" prop="resolveTime" width="180">
113
+        <template slot-scope="scope">
114
+          <span>{{ parseTime(scope.row.resolveTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
115
+        </template>
116
+      </el-table-column>
117
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
118
+        <template slot-scope="scope">
119
+          <el-button
120
+            size="mini"
121
+            type="text"
122
+            icon="el-icon-edit"
123
+            @click="handleUpdate(scope.row)"
124
+            v-hasPermi="['info:forewarningInfo:edit']"
125
+          >修改</el-button>
126
+          <el-button
127
+            size="mini"
128
+            type="text"
129
+            icon="el-icon-delete"
130
+            @click="handleDelete(scope.row)"
131
+            v-hasPermi="['info:forewarningInfo:remove']"
132
+          >删除</el-button>
133
+        </template>
134
+      </el-table-column>
135
+    </el-table>
136
+
137
+    <pagination
138
+      v-show="total>0"
139
+      :total="total"
140
+      :page.sync="queryParams.pageNum"
141
+      :limit.sync="queryParams.pageSize"
142
+      @pagination="getList"
143
+    />
144
+
145
+    <!-- 添加或修改预警信息对话框 -->
146
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
147
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
148
+        <el-form-item label="预警标题" prop="forewarningName">
149
+          <el-input v-model="form.forewarningName" placeholder="请输入预警标题" />
150
+        </el-form-item>
151
+        <el-form-item label="内容" prop="content">
152
+          <el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
153
+        </el-form-item>
154
+        <el-form-item label="设备Id" prop="equipmentId">
155
+          <el-select v-model="form.equipmentId" filterable placeholder="请选择" @change="onEquipmentChange">
156
+            <el-option
157
+              v-for="item in equipmentList"
158
+              :key="item.equipmentId"
159
+              :label="item.equipmentId"
160
+              :value="item.equipmentId">
161
+            </el-option>
162
+          </el-select>
163
+        </el-form-item>
164
+        <el-form-item label="设备名" prop="equipmentName">
165
+          <el-input v-model="form.equipmentName" placeholder="请输入设备名" />
166
+        </el-form-item>
167
+        <el-form-item label="是否解决" prop="isResolve">
168
+          <el-select v-model="form.isResolve" placeholder="请选择是否解决">
169
+            <el-option
170
+              v-for="dict in dict.type.sys_yes_no"
171
+              :key="dict.value"
172
+              :label="dict.label"
173
+              :value="dict.value"
174
+            ></el-option>
175
+          </el-select>
176
+        </el-form-item>
177
+        <el-form-item label="解决时间" prop="resolveTime">
178
+          <el-date-picker clearable size="small"
179
+                          v-model="form.resolveTime"
180
+                          type="datetime"
181
+                          value-format="yyyy-MM-dd HH:mm:ss"
182
+                          placeholder="选择解决时间">
183
+          </el-date-picker>
184
+        </el-form-item>
185
+      </el-form>
186
+      <div slot="footer" class="dialog-footer">
187
+        <el-button type="primary" @click="submitForm">确 定</el-button>
188
+        <el-button @click="cancel">取 消</el-button>
189
+      </div>
190
+    </el-dialog>
191
+  </div>
192
+</template>
193
+
194
+<script>
195
+import { listForewarningInfo, getForewarningInfo, delForewarningInfo, addForewarningInfo, updateForewarningInfo, exportForewarningInfo } from "@/api/info/forewarningInfo";
196
+import { listEquipmentInfo } from "@/api/info/equipmentInfo";
197
+
198
+export default {
199
+  name: "ForewarningInfo",
200
+  dicts: ['sys_yes_no'],
201
+  data() {
202
+    return {
203
+      equipmentList: [],
204
+      // 遮罩层
205
+      loading: true,
206
+      // 导出遮罩层
207
+      exportLoading: false,
208
+      // 选中数组
209
+      ids: [],
210
+      // 非单个禁用
211
+      single: true,
212
+      // 非多个禁用
213
+      multiple: true,
214
+      // 显示搜索条件
215
+      showSearch: true,
216
+      // 总条数
217
+      total: 0,
218
+      // 预警信息表格数据
219
+      forewarningInfoList: [],
220
+      // 弹出层标题
221
+      title: "",
222
+      // 是否显示弹出层
223
+      open: false,
224
+      // 查询参数
225
+      queryParams: {
226
+        pageNum: 1,
227
+        pageSize: 10,
228
+        forewarningName: null,
229
+        equipmentId: null,
230
+        isResolve: null,
231
+        resolveTime: null
232
+      },
233
+      queryEquipmentParams: {
234
+        pageNum: 1,
235
+        pageSize: 999999,
236
+      },
237
+      // 表单参数
238
+      form: {},
239
+      // 表单校验
240
+      rules: {
241
+        forewarningId: [
242
+          { required: true, message: "预警id不能为空", trigger: "blur" }
243
+        ],
244
+      }
245
+    };
246
+  },
247
+  created() {
248
+    this.getList();
249
+    this.getEquipmentList();
250
+  },
251
+  methods: {
252
+
253
+    onEquipmentChange(equipmentId) {
254
+      const selectedEquipment = this.equipmentList.find(equipment => equipment.equipmentId === equipmentId);
255
+      if (selectedEquipment) {
256
+        this.form.equipmentName = selectedEquipment.equipmentName;
257
+      } else {
258
+        this.form.equipmentName = '';
259
+      }
260
+    },
261
+
262
+
263
+    getEquipmentList() {
264
+      listEquipmentInfo(this.queryEquipmentParams).then(response => {
265
+        this.equipmentList = response.data.list;
266
+      });
267
+    },
268
+
269
+    /** 查询预警信息列表 */
270
+    getList() {
271
+      this.loading = true;
272
+      listForewarningInfo(this.queryParams).then(response => {
273
+        this.forewarningInfoList = response.data.list;
274
+        this.total = response.data.total;
275
+        this.loading = false;
276
+      });
277
+    },
278
+    // 取消按钮
279
+    cancel() {
280
+      this.open = false;
281
+      this.reset();
282
+    },
283
+    // 表单重置
284
+    reset() {
285
+      this.form = {
286
+        forewarningId: null,
287
+        forewarningName: null,
288
+        content: null,
289
+        equipmentId: null,
290
+        equipmentName: null,
291
+        createTime: null,
292
+        isResolve: null,
293
+        resolveTime: null
294
+      };
295
+      this.resetForm("form");
296
+    },
297
+    /** 搜索按钮操作 */
298
+    handleQuery() {
299
+      this.queryParams.pageNum = 1;
300
+      this.getList();
301
+    },
302
+    /** 重置按钮操作 */
303
+    resetQuery() {
304
+      this.resetForm("queryForm");
305
+      this.handleQuery();
306
+    },
307
+    // 多选框选中数据
308
+    handleSelectionChange(selection) {
309
+      this.ids = selection.map(item => item.forewarningId)
310
+      this.single = selection.length!==1
311
+      this.multiple = !selection.length
312
+    },
313
+    /** 新增按钮操作 */
314
+    handleAdd() {
315
+      this.reset();
316
+      this.open = true;
317
+      this.title = "添加预警信息";
318
+    },
319
+    /** 修改按钮操作 */
320
+    handleUpdate(row) {
321
+      this.reset();
322
+      const forewarningId = row.forewarningId || this.ids
323
+      getForewarningInfo(forewarningId).then(response => {
324
+        this.form = response.data;
325
+        this.open = true;
326
+        this.title = "修改预警信息";
327
+      });
328
+    },
329
+    /** 提交按钮 */
330
+    submitForm() {
331
+      this.$refs["form"].validate(valid => {
332
+        if (valid) {
333
+          if (this.form.forewarningId != null) {
334
+            updateForewarningInfo(this.form).then(response => {
335
+              this.$modal.msgSuccess("修改成功");
336
+              this.open = false;
337
+              this.getList();
338
+            });
339
+          } else {
340
+            addForewarningInfo(this.form).then(response => {
341
+              this.$modal.msgSuccess("新增成功");
342
+              this.open = false;
343
+              this.getList();
344
+            });
345
+          }
346
+        }
347
+      });
348
+    },
349
+    /** 删除按钮操作 */
350
+    handleDelete(row) {
351
+      const forewarningIds = row.forewarningId || this.ids;
352
+      this.$modal.confirm('是否确认删除预警信息编号为"' + forewarningIds + '"的数据项?').then(function() {
353
+        return delForewarningInfo(forewarningIds);
354
+      }).then(() => {
355
+        this.getList();
356
+        this.$modal.msgSuccess("删除成功");
357
+      }).catch(() => {});
358
+    },
359
+    /** 导出按钮操作 */
360
+    handleExport() {
361
+      const queryParams = this.queryParams;
362
+      this.$modal.confirm('是否确认导出所有预警信息数据项?').then(() => {
363
+        this.exportLoading = true;
364
+        return exportForewarningInfo(queryParams);
365
+      }).then(response => {
366
+        this.$download.name(response.msg);
367
+        this.exportLoading = false;
368
+      }).catch(() => {});
369
+    }
370
+  }
371
+};
372
+</script>

+ 510 - 0
src/views/info/organizationInfo/index.vue

@@ -0,0 +1,510 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别" prop="typeId">
5
+        <template>
6
+          <el-select v-model="queryParams.typeId" filterable placeholder="请选择">
7
+            <el-option
8
+              v-for="item in organizationTypeList"
9
+              :key="item.typeId"
10
+              :label="item.typeName"
11
+              :value="item.typeId">
12
+            </el-option>
13
+          </el-select>
14
+        </template>
15
+      </el-form-item>
16
+      <el-form-item label="房间" prop="roomId">
17
+        <template>
18
+          <el-select v-model="queryParams.roomId" filterable placeholder="请选择">
19
+            <el-option
20
+              v-for="item in roomList"
21
+              :key="item.roomId"
22
+              :label="item.roomName"
23
+              :value="item.roomId">
24
+            </el-option>
25
+          </el-select>
26
+        </template>
27
+      </el-form-item>
28
+      <el-form-item label="大楼" prop="buildingId">
29
+        <template>
30
+          <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
31
+            <el-option
32
+              v-for="item in buildingList"
33
+              :key="item.buildingId"
34
+              :label="item.buildingName"
35
+              :value="item.buildingId">
36
+            </el-option>
37
+          </el-select>
38
+        </template>
39
+      </el-form-item>
40
+      <el-form-item label="区域" prop="areaId">
41
+        <template>
42
+          <el-select v-model="queryParams.areaId" filterable placeholder="请选择">
43
+            <el-option
44
+              v-for="item in areaList"
45
+              :key="item.areaId"
46
+              :label="item.areaName"
47
+              :value="item.areaId">
48
+            </el-option>
49
+          </el-select>
50
+        </template>
51
+      </el-form-item>
52
+      <el-form-item label="名称" prop="organizationName">
53
+        <el-input
54
+          v-model="queryParams.organizationName"
55
+          placeholder="请输入名称"
56
+          clearable
57
+          size="small"
58
+          @keyup.enter.native="handleQuery"
59
+        />
60
+      </el-form-item>
61
+      <el-form-item label="是否重要" prop="important">
62
+        <el-select v-model="queryParams.important" placeholder="请选择是否重要" clearable size="small">
63
+          <el-option
64
+            v-for="dict in dict.type.sys_yes_no"
65
+            :key="dict.value"
66
+            :label="dict.label"
67
+            :value="dict.value"
68
+          />
69
+        </el-select>
70
+      </el-form-item>
71
+      <el-form-item>
72
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
73
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
74
+      </el-form-item>
75
+    </el-form>
76
+
77
+    <el-row :gutter="10" class="mb8">
78
+      <el-col :span="1.5">
79
+        <el-button
80
+          type="primary"
81
+          plain
82
+          icon="el-icon-plus"
83
+          size="mini"
84
+          @click="handleAdd"
85
+          v-hasPermi="['info:organizationInfo:add']"
86
+        >新增</el-button>
87
+      </el-col>
88
+      <el-col :span="1.5">
89
+        <el-button
90
+          type="success"
91
+          plain
92
+          icon="el-icon-edit"
93
+          size="mini"
94
+          :disabled="single"
95
+          @click="handleUpdate"
96
+          v-hasPermi="['info:organizationInfo:edit']"
97
+        >修改</el-button>
98
+      </el-col>
99
+      <el-col :span="1.5">
100
+        <el-button
101
+          type="danger"
102
+          plain
103
+          icon="el-icon-delete"
104
+          size="mini"
105
+          :disabled="multiple"
106
+          @click="handleDelete"
107
+          v-hasPermi="['info:organizationInfo:remove']"
108
+        >删除</el-button>
109
+      </el-col>
110
+      <el-col :span="1.5">
111
+        <el-button
112
+          type="warning"
113
+          plain
114
+          icon="el-icon-download"
115
+          size="mini"
116
+          :loading="exportLoading"
117
+          @click="handleExport"
118
+          v-hasPermi="['info:organizationInfo:export']"
119
+        >导出</el-button>
120
+      </el-col>
121
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
122
+    </el-row>
123
+
124
+    <el-table v-loading="loading" :data="organizationInfoList" @selection-change="handleSelectionChange">
125
+      <el-table-column type="selection" width="55" align="center" />
126
+      <el-table-column label="主体id" align="center" prop="organizationId" />
127
+      <el-table-column label="类型" align="center">
128
+        <template slot-scope="scope">
129
+          {{ getOrganizationTypeName(scope.row.typeId) }}
130
+        </template>
131
+      </el-table-column>
132
+      <el-table-column label="房间" align="center">
133
+        <template slot-scope="scope">
134
+          {{ getRoomName(scope.row.roomId) }}
135
+        </template>
136
+      </el-table-column>
137
+      <el-table-column label="大楼" align="center">
138
+        <template slot-scope="scope">
139
+          {{ getBuildingName(scope.row.buildingId) }}
140
+        </template>
141
+      </el-table-column>
142
+      <el-table-column label="区域" align="center">
143
+        <template slot-scope="scope">
144
+          {{ getAreaName(scope.row.areaId) }}
145
+        </template>
146
+      </el-table-column>
147
+      <el-table-column label="名称" align="center" prop="organizationName" />
148
+      <el-table-column label="是否重要" align="center" prop="important">
149
+        <template slot-scope="scope">
150
+          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.important"/>
151
+        </template>
152
+      </el-table-column>
153
+      <el-table-column label="logo" align="center" prop="logo">
154
+        <template slot-scope="scope">
155
+            <img :src="BASE_URL + scope.row.logo" alt="户型图" style="width: 50px; height: 50px;">
156
+        </template>
157
+      </el-table-column>
158
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
159
+        <template slot-scope="scope">
160
+          <el-button
161
+            size="mini"
162
+            type="text"
163
+            icon="el-icon-edit"
164
+            @click="handleUpdate(scope.row)"
165
+            v-hasPermi="['info:organizationInfo:edit']"
166
+          >修改</el-button>
167
+          <el-button
168
+            size="mini"
169
+            type="text"
170
+            icon="el-icon-delete"
171
+            @click="handleDelete(scope.row)"
172
+            v-hasPermi="['info:organizationInfo:remove']"
173
+          >删除</el-button>
174
+        </template>
175
+      </el-table-column>
176
+    </el-table>
177
+
178
+    <pagination
179
+      v-show="total>0"
180
+      :total="total"
181
+      :page.sync="queryParams.pageNum"
182
+      :limit.sync="queryParams.pageSize"
183
+      @pagination="getList"
184
+    />
185
+
186
+    <!-- 添加或修改主体信息对话框 -->
187
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
188
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
189
+        <el-form-item label="类别" prop="typeId">
190
+          <template>
191
+            <el-select v-model="form.typeId" filterable placeholder="请选择">
192
+              <el-option
193
+                v-for="item in organizationTypeList"
194
+                :key="item.typeId"
195
+                :label="item.typeName"
196
+                :value="item.typeId">
197
+              </el-option>
198
+            </el-select>
199
+          </template>
200
+        </el-form-item>
201
+        <el-form-item label="房间" prop="roomId">
202
+          <template>
203
+            <el-select v-model="form.roomId" filterable placeholder="请选择">
204
+              <el-option
205
+                v-for="item in roomList"
206
+                :key="item.roomId"
207
+                :label="item.roomName"
208
+                :value="item.roomId">
209
+              </el-option>
210
+            </el-select>
211
+          </template>
212
+        </el-form-item>
213
+        <el-form-item label="大楼" prop="buildingId">
214
+          <template>
215
+            <el-select v-model="form.buildingId" filterable placeholder="请选择">
216
+              <el-option
217
+                v-for="item in buildingList"
218
+                :key="item.buildingId"
219
+                :label="item.buildingName"
220
+                :value="item.buildingId">
221
+              </el-option>
222
+            </el-select>
223
+          </template>
224
+        </el-form-item>
225
+        <el-form-item label="区域" prop="areaId">
226
+          <template>
227
+            <el-select v-model="form.areaId" filterable placeholder="请选择">
228
+              <el-option
229
+                v-for="item in areaList"
230
+                :key="item.areaId"
231
+                :label="item.areaName"
232
+                :value="item.areaId">
233
+              </el-option>
234
+            </el-select>
235
+          </template>
236
+        </el-form-item>
237
+        <el-form-item label="名称" prop="organizationName">
238
+          <el-input v-model="form.organizationName" placeholder="请输入名称" />
239
+        </el-form-item>
240
+        <el-form-item label="简介" prop="intro">
241
+          <el-input v-model="form.intro" placeholder="请输入简介" />
242
+        </el-form-item>
243
+        <el-form-item label="二维坐标" prop="lngLat">
244
+          <el-input v-model="form.lngLat" placeholder="请输入二维坐标" />
245
+        </el-form-item>
246
+        <el-form-item label="三维坐标" prop="rasterLngLat">
247
+          <el-input v-model="form.rasterLngLat" placeholder="请输入三维坐标" />
248
+        </el-form-item>
249
+        <el-form-item label="是否重要">
250
+          <el-switch v-model="form.important"></el-switch>
251
+        </el-form-item>
252
+        <el-form-item label="地址" prop="address">
253
+          <el-input v-model="form.address" placeholder="请输入地址" />
254
+        </el-form-item>
255
+        <el-form-item label="logo">
256
+          <imageUpload v-model="form.logo"/>
257
+        </el-form-item>
258
+        <el-form-item label="联系方式" prop="telephone">
259
+          <el-input v-model="form.telephone" placeholder="请输入联系方式" />
260
+        </el-form-item>
261
+        <el-form-item label="主要产品" prop="product">
262
+          <el-input v-model="form.product" placeholder="请输入主要产品" />
263
+        </el-form-item>
264
+        <el-form-item label="入驻时间" prop="enterTime">
265
+          <el-date-picker clearable size="small"
266
+                          v-model="form.enterTime"
267
+                          type="datetime"
268
+                          value-format="yyyy-MM-dd HH:mm:ss"
269
+                          placeholder="选择入驻时间">
270
+          </el-date-picker>
271
+        </el-form-item>
272
+        <el-form-item label="员工人数" prop="employeNum">
273
+          <el-input-number v-model="form.employeNum" controls-position="right"   :min="0" placeholder="请输入员工人数" />
274
+        </el-form-item>
275
+
276
+      </el-form>
277
+      <div slot="footer" class="dialog-footer">
278
+        <el-button type="primary" @click="submitForm">确 定</el-button>
279
+        <el-button @click="cancel">取 消</el-button>
280
+      </div>
281
+    </el-dialog>
282
+  </div>
283
+</template>
284
+
285
+<script>
286
+import { listOrganizationInfo, getOrganizationInfo, delOrganizationInfo, addOrganizationInfo, updateOrganizationInfo, exportOrganizationInfo } from "@/api/info/organizationInfo";
287
+import { listBuildingInfo, getBuildingInfo } from "@/api/info/buildingInfo";
288
+import { listAreaInfo, getAreaInfo } from "@/api/info/areaInfo";
289
+import { listRoomInfo, getRoomInfo } from "@/api/info/roomInfo";
290
+import { listOrganizationType, getOrganizationType } from "@/api/type/organizationType";
291
+export default {
292
+  name: "OrganizationInfo",
293
+  dicts: ['sys_yes_no'],
294
+  data() {
295
+    return {
296
+      organizationTypeList: [],
297
+      areaList: [],
298
+      roomList: [],
299
+      buildingList: [],
300
+      BASE_URL: BASE_URL,
301
+      // 遮罩层
302
+      loading: true,
303
+      // 导出遮罩层
304
+      exportLoading: false,
305
+      // 选中数组
306
+      ids: [],
307
+      // 非单个禁用
308
+      single: true,
309
+      // 非多个禁用
310
+      multiple: true,
311
+      // 显示搜索条件
312
+      showSearch: true,
313
+      // 总条数
314
+      total: 0,
315
+      // 主体信息表格数据
316
+      organizationInfoList: [],
317
+      // 弹出层标题
318
+      title: "",
319
+      // 是否显示弹出层
320
+      open: false,
321
+      // 查询参数
322
+      queryParams: {
323
+        pageNum: 1,
324
+        pageSize: 10,
325
+        typeId: null,
326
+        roomId: null,
327
+        buildingId: null,
328
+        areaId: null,
329
+        organizationName: null,
330
+        important: null,
331
+      },
332
+      queryBuildingParams: {
333
+        pageNum: 1,
334
+        pageSize: 999999,
335
+      },
336
+      // 表单参数
337
+      form: {},
338
+      // 表单校验
339
+      rules: {
340
+        organizationId: [
341
+          { required: true, message: "主体id不能为空", trigger: "blur" }
342
+        ],
343
+      }
344
+    };
345
+  },
346
+  created() {
347
+    this.getList();
348
+    this.getBuilding();
349
+    this.getRoomList();
350
+    this.getAreaList();
351
+    this.getOrganizationTypeList();
352
+  },
353
+  methods: {
354
+
355
+    getOrganizationTypeName(typeId) {
356
+      const type = this.organizationTypeList.find(b => b.typeId === typeId);
357
+      return type ? type.typeName : '未知';
358
+    },
359
+
360
+    getAreaName(areaId) {
361
+      const area = this.areaList.find(b => b.areaId === areaId);
362
+      return area ? area.areaName : '未知';
363
+    },
364
+
365
+    getRoomName(roomId) {
366
+      const room = this.roomList.find(b => b.roomId === roomId);
367
+      return room ? room.roomName : '未知';
368
+    },
369
+
370
+    getBuildingName(buildingId) {
371
+      const building = this.buildingList.find(b => b.buildingId === buildingId);
372
+      return building ? building.buildingName : '未知';
373
+    },
374
+
375
+    getOrganizationTypeList() {
376
+      listOrganizationType(this.queryBuildingParams).then(response => {
377
+        this.organizationTypeList = response.data.list;
378
+      });
379
+    },
380
+
381
+    getAreaList() {
382
+      listAreaInfo(this.queryBuildingParams).then(response => {
383
+        this.areaList = response.data.list;
384
+      });
385
+    },
386
+
387
+    getRoomList() {
388
+      listRoomInfo(this.queryBuildingParams).then(response => {
389
+        this.roomList = response.data.list;
390
+      });
391
+    },
392
+
393
+    getBuilding() {
394
+      listBuildingInfo(this.queryBuildingParams).then(response => {
395
+        this.buildingList = response.data.list;
396
+      });
397
+    },
398
+    /** 查询主体信息列表 */
399
+    getList() {
400
+      this.loading = true;
401
+      listOrganizationInfo(this.queryParams).then(response => {
402
+        this.organizationInfoList = response.data.list;
403
+        this.total = response.data.total;
404
+        this.loading = false;
405
+      });
406
+    },
407
+    // 取消按钮
408
+    cancel() {
409
+      this.open = false;
410
+      this.reset();
411
+    },
412
+    // 表单重置
413
+    reset() {
414
+      this.form = {
415
+        organizationId: null,
416
+        typeId: null,
417
+        roomId: null,
418
+        buildingId: null,
419
+        areaId: null,
420
+        organizationName: null,
421
+        intro: null,
422
+        lngLat: null,
423
+        rasterLngLat: null,
424
+        important: true,
425
+        typeName: null,
426
+        address: null,
427
+        logo: null,
428
+        telephone: null,
429
+        product: null,
430
+        enterTime: null,
431
+        employeNum: null
432
+      };
433
+      this.resetForm("form");
434
+    },
435
+    /** 搜索按钮操作 */
436
+    handleQuery() {
437
+      this.queryParams.pageNum = 1;
438
+      this.getList();
439
+    },
440
+    /** 重置按钮操作 */
441
+    resetQuery() {
442
+      this.resetForm("queryForm");
443
+      this.handleQuery();
444
+    },
445
+    // 多选框选中数据
446
+    handleSelectionChange(selection) {
447
+      this.ids = selection.map(item => item.organizationId)
448
+      this.single = selection.length!==1
449
+      this.multiple = !selection.length
450
+    },
451
+    /** 新增按钮操作 */
452
+    handleAdd() {
453
+      this.reset();
454
+      this.open = true;
455
+      this.title = "添加主体信息";
456
+    },
457
+    /** 修改按钮操作 */
458
+    handleUpdate(row) {
459
+      this.reset();
460
+      const organizationId = row.organizationId || this.ids
461
+      getOrganizationInfo(organizationId).then(response => {
462
+        this.form = response.data;
463
+        this.open = true;
464
+        this.title = "修改主体信息";
465
+      });
466
+    },
467
+    /** 提交按钮 */
468
+    submitForm() {
469
+      this.$refs["form"].validate(valid => {
470
+        if (valid) {
471
+          if (this.form.organizationId != null) {
472
+            updateOrganizationInfo(this.form).then(response => {
473
+              this.$modal.msgSuccess("修改成功");
474
+              this.open = false;
475
+              this.getList();
476
+            });
477
+          } else {
478
+            addOrganizationInfo(this.form).then(response => {
479
+              this.$modal.msgSuccess("新增成功");
480
+              this.open = false;
481
+              this.getList();
482
+            });
483
+          }
484
+        }
485
+      });
486
+    },
487
+    /** 删除按钮操作 */
488
+    handleDelete(row) {
489
+      const organizationIds = row.organizationId || this.ids;
490
+      this.$modal.confirm('是否确认删除主体信息编号为"' + organizationIds + '"的数据项?').then(function() {
491
+        return delOrganizationInfo(organizationIds);
492
+      }).then(() => {
493
+        this.getList();
494
+        this.$modal.msgSuccess("删除成功");
495
+      }).catch(() => {});
496
+    },
497
+    /** 导出按钮操作 */
498
+    handleExport() {
499
+      const queryParams = this.queryParams;
500
+      this.$modal.confirm('是否确认导出所有主体信息数据项?').then(() => {
501
+        this.exportLoading = true;
502
+        return exportOrganizationInfo(queryParams);
503
+      }).then(response => {
504
+        this.$download.name(response.msg);
505
+        this.exportLoading = false;
506
+      }).catch(() => {});
507
+    }
508
+  }
509
+};
510
+</script>

+ 376 - 0
src/views/info/planInfo/index.vue

@@ -0,0 +1,376 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="区域" prop="areaId">
5
+        <template>
6
+          <el-select v-model="queryParams.areaId" filterable placeholder="请选择">
7
+            <el-option
8
+              v-for="item in areaList"
9
+              :key="item.areaId"
10
+              :label="item.areaName"
11
+              :value="item.areaId">
12
+            </el-option>
13
+          </el-select>
14
+        </template>
15
+      </el-form-item>
16
+      <el-form-item label="类别" prop="typeId">
17
+        <template>
18
+          <el-select v-model="queryParams.typeId" filterable placeholder="请选择">
19
+            <el-option
20
+              v-for="item in planInfoType"
21
+              :key="item.typeId"
22
+              :label="item.typeName"
23
+              :value="item.typeId">
24
+            </el-option>
25
+          </el-select>
26
+        </template>
27
+      </el-form-item>
28
+      <el-form-item label="名字" prop="planName">
29
+        <el-input
30
+          v-model="queryParams.planName"
31
+          placeholder="请输入名字"
32
+          clearable
33
+          size="small"
34
+          @keyup.enter.native="handleQuery"
35
+        />
36
+      </el-form-item>
37
+      <el-form-item>
38
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
39
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
40
+      </el-form-item>
41
+    </el-form>
42
+
43
+    <el-row :gutter="10" class="mb8">
44
+      <el-col :span="1.5">
45
+        <el-button
46
+          type="primary"
47
+          plain
48
+          icon="el-icon-plus"
49
+          size="mini"
50
+          @click="handleAdd"
51
+          v-hasPermi="['info:planInfo:add']"
52
+        >新增</el-button>
53
+      </el-col>
54
+      <el-col :span="1.5">
55
+        <el-button
56
+          type="success"
57
+          plain
58
+          icon="el-icon-edit"
59
+          size="mini"
60
+          :disabled="single"
61
+          @click="handleUpdate"
62
+          v-hasPermi="['info:planInfo:edit']"
63
+        >修改</el-button>
64
+      </el-col>
65
+      <el-col :span="1.5">
66
+        <el-button
67
+          type="danger"
68
+          plain
69
+          icon="el-icon-delete"
70
+          size="mini"
71
+          :disabled="multiple"
72
+          @click="handleDelete"
73
+          v-hasPermi="['info:planInfo:remove']"
74
+        >删除</el-button>
75
+      </el-col>
76
+      <el-col :span="1.5">
77
+        <el-button
78
+          type="warning"
79
+          plain
80
+          icon="el-icon-download"
81
+          size="mini"
82
+          :loading="exportLoading"
83
+          @click="handleExport"
84
+          v-hasPermi="['info:planInfo:export']"
85
+        >导出</el-button>
86
+      </el-col>
87
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
88
+    </el-row>
89
+
90
+    <el-table v-loading="loading" :data="planInfoList" @selection-change="handleSelectionChange">
91
+      <el-table-column type="selection" width="55" align="center" />
92
+      <el-table-column label="规划id" align="center" prop="planId" />
93
+      <el-table-column label="区域" align="center">
94
+        <template slot-scope="scope">
95
+          {{ getAreaName(scope.row.areaId) }}
96
+        </template>
97
+      </el-table-column>
98
+      <el-table-column label="类别" align="center">
99
+        <template slot-scope="scope">
100
+          {{ getPlanTypeName(scope.row.typeId) }}
101
+        </template>
102
+      </el-table-column>
103
+      <el-table-column label="名字" align="center" prop="planName" />
104
+      <el-table-column label="备注" align="center" prop="content" />
105
+      <el-table-column label="颜色" prop="colour">
106
+        <template slot-scope="scope">
107
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column label="面积" align="center" prop="acreage" />
111
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
112
+        <template slot-scope="scope">
113
+          <el-button
114
+            size="mini"
115
+            type="text"
116
+            icon="el-icon-edit"
117
+            @click="handleUpdate(scope.row)"
118
+            v-hasPermi="['info:planInfo:edit']"
119
+          >修改</el-button>
120
+          <el-button
121
+            size="mini"
122
+            type="text"
123
+            icon="el-icon-delete"
124
+            @click="handleDelete(scope.row)"
125
+            v-hasPermi="['info:planInfo:remove']"
126
+          >删除</el-button>
127
+        </template>
128
+      </el-table-column>
129
+    </el-table>
130
+
131
+    <pagination
132
+      v-show="total>0"
133
+      :total="total"
134
+      :page.sync="queryParams.pageNum"
135
+      :limit.sync="queryParams.pageSize"
136
+      @pagination="getList"
137
+    />
138
+
139
+    <!-- 添加或修改规划对象对话框 -->
140
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
141
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
142
+        <el-form-item label="区域" prop="areaId">
143
+          <template>
144
+            <el-select v-model="form.areaId" filterable placeholder="请选择">
145
+              <el-option
146
+                v-for="item in areaList"
147
+                :key="item.areaId"
148
+                :label="item.areaName"
149
+                :value="item.areaId">
150
+              </el-option>
151
+            </el-select>
152
+          </template>
153
+        </el-form-item>
154
+        <el-form-item label="类别" prop="typeId">
155
+          <template>
156
+            <el-select v-model="form.typeId" filterable placeholder="请选择类别">
157
+              <el-option
158
+                v-for="item in planInfoType"
159
+                :key="item.typeId"
160
+                :label="item.typeName"
161
+                :value="item.typeId">
162
+              </el-option>
163
+            </el-select>
164
+          </template>
165
+
166
+        </el-form-item>
167
+        <el-form-item label="名字" prop="planName">
168
+          <el-input v-model="form.planName" placeholder="请输入名字" />
169
+        </el-form-item>
170
+        <el-form-item label="备注" prop="content">
171
+          <el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
172
+        </el-form-item>
173
+        <el-form-item label="颜色">
174
+          <el-color-picker v-model="form.colour"></el-color-picker>
175
+        </el-form-item>
176
+        <el-form-item label="面积" prop="acreage">
177
+          <el-input-number v-model="form.acreage" controls-position="right"   :min="0" placeholder="请输入面积" />
178
+        </el-form-item>
179
+
180
+      </el-form>
181
+      <div slot="footer" class="dialog-footer">
182
+        <el-button type="primary" @click="submitForm">确 定</el-button>
183
+        <el-button @click="cancel">取 消</el-button>
184
+      </div>
185
+    </el-dialog>
186
+  </div>
187
+</template>
188
+
189
+<script>
190
+import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo, exportPlanInfo } from "@/api/info/planInfo";
191
+import { listPlanType, getPlanType } from "@/api/type/planType";
192
+import { listAreaInfo, getAreaInfo } from "@/api/info/areaInfo";
193
+export default {
194
+  name: "PlanInfo",
195
+  data() {
196
+    return {
197
+      areaList: [],
198
+      planInfoType:[],
199
+      // 遮罩层
200
+      loading: true,
201
+      // 导出遮罩层
202
+      exportLoading: false,
203
+      // 选中数组
204
+      ids: [],
205
+      // 非单个禁用
206
+      single: true,
207
+      // 非多个禁用
208
+      multiple: true,
209
+      // 显示搜索条件
210
+      showSearch: true,
211
+      // 总条数
212
+      total: 0,
213
+      // 规划对象表格数据
214
+      planInfoList: [],
215
+      // 弹出层标题
216
+      title: "",
217
+      // 是否显示弹出层
218
+      open: false,
219
+      // 查询参数
220
+      queryParams: {
221
+        pageNum: 1,
222
+        pageSize: 10,
223
+        areaId: null,
224
+        typeId: null,
225
+        planName: null,
226
+      },
227
+      queryTypeParams: {
228
+        pageNum: 1,
229
+        pageSize: 999999,
230
+      },
231
+      // 表单参数
232
+      form: {},
233
+      // 表单校验
234
+      rules: {
235
+        planId: [
236
+          { required: true, message: "规划id不能为空", trigger: "blur" }
237
+        ],
238
+      }
239
+    };
240
+  },
241
+  created() {
242
+    this.getList();
243
+    this.getPlanInfoType()
244
+    this.getAreaList();
245
+  },
246
+  methods: {
247
+
248
+    getPlanTypeName(typeId) {
249
+      const type = this.planInfoType.find(b => b.typeId === typeId);
250
+      return type ? type.typeName : '未知';
251
+    },
252
+
253
+
254
+    getAreaName(areaId) {
255
+      const area = this.areaList.find(b => b.areaId === areaId);
256
+      return area ? area.areaName : '未知';
257
+    },
258
+
259
+
260
+
261
+    getAreaList() {
262
+      listAreaInfo(this.queryTypeParams).then(response => {
263
+        this.areaList = response.data.list;
264
+      });
265
+    },
266
+    /** 查询字典类型下拉列表 */
267
+    getPlanInfoType() {
268
+      listPlanType(this.queryTypeParams).then(response => {
269
+        this.planInfoType = response.data.list;
270
+      });
271
+    },
272
+    /** 查询规划对象列表 */
273
+    getList() {
274
+      this.loading = true;
275
+      listPlanInfo(this.queryParams).then(response => {
276
+        this.planInfoList = response.data.list;
277
+        this.total = response.data.total;
278
+        this.loading = false;
279
+      });
280
+    },
281
+    // 取消按钮
282
+    cancel() {
283
+      this.open = false;
284
+      this.reset();
285
+    },
286
+    // 表单重置
287
+    reset() {
288
+      this.form = {
289
+        planId: null,
290
+        areaId: null,
291
+        typeId: null,
292
+        planName: null,
293
+        content: null,
294
+        colour: null,
295
+        acreage: null
296
+      };
297
+      this.resetForm("form");
298
+    },
299
+    /** 搜索按钮操作 */
300
+    handleQuery() {
301
+      this.queryParams.pageNum = 1;
302
+      this.getList();
303
+    },
304
+    /** 重置按钮操作 */
305
+    resetQuery() {
306
+      this.resetForm("queryForm");
307
+      this.handleQuery();
308
+    },
309
+    // 多选框选中数据
310
+    handleSelectionChange(selection) {
311
+      this.ids = selection.map(item => item.planId)
312
+      this.single = selection.length!==1
313
+      this.multiple = !selection.length
314
+    },
315
+    /** 新增按钮操作 */
316
+    handleAdd() {
317
+
318
+      this.reset();
319
+      this.open = true;
320
+      this.title = "添加规划对象";
321
+    },
322
+    /** 修改按钮操作 */
323
+    handleUpdate(row) {
324
+
325
+      this.reset();
326
+      const planId = row.planId || this.ids
327
+      getPlanInfo(planId).then(response => {
328
+        this.form = response.data;
329
+        this.open = true;
330
+        this.title = "修改规划对象";
331
+      });
332
+    },
333
+    /** 提交按钮 */
334
+    submitForm() {
335
+      this.$refs["form"].validate(valid => {
336
+        if (valid) {
337
+          if (this.form.planId != null) {
338
+            updatePlanInfo(this.form).then(response => {
339
+              this.$modal.msgSuccess("修改成功");
340
+              this.open = false;
341
+              this.getList();
342
+            });
343
+          } else {
344
+            addPlanInfo(this.form).then(response => {
345
+              this.$modal.msgSuccess("新增成功");
346
+              this.open = false;
347
+              this.getList();
348
+            });
349
+          }
350
+        }
351
+      });
352
+    },
353
+    /** 删除按钮操作 */
354
+    handleDelete(row) {
355
+      const planIds = row.planId || this.ids;
356
+      this.$modal.confirm('是否确认删除规划对象编号为"' + planIds + '"的数据项?').then(function() {
357
+        return delPlanInfo(planIds);
358
+      }).then(() => {
359
+        this.getList();
360
+        this.$modal.msgSuccess("删除成功");
361
+      }).catch(() => {});
362
+    },
363
+    /** 导出按钮操作 */
364
+    handleExport() {
365
+      const queryParams = this.queryParams;
366
+      this.$modal.confirm('是否确认导出所有规划对象数据项?').then(() => {
367
+        this.exportLoading = true;
368
+        return exportPlanInfo(queryParams);
369
+      }).then(response => {
370
+        this.$download.name(response.msg);
371
+        this.exportLoading = false;
372
+      }).catch(() => {});
373
+    }
374
+  }
375
+};
376
+</script>

+ 300 - 0
src/views/info/policyInfo/index.vue

@@ -0,0 +1,300 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="政策名称" prop="policyName">
5
+        <el-input
6
+          v-model="queryParams.policyName"
7
+          placeholder="请输入政策名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item label="发布日期" prop="createTime">
14
+        <el-date-picker clearable size="small"
15
+                        v-model="queryParams.createTime"
16
+                        type="datetime"
17
+                        value-format="yyyy-MM-dd HH:mm:ss"
18
+                        placeholder="选择发布日期">
19
+        </el-date-picker>
20
+      </el-form-item>
21
+      <el-form-item label="文件名" prop="fileName">
22
+        <el-input
23
+          v-model="queryParams.fileName"
24
+          placeholder="请输入文件名"
25
+          clearable
26
+          size="small"
27
+          @keyup.enter.native="handleQuery"
28
+        />
29
+      </el-form-item>
30
+      <el-form-item>
31
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
32
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
33
+      </el-form-item>
34
+    </el-form>
35
+
36
+    <el-row :gutter="10" class="mb8">
37
+      <el-col :span="1.5">
38
+        <el-button
39
+          type="primary"
40
+          plain
41
+          icon="el-icon-plus"
42
+          size="mini"
43
+          @click="handleAdd"
44
+          v-hasPermi="['info:policyInfo:add']"
45
+        >新增</el-button>
46
+      </el-col>
47
+      <el-col :span="1.5">
48
+        <el-button
49
+          type="success"
50
+          plain
51
+          icon="el-icon-edit"
52
+          size="mini"
53
+          :disabled="single"
54
+          @click="handleUpdate"
55
+          v-hasPermi="['info:policyInfo:edit']"
56
+        >修改</el-button>
57
+      </el-col>
58
+      <el-col :span="1.5">
59
+        <el-button
60
+          type="danger"
61
+          plain
62
+          icon="el-icon-delete"
63
+          size="mini"
64
+          :disabled="multiple"
65
+          @click="handleDelete"
66
+          v-hasPermi="['info:policyInfo:remove']"
67
+        >删除</el-button>
68
+      </el-col>
69
+      <el-col :span="1.5">
70
+        <el-button
71
+          type="warning"
72
+          plain
73
+          icon="el-icon-download"
74
+          size="mini"
75
+          :loading="exportLoading"
76
+          @click="handleExport"
77
+          v-hasPermi="['info:policyInfo:export']"
78
+        >导出</el-button>
79
+      </el-col>
80
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
81
+    </el-row>
82
+
83
+    <el-table v-loading="loading" :data="policyInfoList" @selection-change="handleSelectionChange">
84
+      <el-table-column type="selection" width="55" align="center" />
85
+      <el-table-column label="政策id" align="center" prop="policyId" />
86
+      <el-table-column label="政策名称" align="center" prop="policyName" />
87
+      <el-table-column label="发布日期" align="center" prop="createTime" width="180">
88
+        <template slot-scope="scope">
89
+          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
90
+        </template>
91
+      </el-table-column>
92
+      <el-table-column label="文件名" align="center" prop="fileName" />
93
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
94
+        <template slot-scope="scope">
95
+          <el-button
96
+            size="mini"
97
+            type="text"
98
+            icon="el-icon-edit"
99
+            @click="handleUpdate(scope.row)"
100
+            v-hasPermi="['info:policyInfo:edit']"
101
+          >修改</el-button>
102
+          <el-button
103
+            size="mini"
104
+            type="text"
105
+            icon="el-icon-delete"
106
+            @click="handleDelete(scope.row)"
107
+            v-hasPermi="['info:policyInfo:remove']"
108
+          >删除</el-button>
109
+        </template>
110
+      </el-table-column>
111
+    </el-table>
112
+
113
+    <pagination
114
+      v-show="total>0"
115
+      :total="total"
116
+      :page.sync="queryParams.pageNum"
117
+      :limit.sync="queryParams.pageSize"
118
+      @pagination="getList"
119
+    />
120
+
121
+    <!-- 添加或修改政策信息对话框 -->
122
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
123
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
124
+        <el-form-item label="政策名称" prop="policyName">
125
+          <el-input v-model="form.policyName" placeholder="请输入政策名称" />
126
+        </el-form-item>
127
+        <el-form-item label="政策文件">
128
+          <fileUpload v-model="form.url" @fatherMethod="fatherMethod" @file-uploaded="handleFileUploaded" />
129
+        </el-form-item>
130
+        <el-form-item label="文件名" prop="fileName">
131
+          <el-input v-model="form.fileName" placeholder="请输入文件名" />
132
+        </el-form-item>
133
+      </el-form>
134
+      <div slot="footer" class="dialog-footer">
135
+        <el-button type="primary" @click="submitForm">确 定</el-button>
136
+        <el-button @click="cancel">取 消</el-button>
137
+      </div>
138
+    </el-dialog>
139
+  </div>
140
+</template>
141
+<script>
142
+import { listPolicyInfo, getPolicyInfo, delPolicyInfo, addPolicyInfo, updatePolicyInfo, exportPolicyInfo } from "@/api/info/policyInfo";
143
+import fileUpload from "../../../components/FileUpload";
144
+
145
+export default {
146
+  name: "PolicyInfo",
147
+  components: {
148
+    fileUpload
149
+  },
150
+  data() {
151
+    return {
152
+      // 遮罩层
153
+      loading: true,
154
+      // 导出遮罩层
155
+      exportLoading: false,
156
+      // 选中数组
157
+      ids: [],
158
+      // 非单个禁用
159
+      single: true,
160
+      // 非多个禁用
161
+      multiple: true,
162
+      // 显示搜索条件
163
+      showSearch: true,
164
+      // 总条数
165
+      total: 0,
166
+      // 政策信息表格数据
167
+      policyInfoList: [],
168
+      // 弹出层标题
169
+      title: "",
170
+      // 是否显示弹出层
171
+      open: false,
172
+      // 查询参数
173
+      queryParams: {
174
+        pageNum: 1,
175
+        pageSize: 10,
176
+        policyName: null,
177
+        createTime: null,
178
+        fileName: ''
179
+      },
180
+      // 表单参数
181
+      form: {},
182
+      // 表单校验
183
+      rules: {
184
+        policyId: [
185
+          { required: true, message: "政策id不能为空", trigger: "blur" }
186
+        ],
187
+      }
188
+    };
189
+  },
190
+  created() {
191
+    this.getList();
192
+  },
193
+  methods: {
194
+    handleFileUploaded(fileName) {
195
+      this.form.fileName = fileName;
196
+    },
197
+    fatherMethod(fileName){
198
+      this.form.fileName += fileName + " " ;
199
+    },
200
+    /** 查询政策信息列表 */
201
+    getList() {
202
+      this.loading = true;
203
+      listPolicyInfo(this.queryParams).then(response => {
204
+        this.policyInfoList = response.data.list;
205
+        this.total = response.data.total;
206
+        this.loading = false;
207
+      });
208
+    },
209
+    // 取消按钮
210
+    cancel() {
211
+      this.open = false;
212
+      this.reset();
213
+    },
214
+    // 表单重置
215
+    reset() {
216
+      this.form = {
217
+        policyId: null,
218
+        policyName: null,
219
+        url: null,
220
+        createTime: null,
221
+        fileName: ''
222
+      };
223
+      this.resetForm("form");
224
+    },
225
+    /** 搜索按钮操作 */
226
+    handleQuery() {
227
+      this.queryParams.pageNum = 1;
228
+      this.getList();
229
+    },
230
+    /** 重置按钮操作 */
231
+    resetQuery() {
232
+      this.resetForm("queryForm");
233
+      this.handleQuery();
234
+    },
235
+    // 多选框选中数据
236
+    handleSelectionChange(selection) {
237
+      this.ids = selection.map(item => item.policyId)
238
+      this.single = selection.length !== 1
239
+      this.multiple = !selection.length
240
+    },
241
+    /** 新增按钮操作 */
242
+    handleAdd() {
243
+      this.reset();
244
+      this.open = true;
245
+      this.title = "添加政策信息";
246
+    },
247
+    /** 修改按钮操作 */
248
+    handleUpdate(row) {
249
+      this.reset();
250
+      const policyId = row.policyId || this.ids
251
+      getPolicyInfo(policyId).then(response => {
252
+        this.form = response.data;
253
+        this.open = true;
254
+        this.title = "修改政策信息";
255
+      });
256
+    },
257
+    /** 提交按钮 */
258
+    submitForm() {
259
+      this.$refs["form"].validate(valid => {
260
+        if (valid) {
261
+          if (this.form.policyId != null) {
262
+            updatePolicyInfo(this.form).then(response => {
263
+              this.$modal.msgSuccess("修改成功");
264
+              this.open = false;
265
+              this.getList();
266
+            });
267
+          } else {
268
+            addPolicyInfo(this.form).then(response => {
269
+              this.$modal.msgSuccess("新增成功");
270
+              this.open = false;
271
+              this.getList();
272
+            });
273
+          }
274
+        }
275
+      });
276
+    },
277
+    /** 删除按钮操作 */
278
+    handleDelete(row) {
279
+      const policyIds = row.policyId || this.ids;
280
+      this.$modal.confirm('是否确认删除政策信息编号为"' + policyIds + '"的数据项?').then(function() {
281
+        return delPolicyInfo(policyIds);
282
+      }).then(() => {
283
+        this.getList();
284
+        this.$modal.msgSuccess("删除成功");
285
+      }).catch(() => {});
286
+    },
287
+    /** 导出按钮操作 */
288
+    handleExport() {
289
+      const queryParams = this.queryParams;
290
+      this.$modal.confirm('是否确认导出所有政策信息数据项?').then(() => {
291
+        this.exportLoading = true;
292
+        return exportPolicyInfo(queryParams);
293
+      }).then(response => {
294
+        this.$download.name(response.msg);
295
+        this.exportLoading = false;
296
+      }).catch(() => {});
297
+    }
298
+  }
299
+};
300
+</script>

+ 473 - 0
src/views/info/roomInfo/index.vue

@@ -0,0 +1,473 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类型" prop="typeId">
5
+        <template>
6
+          <el-select v-model="queryParams.typeId" filterable placeholder="请选择">
7
+            <el-option
8
+              v-for="item in roomTypeList"
9
+              :key="item.typeId"
10
+              :label="item.typeName"
11
+              :value="item.typeId">
12
+            </el-option>
13
+          </el-select>
14
+        </template>
15
+      </el-form-item>
16
+      <el-form-item label="大楼" prop="buildingId">
17
+        <template>
18
+          <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
19
+            <el-option
20
+              v-for="item in buildingList"
21
+              :key="item.buildingId"
22
+              :label="item.buildingName"
23
+              :value="item.buildingId">
24
+            </el-option>
25
+          </el-select>
26
+        </template>
27
+      </el-form-item>
28
+      <el-form-item label="户型" prop="houseTypeId">
29
+        <template>
30
+          <el-select v-model="queryParams.houseTypeId" filterable placeholder="请选择">
31
+            <el-option
32
+              v-for="item in houseTypeList"
33
+              :key="item.typeId"
34
+              :label="item.typeName"
35
+              :value="item.typeId">
36
+            </el-option>
37
+          </el-select>
38
+        </template>
39
+      </el-form-item>
40
+      <el-form-item label="房间名称" prop="roomName">
41
+        <el-input
42
+          v-model="queryParams.roomName"
43
+          placeholder="请输入房间名称"
44
+          clearable
45
+          size="small"
46
+          @keyup.enter.native="handleQuery"
47
+        />
48
+      </el-form-item>
49
+      <el-form-item>
50
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
51
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
52
+      </el-form-item>
53
+    </el-form>
54
+
55
+    <el-row :gutter="10" class="mb8">
56
+      <el-col :span="1.5">
57
+        <el-button
58
+          type="primary"
59
+          plain
60
+          icon="el-icon-plus"
61
+          size="mini"
62
+          @click="handleAdd"
63
+          v-hasPermi="['info:roomInfo:add']"
64
+        >新增</el-button>
65
+      </el-col>
66
+      <el-col :span="1.5">
67
+        <el-button
68
+          type="success"
69
+          plain
70
+          icon="el-icon-edit"
71
+          size="mini"
72
+          :disabled="single"
73
+          @click="handleUpdate"
74
+          v-hasPermi="['info:roomInfo:edit']"
75
+        >修改</el-button>
76
+      </el-col>
77
+      <el-col :span="1.5">
78
+        <el-button
79
+          type="danger"
80
+          plain
81
+          icon="el-icon-delete"
82
+          size="mini"
83
+          :disabled="multiple"
84
+          @click="handleDelete"
85
+          v-hasPermi="['info:roomInfo:remove']"
86
+        >删除</el-button>
87
+      </el-col>
88
+      <el-col :span="1.5">
89
+        <el-button
90
+          type="warning"
91
+          plain
92
+          icon="el-icon-download"
93
+          size="mini"
94
+          :loading="exportLoading"
95
+          @click="handleExport"
96
+          v-hasPermi="['info:roomInfo:export']"
97
+        >导出</el-button>
98
+      </el-col>
99
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
100
+    </el-row>
101
+
102
+    <el-table v-loading="loading" :data="roomInfoList" @selection-change="handleSelectionChange">
103
+      <el-table-column type="selection" width="55" align="center" />
104
+      <el-table-column label="房间编号" align="center" prop="roomId" />
105
+      <el-table-column label="类型" align="center">
106
+        <template slot-scope="scope">
107
+          {{ getRoomTypeName(scope.row.typeId) }}
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column label="大楼" align="center">
111
+        <template slot-scope="scope">
112
+          {{ getBuildingName(scope.row.buildingId) }}
113
+        </template>
114
+      </el-table-column>
115
+      <el-table-column label="大楼" align="center">
116
+        <template slot-scope="scope">
117
+          {{ getHouseTypeName(scope.row.houseTypeId) }}
118
+        </template>
119
+      </el-table-column>
120
+      <el-table-column label="房间名称" align="center" prop="roomName" />
121
+      <el-table-column label="是否已同步" align="center">
122
+        <template slot-scope="scope">
123
+          {{ getSyncStatusText(scope.row.synStatus) }}
124
+        </template>
125
+    </el-table-column>
126
+
127
+      <el-table-column label="二维坐标" align="center" prop="lngLat" />
128
+      <el-table-column label="三维坐标" align="center" prop="rasterLngLat" />
129
+      <el-table-column label="楼层编码" align="center" prop="levelNumber" />
130
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
131
+        <template slot-scope="scope">
132
+          <el-button
133
+            size="mini"
134
+            type="text"
135
+            icon="el-icon-edit"
136
+            @click="handleUpdate(scope.row)"
137
+            v-hasPermi="['info:roomInfo:edit']"
138
+          >修改</el-button>
139
+          <el-button
140
+            size="mini"
141
+            type="text"
142
+            icon="el-icon-delete"
143
+            @click="handleDelete(scope.row)"
144
+            v-hasPermi="['info:roomInfo:remove']"
145
+          >删除</el-button>
146
+        </template>
147
+      </el-table-column>
148
+    </el-table>
149
+
150
+    <pagination
151
+      v-show="total>0"
152
+      :total="total"
153
+      :page.sync="queryParams.pageNum"
154
+      :limit.sync="queryParams.pageSize"
155
+      @pagination="getList"
156
+    />
157
+
158
+    <!-- 添加或修改房间信息对话框 -->
159
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
160
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
161
+        <el-form-item label="类型" prop="typeId">
162
+          <template>
163
+            <el-select v-model="form.typeId" filterable placeholder="请选择">
164
+              <el-option
165
+                v-for="item in roomTypeList"
166
+                :key="item.typeId"
167
+                :label="item.typeName"
168
+                :value="item.typeId">
169
+              </el-option>
170
+            </el-select>
171
+          </template>
172
+        </el-form-item>
173
+        <el-form-item label="大楼" prop="buildingId">
174
+          <template>
175
+            <el-select v-model="form.buildingId" filterable placeholder="请选择">
176
+              <el-option
177
+                v-for="item in buildingList"
178
+                :key="item.buildingId"
179
+                :label="item.buildingName"
180
+                :value="item.buildingId">
181
+              </el-option>
182
+            </el-select>
183
+          </template>
184
+        </el-form-item>
185
+        <el-form-item label="户型" prop="houseTypeId">
186
+          <template>
187
+            <el-select v-model="form.houseTypeId" filterable placeholder="请选择">
188
+              <el-option
189
+                v-for="item in houseTypeList"
190
+                :key="item.typeId"
191
+                :label="item.typeName"
192
+                :value="item.typeId">
193
+              </el-option>
194
+            </el-select>
195
+          </template>
196
+        </el-form-item>
197
+        <el-form-item label="房间名称" prop="roomName">
198
+          <el-input v-model="form.roomName" placeholder="请输入房间名称" />
199
+        </el-form-item>
200
+        <el-form-item label="地图编码" prop="mapCode">
201
+          <el-input-number v-model="form.mapCode" controls-position="right"   :min="0" placeholder="请输入地图编码" />
202
+        </el-form-item>
203
+
204
+        <el-form-item label="英文名称" prop="enName">
205
+          <el-input v-model="form.enName" placeholder="请输入英文名称" />
206
+        </el-form-item>
207
+        <el-form-item label="别名" prop="alias">
208
+          <el-input v-model="form.alias" placeholder="请输入别名" />
209
+        </el-form-item>
210
+        <el-form-item label="排序" prop="orderId">
211
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
212
+        </el-form-item>
213
+
214
+        <el-form-item label="是否已同步">
215
+          <el-switch v-model="form.synStatus"></el-switch>
216
+        </el-form-item>
217
+        <el-form-item label="简介" prop="brief">
218
+          <el-input v-model="form.brief" placeholder="请输入简介" />
219
+        </el-form-item>
220
+        <el-form-item label="二维坐标" prop="lngLat">
221
+          <el-input v-model="form.lngLat" placeholder="请输入二维坐标" />
222
+        </el-form-item>
223
+        <el-form-item label="三维坐标" prop="rasterLngLat">
224
+          <el-input v-model="form.rasterLngLat" placeholder="请输入三维坐标" />
225
+        </el-form-item>
226
+        <el-form-item label="备注" prop="memo">
227
+          <el-input v-model="form.memo" placeholder="请输入备注" />
228
+        </el-form-item>
229
+        <el-form-item label="地址" prop="address">
230
+          <el-input v-model="form.address" placeholder="请输入地址" />
231
+        </el-form-item>
232
+        <el-form-item label="楼层编码" prop="levelNumber">
233
+          <el-input-number v-model="form.levelNumber" controls-position="right"   :min="0" placeholder="请输入楼层编码" />
234
+        </el-form-item>
235
+
236
+        <el-form-item label="面积" prop="acreage">
237
+          <el-input-number v-model="form.acreage" controls-position="right"   :min="0" placeholder="请输入面积" />
238
+        </el-form-item>
239
+
240
+<!--        <el-form-item label="大楼名称:building_name" prop="buildingName">-->
241
+<!--          <el-input v-model="form.buildingName" placeholder="请输入大楼名称:building_name" />-->
242
+<!--        </el-form-item>-->
243
+        <el-form-item label="门牌号" prop="hourseNumber">
244
+          <el-input v-model="form.hourseNumber" placeholder="请输入门牌号" />
245
+        </el-form-item>
246
+      </el-form>
247
+      <div slot="footer" class="dialog-footer">
248
+        <el-button type="primary" @click="submitForm">确 定</el-button>
249
+        <el-button @click="cancel">取 消</el-button>
250
+      </div>
251
+    </el-dialog>
252
+  </div>
253
+</template>
254
+
255
+<script>
256
+import { listRoomInfo, getRoomInfo, delRoomInfo, addRoomInfo, updateRoomInfo, exportRoomInfo } from "@/api/info/roomInfo";
257
+import { listBuildingInfo, getBuildingInfo } from "@/api/info/buildingInfo";
258
+import { listRoomType, getRoomType } from "@/api/type/roomType";
259
+import { listHouseType, getHouseType } from "@/api/type/houseType";
260
+export default {
261
+  name: "RoomInfo",
262
+  data() {
263
+    return {
264
+      houseTypeList: [],
265
+      roomTypeList: [],
266
+      buildingList: [],
267
+      // 遮罩层
268
+      loading: true,
269
+      // 导出遮罩层
270
+      exportLoading: false,
271
+      // 选中数组
272
+      ids: [],
273
+      // 非单个禁用
274
+      single: true,
275
+      // 非多个禁用
276
+      multiple: true,
277
+      // 显示搜索条件
278
+      showSearch: true,
279
+      // 总条数
280
+      total: 0,
281
+      // 房间信息表格数据
282
+      roomInfoList: [],
283
+      // 弹出层标题
284
+      title: "",
285
+      // 是否显示弹出层
286
+      open: false,
287
+      // 查询参数
288
+      queryParams: {
289
+        pageNum: 1,
290
+        pageSize: 10,
291
+        typeId: null,
292
+        buildingId: null,
293
+        houseTypeId: null,
294
+        roomName: null,
295
+      },
296
+      queryBuildingParams: {
297
+        pageNum: 1,
298
+        pageSize: 999999,
299
+      },
300
+
301
+      // 表单参数
302
+      form: {},
303
+      // 表单校验
304
+      rules: {
305
+        roomId: [
306
+          { required: true, message: "房间编号不能为空", trigger: "blur" }
307
+        ],
308
+      }
309
+    };
310
+  },
311
+  created() {
312
+    this.getList();
313
+    this.getBuilding();
314
+    this.getRoomTypeLst();
315
+    this.getHouseTypeLst();
316
+
317
+  },
318
+  methods: {
319
+
320
+    getSyncStatusText(synStatus) {
321
+      return synStatus ? '已同步' : '未同步';
322
+    },
323
+
324
+    getHouseTypeName(typeId) {
325
+      const houseType = this.houseTypeList.find(b => b.typeId === typeId);
326
+      return houseType ? houseType.typeName : '未知';
327
+    },
328
+
329
+    getRoomTypeName(typeId) {
330
+      const roomType = this.roomTypeList.find(b => b.typeId === typeId);
331
+      return roomType ? roomType.typeName : '未知';
332
+    },
333
+
334
+    getBuildingName(buildingId) {
335
+      const building = this.buildingList.find(b => b.buildingId === buildingId);
336
+      return building ? building.buildingName : '未知';
337
+    },
338
+
339
+    getHouseTypeLst() {
340
+      listHouseType(this.queryBuildingParams).then(response => {
341
+        this.houseTypeList = response.data.list;
342
+      });
343
+    },
344
+
345
+
346
+    getRoomTypeLst() {
347
+      listRoomType(this.queryBuildingParams).then(response => {
348
+        this.roomTypeList = response.data.list;
349
+      });
350
+    },
351
+
352
+    getBuilding() {
353
+      listBuildingInfo(this.queryBuildingParams).then(response => {
354
+        this.buildingList = response.data.list;
355
+      });
356
+    },
357
+
358
+    /** 查询房间信息列表 */
359
+    getList() {
360
+      this.loading = true;
361
+      listRoomInfo(this.queryParams).then(response => {
362
+        this.roomInfoList = response.data.list;
363
+        this.total = response.data.total;
364
+        this.loading = false;
365
+      });
366
+    },
367
+    // 取消按钮
368
+    cancel() {
369
+      this.open = false;
370
+      this.reset();
371
+    },
372
+    // 表单重置
373
+    reset() {
374
+      this.form = {
375
+        roomId: null,
376
+        typeId: null,
377
+        buildingId: null,
378
+        houseTypeId: null,
379
+        roomName: null,
380
+        mapCode: null,
381
+        enName: null,
382
+        alias: null,
383
+        orderId: null,
384
+        synStatus: true,
385
+        delete: true,
386
+        brief: null,
387
+        lngLat: null,
388
+        rasterLngLat: null,
389
+        memo: null,
390
+        address: null,
391
+        levelNumber: null,
392
+        acreage: null,
393
+        buildingName: null,
394
+        hourseNumber: null
395
+      };
396
+      this.resetForm("form");
397
+    },
398
+    /** 搜索按钮操作 */
399
+    handleQuery() {
400
+      this.queryParams.pageNum = 1;
401
+      this.getList();
402
+    },
403
+    /** 重置按钮操作 */
404
+    resetQuery() {
405
+      this.resetForm("queryForm");
406
+      this.handleQuery();
407
+    },
408
+    // 多选框选中数据
409
+    handleSelectionChange(selection) {
410
+      this.ids = selection.map(item => item.roomId)
411
+      this.single = selection.length!==1
412
+      this.multiple = !selection.length
413
+    },
414
+    /** 新增按钮操作 */
415
+    handleAdd() {
416
+      this.reset();
417
+      this.open = true;
418
+      this.title = "添加房间信息";
419
+    },
420
+    /** 修改按钮操作 */
421
+    handleUpdate(row) {
422
+      this.reset();
423
+      const roomId = row.roomId || this.ids
424
+      getRoomInfo(roomId).then(response => {
425
+        this.form = response.data;
426
+        this.open = true;
427
+        this.title = "修改房间信息";
428
+      });
429
+    },
430
+    /** 提交按钮 */
431
+    submitForm() {
432
+      this.$refs["form"].validate(valid => {
433
+        if (valid) {
434
+          if (this.form.roomId != null) {
435
+            updateRoomInfo(this.form).then(response => {
436
+              this.$modal.msgSuccess("修改成功");
437
+              this.open = false;
438
+              this.getList();
439
+            });
440
+          } else {
441
+            addRoomInfo(this.form).then(response => {
442
+              this.$modal.msgSuccess("新增成功");
443
+              this.open = false;
444
+              this.getList();
445
+            });
446
+          }
447
+        }
448
+      });
449
+    },
450
+    /** 删除按钮操作 */
451
+    handleDelete(row) {
452
+      const roomIds = row.roomId || this.ids;
453
+      this.$modal.confirm('是否确认删除房间信息编号为"' + roomIds + '"的数据项?').then(function() {
454
+        return delRoomInfo(roomIds);
455
+      }).then(() => {
456
+        this.getList();
457
+        this.$modal.msgSuccess("删除成功");
458
+      }).catch(() => {});
459
+    },
460
+    /** 导出按钮操作 */
461
+    handleExport() {
462
+      const queryParams = this.queryParams;
463
+      this.$modal.confirm('是否确认导出所有房间信息数据项?').then(() => {
464
+        this.exportLoading = true;
465
+        return exportRoomInfo(queryParams);
466
+      }).then(response => {
467
+        this.$download.name(response.msg);
468
+        this.exportLoading = false;
469
+      }).catch(() => {});
470
+    }
471
+  }
472
+};
473
+</script>

+ 330 - 0
src/views/info/stationInfo/index.vue

@@ -0,0 +1,330 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="站点名称" prop="stationName">
5
+        <el-input
6
+          v-model="queryParams.stationName"
7
+          placeholder="请输入站点名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item label="备注" prop="memo">
14
+        <el-input
15
+          v-model="queryParams.memo"
16
+          placeholder="请输入备注"
17
+          clearable
18
+          size="small"
19
+          @keyup.enter.native="handleQuery"
20
+        />
21
+      </el-form-item>
22
+      <el-form-item label="车辆" prop="trafficId">
23
+        <template>
24
+          <el-select v-model="queryParams.trafficId" filterable placeholder="请选择">
25
+            <el-option
26
+              v-for="item in trafficList"
27
+              :key="item.trafficId"
28
+              :label="item.trafficName"
29
+              :value="item.trafficId">
30
+            </el-option>
31
+          </el-select>
32
+        </template>
33
+      </el-form-item>
34
+      <el-form-item>
35
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
36
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
37
+      </el-form-item>
38
+    </el-form>
39
+
40
+    <el-row :gutter="10" class="mb8">
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="primary"
44
+          plain
45
+          icon="el-icon-plus"
46
+          size="mini"
47
+          @click="handleAdd"
48
+          v-hasPermi="['info:stationInfo:add']"
49
+        >新增</el-button>
50
+      </el-col>
51
+      <el-col :span="1.5">
52
+        <el-button
53
+          type="success"
54
+          plain
55
+          icon="el-icon-edit"
56
+          size="mini"
57
+          :disabled="single"
58
+          @click="handleUpdate"
59
+          v-hasPermi="['info:stationInfo:edit']"
60
+        >修改</el-button>
61
+      </el-col>
62
+      <el-col :span="1.5">
63
+        <el-button
64
+          type="danger"
65
+          plain
66
+          icon="el-icon-delete"
67
+          size="mini"
68
+          :disabled="multiple"
69
+          @click="handleDelete"
70
+          v-hasPermi="['info:stationInfo:remove']"
71
+        >删除</el-button>
72
+      </el-col>
73
+      <el-col :span="1.5">
74
+        <el-button
75
+          type="warning"
76
+          plain
77
+          icon="el-icon-download"
78
+          size="mini"
79
+          :loading="exportLoading"
80
+          @click="handleExport"
81
+          v-hasPermi="['info:stationInfo:export']"
82
+        >导出</el-button>
83
+      </el-col>
84
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
85
+    </el-row>
86
+
87
+    <el-table v-loading="loading" :data="stationInfoList" @selection-change="handleSelectionChange">
88
+      <el-table-column type="selection" width="55" align="center" />
89
+      <el-table-column label="站点id" align="center" prop="stationId" />
90
+      <el-table-column label="站点名称" align="center" prop="stationName" />
91
+      <el-table-column label="二维坐标" align="center" prop="lngLat" />
92
+      <el-table-column label="三维坐标" align="center" prop="rasterLngLat" />
93
+      <el-table-column label="车辆" align="center">
94
+        <template slot-scope="scope">
95
+          {{ getTrafficName(scope.row.trafficId) }}
96
+        </template>
97
+      </el-table-column>
98
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
99
+        <template slot-scope="scope">
100
+          <el-button
101
+            size="mini"
102
+            type="text"
103
+            icon="el-icon-edit"
104
+            @click="handleUpdate(scope.row)"
105
+            v-hasPermi="['info:stationInfo:edit']"
106
+          >修改</el-button>
107
+          <el-button
108
+            size="mini"
109
+            type="text"
110
+            icon="el-icon-delete"
111
+            @click="handleDelete(scope.row)"
112
+            v-hasPermi="['info:stationInfo:remove']"
113
+          >删除</el-button>
114
+        </template>
115
+      </el-table-column>
116
+    </el-table>
117
+
118
+    <pagination
119
+      v-show="total>0"
120
+      :total="total"
121
+      :page.sync="queryParams.pageNum"
122
+      :limit.sync="queryParams.pageSize"
123
+      @pagination="getList"
124
+    />
125
+
126
+    <!-- 添加或修改站点信息对话框 -->
127
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
128
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
129
+        <el-form-item label="站点名称" prop="stationName">
130
+          <el-input v-model="form.stationName" placeholder="请输入站点名称" />
131
+        </el-form-item>
132
+        <el-form-item label="备注" prop="memo">
133
+          <el-input v-model="form.memo" placeholder="请输入备注" />
134
+        </el-form-item>
135
+        <el-form-item label="二维坐标" prop="lngLat">
136
+          <el-input v-model="form.lngLat" placeholder="请输入二维坐标" />
137
+        </el-form-item>
138
+        <el-form-item label="三维坐标" prop="rasterLngLat">
139
+          <el-input v-model="form.rasterLngLat" placeholder="请输入三维坐标" />
140
+        </el-form-item>
141
+        <el-form-item label="车辆" prop="trafficId">
142
+          <template>
143
+            <el-select v-model="form.trafficId" filterable placeholder="请选择">
144
+              <el-option
145
+                v-for="item in trafficList"
146
+                :key="item.trafficId"
147
+                :label="item.trafficName"
148
+                :value="item.trafficId">
149
+              </el-option>
150
+            </el-select>
151
+          </template>
152
+        </el-form-item>
153
+      </el-form>
154
+      <div slot="footer" class="dialog-footer">
155
+        <el-button type="primary" @click="submitForm">确 定</el-button>
156
+        <el-button @click="cancel">取 消</el-button>
157
+      </div>
158
+    </el-dialog>
159
+  </div>
160
+</template>
161
+
162
+<script>
163
+import { listStationInfo, getStationInfo, delStationInfo, addStationInfo, updateStationInfo, exportStationInfo } from "@/api/info/stationInfo";
164
+import { listTrafficInfo, getTrafficInfo } from "@/api/info/trafficInfo";
165
+
166
+export default {
167
+  name: "StationInfo",
168
+  data() {
169
+    return {
170
+      trafficList: [],
171
+      // 遮罩层
172
+      loading: true,
173
+      // 导出遮罩层
174
+      exportLoading: false,
175
+      // 选中数组
176
+      ids: [],
177
+      // 非单个禁用
178
+      single: true,
179
+      // 非多个禁用
180
+      multiple: true,
181
+      // 显示搜索条件
182
+      showSearch: true,
183
+      // 总条数
184
+      total: 0,
185
+      // 站点信息表格数据
186
+      stationInfoList: [],
187
+      // 弹出层标题
188
+      title: "",
189
+      // 是否显示弹出层
190
+      open: false,
191
+      // 查询参数
192
+      queryParams: {
193
+        pageNum: 1,
194
+        pageSize: 10,
195
+        stationName: null,
196
+        memo: null,
197
+        trafficId: null
198
+      },
199
+      queryTypeParams: {
200
+        pageNum: 1,
201
+        pageSize: 999999,
202
+      },
203
+      // 表单参数
204
+      form: {},
205
+      // 表单校验
206
+      rules: {
207
+        stationId: [
208
+          { required: true, message: "站点id不能为空", trigger: "blur" }
209
+        ],
210
+      }
211
+    };
212
+  },
213
+  created() {
214
+    this.getList();
215
+    this.getTrafficList();
216
+  },
217
+  methods: {
218
+
219
+    getTrafficName(trafficId) {
220
+      const trafficName = this.trafficList.find(item => item.trafficId === trafficId);
221
+      return trafficName ? trafficName.trafficName : '';
222
+    },
223
+
224
+    getTrafficList(){
225
+      listTrafficInfo().then(response => {
226
+        this.trafficList = response.data.list;
227
+      });
228
+    },
229
+    /** 查询站点信息列表 */
230
+    getList() {
231
+      this.loading = true;
232
+      listStationInfo(this.queryParams).then(response => {
233
+        this.stationInfoList = response.data.list;
234
+        this.total = response.data.total;
235
+        this.loading = false;
236
+      });
237
+    },
238
+    // 取消按钮
239
+    cancel() {
240
+      this.open = false;
241
+      this.reset();
242
+    },
243
+    // 表单重置
244
+    reset() {
245
+      this.form = {
246
+        stationId: null,
247
+        stationName: null,
248
+        memo: null,
249
+        lngLat: null,
250
+        rasterLngLat: null,
251
+        trafficId: null
252
+      };
253
+      this.resetForm("form");
254
+    },
255
+    /** 搜索按钮操作 */
256
+    handleQuery() {
257
+      this.queryParams.pageNum = 1;
258
+      this.getList();
259
+    },
260
+    /** 重置按钮操作 */
261
+    resetQuery() {
262
+      this.resetForm("queryForm");
263
+      this.handleQuery();
264
+    },
265
+    // 多选框选中数据
266
+    handleSelectionChange(selection) {
267
+      this.ids = selection.map(item => item.stationId)
268
+      this.single = selection.length!==1
269
+      this.multiple = !selection.length
270
+    },
271
+    /** 新增按钮操作 */
272
+    handleAdd() {
273
+      this.reset();
274
+      this.open = true;
275
+      this.title = "添加站点信息";
276
+    },
277
+    /** 修改按钮操作 */
278
+    handleUpdate(row) {
279
+      this.reset();
280
+      const stationId = row.stationId || this.ids
281
+      getStationInfo(stationId).then(response => {
282
+        this.form = response.data;
283
+        this.open = true;
284
+        this.title = "修改站点信息";
285
+      });
286
+    },
287
+    /** 提交按钮 */
288
+    submitForm() {
289
+      this.$refs["form"].validate(valid => {
290
+        if (valid) {
291
+          if (this.form.stationId != null) {
292
+            updateStationInfo(this.form).then(response => {
293
+              this.$modal.msgSuccess("修改成功");
294
+              this.open = false;
295
+              this.getList();
296
+            });
297
+          } else {
298
+            addStationInfo(this.form).then(response => {
299
+              this.$modal.msgSuccess("新增成功");
300
+              this.open = false;
301
+              this.getList();
302
+            });
303
+          }
304
+        }
305
+      });
306
+    },
307
+    /** 删除按钮操作 */
308
+    handleDelete(row) {
309
+      const stationIds = row.stationId || this.ids;
310
+      this.$modal.confirm('是否确认删除站点信息编号为"' + stationIds + '"的数据项?').then(function() {
311
+        return delStationInfo(stationIds);
312
+      }).then(() => {
313
+        this.getList();
314
+        this.$modal.msgSuccess("删除成功");
315
+      }).catch(() => {});
316
+    },
317
+    /** 导出按钮操作 */
318
+    handleExport() {
319
+      const queryParams = this.queryParams;
320
+      this.$modal.confirm('是否确认导出所有站点信息数据项?').then(() => {
321
+        this.exportLoading = true;
322
+        return exportStationInfo(queryParams);
323
+      }).then(response => {
324
+        this.$download.name(response.msg);
325
+        this.exportLoading = false;
326
+      }).catch(() => {});
327
+    }
328
+  }
329
+};
330
+</script>

+ 327 - 0
src/views/info/trafficInfo/index.vue

@@ -0,0 +1,327 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别" prop="typeId">
5
+        <template>
6
+          <el-select v-model="queryParams.typeId" filterable placeholder="请选择">
7
+            <el-option
8
+              v-for="item in trafficTypeList"
9
+              :key="item.typeId"
10
+              :label="item.typeName"
11
+              :value="item.typeId">
12
+            </el-option>
13
+          </el-select>
14
+        </template>
15
+      </el-form-item>
16
+      <el-form-item label="名字" prop="trafficName">
17
+        <el-input
18
+          v-model="queryParams.trafficName"
19
+          placeholder="请输入名字"
20
+          clearable
21
+          size="small"
22
+          @keyup.enter.native="handleQuery"
23
+        />
24
+      </el-form-item>
25
+      <el-form-item>
26
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
27
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
28
+      </el-form-item>
29
+    </el-form>
30
+
31
+    <el-row :gutter="10" class="mb8">
32
+      <el-col :span="1.5">
33
+        <el-button
34
+          type="primary"
35
+          plain
36
+          icon="el-icon-plus"
37
+          size="mini"
38
+          @click="handleAdd"
39
+          v-hasPermi="['info:trafficInfo:add']"
40
+        >新增</el-button>
41
+      </el-col>
42
+      <el-col :span="1.5">
43
+        <el-button
44
+          type="success"
45
+          plain
46
+          icon="el-icon-edit"
47
+          size="mini"
48
+          :disabled="single"
49
+          @click="handleUpdate"
50
+          v-hasPermi="['info:trafficInfo:edit']"
51
+        >修改</el-button>
52
+      </el-col>
53
+      <el-col :span="1.5">
54
+        <el-button
55
+          type="danger"
56
+          plain
57
+          icon="el-icon-delete"
58
+          size="mini"
59
+          :disabled="multiple"
60
+          @click="handleDelete"
61
+          v-hasPermi="['info:trafficInfo:remove']"
62
+        >删除</el-button>
63
+      </el-col>
64
+      <el-col :span="1.5">
65
+        <el-button
66
+          type="warning"
67
+          plain
68
+          icon="el-icon-download"
69
+          size="mini"
70
+          :loading="exportLoading"
71
+          @click="handleExport"
72
+          v-hasPermi="['info:trafficInfo:export']"
73
+        >导出</el-button>
74
+      </el-col>
75
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
76
+    </el-row>
77
+
78
+    <el-table v-loading="loading" :data="trafficInfoList" @selection-change="handleSelectionChange">
79
+      <el-table-column type="selection" width="55" align="center" />
80
+      <el-table-column label="交通id" align="center" prop="trafficId" />
81
+      <el-table-column label="类型" align="center">
82
+        <template slot-scope="scope">
83
+          {{ getTrafficTypeName(scope.row.typeId) }}
84
+        </template>
85
+      </el-table-column>
86
+      <el-table-column label="名字" align="center" prop="trafficName" />
87
+      <el-table-column label="数量" align="center" prop="amount" />
88
+      <el-table-column label="颜色" prop="colour">
89
+        <template slot-scope="scope">
90
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
91
+        </template>
92
+      </el-table-column>
93
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
94
+        <template slot-scope="scope">
95
+          <el-button
96
+            size="mini"
97
+            type="text"
98
+            icon="el-icon-edit"
99
+            @click="handleUpdate(scope.row)"
100
+            v-hasPermi="['info:trafficInfo:edit']"
101
+          >修改</el-button>
102
+          <el-button
103
+            size="mini"
104
+            type="text"
105
+            icon="el-icon-delete"
106
+            @click="handleDelete(scope.row)"
107
+            v-hasPermi="['info:trafficInfo:remove']"
108
+          >删除</el-button>
109
+        </template>
110
+      </el-table-column>
111
+    </el-table>
112
+
113
+    <pagination
114
+      v-show="total>0"
115
+      :total="total"
116
+      :page.sync="queryParams.pageNum"
117
+      :limit.sync="queryParams.pageSize"
118
+      @pagination="getList"
119
+    />
120
+
121
+    <!-- 添加或修改交通对象对话框 -->
122
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
123
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
124
+        <el-form-item label="类别" prop="typeId">
125
+          <template>
126
+            <el-select v-model="form.typeId" filterable placeholder="请选择">
127
+              <el-option
128
+                v-for="item in trafficTypeList"
129
+                :key="item.typeId"
130
+                :label="item.typeName"
131
+                :value="item.typeId">
132
+              </el-option>
133
+            </el-select>
134
+          </template>
135
+        </el-form-item>
136
+        <el-form-item label="名字" prop="trafficName">
137
+          <el-input v-model="form.trafficName" placeholder="请输入名字" />
138
+        </el-form-item>
139
+        <el-form-item label="数量" prop="amount">
140
+          <el-input-number v-model="form.amount" controls-position="right"   :min="0" placeholder="请输入数量" />
141
+        </el-form-item>
142
+
143
+        <el-form-item label="备注" prop="memo">
144
+          <el-input v-model="form.memo" placeholder="请输入备注" />
145
+        </el-form-item>
146
+        <el-form-item label="颜色">
147
+          <el-color-picker v-model="form.colour"></el-color-picker>
148
+        </el-form-item>
149
+      </el-form>
150
+      <div slot="footer" class="dialog-footer">
151
+        <el-button type="primary" @click="submitForm">确 定</el-button>
152
+        <el-button @click="cancel">取 消</el-button>
153
+      </div>
154
+    </el-dialog>
155
+  </div>
156
+</template>
157
+
158
+<script>
159
+import { listTrafficInfo, getTrafficInfo, delTrafficInfo, addTrafficInfo, updateTrafficInfo, exportTrafficInfo } from "@/api/info/trafficInfo";
160
+import { listTrafficType, getTrafficType } from "@/api/type/trafficType";
161
+export default {
162
+  name: "TrafficInfo",
163
+  data() {
164
+    return {
165
+      trafficTypeList: [],
166
+      // 遮罩层
167
+      loading: true,
168
+      // 导出遮罩层
169
+      exportLoading: false,
170
+      // 选中数组
171
+      ids: [],
172
+      // 非单个禁用
173
+      single: true,
174
+      // 非多个禁用
175
+      multiple: true,
176
+      // 显示搜索条件
177
+      showSearch: true,
178
+      // 总条数
179
+      total: 0,
180
+      // 交通对象表格数据
181
+      trafficInfoList: [],
182
+      // 弹出层标题
183
+      title: "",
184
+      // 是否显示弹出层
185
+      open: false,
186
+      // 查询参数
187
+      queryParams: {
188
+        pageNum: 1,
189
+        pageSize: 10,
190
+        typeId: null,
191
+        trafficName: null,
192
+      },
193
+      queryTypeParams: {
194
+        pageNum: 1,
195
+        pageSize: 9999,
196
+      },
197
+      // 表单参数
198
+      form: {},
199
+      // 表单校验
200
+      rules: {
201
+        trafficId: [
202
+          { required: true, message: "交通id不能为空", trigger: "blur" }
203
+        ],
204
+        typeId: [
205
+          { required: true, message: "类别不能为空", trigger: "change" }
206
+        ],
207
+      }
208
+    };
209
+  },
210
+  created() {
211
+    this.getList();
212
+    this.getTrafficTypes();
213
+  },
214
+  methods: {
215
+
216
+    getTrafficTypeName(typeId) {
217
+      const type = this.trafficTypeList.find(b => b.typeId === typeId);
218
+      return type ? type.typeName : '未知';
219
+    },
220
+
221
+    getTrafficTypes() {
222
+      listTrafficType(this.queryTypeParams).then(response => {
223
+        this.trafficTypeList = response.data.list;
224
+      });
225
+    },
226
+    /** 查询交通对象列表 */
227
+    getList() {
228
+      this.loading = true;
229
+      listTrafficInfo(this.queryParams).then(response => {
230
+        this.trafficInfoList = response.data.list;
231
+        this.total = response.data.total;
232
+        this.loading = false;
233
+      });
234
+    },
235
+    // 取消按钮
236
+    cancel() {
237
+      this.open = false;
238
+      this.reset();
239
+    },
240
+    // 表单重置
241
+    reset() {
242
+      this.form = {
243
+        trafficId: null,
244
+        typeId: null,
245
+        trafficName: null,
246
+        amount: null,
247
+        memo: null,
248
+        colour: null
249
+      };
250
+      this.resetForm("form");
251
+    },
252
+    /** 搜索按钮操作 */
253
+    handleQuery() {
254
+      this.queryParams.pageNum = 1;
255
+      this.getList();
256
+    },
257
+    /** 重置按钮操作 */
258
+    resetQuery() {
259
+      this.resetForm("queryForm");
260
+      this.handleQuery();
261
+    },
262
+    // 多选框选中数据
263
+    handleSelectionChange(selection) {
264
+      this.ids = selection.map(item => item.trafficId)
265
+      this.single = selection.length!==1
266
+      this.multiple = !selection.length
267
+    },
268
+    /** 新增按钮操作 */
269
+    handleAdd() {
270
+      this.reset();
271
+      this.open = true;
272
+      this.title = "添加交通对象";
273
+    },
274
+    /** 修改按钮操作 */
275
+    handleUpdate(row) {
276
+      this.reset();
277
+      const trafficId = row.trafficId || this.ids
278
+      getTrafficInfo(trafficId).then(response => {
279
+        this.form = response.data;
280
+        this.open = true;
281
+        this.title = "修改交通对象";
282
+      });
283
+    },
284
+    /** 提交按钮 */
285
+    submitForm() {
286
+      this.$refs["form"].validate(valid => {
287
+        if (valid) {
288
+          if (this.form.trafficId != null) {
289
+            updateTrafficInfo(this.form).then(response => {
290
+              this.$modal.msgSuccess("修改成功");
291
+              this.open = false;
292
+              this.getList();
293
+            });
294
+          } else {
295
+            addTrafficInfo(this.form).then(response => {
296
+              this.$modal.msgSuccess("新增成功");
297
+              this.open = false;
298
+              this.getList();
299
+            });
300
+          }
301
+        }
302
+      });
303
+    },
304
+    /** 删除按钮操作 */
305
+    handleDelete(row) {
306
+      const trafficIds = row.trafficId || this.ids;
307
+      this.$modal.confirm('是否确认删除交通对象编号为"' + trafficIds + '"的数据项?').then(function() {
308
+        return delTrafficInfo(trafficIds);
309
+      }).then(() => {
310
+        this.getList();
311
+        this.$modal.msgSuccess("删除成功");
312
+      }).catch(() => {});
313
+    },
314
+    /** 导出按钮操作 */
315
+    handleExport() {
316
+      const queryParams = this.queryParams;
317
+      this.$modal.confirm('是否确认导出所有交通对象数据项?').then(() => {
318
+        this.exportLoading = true;
319
+        return exportTrafficInfo(queryParams);
320
+      }).then(response => {
321
+        this.$download.name(response.msg);
322
+        this.exportLoading = false;
323
+      }).catch(() => {});
324
+    }
325
+  }
326
+};
327
+</script>

+ 304 - 0
src/views/type/areaType/index.vue

@@ -0,0 +1,304 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别名称" prop="typeName">
5
+        <el-input
6
+          v-model="queryParams.typeName"
7
+          placeholder="请输入类别名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['type:areaType:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['type:areaType:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['type:areaType:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['type:areaType:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="areaTypeList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="类别id" align="center" prop="typeId" />
69
+      <el-table-column label="类别名称" align="center" prop="typeName" />
70
+      <el-table-column label="是否可点击" align="center" prop="click">
71
+        <template slot-scope="scope">
72
+          <el-button v-if="scope.row.click" type="success" size="mini" round>是</el-button>
73
+          <el-button v-else type="info" size="mini" round>否</el-button>
74
+        </template>
75
+      </el-table-column>
76
+      <el-table-column label="是否可搜索" align="center" prop="search">
77
+        <template slot-scope="scope">
78
+          <el-button v-if="scope.row.search" type="success" size="mini" round>是</el-button>
79
+          <el-button v-else type="info" size="mini" round>否</el-button>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="颜色" prop="colour">
83
+        <template slot-scope="scope">
84
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
88
+        <template slot-scope="scope">
89
+          <el-button
90
+            size="mini"
91
+            type="text"
92
+            icon="el-icon-edit"
93
+            @click="handleUpdate(scope.row)"
94
+            v-hasPermi="['type:areaType:edit']"
95
+          >修改</el-button>
96
+          <el-button
97
+            size="mini"
98
+            type="text"
99
+            icon="el-icon-delete"
100
+            @click="handleDelete(scope.row)"
101
+            v-hasPermi="['type:areaType:remove']"
102
+          >删除</el-button>
103
+        </template>
104
+      </el-table-column>
105
+    </el-table>
106
+
107
+    <pagination
108
+      v-show="total>0"
109
+      :total="total"
110
+      :page.sync="queryParams.pageNum"
111
+      :limit.sync="queryParams.pageSize"
112
+      @pagination="getList"
113
+    />
114
+
115
+    <!-- 添加或修改区域类型:area_type对话框 -->
116
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
117
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
118
+        <el-form-item label="父类型编号" prop="parentId">
119
+          <el-input-number v-model="form.parentId" controls-position="right"   :min="0" placeholder="请输入父类型编号" />
120
+        </el-form-item>
121
+
122
+        <el-form-item label="类别名称" prop="typeName">
123
+          <el-input v-model="form.typeName" placeholder="请输入类别名称" />
124
+        </el-form-item>
125
+        <el-form-item label="是否可点击">
126
+          <el-switch v-model="form.click"></el-switch>
127
+        </el-form-item>
128
+        <el-form-item label="是否可搜索">
129
+          <el-switch v-model="form.search"></el-switch>
130
+        </el-form-item>
131
+        <el-form-item label="类别描述" prop="description">
132
+          <el-input v-model="form.description" placeholder="请输入类别描述" />
133
+        </el-form-item>
134
+        <el-form-item label="排序" prop="orderId">
135
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
136
+        </el-form-item>
137
+
138
+        <el-form-item label="备注" prop="memo">
139
+          <el-input v-model="form.memo" placeholder="请输入备注" />
140
+        </el-form-item>
141
+        <el-form-item label="颜色">
142
+          <el-color-picker v-model="form.colour"></el-color-picker>
143
+        </el-form-item>
144
+      </el-form>
145
+      <div slot="footer" class="dialog-footer">
146
+        <el-button type="primary" @click="submitForm">确 定</el-button>
147
+        <el-button @click="cancel">取 消</el-button>
148
+      </div>
149
+    </el-dialog>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import { listAreaType, getAreaType, delAreaType, addAreaType, updateAreaType, exportAreaType } from "@/api/type/areaType";
155
+
156
+export default {
157
+  name: "AreaType",
158
+  data() {
159
+    return {
160
+      // 遮罩层
161
+      loading: true,
162
+      // 导出遮罩层
163
+      exportLoading: false,
164
+      // 选中数组
165
+      ids: [],
166
+      // 非单个禁用
167
+      single: true,
168
+      // 非多个禁用
169
+      multiple: true,
170
+      // 显示搜索条件
171
+      showSearch: true,
172
+      // 总条数
173
+      total: 0,
174
+      // 区域类型:area_type表格数据
175
+      areaTypeList: [],
176
+      // 弹出层标题
177
+      title: "",
178
+      // 是否显示弹出层
179
+      open: false,
180
+      // 查询参数
181
+      queryParams: {
182
+        pageNum: 1,
183
+        pageSize: 10,
184
+        typeName: null,
185
+      },
186
+      // 表单参数
187
+      form: {},
188
+      // 表单校验
189
+      rules: {
190
+        typeId: [
191
+          { required: true, message: "类别id不能为空", trigger: "blur" }
192
+        ],
193
+      }
194
+    };
195
+  },
196
+  created() {
197
+    this.getList();
198
+  },
199
+  methods: {
200
+    /** 查询区域类型:area_type列表 */
201
+    getList() {
202
+      this.loading = true;
203
+      listAreaType(this.queryParams).then(response => {
204
+        this.areaTypeList = response.data.list;
205
+        this.total = response.data.total;
206
+        this.loading = false;
207
+      });
208
+    },
209
+    // 取消按钮
210
+    cancel() {
211
+      this.open = false;
212
+      this.reset();
213
+    },
214
+    // 表单重置
215
+    reset() {
216
+      this.form = {
217
+        typeId: null,
218
+        parentId: null,
219
+        typeName: null,
220
+        click: true,
221
+        search: true,
222
+        description: null,
223
+        orderId: null,
224
+        memo: null,
225
+        colour: null
226
+      };
227
+      this.resetForm("form");
228
+    },
229
+    /** 搜索按钮操作 */
230
+    handleQuery() {
231
+      this.queryParams.pageNum = 1;
232
+      this.getList();
233
+    },
234
+    /** 重置按钮操作 */
235
+    resetQuery() {
236
+      this.resetForm("queryForm");
237
+      this.handleQuery();
238
+    },
239
+    // 多选框选中数据
240
+    handleSelectionChange(selection) {
241
+      this.ids = selection.map(item => item.typeId)
242
+      this.single = selection.length!==1
243
+      this.multiple = !selection.length
244
+    },
245
+    /** 新增按钮操作 */
246
+    handleAdd() {
247
+      this.reset();
248
+      this.open = true;
249
+      this.title = "添加区域类型:area_type";
250
+    },
251
+    /** 修改按钮操作 */
252
+    handleUpdate(row) {
253
+      this.reset();
254
+      const typeId = row.typeId || this.ids
255
+      getAreaType(typeId).then(response => {
256
+        this.form = response.data;
257
+        this.open = true;
258
+        this.title = "修改区域类型:area_type";
259
+      });
260
+    },
261
+    /** 提交按钮 */
262
+    submitForm() {
263
+      this.$refs["form"].validate(valid => {
264
+        if (valid) {
265
+          if (this.form.typeId != null) {
266
+            updateAreaType(this.form).then(response => {
267
+              this.$modal.msgSuccess("修改成功");
268
+              this.open = false;
269
+              this.getList();
270
+            });
271
+          } else {
272
+            addAreaType(this.form).then(response => {
273
+              this.$modal.msgSuccess("新增成功");
274
+              this.open = false;
275
+              this.getList();
276
+            });
277
+          }
278
+        }
279
+      });
280
+    },
281
+    /** 删除按钮操作 */
282
+    handleDelete(row) {
283
+      const typeIds = row.typeId || this.ids;
284
+      this.$modal.confirm('是否确认删除区域类型:area_type编号为"' + typeIds + '"的数据项?').then(function() {
285
+        return delAreaType(typeIds);
286
+      }).then(() => {
287
+        this.getList();
288
+        this.$modal.msgSuccess("删除成功");
289
+      }).catch(() => {});
290
+    },
291
+    /** 导出按钮操作 */
292
+    handleExport() {
293
+      const queryParams = this.queryParams;
294
+      this.$modal.confirm('是否确认导出所有区域类型:area_type数据项?').then(() => {
295
+        this.exportLoading = true;
296
+        return exportAreaType(queryParams);
297
+      }).then(response => {
298
+        this.$download.name(response.msg);
299
+        this.exportLoading = false;
300
+      }).catch(() => {});
301
+    }
302
+  }
303
+};
304
+</script>

+ 295 - 0
src/views/type/buildingType/index.vue

@@ -0,0 +1,295 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别名称" prop="typeName">
5
+        <el-input
6
+          v-model="queryParams.typeName"
7
+          placeholder="请输入类别名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['type:buildingType:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['type:buildingType:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['type:buildingType:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['type:buildingType:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="buildingTypeList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="类别编号" align="center" prop="typeId" />
69
+      <el-table-column label="类别名称" align="center" prop="typeName" />
70
+      <el-table-column label="是否可点击" align="center" prop="click">
71
+        <template slot-scope="scope">
72
+          <el-button v-if="scope.row.click" type="success" size="mini" round>是</el-button>
73
+          <el-button v-else type="info" size="mini" round>否</el-button>
74
+        </template>
75
+      </el-table-column>
76
+      <el-table-column label="是否可搜索" align="center" prop="search">
77
+        <template slot-scope="scope">
78
+          <el-button v-if="scope.row.search" type="success" size="mini" round>是</el-button>
79
+          <el-button v-else type="info" size="mini" round>否</el-button>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
83
+        <template slot-scope="scope">
84
+          <el-button
85
+            size="mini"
86
+            type="text"
87
+            icon="el-icon-edit"
88
+            @click="handleUpdate(scope.row)"
89
+            v-hasPermi="['type:buildingType:edit']"
90
+          >修改</el-button>
91
+          <el-button
92
+            size="mini"
93
+            type="text"
94
+            icon="el-icon-delete"
95
+            @click="handleDelete(scope.row)"
96
+            v-hasPermi="['type:buildingType:remove']"
97
+          >删除</el-button>
98
+        </template>
99
+      </el-table-column>
100
+    </el-table>
101
+
102
+    <pagination
103
+      v-show="total>0"
104
+      :total="total"
105
+      :page.sync="queryParams.pageNum"
106
+      :limit.sync="queryParams.pageSize"
107
+      @pagination="getList"
108
+    />
109
+
110
+    <!-- 添加或修改大楼类别:building_type对话框 -->
111
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
112
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
113
+        <el-form-item label="父类型编号" prop="parentId">
114
+          <el-input-number v-model="form.parentId" controls-position="right"   :min="0" placeholder="请输入父类型编号" />
115
+        </el-form-item>
116
+
117
+        <el-form-item label="类别名称" prop="typeName">
118
+          <el-input v-model="form.typeName" placeholder="请输入类别名称" />
119
+        </el-form-item>
120
+        <el-form-item label="是否可点击">
121
+          <el-switch v-model="form.click"></el-switch>
122
+        </el-form-item>
123
+        <el-form-item label="是否可搜索">
124
+          <el-switch v-model="form.search"></el-switch>
125
+        </el-form-item>
126
+        <el-form-item label="类别描述" prop="description">
127
+          <el-input v-model="form.description" placeholder="请输入类别描述" />
128
+        </el-form-item>
129
+        <el-form-item label="排序" prop="orderId">
130
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
131
+        </el-form-item>
132
+
133
+        <el-form-item label="备注" prop="memo">
134
+          <el-input v-model="form.memo" placeholder="请输入备注" />
135
+        </el-form-item>
136
+      </el-form>
137
+      <div slot="footer" class="dialog-footer">
138
+        <el-button type="primary" @click="submitForm">确 定</el-button>
139
+        <el-button @click="cancel">取 消</el-button>
140
+      </div>
141
+    </el-dialog>
142
+  </div>
143
+</template>
144
+
145
+<script>
146
+import { listBuildingType, getBuildingType, delBuildingType, addBuildingType, updateBuildingType, exportBuildingType } from "@/api/type/buildingType";
147
+
148
+export default {
149
+  name: "BuildingType",
150
+  data() {
151
+    return {
152
+      // 遮罩层
153
+      loading: true,
154
+      // 导出遮罩层
155
+      exportLoading: false,
156
+      // 选中数组
157
+      ids: [],
158
+      // 非单个禁用
159
+      single: true,
160
+      // 非多个禁用
161
+      multiple: true,
162
+      // 显示搜索条件
163
+      showSearch: true,
164
+      // 总条数
165
+      total: 0,
166
+      // 大楼类别:building_type表格数据
167
+      buildingTypeList: [],
168
+      // 弹出层标题
169
+      title: "",
170
+      // 是否显示弹出层
171
+      open: false,
172
+      // 查询参数
173
+      queryParams: {
174
+        pageNum: 1,
175
+        pageSize: 10,
176
+        typeName: null,
177
+      },
178
+      // 表单参数
179
+      form: {},
180
+      // 表单校验
181
+      rules: {
182
+        typeId: [
183
+          { required: true, message: "类别编号不能为空", trigger: "blur" }
184
+        ],
185
+      }
186
+    };
187
+  },
188
+  created() {
189
+    this.getList();
190
+  },
191
+  methods: {
192
+    /** 查询大楼类别:building_type列表 */
193
+    getList() {
194
+      this.loading = true;
195
+      listBuildingType(this.queryParams).then(response => {
196
+        this.buildingTypeList = response.data.list;
197
+        this.total = response.data.total;
198
+        this.loading = false;
199
+      });
200
+    },
201
+    // 取消按钮
202
+    cancel() {
203
+      this.open = false;
204
+      this.reset();
205
+    },
206
+    // 表单重置
207
+    reset() {
208
+      this.form = {
209
+        typeId: null,
210
+        parentId: null,
211
+        typeName: null,
212
+        click: true,
213
+        search: true,
214
+        description: null,
215
+        orderId: null,
216
+        memo: null
217
+      };
218
+      this.resetForm("form");
219
+    },
220
+    /** 搜索按钮操作 */
221
+    handleQuery() {
222
+      this.queryParams.pageNum = 1;
223
+      this.getList();
224
+    },
225
+    /** 重置按钮操作 */
226
+    resetQuery() {
227
+      this.resetForm("queryForm");
228
+      this.handleQuery();
229
+    },
230
+    // 多选框选中数据
231
+    handleSelectionChange(selection) {
232
+      this.ids = selection.map(item => item.typeId)
233
+      this.single = selection.length!==1
234
+      this.multiple = !selection.length
235
+    },
236
+    /** 新增按钮操作 */
237
+    handleAdd() {
238
+      this.reset();
239
+      this.open = true;
240
+      this.title = "添加大楼类别:building_type";
241
+    },
242
+    /** 修改按钮操作 */
243
+    handleUpdate(row) {
244
+      this.reset();
245
+      const typeId = row.typeId || this.ids
246
+      getBuildingType(typeId).then(response => {
247
+        this.form = response.data;
248
+        this.open = true;
249
+        this.title = "修改大楼类别:building_type";
250
+      });
251
+    },
252
+    /** 提交按钮 */
253
+    submitForm() {
254
+      this.$refs["form"].validate(valid => {
255
+        if (valid) {
256
+          if (this.form.typeId != null) {
257
+            updateBuildingType(this.form).then(response => {
258
+              this.$modal.msgSuccess("修改成功");
259
+              this.open = false;
260
+              this.getList();
261
+            });
262
+          } else {
263
+            addBuildingType(this.form).then(response => {
264
+              this.$modal.msgSuccess("新增成功");
265
+              this.open = false;
266
+              this.getList();
267
+            });
268
+          }
269
+        }
270
+      });
271
+    },
272
+    /** 删除按钮操作 */
273
+    handleDelete(row) {
274
+      const typeIds = row.typeId || this.ids;
275
+      this.$modal.confirm('是否确认删除大楼类别:building_type编号为"' + typeIds + '"的数据项?').then(function() {
276
+        return delBuildingType(typeIds);
277
+      }).then(() => {
278
+        this.getList();
279
+        this.$modal.msgSuccess("删除成功");
280
+      }).catch(() => {});
281
+    },
282
+    /** 导出按钮操作 */
283
+    handleExport() {
284
+      const queryParams = this.queryParams;
285
+      this.$modal.confirm('是否确认导出所有大楼类别:building_type数据项?').then(() => {
286
+        this.exportLoading = true;
287
+        return exportBuildingType(queryParams);
288
+      }).then(response => {
289
+        this.$download.name(response.msg);
290
+        this.exportLoading = false;
291
+      }).catch(() => {});
292
+    }
293
+  }
294
+};
295
+</script>

+ 304 - 0
src/views/type/equipmentType/index.vue

@@ -0,0 +1,304 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别名称" prop="typeName">
5
+        <el-input
6
+          v-model="queryParams.typeName"
7
+          placeholder="请输入类别名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['type:equipmentType:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['type:equipmentType:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['type:equipmentType:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['type:equipmentType:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="equipmentTypeList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="类别id" align="center" prop="typeId" />
69
+      <el-table-column label="类别名称" align="center" prop="typeName" />
70
+      <el-table-column label="是否可点击" align="center" prop="click">
71
+        <template slot-scope="scope">
72
+          <el-button v-if="scope.row.click" type="success" size="mini" round>是</el-button>
73
+          <el-button v-else type="info" size="mini" round>否</el-button>
74
+        </template>
75
+      </el-table-column>
76
+      <el-table-column label="是否可搜索" align="center" prop="search">
77
+        <template slot-scope="scope">
78
+          <el-button v-if="scope.row.search" type="success" size="mini" round>是</el-button>
79
+          <el-button v-else type="info" size="mini" round>否</el-button>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="颜色" prop="colour">
83
+        <template slot-scope="scope">
84
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
88
+        <template slot-scope="scope">
89
+          <el-button
90
+            size="mini"
91
+            type="text"
92
+            icon="el-icon-edit"
93
+            @click="handleUpdate(scope.row)"
94
+            v-hasPermi="['type:equipmentType:edit']"
95
+          >修改</el-button>
96
+          <el-button
97
+            size="mini"
98
+            type="text"
99
+            icon="el-icon-delete"
100
+            @click="handleDelete(scope.row)"
101
+            v-hasPermi="['type:equipmentType:remove']"
102
+          >删除</el-button>
103
+        </template>
104
+      </el-table-column>
105
+    </el-table>
106
+
107
+    <pagination
108
+      v-show="total>0"
109
+      :total="total"
110
+      :page.sync="queryParams.pageNum"
111
+      :limit.sync="queryParams.pageSize"
112
+      @pagination="getList"
113
+    />
114
+
115
+    <!-- 添加或修改设备类型:equipment_type对话框 -->
116
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
117
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
118
+        <el-form-item label="父类型编号" prop="parentId">
119
+          <el-input-number v-model="form.parentId" controls-position="right"   :min="0" placeholder="请输入父类型编号" />
120
+        </el-form-item>
121
+
122
+        <el-form-item label="类别名称" prop="typeName">
123
+          <el-input v-model="form.typeName" placeholder="请输入类别名称" />
124
+        </el-form-item>
125
+        <el-form-item label="是否可点击">
126
+          <el-switch v-model="form.click"></el-switch>
127
+        </el-form-item>
128
+        <el-form-item label="是否可搜索">
129
+          <el-switch v-model="form.search"></el-switch>
130
+        </el-form-item>
131
+        <el-form-item label="类别描述" prop="description">
132
+          <el-input v-model="form.description" placeholder="请输入类别描述" />
133
+        </el-form-item>
134
+        <el-form-item label="排序" prop="orderId">
135
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
136
+        </el-form-item>
137
+
138
+        <el-form-item label="备注" prop="memo">
139
+          <el-input v-model="form.memo" placeholder="请输入备注" />
140
+        </el-form-item>
141
+        <el-form-item label="颜色">
142
+          <el-color-picker v-model="form.colour"></el-color-picker>
143
+        </el-form-item>
144
+      </el-form>
145
+      <div slot="footer" class="dialog-footer">
146
+        <el-button type="primary" @click="submitForm">确 定</el-button>
147
+        <el-button @click="cancel">取 消</el-button>
148
+      </div>
149
+    </el-dialog>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import { listEquipmentType, getEquipmentType, delEquipmentType, addEquipmentType, updateEquipmentType, exportEquipmentType } from "@/api/type/equipmentType";
155
+
156
+export default {
157
+  name: "EquipmentType",
158
+  data() {
159
+    return {
160
+      // 遮罩层
161
+      loading: true,
162
+      // 导出遮罩层
163
+      exportLoading: false,
164
+      // 选中数组
165
+      ids: [],
166
+      // 非单个禁用
167
+      single: true,
168
+      // 非多个禁用
169
+      multiple: true,
170
+      // 显示搜索条件
171
+      showSearch: true,
172
+      // 总条数
173
+      total: 0,
174
+      // 设备类型:equipment_type表格数据
175
+      equipmentTypeList: [],
176
+      // 弹出层标题
177
+      title: "",
178
+      // 是否显示弹出层
179
+      open: false,
180
+      // 查询参数
181
+      queryParams: {
182
+        pageNum: 1,
183
+        pageSize: 10,
184
+        typeName: null,
185
+      },
186
+      // 表单参数
187
+      form: {},
188
+      // 表单校验
189
+      rules: {
190
+        typeId: [
191
+          { required: true, message: "类别id不能为空", trigger: "blur" }
192
+        ],
193
+      }
194
+    };
195
+  },
196
+  created() {
197
+    this.getList();
198
+  },
199
+  methods: {
200
+    /** 查询设备类型:equipment_type列表 */
201
+    getList() {
202
+      this.loading = true;
203
+      listEquipmentType(this.queryParams).then(response => {
204
+        this.equipmentTypeList = response.data.list;
205
+        this.total = response.data.total;
206
+        this.loading = false;
207
+      });
208
+    },
209
+    // 取消按钮
210
+    cancel() {
211
+      this.open = false;
212
+      this.reset();
213
+    },
214
+    // 表单重置
215
+    reset() {
216
+      this.form = {
217
+        typeId: null,
218
+        parentId: null,
219
+        typeName: null,
220
+        click: true,
221
+        search: true,
222
+        description: null,
223
+        orderId: null,
224
+        memo: null,
225
+        colour: null
226
+      };
227
+      this.resetForm("form");
228
+    },
229
+    /** 搜索按钮操作 */
230
+    handleQuery() {
231
+      this.queryParams.pageNum = 1;
232
+      this.getList();
233
+    },
234
+    /** 重置按钮操作 */
235
+    resetQuery() {
236
+      this.resetForm("queryForm");
237
+      this.handleQuery();
238
+    },
239
+    // 多选框选中数据
240
+    handleSelectionChange(selection) {
241
+      this.ids = selection.map(item => item.typeId)
242
+      this.single = selection.length!==1
243
+      this.multiple = !selection.length
244
+    },
245
+    /** 新增按钮操作 */
246
+    handleAdd() {
247
+      this.reset();
248
+      this.open = true;
249
+      this.title = "添加设备类型:equipment_type";
250
+    },
251
+    /** 修改按钮操作 */
252
+    handleUpdate(row) {
253
+      this.reset();
254
+      const typeId = row.typeId || this.ids
255
+      getEquipmentType(typeId).then(response => {
256
+        this.form = response.data;
257
+        this.open = true;
258
+        this.title = "修改设备类型:equipment_type";
259
+      });
260
+    },
261
+    /** 提交按钮 */
262
+    submitForm() {
263
+      this.$refs["form"].validate(valid => {
264
+        if (valid) {
265
+          if (this.form.typeId != null) {
266
+            updateEquipmentType(this.form).then(response => {
267
+              this.$modal.msgSuccess("修改成功");
268
+              this.open = false;
269
+              this.getList();
270
+            });
271
+          } else {
272
+            addEquipmentType(this.form).then(response => {
273
+              this.$modal.msgSuccess("新增成功");
274
+              this.open = false;
275
+              this.getList();
276
+            });
277
+          }
278
+        }
279
+      });
280
+    },
281
+    /** 删除按钮操作 */
282
+    handleDelete(row) {
283
+      const typeIds = row.typeId || this.ids;
284
+      this.$modal.confirm('是否确认删除设备类型:equipment_type编号为"' + typeIds + '"的数据项?').then(function() {
285
+        return delEquipmentType(typeIds);
286
+      }).then(() => {
287
+        this.getList();
288
+        this.$modal.msgSuccess("删除成功");
289
+      }).catch(() => {});
290
+    },
291
+    /** 导出按钮操作 */
292
+    handleExport() {
293
+      const queryParams = this.queryParams;
294
+      this.$modal.confirm('是否确认导出所有设备类型:equipment_type数据项?').then(() => {
295
+        this.exportLoading = true;
296
+        return exportEquipmentType(queryParams);
297
+      }).then(response => {
298
+        this.$download.name(response.msg);
299
+        this.exportLoading = false;
300
+      }).catch(() => {});
301
+    }
302
+  }
303
+};
304
+</script>

+ 273 - 0
src/views/type/houseType/index.vue

@@ -0,0 +1,273 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="户型名" prop="typeName">
5
+        <el-input
6
+          v-model="queryParams.typeName"
7
+          placeholder="请输入户型名"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['type:houseType:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['type:houseType:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['type:houseType:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['type:houseType:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="houseTypeList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="户型id" align="center" prop="typeId" />
69
+      <el-table-column label="户型名" align="center" prop="typeName" />
70
+      <el-table-column label="户型图" align="center" prop="url">
71
+        <template slot-scope="scope">
72
+          <div v-for="(url, index) in scope.row.url.split(',')" :key="index" style="display: inline-block; margin-right: 10px;">
73
+            <img :src="BASE_URL + url.trim()" alt="户型图" style="width: 50px; height: 50px;">
74
+          </div>
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
78
+        <template slot-scope="scope">
79
+          <el-button
80
+            size="mini"
81
+            type="text"
82
+            icon="el-icon-edit"
83
+            @click="handleUpdate(scope.row)"
84
+            v-hasPermi="['type:houseType:edit']"
85
+          >修改</el-button>
86
+          <el-button
87
+            size="mini"
88
+            type="text"
89
+            icon="el-icon-delete"
90
+            @click="handleDelete(scope.row)"
91
+            v-hasPermi="['type:houseType:remove']"
92
+          >删除</el-button>
93
+        </template>
94
+      </el-table-column>
95
+    </el-table>
96
+
97
+    <pagination
98
+      v-show="total>0"
99
+      :total="total"
100
+      :page.sync="queryParams.pageNum"
101
+      :limit.sync="queryParams.pageSize"
102
+      @pagination="getList"
103
+    />
104
+
105
+    <!-- 添加或修改户型信息:house_type对话框 -->
106
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
107
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
108
+        <el-form-item label="户型名" prop="typeName">
109
+          <el-input v-model="form.typeName" placeholder="请输入户型名" />
110
+        </el-form-item>
111
+        <el-form-item label="户型图">
112
+          <imageUpload v-model="form.url"/>
113
+        </el-form-item>
114
+        <el-form-item label="备注" prop="memo">
115
+          <el-input v-model="form.memo" placeholder="请输入备注" />
116
+        </el-form-item>
117
+      </el-form>
118
+      <div slot="footer" class="dialog-footer">
119
+        <el-button type="primary" @click="submitForm">确 定</el-button>
120
+        <el-button @click="cancel">取 消</el-button>
121
+      </div>
122
+    </el-dialog>
123
+  </div>
124
+</template>
125
+
126
+<script>
127
+import { listHouseType, getHouseType, delHouseType, addHouseType, updateHouseType, exportHouseType } from "@/api/type/houseType";
128
+
129
+export default {
130
+  name: "HouseType",
131
+  data() {
132
+    return {
133
+      BASE_URL: BASE_URL,
134
+      // 遮罩层
135
+      loading: true,
136
+      // 导出遮罩层
137
+      exportLoading: false,
138
+      // 选中数组
139
+      ids: [],
140
+      // 非单个禁用
141
+      single: true,
142
+      // 非多个禁用
143
+      multiple: true,
144
+      // 显示搜索条件
145
+      showSearch: true,
146
+      // 总条数
147
+      total: 0,
148
+      // 户型信息:house_type表格数据
149
+      houseTypeList: [],
150
+      // 弹出层标题
151
+      title: "",
152
+      // 是否显示弹出层
153
+      open: false,
154
+      // 查询参数
155
+      queryParams: {
156
+        pageNum: 1,
157
+        pageSize: 10,
158
+        typeName: null,
159
+      },
160
+      // 表单参数
161
+      form: {},
162
+      // 表单校验
163
+      rules: {
164
+        typeId: [
165
+          { required: true, message: "户型id不能为空", trigger: "blur" }
166
+        ],
167
+      }
168
+    };
169
+  },
170
+  created() {
171
+    this.getList();
172
+  },
173
+  methods: {
174
+    /** 查询户型信息:house_type列表 */
175
+    getList() {
176
+      this.loading = true;
177
+      listHouseType(this.queryParams).then(response => {
178
+        this.houseTypeList = response.data.list;
179
+        this.total = response.data.total;
180
+        this.loading = false;
181
+      });
182
+    },
183
+    // 取消按钮
184
+    cancel() {
185
+      this.open = false;
186
+      this.reset();
187
+    },
188
+    // 表单重置
189
+    reset() {
190
+      this.form = {
191
+        typeId: null,
192
+        typeName: null,
193
+        url: null,
194
+        memo: null
195
+      };
196
+      this.resetForm("form");
197
+    },
198
+    /** 搜索按钮操作 */
199
+    handleQuery() {
200
+      this.queryParams.pageNum = 1;
201
+      this.getList();
202
+    },
203
+    /** 重置按钮操作 */
204
+    resetQuery() {
205
+      this.resetForm("queryForm");
206
+      this.handleQuery();
207
+    },
208
+    // 多选框选中数据
209
+    handleSelectionChange(selection) {
210
+      this.ids = selection.map(item => item.typeId)
211
+      this.single = selection.length!==1
212
+      this.multiple = !selection.length
213
+    },
214
+    /** 新增按钮操作 */
215
+    handleAdd() {
216
+      this.reset();
217
+      this.open = true;
218
+      this.title = "添加户型信息:house_type";
219
+    },
220
+    /** 修改按钮操作 */
221
+    handleUpdate(row) {
222
+      this.reset();
223
+      const typeId = row.typeId || this.ids
224
+      getHouseType(typeId).then(response => {
225
+        this.form = response.data;
226
+        this.open = true;
227
+        this.title = "修改户型信息:house_type";
228
+      });
229
+    },
230
+    /** 提交按钮 */
231
+    submitForm() {
232
+      this.$refs["form"].validate(valid => {
233
+        if (valid) {
234
+          if (this.form.typeId != null) {
235
+            updateHouseType(this.form).then(response => {
236
+              this.$modal.msgSuccess("修改成功");
237
+              this.open = false;
238
+              this.getList();
239
+            });
240
+          } else {
241
+            addHouseType(this.form).then(response => {
242
+              this.$modal.msgSuccess("新增成功");
243
+              this.open = false;
244
+              this.getList();
245
+            });
246
+          }
247
+        }
248
+      });
249
+    },
250
+    /** 删除按钮操作 */
251
+    handleDelete(row) {
252
+      const typeIds = row.typeId || this.ids;
253
+      this.$modal.confirm('是否确认删除户型信息:house_type编号为"' + typeIds + '"的数据项?').then(function() {
254
+        return delHouseType(typeIds);
255
+      }).then(() => {
256
+        this.getList();
257
+        this.$modal.msgSuccess("删除成功");
258
+      }).catch(() => {});
259
+    },
260
+    /** 导出按钮操作 */
261
+    handleExport() {
262
+      const queryParams = this.queryParams;
263
+      this.$modal.confirm('是否确认导出所有户型信息:house_type数据项?').then(() => {
264
+        this.exportLoading = true;
265
+        return exportHouseType(queryParams);
266
+      }).then(response => {
267
+        this.$download.name(response.msg);
268
+        this.exportLoading = false;
269
+      }).catch(() => {});
270
+    }
271
+  }
272
+};
273
+</script>

+ 304 - 0
src/views/type/organizationType/index.vue

@@ -0,0 +1,304 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别名称" prop="typeName">
5
+        <el-input
6
+          v-model="queryParams.typeName"
7
+          placeholder="请输入类别名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['type:organizationType:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['type:organizationType:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['type:organizationType:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['type:organizationType:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="organizationTypeList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="类别id" align="center" prop="typeId" />
69
+      <el-table-column label="类别名称" align="center" prop="typeName" />
70
+      <el-table-column label="是否可点击" align="center" prop="click">
71
+        <template slot-scope="scope">
72
+          <el-button v-if="scope.row.click" type="success" size="mini" round>是</el-button>
73
+          <el-button v-else type="info" size="mini" round>否</el-button>
74
+        </template>
75
+      </el-table-column>
76
+      <el-table-column label="是否可搜索" align="center" prop="search">
77
+        <template slot-scope="scope">
78
+          <el-button v-if="scope.row.search" type="success" size="mini" round>是</el-button>
79
+          <el-button v-else type="info" size="mini" round>否</el-button>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="颜色" prop="colour">
83
+        <template slot-scope="scope">
84
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
88
+        <template slot-scope="scope">
89
+          <el-button
90
+            size="mini"
91
+            type="text"
92
+            icon="el-icon-edit"
93
+            @click="handleUpdate(scope.row)"
94
+            v-hasPermi="['type:organizationType:edit']"
95
+          >修改</el-button>
96
+          <el-button
97
+            size="mini"
98
+            type="text"
99
+            icon="el-icon-delete"
100
+            @click="handleDelete(scope.row)"
101
+            v-hasPermi="['type:organizationType:remove']"
102
+          >删除</el-button>
103
+        </template>
104
+      </el-table-column>
105
+    </el-table>
106
+
107
+    <pagination
108
+      v-show="total>0"
109
+      :total="total"
110
+      :page.sync="queryParams.pageNum"
111
+      :limit.sync="queryParams.pageSize"
112
+      @pagination="getList"
113
+    />
114
+
115
+    <!-- 添加或修改主体类型对话框 -->
116
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
117
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
118
+        <el-form-item label="父类型编" prop="parentId">
119
+          <el-input-number v-model="form.parentId" controls-position="right"   :min="0" placeholder="请输入父类型编" />
120
+        </el-form-item>
121
+
122
+        <el-form-item label="类别名称" prop="typeName">
123
+          <el-input v-model="form.typeName" placeholder="请输入类别名称" />
124
+        </el-form-item>
125
+        <el-form-item label="是否可点击">
126
+          <el-switch v-model="form.click"></el-switch>
127
+        </el-form-item>
128
+        <el-form-item label="是否可搜索">
129
+          <el-switch v-model="form.search"></el-switch>
130
+        </el-form-item>
131
+        <el-form-item label="类别描述" prop="description">
132
+          <el-input v-model="form.description" placeholder="请输入类别描述" />
133
+        </el-form-item>
134
+        <el-form-item label="排序" prop="orderId">
135
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
136
+        </el-form-item>
137
+
138
+        <el-form-item label="备注" prop="memo">
139
+          <el-input v-model="form.memo" placeholder="请输入备注" />
140
+        </el-form-item>
141
+        <el-form-item label="颜色">
142
+          <el-color-picker v-model="form.colour"></el-color-picker>
143
+        </el-form-item>
144
+      </el-form>
145
+      <div slot="footer" class="dialog-footer">
146
+        <el-button type="primary" @click="submitForm">确 定</el-button>
147
+        <el-button @click="cancel">取 消</el-button>
148
+      </div>
149
+    </el-dialog>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import { listOrganizationType, getOrganizationType, delOrganizationType, addOrganizationType, updateOrganizationType, exportOrganizationType } from "@/api/type/organizationType";
155
+
156
+export default {
157
+  name: "OrganizationType",
158
+  data() {
159
+    return {
160
+      // 遮罩层
161
+      loading: true,
162
+      // 导出遮罩层
163
+      exportLoading: false,
164
+      // 选中数组
165
+      ids: [],
166
+      // 非单个禁用
167
+      single: true,
168
+      // 非多个禁用
169
+      multiple: true,
170
+      // 显示搜索条件
171
+      showSearch: true,
172
+      // 总条数
173
+      total: 0,
174
+      // 主体类型表格数据
175
+      organizationTypeList: [],
176
+      // 弹出层标题
177
+      title: "",
178
+      // 是否显示弹出层
179
+      open: false,
180
+      // 查询参数
181
+      queryParams: {
182
+        pageNum: 1,
183
+        pageSize: 10,
184
+        typeName: null,
185
+      },
186
+      // 表单参数
187
+      form: {},
188
+      // 表单校验
189
+      rules: {
190
+        typeId: [
191
+          { required: true, message: "类别id不能为空", trigger: "blur" }
192
+        ],
193
+      }
194
+    };
195
+  },
196
+  created() {
197
+    this.getList();
198
+  },
199
+  methods: {
200
+    /** 查询主体类型列表 */
201
+    getList() {
202
+      this.loading = true;
203
+      listOrganizationType(this.queryParams).then(response => {
204
+        this.organizationTypeList = response.data.list;
205
+        this.total = response.data.total;
206
+        this.loading = false;
207
+      });
208
+    },
209
+    // 取消按钮
210
+    cancel() {
211
+      this.open = false;
212
+      this.reset();
213
+    },
214
+    // 表单重置
215
+    reset() {
216
+      this.form = {
217
+        typeId: null,
218
+        parentId: null,
219
+        typeName: null,
220
+        click: true,
221
+        search: true,
222
+        description: null,
223
+        orderId: null,
224
+        memo: null,
225
+        colour: null
226
+      };
227
+      this.resetForm("form");
228
+    },
229
+    /** 搜索按钮操作 */
230
+    handleQuery() {
231
+      this.queryParams.pageNum = 1;
232
+      this.getList();
233
+    },
234
+    /** 重置按钮操作 */
235
+    resetQuery() {
236
+      this.resetForm("queryForm");
237
+      this.handleQuery();
238
+    },
239
+    // 多选框选中数据
240
+    handleSelectionChange(selection) {
241
+      this.ids = selection.map(item => item.typeId)
242
+      this.single = selection.length!==1
243
+      this.multiple = !selection.length
244
+    },
245
+    /** 新增按钮操作 */
246
+    handleAdd() {
247
+      this.reset();
248
+      this.open = true;
249
+      this.title = "添加主体类型";
250
+    },
251
+    /** 修改按钮操作 */
252
+    handleUpdate(row) {
253
+      this.reset();
254
+      const typeId = row.typeId || this.ids
255
+      getOrganizationType(typeId).then(response => {
256
+        this.form = response.data;
257
+        this.open = true;
258
+        this.title = "修改主体类型";
259
+      });
260
+    },
261
+    /** 提交按钮 */
262
+    submitForm() {
263
+      this.$refs["form"].validate(valid => {
264
+        if (valid) {
265
+          if (this.form.typeId != null) {
266
+            updateOrganizationType(this.form).then(response => {
267
+              this.$modal.msgSuccess("修改成功");
268
+              this.open = false;
269
+              this.getList();
270
+            });
271
+          } else {
272
+            addOrganizationType(this.form).then(response => {
273
+              this.$modal.msgSuccess("新增成功");
274
+              this.open = false;
275
+              this.getList();
276
+            });
277
+          }
278
+        }
279
+      });
280
+    },
281
+    /** 删除按钮操作 */
282
+    handleDelete(row) {
283
+      const typeIds = row.typeId || this.ids;
284
+      this.$modal.confirm('是否确认删除主体类型编号为"' + typeIds + '"的数据项?').then(function() {
285
+        return delOrganizationType(typeIds);
286
+      }).then(() => {
287
+        this.getList();
288
+        this.$modal.msgSuccess("删除成功");
289
+      }).catch(() => {});
290
+    },
291
+    /** 导出按钮操作 */
292
+    handleExport() {
293
+      const queryParams = this.queryParams;
294
+      this.$modal.confirm('是否确认导出所有主体类型数据项?').then(() => {
295
+        this.exportLoading = true;
296
+        return exportOrganizationType(queryParams);
297
+      }).then(response => {
298
+        this.$download.name(response.msg);
299
+        this.exportLoading = false;
300
+      }).catch(() => {});
301
+    }
302
+  }
303
+};
304
+</script>

+ 304 - 0
src/views/type/planType/index.vue

@@ -0,0 +1,304 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别名称" prop="typeName">
5
+        <el-input
6
+          v-model="queryParams.typeName"
7
+          placeholder="请输入类别名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['type:planType:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['type:planType:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['type:planType:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['type:planType:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="planTypeList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="类别id" align="center" prop="typeId" />
69
+      <el-table-column label="类别名称" align="center" prop="typeName" />
70
+      <el-table-column label="是否可点击" align="center" prop="click">
71
+        <template slot-scope="scope">
72
+          <el-button v-if="scope.row.click" type="success" size="mini" round>是</el-button>
73
+          <el-button v-else type="info" size="mini" round>否</el-button>
74
+        </template>
75
+      </el-table-column>
76
+      <el-table-column label="是否可搜索" align="center" prop="search">
77
+        <template slot-scope="scope">
78
+          <el-button v-if="scope.row.search" type="success" size="mini" round>是</el-button>
79
+          <el-button v-else type="info" size="mini" round>否</el-button>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="颜色" prop="colour">
83
+        <template slot-scope="scope">
84
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
88
+        <template slot-scope="scope">
89
+          <el-button
90
+            size="mini"
91
+            type="text"
92
+            icon="el-icon-edit"
93
+            @click="handleUpdate(scope.row)"
94
+            v-hasPermi="['type:planType:edit']"
95
+          >修改</el-button>
96
+          <el-button
97
+            size="mini"
98
+            type="text"
99
+            icon="el-icon-delete"
100
+            @click="handleDelete(scope.row)"
101
+            v-hasPermi="['type:planType:remove']"
102
+          >删除</el-button>
103
+        </template>
104
+      </el-table-column>
105
+    </el-table>
106
+
107
+    <pagination
108
+      v-show="total>0"
109
+      :total="total"
110
+      :page.sync="queryParams.pageNum"
111
+      :limit.sync="queryParams.pageSize"
112
+      @pagination="getList"
113
+    />
114
+
115
+    <!-- 添加或修改规划类型对话框 -->
116
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
117
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
118
+        <el-form-item label="父类型编号" prop="parentId">
119
+          <el-input-number v-model="form.parentId" controls-position="right"   :min="0" placeholder="请输入父类型编号" />
120
+        </el-form-item>
121
+
122
+        <el-form-item label="类别名称" prop="typeName">
123
+          <el-input v-model="form.typeName" placeholder="请输入类别名称" />
124
+        </el-form-item>
125
+        <el-form-item label="是否可点击">
126
+          <el-switch v-model="form.click"></el-switch>
127
+        </el-form-item>
128
+        <el-form-item label="是否可搜索">
129
+          <el-switch v-model="form.search"></el-switch>
130
+        </el-form-item>
131
+        <el-form-item label="类别描述" prop="description">
132
+          <el-input v-model="form.description" placeholder="请输入类别描述" />
133
+        </el-form-item>
134
+        <el-form-item label="排序" prop="orderId">
135
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
136
+        </el-form-item>
137
+
138
+        <el-form-item label="备注" prop="memo">
139
+          <el-input v-model="form.memo" placeholder="请输入备注" />
140
+        </el-form-item>
141
+        <el-form-item label="颜色">
142
+          <el-color-picker v-model="form.colour"></el-color-picker>
143
+        </el-form-item>
144
+      </el-form>
145
+      <div slot="footer" class="dialog-footer">
146
+        <el-button type="primary" @click="submitForm">确 定</el-button>
147
+        <el-button @click="cancel">取 消</el-button>
148
+      </div>
149
+    </el-dialog>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import { listPlanType, getPlanType, delPlanType, addPlanType, updatePlanType, exportPlanType } from "@/api/type/planType";
155
+
156
+export default {
157
+  name: "PlanType",
158
+  data() {
159
+    return {
160
+      // 遮罩层
161
+      loading: true,
162
+      // 导出遮罩层
163
+      exportLoading: false,
164
+      // 选中数组
165
+      ids: [],
166
+      // 非单个禁用
167
+      single: true,
168
+      // 非多个禁用
169
+      multiple: true,
170
+      // 显示搜索条件
171
+      showSearch: true,
172
+      // 总条数
173
+      total: 0,
174
+      // 规划类型表格数据
175
+      planTypeList: [],
176
+      // 弹出层标题
177
+      title: "",
178
+      // 是否显示弹出层
179
+      open: false,
180
+      // 查询参数
181
+      queryParams: {
182
+        pageNum: 1,
183
+        pageSize: 10,
184
+        typeName: null,
185
+      },
186
+      // 表单参数
187
+      form: {},
188
+      // 表单校验
189
+      rules: {
190
+        typeId: [
191
+          { required: true, message: "类别id不能为空", trigger: "blur" }
192
+        ],
193
+      }
194
+    };
195
+  },
196
+  created() {
197
+    this.getList();
198
+  },
199
+  methods: {
200
+    /** 查询规划类型列表 */
201
+    getList() {
202
+      this.loading = true;
203
+      listPlanType(this.queryParams).then(response => {
204
+        this.planTypeList = response.data.list;
205
+        this.total = response.data.total;
206
+        this.loading = false;
207
+      });
208
+    },
209
+    // 取消按钮
210
+    cancel() {
211
+      this.open = false;
212
+      this.reset();
213
+    },
214
+    // 表单重置
215
+    reset() {
216
+      this.form = {
217
+        typeId: null,
218
+        parentId: null,
219
+        typeName: null,
220
+        click: true,
221
+        search: true,
222
+        description: null,
223
+        orderId: null,
224
+        memo: null,
225
+        colour: null
226
+      };
227
+      this.resetForm("form");
228
+    },
229
+    /** 搜索按钮操作 */
230
+    handleQuery() {
231
+      this.queryParams.pageNum = 1;
232
+      this.getList();
233
+    },
234
+    /** 重置按钮操作 */
235
+    resetQuery() {
236
+      this.resetForm("queryForm");
237
+      this.handleQuery();
238
+    },
239
+    // 多选框选中数据
240
+    handleSelectionChange(selection) {
241
+      this.ids = selection.map(item => item.typeId)
242
+      this.single = selection.length!==1
243
+      this.multiple = !selection.length
244
+    },
245
+    /** 新增按钮操作 */
246
+    handleAdd() {
247
+      this.reset();
248
+      this.open = true;
249
+      this.title = "添加规划类型";
250
+    },
251
+    /** 修改按钮操作 */
252
+    handleUpdate(row) {
253
+      this.reset();
254
+      const typeId = row.typeId || this.ids
255
+      getPlanType(typeId).then(response => {
256
+        this.form = response.data;
257
+        this.open = true;
258
+        this.title = "修改规划类型";
259
+      });
260
+    },
261
+    /** 提交按钮 */
262
+    submitForm() {
263
+      this.$refs["form"].validate(valid => {
264
+        if (valid) {
265
+          if (this.form.typeId != null) {
266
+            updatePlanType(this.form).then(response => {
267
+              this.$modal.msgSuccess("修改成功");
268
+              this.open = false;
269
+              this.getList();
270
+            });
271
+          } else {
272
+            addPlanType(this.form).then(response => {
273
+              this.$modal.msgSuccess("新增成功");
274
+              this.open = false;
275
+              this.getList();
276
+            });
277
+          }
278
+        }
279
+      });
280
+    },
281
+    /** 删除按钮操作 */
282
+    handleDelete(row) {
283
+      const typeIds = row.typeId || this.ids;
284
+      this.$modal.confirm('是否确认删除规划类型编号为"' + typeIds + '"的数据项?').then(function() {
285
+        return delPlanType(typeIds);
286
+      }).then(() => {
287
+        this.getList();
288
+        this.$modal.msgSuccess("删除成功");
289
+      }).catch(() => {});
290
+    },
291
+    /** 导出按钮操作 */
292
+    handleExport() {
293
+      const queryParams = this.queryParams;
294
+      this.$modal.confirm('是否确认导出所有规划类型数据项?').then(() => {
295
+        this.exportLoading = true;
296
+        return exportPlanType(queryParams);
297
+      }).then(response => {
298
+        this.$download.name(response.msg);
299
+        this.exportLoading = false;
300
+      }).catch(() => {});
301
+    }
302
+  }
303
+};
304
+</script>

+ 296 - 0
src/views/type/roomType/index.vue

@@ -0,0 +1,296 @@
1
+roomType
2
+<template>
3
+  <div class="app-container">
4
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
5
+      <el-form-item label="类别名称" prop="typeName">
6
+        <el-input
7
+          v-model="queryParams.typeName"
8
+          placeholder="请输入类别名称"
9
+          clearable
10
+          size="small"
11
+          @keyup.enter.native="handleQuery"
12
+        />
13
+      </el-form-item>
14
+      <el-form-item>
15
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
16
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
17
+      </el-form-item>
18
+    </el-form>
19
+
20
+    <el-row :gutter="10" class="mb8">
21
+      <el-col :span="1.5">
22
+        <el-button
23
+          type="primary"
24
+          plain
25
+          icon="el-icon-plus"
26
+          size="mini"
27
+          @click="handleAdd"
28
+          v-hasPermi="['type:roomType:add']"
29
+        >新增</el-button>
30
+      </el-col>
31
+      <el-col :span="1.5">
32
+        <el-button
33
+          type="success"
34
+          plain
35
+          icon="el-icon-edit"
36
+          size="mini"
37
+          :disabled="single"
38
+          @click="handleUpdate"
39
+          v-hasPermi="['type:roomType:edit']"
40
+        >修改</el-button>
41
+      </el-col>
42
+      <el-col :span="1.5">
43
+        <el-button
44
+          type="danger"
45
+          plain
46
+          icon="el-icon-delete"
47
+          size="mini"
48
+          :disabled="multiple"
49
+          @click="handleDelete"
50
+          v-hasPermi="['type:roomType:remove']"
51
+        >删除</el-button>
52
+      </el-col>
53
+      <el-col :span="1.5">
54
+        <el-button
55
+          type="warning"
56
+          plain
57
+          icon="el-icon-download"
58
+          size="mini"
59
+          :loading="exportLoading"
60
+          @click="handleExport"
61
+          v-hasPermi="['type:roomType:export']"
62
+        >导出</el-button>
63
+      </el-col>
64
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
65
+    </el-row>
66
+
67
+    <el-table v-loading="loading" :data="roomTypeList" @selection-change="handleSelectionChange">
68
+      <el-table-column type="selection" width="55" align="center" />
69
+      <el-table-column label="类别编号" align="center" prop="typeId" />
70
+      <el-table-column label="类别名称" align="center" prop="typeName" />
71
+      <el-table-column label="是否可点击" align="center" prop="click">
72
+        <template slot-scope="scope">
73
+          <el-button v-if="scope.row.click" type="success" size="mini" round>是</el-button>
74
+          <el-button v-else type="info" size="mini" round>否</el-button>
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column label="是否可搜索" align="center" prop="search">
78
+        <template slot-scope="scope">
79
+          <el-button v-if="scope.row.search" type="success" size="mini" round>是</el-button>
80
+          <el-button v-else type="info" size="mini" round>否</el-button>
81
+        </template>
82
+      </el-table-column>
83
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
84
+        <template slot-scope="scope">
85
+          <el-button
86
+            size="mini"
87
+            type="text"
88
+            icon="el-icon-edit"
89
+            @click="handleUpdate(scope.row)"
90
+            v-hasPermi="['type:roomType:edit']"
91
+          >修改</el-button>
92
+          <el-button
93
+            size="mini"
94
+            type="text"
95
+            icon="el-icon-delete"
96
+            @click="handleDelete(scope.row)"
97
+            v-hasPermi="['type:roomType:remove']"
98
+          >删除</el-button>
99
+        </template>
100
+      </el-table-column>
101
+    </el-table>
102
+
103
+    <pagination
104
+      v-show="total>0"
105
+      :total="total"
106
+      :page.sync="queryParams.pageNum"
107
+      :limit.sync="queryParams.pageSize"
108
+      @pagination="getList"
109
+    />
110
+
111
+    <!-- 添加或修改房间类别对话框 -->
112
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
113
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
114
+        <el-form-item label="父类型编号" prop="parentId">
115
+          <el-input-number v-model="form.parentId" controls-position="right"   :min="0" placeholder="请输入父类型编号" />
116
+        </el-form-item>
117
+
118
+        <el-form-item label="类别名称" prop="typeName">
119
+          <el-input v-model="form.typeName" placeholder="请输入类别名称" />
120
+        </el-form-item>
121
+        <el-form-item label="是否可点击">
122
+          <el-switch v-model="form.click"></el-switch>
123
+        </el-form-item>
124
+        <el-form-item label="是否可搜索">
125
+          <el-switch v-model="form.search"></el-switch>
126
+        </el-form-item>
127
+        <el-form-item label="类别描述" prop="description">
128
+          <el-input v-model="form.description" placeholder="请输入类别描述" />
129
+        </el-form-item>
130
+        <el-form-item label="排序" prop="orderId">
131
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
132
+        </el-form-item>
133
+
134
+        <el-form-item label="备注" prop="memo">
135
+          <el-input v-model="form.memo" placeholder="请输入备注" />
136
+        </el-form-item>
137
+      </el-form>
138
+      <div slot="footer" class="dialog-footer">
139
+        <el-button type="primary" @click="submitForm">确 定</el-button>
140
+        <el-button @click="cancel">取 消</el-button>
141
+      </div>
142
+    </el-dialog>
143
+  </div>
144
+</template>
145
+
146
+<script>
147
+import { listRoomType, getRoomType, delRoomType, addRoomType, updateRoomType, exportRoomType } from "@/api/type/roomType";
148
+
149
+export default {
150
+  name: "RoomType",
151
+  data() {
152
+    return {
153
+      // 遮罩层
154
+      loading: true,
155
+      // 导出遮罩层
156
+      exportLoading: false,
157
+      // 选中数组
158
+      ids: [],
159
+      // 非单个禁用
160
+      single: true,
161
+      // 非多个禁用
162
+      multiple: true,
163
+      // 显示搜索条件
164
+      showSearch: true,
165
+      // 总条数
166
+      total: 0,
167
+      // 房间类别表格数据
168
+      roomTypeList: [],
169
+      // 弹出层标题
170
+      title: "",
171
+      // 是否显示弹出层
172
+      open: false,
173
+      // 查询参数
174
+      queryParams: {
175
+        pageNum: 1,
176
+        pageSize: 10,
177
+        typeName: null,
178
+      },
179
+      // 表单参数
180
+      form: {},
181
+      // 表单校验
182
+      rules: {
183
+        typeId: [
184
+          { required: true, message: "类别编号不能为空", trigger: "blur" }
185
+        ],
186
+      }
187
+    };
188
+  },
189
+  created() {
190
+    this.getList();
191
+  },
192
+  methods: {
193
+    /** 查询房间类别列表 */
194
+    getList() {
195
+      this.loading = true;
196
+      listRoomType(this.queryParams).then(response => {
197
+        this.roomTypeList = response.data.list;
198
+        this.total = response.data.total;
199
+        this.loading = false;
200
+      });
201
+    },
202
+    // 取消按钮
203
+    cancel() {
204
+      this.open = false;
205
+      this.reset();
206
+    },
207
+    // 表单重置
208
+    reset() {
209
+      this.form = {
210
+        typeId: null,
211
+        parentId: null,
212
+        typeName: null,
213
+        click: true,
214
+        search: true,
215
+        description: null,
216
+        orderId: null,
217
+        memo: null
218
+      };
219
+      this.resetForm("form");
220
+    },
221
+    /** 搜索按钮操作 */
222
+    handleQuery() {
223
+      this.queryParams.pageNum = 1;
224
+      this.getList();
225
+    },
226
+    /** 重置按钮操作 */
227
+    resetQuery() {
228
+      this.resetForm("queryForm");
229
+      this.handleQuery();
230
+    },
231
+    // 多选框选中数据
232
+    handleSelectionChange(selection) {
233
+      this.ids = selection.map(item => item.typeId)
234
+      this.single = selection.length!==1
235
+      this.multiple = !selection.length
236
+    },
237
+    /** 新增按钮操作 */
238
+    handleAdd() {
239
+      this.reset();
240
+      this.open = true;
241
+      this.title = "添加房间类别";
242
+    },
243
+    /** 修改按钮操作 */
244
+    handleUpdate(row) {
245
+      this.reset();
246
+      const typeId = row.typeId || this.ids
247
+      getRoomType(typeId).then(response => {
248
+        this.form = response.data;
249
+        this.open = true;
250
+        this.title = "修改房间类别";
251
+      });
252
+    },
253
+    /** 提交按钮 */
254
+    submitForm() {
255
+      this.$refs["form"].validate(valid => {
256
+        if (valid) {
257
+          if (this.form.typeId != null) {
258
+            updateRoomType(this.form).then(response => {
259
+              this.$modal.msgSuccess("修改成功");
260
+              this.open = false;
261
+              this.getList();
262
+            });
263
+          } else {
264
+            addRoomType(this.form).then(response => {
265
+              this.$modal.msgSuccess("新增成功");
266
+              this.open = false;
267
+              this.getList();
268
+            });
269
+          }
270
+        }
271
+      });
272
+    },
273
+    /** 删除按钮操作 */
274
+    handleDelete(row) {
275
+      const typeIds = row.typeId || this.ids;
276
+      this.$modal.confirm('是否确认删除房间类别编号为"' + typeIds + '"的数据项?').then(function() {
277
+        return delRoomType(typeIds);
278
+      }).then(() => {
279
+        this.getList();
280
+        this.$modal.msgSuccess("删除成功");
281
+      }).catch(() => {});
282
+    },
283
+    /** 导出按钮操作 */
284
+    handleExport() {
285
+      const queryParams = this.queryParams;
286
+      this.$modal.confirm('是否确认导出所有房间类别数据项?').then(() => {
287
+        this.exportLoading = true;
288
+        return exportRoomType(queryParams);
289
+      }).then(response => {
290
+        this.$download.name(response.msg);
291
+        this.exportLoading = false;
292
+      }).catch(() => {});
293
+    }
294
+  }
295
+};
296
+</script>

+ 304 - 0
src/views/type/trafficType/index.vue

@@ -0,0 +1,304 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="类别名称" prop="typeName">
5
+        <el-input
6
+          v-model="queryParams.typeName"
7
+          placeholder="请输入类别名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['type:trafficType:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['type:trafficType:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['type:trafficType:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['type:trafficType:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="trafficTypeList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="类别编号" align="center" prop="typeId" />
69
+      <el-table-column label="类别名称" align="center" prop="typeName" />
70
+      <el-table-column label="是否可点击" align="center" prop="click">
71
+        <template slot-scope="scope">
72
+          <el-button v-if="scope.row.click" type="success" size="mini" round>是</el-button>
73
+          <el-button v-else type="info" size="mini" round>否</el-button>
74
+        </template>
75
+      </el-table-column>
76
+      <el-table-column label="是否可搜索" align="center" prop="search">
77
+        <template slot-scope="scope">
78
+          <el-button v-if="scope.row.search" type="success" size="mini" round>是</el-button>
79
+          <el-button v-else type="info" size="mini" round>否</el-button>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="颜色" prop="colour">
83
+        <template slot-scope="scope">
84
+          <div :style="{ backgroundColor: scope.row.colour, width: '40px', height: '30px', borderRadius: '50%'}"></div>
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
88
+        <template slot-scope="scope">
89
+          <el-button
90
+            size="mini"
91
+            type="text"
92
+            icon="el-icon-edit"
93
+            @click="handleUpdate(scope.row)"
94
+            v-hasPermi="['type:trafficType:edit']"
95
+          >修改</el-button>
96
+          <el-button
97
+            size="mini"
98
+            type="text"
99
+            icon="el-icon-delete"
100
+            @click="handleDelete(scope.row)"
101
+            v-hasPermi="['type:trafficType:remove']"
102
+          >删除</el-button>
103
+        </template>
104
+      </el-table-column>
105
+    </el-table>
106
+
107
+    <pagination
108
+      v-show="total>0"
109
+      :total="total"
110
+      :page.sync="queryParams.pageNum"
111
+      :limit.sync="queryParams.pageSize"
112
+      @pagination="getList"
113
+    />
114
+
115
+    <!-- 添加或修改交通类型对话框 -->
116
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
117
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
118
+        <el-form-item label="父类型编号" prop="parentId">
119
+          <el-input-number v-model="form.parentId" controls-position="right"   :min="0" placeholder="请输入父类型编号" />
120
+        </el-form-item>
121
+
122
+        <el-form-item label="类别名称" prop="typeName">
123
+          <el-input v-model="form.typeName" placeholder="请输入类别名称" />
124
+        </el-form-item>
125
+        <el-form-item label="是否可点击">
126
+          <el-switch v-model="form.click"></el-switch>
127
+        </el-form-item>
128
+        <el-form-item label="是否可搜索">
129
+          <el-switch v-model="form.search"></el-switch>
130
+        </el-form-item>
131
+        <el-form-item label="类别描述" prop="description">
132
+          <el-input v-model="form.description" placeholder="请输入类别描述" />
133
+        </el-form-item>
134
+        <el-form-item label="排序" prop="orderId">
135
+          <el-input-number v-model="form.orderId" controls-position="right"   :min="0" placeholder="请输入排序" />
136
+        </el-form-item>
137
+
138
+        <el-form-item label="备注" prop="memo">
139
+          <el-input v-model="form.memo" placeholder="请输入备注" />
140
+        </el-form-item>
141
+        <el-form-item label="颜色">
142
+          <el-color-picker v-model="form.colour"></el-color-picker>
143
+        </el-form-item>
144
+      </el-form>
145
+      <div slot="footer" class="dialog-footer">
146
+        <el-button type="primary" @click="submitForm">确 定</el-button>
147
+        <el-button @click="cancel">取 消</el-button>
148
+      </div>
149
+    </el-dialog>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import { listTrafficType, getTrafficType, delTrafficType, addTrafficType, updateTrafficType, exportTrafficType } from "@/api/type/trafficType";
155
+
156
+export default {
157
+  name: "TrafficType",
158
+  data() {
159
+    return {
160
+      // 遮罩层
161
+      loading: true,
162
+      // 导出遮罩层
163
+      exportLoading: false,
164
+      // 选中数组
165
+      ids: [],
166
+      // 非单个禁用
167
+      single: true,
168
+      // 非多个禁用
169
+      multiple: true,
170
+      // 显示搜索条件
171
+      showSearch: true,
172
+      // 总条数
173
+      total: 0,
174
+      // 交通类型表格数据
175
+      trafficTypeList: [],
176
+      // 弹出层标题
177
+      title: "",
178
+      // 是否显示弹出层
179
+      open: false,
180
+      // 查询参数
181
+      queryParams: {
182
+        pageNum: 1,
183
+        pageSize: 10,
184
+        typeName: null,
185
+      },
186
+      // 表单参数
187
+      form: {},
188
+      // 表单校验
189
+      rules: {
190
+        typeId: [
191
+          { required: true, message: "类别编号不能为空", trigger: "blur" }
192
+        ],
193
+      }
194
+    };
195
+  },
196
+  created() {
197
+    this.getList();
198
+  },
199
+  methods: {
200
+    /** 查询交通类型列表 */
201
+    getList() {
202
+      this.loading = true;
203
+      listTrafficType(this.queryParams).then(response => {
204
+        this.trafficTypeList = response.data.list;
205
+        this.total = response.data.total;
206
+        this.loading = false;
207
+      });
208
+    },
209
+    // 取消按钮
210
+    cancel() {
211
+      this.open = false;
212
+      this.reset();
213
+    },
214
+    // 表单重置
215
+    reset() {
216
+      this.form = {
217
+        typeId: null,
218
+        parentId: null,
219
+        typeName: null,
220
+        click: true,
221
+        search: true,
222
+        description: null,
223
+        orderId: null,
224
+        memo: null,
225
+        colour: null
226
+      };
227
+      this.resetForm("form");
228
+    },
229
+    /** 搜索按钮操作 */
230
+    handleQuery() {
231
+      this.queryParams.pageNum = 1;
232
+      this.getList();
233
+    },
234
+    /** 重置按钮操作 */
235
+    resetQuery() {
236
+      this.resetForm("queryForm");
237
+      this.handleQuery();
238
+    },
239
+    // 多选框选中数据
240
+    handleSelectionChange(selection) {
241
+      this.ids = selection.map(item => item.typeId)
242
+      this.single = selection.length!==1
243
+      this.multiple = !selection.length
244
+    },
245
+    /** 新增按钮操作 */
246
+    handleAdd() {
247
+      this.reset();
248
+      this.open = true;
249
+      this.title = "添加交通类型";
250
+    },
251
+    /** 修改按钮操作 */
252
+    handleUpdate(row) {
253
+      this.reset();
254
+      const typeId = row.typeId || this.ids
255
+      getTrafficType(typeId).then(response => {
256
+        this.form = response.data;
257
+        this.open = true;
258
+        this.title = "修改交通类型";
259
+      });
260
+    },
261
+    /** 提交按钮 */
262
+    submitForm() {
263
+      this.$refs["form"].validate(valid => {
264
+        if (valid) {
265
+          if (this.form.typeId != null) {
266
+            updateTrafficType(this.form).then(response => {
267
+              this.$modal.msgSuccess("修改成功");
268
+              this.open = false;
269
+              this.getList();
270
+            });
271
+          } else {
272
+            addTrafficType(this.form).then(response => {
273
+              this.$modal.msgSuccess("新增成功");
274
+              this.open = false;
275
+              this.getList();
276
+            });
277
+          }
278
+        }
279
+      });
280
+    },
281
+    /** 删除按钮操作 */
282
+    handleDelete(row) {
283
+      const typeIds = row.typeId || this.ids;
284
+      this.$modal.confirm('是否确认删除交通类型编号为"' + typeIds + '"的数据项?').then(function() {
285
+        return delTrafficType(typeIds);
286
+      }).then(() => {
287
+        this.getList();
288
+        this.$modal.msgSuccess("删除成功");
289
+      }).catch(() => {});
290
+    },
291
+    /** 导出按钮操作 */
292
+    handleExport() {
293
+      const queryParams = this.queryParams;
294
+      this.$modal.confirm('是否确认导出所有交通类型数据项?').then(() => {
295
+        this.exportLoading = true;
296
+        return exportTrafficType(queryParams);
297
+      }).then(response => {
298
+        this.$download.name(response.msg);
299
+        this.exportLoading = false;
300
+      }).catch(() => {});
301
+    }
302
+  }
303
+};
304
+</script>

+ 264 - 0
src/views/view/synthesisAnalyze/index.vue

@@ -0,0 +1,264 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item>
5
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
6
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
7
+      </el-form-item>
8
+    </el-form>
9
+
10
+    <el-row :gutter="10" class="mb8">
11
+      <el-col :span="1.5">
12
+        <el-button
13
+          type="primary"
14
+          plain
15
+          icon="el-icon-plus"
16
+          size="mini"
17
+          @click="handleAdd"
18
+          v-hasPermi="['view:synthesisAnalyze:add']"
19
+        >新增</el-button>
20
+      </el-col>
21
+      <el-col :span="1.5">
22
+        <el-button
23
+          type="success"
24
+          plain
25
+          icon="el-icon-edit"
26
+          size="mini"
27
+          :disabled="single"
28
+          @click="handleUpdate"
29
+          v-hasPermi="['view:synthesisAnalyze:edit']"
30
+        >修改</el-button>
31
+      </el-col>
32
+      <el-col :span="1.5">
33
+        <el-button
34
+          type="danger"
35
+          plain
36
+          icon="el-icon-delete"
37
+          size="mini"
38
+          :disabled="multiple"
39
+          @click="handleDelete"
40
+          v-hasPermi="['view:synthesisAnalyze:remove']"
41
+        >删除</el-button>
42
+      </el-col>
43
+      <el-col :span="1.5">
44
+        <el-button
45
+          type="warning"
46
+          plain
47
+          icon="el-icon-download"
48
+          size="mini"
49
+          :loading="exportLoading"
50
+          @click="handleExport"
51
+          v-hasPermi="['view:synthesisAnalyze:export']"
52
+        >导出</el-button>
53
+      </el-col>
54
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
55
+    </el-row>
56
+
57
+    <el-table v-loading="loading" :data="synthesisAnalyzeList" @selection-change="handleSelectionChange">
58
+      <el-table-column type="selection" width="55" align="center" />
59
+      <el-table-column label="id" align="center" prop="id" />
60
+      <el-table-column label="发展定位" align="center" prop="orientation" />
61
+      <el-table-column label="红利政策" align="center" prop="bonusPolicy" />
62
+      <el-table-column label="规划蓝图" align="center" prop="planningLayout">
63
+        <template slot-scope="scope">
64
+          <img :src="BASE_URL + scope.row.planningLayout" alt="户型图" style="width: 50px; height: 50px;">
65
+        </template>
66
+      </el-table-column>
67
+
68
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
69
+        <template slot-scope="scope">
70
+          <el-button
71
+            size="mini"
72
+            type="text"
73
+            icon="el-icon-edit"
74
+            @click="handleUpdate(scope.row)"
75
+            v-hasPermi="['view:synthesisAnalyze:edit']"
76
+          >修改</el-button>
77
+          <el-button
78
+            size="mini"
79
+            type="text"
80
+            icon="el-icon-delete"
81
+            @click="handleDelete(scope.row)"
82
+            v-hasPermi="['view:synthesisAnalyze:remove']"
83
+          >删除</el-button>
84
+        </template>
85
+      </el-table-column>
86
+    </el-table>
87
+
88
+    <pagination
89
+      v-show="total>0"
90
+      :total="total"
91
+      :page.sync="queryParams.pageNum"
92
+      :limit.sync="queryParams.pageSize"
93
+      @pagination="getList"
94
+    />
95
+
96
+    <!-- 添加或修改综合分析对话框 -->
97
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
98
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
99
+        <el-form-item label="发展定位">
100
+          <wang-editor v-model="form.orientation" :min-height="140"/>
101
+        </el-form-item>
102
+        <el-form-item label="红利政策">
103
+          <wang-editor v-model="form.bonusPolicy" :min-height="140"/>
104
+        </el-form-item>
105
+        <el-form-item label="规划蓝图">
106
+          <imageUpload v-model="form.planningLayout"/>
107
+        </el-form-item>
108
+        <el-form-item label="宣传视频">
109
+          <fileUpload v-model="form.audioUrl"/>
110
+        </el-form-item>
111
+      </el-form>
112
+      <div slot="footer" class="dialog-footer">
113
+        <el-button type="primary" @click="submitForm">确 定</el-button>
114
+        <el-button @click="cancel">取 消</el-button>
115
+      </div>
116
+    </el-dialog>
117
+  </div>
118
+</template>
119
+
120
+<script>
121
+import { listSynthesisAnalyze, getSynthesisAnalyze, delSynthesisAnalyze, addSynthesisAnalyze, updateSynthesisAnalyze, exportSynthesisAnalyze } from "@/api/view/synthesisAnalyze";
122
+
123
+export default {
124
+  name: "SynthesisAnalyze",
125
+  data() {
126
+    return {
127
+      BASE_URL: BASE_URL,
128
+      // 遮罩层
129
+      loading: true,
130
+      // 导出遮罩层
131
+      exportLoading: false,
132
+      // 选中数组
133
+      ids: [],
134
+      // 非单个禁用
135
+      single: true,
136
+      // 非多个禁用
137
+      multiple: true,
138
+      // 显示搜索条件
139
+      showSearch: true,
140
+      // 总条数
141
+      total: 0,
142
+      // 综合分析表格数据
143
+      synthesisAnalyzeList: [],
144
+      // 弹出层标题
145
+      title: "",
146
+      // 是否显示弹出层
147
+      open: false,
148
+      // 查询参数
149
+      queryParams: {
150
+        pageNum: 1,
151
+        pageSize: 10,
152
+      },
153
+      // 表单参数
154
+      form: {},
155
+      // 表单校验
156
+      rules: {
157
+      }
158
+    };
159
+  },
160
+  created() {
161
+    this.getList();
162
+  },
163
+  methods: {
164
+    /** 查询综合分析列表 */
165
+    getList() {
166
+      this.loading = true;
167
+      listSynthesisAnalyze(this.queryParams).then(response => {
168
+        this.synthesisAnalyzeList = response.data.list;
169
+        this.total = response.data.total;
170
+        this.loading = false;
171
+      });
172
+    },
173
+    // 取消按钮
174
+    cancel() {
175
+      this.open = false;
176
+      this.reset();
177
+    },
178
+    // 表单重置
179
+    reset() {
180
+      this.form = {
181
+        id: null,
182
+        orientation: null,
183
+        bonusPolicy: null,
184
+        planningLayout: null,
185
+        audioUrl: null
186
+      };
187
+      this.resetForm("form");
188
+    },
189
+    /** 搜索按钮操作 */
190
+    handleQuery() {
191
+      this.queryParams.pageNum = 1;
192
+      this.getList();
193
+    },
194
+    /** 重置按钮操作 */
195
+    resetQuery() {
196
+      this.resetForm("queryForm");
197
+      this.handleQuery();
198
+    },
199
+    // 多选框选中数据
200
+    handleSelectionChange(selection) {
201
+      this.ids = selection.map(item => item.id)
202
+      this.single = selection.length!==1
203
+      this.multiple = !selection.length
204
+    },
205
+    /** 新增按钮操作 */
206
+    handleAdd() {
207
+      this.reset();
208
+      this.open = true;
209
+      this.title = "添加综合分析";
210
+    },
211
+    /** 修改按钮操作 */
212
+    handleUpdate(row) {
213
+      this.reset();
214
+      const id = row.id || this.ids
215
+      getSynthesisAnalyze(id).then(response => {
216
+        this.form = response.data;
217
+        this.open = true;
218
+        this.title = "修改综合分析";
219
+      });
220
+    },
221
+    /** 提交按钮 */
222
+    submitForm() {
223
+      this.$refs["form"].validate(valid => {
224
+        if (valid) {
225
+          if (this.form.id != null) {
226
+            updateSynthesisAnalyze(this.form).then(response => {
227
+              this.$modal.msgSuccess("修改成功");
228
+              this.open = false;
229
+              this.getList();
230
+            });
231
+          } else {
232
+            addSynthesisAnalyze(this.form).then(response => {
233
+              this.$modal.msgSuccess("新增成功");
234
+              this.open = false;
235
+              this.getList();
236
+            });
237
+          }
238
+        }
239
+      });
240
+    },
241
+    /** 删除按钮操作 */
242
+    handleDelete(row) {
243
+      const ids = row.id || this.ids;
244
+      this.$modal.confirm('是否确认删除综合分析编号为"' + ids + '"的数据项?').then(function() {
245
+        return delSynthesisAnalyze(ids);
246
+      }).then(() => {
247
+        this.getList();
248
+        this.$modal.msgSuccess("删除成功");
249
+      }).catch(() => {});
250
+    },
251
+    /** 导出按钮操作 */
252
+    handleExport() {
253
+      const queryParams = this.queryParams;
254
+      this.$modal.confirm('是否确认导出所有综合分析数据项?').then(() => {
255
+        this.exportLoading = true;
256
+        return exportSynthesisAnalyze(queryParams);
257
+      }).then(response => {
258
+        this.$download.name(response.msg);
259
+        this.exportLoading = false;
260
+      }).catch(() => {});
261
+    }
262
+  }
263
+};
264
+</script>