qianduan 1 an în urmă
părinte
comite
181b34ddab
100 a modificat fișierele cu 8939 adăugiri și 960 ștergeri
  1. 3 0
      .eslintrc.js
  2. 394 14
      package-lock.json
  3. 2 0
      package.json
  4. 7 5
      src/App.vue
  5. 53 0
      src/api/car.js
  6. 45 0
      src/api/commodity.js
  7. 37 0
      src/api/facility.js
  8. 45 0
      src/api/filling.js
  9. 61 0
      src/api/inspection.js
  10. 45 0
      src/api/levy.js
  11. 19 2
      src/api/login.js
  12. 63 0
      src/api/menu.js
  13. 98 0
      src/api/order.js
  14. 45 0
      src/api/power.js
  15. 45 0
      src/api/record.js
  16. 18 0
      src/api/security.js
  17. 55 0
      src/api/shop.js
  18. 45 0
      src/api/specification.js
  19. 55 0
      src/api/transport.js
  20. 67 0
      src/api/user.js
  21. 45 0
      src/api/warehouse.js
  22. 171 16
      src/assets/css/global.css
  23. BIN
      src/assets/frame.png
  24. 0 0
      src/assets/guizhou.json
  25. 0 0
      src/assets/guizhou.svg
  26. BIN
      src/assets/image/aspirated.png
  27. BIN
      src/assets/image/big-bg1.png
  28. BIN
      src/assets/image/card-title-modify-1.png
  29. BIN
      src/assets/image/client.png
  30. BIN
      src/assets/image/index_bg.png
  31. BIN
      src/assets/image/liquefiedgas.png
  32. BIN
      src/assets/image/login-bg.png
  33. BIN
      src/assets/image/login-input-bg.png
  34. BIN
      src/assets/image/shop.png
  35. BIN
      src/assets/image/station.png
  36. BIN
      src/assets/image/tip-box.png
  37. BIN
      src/assets/image/tip-box1.png
  38. BIN
      src/assets/js/DS-DIGI.ttf
  39. 2 2
      src/assets/js/announcements.js
  40. 299 0
      src/assets/js/blockSort.js
  41. 18 14
      src/assets/js/districtCode.js
  42. 0 60
      src/components/HelloWorld.vue
  43. 116 0
      src/components/MapContainer.vue
  44. 214 0
      src/components/abnormalCylinder.vue
  45. 69 15
      src/components/actionBar.vue
  46. 300 90
      src/components/formEmployee.vue
  47. 236 31
      src/components/forms.vue
  48. 85 41
      src/components/formsSafety.vue
  49. 238 0
      src/components/growthStatistics.vue
  50. 2 2
      src/components/pagination.vue
  51. 39 0
      src/components/proportion.vue
  52. 213 0
      src/components/securityCheck.vue
  53. 112 11
      src/components/tables.vue
  54. 59 10
      src/components/treeTable.vue
  55. 133 0
      src/components/wavyBlock.vue
  56. 22 15
      src/main.js
  57. 116 6
      src/mock/index.js
  58. 54 53
      src/permission.js
  59. 206 0
      src/router/generator-routers.js
  60. 1 160
      src/router/index.js
  61. 16 0
      src/store/getters.js
  62. 9 3
      src/store/index.js
  63. 0 24
      src/store/modules/async-router.js
  64. 46 0
      src/store/modules/permission.js
  65. 90 0
      src/store/modules/user.js
  66. 33 12
      src/utils/request.js
  67. 18 0
      src/utils/select.js
  68. 0 1
      src/views/404.vue
  69. 3 2
      src/views/common/Base.vue
  70. 25 14
      src/views/common/topNav.vue
  71. 19 10
      src/views/common/userInfo.vue
  72. 62 0
      src/views/customer/accuse.js
  73. 461 27
      src/views/customer/agentOrdering.vue
  74. 18 14
      src/views/customer/client.js
  75. 109 0
      src/views/customer/complaints.vue
  76. 271 14
      src/views/customer/customerFiling.vue
  77. 136 33
      src/views/customer/entrySecurity.vue
  78. 217 26
      src/views/customer/orderProcessing.vue
  79. 132 70
      src/views/customer/orderTable.js
  80. 25 39
      src/views/customer/pigeonhole.js
  81. 49 82
      src/views/customer/sendOrders.js
  82. 114 0
      src/views/manufacture/aerationInspection.vue
  83. 49 22
      src/views/manufacture/carTable.js
  84. 285 0
      src/views/manufacture/cylinder.js
  85. 117 2
      src/views/manufacture/cylinderFile.vue
  86. 210 0
      src/views/manufacture/cylinderSpecification.vue
  87. 58 0
      src/views/manufacture/entrepot.js
  88. 307 0
      src/views/manufacture/equipment.vue
  89. 439 0
      src/views/manufacture/examine.js
  90. 99 0
      src/views/manufacture/facility.js
  91. 108 0
      src/views/manufacture/filling.js
  92. 85 0
      src/views/manufacture/fillingGun.js
  93. 252 0
      src/views/manufacture/loadingGun.vue
  94. 100 0
      src/views/manufacture/roam.js
  95. 53 0
      src/views/manufacture/specification.js
  96. 195 0
      src/views/manufacture/tankFilling.vue
  97. 238 18
      src/views/manufacture/vehicle.vue
  98. 90 0
      src/views/manufacture/wanderAbout.vue
  99. 210 0
      src/views/manufacture/warehouse.vue
  100. 239 0
      src/views/marketing/allocation.vue

+ 3 - 0
.eslintrc.js

@@ -13,5 +13,8 @@ module.exports = {
   rules: {
     'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
     'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
+  },
+  global: {
+    AMap: true,
   }
 }

+ 394 - 14
package-lock.json

@@ -8,7 +8,13 @@
       "name": "gas-cylinder",
       "version": "0.1.0",
       "dependencies": {
+        "@amap/amap-jsapi-loader": "^1.0.1",
+        "axios": "^1.6.3",
         "core-js": "^3.8.3",
+        "echarts": "^5.4.3",
+        "element-ui": "^2.15.14",
+        "js-cookie": "^3.0.5",
+        "mockjs": "^1.1.0",
         "nprogress": "^0.2.0",
         "vue": "^2.6.14",
         "vue-router": "^3.5.1",
@@ -30,6 +36,7 @@
         "eslint-plugin-vue": "^8.0.3",
         "sass": "^1.32.7",
         "sass-loader": "^12.0.0",
+        "vue-amap": "^0.5.10",
         "vue-template-compiler": "^2.6.14"
       }
     },
@@ -58,6 +65,11 @@
         "node": "8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21"
       }
     },
+    "node_modules/@amap/amap-jsapi-loader": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
+      "integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
+    },
     "node_modules/@ampproject/remapping": {
       "version": "2.2.1",
       "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
@@ -3828,6 +3840,19 @@
         "lodash": "^4.17.14"
       }
     },
+    "node_modules/async-validator": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
+      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
+      "dependencies": {
+        "babel-runtime": "6.x"
+      }
+    },
+    "node_modules/asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+    },
     "node_modules/at-least-node": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
@@ -3889,6 +3914,21 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/axios": {
+      "version": "1.6.5",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-1.6.5.tgz",
+      "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==",
+      "dependencies": {
+        "follow-redirects": "^1.15.4",
+        "form-data": "^4.0.0",
+        "proxy-from-env": "^1.1.0"
+      }
+    },
+    "node_modules/babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
+    },
     "node_modules/babel-loader": {
       "version": "8.3.0",
       "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz",
@@ -4008,6 +4048,27 @@
         "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
       }
     },
+    "node_modules/babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
+      "dependencies": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      }
+    },
+    "node_modules/babel-runtime/node_modules/core-js": {
+      "version": "2.6.12",
+      "resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
+      "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
+      "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
+      "hasInstallScript": true
+    },
+    "node_modules/babel-runtime/node_modules/regenerator-runtime": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
+    },
     "node_modules/balanced-match": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -4562,11 +4623,21 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/combined-stream": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "dependencies": {
+        "delayed-stream": "~1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
     "node_modules/commander": {
       "version": "7.2.0",
       "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
       "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 10"
@@ -5205,7 +5276,6 @@
       "version": "1.5.2",
       "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
       "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
@@ -5353,6 +5423,14 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
     "node_modules/depd": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -5541,6 +5619,20 @@
         "node": ">=6.0.0"
       }
     },
+    "node_modules/echarts": {
+      "version": "5.4.3",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz",
+      "integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==",
+      "dependencies": {
+        "tslib": "2.3.0",
+        "zrender": "5.4.4"
+      }
+    },
+    "node_modules/echarts/node_modules/tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+    },
     "node_modules/ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -5555,6 +5647,22 @@
       "dev": true,
       "license": "ISC"
     },
+    "node_modules/element-ui": {
+      "version": "2.15.14",
+      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz",
+      "integrity": "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==",
+      "dependencies": {
+        "async-validator": "~1.8.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.0",
+        "deepmerge": "^1.2.0",
+        "normalize-wheel": "^1.0.1",
+        "resize-observer-polyfill": "^1.5.0",
+        "throttle-debounce": "^1.0.1"
+      },
+      "peerDependencies": {
+        "vue": "^2.5.17"
+      }
+    },
     "node_modules/emoji-regex": {
       "version": "8.0.0",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -6825,7 +6933,6 @@
       "version": "1.15.4",
       "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
       "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==",
-      "dev": true,
       "funding": [
         {
           "type": "individual",
@@ -6852,6 +6959,19 @@
         "is-callable": "^1.1.3"
       }
     },
+    "node_modules/form-data": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
+      "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+      "dependencies": {
+        "asynckit": "^0.4.0",
+        "combined-stream": "^1.0.8",
+        "mime-types": "^2.1.12"
+      },
+      "engines": {
+        "node": ">= 6"
+      }
+    },
     "node_modules/forwarded": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -8142,6 +8262,14 @@
         "@sideway/pinpoint": "^2.0.0"
       }
     },
+    "node_modules/js-cookie": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.5.tgz",
+      "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==",
+      "engines": {
+        "node": ">=14"
+      }
+    },
     "node_modules/js-message": {
       "version": "1.0.7",
       "resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.7.tgz",
@@ -8679,7 +8807,6 @@
       "version": "1.52.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
       "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.6"
@@ -8689,7 +8816,6 @@
       "version": "2.1.35",
       "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
       "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
-      "dev": true,
       "license": "MIT",
       "dependencies": {
         "mime-db": "1.52.0"
@@ -8784,6 +8910,17 @@
         "mkdirp": "bin/cmd.js"
       }
     },
+    "node_modules/mockjs": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/mockjs/-/mockjs-1.1.0.tgz",
+      "integrity": "sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==",
+      "dependencies": {
+        "commander": "*"
+      },
+      "bin": {
+        "random": "bin/random"
+      }
+    },
     "node_modules/module-alias": {
       "version": "2.2.3",
       "resolved": "https://registry.npmjs.org/module-alias/-/module-alias-2.2.3.tgz",
@@ -8988,6 +9125,11 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/normalize-wheel": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
+    },
     "node_modules/npm-run-path": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -10292,6 +10434,11 @@
         "node": ">= 0.10"
       }
     },
+    "node_modules/proxy-from-env": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+    },
     "node_modules/pseudomap": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
@@ -10634,6 +10781,11 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/resize-observer-polyfill": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
+    },
     "node_modules/resolve": {
       "version": "1.22.8",
       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
@@ -11883,6 +12035,14 @@
         "url": "https://opencollective.com/webpack"
       }
     },
+    "node_modules/throttle-debounce": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+      "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==",
+      "engines": {
+        "node": ">=4"
+      }
+    },
     "node_modules/thunky": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
@@ -12187,6 +12347,24 @@
         "browserslist": ">= 4.21.0"
       }
     },
+    "node_modules/uppercamelcase": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
+      "integrity": "sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA==",
+      "dev": true,
+      "dependencies": {
+        "camelcase": "^1.2.1"
+      }
+    },
+    "node_modules/uppercamelcase/node_modules/camelcase": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-1.2.1.tgz",
+      "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==",
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/uri-js": {
       "version": "4.4.1",
       "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@@ -12269,6 +12447,20 @@
         "csstype": "^3.1.0"
       }
     },
+    "node_modules/vue-amap": {
+      "version": "0.5.10",
+      "resolved": "https://registry.npmmirror.com/vue-amap/-/vue-amap-0.5.10.tgz",
+      "integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
+      "dev": true,
+      "dependencies": {
+        "uppercamelcase": "^1.1.0"
+      },
+      "engines": {
+        "core-js": "^2.5.0",
+        "node": ">= 4.0.0",
+        "npm": ">= 3.0.0"
+      }
+    },
     "node_modules/vue-eslint-parser": {
       "version": "8.3.0",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
@@ -13037,6 +13229,19 @@
       "engines": {
         "node": ">=0.10.0"
       }
+    },
+    "node_modules/zrender": {
+      "version": "5.4.4",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",
+      "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==",
+      "dependencies": {
+        "tslib": "2.3.0"
+      }
+    },
+    "node_modules/zrender/node_modules/tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
     }
   },
   "dependencies": {
@@ -13057,6 +13262,11 @@
         "js-message": "1.0.7"
       }
     },
+    "@amap/amap-jsapi-loader": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
+      "integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
+    },
     "@ampproject/remapping": {
       "version": "2.2.1",
       "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
@@ -15681,6 +15891,19 @@
         "lodash": "^4.17.14"
       }
     },
+    "async-validator": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
+      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
+      "requires": {
+        "babel-runtime": "6.x"
+      }
+    },
+    "asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+    },
     "at-least-node": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
@@ -15707,6 +15930,21 @@
       "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
       "dev": true
     },
+    "axios": {
+      "version": "1.6.5",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-1.6.5.tgz",
+      "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==",
+      "requires": {
+        "follow-redirects": "^1.15.4",
+        "form-data": "^4.0.0",
+        "proxy-from-env": "^1.1.0"
+      }
+    },
+    "babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
+    },
     "babel-loader": {
       "version": "8.3.0",
       "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz",
@@ -15788,6 +16026,27 @@
         "@babel/helper-define-polyfill-provider": "^0.4.4"
       }
     },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
+      "requires": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      },
+      "dependencies": {
+        "core-js": {
+          "version": "2.6.12",
+          "resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
+          "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
+        },
+        "regenerator-runtime": {
+          "version": "0.11.1",
+          "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+          "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
+        }
+      }
+    },
     "balanced-match": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -16161,11 +16420,18 @@
       "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
       "dev": true
     },
+    "combined-stream": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "requires": {
+        "delayed-stream": "~1.0.0"
+      }
+    },
     "commander": {
       "version": "7.2.0",
       "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
-      "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
-      "dev": true
+      "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="
     },
     "commondir": {
       "version": "1.0.1",
@@ -16591,8 +16857,7 @@
     "deepmerge": {
       "version": "1.5.2",
       "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
-      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
-      "dev": true
+      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
     },
     "default-gateway": {
       "version": "6.0.3",
@@ -16686,6 +16951,11 @@
         "object-keys": "^1.1.1"
       }
     },
+    "delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
+    },
     "depd": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -16817,6 +17087,22 @@
       "integrity": "sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w==",
       "dev": true
     },
+    "echarts": {
+      "version": "5.4.3",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz",
+      "integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==",
+      "requires": {
+        "tslib": "2.3.0",
+        "zrender": "5.4.4"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+          "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+        }
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -16829,6 +17115,19 @@
       "integrity": "sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==",
       "dev": true
     },
+    "element-ui": {
+      "version": "2.15.14",
+      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz",
+      "integrity": "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==",
+      "requires": {
+        "async-validator": "~1.8.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.0",
+        "deepmerge": "^1.2.0",
+        "normalize-wheel": "^1.0.1",
+        "resize-observer-polyfill": "^1.5.0",
+        "throttle-debounce": "^1.0.1"
+      }
+    },
     "emoji-regex": {
       "version": "8.0.0",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -17747,8 +18046,7 @@
     "follow-redirects": {
       "version": "1.15.4",
       "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
-      "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==",
-      "dev": true
+      "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw=="
     },
     "for-each": {
       "version": "0.3.3",
@@ -17759,6 +18057,16 @@
         "is-callable": "^1.1.3"
       }
     },
+    "form-data": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
+      "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+      "requires": {
+        "asynckit": "^0.4.0",
+        "combined-stream": "^1.0.8",
+        "mime-types": "^2.1.12"
+      }
+    },
     "forwarded": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -18593,6 +18901,11 @@
         "@sideway/pinpoint": "^2.0.0"
       }
     },
+    "js-cookie": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.5.tgz",
+      "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw=="
+    },
     "js-message": {
       "version": "1.0.7",
       "resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.7.tgz",
@@ -18991,14 +19304,12 @@
     "mime-db": {
       "version": "1.52.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
-      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
-      "dev": true
+      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
     },
     "mime-types": {
       "version": "2.1.35",
       "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
       "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
-      "dev": true,
       "requires": {
         "mime-db": "1.52.0"
       }
@@ -19057,6 +19368,14 @@
         "minimist": "^1.2.6"
       }
     },
+    "mockjs": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/mockjs/-/mockjs-1.1.0.tgz",
+      "integrity": "sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==",
+      "requires": {
+        "commander": "*"
+      }
+    },
     "module-alias": {
       "version": "2.2.3",
       "resolved": "https://registry.npmjs.org/module-alias/-/module-alias-2.2.3.tgz",
@@ -19194,6 +19513,11 @@
       "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
       "dev": true
     },
+    "normalize-wheel": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
+    },
     "npm-run-path": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -20036,6 +20360,11 @@
         }
       }
     },
+    "proxy-from-env": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+    },
     "pseudomap": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
@@ -20274,6 +20603,11 @@
       "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
       "dev": true
     },
+    "resize-observer-polyfill": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
+    },
     "resolve": {
       "version": "1.22.8",
       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
@@ -21122,6 +21456,11 @@
         }
       }
     },
+    "throttle-debounce": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+      "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
+    },
     "thunky": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
@@ -21319,6 +21658,23 @@
         "picocolors": "^1.0.0"
       }
     },
+    "uppercamelcase": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
+      "integrity": "sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA==",
+      "dev": true,
+      "requires": {
+        "camelcase": "^1.2.1"
+      },
+      "dependencies": {
+        "camelcase": {
+          "version": "1.2.1",
+          "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-1.2.1.tgz",
+          "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==",
+          "dev": true
+        }
+      }
+    },
     "uri-js": {
       "version": "4.4.1",
       "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@@ -21383,6 +21739,15 @@
         "csstype": "^3.1.0"
       }
     },
+    "vue-amap": {
+      "version": "0.5.10",
+      "resolved": "https://registry.npmmirror.com/vue-amap/-/vue-amap-0.5.10.tgz",
+      "integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
+      "dev": true,
+      "requires": {
+        "uppercamelcase": "^1.1.0"
+      }
+    },
     "vue-eslint-parser": {
       "version": "8.3.0",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
@@ -21906,6 +22271,21 @@
           "dev": true
         }
       }
+    },
+    "zrender": {
+      "version": "5.4.4",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",
+      "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==",
+      "requires": {
+        "tslib": "2.3.0"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+          "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+        }
+      }
     }
   }
 }

+ 2 - 0
package.json

@@ -10,6 +10,7 @@
   "dependencies": {
     "axios": "^1.6.3",
     "core-js": "^3.8.3",
+    "echarts": "^5.4.3",
     "element-ui": "^2.15.14",
     "js-cookie": "^3.0.5",
     "mockjs": "^1.1.0",
@@ -34,6 +35,7 @@
     "eslint-plugin-vue": "^8.0.3",
     "sass": "^1.32.7",
     "sass-loader": "^12.0.0",
+    "vue-amap": "^0.5.10",
     "vue-template-compiler": "^2.6.14"
   }
 }

+ 7 - 5
src/App.vue

@@ -1,19 +1,21 @@
 <template>
+  <!-- 燃气瓶后台管理系统 -->
   <div id="app">
     <router-view />
   </div>
 </template>
 
 <style lang="scss">
+  @font-face {
+    font-family: mFont;
+    src: url(@/assets/js/DS-DIGI.ttf);
+  }
+
   html,
   body,
   #app {
-    z-index: 2023;
     width: 100%;
     height: 100%;
-    background: url(./assets/image/index_bg.png) no-repeat;
-    background-size: 100% 120%;
-    background-position: center;
-    background-attachment: fixed;
+    background: url(./assets/image/index_bg.png) center center / 100% 100% no-repeat fixed;
   }
 </style>

+ 53 - 0
src/api/car.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 获取权限列表
+export function getCar(parameter) {
+  return request({
+    url: '/api/car-info',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取权限详情
+export function getCarDetails(parameter) {
+  return request({
+    url: '/api/car-info/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加角色权限
+export function addCar(parameter) {
+  return request({
+    url: '/api/car-info',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑角色权限
+export function putCar(parameter) {
+  return request({
+    url: '/api/car-info',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除权限
+export function delCar(parameter) {
+  return request({
+    url: '/api/car-info',
+    method: 'delete',
+    data: parameter
+  })
+}
+// 绑定货车司机
+export function bindTruckUser(parameter) {
+  return request({
+    url: '/api/car-info/bind-truck-user',
+    method: 'post',
+    data: parameter
+  })
+}

+ 45 - 0
src/api/commodity.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 获取商品列表
+export function getGoods(parameter) {
+  return request({
+    url: '/api/goods',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取商品详情
+export function getGoodsDetails(parameter) {
+  return request({
+    url: '/api/goods/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加商品
+export function addGoods(parameter) {
+  return request({
+    url: '/api/goods',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑商品
+export function putGoods(parameter) {
+  return request({
+    url: '/api/goods',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除商品
+export function delGoods(parameter) {
+  return request({
+    url: '/api/goods',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 37 - 0
src/api/facility.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+// 获取设备列表
+export function getCylinder(parameter) {
+  return request({
+    url: '/api/device',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 添加设备
+export function addCylinder(parameter) {
+  return request({
+    url: '/api/device',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑设备
+export function putCylinder(parameter) {
+  return request({
+    url: '/api/device',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除设备
+export function delCylinder(parameter) {
+  return request({
+    url: '/api/device',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 45 - 0
src/api/filling.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 获取充装枪管理列表
+export function getFillGun(parameter) {
+  return request({
+    url: '/api/fill-gun',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取充装枪详情
+export function getFillGunDetails(parameter) {
+  return request({
+    url: '/api/fill-gun/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加充装枪
+export function addFillGun(parameter) {
+  return request({
+    url: '/api/fill-gun',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑充装枪
+export function putFillGun(parameter) {
+  return request({
+    url: '/api/fill-gun',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除充装枪
+export function delFillGun(parameter) {
+  return request({
+    url: '/api/fill-gun',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 61 - 0
src/api/inspection.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 获取派费列表
+export function getFillCheck(parameter) {
+  return request({
+    url: '/api/fill-check',
+    method: 'get',
+    params: parameter
+  })
+}
+// 获取钢瓶档案列表
+export function getGasCylinder(parameter) {
+  return request({
+    url: '/api/gas-cylinder',
+    method: 'get',
+    params: parameter
+  })
+}
+// 获取钢瓶档案详情
+export function getGasCylinderDetails(parameter) {
+  return request({
+    url: '/api/gas-cylinder/' + parameter,
+    method: 'get',
+  })
+}
+
+// 获取充装管理列表
+export function getFillData(parameter) {
+  return request({
+    url: '/api/fill_data',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取气瓶流转步骤列表
+export function getOperationLog(parameter) {
+  return request({
+    url: '/api/operation-log',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取气站列表
+export function getStation(parameter) {
+  return request({
+    url: '/api/fill_data/station',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取充装员列表
+export function getUserFillData(parameter) {
+  return request({
+    url: '/api/fill_data/user',
+    method: 'get',
+    params: parameter
+  })
+}

+ 45 - 0
src/api/levy.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 获取派费列表
+export function getGoods(parameter) {
+  return request({
+    url: '/api/dispatch-cost',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取派费详情
+export function getGoodsDetails(parameter) {
+  return request({
+    url: '/api/dispatch-cost/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加派费
+export function addGoods(parameter) {
+  return request({
+    url: '/api/dispatch-cost',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑派费
+export function putGoods(parameter) {
+  return request({
+    url: '/api/dispatch-cost',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除派费
+export function delGoods(parameter) {
+  return request({
+    url: '/api/dispatch-cost',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 19 - 2
src/api/login.js

@@ -7,7 +7,7 @@ import axios from 'axios'
 // 登录
 export function login(parameter) {
   return request({
-    url: '/login',
+    url: '/api/login',
     method: 'post',
     data: parameter
   })
@@ -15,11 +15,28 @@ export function login(parameter) {
 // 发送验证码
 export function getSmsCaptcha(parameter) {
   return request({
-    url: '/User/SandVerify',
+    url: '/api/verify-code',
     method: 'post',
     data: parameter
   })
 }
+// 退出登录
+export function logout(parameter) {
+  return request({
+    url: '/api/login',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 刷新token
+export function refreshToken(parameter) {
+  return request({
+    url: '/api/refresh_token',
+    method: 'get',
+    data: parameter
+  })
+}
 
 // mock
 export function getToken(parameter) {

+ 63 - 0
src/api/menu.js

@@ -0,0 +1,63 @@
+import request from '@/utils/request'
+
+// 获取菜单列表
+export function getMenu(parameter) {
+  return request({
+    url: '/api/menu',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取菜单详情
+export function getMenuDetails(parameter) {
+  return request({
+    url: '/api/menu',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取左侧菜单列表
+export function getMenuRole(parameter) {
+  return request({
+    url: '/api/menu-role',
+    method: 'get',
+    params: parameter
+  })
+}
+// 获取菜单列表(添加权限)
+export function getMenuRoleSelect(parameter) {
+  return request({
+    url: '/api/menu-select',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 添加菜单
+export function addMenu(parameter) {
+  return request({
+    url: '/api/menu',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑菜单
+export function putMenu(parameter) {
+  return request({
+    url: '/api/menu',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除菜单
+export function delMenu(parameter) {
+  return request({
+    url: '/api/menu',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 98 - 0
src/api/order.js

@@ -0,0 +1,98 @@
+import request from '@/utils/request'
+
+// 获取订单列表
+export function getOrder(parameter) {
+  return request({
+    url: '/api/order',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 通过手机号获取客户信息
+export function getCustomer(parameter) {
+  return request({
+    url: '/api/customer/phone',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取配送门店列表
+export function getDelivery(parameter) {
+  return request({
+    url: '/api/store/delivery',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取配送员列表
+export function getSysuser(parameter) {
+  return request({
+    url: '/api/sys-user/delivery',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 创建或更新客户信息
+export function addCustomer(parameter) {
+  return request({
+    url: '/api/customer/insert-or-update',
+    method: 'post',
+    data: parameter
+  })
+}
+// 下单
+export function addOrder(parameter) {
+  return request({
+    url: '/api/order',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 修改订单
+export function putOrder(parameter) {
+  return request({
+    url: '/api/order',
+    method: 'put',
+    data: parameter
+  })
+}
+// 删除权限
+export function delCar(parameter) {
+  return request({
+    url: '/api/car-info',
+    method: 'delete',
+    data: parameter
+  })
+}
+
+// 取消订单
+export function cancelOrder(parameter) {
+  return request({
+    url: '/api/order/cancel',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 派单
+export function orderDelivery(parameter) {
+  return request({
+    url: '/api/order/delivery',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 获取配送员列表
+export function getBorrowGasCylinder(parameter) {
+  return request({
+    url: '/api/customer/borrow-gas-cylinder',
+    method: 'get',
+    params: parameter
+  })
+}

+ 45 - 0
src/api/power.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 获取权限列表
+export function getRole(parameter) {
+  return request({
+    url: '/api/role',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取权限详情
+export function getRoleDetails(parameter) {
+  return request({
+    url: '/api/role/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加角色权限
+export function addRole(parameter) {
+  return request({
+    url: '/api/role',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑角色权限
+export function putRole(parameter) {
+  return request({
+    url: '/api/role',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除权限
+export function delRole(parameter) {
+  return request({
+    url: '/api/role',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 45 - 0
src/api/record.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 获取客户档案
+export function getCustomer(parameter) {
+  return request({
+    url: '/api/customer',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取客户档案详情
+export function getCustomerDetails(parameter) {
+  return request({
+    url: '/api/customer/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加客户档案
+export function addCustomer(parameter) {
+  return request({
+    url: '/api/customer',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑客户档案
+export function putCustomer(parameter) {
+  return request({
+    url: '/api/customer',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除客户档案
+export function delCustomer(parameter) {
+  return request({
+    url: '/api/customer',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 18 - 0
src/api/security.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+
+// 获取入户安全
+export function getInspectRecord(parameter) {
+  return request({
+    url: '/api/inspect_record',
+    method: 'get',
+    params: parameter
+  })
+}
+// 编辑入户安全检查
+export function putInspectRecord(parameter) {
+  return request({
+    url: '/api/inspect_record',
+    method: 'put',
+    data: parameter
+  })
+}

+ 55 - 0
src/api/shop.js

@@ -0,0 +1,55 @@
+import request from '@/utils/request'
+
+// 获取销售门店列表
+export function getStore(parameter) {
+  return request({
+    url: '/api/store',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取销售门店详情
+export function getStoreDetails(parameter) {
+  return request({
+    url: '/api/store/2',
+    method: 'GET',
+    params: parameter
+  })
+}
+
+// 添加销售门店
+export function addStore(parameter) {
+  return request({
+    url: '/api/store',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑销售门店
+export function putStore(parameter) {
+  return request({
+    url: '/api/store',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 进入
+export function enterStore(parameter) {
+  return request({
+    url: '/api/store/enter',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 删除销售门店
+export function delStore(parameter) {
+  return request({
+    url: '/api/store',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 45 - 0
src/api/specification.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 获取商品列表
+export function getCylinder(parameter) {
+  return request({
+    url: '/api/gas-cylinder-spec',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取商品详情
+export function getCylinderDetails(parameter) {
+  return request({
+    url: '/api/gas-cylinder-spec/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加商品
+export function addCylinder(parameter) {
+  return request({
+    url: '/api/gas-cylinder-spec',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑商品
+export function putCylinder(parameter) {
+  return request({
+    url: '/api/gas-cylinder-spec',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除商品
+export function delCylinder(parameter) {
+  return request({
+    url: '/api/gas-cylinder-spec',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 55 - 0
src/api/transport.js

@@ -0,0 +1,55 @@
+import request from '@/utils/request'
+
+// 获取运输企业列表
+export function getTruckList(parameter) {
+  return request({
+    url: '/api/truck-enterprise',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取运输企业详情
+export function getEnterprise(parameter) {
+  return request({
+    url: '/api/truck-enterprise/2',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 添加运输企业
+export function addEnterprise(parameter) {
+  return request({
+    url: '/api/truck-enterprise',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑运输企业
+export function putEnterprise(parameter) {
+  return request({
+    url: '/api/truck-enterprise',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 进入
+export function enterEnterprise(parameter) {
+  return request({
+    url: '/api/truck-enterprise/enter',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 删除运输企业
+export function delEnterprise(parameter) {
+  return request({
+    url: '/api/truck-enterprise',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 67 - 0
src/api/user.js

@@ -0,0 +1,67 @@
+import request from '@/utils/request'
+
+// 获取用户列表
+export function getUser(parameter) {
+  return request({
+    url: '/api/sys-user',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取用户详情
+export function getUserDetails(parameter) {
+  return request({
+    url: '/api/sys-use/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加用户
+export function addUser(parameter) {
+  return request({
+    url: '/api/sys-user',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑用户
+export function putUser(parameter) {
+  return request({
+    url: '/api/sys-user',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 重置用户密码
+export function putResetUser(parameter) {
+  return request({
+    url: '/api/user/pwd/reset',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除用户
+export function delUser(parameter) {
+  return request({
+    url: '/api/sys-user',
+    method: 'delete',
+    data: parameter
+  })
+}
+// 上传
+export function getFileToken(parameter) {
+  return request({
+    url: '/api/upload',
+    method: 'post',
+    data: parameter,
+    uploading: true,
+    timeout: 100000, // 请求超时时间
+    headers: {
+      'Content-Type': 'multipart-formData'
+    },
+  })
+}

+ 45 - 0
src/api/warehouse.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 获取商品列表
+export function getWarehouse(parameter) {
+  return request({
+    url: '/api/warehouse',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取商品详情
+export function getWarehouseDetails(parameter) {
+  return request({
+    url: '/api/warehouse/' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加商品
+export function addWarehouse(parameter) {
+  return request({
+    url: '/api/warehouse',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑商品
+export function putWarehouse(parameter) {
+  return request({
+    url: '/api/warehouse',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除商品
+export function delWarehouse(parameter) {
+  return request({
+    url: '/api/warehouse',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 171 - 16
src/assets/css/global.css

@@ -26,41 +26,41 @@ body,
 }
 
 .el-table th.el-table__cell {
-	background: rgba(2, 59, 115, 1);
+	background: rgba(2, 59, 115, 1) !important;
 }
 
 .el-table thead {
-	color: #fff;
+	color: #fff !important;
 }
 
 /*最外层透明*/
 .el-table,
 .el-table__expanded-cell {
-	background-color: transparent;
-	color: #05b3d3
+	background-color: transparent !important;
+	color: #05b3d3 !important;
 }
 
 /* 表格内背景颜色 */
 .el-table th,
 .el-table tr,
 .el-table td {
-	background-color: transparent;
-	border-color: #21606e;
+	background-color: transparent !important;
+	border-color: #21606e !important;
 }
 
 .el-table td.el-table__cell,
 .el-table th.el-table__cell.is-leaf {
-	border-bottom: 1px solid #0171b9;
+	border-bottom: 1px solid #0171b9 !important;
 }
 
 .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
-	background: rgba(255, 255, 255, 0.5);
-	color: #fff;
+	background: rgba(255, 255, 255, 0.2) !important;
+	color: #fff !important;
 }
 
 .el-button {
 	color: #fff !important;
-	background: transparent;
+	background: transparent !important;
 }
 
 .el-button--default:hover {
@@ -71,7 +71,25 @@ body,
 	background-color: rgba(102, 177, 255, 0.5) !important;
 }
 
+.el-button--primary.is-disabled,
+.el-button--primary.is-disabled:active,
+.el-button--primary.is-disabled:focus,
+.el-button--primary.is-disabled:hover {
+	color: #8cc5ff !important;
+	background-color: #ecf5ff !important;
+	border-color: #d9ecff !important;
+}
+
+.el-button--danger.is-disabled,
+.el-button--danger.is-disabled:active,
+.el-button--danger.is-disabled:focus,
+.el-button--danger.is-disabled:hover {
+	background-color: #fab6b6 !important;
+	border-color: #fab6b6 !important;
+}
+
 .el-button--primary:hover {
+	color: #fff !important;
 	background-color: rgba(102, 177, 255, 1) !important;
 }
 
@@ -84,6 +102,24 @@ body,
 	background-color: rgba(245, 108, 108, 1) !important;
 }
 
+.el-button--warning {
+	border-color: #e6a23c !important;
+	background-color: rgba(230, 162, 60, 0.3) !important;
+}
+
+.el-button--warning:hover {
+	background-color: #e6a23c !important;
+}
+
+.el-button--info {
+	border-color: #909399 !important;
+	background-color: rgba(144, 147, 153, 0.3) !important;
+}
+
+.el-button--info:hover {
+	background-color: #909399 !important;
+}
+
 .el-table--border::after,
 .el-table--group::after,
 .el-table::before {
@@ -96,17 +132,55 @@ body,
 }
 
 .el-table__fixed-right {
-	box-shadow: 0 0 10px rgba(219, 239, 253, .2) !important;
+	background-color: rgb(20 37 55) !important;
+}
+
+.is-scrolling-left,
+.is-scrolling-middle,
+.is-scrolling-right {
+	&+.el-table__fixed-right {
+		height: calc(100% - 17px) !important;
+	}
+
+	&+.el-table__fixed {
+		height: calc(100% - 17px) !important;
+
+		&+.el-table__fixed-right {
+			height: calc(100% - 17px) !important;
+		}
+	}
+}
+
+.el-table__fixed::before {
+	background-color: unset !important;
 }
 
+.el-table__fixed {
+	color: #67c23a !important;
+	background-color: rgb(20 37 55) !important;
+	/* box-shadow: 0 0 10px rgba(219, 239, 253, .2) !important; */
+}
+
+/* .el-table__fixed {
+	box-shadow: 0 0 10px rgba(219, 239, 253, .2) !important;
+} */
+
 .el-select {
 	width: 100% !important;
 }
 
-.el-date-editor {
+.el-dialog .el-date-editor {
 	width: 100% !important;
 }
 
+.el-date-editor--daterange.el-input__inner {
+	width: 260px !important;
+}
+
+.el-date-editor .el-range-separator {
+	line-height: 36px !important;
+}
+
 .el-select-dropdown {
 	background-color: rgba(2, 59, 115, .8) !important;
 	border: 1px solid #409EFF !important;
@@ -155,9 +229,11 @@ body,
 .el-cascader-node:hover {
 	background-color: rgba(64, 158, 255, .5) !important;
 }
-.el-cascader-node:not(.is-disabled):focus{
+
+.el-cascader-node:not(.is-disabled):focus {
 	background-color: rgba(64, 158, 255, .5) !important;
 }
+
 .el-pagination__total,
 .el-pagination__jump {
 	color: #fff;
@@ -196,6 +272,7 @@ body,
 }
 
 .el-dialog {
+	margin-top: 10vh !important;
 	background: rgba(2, 69, 115, .9) !important;
 }
 
@@ -223,6 +300,15 @@ body,
 	border: 1px solid #07c0e0 !important;
 }
 
+.el-range-editor .el-range-input {
+	color: #fff;
+	background-color: unset !important;
+}
+
+.el-date-editor .el-range-separator {
+	color: #fff;
+}
+
 .el-input--prefix .el-input__inner {
 	padding-left: 30px !important;
 }
@@ -239,9 +325,11 @@ body,
 }
 
 .el-textarea__inner:hover {
-	border: 1px solid #07c0e0 !important;
+	border-color: #07c0e0 !important;
+}
+.el-textarea.is-disabled .el-textarea__inner{
+	border-color: rgba(255, 255, 255, .2) !important;
 }
-
 .el-radio {
 	color: #fff !important;
 }
@@ -279,18 +367,72 @@ body,
 	padding: 0px 5px !important;
 }
 
+.el-picker-panel .el-input__inner {
+	color: #606266 !important;
+	border-radius: 4px !important;
+	border: 1px solid #dcdfe6 !important;
+	background-color: #fff !important;
+}
+
+.el-picker-panel .el-input.is-disabled .el-input__inner {
+	background-color: #f5f7fa !important;
+	border-color: #e4e7ed !important;
+	color: #c0c4cc !important;
+	cursor: not-allowed !important;
+}
+
+.el-picker-panel .el-button {
+	background: #fff !important;
+	border: 1px solid #dcdfe6 !important;
+	color: #606266 !important;
+}
+
+.el-picker-panel .el-button.is-plain:hover {
+	background: #fff !important;
+	border-color: #409eff !important;
+	color: #409eff !important;
+}
+
+.el-picker-panel .el-button.is-disabled.is-plain,
+.el-picker-panel .el-button.is-disabled.is-plain:focus,
+.el-picker-panel .el-button.is-disabled.is-plain:hover {
+	background-color: #fff !important;
+	border-color: #ebeef5 !important;
+	color: #c0c4cc !important;
+}
+
+.el-picker-panel .el-button--text {
+	border-color: transparent !important;
+	color: #409eff !important;
+	background: transparent !important;
+}
+
+.el-picker-panel .el-button--text:hover {
+	color: #66b1ff !important;
+	border-color: transparent !important;
+	background-color: transparent !important;
+}
+
 .avatar-uploader .el-upload {
-	border: 1px solid #d9d9d9;
+	border: 1px solid #d9d9d9 !important;
 	border-radius: 6px;
 	cursor: pointer;
 	position: relative;
 	overflow: hidden;
 }
 
+.el-upload--picture-card {
+	border: 1px solid #d9d9d9 !important;
+}
+
 .avatar-uploader .el-upload:hover {
 	border-color: #409EFF;
 }
 
+.el-upload--picture-card {
+	background-color: unset !important;
+}
+
 .avatar-uploader-icon {
 	font-size: 28px;
 	color: #8c939d;
@@ -304,4 +446,17 @@ body,
 	width: 140px;
 	height: 140px;
 	display: block;
+}
+
+.el-message-box {
+	border: unset !important;
+	background-color: rgba(2, 69, 115, 0.9) !important;
+}
+
+.el-message-box__title {
+	color: #fff !important;
+}
+
+.el-message-box__content {
+	color: #fff !important;
 }

BIN
src/assets/frame.png


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
src/assets/guizhou.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
src/assets/guizhou.svg


BIN
src/assets/image/aspirated.png


BIN
src/assets/image/big-bg1.png


BIN
src/assets/image/card-title-modify-1.png


BIN
src/assets/image/client.png


BIN
src/assets/image/index_bg.png


BIN
src/assets/image/liquefiedgas.png


BIN
src/assets/image/login-bg.png


BIN
src/assets/image/login-input-bg.png


BIN
src/assets/image/shop.png


BIN
src/assets/image/station.png


BIN
src/assets/image/tip-box.png


BIN
src/assets/image/tip-box1.png


BIN
src/assets/js/DS-DIGI.ttf


+ 2 - 2
src/assets/js/announcements.js

@@ -2,11 +2,11 @@ export const check = () => {
   return [{
     id: 'ITEM_1',
     label: '是否违规在地下室、卫生间或密闭的房间内存放使用瓶装液化气。',
-    value: '0',
+    value: '',
   },{
     id: 'ITEM_2',
     label: '液化气瓶、炉具使用或气瓶存放的房间内是否违反规定安床住人。',
-    value: '0',
+    value: '',
   },{
     id: 'ITEM_3',
     label: '液化气瓶、炉具使用或存放的房间上方是否搭建阁楼。',

+ 299 - 0
src/assets/js/blockSort.js

@@ -0,0 +1,299 @@
+export const whether = () => {
+  return [{
+      bgcolor: '#409EFF',
+      label: '无',
+      value: 0,
+    },
+    {
+      bgcolor: '#E6A23C',
+      label: '有',
+      value: 1,
+    },
+  ]
+}
+export const havenot = () => {
+  return [{
+      label: '是',
+      value: true,
+    },
+    {
+      label: '不是',
+      value: false,
+    },
+  ]
+}
+export const remould = () => {
+  return [{
+      label: '未改造',
+      value: true,
+    },
+    {
+      label: '已改造',
+      value: false,
+    },
+  ]
+}
+export const missing = () => {
+  return [{
+      label: '丢失',
+      value: true,
+    },
+    {
+      label: '未丢失',
+      value: false,
+    },
+  ]
+}
+export const statisticalState = () => {
+  return [{
+      label: '已提交待审批',
+      value: 'inform',
+    },
+    {
+      label: '在用',
+      value: 'using',
+    },
+    {
+      label: '报废',
+      value: 'scrapped',
+    },
+  ]
+}
+export const intact = () => {
+  return [{
+      bgcolor: '#67C23A',
+      label: '完好',
+      value: 0,
+    },
+    {
+      bgcolor: '#F56C6C',
+      label: '缺失',
+      value: 1,
+    },
+  ]
+}
+export const normal = () => {
+  return [{
+      bgcolor: '#67C23A',
+      label: '正常',
+      value: 0,
+    },
+    {
+      bgcolor: '#F56C6C',
+      label: '不正常',
+      value: 1,
+    },
+  ]
+}
+export const orderStatus = () => {
+  return [{
+      bgcolor: '#409EFF',
+      label: '已下单',
+      value: 1,
+    },
+    {
+      bgcolor: '#E6A23C',
+      label: '已派单',
+      value: 2,
+    },
+    {
+      bgcolor: '#67C23A',
+      label: '已完成',
+      value: 3,
+    },
+    {
+      bgcolor: '#F56C6C',
+      label: '已作废',
+      value: 4,
+    },
+    {
+      bgcolor: '#67C23A',
+      label: '配送中',
+      value: 5,
+    }
+  ]
+}
+export const neurogen = () => {
+  return [{
+      label: '液化石油气',
+      value: 0,
+    },
+    {
+      label: '二甲醚',
+      value: 1,
+    },
+    {
+      label: '氧气',
+      value: 2,
+    },
+    {
+      label: '二氧化碳',
+      value: 3,
+    },
+    {
+      label: '溶解乙炔',
+      value: 4,
+    }
+  ]
+}
+export const attribution = () => {
+  return [{
+      label: '门店',
+      value: '0001',
+    },
+    {
+      label: '气站',
+      value: '0002',
+    },
+    {
+      label: '企业',
+      value: '0003',
+    },
+    {
+      label: '检验机构',
+      value: '0004',
+    },
+    {
+      label: '移动库',
+      value: '005',
+    },
+    {
+      label: '门店',
+      value: '006',
+    }
+  ]
+}
+export const cylinderCondition = () => {
+  return [{
+      label: '新瓶提交',
+      value: 'submit',
+    },
+    {
+      label: '在用(以检验)',
+      value: 'using',
+    },
+    {
+      label: '停用(待检验)',
+      value: 'stop',
+    },
+    {
+      label: '报废',
+      value: 'scrapped',
+    }
+  ]
+}
+export const rectificationState = () => {
+  return [{
+      bgcolor: '#F56C6C',
+      label: '待整改',
+      value: 0,
+    },
+    {
+      bgcolor: '#E6A23C',
+      label: '整改中',
+      value: 1,
+    },
+    {
+      bgcolor: '#67C23A',
+      label: '已整改',
+      value: 2
+    },
+    {
+      bgcolor: '#409EFF',
+      label: '合格',
+      value: -1,
+    }
+  ]
+}
+
+export const process = () => {
+  return [{
+      label: '商家入库',
+      value: '6',
+    },
+    {
+      label: '门店空瓶出库',
+      value: '10',
+    },
+    {
+      label: '司机确认空瓶装车',
+      value: '11',
+    },
+    {
+      label: '司机运输空瓶到达气站',
+      value: '12',
+    },
+    {
+      label: '气站确认空瓶到达气站',
+      value: '13',
+    },
+    {
+      label: '气站充装空瓶',
+      value: '14',
+    },
+    {
+      label: '气站重瓶出库',
+      value: '15',
+    },
+    {
+      label: '司机将订单退回气站',
+      value: '16',
+    },
+    {
+      label: '司机确认重瓶从气站出库',
+      value: '17',
+    },
+    {
+      label: '司机交付门店',
+      value: '19',
+    },
+    {
+      label: '门店回收空瓶',
+      value: '21',
+    },
+    {
+      label: '气瓶检验',
+      value: '23',
+    },
+    {
+      label: '送气员领重瓶出库',
+      value: '25',
+    },
+    {
+      label: '送气员送达重瓶',
+      value: '26',
+    },
+    {
+      label: '送气员回收空瓶',
+      value: '27',
+    },
+    {
+      label: '门店确认重瓶卸货入库',
+      value: '31',
+    },
+    {
+      label: '门店将重瓶退回司机',
+      value: '33',
+    },
+    {
+      label: '门店取消订单',
+      value: '34',
+    },
+    {
+      label: '门店确认未配送重瓶返库',
+      value: '35',
+    },
+    {
+      label: '送气订单取消',
+      value: '36',
+    },
+    {
+      label: '门店重瓶出库',
+      value: '37',
+    },
+    {
+      label: '上报流程异常信息',
+      value: '1000',
+    }
+  ]
+}

+ 18 - 14
src/assets/js/districtCode.js

@@ -248,6 +248,9 @@ export const urbanArea = () => {
     }, {
       value: '522431',
       label: '金海湖新区',
+    }, {
+      value: '524027',
+      label: '威宁彝族回族苗族自治县',
     }]
   }, {
     value: '522400',
@@ -348,19 +351,20 @@ export const urbanArea = () => {
       label: '都匀经济开发区',
     }]
   }, {
-    value: '522801',
-    label: '党武',
-  }, {
-    value: '522802',
-    label: '湖潮',
-  }, {
-    value: '522803',
-    label: '马场',
-  }, {
-    value: '522804',
-    label: '高峰',
-  }, {
-    value: '524027',
-    label: '威宁彝族回族苗族自治县',
+    value: '522800',
+    label: '贵安新区',
+    children: [{
+      value: '522801',
+      label: '党武',
+    }, {
+      value: '522802',
+      label: '湖潮',
+    }, {
+      value: '522803',
+      label: '马场',
+    }, {
+      value: '522804',
+      label: '高峰',
+    }]
   }]
 }

+ 0 - 60
src/components/HelloWorld.vue

@@ -1,60 +0,0 @@
-<template>
-  <div class="hello">
-    <h1>{{ msg }}</h1>
-    <p>
-      For a guide and recipes on how to configure / customize this project,<br>
-      check out the
-      <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
-    </p>
-    <h3>Installed CLI Plugins</h3>
-    <ul>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
-    </ul>
-    <h3>Essential Links</h3>
-    <ul>
-      <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
-      <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
-      <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
-      <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
-      <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
-    </ul>
-    <h3>Ecosystem</h3>
-    <ul>
-      <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
-      <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
-      <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
-      <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
-      <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
-    </ul>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'HelloWorld',
-  props: {
-    msg: String
-  }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped lang="scss">
-h3 {
-  margin: 40px 0 0;
-}
-ul {
-  list-style-type: none;
-  padding: 0;
-}
-li {
-  display: inline-block;
-  margin: 0 10px;
-}
-a {
-  color: #42b983;
-}
-</style>

+ 116 - 0
src/components/MapContainer.vue

@@ -0,0 +1,116 @@
+<template>
+  <!-- 地图气瓶追溯 -->
+  <div style="width: 100%;height: 100%;">
+    <div id="container"></div>
+    <i class="el-icon-close card_close" @click="close"></i>
+    <div class="card_welcome" id="result">您好,欢迎进入【遵义气瓶分店】</div>
+  </div>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        map: null,
+      }
+    },
+    mounted() {
+      // this.keyUpSearch()
+    },
+    methods: {
+      keyUpSearch() {
+        var that = this
+        var positions = [
+          [106.643062, 26.647066],
+          [106.652782, 26.644841],
+          [106.648233, 26.631262],
+          [106.646688, 26.623512],
+          [106.631239, 26.618908]
+        ];
+        that.map = new AMap.Map("container", {
+          resizeEnable: true,
+          zoom: 13,
+          center: positions[0],
+        });
+        AMap.service(["AMap.PlaceSearch"], function() {
+          var placeSearch = new AMap.PlaceSearch({ //构造地点查询类
+            map: that.map,
+            panel: "result",
+            autoFitView: true
+          });
+        })
+        var markers = [];
+        for (var i = 0, marker; i < positions.length; i++) {
+          marker = new AMap.Marker({
+            map: that.map,
+            position: positions[i],
+            icon: new AMap.Icon({
+              image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
+              imageSize: new AMap.Size(28, 38),
+            }),
+          });
+          markers.push(marker);
+        }
+        // 绘制轨迹
+        var polyline = new AMap.Polyline({
+          map: that.map,
+          path: positions,
+          showDir: true,
+          strokeColor: "#28F", //线颜色
+          strokeWeight: 10, //线宽
+        });
+      },
+      destroyMap() {
+        this.map && this.map.destroy();
+      },
+      close() {
+        this.destroyMap()
+        this.$emit('close')
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  #container {
+    position: relative;
+    width: 100%;
+    height: 100%;
+  }
+
+  #container ::v-deep .amap-logo {
+    display: none !important;
+    left: 0;
+    height: 17px;
+    margin: 0 1px;
+  }
+
+  #container ::v-deep .amap-copyright {
+    display: none !important;
+    left: 70px;
+    height: 16px;
+    font-size: 11px;
+  }
+
+  .card_close {
+    cursor: pointer;
+    position: fixed;
+    top: 10px;
+    right: 10px;
+    color: red;
+    font-size: 22px;
+    font-weight: 700;
+  }
+
+  .card_welcome {
+    position: fixed;
+    padding: 5px 15px;
+    top: 10px;
+    width: 220px;
+    left: calc(50% - 110px);
+    border-radius: 6px;
+    background-color: #fff;
+    color: #000;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
+  }
+</style>

+ 214 - 0
src/components/abnormalCylinder.vue

@@ -0,0 +1,214 @@
+<template>
+  <!-- 气站钢瓶投入 -->
+  <div class="border" :style="{height: boxHeight}">
+    <div class="card_box">
+      <div class="title_trapezoid center_in">
+        <span class="center_in">{{title}}</span>
+      </div>
+    </div>
+    <div class="card_collect">
+      <div id="putInto"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'wavyBlock',
+    props: {
+      title: {
+        type: String,
+        default: () => '文字',
+      },
+      boxHeight: {
+        type: String,
+        default: () => '95%',
+      },
+    },
+    data() {
+      return {}
+    },
+    mounted() {
+      this.getEnterpriseCylinder()
+    },
+    methods: {
+      getEnterpriseCylinder() {
+        var chartDom = document.getElementById('putInto');
+        var myChart = this.$echarts.init(chartDom);
+        var option;
+        var nameArr = ['高新','南明','云岩','花溪','汇川','红花岗','桐梓','道真','余庆','赤水','安顺','平坝'];
+        const valueArr = [150, 60, 80, 180, 120, 160, 80, 40, 20, 30, 22, 13]
+        option = {
+          grid: {
+            top: '10%',
+            left: '12%',
+            right: '5%',
+            bottom: '12%'
+          },
+          tooltip: {
+            trigger: 'axis',
+            backgroundColor: '#3A4667',
+            borderColor: '#3A4667',
+            textStyle: {
+              color: '#fff'
+            },
+            formatter: '{b} : {c}瓶',
+            axisPointer: {
+              type: 'cross',
+              crossStyle: {
+                color: '#999'
+              }
+            }
+          },
+          legend: {
+            icon: 'rect',
+            top: 10,
+            right: 5,
+            itemWidth: 10,
+            itemHeight: 10,
+            textStyle: {
+              fontSize: 12, // 字体大小
+              color: '#B3CFFF' // 字体颜色
+            }
+          },
+          xAxis: {
+            type: 'category',
+            axisPointer: {
+              type: 'shadow'
+            },
+            axisLine: {
+              lineStyle: {
+                color: 'rgba(112, 138, 198, 1)',
+              },
+            },
+            axisLabel: {
+              textStyle: {
+                color: '#B3CFFF', // x轴文本颜色
+                fontSize: 12
+              },
+              // rotate:30,
+            },
+            axisTick: {
+              show: false
+            },
+            data: nameArr
+          },
+          yAxis: {
+            type: 'value',
+            splitLine: {
+              show: true,
+              lineStyle: {
+                color: '#162647',
+                type: 'solid'
+              }
+            },
+            axisLabel: {
+              formatter: '{value}瓶',
+              textStyle: {
+                color: '#B3CFFF', // x轴文本颜色
+                fontSize: 12
+              },
+            },
+            name: '',
+            nameTextStyle: {
+              color: '#B3CFFF',
+              fontSize: 12,
+            }
+          },
+          series: [{
+              type: 'bar',
+              name: '',
+              barWidth: 16,
+              itemStyle: {
+                normal: {
+                  color: new this.$echarts.graphic.LinearGradient(
+                    0,
+                    1,
+                    0,
+                    0,
+                    [{
+                        offset: 0,
+                        color: 'rgba(123, 133, 255, 1)', // 0% 处的颜色
+                      },
+                      {
+                        offset: 1,
+                        color: 'rgba(96, 132, 255, 0)', // 100% 处的颜色
+                      },
+                    ],
+                    false
+                  ),
+                }
+              },
+              data: valueArr
+            },
+          ]
+        }
+        myChart.setOption(option);
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .border {
+    border: 1px solid #3077ca;
+    margin: 0 10px 0 auto;
+    border-radius: 4px;
+    box-shadow: inset 0 0 40px rgba(48, 119, 202, 0.3);
+  }
+
+
+  .card_box {
+    position: absolute;
+    top: 0;
+    left: calc(50% - 100px);
+    right: 0;
+  }
+
+  .title_trapezoid {
+    position: relative;
+    color: #fff !important;
+    width: 200px;
+    height: 30px;
+    text-align: center;
+    z-index: 2;
+  }
+
+  .title_trapezoid span {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 200px;
+    top: -1px;
+    z-index: 2;
+    font-size: 15px;
+    line-height: 25px;
+  }
+
+  .title_trapezoid::before {
+    border-bottom: 2px solid #2CD5FF;
+    content: '';
+    z-index: 1;
+    width: 100%;
+    height: 30px;
+    background-image: linear-gradient(to top, #3077ca99, #3077ca7f, transparent);
+    display: inline-block;
+    position: absolute;
+    left: 0;
+    top: -1px;
+    transform: perspective(100px) rotateX(150deg);
+  }
+
+  .card_collect {
+    display: flex;
+    flex-wrap: wrap;
+    flex-direction: row;
+    margin-top: 30px;
+    height: calc(100% - 30px);
+  }
+
+  #putInto {
+    width: 100%;
+    height: 100%;
+  }
+</style>

+ 69 - 15
src/components/actionBar.vue

@@ -1,36 +1,49 @@
 <template>
   <div>
     <div class="card_action_bar">
-      <div>
+      <div style="display: flex;flex-direction: column;">
         <div class="action_bar_headline" :class="formList.length>0?'margin_5x':''">{{menuTitle}}</div>
         <el-form :model="ruleForm" ref="ruleForm" label-width="100" class="el-row demo-ruleForm"
           :label-position="labelPosition">
-          <div style="display: flex;">
-            <el-form-item style="display: flex;margin-right: 10px;" class="bottom_zero" v-for="(item, index) in formList"
-              :key="index" :label="item.label" :prop="item.field" :class="item.colWidth">
+          <div style="display: flex;flex-wrap: wrap;flex-direction: row;">
+            <el-form-item style="display: flex;margin-right: 10px;margin-bottom: 10px !important;"
+              v-for="(item, index) in formList" :key="index" :label="item.label" :prop="item.field"
+              :class="item.colWidth">
               <!-- 输入框 -->
               <template v-if="item.type === 'input'">
                 <div class="forms_dom">
-                  <el-input autocomplete="new-password" :placeholder="item.placeholder" :disabled="item.disabled"
-                    :id="item.field" :show-password="item.mold ? true : false" v-model="ruleForm[`${item.field}`]" />
+                  <el-input size="medium" autocomplete="new-password" :placeholder="item.placeholder"
+                    :disabled="item.disabled" :id="item.field" :show-password="item.mold ? true : false"
+                    v-model="ruleForm[`${item.field}`]" />
                 </div>
               </template>
               <!-- 下拉框 -->
               <template v-if="item.type === 'select'">
-                <el-select :id="item.field" class="forms_dom" v-model="ruleForm[`${item.field}`]"
+                <el-select size="medium" :id="item.field" class="forms_dom" v-model="ruleForm[`${item.field}`]"
                   :placeholder="item.placeholder" :disabled="item.disabled" :multiple="item.multiple"
                   style="width: 100%" @change="changeSelect">
                   <el-option v-for="(element, i) in item.options" :label="element.label" :value="`${element.value}`"
                     :key="i" />
                 </el-select>
               </template>
+              <!-- 时间区间 -->
+              <template v-if="item.type === 'picker'">
+                <el-date-picker size="medium" v-model="ruleForm[`${item.field}`]" type="daterange" align="right"
+                  value-format="yyyy-MM-dd" unlink-panels range-separator="至" start-placeholder="开始日期"
+                  end-placeholder="结束日期" :picker-options="pickerOptions">
+                </el-date-picker>
+              </template>
+            </el-form-item>
+            <el-form-item style="display: flex;margin-right: 10px;margin-bottom: 10px !important;">
+              <el-button size="medium" type="primary" @click="searchProtocol">搜索</el-button>
+              <el-button size="medium" type="info" @click="reset">重置</el-button>
             </el-form-item>
           </div>
         </el-form>
       </div>
       <div class="same_row_in" v-if="operateList.length > 0">
-        <div v-for="(item1,index) in operateList" :key="index">
-          <el-button type="primary" size="small" :icon="item1.icon"
+        <div class="btn_head" v-for="(item1,index) in operateList" :key="index">
+          <el-button type="primary" size="medium" :icon="item1.icon"
             @click="openModel(item1.type)">{{item1.title}}</el-button>
         </div>
       </div>
@@ -57,23 +70,59 @@
         type: String,
         default: () => "right",
       },
+      ruleForm: {
+        type: Object,
+        default: () => {},
+      }
     },
     data() {
       return {
-        ruleForm: {}
+        pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近三个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        },
       }
     },
+    mounted() {},
     methods: {
       openModel(type) {
         this.$emit('openModel', type)
       },
-      // 搜索输入框
+      // 搜索
       searchProtocol() {
-
+        // console.log(this.ruleForm, '搜索')
+        this.$emit('searchProtocol', this.ruleForm)
       },
-      changeSelect() {
-
-      }
+      // 重置
+      reset() {
+        this.$refs.ruleForm.resetFields();
+        this.$forceUpdate()
+        this.$emit('reset')
+      },
+      changeSelect() {}
     }
   }
 </script>
@@ -95,4 +144,9 @@
   .margin_5x {
     margin-bottom: 10px;
   }
+
+  .btn_head {
+    margin-left: 10px;
+    margin-bottom: 10px;
+  }
 </style>

+ 300 - 90
src/components/formEmployee.vue

@@ -1,149 +1,173 @@
 <template>
   <div class="card_employee">
-    <el-form ref="form" :model="form" label-width="100px">
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px">
       <el-row>
         <el-col :span="12">
-          <el-form-item label="登录账号">
-            <el-input v-model="form.name" placeholder="请输入登录账号"></el-input>
+          <el-form-item label="登录账号" prop="username">
+            <el-input v-model="ruleForm.username" :disabled="operationType == 'add' ? false : true"
+              placeholder="请输入登录账号"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="12">
-          <el-form-item label="密码">
-            <el-input v-model="form.name" placeholder="请输入密码"></el-input>
+        <el-col :span="12" v-if="operationType === 'add'">
+          <el-form-item label="密码" prop="password">
+            <el-input :class="cipherState ? '' : 'no-autofill-pwd'" v-model="ruleForm.password" :disabled="forbid"
+              placeholder="请输入密码">
+              <i class="el-icon-view el-input__icon" slot="suffix" @click="handleIconClick"></i>
+            </el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item class="bottom_zero" label="权限">
-            <el-select v-model="form.region" placeholder="请选择权限">
-              <el-option label="区域一" value="shanghai"></el-option>
-              <el-option label="区域二" value="beijing"></el-option>
+          <el-form-item class="bottom_zero" label="权限" prop="roleId">
+            <el-select v-model="ruleForm.roleId" :disabled="forbid" placeholder="请选择权限">
+              <el-option :label="item.name" :value="item.id" v-for="(item,index) in menuData" :key="index"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12"></el-col>
         <el-col :span="24">
           <el-divider></el-divider>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="姓名">
-            <el-input v-model="form.name" placeholder="请输入姓名"></el-input>
+          <el-form-item label="姓名" prop="provUser.name">
+            <el-input v-model="ruleForm.provUser.name" :disabled="forbid" placeholder="请输入姓名"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="身份证号">
-            <el-input v-model="form.name" placeholder="请输入身份证号"></el-input>
+          <el-form-item label="身份证号" prop="provUser.idCard">
+            <el-input v-model="ruleForm.provUser.idCard" :disabled="forbid" placeholder="请输入身份证号"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="工号">
-            <el-input v-model="form.name" placeholder="请输入工号"></el-input>
+          <el-form-item label="工号" prop="provUser.no">
+            <el-input v-model="ruleForm.provUser.no" :disabled="forbid" placeholder="请输入工号"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="联系电话">
-            <el-input v-model="form.name" placeholder="请输入联系电话"></el-input>
+          <el-form-item label="联系电话" prop="provUser.phone">
+            <el-input v-model="ruleForm.provUser.phone" :disabled="forbid" placeholder="请输入联系电话"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="类型">
-            <el-select v-model="form.emptype" placeholder="请选择类型">
+          <el-form-item label="类型" prop="provUser.userType">
+            <el-select v-model="ruleForm.provUser.userType" :disabled="forbid" placeholder="请选择类型">
               <el-option v-for="item in employeeType" :key="item.value" :label="item.label" :value="item.value">
               </el-option>
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="12" v-if="ruleForm.provUser.userType == 3">
           <el-form-item>
-            <el-radio-group v-model="form.resource">
-              <el-radio label="送气员"></el-radio>
-              <el-radio label="库管"></el-radio>
+            <el-radio-group v-model="ruleForm.provUser.isorders">
+              <el-radio :label="0">送气员</el-radio>
+              <el-radio :label="1">库管</el-radio>
             </el-radio-group>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="聘用状态">
-            <el-input v-model="form.name" placeholder="聘用状态"></el-input>
+          <el-form-item label="聘用状态" prop="provUser.hireStatus">
+            <el-input v-model="ruleForm.provUser.hireStatus" :disabled="forbid" placeholder="聘用状态"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="聘用日期">
-            <el-date-picker v-model="form.name" type="date" placeholder="选择日期">
+          <el-form-item label="聘用日期" prop="provUser.hireTime">
+            <el-date-picker v-model="ruleForm.provUser.hireTime" :disabled="forbid" value-format="yyyy-MM-dd"
+              type="date" placeholder="选择日期">
             </el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="教育程度">
-            <el-input v-model="form.name" placeholder="教育程度"></el-input>
+          <el-form-item label="教育程度" prop="provUser.education">
+            <el-input v-model="ruleForm.provUser.education" :disabled="forbid" placeholder="教育程度"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="岗位类别">
-            <el-input v-model="form.name" placeholder="岗位类别"></el-input>
+          <el-form-item label="岗位类别" prop="provUser.jobCategory">
+            <el-input v-model="ruleForm.provUser.jobCategory" :disabled="forbid" placeholder="岗位类别"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="24">
-          <el-form-item label="描述">
-            <el-input type="textarea" v-model="form.desc" placeholder="请输入描述"></el-input>
+        <el-col :span="12">
+          <el-form-item label="资质" prop="provUser.personQual">
+            <el-input v-model="ruleForm.provUser.personQual" :disabled="forbid" placeholder="资质"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="24">
-          <div>《燃气从业资格证》/《道路运输从业人员从业资格证》信息</div>
+          <div class="card_margin_bottom">
+            <el-form-item label="描述">
+              <el-input type="textarea" v-model="ruleForm.provUser.description" :disabled="forbid"
+                placeholder="请输入描述"></el-input>
+            </el-form-item>
+          </div>
+        </el-col>
+        <el-col class="card_divider" :span="24"
+          v-if="ruleForm.provUser.userType === 3 && ruleForm.provUser.isorders == 0 || ruleForm.provUser.userType === 4">
           <el-divider></el-divider>
         </el-col>
       </el-row>
-      <el-row v-if="form.emptype === '3' || form.emptype === '4'">
-        <el-col :span="24" v-if="form.emptype === '3'">
+      <el-row
+        v-if="ruleForm.provUser.userType === 3 && staffDialogVisible  && ruleForm.provUser.isorders == 0 || ruleForm.provUser.userType === 4  && staffDialogVisible ">
+        <el-col :span="24" v-if="ruleForm.provUser.userType === 3">
           <div class="title_binding">绑定《燃气从业资格证》</div>
         </el-col>
         <el-col :span="24" v-else>
           <div class="title_binding">绑定《道路运输从业人员从业资格证》</div>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="证书编号">
-            <el-input v-model="form.name" placeholder="请输入证书编号"></el-input>
+          <el-form-item label="证书编号" prop="provTruck.certificateNo">
+            <el-input v-model="ruleForm.provTruck.certificateNo" :disabled="forbid" placeholder="请输入证书编号"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="类型">
-            <el-select v-model="form.region" placeholder="请选择类型">
-              <el-option label="区域一" value="shanghai"></el-option>
-              <el-option label="区域二" value="beijing"></el-option>
+          <el-form-item label="人员类型" prop="provTruck.type">
+            <el-select v-model="ruleForm.provTruck.type" :disabled="forbid" placeholder="请选择人员类型">
+              <el-option label="运输、维护和抢修人员" :value="1"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="发布机关">
-            <el-input v-model="form.name" placeholder="发布机关"></el-input>
+          <el-form-item label="发证机关" prop="provTruck.issueAuthority">
+            <el-input v-model="ruleForm.provTruck.issueAuthority" :disabled="forbid" placeholder="发证机关"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="发证时间">
-            <el-date-picker v-model="form.name" type="date" placeholder="选择日期">
+          <el-form-item label="发证时间" prop="provTruck.issueTime">
+            <el-date-picker v-model="ruleForm.provTruck.issueTime" :disabled="forbid" value-format="yyyy-MM-dd"
+              type="date" placeholder="选择日期">
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="form.emptype === '4'">
-          <el-form-item label="首次发证时间">
-            <el-date-picker v-model="form.name" type="date" placeholder="选择日期">
+        <el-col :span="12" v-if="ruleForm.provUser.userType === 4">
+          <el-form-item label="首次发证时间" prop="provTruck.firstIssueTime">
+            <el-date-picker v-model="ruleForm.provTruck.firstIssueTime" :disabled="forbid" value-format="yyyy-MM-dd"
+              type="date" placeholder="选择日期">
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="form.emptype === '4'">
-          <el-form-item label="有效期">
-            <el-date-picker v-model="form.name" type="date" placeholder="选择日期">
+        <el-col :span="12" v-if="ruleForm.provUser.userType === 4">
+          <el-form-item label="有效期" prop="provTruck.expireTime">
+            <el-date-picker v-model="ruleForm.provTruck.expireTime" :disabled="forbid" value-format="yyyy-MM-dd"
+              type="date" placeholder="选择日期">
             </el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="24">
           <el-form-item label="备注">
-            <el-input type="textarea" v-model="form.desc" placeholder="请输入备注内容"></el-input>
+            <el-input type="textarea" v-model="ruleForm.provTruck.remarks" :disabled="forbid"
+              placeholder="请输入备注内容"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="24">
-          <el-form-item class="card_fuel_gas" label="燃气从业资格证">
-            <el-upload class="avatar-uploader" action="https://jsonplaceholder.typicode.com/posts/"
-              :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
-              <img v-if="imageUrl" :src="imageUrl" class="avatar">
+        <el-col :span="24" :key="Math.random()" v-if="ruleForm.provUser.userType === 3">
+          <el-form-item label-width="130px" class="card_fuel_gas" label="燃气从业资格证" prop="provTruck.imgUrl">
+            <el-upload class="avatar-uploader" action="#" :show-file-list="false" :disabled="forbid"
+              :http-request="UploadImage">
+              <img v-if="ruleForm.provTruck.imgUrl" :src="$baseUrl + ruleForm.provTruck.imgUrl" class="avatar">
+              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            </el-upload>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24" :key="Math.random()" v-if="ruleForm.provUser.userType === 4">
+          <el-form-item label-width="120px" class="card_fuel_gas" label="道路运输从业人员从业资格证" prop="provTruck.imgUrl">
+            <el-upload class="avatar-uploader" action="#" :show-file-list="false" :disabled="forbid"
+              :http-request="UploadImage">
+              <img v-if="ruleForm.provTruck.imgUrl" :src="$baseUrl + ruleForm.provTruck.imgUrl" class="avatar">
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
             </el-upload>
           </el-form-item>
@@ -154,57 +178,226 @@
 </template>
 
 <script>
+  import {
+    getFileToken,
+  } from '@/api/user'
   export default {
     name: 'formEmployee',
+    props: {
+      // 绑定值
+      ruleForm: {
+        type: Object,
+        default: () => {},
+      },
+      // 权限角色
+      menuData: {
+        type: Array,
+        default: () => [],
+      },
+      operationType: {
+        type: String,
+        default: () => '',
+      },
+      // 弹窗
+      staffDialogVisible: {
+        type: Boolean,
+        default: () => false,
+      },
+      // 禁止
+      forbid: {
+        type: Boolean,
+        default: () => false,
+      }
+    },
     data() {
       return {
-        form: {
-          name: '',
-          region: '',
-          date1: '',
-          date2: '',
-          delivery: false,
-          type: [],
-          resource: '',
-          desc: '',
-          emptype: '',
+        cipherState: false,
+        rules: {
+          username: [{
+            required: true,
+            message: '请填写登录账号',
+            trigger: 'blur'
+          }],
+          password: [{
+              required: true,
+              message: '请填写登录密码',
+              trigger: 'blur'
+            },
+            {
+              min: 6,
+              max: 16,
+              message: '密码长度在 6 到 16 个字符',
+              trigger: 'blur'
+            }
+          ],
+          roleId: [{
+            required: true,
+            message: '请选择用户权限',
+            trigger: 'blur,change'
+          }],
+          "provUser.name": [{
+            required: true,
+            message: '请填写姓名',
+            trigger: 'blur'
+          }],
+          "provUser.idCard": [{
+            required: true,
+            message: '请填写身份证号',
+            trigger: 'blur'
+          }],
+          "provUser.no": [{
+            required: true,
+            message: '请填写工号',
+            trigger: 'blur'
+          }],
+          "provUser.phone": [{
+            required: true,
+            message: '请填写联系电话',
+            trigger: 'blur'
+          }],
+          "provUser.userType": [{
+            required: true,
+            message: '请选择类型',
+            trigger: 'blur,change'
+          }],
+          "provUser.hireStatus": [{
+            required: true,
+            message: '请填写聘用状态',
+            trigger: 'blur'
+          }],
+          "provUser.hireTime": [{
+            required: true,
+            message: '聘用日期',
+            trigger: 'blur,change'
+          }],
+          "provUser.education": [{
+            required: true,
+            message: '请填写教育程度',
+            trigger: 'blur'
+          }],
+          "provUser.jobCategory": [{
+            required: true,
+            message: '请填写岗位类别',
+            trigger: 'blur'
+          }],
+          "provUser.personQual": [{
+            required: true,
+            message: '请填写员工资质',
+            trigger: 'blur'
+          }],
+          "provTruck.certificateNo": [{
+            required: true,
+            message: '请填写证书编号',
+            trigger: 'blur'
+          }],
+          "provTruck.type": [{
+            required: true,
+            message: '请选择人员类型',
+            trigger: 'blur,change'
+          }],
+          "provTruck.issueAuthority": [{
+            required: true,
+            message: '请选择人员类型',
+            trigger: 'blur,change'
+          }],
+          "provTruck.issueTime": [{
+            required: true,
+            message: '请选择人员类型',
+            trigger: 'blur,change'
+          }],
+          "provTruck.firstIssueTime": [{
+            required: true,
+            message: '请选择首次发证时间',
+            trigger: 'blur,change'
+          }],
+          "provTruck.expireTime": [{
+            required: true,
+            message: '请选择有效期',
+            trigger: 'blur,change'
+          }],
+          "provTruck.imgUrl": [{
+            required: true,
+            message: '请上传燃气从业资格证',
+            trigger: 'blur'
+          }],
         },
         employeeType: [{
-          value: '3',
+          value: 3,
           label: '门店人员'
         }, {
-          value: '4',
+          value: 4,
           label: '货车司机'
         }, {
-          value: '5',
-          label: '重装站人员'
+          value: 5,
+          label: '装站人员'
         }],
         imageUrl: '',
       }
     },
     methods: {
-      handleAvatarSuccess(res, file) {
-        this.imageUrl = URL.createObjectURL(file.raw);
+      // 上传文件
+      UploadImage(file) {
+        const loading = this.$loading({
+          lock: true,
+          text: '图片上传中...',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        this.file = file.file;
+        let formData = new FormData();
+        formData.append('file', this.file);
+        getFileToken(formData).then(res => {
+          if (res.code == 200) {
+            this.ruleForm.provTruck.imgUrl = res.data
+            this.$forceUpdate()
+            this.$refs['ruleForm'].validateField('provTruck.imgUrl')
+          }
+          loading.close();
+        }).catch(e => {})
       },
-      beforeAvatarUpload(file) {
-        const isJPG = file.type === 'image/jpeg';
-        const isLt2M = file.size / 1024 / 1024 < 2;
-        if (!isJPG) {
-          this.$message.error('上传头像图片只能是 JPG 格式!');
-        }
-        if (!isLt2M) {
-          this.$message.error('上传头像图片大小不能超过 2MB!');
+      //子组件校验,传递到父组件
+      validateForm() {
+        let flag = null
+        this.$refs['ruleForm'].validate(valid => {
+          if (valid) {
+            flag = true
+          } else {
+            flag = false
+          }
+        })
+        return flag
+      },
+      // 眼睛
+      handleIconClick() {
+        if (this.cipherState) {
+          this.cipherState = false
+        } else {
+          this.cipherState = true
         }
-        return isJPG && isLt2M;
+      },
+      // 清空表单
+      clearForm() {
+        this.$nextTick(() => {
+          if (this.$refs.ruleForm) {
+            this.$refs.ruleForm.fields.forEach(field => {
+              if (field.prop) {
+                field.resetField()
+              }
+            })
+          }
+        })
+        // this.$refs.ruleForm.resetFields();
+        this.$refs.ruleForm.clearValidate()
       }
     }
   }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
   .card_employee {
-    max-height: 550px;
-    overflow-y: scroll;
+    overflow-x: hidden;
+    max-height: 620px;
+    overflow-y: auto;
     padding-right: 5px;
   }
 
@@ -214,6 +407,23 @@
   }
 
   .card_fuel_gas .el-form-item__label {
-    width: 120px !important;
+    width: 130px !important;
+  }
+
+  .card_fuel_gas .el-form-item__content {
+    margin-left: 130px !important;
+  }
+
+  .card_margin_bottom ::v-deep .el-form-item {
+    margin-bottom: 0px !important;
+  }
+
+  .no-autofill-pwd ::v-deep .el-input__inner {
+    -webkit-text-security: disc !important;
+  }
+
+  .el-input__icon {
+    cursor: pointer;
+    font-size: 15px;
   }
 </style>

+ 236 - 31
src/components/forms.vue

@@ -1,63 +1,126 @@
 <template>
   <!-- 表单 -->
   <div class="card_employee">
-    <el-form ref="ruleForm" :model="ruleForm" :label-width="labelWidth">
-      <el-row>
+    <el-form ref="ruleForm" :label-position="labelPosition" :model="ruleForm" :label-width="labelWidth">
+      <el-row :gutter="10">
         <el-col :span="item.colWidth" v-for="(item, index) in formList" :key="index">
-          <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
-            v-if="item.type === 'input'">
+          <el-form-item class="card_independent" :label-width="item.labelWidth" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'input'">
             <el-input :placeholder="item.placeholder" :disabled="item.disabled" :id="item.field"
               v-model="ruleForm[`${item.field}`]"></el-input>
+            <div class="unit_card" v-if="item.unit">{{item.unit}}</div>
           </el-form-item>
-          <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
-            v-if="item.type === 'textarea'">
+          <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'textarea'">
             <el-input :maxlength="item.maxLenght" type="textarea" :rows="item.rowsHeight" :disabled="item.disabled"
               :id="item.field" :placeholder="item.placeholder" v-model="ruleForm[`${item.field}`]" />
           </el-form-item>
-          <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
-            v-if="item.type === 'select'">
+          <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'select'">
             <el-select :id="item.field" v-model="ruleForm[`${item.field}`]" :placeholder="item.placeholder"
-              :disabled="item.disabled" :multiple="item.multiple" style="width: 100%" @change="changeSelect">
+              :disabled="item.disabled" :multiple="item.multiple" style="width: 100%"
+              @change="(params) => changeSelect(params,item.field)">
+              <el-option v-for="(element, i) in item.options" :label="element.label" :value="`${element.value}`"
+                :key="i" />
+            </el-select>
+          </el-form-item>
+          <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'searchSelect'">
+            <el-select :id="item.field" v-model="ruleForm[`${item.field}`]" v-loadmore="handleScroll" filterable remote
+              :remote-method="remoteMethod" :placeholder="item.placeholder" :disabled="item.disabled"
+              style="width: 100%">
               <el-option v-for="(element, i) in item.options" :label="element.label" :value="`${element.value}`"
                 :key="i" />
             </el-select>
           </el-form-item>
           <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
             v-if="item.type === 'cascader'">
-            <el-cascader v-model="ruleForm[`${item.field}`]" :options="item.options" @change="handleChange">
+            <el-cascader v-model="ruleForm[`${item.field}`]" :disabled="item.disabled" :options="item.options">
             </el-cascader>
           </el-form-item>
           <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
             v-if="item.type === 'radio'">
-            <el-radio-group v-model="ruleForm[`${item.field}`]">
-              <el-radio v-for="(element, i) in item.options" :key="i" :label="element.label"></el-radio>
+            <el-radio-group v-model="ruleForm[`${item.field}`]" :disabled="item.disabled">
+              <el-radio v-for="(element, i) in item.options" :key="i"
+                :label="element.value">{{element.label}}</el-radio>
             </el-radio-group>
           </el-form-item>
           <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
             v-if="item.type === 'time'">
-            <el-date-picker type="date" v-model="ruleForm[`${item.field}`]" :placeholder="item.placeholder">
+            <el-date-picker type="date" value-format="yyyy-MM-dd" v-model="ruleForm[`${item.field}`]"
+              :placeholder="item.placeholder" :disabled="item.disabled">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
+            v-if="item.type === 'section'">
+            <el-date-picker align="center" v-model="ruleForm[`${item.field}`]" :disabled="item.disabled"
+              type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
+              end-placeholder="结束日期">
             </el-date-picker>
           </el-form-item>
           <div v-if="item.type === 'divider'">
             <div v-if="item.label">{{item.label}}</div>
             <el-divider></el-divider>
           </div>
+          <div style="height: 40px;display: flex;align-items: center;" v-if="item.type === 'search'">
+            <el-button size="small" type="primary" :loading="curLoading" :disabled="item.disabled"
+              @click="numberSearch">{{item.label}}</el-button>
+          </div>
           <div style="height: 10px;width: 100%;" v-if="item.type === 'dividingSlot'"></div>
           <el-form-item class="card_descriptions" :label="item.label" :prop="item.field"
             :rules="detail ? item.rules : {}" v-if="item.type === 'descriptions'">
-            <span class="descriptions_title">123
+            <span class="descriptions_title">{{ruleForm[`${item.field}`] || ''}}
               <span class="descriptions_badge center_in" v-if="item.field == 'name'">商户</span>
+              <span v-if="item.field == 'quantity'">瓶</span>
             </span>
           </el-form-item>
+          <el-form-item class="card_descriptions" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'prdfterence'">
+            <span class="descriptions_title"
+              :style="{color: filterColor(ruleForm,item.options,item.field)}">{{initDictvalueil(ruleForm[`${item.field}`],item.options)}}</span>
+          </el-form-item>
+          <!-- 单张图片上传 -->
+          <el-form-item :class="item.crosswise ? '' : 'card_fuel_gas'" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'singleUpload'">
+            <el-upload class="avatar-uploader" action="#" :show-file-list="false" :disabled="item.disabled"
+              :http-request="(params) => singleUpload(params,item.field)">
+              <img v-if="ruleForm[`${item.field}`]" :src="$baseUrl + ruleForm[`${item.field}`]" class="avatar">
+              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            </el-upload>
+          </el-form-item>
+          <!-- 可以上传多张 -->
           <div v-if="item.type === 'upload'">
             <div class="card_purple">
-              <el-form-item :class="item.crosswise ? '' : 'card_fuel_gas'" class="margin-l-50" :label="item.label"
-                :prop="item.field" :rules="detail ? item.rules : {}">
-                <el-upload class="avatar-uploader" action="https://jsonplaceholder.typicode.com/posts/"
-                  :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
-                  <img v-if="imageUrl" :src="imageUrl" class="avatar">
-                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              <el-form-item ref="headimgUpload" :class="item.crosswise ? '' : 'card_fuel_gas'" class="margin-l-50"
+                :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}">
+                <el-upload action="#" list-type="picture-card" :file-list="ruleForm.fileList" :disabled="item.disabled"
+                  :http-request="UploadImage" v-if="operationType != 'logs'">
+                  <i slot="default" class="el-icon-plus"></i>
+                  <div slot="file" slot-scope="{file}">
+                    <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+                    <span class="el-upload-list__item-actions">
+                      <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+                        <i class="el-icon-zoom-in"></i>
+                      </span>
+                      <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+                        <i class="el-icon-delete"></i>
+                      </span>
+                    </span>
+                  </div>
                 </el-upload>
+                <div class="card_image" v-else>
+                  <div v-for="(item,index) in ruleForm.fileList" :key="index">
+                    <img class="avatar_image" :src="item.url" alt="" />
+                    <!-- <el-image class="avatar_image" :src="item.url" :preview-src-list="[item.url]">
+                      <div slot="placeholder" class="image-slot">
+                        加载中<span class="dot">...</span>
+                      </div>
+                    </el-image> -->
+                  </div>
+                </div>
+                <el-dialog :visible.sync="dialogVisible" append-to-body>
+                  <img width="100%" :src="dialogImageUrl" alt="">
+                </el-dialog>
               </el-form-item>
             </div>
           </div>
@@ -68,6 +131,9 @@
 </template>
 
 <script>
+  import {
+    getFileToken,
+  } from '@/api/user'
   export default {
     name: "forms",
     props: {
@@ -80,7 +146,21 @@
       labelWidth: {
         type: String,
         default: () => '120px',
-      }
+      },
+      // 对齐方式
+      labelPosition: {
+        type: String,
+        default: () => 'right',
+      },
+      // 绑定值
+      ruleForm: {
+        type: Object,
+        default: () => {},
+      },
+      operationType: {
+        type: String,
+        default: () => '',
+      },
     },
     watch: {
       formNewList: {
@@ -93,23 +173,125 @@
     data() {
       return {
         detail: true,
-        ruleForm: {},
         formList: [],
         imageUrl: '',
+        file: null,
+        dialogImageUrl: '',
+        dialogVisible: false,
+        disabled: false,
+        fileList: [],
+        curLoading: false,
       }
     },
     methods: {
       //下拉框下拉事件
-      changeSelect(row) {
-        // console.log(row);
-        this.$emit("changeSelect", row);
+      changeSelect(row, field) {
+        this.$forceUpdate()
+        this.$emit("changeSelect", row, field);
+      },
+      // 重置校验
+      resetCheck() {
+        this.$refs.ruleForm.resetFields();
+      },
+      // 单个图片上传
+      singleUpload(file, value) {
+        const loading = this.$loading({
+          lock: true,
+          text: 'Loading',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        this.file = file.file;
+        let formData = new FormData();
+        formData.append('file', this.file);
+        getFileToken(formData).then(res => {
+          if (res.code == 200) {
+            this.ruleForm[`${value}`] = res.data
+            this.$forceUpdate()
+          }
+          loading.close();
+        }).catch(e => {
+          loading.close();
+          this.$message.error('上传失败');
+        })
+      },
+      // 上传文件
+      UploadImage(file) {
+        const loading = this.$loading({
+          lock: true,
+          text: 'Loading',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        this.file = file.file;
+        let formData = new FormData();
+        formData.append('file', this.file);
+        getFileToken(formData).then(res => {
+          if (res.code == 200) {
+            let arr1 = {
+              uid: this.file.uid,
+              url: '',
+            }
+            arr1.url = this.$baseUrl + res.data
+            this.ruleForm.fileList.push(arr1)
+          }
+          loading.close();
+        }).catch(e => {
+          loading.close();
+          this.$message.error('上传失败');
+        })
+      },
+      // 手机号搜索
+      numberSearch() {
+        const flag = false
+        this.$refs['ruleForm'].validateField('phone', valid => {
+          if (!valid) {
+            this.curLoading = true
+            this.$emit('numberSearch', this.ruleForm.phone)
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+      },
+      // tag颜色获取
+      filterColor(value, list, type) {
+        let color = ''
+        list.forEach(item => {
+          if (value[type] === item.value) {
+            color = item.bgcolor
+          }
+        })
+        return color
+      },
+      // 普通类型文字匹配
+      initDictvalueil(value, list) {
+        let name = ''
+        list.forEach(item => {
+          if (value == item.value) {
+            name = item.label
+          }
+        })
+        return name
+      },
+      handleScroll() {
+        // console.log('触底了')
+        this.$emit('handleScroll')
+      },
+      remoteMethod(val) {
+        // console.log('远程搜索', val)
+        this.$emit('remoteMethod', val)
       },
-      // 城市地区选择
-      handleChange(value) {
-        console.log(value);
+      // 删除
+      handleRemove(file) {
+        const filteredArr = this.ruleForm.fileList.filter(obj => obj.uid !== file.uid);
+        this.ruleForm.fileList = filteredArr
+        this.$forceUpdate()
       },
-      handleAvatarSuccess(res, file) {
-        this.imageUrl = URL.createObjectURL(file.raw);
+      // 查看
+      handlePictureCardPreview(file) {
+        this.dialogImageUrl = file.url;
+        this.dialogVisible = true;
       },
       beforeAvatarUpload(file) {
         const isJPG = file.type === 'image/jpeg';
@@ -140,7 +322,7 @@
 
 <style lang="scss" scoped>
   .card_employee {
-    max-height: 550px;
+    max-height: 600px;
     overflow-y: auto;
     padding-right: 5px;
     overflow-x: hidden;
@@ -194,4 +376,27 @@
     padding: 2px;
     border: 1px solid #169BD5;
   }
+
+  .unit_card {
+    width: 80px;
+    padding-left: 10px;
+    flex: none;
+  }
+
+  .card_independent ::v-deep .el-form-item__content {
+    display: flex !important;
+  }
+
+  .card_image {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+  }
+
+  .avatar_image {
+    width: 140px;
+    height: 140px;
+    border-radius: 6px;
+    margin: 0 8px 8px 0;
+  }
 </style>

+ 85 - 41
src/components/formsSafety.vue

@@ -2,46 +2,57 @@
   <!-- 入户安全 表单 -->
   <div class="card_safety">
     <div class="safety_left" v-if="operationType == 'edit'">
-      <el-form ref="form" :model="form" label-width="70px" label-position="left">
+      <el-form ref="ruleForm" :model="ruleForm" label-width="70px" label-position="left">
         <el-form-item class="card_fuel_gas" label="整改后图片">
-          <el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card"
-            :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
-            <i class="el-icon-plus"></i>
+          <el-upload action="#" list-type="picture-card" :file-list="ruleForm.fileList" :http-request="UploadImage">
+            <i slot="default" class="el-icon-plus"></i>
+            <div slot="file" slot-scope="{file}">
+              <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+              <span class="el-upload-list__item-actions">
+                <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+                  <i class="el-icon-zoom-in"></i>
+                </span>
+                <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+                  <i class="el-icon-delete"></i>
+                </span>
+              </span>
+            </div>
           </el-upload>
-          <el-dialog :visible.sync="dialogVisible">
+          <el-dialog :visible.sync="dialogVisible" append-to-body>
             <img width="100%" :src="dialogImageUrl" alt="">
           </el-dialog>
         </el-form-item>
         <el-form-item label="状态">
-          <el-radio-group v-model="form.resource">
-            <el-radio :label="item.label" v-for="(item,index) in rectificationState" :key="index">{{item.value}}</el-radio>
+          <el-radio-group v-model="ruleForm.state">
+            <el-radio :label="item.label" v-for="(item,index) in rectificationState"
+              :key="index">{{item.value}}</el-radio>
           </el-radio-group>
         </el-form-item>
         <el-form-item label="备注">
-          <el-input type="textarea" v-model="form.desc"></el-input>
+          <el-input type="textarea" v-model="ruleForm.remark"></el-input>
         </el-form-item>
       </el-form>
     </div>
     <div v-else class="safety_left card_exceed">
       <div v-for="(item,index) in formRuleList" :key="index">
         <div class="safety_input_item" v-if="item.type == 'input'">
-          <div class="title_item">{{item.label}}</div>
-          <div class="value_item">{{item.value}}</div>
+          <div class="title_item" :style="{width:item.field == 'remark' ? '50px' : ''}">{{item.label}}</div>
+          <div class="value_item">{{ruleForm[`${item.field}`]}}</div>
         </div>
         <div class="safety_item" v-else-if="item.type == 'image'">
           <div class="title_item_img">{{item.label}}</div>
           <div class="card_image_safety" v-if="item.options.length > 0">
             <div class="image_item" v-for="(kl,i) in item.options" :key="i">
-              <el-image style="width: 100px; height: 100px" :src="kl" fit="cover"></el-image>
+              <el-image style="width: 100px; height: 100px" :src="$baseUrl + kl" :preview-src-list="[$baseUrl + kl]"
+                fit="cover"></el-image>
             </div>
           </div>
           <div v-else class="empty">无</div>
         </div>
         <div class="safety_input_item" v-else-if="item.type == 'radio'">
-          <div class="title_item">状态</div>
-          <el-radio-group v-model="item.value">
-            <el-radio disabled :label="ty.label" v-for="(ty,index1) in rectificationState"
-              :key="index1">{{ty.value}}</el-radio>
+          <div style="width:50px;font-size: 16px;">状态</div>
+          <el-radio-group v-model="ruleForm[`${item.field}`]">
+            <el-radio :label="ty.label" v-for="(ty,index1) in rectificationState" :key="index1">{{ty.value}}</el-radio>
           </el-radio-group>
         </div>
       </div>
@@ -66,8 +77,8 @@
 
 <script>
   import {
-    check
-  } from '@/assets/js/announcements'
+    getFileToken,
+  } from '@/api/user'
   export default {
     name: 'formsSafety',
     props: {
@@ -78,67 +89,99 @@
       formRuleList: {
         type: Array,
         default: () => [],
+      },
+      // 安全检查项
+      checkEntry: {
+        type: Array,
+        default: () => [],
+      },
+      ruleForm: {
+        type: Object,
+        default: () => {},
       }
     },
     data() {
       return {
+        file: null,
         dialogImageUrl: '',
         dialogVisible: false,
-        form: {
-          resource: '',
-          desc: ''
-        },
+        disabled: false,
         rectificationState: [{
-          label: '0',
+          label: 0,
           value: '待整改',
         }, {
-          label: '1',
+          label: 1,
           value: '整改中',
         }, {
-          label: '2',
+          label: 2,
           value: '已整改',
+        }, {
+          label: -1,
+          value: '合格',
         }],
-        checkEntry: [],
       }
     },
     mounted() {
-      this.checkEntry = check()
+
     },
     methods: {
-      handleRemove(file, fileList) {
-        console.log(file, fileList);
+      // 上传文件
+      UploadImage(file) {
+        const loading = this.$loading({
+          lock: true,
+          text: 'Loading',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        this.file = file.file;
+        let formData = new FormData();
+        formData.append('file', this.file);
+        getFileToken(formData).then(res => {
+          if (res.code == 200) {
+            let arr1 = {
+              uid: this.file.uid,
+              url: '',
+            }
+            arr1.url = this.$baseUrl + res.data
+            this.ruleForm.fileList.push(arr1)
+          }
+          loading.close();
+        }).catch(e => {
+          loading.close();
+          this.$message.error('上传失败');
+        })
       },
+      // 删除
+      handleRemove(file) {
+        const filteredArr = this.ruleForm.fileList.filter(obj => obj.uid !== file.uid);
+        this.ruleForm.fileList = filteredArr
+        this.$forceUpdate()
+      },
+      // 查看
       handlePictureCardPreview(file) {
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
-      }
+      },
     }
   }
 </script>
 
 <style lang="scss" scoped>
-  ::v-deep .el-upload--picture-card {
-    width: 120px;
-    height: 120px;
-    line-height: 120px;
-    background-color: unset !important;
-  }
-
   .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
     background-color: #409EFF !important;
   }
 
   .card_safety {
     display: flex;
-    margin-left: 20px;
+    margin-left: 10px;
   }
 
   .safety_left {
-    width: 40%;
+    width: 44%;
   }
 
   .safety_right {
-    width: 60%;
+    width: 56%;
     padding-left: 20px;
   }
 
@@ -184,7 +227,7 @@
   }
 
   .card_exceed {
-    max-height: 580px;
+    max-height: 600px;
     overflow-y: auto;
   }
 
@@ -209,7 +252,8 @@
   }
 
   .value_item {
-    color: #7f7f7f;
+    color: #fff;
+    font-size: 14px;
   }
 
   .empty {

+ 238 - 0
src/components/growthStatistics.vue

@@ -0,0 +1,238 @@
+<template>
+  <!-- 近12月钢瓶数增长统计 -->
+  <div class="border" :style="{height: boxHeight}">
+    <div class="card_box">
+      <div class="title_trapezoid center_in">
+        <span class="center_in">{{title}}</span>
+      </div>
+    </div>
+    <div class="card_collect">
+      <div id="statistics"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'wavyBlock',
+    props: {
+      title: {
+        type: String,
+        default: () => '文字',
+      },
+      boxHeight: {
+        type: String,
+        default: () => '95%',
+      },
+    },
+    data() {
+      return {}
+    },
+    mounted() {
+      this.getEnterpriseCylinder()
+    },
+    methods: {
+      getEnterpriseCylinder() {
+        var chartDom = document.getElementById('statistics');
+        var myChart = this.$echarts.init(chartDom);
+        var option;
+        // 近12个月
+        var nameArr = [];
+        var data = new Date();
+        var year = data.getFullYear();
+        data.setMonth(data.getMonth() + 1, 1) //获取到当前月份,设置月份
+        for (var i = 0; i < 12; i++) {
+          data.setMonth(data.getMonth() - 1); //每次循环一次 月份值减1
+          var m = data.getMonth() + 1;
+          m = m < 10 ? "0" + m : m;
+          nameArr.push(data.getFullYear() + "-" + (m));
+        }
+        const valueArr = [150, 60, 80, 180, 120, 160, 80, 40, 20, 30, 22, 13]
+        option = {
+          grid: {
+            top: '10%',
+            left: '15%',
+            right: '5%',
+            bottom: '12%'
+          },
+          tooltip: {
+            trigger: 'axis',
+            backgroundColor: '#3A4667',
+            borderColor: '#3A4667',
+            textStyle: {
+              color: '#fff'
+            },
+            formatter: '{b} : {c}瓶',
+            axisPointer: {
+              type: 'cross',
+              crossStyle: {
+                color: '#999'
+              }
+            }
+          },
+          legend: {
+            icon: 'rect',
+            top: 10,
+            right: 5,
+            itemWidth: 10,
+            itemHeight: 10,
+            textStyle: {
+              fontSize: 12, // 字体大小
+              color: '#B3CFFF' // 字体颜色
+            }
+          },
+          xAxis: {
+            type: 'category',
+            axisPointer: {
+              type: 'shadow'
+            },
+            axisLine: {
+              lineStyle: {
+                color: 'rgba(112, 138, 198, 1)',
+              },
+            },
+            axisLabel: {
+              textStyle: {
+                color: '#B3CFFF', // x轴文本颜色
+                fontSize: 12
+              },
+              // rotate:30,
+            },
+            axisTick: {
+              show: false
+            },
+            data: nameArr
+          },
+          yAxis: {
+            type: 'value',
+            splitLine: {
+              show: true,
+              lineStyle: {
+                color: '#162647',
+                type: 'solid'
+              }
+            },
+            axisLabel: {
+              formatter: '{value}瓶',
+              textStyle: {
+                color: '#B3CFFF', // x轴文本颜色
+                fontSize: 12
+              },
+            },
+            name: '',
+            nameTextStyle: {
+              color: '#B3CFFF',
+              fontSize: 12,
+            }
+          },
+          series: [{
+              type: 'bar',
+              name: '',
+              barWidth: 16,
+              emphasis: {
+                itemStyle: {
+                  color: '#7fb7e9'
+                }
+              },
+              itemStyle: {
+                normal: {
+                  color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                      offset: 1,
+                      color: 'rgba(147, 157, 223, 1)',
+                      opacity: 0.6
+                    },
+                    {
+                      offset: 0,
+                      color: 'rgba(147, 157, 223, 0)',
+                      opacity: 1
+                    }
+                  ]),
+                }
+              },
+              data: valueArr
+            },
+            {
+              name: '',
+              type: 'pictorialBar',
+              itemStyle: {
+                normal: {
+                  color: 'rgba(147, 157, 223, 1)'
+                }
+              },
+              symbolRotate: 0,
+              symbolSize: ['16', '3'],
+              symbolPosition: 'end',
+              data: valueArr,
+              z: 3
+            },
+          ]
+        }
+        myChart.setOption(option);
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .border {
+    border: 1px solid #3077ca;
+    margin: 0 10px 0 auto;
+    border-radius: 4px;
+    box-shadow: inset 0 0 40px rgba(48, 119, 202, 0.3);
+  }
+
+
+  .card_box {
+    position: absolute;
+    top: 0;
+    left: calc(50% - 100px);
+    right: 0;
+  }
+
+  .title_trapezoid {
+    position: relative;
+    color: #fff !important;
+    width: 200px;
+    height: 30px;
+    text-align: center;
+    z-index: 2;
+  }
+
+  .title_trapezoid span {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 200px;
+    top: -1px;
+    z-index: 2;
+    font-size: 15px;
+    line-height: 25px;
+  }
+
+  .title_trapezoid::before {
+    border-bottom: 2px solid #2CD5FF;
+    content: '';
+    z-index: 1;
+    width: 100%;
+    height: 30px;
+    background-image: linear-gradient(to top, #3077ca99, #3077ca7f, transparent);
+    display: inline-block;
+    position: absolute;
+    left: 0;
+    top: -1px;
+    transform: perspective(100px) rotateX(150deg);
+  }
+
+  .card_collect {
+    display: flex;
+    flex-wrap: wrap;
+    flex-direction: row;
+    margin-top: 30px;
+    height: calc(100% - 30px);
+  }
+
+  #statistics {
+    width: 100%;
+    height: 100%;
+  }
+</style>

+ 2 - 2
src/components/pagination.vue

@@ -37,11 +37,11 @@
     },
     methods: {
       handleSizeChange(val) {
-        console.log(`每页 ${val} 条`);
+        // console.log(`每页 ${val} 条`);
         this.$emit('changeSize', val)
       },
       handleCurrentChange(val) {
-        console.log(`当前页: ${val}`);
+        // console.log(`当前页: ${val}`);
         this.$emit('changeCurrent', val)
       }
     }

Fișier diff suprimat deoarece este prea mare
+ 39 - 0
src/components/proportion.vue


+ 213 - 0
src/components/securityCheck.vue

@@ -0,0 +1,213 @@
+<template>
+  <!-- 气瓶安检汇总 -->
+  <div class="border" :style="{height: boxHeight}">
+    <div class="card_box">
+      <div class="title_trapezoid center_in">
+        <span class="center_in">{{title}}</span>
+      </div>
+    </div>
+    <div class="card_collect">
+      <div id="security"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'wavyBlock',
+    props: {
+      title: {
+        type: String,
+        default: () => '文字',
+      },
+      boxHeight: {
+        type: String,
+        default: () => '95%',
+      },
+    },
+    data() {
+      return {}
+    },
+    mounted() {
+      this.getEnterpriseCylinder()
+    },
+    methods: {
+      getEnterpriseCylinder() {
+        var chartDom = document.getElementById('security');
+        var myChart = this.$echarts.init(chartDom);
+        var option;
+        let bgColor = '#000';
+        let title = '总瓶数';
+        let color = ['#33f198', '#fbd242', '#c5233b'];
+        let echartData = [{
+            name: "绿码",
+            value: "3720"
+          },
+          {
+            name: "黄码",
+            value: "2920"
+          },
+          {
+            name: "红码",
+            value: "2200"
+          }
+        ];
+        let formatNumber = function(num) {
+          let reg = /(?=(\B)(\d{3})+$)/g;
+          return num.toString().replace(reg, ',');
+        }
+        let total = echartData.reduce((a, b) => {
+          return a + b.value * 1
+        }, 0);
+
+        option = {
+          color: color,
+          tooltip: {
+            trigger: 'item'
+          },
+          title: [{
+            text: '{name|' + title + '}\n{val|' + formatNumber(total) + '瓶}',
+            top: 'center',
+            left: 'center',
+            textStyle: {
+              rich: {
+                name: {
+                  fontSize: 14,
+                  fontWeight: 'normal',
+                  color: '#fff',
+                  padding: [10, 0]
+                },
+                val: {
+                  fontSize: 20,
+                  fontWeight: 'bolder',
+                  color: '#fff',
+                }
+              }
+            }
+          }, {
+            text: '单位:个',
+            top: 20,
+            left: 20,
+            textStyle: {
+              fontSize: 14,
+              color: '#666666',
+              fontWeight: 400
+            },
+            show: false
+          }],
+          series: [{
+            type: 'pie',
+            roseType: 'radius',
+            radius: ['48%', '75%'],
+            center: ['50%', '50%'],
+            data: echartData,
+            hoverAnimation: false,
+            itemStyle: {
+              normal: {
+                borderWidth: 2
+              }
+            },
+            labelLine: {
+              normal: {
+                length: 5,
+                length2: 20,
+              }
+            },
+            label: {
+              normal: {
+                formatter: params => {
+                  return (
+                    '{icon|●}{name|' + params.name + '}\n{value|' +
+                    formatNumber(params.value) + '}'
+                  );
+                },
+                rich: {
+                  icon: {
+                    fontSize: 16,
+                    color: 'inherit'
+                  },
+                  name: {
+                    fontSize: 18,
+                    padding: [0, 0, 0, 10],
+                    color: '#fff'
+                  },
+                  value: {
+                    fontSize: 14,
+                    fontWeight: 'bolder',
+                    padding: [10, 0, 0, 20],
+                    color: 'inherit'
+                  }
+                }
+              }
+            },
+          }]
+        };
+        myChart.setOption(option);
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .border {
+    border: 1px solid #3077ca;
+    margin: 0 10px 0 auto;
+    border-radius: 4px;
+    box-shadow: inset 0 0 40px rgba(48, 119, 202, 0.3);
+  }
+
+
+  .card_box {
+    position: absolute;
+    top: 0;
+    left: calc(50% - 100px);
+    right: 0;
+  }
+
+  .title_trapezoid {
+    position: relative;
+    color: #fff !important;
+    width: 200px;
+    height: 30px;
+    text-align: center;
+    z-index: 2;
+  }
+
+  .title_trapezoid span {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 200px;
+    top: -1px;
+    z-index: 2;
+    font-size: 15px;
+    line-height: 25px;
+  }
+
+  .title_trapezoid::before {
+    border-bottom: 2px solid #2CD5FF;
+    content: '';
+    z-index: 1;
+    width: 100%;
+    height: 30px;
+    background-image: linear-gradient(to top, #3077ca99, #3077ca7f, transparent);
+    display: inline-block;
+    position: absolute;
+    left: 0;
+    top: -1px;
+    transform: perspective(100px) rotateX(150deg);
+  }
+
+  .card_collect {
+    display: flex;
+    flex-wrap: wrap;
+    flex-direction: row;
+    margin-top: 30px;
+    height: calc(100% - 30px);
+  }
+
+  #security {
+    width: 100%;
+    height: 100%;
+  }
+</style>

+ 112 - 11
src/components/tables.vue

@@ -9,20 +9,41 @@
             <div style="display: flex;align-items: center;justify-content: center;">
               <div v-for="disk in item.labelButton" :key="disk.key" class="btn_table">
                 <el-button :class="disk.modality" :type="disk.style" :icon="disk.icon" size="mini"
-                  @click="buttonData(scope.row,disk.type)">
+                  :disabled="jurisdiction(scope.row,disk.type)" @click="buttonData(scope.row,disk.type)">
                   {{ disk.label }}
                 </el-button>
               </div>
             </div>
           </template>
         </el-table-column>
+        <el-table-column fixed="right" :label="item.label" :align="item.align" :width="item.colWidth"
+          v-else-if="item.field == 'nickName'">
+          <template slot-scope="scope">
+            <div class="operator_title">{{scope.row.user.nickName}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="['provUser.isorders','provUser.userType','customer.type','tbFillData.productMediaId'].includes(item.field)">
+          <template slot-scope="scope">
+            <div>{{initDictvalue(scope.row,item.options,item.field)}}</div>
+          </template>
+        </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
-          v-else-if="item.field == 'T_mode'">
+          v-else-if="['isShow', 'type', 'state', 'storeId', 'personCode', 'optType', 'corrosion', 'crackle', 'deform', 'damage', 'safeAnnex', 'gasPressure', 'bodyDeform', 'fillingLeak', 'bodyTemperature', 'filledLeak', 'warnSign', 'fillLabel', 'seal','fill_media'].includes(item.field)">
           <template slot-scope="scope">
-            <div class="gateway_title">{{initDictvalue(scope.row.T_mode,detailGateway)}}</div>
+            <div :style="{color: filterColor(scope.row,item.options,item.field)}">
+              {{initDictvalueil(scope.row,item.options,item.field)}}
+            </div>
           </template>
         </el-table-column>
-        <el-table-column type="index" :label="item.label" :align="item.align" v-else-if="item.field == 'index'">
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="item.field == 'city' || item.field == 'area'">
+          <template slot-scope="scope">
+            <div>{{cityScreening(scope.row,item.options,item.field)}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column type="index" :fixed="item.boxhead ? true : false" width="80px" :label="item.label" :align="item.align"
+          v-else-if="item.field == 'index'">
         </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align" v-else>
         </el-table-column>
@@ -32,6 +53,10 @@
 </template>
 
 <script>
+  import {
+    orderStatus,
+    rectificationState
+  } from '@/assets/js/blockSort'
   export default {
     props: {
       // 表格边框
@@ -67,20 +92,92 @@
     },
     data() {
       return {
-
+        orderStatusList: orderStatus(),
       }
     },
     methods: {
       // 文字匹配
-      initDictvalue(value, list) {
+      initDictvalue(value, list, type) {
+        let propertyName = type.split(".")
         let name = ''
-        list.forEach(item => {
-          if (value === item.Id) {
-            name = item.T_name
-          }
-        })
+        if (list) {
+          list.forEach(item => {
+            if (value[propertyName[0]][propertyName[1]] == item.value) {
+              name = item.label
+            }
+          })
+        }
         return name
       },
+      // 普通类型文字匹配
+      initDictvalueil(value, list, type) {
+        let name = ''
+        if (list) {
+          list.forEach(item => {
+            if (value[type] === item.value) {
+              name = item.label
+            }
+          })
+        }
+        return name
+      },
+      // 城市筛选
+      cityScreening(value, list, type) {
+        function getChildById(parentArray, id) {
+          for (let i = 0; i < parentArray.length; i++) {
+            if (parentArray[i].value === id) { // 如果当前元素的ID与目标ID相等,则返回该元素
+              return parentArray[i];
+            } else if (parentArray[i].children && Array.isArray(parentArray[i].children)) { // 判断当前元素是否有子节点且类型为数组
+              const result = getChildById(parentArray[i].children, id); // 对子节点进行递归调用
+              if (result !== null) { // 若子节点存在结果,则返回该结果
+                return result;
+              }
+            }
+          }
+          return null; // 没有找到符合条件的元素时返回null
+        }
+        var name = getChildById(list, value[type])
+        if (name != null) {
+          return name.label
+        }
+      },
+      // tag颜色获取
+      filterColor(value, list, type) {
+        let color = ''
+        if (list) {
+          list.forEach(item => {
+            if (value[type] === item.value) {
+              color = item.bgcolor
+            }
+          })
+        }
+        return color
+      },
+      // 权限按钮
+      jurisdiction(row, type) {
+        if (row.roleKey) {
+          if (row.roleKey == 'admin') {
+            return true
+          } else {
+            return false
+          }
+        }
+        if (row.source) {
+          if (type == 'edit' && row.state != 1) {
+            return true
+          } else if (type == 'del' && row.state != 1) {
+            return true
+          } else {
+            return false
+          }
+        } else if (row.inspectExpandList) {
+          if (type == 'edit' && row.state < 0) {
+            return true
+          } else {
+            return false
+          }
+        }
+      },
       // 操作按钮
       buttonData(row, type) {
         this.$emit("buttonData", row, type);
@@ -159,4 +256,8 @@
   .gateway_title1 {
     color: #34d9f4;
   }
+
+  .operator_title {
+    color: #fff;
+  }
 </style>

+ 59 - 10
src/components/treeTable.vue

@@ -1,26 +1,33 @@
 <template>
   <!-- 树形表格 -->
   <div class="tree_card">
-    <el-table class="tree_table" :data="tableData" row-key="newId" style="width: 100%;"
+    <el-table class="tree_table" :data="tableData" row-key="id" style="width: 100%;"
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
       <template v-for="(item,index) in treeData">
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
-          v-if="item.field == 'T_type'">
+          v-if="item.field == 'provStore.type'">
           <template slot-scope="scope">
-            <div>{{initDictvalue(scope.row,attributeTypeList)}}</div>
+            <div>{{initDictvalue(scope.row,item.options)}}</div>
           </template>
         </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
-          v-else-if="item.field == 'T_read'">
+          v-else-if="item.field == 'menuType' || item.field == 'visible'">
           <template slot-scope="scope">
-            <div :class="scope.row.T_read ? 'title_blue' : 'title_blue1'">{{scope.row.T_read ? '只读' : '读写'}}</div>
+            <el-tag size="small"
+              :type="filterColor(scope.row,item.options,item.field)">{{initDictvalueil(scope.row,item.options,item.field)}}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="item.field == 'provStore.district' || item.field == 'provTruckEnterprise.city' || item.field == 'provTruckEnterprise.area'">
+          <template slot-scope="scope">
+            <div>{{cityScreening(scope.row,item.options,item.field)}}</div>
           </template>
         </el-table-column>
         <el-table-column :fixed="suspension ? 'right' : false" :label="item.label" align="center" :width="item.colWidth"
           v-else-if="item.field == 'action'">
           <template slot-scope="scope">
             <div class="btn_tree">
-              <div v-for="disk in item.labelButton" :key="disk.key" class="btn_table">
+              <div v-for="disk in item.labelButton" :key="disk.type" class="btn_table">
                 <el-button :class="disk.modality" :type="disk.style" :icon="disk.icon" size="mini"
                   @click="buttonData(scope.row,disk.type)">
                   {{ disk.label }}
@@ -30,7 +37,7 @@
           </template>
         </el-table-column>
         <el-table-column show-overflow-tooltip :prop="item.field" :label="item.label" :width="item.colWidth"
-          :align="item.align" v-else>
+          :fixed="item.fixed" :align="item.align" v-else>
         </el-table-column>
       </template>
     </el-table>
@@ -103,7 +110,7 @@
           if (newVal) {
             this.tableData = this.addIdToNodes(newVal)
           }
-          console.log(this.tableData, 23)
+          // console.log(this.tableData, 23)
         },
       },
     },
@@ -112,12 +119,53 @@
       initDictvalue(value, list) {
         let name = ''
         list.forEach(item => {
-          if (value.T_type === item.id) {
-            name = item.title
+          if (value.provStore.type === item.value) {
+            name = item.label
           }
         })
         return name
       },
+      // 普通类型文字匹配
+      initDictvalueil(value, list, type) {
+        let name = ''
+        list.forEach(item => {
+          if (value[type] === item.value) {
+            name = item.label
+          }
+        })
+        return name
+      },
+      // tag颜色获取
+      filterColor(value, list, type) {
+        let color = ''
+        list.forEach(item => {
+          if (value[type] === item.value) {
+            color = item.bgcolor
+          }
+        })
+        return color
+      },
+      // 城市筛选
+      cityScreening(value, list, type) {
+        function getChildById(parentArray, id) {
+          for (let i = 0; i < parentArray.length; i++) {
+            if (parentArray[i].value === id) { // 如果当前元素的ID与目标ID相等,则返回该元素
+              return parentArray[i];
+            } else if (parentArray[i].children && Array.isArray(parentArray[i].children)) { // 判断当前元素是否有子节点且类型为数组
+              const result = getChildById(parentArray[i].children, id); // 对子节点进行递归调用
+              if (result !== null) { // 若子节点存在结果,则返回该结果
+                return result;
+              }
+            }
+          }
+          return null; // 没有找到符合条件的元素时返回null
+        }
+        var propertyName = type.split(".")
+        var name = getChildById(list, value[propertyName[0]][propertyName[1]])
+        if (name != null) {
+          return name.label
+        }
+      },
       // 当前值匹配 根据key查询对象嵌套对象符合的一项
       initDictpresent(obj, key) {
         var that = this
@@ -178,6 +226,7 @@
   ::v-deep .el-table--border .el-table__cell {
     border: 1px solid #0171b9;
   }
+
   .tree_table {
     width: 100%;
     // margin-bottom: 20px;

+ 133 - 0
src/components/wavyBlock.vue

@@ -0,0 +1,133 @@
+<template>
+  <div class="border" :style="{height: boxHeight}">
+    <div class="card_box">
+      <div class="title_trapezoid center_in">
+        <span class="center_in">{{title}}</span>
+      </div>
+    </div>
+    <div class="card_collect">
+      <div class="card_amount" v-for="(item,index) in list" :key="index">
+        <div class="title_card">{{item.num}}</div>
+        <div style="display: flex;align-items: center;">
+          <img class="item_image" :src="require('@/assets/image/' + item.icon)" alt="" />
+          <div class="title_am">{{item.title}}</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'wavyBlock',
+    props: {
+      title: {
+        type: String,
+        default: () => '文字',
+      },
+      boxWidth: {
+        type: String,
+        default: () => '200px',
+      },
+      boxHeight: {
+        type: String,
+        default: () => '95%',
+      },
+      list: {
+        type: Array,
+        default: () => [],
+      },
+    },
+    data() {
+      return {
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  .border {
+    position: relative;
+    width: calc(100% - 10px);
+    border: 1px solid #3077ca;
+    margin: 0 10px 0 auto;
+    border-radius: 4px;
+    box-shadow: inset 0 0 40px rgba(48, 119, 202, 0.3);
+  }
+
+  .card_box {
+    position: absolute;
+    top: 0;
+    left: calc(50% - 80px);
+    right: 0;
+  }
+
+  .title_trapezoid {
+    position: relative;
+    color: #fff !important;
+    width: 160px;
+    height: 30px;
+    text-align: center;
+    z-index: 2;
+  }
+
+  .title_trapezoid span {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 160px;
+    top: -1px;
+    z-index: 2;
+    font-size: 15px;
+    line-height: 25px;
+  }
+
+  .title_trapezoid::before {
+    border-bottom: 2px solid #2CD5FF;
+    content: '';
+    z-index: 1;
+    width: 100%;
+    height: 30px;
+    background-image: linear-gradient(to top, #3077ca99, #3077ca7f, transparent);
+    display: inline-block;
+    position: absolute;
+    left: 0;
+    top: -1px;
+    transform: perspective(100px) rotateX(150deg);
+  }
+
+  .card_collect {
+    display: flex;
+    flex-wrap: wrap;
+    flex-direction: row;
+    margin-top: 30px;
+    height: calc(100% - 30px);
+  }
+
+  .card_amount {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    width: 50%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+  }
+
+  .item_image {
+    height: 24px;
+  }
+
+  .title_card {
+    color: #fff;
+    text-align: center;
+    font-size: 30px;
+    color: #2CD5FF;
+    font: bold 35px mFont;
+  }
+
+  .title_am {
+    margin-left: 10px;
+    color: #fff;
+  }
+</style>

+ 22 - 15
src/main.js

@@ -6,27 +6,34 @@ import Cookies from "js-cookie"
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 
-import './mock'
-// import './permission' // permission control
+import * as echarts from 'echarts'
+Vue.prototype.$echarts = echarts
+
+// 下拉框滚动加载
+import loadMore from './utils/select.js'
+Vue.use(loadMore)
+
+// import './mock'
+import './permission' // permission control
 // 导入全局样式表
 import './assets/css/global.css'
 Vue.config.productionTip = false
 
 Vue.use(ElementUI);
+// 图片拼接地址
+Vue.prototype.$baseUrl = 'https://bzdcdn.baozhida.cn/';
+// 引入vue-amap
+import AMap from 'vue-amap';
+Vue.use(AMap);
 
-// 使用router.beforeEach注册一个全局前置守卫,对路由进行权限跳转
-router.beforeEach((to, from, next) => {
-  // 未匹配到路由时 跳转到error页面
-  if (0 === to.matched.length) {
-    next('/error');
-    return false;
-  }
-  const T_uuid = Cookies.get('T_uuid')
-  if (!T_uuid && to.path !== '/login') {
-    next('/login');
-  } else {
-    next();
-  }
+// 初始化vue-amap
+AMap.initAMapApiLoader({
+  // 高德的key
+  key: 'fcddcc366fd5bd355e35f01b7cce82ef',
+  // 插件集合
+  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType',
+    'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.DistrictSearch'
+  ]
 });
 
 new Vue({

+ 116 - 6
src/mock/index.js

@@ -10,7 +10,7 @@ Mock.mock('/api/info', 'get', {
       id: 1,
       meta: {
         title: '系统管理',
-        icon: 'el-icon-message-solid',
+        icon: 'el-icon-s-tools',
         show: true
       },
       component: 'Base',
@@ -55,6 +55,16 @@ Mock.mock('/api/info', 'get', {
         show: true
       },
       component: 'jurisdiction'
+    },
+    {
+      name: 'menuManagement',
+      parentId: 1,
+      id: 8,
+      meta: {
+        title: '菜单管理',
+        show: true
+      },
+      component: 'menuManagement'
     }, {
       name: 'manufacture',
       parentId: 0,
@@ -65,7 +75,7 @@ Mock.mock('/api/info', 'get', {
         show: true
       },
       component: 'Base',
-      redirect: '/manufacture/vehicle'
+      redirect: '/manufacture/cylinderFile'
     },
     {
       name: 'cylinderFile',
@@ -78,6 +88,36 @@ Mock.mock('/api/info', 'get', {
       component: 'cylinderFile'
     },
     {
+      name: 'cylinderSpecification',
+      parentId: 2,
+      id: 25,
+      meta: {
+        title: '钢瓶规格',
+        show: true
+      },
+      component: 'cylinderSpecification'
+    },
+    {
+      name: 'warehouse',
+      parentId: 2,
+      id: 26,
+      meta: {
+        title: '仓库管理',
+        show: true
+      },
+      component: 'warehouse'
+    },
+    {
+      name: 'tankFilling',
+      parentId: 2,
+      id: 27,
+      meta: {
+        title: '充装管理',
+        show: true
+      },
+      component: 'tankFilling'
+    },
+    {
       name: 'vehicle',
       parentId: 2,
       id: 31,
@@ -86,13 +126,43 @@ Mock.mock('/api/info', 'get', {
         show: true
       },
       component: 'vehicle'
+    },
+    {
+      name: 'loadingGun',
+      parentId: 2,
+      id: 32,
+      meta: {
+        title: '充装枪管理',
+        show: true
+      },
+      component: 'loadingGun'
+    },
+    {
+      name: 'aerationInspection',
+      parentId: 2,
+      id: 33,
+      meta: {
+        title: '充气前后检查',
+        show: true
+      },
+      component: 'aerationInspection'
+    },
+    {
+      name: 'wanderAbout',
+      parentId: 2,
+      id: 35,
+      meta: {
+        title: '气瓶流转步骤',
+        show: true
+      },
+      component: 'wanderAbout'
     }, {
       name: 'customer',
       parentId: 0,
       id: 3,
       meta: {
         title: '客户中心',
-        icon: 'el-icon-message-solid',
+        icon: 'el-icon-phone',
         show: true
       },
       component: 'Base',
@@ -123,7 +193,7 @@ Mock.mock('/api/info', 'get', {
       parentId: 3,
       id: 14,
       meta: {
-        title: '客户档',
+        title: '客户档',
         show: true
       },
       component: 'customerFiling'
@@ -131,7 +201,7 @@ Mock.mock('/api/info', 'get', {
     {
       name: 'entrySecurity',
       parentId: 3,
-      id: 15,
+      id: 21,
       meta: {
         title: '入户安全',
         show: true
@@ -139,12 +209,22 @@ Mock.mock('/api/info', 'get', {
       component: 'entrySecurity'
     },
     {
+      name: 'complaints',
+      parentId: 3,
+      id: 15,
+      meta: {
+        title: '投诉建议',
+        show: true
+      },
+      component: 'complaints'
+    },
+    {
       name: 'marketing',
       parentId: 0,
       id: 6,
       meta: {
         title: '销售管理',
-        icon: 'el-icon-message-solid',
+        icon: 'el-icon-s-marketing',
         show: true
       },
       component: 'Base',
@@ -160,5 +240,35 @@ Mock.mock('/api/info', 'get', {
       },
       component: 'orderManagement'
     },
+    {
+      name: 'commodity',
+      parentId: 6,
+      id: 22,
+      meta: {
+        title: '商品管理',
+        show: true
+      },
+      component: 'commodity'
+    },
+    {
+      name: 'salesScheme',
+      parentId: 6,
+      id: 23,
+      meta: {
+        title: '销售方案',
+        show: true
+      },
+      component: 'salesScheme'
+    },
+    {
+      name: 'allocation',
+      parentId: 6,
+      id: 24,
+      meta: {
+        title: '派费管理',
+        show: true
+      },
+      component: 'allocation'
+    },
   ]
 })

+ 54 - 53
src/permission.js

@@ -1,75 +1,76 @@
-import router, { resetRouter } from './router'
+import router, {
+  resetRouter
+} from './router'
 import store from './store'
-import NProgress from 'nprogress' // progress bar
-import Cookies from "js-cookie"
 import {
   Message
-} from 'element-ui';
-NProgress.configure({ showSpinner: false }) // NProgress Configuration
+} from 'element-ui'
+import NProgress from 'nprogress' // progress bar
+import 'nprogress/nprogress.css' // progress bar style
 
-const allowList = ['login', 'register', 'registerResult'] // no redirect allowList
-const loginRoutePath = '/login'
-const defaultRoutePath = '/index'
+NProgress.configure({
+  showSpinner: false
+})
+const whiteList = ['/login'] // 白名单
 
-router.beforeEach((to, from, next) => {
-  NProgress.start() // start progress bar
-  to.meta && typeof to.meta.title !== 'undefined'
-  /* has token */
-  const token = Cookies.get('T_tokey')
-  if (token) {
-    if (to.path === loginRoutePath) {
-      next({ path: defaultRoutePath })
+//全局前置路由,若无next()则不会进行下一步骤
+router.beforeEach(async (to, from, next) => {
+  NProgress.start()
+  const hasToken = localStorage.getItem('T_tokey')
+  // 若token存在,则该用户已登录
+  if (hasToken) {
+    if (to.path === '/login') {
+      // 若此时页面在登录页面,则跳转至首页
+      next({
+        path: '/'
+      })
       NProgress.done()
     } else {
-      console.log(store,23532)
-      // check login user.roles is null
-      if (store.getters.roles.length === 0) {
-        // request login userInfo
-        store
-          .dispatch('GetInfo')
-          .then(res => {
-            console.log('res', res)
-            // 根据用户权限信息生成可访问的路由表
-            store.dispatch('GenerateRoutes', { token, ...res }).then(() => {
-              // 动态添加可访问路由表
-              // VueRouter@3.5.0+ New API
-              resetRouter() // 重置路由 防止退出重新登录或者 token 过期后页面未刷新,导致的路由重复添加
-              store.getters.addRouters.forEach(r => {
-                router.addRoute(r)
-              })
-              // 请求带有 redirect 重定向时,登录自动重定向到该地址
-              const redirect = decodeURIComponent(from.query.redirect || to.path)
-              if (to.path === redirect) {
-                // set the replace: true so the navigation will not leave a history record
-                next({ ...to, replace: true })
-              } else {
-                // 跳转到目的路由
-                next({ path: redirect })
-              }
+      if (store.getters.roles.length != 0) {
+        next()
+      } else {
+        store.dispatch('GetInfo').then(res => {
+          // 若该用户之前未存储角色权限在store中,则前往store目录下的该路径,根据store存储过的token,获取并存储该用户的角色权限
+          store.dispatch('GenerateRoutes', {
+            hasToken
+          }).then((res) => {
+            const accessRoutes = res
+            resetRouter()
+            router.addRoutes(accessRoutes)
+            next({
+              ...to,
+              replace: true
             })
-          })
-          .catch(() => {
-            Message.error('请求用户信息失败,请重试')
-            // 失败时,获取用户信息失败时,调用登出,来清空历史保留信息
+          }).catch(()=>{
             store.dispatch('Logout').then(() => {
-              next({ path: loginRoutePath, query: { redirect: to.fullPath } })
+              next('/login')
             })
           })
-      } else {
-        next()
+        }).catch(() => {
+          // remove token and go to login page to re-login
+          store.dispatch('Logout').then(() => {
+            next('/login')
+          })
+          //这里会报个参数类型异常,所以将参数 由error 改为了 error.message
+          Message.error(error.message || 'Has Error')
+          NProgress.done()
+        })
       }
     }
   } else {
-    if (allowList.includes(to.name)) {
-      // 在免登录名单,直接进入
+    /* has no token*/
+    if (whiteList.indexOf(to.path) !== -1) {
+      // in the free login whitelist, go directly
       next()
     } else {
-      next({ path: loginRoutePath, query: { redirect: to.fullPath } })
-      NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
+      // other pages that do not have permission to access are redirected to the login page.
+      next('/login')
+      NProgress.done()
     }
   }
 })
 
 router.afterEach(() => {
-  NProgress.done() // finish progress bar
+  // finish progress bar
+  NProgress.done()
 })

+ 206 - 0
src/router/generator-routers.js

@@ -0,0 +1,206 @@
+// eslint-disable-next-line
+import * as loginService from '@/api/menu'
+
+// 前端路由表 (基于动态)
+const constantRouterComponents = {
+  '404': () => import('@/views/404'),
+  Base: () => import('@/views/common/Base'),
+  // 你需要动态引入的页面组件
+  // 系统管理
+  transport: () => import('@/views/system/transport'),
+  salesStore: () => import('@/views/system/salesStore'),
+  employee: () => import('@/views/system/employee'),
+  jurisdiction: () => import('@/views/system/jurisdiction'),
+  menuManagement: () => import('@/views/system/menuManagement'),
+  // 生产管理
+  cylinderFile: () => import('@/views/manufacture/cylinderFile'),
+  cylinderSpecification: () => import('@/views/manufacture/cylinderSpecification'),
+  warehouse: () => import('@/views/manufacture/warehouse'),
+  tankFilling: () => import('@/views/manufacture/tankFilling'),
+  vehicle: () => import('@/views/manufacture/vehicle'),
+  loadingGun: () => import('@/views/manufacture/loadingGun'),
+  aerationInspection: () => import('@/views/manufacture/aerationInspection'),
+  wanderAbout: () => import('@/views/manufacture/wanderAbout'),
+  equipment: () => import('@/views/manufacture/equipment'),
+  // 客户中心
+  agentOrdering: () => import('@/views/customer/agentOrdering'),
+  orderProcessing: () => import('@/views/customer/orderProcessing'),
+  customerFiling: () => import('@/views/customer/customerFiling'),
+  entrySecurity: () => import('@/views/customer/entrySecurity'),
+  complaints: () => import('@/views/customer/complaints'),
+  // 销售管理
+  orderManagement: () => import('@/views/marketing/orderManagement'),
+  commodity: () => import('@/views/marketing/commodity'),
+  salesScheme: () => import('@/views/marketing/salesScheme'),
+  allocation: () => import('@/views/marketing/allocation'),
+}
+
+// 前端未找到页面路由(固定不用改)
+const notFoundRouter = {
+  name: '404',
+  path: '*',
+  redirect: '/404',
+  hidden: true
+}
+
+// 根级菜单
+const rootRouter = {
+  name: 'index',
+  path: '/',
+  component: () => import('@/views/common/Base'),
+  redirect: '/home',
+  children: [{
+    path: '/home',
+    name: 'home',
+    component: () => import('@/views/page/Home'),
+  }]
+}
+
+/**
+ * 动态生成菜单
+ * @param token
+ * @returns {Promise<Router>}
+ */
+export const generatorDynamicRouter = token => {
+  return new Promise((resolve, reject) => {
+    loginService
+      .getMenuRole(token)
+      .then(res => {
+        const result = res.data
+        // console.log('generatorDynamicRouter response:', result)
+
+        function getFlatArr(arr) {
+          return arr.reduce((a, item) => {
+            let flatArr = [...a, item];
+            if (item.children) {
+              flatArr = [...flatArr, ...getFlatArr(item.children)];
+            }
+            return flatArr;
+          }, []);
+        }
+        let dataArr = []
+        let arrList = getFlatArr(result);
+        arrList.forEach(item => {
+          let arrList1 = {}
+          arrList1.meta = {
+            title: item.title,
+            icon: item.icon,
+            show: true,
+          }
+          if (item.visible == '1') {
+            arrList1.meta.show = true
+          } else {
+            arrList1.meta.show = false
+          }
+          arrList1.component = item.component
+          arrList1.id = item.id
+          arrList1.name = item.name
+          arrList1.parentId = item.parentId
+          if (item.parentId == 0) {
+            arrList1.redirect = item.redirect
+          }
+          dataArr.push(arrList1)
+        })
+        const menuNav = []
+        const childrenNav = []
+        listToTree(dataArr, childrenNav, 0)
+        childrenNav.forEach((item) => {
+          menuNav.push(item)
+        })
+        // console.log('menuNav', menuNav)
+        const routers = generator(menuNav)
+        routers.push(notFoundRouter)
+        routers.push(rootRouter)
+        // console.log('routers', routers)
+        resolve(routers)
+      }).catch(err => {
+        reject(err)
+      })
+  })
+}
+
+/**
+ * 格式化树形结构数据 生成 vue-router 层级路由表
+ *
+ * @param routerMap
+ * @param parent
+ * @returns {*}
+ */
+export const generator = (routerMap, parent) => {
+  return routerMap.map(item => {
+    const {
+      title,
+      show,
+      hideChildren,
+      hiddenHeaderContent,
+      target,
+      icon
+    } = item.meta || {}
+    const currentRouter = {
+      // 如果路由设置了 path,则作为默认 path,否则 路由地址 动态拼接生成如 /dashboard/workplace
+      path: item.path || `${(parent && parent.path) || ''}/${item.key}`,
+      // 路由名称,建议唯一
+      name: item.name || item.key || '',
+      // 该路由对应页面的 组件 :方案1
+      // 该路由对应页面的 组件 :方案2 (动态加载)
+      component: constantRouterComponents[item.component || item.key] || (() => import(
+        `@/views/${item.component}`)),
+
+      // meta: 页面标题, 菜单图标, 页面权限(供指令权限用,可去掉)
+      meta: {
+        title: title,
+        icon: icon || undefined,
+        // hiddenHeaderContent: hiddenHeaderContent,
+        // target: target,
+        // permission: item.name
+      }
+    }
+    // 是否设置了隐藏菜单
+    if (show === false) {
+      currentRouter.hidden = true
+    }
+    // 是否设置了隐藏子菜单
+    if (hideChildren) {
+      currentRouter.hideChildrenInMenu = true
+    }
+    // 为了防止出现后端返回结果不规范,处理有可能出现拼接出两个 反斜杠
+    if (!currentRouter.path.startsWith('http')) {
+      currentRouter.path = currentRouter.path.replace('//', '/')
+    }
+    // 重定向
+    item.redirect && (currentRouter.redirect = item.redirect)
+    // 是否有子菜单,并递归处理
+    if (item.children && item.children.length > 0) {
+      // Recursion
+      currentRouter.children = generator(item.children, currentRouter)
+    }
+    return currentRouter
+  })
+}
+
+/**
+ * 数组转树形结构
+ * @param list 源数组
+ * @param tree 树
+ * @param parentId 父ID
+ */
+const listToTree = (list, tree, parentId) => {
+  list.forEach(item => {
+    // 判断是否为父级菜单
+    if (item.parentId === parentId) {
+      const child = {
+        ...item,
+        key: item.key || item.name,
+        children: []
+      }
+      // 迭代 list, 找到当前菜单相符合的所有子菜单
+      listToTree(list, child.children, item.id)
+      // 删掉不存在 children 值的属性
+      if (child.children.length <= 0) {
+        delete child.children
+      }
+      // 加入到树中
+      tree.push(child)
+    }
+  })
+}

+ 1 - 160
src/router/index.js

@@ -1,10 +1,6 @@
 import Vue from 'vue'
 import Router from 'vue-router'
 import {
-  getTokenil
-} from '@/api/login'
-import store from '@/store'
-import {
   constantRouterMap
 } from '@/config/router.config'
 
@@ -17,36 +13,11 @@ Router.prototype.push = function push(location, onResolve, onReject) {
 Vue.use(Router)
 
 // 前端路由表 (基于动态)
-const constantRouterComponents = {
-  '404': () => import('@/views/404'),
-  Base: () => import('@/views/common/Base'),
-  // 你需要动态引入的页面组件
-  // 系统管理
-  transport: () => import('@/views/system/transport'),
-  salesStore: () => import('@/views/system/salesStore'),
-  employee: () => import('@/views/system/employee'),
-  jurisdiction: () => import('@/views/system/jurisdiction'),
-  // 生产管理
-  vehicle: () => import('@/views/manufacture/vehicle'),
-  cylinderFile: () => import('@/views/manufacture/cylinderFile'),
-  // 客户中心
-  agentOrdering: () => import('@/views/customer/agentOrdering'),
-  orderProcessing: () => import('@/views/customer/orderProcessing'),
-  customerFiling: () => import('@/views/customer/customerFiling'),
-  entrySecurity: () => import('@/views/customer/entrySecurity'),
-  // 销售管理
-  orderManagement: () => import('@/views/marketing/orderManagement')
-}
 
-const notFoundRouter = {
-  path: '*',
-  redirect: '/404',
-  hidden: true
-}
 const createRouter = () =>
   new Router({
     mode: 'history',
-    routes: []
+    routes: constantRouterMap
   })
 
 const router = createRouter()
@@ -56,135 +27,5 @@ export function resetRouter() {
   const newRouter = createRouter()
   router.matcher = newRouter.matcher
 }
-// 定义变量接收api的路由数据
-let mRoutes
-
-router.beforeEach(async (to, form, next) => {
-  if (!mRoutes) {
-    let dataList = await getTokenil()
-    let dataArr = dataList.data.arr
-    // 子菜单匹配页面标识路由
-    dataArr.forEach(item => {
-      if (item.parentId != 0) {
-        item.component = item.name
-      }
-    })
-    const menuNav = []
-    const childrenNav = []
-    listToTree(dataArr, childrenNav, 0)
-    const routers = generator(childrenNav)
-    // console.log(routers,655)
-    const routersList = constantRouterMap.concat(routers)
-    router.addRoutes(routersList)
-    router.addRoute(notFoundRouter)
-    router.addRoute({
-      path: '/',
-      name: 'index',
-      redirect: '/home',
-      component: () => import('@/views/common/Base'),
-      children: [{
-        path: '/home',
-        name: 'home',
-        component: () => import('@/views/page/Home'),
-      }]
-    })
-    mRoutes = routersList
-    // console.log(router.getRoutes(), '打印路由1')
-    // 向仓库发送api的路由数据
-    store.commit('setMenu', childrenNav)
-    next({
-      ...to
-    })
-  } else {
-    // console.log(mRoutes, '打印路由2')
-  }
-  next()
-})
-
-/**
- * 格式化树形结构数据 生成 vue-router 层级路由表
- *
- * @param routerMap
- * @param parent
- * @returns {*}
- */
-export const generator = (routerMap, parent) => {
-  return routerMap.map(item => {
-    const {
-      title,
-      show,
-      hideChildren,
-      hiddenHeaderContent,
-      target,
-      icon
-    } = item.meta || {}
-    const currentRouter = {
-      // 如果路由设置了 path,则作为默认 path,否则 路由地址 动态拼接生成如 /dashboard/workplace
-      path: item.path || `${(parent && parent.path) || ''}/${item.key}`,
-      // 路由名称,建议唯一
-      name: item.name || item.key || '',
-      // 该路由对应页面的 组件 :方案1
-      // 该路由对应页面的 组件 :方案2 (动态加载)
-      component: constantRouterComponents[item.component || item.key] || (() => import(
-        `@/views/${item.component}`)),
-
-      // meta: 页面标题, 菜单图标, 页面权限(供指令权限用,可去掉)
-      meta: {
-        title: title,
-        icon: icon || undefined,
-        // hiddenHeaderContent: hiddenHeaderContent,
-        // target: target,
-        // permission: item.name
-      }
-    }
-    // 是否设置了隐藏菜单
-    if (show === false) {
-      currentRouter.hidden = true
-    }
-    // 是否设置了隐藏子菜单
-    if (hideChildren) {
-      currentRouter.hideChildrenInMenu = true
-    }
-    // 为了防止出现后端返回结果不规范,处理有可能出现拼接出两个 反斜杠
-    if (!currentRouter.path.startsWith('http')) {
-      currentRouter.path = currentRouter.path.replace('//', '/')
-    }
-    // 重定向
-    item.redirect && (currentRouter.redirect = item.redirect)
-    // 是否有子菜单,并递归处理
-    if (item.children && item.children.length > 0) {
-      // Recursion
-      currentRouter.children = generator(item.children, currentRouter)
-    }
-    return currentRouter
-  })
-}
-
-/**
- * 数组转树形结构
- * @param list 源数组
- * @param tree 树
- * @param parentId 父ID
- */
-const listToTree = (list, tree, parentId) => {
-  list.forEach(item => {
-    // 判断是否为父级菜单
-    if (item.parentId === parentId) {
-      const child = {
-        ...item,
-        key: item.key || item.name,
-        children: []
-      }
-      // 迭代 list, 找到当前菜单相符合的所有子菜单
-      listToTree(list, child.children, item.id)
-      // 删掉不存在 children 值的属性
-      if (child.children.length <= 0) {
-        delete child.children
-      }
-      // 加入到树中
-      tree.push(child)
-    }
-  })
-}
 
 export default router

+ 16 - 0
src/store/getters.js

@@ -0,0 +1,16 @@
+const getters = {
+  isMobile: state => state.app.isMobile,
+  lang: state => state.app.lang,
+  theme: state => state.app.theme,
+  color: state => state.app.color,
+  token: state => state.user.token,
+  nickname: state => state.user.name,
+  welcome: state => state.user.welcome,
+  roles: state => state.user.roles,
+  permission_routes: state => state.permission.routes,
+  userInfo: state => state.user.info,
+  addRouters: state => state.permission.addRouters,
+  multiTab: state => state.app.multiTab
+}
+
+export default getters

+ 9 - 3
src/store/index.js

@@ -1,14 +1,20 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import permission from './modules/async-router'
+
+import user from './modules/user'
+
+import getters from './getters'
+import permission from './modules/permission'
+
 Vue.use(Vuex)
 
 export default new Vuex.Store({
   mutations: {},
-  getters: {},
   mutations: {},
   actions: {},
   modules: {
+    user,
     permission
-  }
+  },
+  getters
 })

+ 0 - 24
src/store/modules/async-router.js

@@ -1,24 +0,0 @@
-/**
- * 向后端请求用户的菜单,动态生成路由
- */
-import {
-  constantRouterMap
-} from '@/config/router.config'
-
-const permission = {
-  state: {
-    menu: [],
-  },
-  mutations: {
-    setMenu(state, meun) {
-      state.menu = meun
-    },
-  },
-  getters: {
-    getMenu(state) {
-      return state.menu
-    }
-  },
-}
-
-export default permission

+ 46 - 0
src/store/modules/permission.js

@@ -0,0 +1,46 @@
+import {
+  constantRouterMap
+} from '@/config/router.config'
+import {
+  generatorDynamicRouter
+} from '@/router/generator-routers'
+
+const permission = {
+  state: {
+    menu: [],
+  },
+  mutations: {
+    setMenu(state, meun) {
+      state.menu = meun
+    },
+    SET_ROUTERS: (state, routers) => {
+      state.addRouters = routers
+      state.routers = constantRouterMap.concat(routers)
+    }
+  },
+  getters: {
+    getMenu(state) {
+      return state.menu
+    }
+  },
+  actions: {
+    GenerateRoutes({
+      commit
+    }, data) {
+      return new Promise((resolve, reject) => {
+        const {
+          token
+        } = data
+        generatorDynamicRouter(token).then(routers => {
+          commit('setMenu', routers)
+          commit('SET_ROUTERS', routers)
+          resolve(routers)
+        }).catch(e => {
+          reject(e)
+        })
+      })
+    }
+  }
+}
+
+export default permission

+ 90 - 0
src/store/modules/user.js

@@ -0,0 +1,90 @@
+import {
+  login,
+  logout
+} from '@/api/login'
+import {
+  getMenuRole
+} from '@/api/menu'
+
+
+const user = {
+  state: {
+    token: '',
+    name: '',
+    welcome: '',
+    avatar: '',
+    roles: [],
+    info: {}
+  },
+  mutations: {
+    SET_TOKEN: (state, token) => {
+      state.token = token
+    },
+    SET_AVATAR: (state, avatar) => {
+      state.avatar = avatar
+    },
+    SET_ROLES: (state, roles) => {
+      state.roles = roles
+    },
+    SET_INFO: (state, info) => {
+      state.info = info
+    }
+  },
+
+  actions: {
+    // user login
+    Login({
+      commit
+    }, userInfo) {
+      return new Promise((resolve, reject) => {
+        // api/user
+        // 连接后端接口,根据前端请求的用户信息,后端返回唯一对应的随机token
+        login(userInfo).then(response => {
+          const data = response
+          if (data.code == 200) {
+            // commit会触发mutations,存储token
+            commit('SET_TOKEN', data.token)
+            // setToken(data.token)
+            localStorage.setItem('T_tokey', data.token);
+            resolve()
+          } else {
+            reject(data)
+          }
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 获取权限路由
+    GetInfo({
+      commit,
+      state
+    }) {
+      return new Promise((resolve, reject) => {
+        const roles = [{
+          action: 'add',
+          describe: '新增',
+          defaultCheck: false
+        }]
+        // 存储用户信息,方便用于全局
+        commit('SET_ROLES', roles)
+        resolve(roles)
+      })
+    },
+    // 登出
+    Logout({
+      commit,
+      state
+    }) {
+      return new Promise((resolve) => {
+        commit('SET_TOKEN', '')
+        commit('SET_ROLES', [])
+        localStorage.removeItem('T_tokey');
+        localStorage.removeItem('username');
+        resolve()
+      })
+    }
+  }
+}
+
+export default user

+ 33 - 12
src/utils/request.js

@@ -1,18 +1,24 @@
 import axios from 'axios'
 // import storage from 'store'
 import router from '../router'
+import store from '../store'
 import {
   Message
 } from 'element-ui';
+import {
+  refreshToken
+} from '@/api/login'
 import Cookies from "js-cookie";
 // 创建 axios 实例
+// const Url = "http://192.168.11.77:6500"
+const Url = "http://gascylindertest.baozhida.cn/gas_cylinder"
 const request = axios.create({
   // API 请求的默认前缀
-  baseURL: '/api',
+  baseURL: process.env.NODE_ENV === 'production' ? Url : '/api',
   timeout: 6000, // 请求超时时间
   withCredentials: false,
   headers: {
-    'Content-Type': 'application/x-www-form-urlencoded',
+    'Content-Type': 'application/json',
     'Access-Control-Allow-Origin': '*'
   }
 })
@@ -20,12 +26,11 @@ const request = axios.create({
 // 异常拦截处理器
 const errorHandler = (error) => {
   if (error.response) {
-    console.log(error.response, 987)
     const data = error.response.data
     if (error.response.status === 403) {
       Message.error(data.message)
     }
-    if (error.response.status === 401 && !(data.result && data.result.isLogin)) {
+    if (error.response.status === 401) {
       Message.error(data.message)
     }
   }
@@ -34,13 +39,14 @@ const errorHandler = (error) => {
 
 // request interceptor
 request.interceptors.request.use(config => {
-  if (config.method === 'post' && config.baseURL != '/APP' && !config.uploading) {
+  const token = localStorage.getItem('T_tokey')
+  // 让每个请求携带自定义 token 请根据实际情况自行修改
+  if (token) {
+    config.headers.Authorization = 'Bearer ' + token
+  }
+  if (config.method === 'post' && config.url != "/api/upload") {
     let data = config.data
-    const uuid = Cookies.get('T_uuid')
-    config.data = JSON.stringify({
-      T_uuid: uuid,
-      ...data
-    })
+    config.data = JSON.stringify(data)
   }
   return config
 }, errorHandler)
@@ -49,10 +55,25 @@ request.interceptors.request.use(config => {
 request.interceptors.response.use((response) => {
   if (response.data.Code || response.data.code) {
     const res = response.data
-    if (res.Code == 200 || res.code == 200) {
+    if (res.code == 6401) {
+      return refreshToken().then(res => {
+        // console.log(res, 24)
+        // 更新本地存储的 Token
+        localStorage.setItem("T_tokey", res.token);
+        // 重新发送原请求
+        return request(response.config);
+      })
+    } else if (res.Code == 401 || res.code == 401) {
+      localStorage.removeItem('T_tokey');
+      localStorage.removeItem('username');
+      store.dispatch('Logout').then(() => {
+        router.push('/login');
+      })
+    }
+    if (res.Code == 200 || res.code == 200 || res.code == 404) {
       return res
     } else {
-      Message.error(res.Msg || res.message)
+      Message.error(res.msg || res.message)
     }
     return response.data
   } else {

+ 18 - 0
src/utils/select.js

@@ -0,0 +1,18 @@
+import Vue from 'vue'
+export default {}.install = (Vue, options = {}) => {
+  Vue.directive('loadmore', {
+    inserted(el, binding) {
+      // 获取element-ui定义好的scroll盒子
+      const SELECTDOWN_DOM = el.querySelector(
+        '.el-select-dropdown .el-select-dropdown__wrap'
+      )
+      SELECTDOWN_DOM.addEventListener('scroll', function() {
+        const CONDITION =
+          this.scrollHeight - this.scrollTop <= this.clientHeight
+        if (CONDITION) {
+          binding.value()
+        }
+      })
+    },
+  })
+}

+ 0 - 1
src/views/404.vue

@@ -40,7 +40,6 @@
 <style rel="stylesheet/scss" lang="scss" scoped>
   .wscn-http404 {
     position: relative;
-    width: 1200px;
     margin: 20px auto 60px;
     padding: 0 100px;
     overflow: hidden;

+ 3 - 2
src/views/common/Base.vue

@@ -13,7 +13,7 @@
           </el-col>
           <el-col :span="10">
             <div class="titleBox center_in">
-              <span class="title" @click="goIndex">宝智达气瓶追溯管理系统</span>
+              <span class="title" @click="goIndex">宝智达-燃气瓶追溯管理系统</span>
             </div>
           </el-col>
           <el-col :span="7">
@@ -156,8 +156,9 @@
       }
 
       .time_title {
+        width: 120px;
         font-size: 30px;
-        font-family: "Hiragino Sans GB", Arial, sans-serif;
+        font: 600 35px mFont;
       }
 
       .userLogin {

+ 25 - 14
src/views/common/topNav.vue

@@ -10,14 +10,14 @@
         <span class="system_title">宝智达气瓶管理系统</span>
       </div>
       <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
-        background-color="rgba(2, 69, 115, 0.9)" :unique-opened="true" text-color="#fff" active-text-color="#409EFF">
+        background-color="rgba(2, 69, 115, 1)" :unique-opened="true" text-color="#fff" active-text-color="#409EFF">
         <el-submenu v-for="(item,index) in menus" :index="item.name" :key="index">
           <template slot="title">
             <i :class="item.meta.icon" class="menu_icon"></i>
             <span>{{item.meta.title}}</span>
           </template>
           <el-menu-item-group v-for="(it,k) in item.children" :key="k">
-            <router-link class="el-icon-menu" :to="it.path" @click.native="backSkip" tag="el-menu-item">
+            <router-link :to="it.path" @click.native="backSkip" tag="el-menu-item">
               {{it.meta.title}}
             </router-link>
           </el-menu-item-group>
@@ -46,24 +46,30 @@
       })
     },
     created() {
-      const mRoutes = this.$store.state.permission.menu;
-      this.menus = getpath(mRoutes, '')
-
-      function getpath(routerMap, parent) {
-        routerMap.map(item => {
-          item.path = `${(parent.path) || ''}/${item.name}`
-          if (item.children && item.children.length > 0) {
-            return getpath(item.children, item)
-          }
-        })
-        return routerMap
-      }
+      this.getLeftMenu()
       // console.log(this.menus, 66)
     },
     methods: {
       goMenu() {
+        this.getLeftMenu()
         this.drawer = true
       },
+      getLeftMenu() {
+        const mRoutes = this.$store.state.permission.menu;
+        const arrList = ['index', '404']
+        let mRoutesList = mRoutes.filter(item => !arrList.some(ele => ele === item.name));
+        this.menus = getpath(mRoutesList, '')
+
+        function getpath(routerMap, parent) {
+          routerMap.map(item => {
+            item.path = `${(parent.path) || ''}/${item.name}`
+            if (item.children && item.children.length > 0) {
+              return getpath(item.children, item)
+            }
+          })
+          return routerMap
+        }
+      },
       handleOpen(key, keyPath) {
         // console.log(key, keyPath);
       },
@@ -113,6 +119,10 @@
     background-color: rgba(64, 158, 255, 0.5) !important;
   }
 
+  ::v-deep .router-link-exact-active {
+    background-color: rgba(64, 158, 255, 0.5) !important;
+  }
+
   .title_left {
     -webkit-user-select: none;
     -moz-user-select: none;
@@ -136,6 +146,7 @@
     display: flex;
     align-items: center;
     padding: 10px;
+    background-color: rgba(2, 69, 115, 1) !important;
   }
 
   .system_img {

+ 19 - 10
src/views/common/userInfo.vue

@@ -5,7 +5,7 @@
     <!-- 用户名下拉菜单 -->
     <el-dropdown @command="handleCommand">
       <span class="el-dropdown-link">
-        {{username || 12345678}}
+        {{username}}
         <i class="el-icon-caret-bottom"></i>
       </span>
       <el-dropdown-menu slot="dropdown">
@@ -18,6 +18,9 @@
 <script>
   import Bus from './bus';
   import Cookies from "js-cookie";
+  import {
+    mapActions
+  } from 'vuex'
   export default {
     name: "UserInfo",
     data() {
@@ -26,13 +29,18 @@
       }
     },
     methods: {
+      ...mapActions(['Login', 'Logout']),
       // 用户名下拉菜单选择事件
       handleCommand(command) {
+        const {
+          Logout
+        } = this
         if ('loginout' == command) {
-          Cookies.remove('T_uuid')
-          Cookies.remove('T_tokey')
-          localStorage.removeItem('username');
-          this.$router.push('/login');
+          Logout().then((res) => {
+            localStorage.removeItem('T_tokey');
+            localStorage.removeItem('username');
+            this.$router.push('/login');
+          })
         }
       }
     }
@@ -60,18 +68,19 @@
   }
 
   .el-dropdown-menu {
-    background: linear-gradient(0, #0cb9e2, #1774c3);
-    border: none;
+    background: linear-gradient(0, #0cb9e2, #1774c3) !important;
+    border: none !important;
+    padding: unset !important;
 
     .el-dropdown-menu__item {
-      color: #fff;
-      letter-spacing: 2px;
+      color: #fff !important;
+      letter-spacing: 2px !important;
     }
   }
 
   .el-dropdown-menu__item:focus,
   .el-dropdown-menu__item:not(.is-disabled):hover {
-    background: none;
+    background: none !important;
   }
 
   ::v-deep .popper__arrow {

+ 62 - 0
src/views/customer/accuse.js

@@ -0,0 +1,62 @@
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'T_state',
+    operation: true,
+    label: '标题',
+    align: 'center',
+  }, {
+    field: 'T_connect',
+    label: '内容',
+    align: 'center',
+  }, {
+    field: 'T_connect',
+    label: '提交人',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '200px',
+    align: 'center',
+    labelButton: [{
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-tickets',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'T_sn',
+    label: '标题',
+    placeholder: '标题',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入标题',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'T_sn',
+    label: '内容',
+    placeholder: '内容',
+    type: 'textarea',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入内容',
+      trigger: 'blur'
+    }]
+  }, ]
+}

+ 461 - 27
src/views/customer/agentOrdering.vue

@@ -1,7 +1,8 @@
 <template>
   <!-- 坐席下单 -->
   <div>
-    <actionBar menuTitle="坐席下单" :formList="formList"></actionBar>
+    <actionBar menuTitle="坐席下单" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+      @searchProtocol="searchProtocol"></actionBar>
     <tables :key="Math.random()" :suspension="true" :tableList="tableList" :tableData="tableData"
       @buttonData="buttonData"></tables>
     <!-- 分页 -->
@@ -10,42 +11,78 @@
         @changeCurrent="changeCurrent">
       </pagination>
     </div>
-    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="70%" :close-on-click-modal="false">
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="70%" :close-on-click-modal="false"
+      @close="closeDialog">
       <div class="card_podia">
-        <div class="seating_form_card">
-          <forms ref="childRules" :formNewList="formRuleList" labelWidth="120px"></forms>
+        <div :style="{width:operationType == 'edit' ? '100%' : '70%'}">
+          <forms ref="childRules" labelPosition="left" :formNewList="formRuleList" :ruleForm="ruleForm"
+            labelWidth="120px" @numberSearch="numberSearch" @changeSelect="changeSelect"></forms>
         </div>
-        <div class="seating_order">
+        <div class="seating_order" v-if="operationType != 'edit'">
           <div class="card_seating_order">
             <span>订单记录</span>
             <el-divider></el-divider>
-            <div style="display: flex;flex-direction: column;">
-              <div v-for="(item,index) in list" :key="index">
-                {{item}}
+            <div style="display: flex;flex-direction: column;" v-if="orderRecordList.length > 0">
+              <div v-for="(item,index) in orderRecordList" :key="index">
+                {{item.orderTime}} {{item.goods.name}}{{item.spec.name}} {{item.quantity}}瓶
               </div>
             </div>
+            <div v-else class="center_in" style="color: #909399;">暂无数据</div>
             <div style="margin-top: 50px;">客户用瓶信息</div>
             <el-divider></el-divider>
+            <div style="display: flex;flex-direction: column;" v-if="informationList.length > 0">
+              <div v-for="(item,index) in informationList" :key="index">
+                {{item.borrowTime}} {{item.innerCode}}
+              </div>
+            </div>
+            <div class="center_in" style="color: #909399;" v-else>暂无数据</div>
           </div>
         </div>
       </div>
-      <span slot="footer" class="dialog-footer">
+      <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
         <el-button plain @click="staffDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="staffDialogVisible = false">确 定</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
+  import {
+    getOrder,
+    getCustomer,
+    addCustomer,
+    addOrder,
+    putOrder,
+    getDelivery,
+    getSysuser,
+    cancelOrder,
+    getBorrowGasCylinder
+  } from '@/api/order'
+  import {
+    putCustomer,
+  } from '@/api/record'
+  import {
+    getGoods,
+  } from '@/api/commodity'
+  import {
+    getCylinder,
+  } from '@/api/specification'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
   import {
+    urbanArea
+  } from '@/assets/js/districtCode'
+  import {
+    orderStatus
+  } from '@/assets/js/blockSort'
+  import {
     formRules,
     employee
   } from "./orderTable.js";
+  import axios from 'axios'
   export default {
     components: {
       actionBar,
@@ -55,6 +92,11 @@
     },
     data() {
       return {
+        operateList: [{
+          type: 'add',
+          title: '添加客户订单',
+          icon: 'el-icon-plus',
+        }],
         staffTitle: '添加',
         staffDialogVisible: false,
         Pagination: {
@@ -62,60 +104,452 @@
           PageSize: 10,
         },
         formList: [{
-          type: 'input',
+          type: 'picker',
           label: '订单时间',
-          field: 'T_name',
+          field: 'time',
           placeholder: '订单时间',
-          colWidth: 'el-col-24',
         }, {
           type: 'select',
           label: '订单状态',
-          field: 'T_name',
+          field: 'state',
           placeholder: '订单状态',
-          colWidth: 'el-col-24',
+          options: orderStatus(),
         }, {
           type: 'input',
           label: '客户电话',
-          field: 'T_name',
+          field: 'phone',
           placeholder: '客户电话',
-          colWidth: 'el-col-24',
         }],
+        searchRuleForm: {
+          time: [],
+          state: '',
+          phone: '',
+        },
         tableList: employee(),
-        tableData: [{
-          T_name: '2154'
-        }, {
-          T_name: '2154'
-        }, {
-          T_name: '2154'
-        }],
-        Total: 10,
+        tableData: [],
+        Total: 0,
         formRuleList: [],
-        list: ['2023-12-20 13:00:00  液化气15kg 1瓶', '2023-12-20 13:00:00  液化气15kg 1瓶', '2023-12-20 13:00:00  液化气15kg 1瓶'],
+        orderRecordList: [],
+        informationList:[],
+        ruleForm: {},
+        operationType: '',
+        confirmLoading: false,
+        detailedAddress: '',
+        searchValue: {},
+        clientId: '',
+        orderId: '',
       }
     },
     mounted() {
       const dataList = formRules();
       this.formRuleList = dataList;
+      this.getDistributionStore()
+      this.getList()
     },
     methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        if (value.time) {
+          this.searchValue.orderStartTime = value.time[0]
+          this.searchValue.orderEndTime = value.time[1]
+          delete this.searchValue.time
+        }
+        this.getList()
+      },
+      // 获取订单列表
+      getList() {
+        var params = {
+          source: 1,
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getOrder(params).then(res => {
+          // console.log(res,32)
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      // 手机号搜索
+      numberSearch(phone) {
+        getCustomer({
+          phone: phone,
+        }).then(res => {
+          if (res.code == 200) {
+            const arr = res.data
+            this.ruleForm.type = arr.type
+            if (arr.type == 0) {
+              this.ruleForm.name = arr.shopName
+            } else {
+              this.ruleForm.name = arr.principalName
+            }
+            this.ruleForm.address = arr.address
+            this.ruleForm.remark = arr.remark
+            var arr1 = []
+            arr1.push(arr.city)
+            arr1.push(arr.area)
+            this.ruleForm.cityRegion = arr1
+            this.ruleForm.lng = arr.lng
+            this.ruleForm.lat = arr.lat
+            this.$refs.childRules.curLoading = false
+            this.getOrderInformation(arr.id)
+          } else {
+            this.$refs.childRules.curLoading = false
+          }
+        })
+      },
+      // 下单
+      async handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          var params = {
+            name: this.ruleForm.name,
+            principalPhone: this.ruleForm.phone,
+            address: this.ruleForm.address,
+            remark: this.ruleForm.remark,
+            type: this.ruleForm.type,
+            city: this.ruleForm.cityRegion[0],
+            area: this.ruleForm.cityRegion[1]
+          }
+          let arr = await this.longitudeLatitude(params)
+          var propertyName = arr.location.split(",")
+          params.lng = Number(propertyName[0])
+          params.lat = Number(propertyName[1])
+          if (this.operationType == 'edit') {
+            await putCustomer({
+              id: this.clientId,
+              ...params
+            }).then(res => {
+              if (res.code == 200) {
+                this.placePutOrder(params)
+              }
+            })
+          } else {
+            await addCustomer(params).then(res => {
+              if (res.code == 200) {
+                this.placeOrder(res.data)
+              }
+            })
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      // 下单
+      async placeOrder(customerId) {
+        var params = {
+          customerId: customerId,
+          phone: this.ruleForm.phone,
+          address: '',
+          source: 1,
+          storeId: Number(this.ruleForm.storeId),
+          goodsId: Number(this.ruleForm.goodsId),
+          quantity: Number(this.ruleForm.quantity),
+          specId: Number(this.ruleForm.specId),
+          userId: Number(this.ruleForm.userId),
+          remark: this.ruleForm.orderNote,
+        }
+        var cityArr = urbanArea()
+        var city = this.cityScreening(this.ruleForm.cityRegion[0], cityArr)
+        var area = this.cityScreening(this.ruleForm.cityRegion[1], cityArr)
+        this.detailedAddress = city + area + this.ruleForm.address
+        if (this.detailedAddress) {
+          params.address = this.detailedAddress
+        } else {
+          params.address = this.ruleForm.address
+        }
+        addOrder(params).then(res => {
+          if (res.code == 200) {
+            this.staffDialogVisible = false
+            this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.getList()
+          }
+        })
+      },
+      // 修改订单
+      placePutOrder(value) {
+        var params = {
+          id: this.orderId,
+          phone: this.ruleForm.phone,
+          address: '',
+          storeId: Number(this.ruleForm.storeId),
+          goodsId: Number(this.ruleForm.goodsId),
+          quantity: Number(this.ruleForm.quantity),
+          specId: Number(this.ruleForm.specId),
+          userId: Number(this.ruleForm.userId),
+          remark: this.ruleForm.orderNote,
+        }
+        var cityArr = urbanArea()
+        var city = this.cityScreening(this.ruleForm.cityRegion[0], cityArr)
+        var area = this.cityScreening(this.ruleForm.cityRegion[1], cityArr)
+        this.detailedAddress = city + area + this.ruleForm.address
+        if (this.detailedAddress) {
+          params.address = this.detailedAddress
+        } else {
+          params.address = this.ruleForm.address
+        }
+        putOrder(params).then(res => {
+          // console.log(res, 77)
+          if (res.code == 200) {
+            this.staffDialogVisible = false
+            this.$message({
+              message: res.msg,
+              type: 'success'
+            });
+            this.getList()
+          }
+        })
+      },
+      // 获取经纬度
+      longitudeLatitude(value) {
+        var cityArr = urbanArea()
+        var city = this.cityScreening(value.city, cityArr)
+        var area = this.cityScreening(value.area, cityArr)
+        return new Promise((resolve, inject) => {
+          axios.get('https://restapi.amap.com/v3/geocode/geo', {
+            params: {
+              key: 'fcddcc366fd5bd355e35f01b7cce82ef',
+              address: city + area + value.address,
+            }
+          }).then((res) => {
+            resolve(res.data.geocodes[0])
+          }).catch(() => {
+            this.confirmLoading = false
+          })
+        })
+      },
+      // 城市筛选
+      cityScreening(value, list) {
+        function getChildById(parentArray, id) {
+          for (let i = 0; i < parentArray.length; i++) {
+            if (parentArray[i].value === id) { // 如果当前元素的ID与目标ID相等,则返回该元素
+              return parentArray[i];
+            } else if (parentArray[i].children && Array.isArray(parentArray[i].children)) { // 判断当前元素是否有子节点且类型为数组
+              const result = getChildById(parentArray[i].children, id); // 对子节点进行递归调用
+              if (result !== null) { // 若子节点存在结果,则返回该结果
+                return result;
+              }
+            }
+          }
+          return null; // 没有找到符合条件的元素时返回null
+        }
+        var name = getChildById(list, value)
+        if (name != null) {
+          return name.label
+        }
+      },
+      // 获取配送门店
+      getDistributionStore() {
+        getDelivery().then(res => {
+          // console.log(res, '门店')
+          if (res.code == 200) {
+            this.getAcquireGoods()
+            const arr = res.data
+            const childrenNav = flat(arr)
+            const arrList = []
+            childrenNav.forEach((item, index) => {
+              const commodity = {
+                label: item.name,
+                value: item.id,
+              }
+              arrList.push(commodity)
+            })
+            this.optionMatching(arrList, 'storeId')
+
+            function flat(arr) {
+              return [].concat(...arr.map(item => [].concat(item, ...flat(item.children))));
+            }
+          }
+        })
+      },
+      // 门店选择
+      changeSelect(row, field) {
+        if (field == 'storeId') {
+          this.getCourier(row)
+        }
+      },
+      // 获取配送员
+      getCourier(id) {
+        getSysuser({
+          storeId: id,
+        }).then(res => {
+          // console.log(res, '配送员')
+          if (res.code == 200) {
+            const arrList = []
+            const arr = res.data.list
+            arr.forEach((item, index) => {
+              const commodity = {
+                label: item.nickName,
+                value: item.id,
+              }
+              arrList.push(commodity)
+            })
+            this.optionMatching(arrList, 'userId')
+          }
+        })
+      },
+      // 获取商品
+      getAcquireGoods() {
+        getGoods().then(res => {
+          if (res.code == 200) {
+            const arrList = []
+            const arr = res.data.list
+            arr.forEach((item, index) => {
+              const commodity = {
+                label: item.name,
+                value: item.id,
+              }
+              arrList.push(commodity)
+            })
+            this.optionMatching(arrList, 'goodsId')
+            this.getSpecification()
+          }
+        })
+      },
+      // 获取规格
+      getSpecification() {
+        getCylinder().then(res => {
+          const arrList = []
+          const arr = res.data.list
+          arr.forEach((item, index) => {
+            const commodity = {
+              label: item.name,
+              value: item.id,
+            }
+            arrList.push(commodity)
+          })
+          this.optionMatching(arrList, 'specId')
+        })
+      },
+      // 选项赋值
+      optionMatching(value, field) {
+        this.formRuleList.forEach((item, index) => {
+          if (item.field == field) {
+            item.options = value
+          }
+        })
+      },
+      // 获取客户订单信息
+      getOrderInformation(id) {
+        getOrder({
+          customerId: id,
+        }).then(res => {
+          if (res.code == 200) {
+            this.orderRecordList = res.data.list
+            this.getGasCylinder(id)
+          }
+        })
+      },
+      // 获取客户订单信息
+      getGasCylinder(id) {
+        getBorrowGasCylinder({
+          customerId: id,
+        }).then(res => {
+          if (res.code == 200) {
+            this.informationList = res.data.list
+          }
+        })
+      },
+      openModel(type) {
+        this.operationType = type
+        if (type == 'add') {
+          this.staffTitle = '添加订单'
+        }
+        this.staffDialogVisible = true
+      },
       buttonData(row, type) {
-        console.log(row, type, 25)
+        // console.log(row, type, 25)
         if (type == 'logs') {
+          this.formRuleList.forEach((item, index) => {
+            item.disabled = true
+          })
+        }
+        this.orderId = row.id
+        this.operationType = type
+        if (type == 'logs' || type == 'edit') {
+          this.getCourier(row.storeId)
+          this.ruleForm.phone = row.customer.principalPhone
+          this.$set(this.ruleForm, 'type', row.customer.type)
+          this.$set(this.ruleForm, 'name', row.customer.principalName)
+          this.$set(this.ruleForm, 'address', row.customer.address)
+          var arr1 = []
+          arr1.push(row.customer.city)
+          arr1.push(row.customer.area)
+          this.$set(this.ruleForm, 'cityRegion', arr1)
+          this.$set(this.ruleForm, 'remark', row.customer.remark)
+          this.$set(this.ruleForm, 'orderNote', row.remark)
+          if (row.storeId != 0) {
+            this.$set(this.ruleForm, 'storeId', String(row.storeId))
+          }
+          if (row.userId != 0) {
+            this.$set(this.ruleForm, 'userId', String(row.userId))
+          }
+          this.$set(this.ruleForm, 'goodsId', String(row.goodsId))
+          this.$set(this.ruleForm, 'specId', String(row.specId))
+          this.$set(this.ruleForm, 'quantity', row.quantity)
+          this.getOrderInformation(row.customer.id)
+          this.clientId = row.customer.id
+          this.$forceUpdate()
           this.staffTitle = '座席下单'
           this.staffDialogVisible = true
+        } else if (type == 'del') {
+          this.getCancelOrder(row.id)
         }
       },
+      // 取消订单
+      getCancelOrder(ID) {
+        this.$confirm('此操作将永久取消该订单, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          cancelOrder({
+            id: ID,
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {
+          // console.log('取消')
+        });
+      },
       changeSize(val) {
         this.Pagination.PageSize = val
+        this.getList()
       },
       changeCurrent(val) {
         this.Pagination.PageIndex = val
+        this.getList()
       },
+      closeDialog() {
+        this.orderRecordList = []
+        this.informationList = []
+        this.ruleForm = {}
+        this.formRuleList.forEach((item, index) => {
+          item.disabled = false
+        })
+        this.$refs.childRules.resetCheck();
+      }
     }
   }
 </script>
 
 <style lang="scss" scoped>
+  ::v-deep .el-dialog {
+    margin-top: 8vh !important;
+  }
+
   .card_podia {
     display: flex;
   }

+ 18 - 14
src/views/customer/client.js

@@ -1,25 +1,29 @@
+import {
+  rectificationState
+} from '@/assets/js/blockSort'
 export const employee = () => {
   return [{
     field: 'index',
     label: '编号',
     align: 'center',
   }, {
-    field: 'T_state',
+    field: 'customer.name',
     operation: true,
     label: '客户姓名',
     align: 'center',
   }, {
-    field: 'T_connect',
+    field: 'user.nickName',
     label: '检查人',
     align: 'center',
   }, {
-    field: 'T_connect',
+    field: 'createdAt',
     label: '检查时间',
     align: 'center',
   }, {
-    field: 'T_connect',
+    field: 'state',
     label: '状态',
     align: 'center',
+    options: rectificationState(),
   }, {
     field: 'action',
     label: '操作',
@@ -34,49 +38,49 @@ export const employee = () => {
       type: 'logs',
       label: '查看',
       icon: 'el-icon-tickets',
-      // style: 'primary',
+      style: 'info',
     }]
   }]
 }
 
 export const formRules = () => {
   return [{
-    field: 'T_sn',
+    field: 'name',
     label: '客户姓名',
     type: 'input',
     value: '归属地'
   }, {
-    field: 'T_sn',
+    field: 'nickName',
     label: '检查人',
     type: 'input',
     value: '公认为'
   }, {
-    field: 'T_online',
+    field: 'homeCheckImg',
     type: 'image',
     label: '入户检查图片',
-    options: ['https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg','https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg','https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg','https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg','https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg']
+    options: []
   }, {
-    field: 'T_online',
+    field: 'signImg',
     type: 'image',
     label: '送气员签字图片',
     options: []
   }, {
-    field: 'T_online',
+    field: 'beforeRectifyImg',
     type: 'image',
     label: '整改前图片',
     options: []
   }, {
-    field: 'T_online',
+    field: 'afterRectifyImg',
     type: 'image',
     label: '整改后图片',
     options: []
   }, {
-    field: 'T_sn',
+    field: 'state',
     label: '状态',
     type: 'radio',
     value: '0'
   }, {
-    field: 'T_sn',
+    field: 'remark',
     label: '备注',
     type: 'input',
     value: ''

+ 109 - 0
src/views/customer/complaints.vue

@@ -0,0 +1,109 @@
+<template>
+  <!-- 投诉建议 -->
+  <div>
+    <actionBar menuTitle="投诉建议" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel"></actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false">
+      <forms ref="childRules" :formNewList="formRuleList" labelWidth="100px"></forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="staffDialogVisible = false">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./accuse.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '提交人',
+          field: 'name',
+          placeholder: '提交人',
+        }],
+        searchRuleForm: {
+          name: '',
+        },
+        tableList: employee(),
+        tableData: [{
+          T_name: '2154'
+        }, {
+          T_name: '2154'
+        }, {
+          T_name: '2154'
+        }],
+        Total: 10,
+        formRuleList: [],
+        operationType: '',
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      console.log(this.formRuleList, 25)
+    },
+    methods: {
+      openModel(type) {
+        console.log(type, 24)
+        if (type == 'add') {
+          this.staffTitle = '添加'
+        }
+        this.staffDialogVisible = true
+      },
+      buttonData(row, type) {
+        this.operationType = type
+        console.log(row, type, 25)
+        if (type == 'edit') {
+          this.staffTitle = '编辑'
+        } else {
+          this.staffTitle = '详情'
+        }
+        this.staffDialogVisible = true
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 271 - 14
src/views/customer/customerFiling.vue

@@ -1,7 +1,8 @@
 <template>
-  <!-- 客户档 -->
+  <!-- 客户档 -->
   <div>
-    <actionBar menuTitle="客户归档" :operateList="operateList" @openModel="openModel"></actionBar>
+    <actionBar menuTitle="客户档案" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel" @searchProtocol="searchProtocol"></actionBar>
     <tables :key="Math.random()" :suspension="true" :tableList="tableList" :tableData="tableData"
       @buttonData="buttonData"></tables>
     <!-- 分页 -->
@@ -10,17 +11,26 @@
         @changeCurrent="changeCurrent">
       </pagination>
     </div>
-    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="60%" :close-on-click-modal="false">
-      <forms ref="childRules" :formNewList="formRuleList" labelWidth="120px"></forms>
-      <span slot="footer" class="dialog-footer">
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="60%" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" :operationType="operationType"
+        labelWidth="120px"></forms>
+      <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
         <el-button plain @click="staffDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="staffDialogVisible = false">确 定</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
+  import {
+    getCustomer,
+    getCustomerDetails,
+    addCustomer,
+    putCustomer,
+    delCustomer,
+  } from '@/api/record'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
@@ -29,6 +39,10 @@
     employee,
     formRules,
   } from "./pigeonhole.js";
+  import {
+    urbanArea
+  } from '@/assets/js/districtCode'
+  import axios from 'axios'
   export default {
     components: {
       actionBar,
@@ -49,37 +63,280 @@
           title: '添加',
           icon: 'el-icon-plus',
         }],
-        tableList: employee(),
-        tableData: [{
-          T_name: '2154'
+        formList: [{
+          type: 'input',
+          label: '电话',
+          field: 'principalPhone',
+          placeholder: '电话',
         }, {
-          T_name: '2154'
+          type: 'select',
+          label: '类型',
+          field: 'type',
+          placeholder: '类型',
+          options: [{
+              label: '商户',
+              value: 0,
+            },
+            {
+              label: '私人',
+              value: 1,
+            },
+          ]
         }, {
-          T_name: '2154'
+          type: 'input',
+          label: '地址',
+          field: 'address',
+          placeholder: '地址',
         }],
-        Total: 10,
+        searchRuleForm: {
+          principalPhone: '',
+          type: '',
+          address: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
         formRuleList: [],
+        operationType: '',
+        searchValue: {},
+        ruleForm: {
+          fileList: [],
+        },
+        enterpriseId: null,
+        confirmLoading: false,
       }
     },
     mounted() {
       const dataList = formRules();
       this.formRuleList = dataList;
+      this.getList()
     },
     methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取商品列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getCustomer(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.tableData.forEach((item, index) => {
+              if (item.type == 0) {
+                item.name = item.shopName
+              } else {
+                item.name = item.principalName
+              }
+            })
+            this.Total = res.data.count
+          }
+        })
+      },
       openModel(type) {
-        console.log(type, 24)
+        this.operationType = type
         if (type == 'add') {
           this.staffTitle = '添加'
         }
         this.staffDialogVisible = true
       },
-      buttonData(row, type) {},
+      // 获取经纬度
+      longitudeLatitude(value) {
+        var cityArr = urbanArea()
+        var city = this.cityScreening(value.city, cityArr)
+        var area = this.cityScreening(value.area, cityArr)
+        return new Promise((resolve, inject) => {
+          axios.get('https://restapi.amap.com/v3/geocode/geo', {
+            params: {
+              key: 'fcddcc366fd5bd355e35f01b7cce82ef',
+              address: city + area + value.address,
+            }
+          }).then((res) => {
+            resolve(res.data.geocodes[0])
+          }).catch(() => {
+            this.confirmLoading = false
+          })
+        })
+      },
+      // 城市筛选
+      cityScreening(value, list) {
+        function getChildById(parentArray, id) {
+          for (let i = 0; i < parentArray.length; i++) {
+            if (parentArray[i].value === id) { // 如果当前元素的ID与目标ID相等,则返回该元素
+              return parentArray[i];
+            } else if (parentArray[i].children && Array.isArray(parentArray[i].children)) { // 判断当前元素是否有子节点且类型为数组
+              const result = getChildById(parentArray[i].children, id); // 对子节点进行递归调用
+              if (result !== null) { // 若子节点存在结果,则返回该结果
+                return result;
+              }
+            }
+          }
+          return null; // 没有找到符合条件的元素时返回null
+        }
+        var name = getChildById(list, value)
+        if (name != null) {
+          return name.label
+        }
+      },
+      // 弹窗表单添加
+      async handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          this.confirmLoading = true
+          if (this.operationType == 'add') {
+            var params = {
+              ...this.ruleForm
+            }
+            params.city = this.ruleForm.cityRegion[0]
+            params.area = this.ruleForm.cityRegion[1]
+            var fileImage = this.picture(this.ruleForm.fileList)
+            params.addressImg = fileImage
+            delete params.cityRegion;
+            delete params.fileList;
+            let arr = await this.longitudeLatitude(params)
+            var propertyName = arr.location.split(",")
+            params.lng = Number(propertyName[0])
+            params.lat = Number(propertyName[1])
+            await addCustomer(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          } else if (this.operationType == 'edit') {
+            this.editItem()
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      picture(arr) {
+        var imgList = JSON.parse(JSON.stringify(arr))
+        var imgArr = []
+        imgList.forEach((item, index) => {
+          var urlil = this.$baseUrl
+          item.url = item.url.replace(urlil, "")
+          imgArr.push(item.url)
+        })
+        var imgString = imgArr.join()
+        return imgString
+      },
+      async editItem() {
+        var params = {
+          id: this.enterpriseId,
+          address: this.ruleForm.address,
+          area: this.ruleForm.cityRegion[1],
+          city: this.ruleForm.cityRegion[0],
+          lat: this.ruleForm.lat,
+          lng: this.ruleForm.lng,
+          name: this.ruleForm.name,
+          principalPhone: this.ruleForm.principalPhone,
+          type: this.ruleForm.type,
+          remark: this.ruleForm.remark,
+        }
+        if (this.ruleForm.fileList) {
+          var fileImage = this.picture(this.ruleForm.fileList)
+          params.addressImg = fileImage
+        }
+        if (params.lng == 0 || params.lat == 0) {
+          let arr = await this.longitudeLatitude(params)
+          var propertyName = arr.location.split(",")
+          params.lng = Number(propertyName[0])
+          params.lat = Number(propertyName[1])
+        }
+        await putCustomer(params).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.getList()
+          }
+          this.confirmLoading = false
+          this.staffDialogVisible = false
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+      },
+      // 删除
+      deleteItem(id) {
+        this.$confirm('此操作将永久删除该客户, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delCustomer({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      buttonData(row, type) {
+        this.enterpriseId = row.id
+        this.operationType = type
+        if (type == 'logs') {
+          this.formRuleList.forEach((item, index) => {
+            item.disabled = true
+          })
+        }
+        if (type == 'edit' || type == 'logs') {
+          this.staffDialogVisible = true
+          this.staffTitle = '编辑'
+          this.ruleForm = JSON.parse(JSON.stringify(row))
+          if (row.addressImg) {
+            var arr = row.addressImg.split(',')
+            var arr3 = []
+            arr.forEach((item, index) => {
+              var arr1 = {
+                url: '',
+              }
+              arr1.url = this.$baseUrl + item
+              arr3.push(arr1)
+            })
+            this.ruleForm.fileList = arr3
+          }
+          var arr1 = []
+          arr1.push(row.city)
+          arr1.push(row.area)
+          this.ruleForm.cityRegion = arr1
+        } else if (type == 'del') {
+          this.deleteItem(row.id)
+        }
+      },
       changeSize(val) {
         this.Pagination.PageSize = val
+        this.getList()
       },
       changeCurrent(val) {
         this.Pagination.PageIndex = val
+        this.getList()
       },
+      closeDialog() {
+        this.ruleForm = {}
+        this.formRuleList.forEach((item, index) => {
+          item.disabled = false
+        })
+        this.$refs.childRules.resetCheck();
+      }
     }
   }
 </script>

+ 136 - 33
src/views/customer/entrySecurity.vue

@@ -1,7 +1,8 @@
 <template>
   <!-- 入户安全 -->
   <div>
-    <actionBar menuTitle="入户安全" :formList="formList"></actionBar>
+    <actionBar menuTitle="入户安全" :formList="formList" :ruleForm="searchRuleForm" @searchProtocol="searchProtocol">
+    </actionBar>
     <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
       @buttonData="buttonData"></tables>
     <!-- 分页 -->
@@ -10,17 +11,22 @@
         @changeCurrent="changeCurrent">
       </pagination>
     </div>
-    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="70%" :close-on-click-modal="false">
-      <forms-safety :operationType="operationType" :formRuleList="formRuleList"></forms-safety>
-      <span slot="footer" class="dialog-footer">
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="80%" :close-on-click-modal="false">
+      <forms-safety :operationType="operationType" :checkEntry="checkEntry" :formRuleList="formRuleList"
+        :ruleForm="ruleForm"></forms-safety>
+      <span slot="footer" class="dialog-footer" v-if="operationType == 'edit'">
         <el-button plain @click="staffDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="staffDialogVisible = false">确 定</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
+  import {
+    getInspectRecord,
+    putInspectRecord
+  } from '@/api/security'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
@@ -29,6 +35,9 @@
     formRules,
     employee
   } from "./client.js";
+  import {
+    check
+  } from '@/assets/js/announcements'
   export default {
     components: {
       actionBar,
@@ -47,44 +56,154 @@
         formList: [{
           type: 'input',
           label: '客户姓名',
-          field: 'T_name',
+          field: 'customerName',
           placeholder: '客户姓名',
-          colWidth: 'el-col-24',
         }],
+        searchRuleForm: {
+          customerName: '',
+        },
         tableList: employee(),
-        tableData: [{
-          T_name: '2154'
-        }, {
-          T_name: '2154'
-        }, {
-          T_name: '2154'
-        }],
-        Total: 10,
+        tableData: [],
+        Total: 0,
         formRuleList: [],
         operationType: '',
+        searchValue: {},
+        checkEntry: [],
+        ruleForm: {
+          fileList: [],
+        },
+        confirmLoading: false,
+        orderId: '',
       }
     },
     mounted() {
+      this.checkEntry = check()
       const dataList = formRules();
       this.formRuleList = dataList;
-      console.log(this.formRuleList, 25)
+      this.getList()
     },
     methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取入户安全检查列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getInspectRecord(params).then(res => {
+          // console.log(res,32)
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      async handleAdd() {
+        var params = {
+          afterRectifyImg: this.picture(this.ruleForm.fileList),
+          remark: this.ruleForm.remark,
+          state: this.ruleForm.state,
+          inspectExpandList: []
+        }
+        this.checkEntry.forEach(item => {
+          var arr = {
+            inspectItem: item.id,
+            itemCode: item.value,
+          }
+          params.inspectExpandList.push(arr)
+        })
+        if (this.operationType == 'edit') {
+          this.confirmLoading = true
+          await putInspectRecord({
+            id: this.orderId,
+            ...params
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+              this.staffDialogVisible = false
+            }
+            this.confirmLoading = false
+          })
+        }
+      },
+      picture(arr) {
+        var imgList = JSON.parse(JSON.stringify(arr))
+        var imgArr = []
+        imgList.forEach((item, index) => {
+          var urlil = this.$baseUrl
+          item.url = item.url.replace(urlil, "")
+          imgArr.push(item.url)
+        })
+        var imgString = imgArr.join()
+        return imgString
+      },
       buttonData(row, type) {
+        this.orderId = row.id
         this.operationType = type
-        console.log(row, type, 25)
         if (type == 'edit') {
           this.staffTitle = '编辑'
+          if (row.afterRectifyImg) {
+            var arr = row.afterRectifyImg.split(',')
+            var arr3 = []
+            arr.forEach((item, index) => {
+              var arr1 = {
+                url: '',
+              }
+              arr1.url = this.$baseUrl + item
+              arr3.push(arr1)
+            })
+            this.ruleForm.fileList = arr3
+          }
         } else {
           this.staffTitle = '详情'
+          this.pictureMatching('homeCheckImg', row.homeCheckImg)
+          this.pictureMatching('signImg', row.signImg)
+          this.pictureMatching('beforeRectifyImg', row.beforeRectifyImg)
+          this.pictureMatching('afterRectifyImg', row.afterRectifyImg)
         }
+        this.$set(this.ruleForm, 'state', row.state)
+        this.$set(this.ruleForm, 'remark', row.remark)
+        this.$set(this.ruleForm, 'name', row.customer.principalName)
+        this.$set(this.ruleForm, 'nickName', row.user.nickName)
+        this.checkEntry.forEach((item, index) => {
+          let arr = row.inspectExpandList
+          arr.forEach((item1, index1) => {
+            if (item.id == item1.inspectItem) {
+              item.value = item1.itemCode
+            }
+          })
+        })
         this.staffDialogVisible = true
       },
+      // 匹配图片
+      pictureMatching(type, value) {
+        this.formRuleList.forEach((item, index) => {
+          if (item.field == type) {
+            if (value) {
+              var arr = value.split(',')
+              item.options = arr
+            } else {
+              item.options = []
+            }
+          }
+        })
+      },
       changeSize(val) {
         this.Pagination.PageSize = val
+        this.getList()
       },
       changeCurrent(val) {
         this.Pagination.PageIndex = val
+        this.getList()
       },
     }
   }
@@ -94,20 +213,4 @@
   ::v-deep .el-dialog {
     margin-top: 8vh !important;
   }
-
-  .card_podia {
-    display: flex;
-  }
-
-  .seating_form_card {
-    width: 70%;
-  }
-
-  .seating_order {
-    width: 30%;
-  }
-
-  .card_seating_order {
-    margin: 0px 20px;
-  }
 </style>

+ 217 - 26
src/views/customer/orderProcessing.vue

@@ -1,7 +1,8 @@
 <template>
   <!-- 派单处理 -->
   <div>
-    <actionBar menuTitle="派单处理" :formList="formList"></actionBar>
+    <actionBar menuTitle="派单处理" :formList="formList" :ruleForm="searchRuleForm" @searchProtocol="searchProtocol">
+    </actionBar>
     <tables :key="Math.random()" :suspension="true" :tableList="tableList" :tableData="tableData"
       @buttonData="buttonData"></tables>
     <!-- 分页 -->
@@ -10,17 +11,33 @@
         @changeCurrent="changeCurrent">
       </pagination>
     </div>
-    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="70%" :close-on-click-modal="false">
-      <forms ref="childRules" :formNewList="formRuleList" labelWidth="100px"></forms>
-      <span slot="footer" class="dialog-footer">
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="70%" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px" labelPosition="left"
+        @changeSelect="changeSelect">
+      </forms>
+      <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
         <el-button plain @click="staffDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="staffDialogVisible = false">确 定</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">派 单</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
+  import {
+    getOrder,
+    getCustomer,
+    addCustomer,
+    addOrder,
+    getDelivery,
+    getSysuser,
+    cancelOrder,
+    orderDelivery
+  } from '@/api/order'
+  import {
+    getGoods,
+  } from '@/api/commodity'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
@@ -29,6 +46,9 @@
     formRules,
     employee
   } from "./sendOrders.js";
+  import {
+    urbanArea
+  } from '@/assets/js/districtCode'
   export default {
     components: {
       actionBar,
@@ -45,54 +65,225 @@
           PageSize: 10,
         },
         formList: [{
-          type: 'input',
+          type: 'picker',
           label: '订单时间',
-          field: 'T_name',
+          field: 'time',
           placeholder: '订单时间',
-          colWidth: 'el-col-24',
-        }, {
-          type: 'select',
-          label: '订单状态',
-          field: 'T_name',
-          placeholder: '订单状态',
-          colWidth: 'el-col-24',
         }, {
           type: 'input',
           label: '客户电话',
-          field: 'T_name',
+          field: 'phone',
           placeholder: '客户电话',
-          colWidth: 'el-col-24',
         }],
+        searchRuleForm: {
+          time: [],
+          phone: '',
+        },
         tableList: employee(),
-        tableData: [{
-          T_name: '2154'
-        }, {
-          T_name: '2154'
-        }, {
-          T_name: '2154'
-        }],
-        Total: 10,
+        tableData: [],
+        Total: 0,
         formRuleList: [],
+        ruleForm: {},
+        confirmLoading: false,
+        searchValue: {},
+        orderId: '',
+        operationType: '',
       }
     },
     mounted() {
       const dataList = formRules();
       this.formRuleList = dataList;
+      this.getList()
     },
     methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        if (value.time) {
+          this.searchValue.orderStartTime = value.time[0]
+          this.searchValue.orderEndTime = value.time[1]
+          delete this.searchValue.time
+        }
+        this.getList()
+      },
+      // 获取订单列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          state: 1,
+          ...this.searchValue
+        }
+        getOrder(params).then(res => {
+          // console.log(res,32)
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+            this.getDistributionStore()
+          }
+        })
+      },
+      // 派单
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          var params = {
+            id: this.orderId,
+            remark: this.ruleForm.remark,
+            storeId: Number(this.ruleForm.storeId),
+            userId: Number(this.ruleForm.userId),
+          }
+          orderDelivery(params).then((res) => {
+            if (res.code == 200) {
+              this.staffDialogVisible = false
+              this.getList()
+              this.$message({
+                message: res.msg,
+                type: 'success'
+              });
+            }
+          })
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
       buttonData(row, type) {
-        console.log(row, type, 25)
+        this.orderId = row.id
+        this.operationType = type
+        this.getAcquireGoods(row.goodsId)
+        this.$set(this.ruleForm, 'name', row.customer.principalName)
+        this.$set(this.ruleForm, 'phone', row.customer.principalPhone)
+        var arr1 = ''
+        var cityArr = urbanArea()
+        var city = this.cityScreening(row.customer.city, cityArr)
+        var area = this.cityScreening(row.customer.area, cityArr)
+        arr1 = city + area
+        this.$set(this.ruleForm, 'cityRegion', arr1)
+        this.$set(this.ruleForm, 'address', row.customer.address)
+        this.$set(this.ruleForm, 'quantity', row.quantity)
+        this.$set(this.ruleForm, 'remark', row.customer.remark)
+        if (row.storeId != 0) {
+          this.$set(this.ruleForm, 'storeId', String(row.storeId))
+          this.getCourier(row.storeId)
+          this.$set(this.ruleForm, 'userId', String(row.userId))
+        }
         if (type == 'logs') {
-          this.staffTitle = '编辑'
+          this.formRuleList.forEach((item, index) => {
+            item.disabled = true
+          })
+          this.staffTitle = '订单详情'
           this.staffDialogVisible = true
+        } else {
+          this.optionMatching([], 'userId')
+          this.staffTitle = '派单'
+          this.staffDialogVisible = true
+        }
+      },
+      // 城市筛选
+      cityScreening(value, list) {
+        function getChildById(parentArray, id) {
+          for (let i = 0; i < parentArray.length; i++) {
+            if (parentArray[i].value === id) { // 如果当前元素的ID与目标ID相等,则返回该元素
+              return parentArray[i];
+            } else if (parentArray[i].children && Array.isArray(parentArray[i].children)) { // 判断当前元素是否有子节点且类型为数组
+              const result = getChildById(parentArray[i].children, id); // 对子节点进行递归调用
+              if (result !== null) { // 若子节点存在结果,则返回该结果
+                return result;
+              }
+            }
+          }
+          return null; // 没有找到符合条件的元素时返回null
+        }
+        var name = getChildById(list, value)
+        if (name != null) {
+          return name.label
+        }
+      },
+      // 获取配送门店
+      getDistributionStore() {
+        getDelivery().then(res => {
+          // console.log(res, '门店')
+          if (res.code == 200) {
+            const arr = res.data
+            const childrenNav = flat(arr)
+            const arrList = []
+            childrenNav.forEach((item, index) => {
+              const commodity = {
+                label: item.name,
+                value: item.id,
+              }
+              arrList.push(commodity)
+            })
+            this.optionMatching(arrList, 'storeId')
+
+            function flat(arr) {
+              return [].concat(...arr.map(item => [].concat(item, ...flat(item.children))));
+            }
+          }
+        })
+      },
+      // 门店选择
+      changeSelect(row, field) {
+        if (field == 'storeId') {
+          this.getCourier(row)
         }
       },
+      // 获取配送员
+      getCourier(id) {
+        getSysuser({
+          storeId: id,
+        }).then(res => {
+          // console.log(res, '配送员')
+          if (res.code == 200) {
+            const arrList = []
+            const arr = res.data.list
+            arr.forEach((item, index) => {
+              const commodity = {
+                label: item.nickName,
+                value: item.id,
+              }
+              arrList.push(commodity)
+            })
+            this.optionMatching(arrList, 'userId')
+          }
+        })
+      },
+      // 获取商品
+      getAcquireGoods(goodsId) {
+        getGoods().then(res => {
+          if (res.code == 200) {
+            const arr = res.data.list
+            arr.forEach((item, index) => {
+              if (item.id == goodsId) {
+                this.$set(this.ruleForm, 'goodsId', item.name)
+              }
+            })
+          }
+        })
+      },
+      // 选项赋值
+      optionMatching(value, field) {
+        this.formRuleList.forEach((item, index) => {
+          if (item.field == field) {
+            item.options = value
+          }
+        })
+      },
       changeSize(val) {
         this.Pagination.PageSize = val
+        this.getList()
       },
       changeCurrent(val) {
         this.Pagination.PageIndex = val
+        this.getList()
       },
+      closeDialog() {
+        this.ruleForm = {}
+        this.formRuleList.forEach((item, index) => {
+          item.disabled = false
+        })
+        this.$refs.childRules.resetCheck();
+      }
     }
   }
 </script>

+ 132 - 70
src/views/customer/orderTable.js

@@ -1,75 +1,98 @@
 import {
   urbanArea
 } from '@/assets/js/districtCode'
+import {
+  orderStatus
+} from '@/assets/js/blockSort'
 export const employee = () => {
   return [{
     field: 'index',
     label: '编号',
     align: 'center',
   }, {
-    field: 'T_state',
+    field: 'state',
     operation: true,
     label: '状态',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
+    options: orderStatus(),
   }, {
-    field: 'T_connect',
+    field: 'customer.type',
     label: '客户类型',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '100px',
+    options: [{
+        label: '商户',
+        value: 0,
+      },
+      {
+        label: '私人',
+        value: 1,
+      }
+    ]
   }, {
-    field: 'T_connect',
+    field: 'customer.principalName',
     label: '客户名称',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
   }, {
-    field: 'T_connect',
+    field: 'customer.principalPhone',
     label: '客户电话',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '120px',
   }, {
-    field: 'T_connect',
+    field: 'address',
     label: '客户地址',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '230px',
   }, {
-    field: 'T_connect',
+    field: 'store.name',
     label: '配送门店',
     align: 'center',
     colWidth: '200px',
   }, {
-    field: 'T_connect',
+    field: 'user.nickName',
     label: '配送人员',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '120px',
   }, {
-    field: 'T_connect',
+    field: 'goods.name',
     label: '商品',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '120px',
+  }, {
+    field: 'spec.name',
+    label: '规格',
+    align: 'center',
+    colWidth: '100px',
   }, {
-    field: 'T_connect',
+    field: 'quantity',
     label: '数量',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '80px',
   }, {
-    field: 'T_connect',
+    field: 'orderTime',
     label: '下单时间',
     align: 'center',
     colWidth: '200px',
   }, {
     field: 'action',
     label: '操作',
-    colWidth: '200px',
+    colWidth: '280px',
     align: 'center',
     labelButton: [{
       type: 'logs',
       label: '查看',
       icon: 'el-icon-tickets',
-      // style: 'primary',
+      style: 'info',
+    }, {
+      type: 'edit',
+      label: '修改订单',
+      icon: 'el-icon-edit',
+      style: 'primary',
     }, {
       type: 'del',
-      label: '作废',
+      label: '取消订单',
       icon: 'el-icon-delete',
       style: 'danger',
     }]
@@ -78,7 +101,7 @@ export const employee = () => {
 
 export const formRules = () => {
   return [{
-    field: 'T_sn',
+    field: 'phone',
     label: '来电号码',
     placeholder: '来电号码',
     type: 'input',
@@ -89,7 +112,15 @@ export const formRules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_name',
+    label: '搜索客户信息',
+    type: 'search',
+    colWidth: 12,
+  }, {
+    label: '客户资料',
+    type: 'divider',
+    colWidth: 24,
+  }, {
+    field: 'type',
     label: '客户类型',
     placeholder: '客户类型',
     type: 'radio',
@@ -101,19 +132,66 @@ export const formRules = () => {
     }],
     options: [{
         label: '商户',
-        value: "1",
+        value: 0,
       },
       {
         label: '私人',
-        value: "2",
+        value: 1,
       }
     ]
   }, {
-    field: 'T_online',
+    field: 'name',
+    label: '名字',
+    placeholder: '名字',
+    type: 'input',
+    colWidth: 12,
+    labelWidth: '60px',
+    rules: [{
+      required: true,
+      message: '请输入名字',
+      trigger: 'change'
+    }],
+  }, {
+    field: 'cityRegion',
+    type: 'cascader',
+    label: '所在城市/地区',
+    placeholder: '请选择',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请选择所在城市/地区',
+      trigger: 'change'
+    }],
+    options: urbanArea(),
+  }, {
+    field: 'address',
+    label: '详细地址',
+    placeholder: '详细地址',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入详细地址',
+      trigger: 'change'
+    }],
+  }, {
+    field: 'remark',
+    label: '客户备注',
+    placeholder: '客户备注',
+    type: 'textarea',
+    colWidth: 24,
+  }, {
+    label: '下单信息',
+    type: 'divider',
+    colWidth: 24,
+  }, {
+    field: 'goodsId',
     type: 'select',
     label: '商品',
     placeholder: '请选择',
-    colWidth: 12,
+    colWidth: 8,
+    labelWidth: '60px',
+    multiple: false,
     rules: [{
       required: true,
       message: '请选择商品',
@@ -121,79 +199,63 @@ export const formRules = () => {
     }],
     options: [],
   }, {
-    field: 'CreateTime',
+    field: 'specId',
+    type: 'select',
+    label: '规格',
+    placeholder: '请选择',
+    colWidth: 8,
+    labelWidth: '60px',
+    rules: [{
+      required: true,
+      message: '请选择规格',
+      trigger: 'change'
+    }],
+    options: [],
+  }, {
+    field: 'quantity',
     label: '数量',
     placeholder: '数量',
     type: 'input',
-    colWidth: 12,
+    colWidth: 8,
+    labelWidth: '60px',
     rules: [{
       required: true,
       message: '请输入数量',
       trigger: 'blur'
     }]
   }, {
-    field: 'T_online',
+    field: 'storeId',
     type: 'select',
     label: '配送门店',
     placeholder: '请选择配送门店',
     colWidth: 12,
+    labelWidth: '90px',
     rules: [{
-      required: true,
+      required: false,
       message: '请选择配送门店',
       trigger: 'change'
     }],
     options: [],
   }, {
-    field: 'T_online',
+    field: 'userId',
     type: 'select',
     label: '配送员',
     placeholder: '请选择配送员',
     colWidth: 12,
+    labelWidth: '80px',
+    multiple: false,
     rules: [{
-      required: true,
+      required: false,
       message: '请选择配送员',
       trigger: 'change'
     }],
     options: [],
   }, {
-    field: 'T_sn',
+    field: 'orderNote',
     label: '备注',
-    placeholder: '备注',
+    placeholder: '订单备注',
     type: 'textarea',
+    labelWidth: '60px',
     colWidth: 24,
-  }, {
-    label: '客户资料',
-    type: 'divider',
-    colWidth: 24,
-  }, {
-    field: 'T_sn',
-    label: '名字',
-    placeholder: '名字',
-    type: 'input',
-    colWidth: 12,
-  }, {
-    field: 'T_sn',
-    label: '电话',
-    placeholder: '电话',
-    type: 'input',
-    colWidth: 12,
-  }, {
-    field: 'T_online',
-    type: 'cascader',
-    label: '所在城市/地区',
-    placeholder: '请选择',
-    colWidth: 24,
-    rules: [{
-      required: true,
-      message: '请选择所在城市/地区',
-      trigger: 'change'
-    }],
-    options: urbanArea(),
-  }, {
-    field: 'T_sn',
-    label: '详细地址',
-    placeholder: '详细地址',
-    type: 'input',
-    colWidth: 12,
-  }]
+  }, ]
 }

+ 25 - 39
src/views/customer/pigeonhole.js

@@ -11,15 +11,15 @@ export const formRules = () => {
     rules: [{
       required: true,
       message: '选择客户类型',
-      trigger: 'change'
+      trigger: 'change,blur'
     }],
     options: [{
         label: '商户',
-        value: "1",
+        value: 0,
       },
       {
         label: '私人',
-        value: "2",
+        value: 1,
       },
     ]
   }, {
@@ -45,7 +45,7 @@ export const formRules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_online',
+    field: 'cityRegion',
     type: 'cascader',
     label: '所在城市/地区',
     placeholder: '请选择',
@@ -53,7 +53,7 @@ export const formRules = () => {
     rules: [{
       required: true,
       message: '请选择所在城市/地区',
-      trigger: 'change'
+      trigger: 'change,blur'
     }],
     options: urbanArea(),
   }, {
@@ -68,43 +68,22 @@ export const formRules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'lng',
-    label: '经度',
-    placeholder: '经度',
-    type: 'input',
-    colWidth: 12,
-    rules: [{
-      required: true,
-      message: '请输入经度',
-      trigger: 'blur'
-    }]
-  }, {
-    field: 'lat',
-    label: '纬度',
-    placeholder: '纬度',
-    type: 'input',
-    colWidth: 12,
-    rules: [{
-      required: true,
-      message: '请输入纬度',
-      trigger: 'blur'
-    }]
-  }, {
     field: 'remark',
     label: '备注',
     placeholder: '备注',
     type: 'textarea',
     colWidth: 24,
   }, {
-    field: 'T_sn',
+    field: 'fileList',
     crosswise: true,
     label: '现场图片',
     type: 'upload',
-    colWidth: 6,
+    colWidth: 24,
     rules: [{
-      required: true,
+      type: 'array',
+      required: false,
       message: '请上传现场图片',
-      trigger: 'blur'
+      trigger: 'change,blur'
     }],
   }, ]
 }
@@ -130,22 +109,19 @@ export const employee = () => {
     label: '所在地市',
     align: 'center',
     colWidth: '130px',
+    options: urbanArea(),
   }, {
     field: 'area',
     label: '所属区/县',
     align: 'center',
     colWidth: '130px',
+    options: urbanArea(),
   }, {
     field: 'address',
     label: '地址',
     align: 'center',
     colWidth: '200px',
   }, {
-    field: 'addressImg',
-    label: '现场图片',
-    align: 'center',
-    colWidth: '200px',
-  }, {
     field: 'lng',
     label: '经度',
     align: 'center',
@@ -160,11 +136,21 @@ export const employee = () => {
     label: '类型',
     align: 'center',
     colWidth: '130px',
+    options: [{
+        bgcolor: '#409EFF',
+        label: '商户',
+        value: 0,
+      },
+      {
+        bgcolor: '#67C23A',
+        label: '私人',
+        value: 1,
+      },
+    ]
   }, {
     field: 'remark',
-    label: '备注描述',
+    label: '备注',
     align: 'center',
-    colWidth: '200px',
   }, {
     field: 'action',
     label: '操作',
@@ -179,7 +165,7 @@ export const employee = () => {
       type: 'logs',
       label: '查看',
       icon: 'el-icon-tickets',
-      // style: 'primary',
+      style: 'info',
     }, {
       type: 'del',
       label: '删除',

+ 49 - 82
src/views/customer/sendOrders.js

@@ -1,56 +1,69 @@
+import {
+  orderStatus
+} from '@/assets/js/blockSort'
 export const employee = () => {
   return [{
     field: 'index',
     label: '编号',
     align: 'center',
   }, {
-    field: 'T_state',
+    field: 'state',
     operation: true,
     label: '状态',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
+    options: orderStatus(),
   }, {
-    field: 'T_connect',
+    field: 'customer.type',
     label: '客户类型',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
+    options: [{
+        label: '商户',
+        value: 0,
+      },
+      {
+        label: '私人',
+        value: 1,
+      }
+    ]
   }, {
-    field: 'T_connect',
+    field: 'customer.principalName',
     label: '客户名称',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
   }, {
-    field: 'T_connect',
+    field: 'customer.principalPhone',
     label: '客户电话',
     align: 'center',
     colWidth: '200px',
   }, {
-    field: 'T_connect',
+    field: 'address',
     label: '客户地址',
     align: 'center',
     colWidth: '200px',
   }, {
-    field: 'T_connect',
+    field: 'store.name',
     label: '配送门店',
     align: 'center',
     colWidth: '200px',
   }, {
-    field: 'T_connect',
+    field: 'user.nickName',
     label: '配送人员',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
   }, {
-    field: 'T_connect',
+    field: 'goods.name',
     label: '商品',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
   }, {
-    field: 'T_connect',
+    field: 'quantity',
     label: '数量',
     align: 'center',
-    colWidth: '200px',
+    colWidth: '150px',
   }, {
-    field: 'T_connect',
+    field: 'orderTime',
     label: '下单时间',
     align: 'center',
     colWidth: '200px',
@@ -68,7 +81,7 @@ export const employee = () => {
       type: 'logs',
       label: '查看',
       icon: 'el-icon-tickets',
-      // style: 'primary',
+      style: 'info',
     }, ]
   }]
 }
@@ -78,63 +91,45 @@ export const formRules = () => {
     label: '客户信息',
     type: 'divider',
     colWidth: 24,
-  },{
+  }, {
     field: 'name',
     label: '名字:',
     type: 'descriptions',
     colWidth: 12,
-  },{
-    field: 'CreateTime',
+  }, {
+    field: 'phone',
     label: '电话:',
     type: 'descriptions',
     colWidth: 12,
-  },{
-    field: 'CreateTime',
-    label: '所在城市:',
-    type: 'descriptions',
-    colWidth: 12,
-  },{
-    field: 'CreateTime',
+  }, {
+    field: 'cityRegion',
     label: '所属区/县:',
     type: 'descriptions',
     colWidth: 12,
-  },{
-    field: 'CreateTime',
+  }, {
+    field: 'address',
     label: '地址:',
     type: 'descriptions',
     colWidth: 12,
-  },{
+  }, {
     type: 'dividingSlot',
     colWidth: 24,
-  },{
+  }, {
     label: '订单信息',
     type: 'divider',
     colWidth: 24,
   }, {
-    field: 'T_online',
-    type: 'select',
-    label: '商品',
-    placeholder: '请选择',
+    field: 'goodsId',
+    label: '商品:',
+    type: 'descriptions',
     colWidth: 12,
-    rules: [{
-      required: true,
-      message: '请选择商品',
-      trigger: 'change'
-    }],
-    options: [],
   }, {
-    field: 'CreateTime',
-    label: '数量',
-    placeholder: '数量',
-    type: 'input',
+    field: 'quantity',
+    label: '数量:',
+    type: 'descriptions',
     colWidth: 12,
-    rules: [{
-      required: true,
-      message: '请输入数量',
-      trigger: 'blur'
-    }]
   }, {
-    field: 'T_online',
+    field: 'storeId',
     type: 'select',
     label: '配送门店',
     placeholder: '请选择配送门店',
@@ -146,7 +141,7 @@ export const formRules = () => {
     }],
     options: [],
   }, {
-    field: 'T_online',
+    field: 'userId',
     type: 'select',
     label: '配送员',
     placeholder: '请选择配送员',
@@ -158,38 +153,10 @@ export const formRules = () => {
     }],
     options: [],
   }, {
-    field: 'T_sn',
+    field: 'remark',
     label: '备注',
     placeholder: '备注',
     type: 'textarea',
     colWidth: 24,
-  }, {
-    field: 'T_name',
-    label: '状态',
-    placeholder: '状态',
-    type: 'radio',
-    colWidth: 24,
-    rules: [{
-      required: true,
-      message: '选择订单状态',
-      trigger: 'change'
-    }],
-    options: [{
-        label: '已下单',
-        value: "1",
-      },
-      {
-        label: '已派单',
-        value: "2",
-      },
-      {
-        label: '已完成',
-        value: "3",
-      },
-      {
-        label: '已作废',
-        value: "4",
-      }
-    ]
-  }, ]
+  }]
 }

+ 114 - 0
src/views/manufacture/aerationInspection.vue

@@ -0,0 +1,114 @@
+<template>
+  <!-- 充气前后检查 -->
+  <div>
+    <actionBar menuTitle="充气前后检查" :formList="formList" :ruleForm="searchRuleForm" @searchProtocol="searchProtocol">
+    </actionBar>
+    <tables :key="Math.random()" :suspension="true" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="60%" :close-on-click-modal="false">
+      <forms ref="childRules" labelPosition="left" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="190px">
+      </forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="staffDialogVisible = false">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getFillCheck
+  } from '@/api/inspection'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./examine.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        formList: [{
+          type: 'input',
+          label: '单位内编码',
+          field: 'innerCode',
+          placeholder: '单位内编码',
+        }, ],
+        searchRuleForm: {
+          innerCode: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        formRuleList: [],
+        staffTitle: '查看',
+        staffDialogVisible: false,
+        formRuleList: [],
+        searchValue: {},
+        ruleForm: {},
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取充气前后检查列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getFillCheck(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      buttonData(row, type) {
+        this.operationType = type
+        // console.log(row, type, 25)
+        this.staffTitle = '充装前后检查'
+        this.staffDialogVisible = true
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 49 - 22
src/views/manufacture/carTable.js

@@ -1,54 +1,65 @@
 export const tableRules = () => {
   return [{
-    field: 'T_name',
+    field: 'provCarInfo.carNo',
     label: '车牌号',
     colWidth: '150',
     align: 'center',
   }, {
-    field: 'T_tab',
+    field: 'provCarInfo.transportTime',
     label: '道路运输证有效期',
     colWidth: '150',
     align: 'center',
   }, {
-    field: 'T_type',
+    field: 'provCarInfo.carNumber',
     label: '道路运输证编号',
     colWidth: '150',
     align: 'center',
   }, {
-    field: 'T_read',
+    field: 'provCarInfo.carLoadage',
     label: '车辆核定载货量',
     colWidth: '150',
     align: 'center',
   }, {
-    field: 'T_filter',
+    field: 'provCarInfo.carNvq',
     label: '车辆资格证',
     colWidth: '150',
     align: 'center',
   }, {
-    field: 'T_save',
+    field: 'provCarInfo.typeTransport',
     label: '车辆运输类型',
     colWidth: '150',
     align: 'center',
   }, {
-    field: 'extend',
+    field: 'provCarInfo.businessName',
     label: '业户名称',
+    colWidth: '150',
     align: 'center',
   }, {
-    field: 'T_save',
+    field: 'provCarInfo.contactNumber',
     label: '联系电话',
     colWidth: '150',
     align: 'center',
   }, {
-    field: 'T_save',
+    field: 'provCarInfo.issueAuthority',
     label: '发证机关',
-    colWidth: '150',
+    colWidth: '200',
+    align: 'center',
+  }, {
+    field: 'truckUserCarInfo.user.nickName',
+    label: '绑定司机',
+    colWidth: '200',
     align: 'center',
   }, {
     field: 'action',
     label: '操作',
-    colWidth: '400px',
+    colWidth: '240px',
     align: 'center',
     labelButton: [{
+      type: 'binding',
+      label: '绑定司机',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
       type: 'edit',
       label: '编辑',
       icon: 'el-icon-edit',
@@ -64,7 +75,7 @@ export const tableRules = () => {
 
 export const rules = () => {
   return [{
-    field: 'T_sn',
+    field: 'carNo',
     label: '车牌号',
     placeholder: '车牌号',
     type: 'input',
@@ -75,19 +86,19 @@ export const rules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_sn',
+    field: 'transportTime',
     label: '道路运输证有效期',
     placeholder: '道路运输证有效期',
     type: 'time',
     colWidth: 12,
     rules: [{
-      type: 'date',
+      type: 'string',
       required: true,
       message: '请选择道路运输证有效期',
-      trigger: 'change'
+      trigger: 'blur,change'
     }]
   }, {
-    field: 'T_sn',
+    field: 'carNumber',
     label: '道路运输证编号',
     placeholder: '道路运输证编号',
     type: 'input',
@@ -98,7 +109,7 @@ export const rules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_sn',
+    field: 'carLoadage',
     label: '车辆核定载货量',
     placeholder: '车辆核定载货量',
     type: 'input',
@@ -109,7 +120,7 @@ export const rules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_sn',
+    field: 'carNvq',
     label: '车辆资格证',
     placeholder: '车辆资格证',
     type: 'input',
@@ -120,7 +131,7 @@ export const rules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_sn',
+    field: 'typeTransport',
     label: '车辆运输类型',
     placeholder: '车辆运输类型',
     type: 'input',
@@ -131,7 +142,7 @@ export const rules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_sn',
+    field: 'businessName',
     label: '业户名称',
     placeholder: '业户名称',
     type: 'input',
@@ -142,7 +153,7 @@ export const rules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_sn',
+    field: 'contactNumber',
     label: '联系电话',
     placeholder: '联系电话',
     type: 'input',
@@ -153,7 +164,7 @@ export const rules = () => {
       trigger: 'blur'
     }]
   }, {
-    field: 'T_sn',
+    field: 'issueAuthority',
     label: '发证机关',
     placeholder: '发证机关',
     type: 'input',
@@ -165,3 +176,19 @@ export const rules = () => {
     }]
   }, ]
 }
+export const vehicle = () => {
+  return [{
+    field: 'userId',
+    type: 'searchSelect',
+    label: '货车司机',
+    placeholder: '请选择货车司机',
+    colWidth: 24,
+    labelWidth: '80px',
+    rules: [{
+      required: true,
+      message: '请选择货车司机',
+      trigger: 'change'
+    }],
+    options: [],
+  }, ]
+}

+ 285 - 0
src/views/manufacture/cylinder.js

@@ -0,0 +1,285 @@
+import {
+  neurogen,
+  attribution,
+  cylinderCondition,
+  havenot,
+  remould,
+  missing,
+  statisticalState
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '编号',
+    align: 'center',
+  }, {
+    field: 'inner_code',
+    label: '单位内编号',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'pro_variety',
+    operation: true,
+    label: '设备品种',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'pro_name',
+    label: '产品名称',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'pro_no',
+    label: '气瓶生产编号',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'fill_media',
+    label: '充装介质',
+    align: 'center',
+    colWidth: '200px',
+    options: neurogen(),
+  }, {
+    field: 'make_unit',
+    label: '制造单位',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'make_time',
+    label: '生产日期',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'work_pressure',
+    label: '公称工作压力(MPa)',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'volume',
+    label: '容积(L)',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'check_time',
+    label: '最近一次检验日日期',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'next_check_time',
+    label: '下次检验日期',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'pro_uuid',
+    label: '产品唯一性编码',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'deadline_time',
+    label: '使用年限',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'check_in_time',
+    label: '录入日期',
+    align: 'center',
+    colWidth: '200px',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '100px',
+    align: 'center',
+    labelButton: [{
+      type: 'logs',
+      label: '查看',
+      icon: 'el-icon-tickets',
+      style: 'info',
+    }]
+  }]
+}
+export const formRules = () => {
+  return [{
+    field: 'pro_variety',
+    label: '设备品种 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'pro_name',
+    label: '产品名称 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'pro_no',
+    label: '气瓶生产编号 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'fill_media',
+    label: '充装介质 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: neurogen(),
+  }, {
+    field: 'make_unit',
+    label: '制造单位 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'make_time',
+    type: '生产日期 :',
+    label: '商品',
+    colWidth: 12,
+  }, {
+    field: 'work_pressure',
+    label: '公称工作压力(MPa)',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'volume',
+    type: 'descriptions',
+    label: '容积(L)',
+    colWidth: 12,
+  }, {
+    field: 'check_time',
+    type: 'descriptions',
+    label: '最近一次检验日日期 :',
+    colWidth: 12,
+  }, {
+    field: 'next_check_time',
+    label: '下次检验日期 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'regist_code',
+    label: '气瓶使用登记代码 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'change_event',
+    label: '变更情况 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'memo',
+    label: '备注 :',
+    type: 'descriptions',
+    colWidth: 24,
+  }, {
+    field: 'inner_code',
+    label: '单位内编号 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'stamp_make_unit',
+    label: '气瓶钢印制造单位名称 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'pro_uuid',
+    label: '产品唯一性编码 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'chip_id',
+    label: '芯片id :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'location',
+    label: '归属地 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: attribution(),
+  }, {
+    field: 'status',
+    label: '气瓶状态 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: cylinderCondition(),
+  }, {
+    field: 'check_organization',
+    label: '检测机构 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'empty_bottle',
+    label: '是否空瓶 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: havenot(),
+  }, {
+    field: 'uid',
+    label: '高频编码 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'tid',
+    label: '超高频编码 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'chip_status',
+    label: '是否改造 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: remould(),
+  }, {
+    field: 'is_lose',
+    label: '是否丢失 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: missing(),
+  }, {
+    field: 'old_bottle',
+    label: '是否旧瓶 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: havenot(),
+  }, {
+    field: 'design_thickness',
+    label: '设计壁厚 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'result_code',
+    label: '检测结果 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'audit_remark',
+    label: '审批备注 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'deadline_time',
+    label: '使用年限 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'check_in_time',
+    label: '录入日期 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'scrap_time',
+    label: '报废日期 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'analysis_status',
+    label: '统计状态值 :',
+    type: 'prdfterence',
+    colWidth: 12,
+    options: statisticalState(),
+  }, {
+    field: 'operation_id',
+    label: '操作人 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'operation_time',
+    label: '操作时间 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, ]
+}

+ 117 - 2
src/views/manufacture/cylinderFile.vue

@@ -1,10 +1,125 @@
 <template>
   <!-- 钢瓶档案 -->
-  <div>钢瓶档案</div>
+  <div>
+    <actionBar menuTitle="钢瓶档案" :formList="formList" :ruleForm="searchRuleForm" @searchProtocol="searchProtocol">
+    </actionBar>
+    <tables :key="Math.random()" :suspension="true" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
+      element-loading-background="rgba(0, 0, 0, 0.8)" :title="staffTitle" :visible.sync="staffDialogVisible" width="60%"
+      :close-on-click-modal="false">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="180px"></forms>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+  import {
+    getGasCylinder,
+    getGasCylinderDetails
+  } from '@/api/inspection'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./cylinder.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        formList: [{
+          type: 'input',
+          label: '单位内编号',
+          field: 'innerCode',
+          placeholder: '单位内编号',
+        },],
+        searchRuleForm: {
+          innerCode: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        formRuleList: [],
+        staffTitle: '查看',
+        staffDialogVisible: false,
+        formRuleList: [],
+        searchValue: {},
+        ruleForm: {},
+        loading: false,
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取钢瓶档案列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getGasCylinder(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      // 获取钢瓶档案详情
+      getDetails(innerCode) {
+        this.loading = true
+        getGasCylinderDetails(innerCode).then(res => {
+          if (res.code == 200) {
+            this.ruleForm = res.data
+          }
+          this.loading = false
+        })
+      },
+      buttonData(row, type) {
+        this.operationType = type
+        if (type == 'logs') {
+          this.staffTitle = '详情'
+          this.getDetails(row.inner_code)
+        }
+        this.staffDialogVisible = true
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+    }
+  }
 </script>
 
-<style>
+<style lang="scss" scoped>
 </style>

+ 210 - 0
src/views/manufacture/cylinderSpecification.vue

@@ -0,0 +1,210 @@
+<template>
+  <!-- 钢瓶规格 -->
+  <div>
+    <actionBar menuTitle="钢瓶规格" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel" @searchProtocol="searchProtocol"></actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px"></forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getCylinder,
+    getCylinderDetails,
+    addCylinder,
+    putCylinder,
+    delCylinder,
+  } from '@/api/specification'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./specification.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '名称',
+          field: 'name',
+          placeholder: '名称',
+        }],
+        searchRuleForm: {
+          name: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
+        formRuleList: [],
+        operationType: '',
+        searchValue: {},
+        ruleForm: {},
+        enterpriseId: null,
+        confirmLoading: false,
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取商品列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getCylinder(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      openModel(type) {
+        this.operationType = type
+        if (type == 'add') {
+          this.staffTitle = '添加'
+        }
+        this.staffDialogVisible = true
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          this.confirmLoading = true
+          if (this.operationType == 'add') {
+            var params = {
+              ...this.ruleForm
+            }
+            addCylinder(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          } else if (this.operationType == 'edit') {
+            this.editItem()
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      editItem() {
+        var params = {
+          id: this.enterpriseId,
+          name: this.ruleForm.name,
+          remark: this.ruleForm.remark,
+        }
+        putCylinder(params).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.getList()
+          }
+          this.staffDialogVisible = false
+          this.confirmLoading = false
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+      },
+      // 删除
+      deleteItem(id) {
+        this.$confirm('此操作将永久删除该商品, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delCylinder({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      buttonData(row, type) {
+        this.enterpriseId = row.id
+        this.operationType = type
+        if (type == 'edit') {
+          this.staffDialogVisible = true
+          this.staffTitle = '编辑'
+          this.ruleForm = JSON.parse(JSON.stringify(row))
+        } else if (type == 'del') {
+          this.deleteItem(row.id)
+        }
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      closeDialog() {
+        this.ruleForm = {}
+        this.$refs.childRules.resetCheck();
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 58 - 0
src/views/manufacture/entrepot.js

@@ -0,0 +1,58 @@
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'name',
+    operation: true,
+    label: '名称',
+    align: 'center',
+  }, {
+    field: 'address',
+    label: '地址',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '200px',
+    align: 'center',
+    labelButton: [{
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-tickets',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'name',
+    label: '名称',
+    placeholder: '名称',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入名称',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'address',
+    label: '地址',
+    placeholder: '地址',
+    type: 'textarea',
+    colWidth: 24,
+    rules: [{
+      required: false,
+      message: '请输入地址',
+      trigger: 'blur'
+    }]
+  }, ]
+}

+ 307 - 0
src/views/manufacture/equipment.vue

@@ -0,0 +1,307 @@
+<template>
+  <!-- 设备管理 -->
+  <div>
+    <actionBar menuTitle="设备管理" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel" @searchProtocol="searchProtocol"></actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px"
+        @handleScroll="handleScroll" @remoteMethod="remoteMethod"></forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getUser
+  } from '@/api/user'
+  import {
+    getCylinder,
+    addCylinder,
+    putCylinder,
+    delCylinder,
+  } from '@/api/facility'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./facility.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: 'SN',
+          field: 'sn',
+          placeholder: 'SN',
+        }],
+        searchRuleForm: {
+          sn: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
+        formRuleList: [],
+        operationType: '',
+        searchValue: {},
+        ruleForm: {
+          sn: '',
+          type: 1,
+          optType: '',
+          provUserId: '',
+        },
+        enterpriseId: null,
+        confirmLoading: false,
+        page: 1,
+        staffName: '',
+        limitNo: true,
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 获取用户列表
+      getUserList() {
+        var params = {
+          page: this.page,
+          pageSize: 10,
+          name: this.staffName,
+        }
+        getUser(params).then(res => {
+          if (res.code == 200) {
+            let arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.nickName
+              arrData.value = item1.provUserId
+              arrList.push(arrData)
+            })
+            if (this.limitNo == true) {
+              this.formRuleList.forEach(item => {
+                if (item.type == 'searchSelect') {
+                  item.options = item.options.concat(arrList);
+                  let some = [];
+                  item.options.forEach(el => {
+                    if (!some.some(e => e.value == el.value)) {
+                      some.push(el)
+                    }
+                  })
+                  item.options = some
+                }
+              })
+            }
+            if (arrList.length >= 10) {
+              this.page = ++this.page;
+            } else {
+              // 已经没数据了 不需要增加数据
+              this.limitNo = false;
+            }
+          }
+        })
+      },
+      // 触底事件
+      handleScroll() {
+        if (this.limitNo) {
+          this.getUserList()
+        }
+      },
+      // 重置选择员工
+      resetSelect() {
+        this.formRuleList.forEach(item => {
+          if (item.type == 'searchSelect') {
+            item.options = []
+          }
+        })
+        this.page = 1
+        this.limitNo = true
+        this.staffName = ''
+      },
+      // 搜索
+      remoteMethod(value) {
+        this.resetSelect()
+        this.staffName = value
+        this.getUserList()
+      },
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取设备列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getCylinder(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      openModel(type) {
+        this.operationType = type
+        if (type == 'add') {
+          this.staffTitle = '添加'
+          this.ruleForm.type = 1
+        }
+        this.resetSelect()
+        this.getUserList()
+        this.staffDialogVisible = true
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          this.confirmLoading = true
+          if (this.operationType == 'add') {
+            var params = {
+              ...this.ruleForm
+            }
+            addCylinder(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          } else if (this.operationType == 'edit') {
+            this.editItem()
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      editItem() {
+        var params = {
+          id: this.enterpriseId,
+          ...this.ruleForm
+        }
+        putCylinder(params).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.getList()
+          }
+          this.staffDialogVisible = false
+          this.confirmLoading = false
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+      },
+      // 删除
+      deleteItem(id) {
+        this.$confirm('此操作将永久删除该商品, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delCylinder({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      buttonData(row, type) {
+        this.enterpriseId = row.id
+        this.operationType = type
+        if (type == 'edit') {
+          this.resetSelect()
+          this.staffDialogVisible = true
+          this.staffTitle = '编辑'
+          const arrList = JSON.parse(JSON.stringify(row))
+          this.$nextTick(() => {
+            this.ruleForm.sn = arrList.sn
+            this.ruleForm.type = arrList.type
+            this.ruleForm.optType = arrList.optType
+            this.ruleForm.provUserId = arrList.provUserId
+            this.formRuleList.forEach(item => {
+              if (item.type == 'searchSelect') {
+                const arrData = {
+                  label: null,
+                  value: null,
+                }
+                arrData.label = arrList.user.nickName
+                arrData.value = arrList.user.provUserId
+                item.options.push(arrData)
+              }
+            })
+            this.getUserList()
+          })
+        } else if (type == 'del') {
+          this.deleteItem(row.id)
+        }
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      closeDialog() {
+        this.$refs['childRules'].resetCheck();
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 439 - 0
src/views/manufacture/examine.js

@@ -0,0 +1,439 @@
+import {
+  whether,
+  intact,
+  normal
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+      field: 'index',
+      label: '编号',
+      align: 'center',
+    }, {
+      field: 'operationLogId',
+      label: '操作编码',
+      align: 'center',
+      colWidth: '200px',
+    },
+    // {
+    //   field: 'storeId',
+    //   label: '所属单位',
+    //   align: 'center',
+    //   colWidth: '200px',
+    // },
+    {
+      field: 'innerCode',
+      label: '单位内编号',
+      align: 'center',
+      colWidth: '200px',
+    }, {
+      field: 'deadWeight',
+      label: '气瓶自重(kg)',
+      align: 'center',
+      colWidth: '200px',
+    }, {
+      field: 'color',
+      label: '颜色',
+      align: 'center',
+      colWidth: '100px',
+    }, {
+      field: 'corrosion',
+      label: '是否腐蚀',
+      align: 'center',
+      colWidth: '100px',
+      options: whether(),
+    }, {
+      field: 'crackle',
+      label: '是否有裂纹',
+      align: 'center',
+      colWidth: '100px',
+      options: whether(),
+    }, {
+      field: 'deform',
+      label: '是否变形',
+      align: 'center',
+      colWidth: '100px',
+      options: whether(),
+    }, {
+      field: 'damage',
+      label: '是否有损伤',
+      align: 'center',
+      colWidth: '100px',
+      options: whether(),
+    }, {
+      field: 'safeAnnex',
+      label: '安全附件完好',
+      align: 'center',
+      colWidth: '100px',
+      options: intact(),
+    }, {
+      field: 'gasPressure',
+      label: '余压正常(或抽真空)',
+      align: 'center',
+      colWidth: '120px',
+      options: normal(),
+    }, {
+      field: 'pipePressure',
+      label: '充装管道压力(MPa)',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'bodyDeform',
+      label: '瓶体有无变形',
+      align: 'center',
+      colWidth: '100px',
+      options: whether(),
+    }, {
+      field: 'fillingLeak',
+      label: '充装过程有无泄漏',
+      align: 'center',
+      colWidth: '100px',
+      options: whether(),
+    }, {
+      field: 'bodyTemperature',
+      label: '瓶体温度正常',
+      align: 'center',
+      colWidth: '100px',
+      options: normal(),
+    }, {
+      field: 'fillWeight',
+      label: '充装重量(kg)',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'repeatWeight',
+      label: '复称重量(kg)',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'filledLeak',
+      label: '充装后有无泄漏',
+      align: 'center',
+      colWidth: '100px',
+      options: whether(),
+    }, {
+      field: 'warnSign',
+      label: '警示标志完好',
+      align: 'center',
+      colWidth: '100px',
+      options: intact(),
+    }, {
+      field: 'fillLabel',
+      label: '充装标签完好',
+      align: 'center',
+      colWidth: '100px',
+      options: intact(),
+    }, {
+      field: 'seal',
+      label: '封口完好',
+      align: 'center',
+      colWidth: '100px',
+      options: intact(),
+    }, {
+      field: 'nickName',
+      label: '操作员',
+      align: 'center',
+      colWidth: '120px',
+    }
+  ]
+}
+export const formRules = () => {
+  return [{
+    field: 'pro_variety',
+    label: '单位内编号 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'pro_name',
+    label: '气瓶自重 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'pro_no',
+    label: '颜色 :',
+    type: 'descriptions',
+    colWidth: 12,
+  }, {
+    field: 'T_sn',
+    label: '1、充装管道压力',
+    placeholder: '充装管道压力',
+    type: 'input',
+    colWidth: 12,
+    unit: 'MPa',
+    rules: [{
+      required: true,
+      message: '请输入充装管道压力',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'T_sn',
+    label: '2、充装重量',
+    placeholder: '充装重量',
+    type: 'input',
+    colWidth: 12,
+    unit: 'kg',
+    rules: [{
+      required: true,
+      message: '请输入充装重量',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'T_sn',
+    label: '3、复称重量',
+    placeholder: '复称重量',
+    type: 'input',
+    colWidth: 12,
+    unit: 'kg',
+    rules: [{
+      required: true,
+      message: '请输入复称重量',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'T_name',
+    label: '4、是否腐蚀',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择是否腐蚀',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '5、是否有裂纹',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择是否有裂纹',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '6、是否变形',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择是否变形',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '7、是否有损伤',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择是否有损伤',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '8、安全附件完好',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择安全附件完好状态',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '9、余压正常(或抽真空)',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择余压状态',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '正常',
+        value: "1",
+      },
+      {
+        label: '不正常',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '10、瓶体有无变形',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择瓶体有无变形',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '11、充装过程有无泄漏',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择充装过程有无泄漏',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '12、瓶体温度正常',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择瓶体温度正常状态',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '正常',
+        value: "1",
+      },
+      {
+        label: '不正常',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '13、充装后有无泄漏',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择充装后有无泄漏',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '无',
+        value: "1",
+      },
+      {
+        label: '有',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '14、警示标志完好',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择警示标志完好状态',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '完好',
+        value: "1",
+      },
+      {
+        label: '缺失',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '15、充装标签完好',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择充装标签完好状态',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '完好',
+        value: "1",
+      },
+      {
+        label: '缺失',
+        value: "2",
+      }
+    ]
+  }, {
+    field: 'T_name',
+    label: '16、封口完好',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请选择封口完好状态',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '完好',
+        value: "1",
+      },
+      {
+        label: '缺失',
+        value: "2",
+      }
+    ]
+  }, ]
+}

+ 99 - 0
src/views/manufacture/facility.js

@@ -0,0 +1,99 @@
+import {
+  process
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'sn',
+    operation: true,
+    label: 'SN',
+    align: 'center',
+  }, {
+    field: 'optType',
+    label: '类型',
+    align: 'center',
+    options: process(),
+  }, {
+    field: 'user.nickName',
+    label: '关联人员',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '200px',
+    align: 'center',
+    labelButton: [{
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-tickets',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'sn',
+    label: 'SN',
+    placeholder: '请输入SN',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入SN',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'type',
+    label: '类型',
+    placeholder: '类型',
+    type: 'radio',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '选择设备类型',
+      trigger: 'change'
+    }],
+    options: [{
+        label: '手持枪',
+        value: 1,
+      },
+      {
+        label: '龙门',
+        value: 2,
+      }
+    ]
+  }, {
+    field: 'optType',
+    type: 'select',
+    label: '关键步骤',
+    placeholder: '请选择关键步骤',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请选择关键步骤',
+      trigger: 'change'
+    }],
+    options: process(),
+  }, {
+    field: 'provUserId',
+    type: 'searchSelect',
+    label: '关联人员',
+    placeholder: '请选择关联人员',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请选择关联人员',
+      trigger: 'change'
+    }],
+    options: [],
+  }, ]
+}

+ 108 - 0
src/views/manufacture/filling.js

@@ -0,0 +1,108 @@
+import {
+  neurogen
+} from '@/assets/js/blockSort'
+import {
+  urbanArea
+} from '@/assets/js/districtCode'
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '编号',
+    align: 'center',
+  }, {
+    field: 'station.name',
+    operation: true,
+    label: '充装气站',
+    align: 'center',
+  }, {
+    field: 'company.name',
+    label: '充装企业',
+    align: 'center',
+  }, {
+    field: 'area',
+    label: '所在区',
+    align: 'center',
+    options: urbanArea(),
+  }, {
+    field: 'city',
+    label: '所在市',
+    align: 'center',
+    options: urbanArea(),
+  }, {
+    field: 'user.nickName',
+    label: '充装人员',
+    align: 'center',
+  }, {
+    field: 'tbFillData.innerCode',
+    label: '气瓶单位内编码',
+    align: 'center',
+  }, {
+    field: 'tbFillData.chipId',
+    label: '高频编码',
+    align: 'center',
+  }, {
+    field: 'tbFillData.productId',
+    label: '产品类型',
+    align: 'center',
+  }, {
+    field: 'tbFillData.productMediaId',
+    label: '充装介质',
+    align: 'center',
+    colWidth: '100px',
+    options: neurogen(),
+  }, {
+    field: 'tbFillData.fillTime',
+    label: '充装时间',
+    align: 'center',
+    colWidth: '170px',
+  }, {
+    field: 'tbFillData.createTime',
+    label: '创建时间',
+    align: 'center',
+    colWidth: '170px',
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'T_sn',
+    label: '充装枪编号',
+    placeholder: '充装枪编号',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入充装枪编号',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'T_sn',
+    label: '芯片编号',
+    placeholder: '芯片编号',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入芯片编号',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'T_online',
+    type: 'select',
+    label: '充装人员',
+    placeholder: '请选择',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请选择充装人员',
+      trigger: 'change'
+    }],
+    options: [],
+  }, {
+    field: 'T_sn',
+    label: '备注',
+    placeholder: '地址',
+    type: 'textarea',
+    colWidth: 24,
+  }, ]
+}

+ 85 - 0
src/views/manufacture/fillingGun.js

@@ -0,0 +1,85 @@
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'gunCode',
+    operation: true,
+    label: '充装枪编号',
+    align: 'center',
+  }, {
+    field: 'scanGunCode',
+    label: '扫描枪编号',
+    align: 'center',
+  }, {
+    field: 'personCode',
+    label: '充装人员',
+    align: 'center',
+    options: [],
+  }, {
+    field: 'remark',
+    label: '备注',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '200px',
+    align: 'center',
+    labelButton: [{
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-tickets',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'gunCode',
+    label: '充装枪编号',
+    placeholder: '充装枪编号',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入充装枪编号',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'scanGunCode',
+    label: '扫描枪编号',
+    placeholder: '扫描枪编号',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入扫描枪编号',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'personCode',
+    type: 'select',
+    label: '充装人员',
+    placeholder: '请选择',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请选择充装人员',
+      trigger: 'change'
+    }],
+    options: [],
+  }, {
+    field: 'remark',
+    label: '备注',
+    placeholder: '备注',
+    type: 'textarea',
+    colWidth: 24,
+  }, ]
+}

+ 252 - 0
src/views/manufacture/loadingGun.vue

@@ -0,0 +1,252 @@
+<template>
+  <!-- 充装枪管理 -->
+  <div>
+    <actionBar menuTitle="充装枪管理" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel" @searchProtocol="searchProtocol"></actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px"></forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getUser
+  } from '@/api/user'
+  import {
+    getFillGun,
+    getFillGunDetails,
+    addFillGun,
+    putFillGun,
+    delFillGun
+  } from '@/api/filling'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./fillingGun.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [ {
+          type: 'input',
+          label: '充装枪编号',
+          field: 'gunCode',
+          placeholder: '请输入充装枪编号',
+        },{
+          type: 'input',
+          label: '扫描枪编号',
+          field: 'scanGunCode',
+          placeholder: '请输入扫描枪编号',
+        }, {
+          type: 'select',
+          label: '充装人员',
+          field: 'personCode',
+          placeholder: '充装人员',
+          options: [],
+        }],
+        searchRuleForm: {
+          gunCode: '',
+          scanGunCode: '',
+          personCode: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
+        formRuleList: [],
+        ruleForm: {},
+        operationType: '',
+        searchValue: {},
+        confirmLoading: false,
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取订单列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getFillGun(params).then(res => {
+          // console.log(res,32)
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+            this.fillingPersonnel()
+          }
+        })
+      },
+      openModel(type) {
+        if (type == 'add') {
+          this.staffTitle = '添加'
+        }
+        this.staffDialogVisible = true
+      },
+      // 添加充装枪
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          this.confirmLoading = true
+          if (this.operationType == 'edit') {
+            this.ruleForm['id'] = this.fillingId
+            putFillGun(this.ruleForm).then(res => {
+              if (res.code == 200) {
+                this.getList()
+                this.staffDialogVisible = false
+                this.confirmLoading = false
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+              }
+            })
+          } else {
+            addFillGun(this.ruleForm).then(res => {
+              if (res.code == 200) {
+                this.getList()
+                this.staffDialogVisible = false
+                this.confirmLoading = false
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+              }
+            })
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      // 获取充装人员
+      fillingPersonnel() {
+        getUser({
+          userType: 5,
+        }).then(res => {
+          if (res.code == 200) {
+            let arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.nickName
+              arrData.value = item1.provUserId
+              arrList.push(arrData)
+            })
+            this.formList.forEach((item, index) => {
+              if (item.field == 'personCode') {
+                item.options = arrList
+              }
+            })
+            this.formRuleList.forEach(item2 => {
+              if (item2.field == 'personCode') {
+                item2.options = arrList
+              }
+            })
+            this.tableList.forEach(item3 => {
+              if (item3.field == 'personCode') {
+                item3.options = arrList
+              }
+            })
+          }
+        })
+      },
+      buttonData(row, type) {
+        this.fillingId = row.id
+        this.operationType = type
+        if (type == 'edit') {
+          this.$set(this.ruleForm, 'gunCode', row.gunCode)
+          this.$set(this.ruleForm, 'scanGunCode', row.scanGunCode)
+          this.$set(this.ruleForm, 'personCode', row.personCode)
+          this.$set(this.ruleForm, 'remark', row.remark)
+          this.staffDialogVisible = true
+          this.staffTitle = '编辑'
+        } else if (type == 'del') {
+          this.getCancel(row.id)
+        }
+      },
+      // 删除充装枪
+      getCancel(ID) {
+        this.$confirm('此操作将永久删除该项, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delFillGun({
+            id: ID,
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message({
+                message: res.msg,
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {
+          // console.log('取消')
+        });
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      closeDialog() {
+        this.ruleForm = {}
+        this.$refs.childRules.resetCheck();
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 100 - 0
src/views/manufacture/roam.js

@@ -0,0 +1,100 @@
+import {
+  process
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+      field: 'index',
+      label: '编号',
+      boxhead: true,
+      align: 'center',
+    }, {
+      field: 'innerCode',
+      label: '单位内编号',
+      colWidth: '160',
+      align: 'center',
+    }, {
+      field: 'optType',
+      label: '步骤',
+      colWidth: '160',
+      align: 'center',
+      options: process(),
+    }, {
+      field: 'optTime',
+      label: '操作时间',
+      colWidth: '160',
+      align: 'center',
+    }, {
+      field: 'optUserObj.nickName',
+      label: '操作人',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'lng',
+      label: '经度',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'lat',
+      label: '纬度',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'objectUserObj.nickName',
+      label: '交互工作人员',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'objectCustomerObj.name',
+      label: '交互客户',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'optCustomerObj.name',
+      label: '操作客户',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'companyObj.name',
+      label: '企业',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'currentEnterpriseObj.name',
+      label: '当前企业',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'currentStationObj.name',
+      label: '当前气站',
+      colWidth: '150',
+      align: 'center',
+    },
+    // {
+    //   field: 'T_connect',
+    //   label: '当前检验',
+    //   colWidth: '150',
+    //   align: 'center',
+    // },
+    {
+      field: 'currentStoreObj.name',
+      label: '当前门店',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'currentTruckObj.nickName',
+      label: '当前司机',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'currentMotor',
+      label: '当前车辆',
+      colWidth: '150',
+      align: 'center',
+    }, {
+      field: 'currentAddressObj.name',
+      label: '当前客户',
+      colWidth: '150',
+      align: 'center',
+    },
+  ]
+}

+ 53 - 0
src/views/manufacture/specification.js

@@ -0,0 +1,53 @@
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'name',
+    operation: true,
+    label: '名称',
+    align: 'center',
+  }, {
+    field: 'remark',
+    label: '备注',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '200px',
+    align: 'center',
+    labelButton: [{
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-tickets',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'name',
+    label: '名称',
+    placeholder: '名称',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入名称',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'remark',
+    label: '备注',
+    placeholder: '备注',
+    type: 'textarea',
+    colWidth: 24,
+  }, ]
+}

+ 195 - 0
src/views/manufacture/tankFilling.vue

@@ -0,0 +1,195 @@
+<template>
+  <!-- 充装管理 -->
+  <div>
+    <actionBar menuTitle="充装管理" :formList="formList" :ruleForm="searchRuleForm" @searchProtocol="searchProtocol">
+    </actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="60%" :close-on-click-modal="false">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px"></forms>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getFillData,
+    getStation,
+    getUserFillData
+  } from '@/api/inspection'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./filling.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        formList: [{
+          type: 'picker',
+          label: '订单时间',
+          field: 'time',
+          placeholder: '订单时间',
+        }, {
+          type: 'select',
+          label: '所属气站',
+          field: 'stationId',
+          placeholder: '所属气站',
+          options: [],
+        }, {
+          type: 'select',
+          label: '充装员',
+          field: 'userId',
+          placeholder: '充装员',
+          options: [],
+        }, {
+          type: 'input',
+          label: '单位内编码',
+          field: 'innerCode',
+          placeholder: '单位内编码',
+        }, {
+          type: 'input',
+          label: '高频编码',
+          field: 'chipId',
+          placeholder: '高频编码',
+        }],
+        searchRuleForm: {
+          time: [],
+          stationId: '',
+          userId: '',
+          innerCode: '',
+          chipId: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        formRuleList: [],
+        searchValue: {},
+        ruleForm: {}
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        if (value.time) {
+          this.searchValue.orderStartTime = value.time[0]
+          this.searchValue.orderEndTime = value.time[1]
+        }
+        this.getList()
+      },
+      // 获取钢瓶档案列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getFillData(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.tableData.forEach((item) => {
+              item.area = item.tbFillData.area
+              item.city = item.tbFillData.city
+            })
+            this.Total = res.data.count
+            this.getGasStation()
+          }
+        })
+      },
+      // 获取气站
+      getGasStation() {
+        getStation().then(res => {
+          if (res.code == 200) {
+            const arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.station.name
+              arrData.value = item1.station.id
+              arrList.push(arrData)
+            })
+            this.formList.forEach((item, index) => {
+              if (item.field == 'stationId') {
+                item.options = arrList
+              }
+            })
+          }
+          this.getFillingPersonnel()
+        })
+      },
+      // 获取充装人员
+      getFillingPersonnel() {
+        getUserFillData().then(res => {
+          if (res.code == 200) {
+            const arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.user.nickName
+              arrData.value = item1.user.id
+              arrList.push(arrData)
+            })
+            this.formList.forEach((item, index) => {
+              if (item.field == 'userId') {
+                item.options = arrList
+              }
+            })
+          }
+        })
+      },
+      buttonData(row, type) {
+        this.operationType = type
+        if (type == 'edit') {
+          this.staffTitle = '编辑'
+        } else {
+          this.staffTitle = '详情'
+        }
+        this.staffDialogVisible = true
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 238 - 18
src/views/manufacture/vehicle.vue

@@ -1,32 +1,48 @@
 <template>
   <!-- 车辆管理 -->
   <div>
-    <actionBar menuTitle="车辆管理" :operateList="operateList" :formList="formList" @openModel="openModel"></actionBar>
-    <tables :key="Math.random()" :suspension="true" :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+    <actionBar menuTitle="车辆管理" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel" @searchProtocol="searchProtocol"></actionBar>
+    <tables :key="Math.random()" :suspension="true" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
     <!-- 分页 -->
     <div class="paging_bottom" v-if="Pagination.Total">
-      <el-pagination small layout="prev, pager, next" :total="Pagination.Total" @size-change="changeSize"
-        @current-change="changeCurrent">
-      </el-pagination>
+      <pagination :total="Pagination.Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
     </div>
-    <el-dialog :title="shopTitle" :visible.sync="shopDialogVisible" width="60%" :close-on-click-modal="false">
-      <forms ref="childRules" :formNewList="formRuleList" labelWidth="150px"></forms>
+    <el-dialog :title="shopTitle" :visible.sync="shopDialogVisible" :width="dialogWidth" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="150px"
+        @handleScroll="handleScroll" @remoteMethod="remoteMethod"></forms>
       <span slot="footer" class="dialog-footer">
         <el-button plain @click="shopDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleAdd">确 定</el-button>
+        <el-button type="primary" :loading="carLoading" @click="handleAdd">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
+  import {
+    getCar,
+    getCarDetails,
+    addCar,
+    putCar,
+    delCar,
+    bindTruckUser
+  } from '@/api/car'
+  import {
+    getUser
+  } from '@/api/user'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
   import {
     rules,
-    tableRules
+    tableRules,
+    vehicle
   } from "./carTable.js";
   export default {
     components: {
@@ -45,10 +61,18 @@
         formList: [{
           type: 'input',
           label: '车牌号',
-          field: 'T_name',
+          field: 'carNo',
           placeholder: '请输入车牌号查找',
-          colWidth: 'el-col-24',
-        }],
+        }, {
+          type: 'picker',
+          label: '道路运输证有效期',
+          field: 'transportTime',
+          placeholder: '道路运输证有效期',
+        }, ],
+        searchRuleForm: {
+          carNo: '',
+          transportTime: '',
+        },
         operateList: [{
           type: 'add',
           title: '添加车辆',
@@ -59,17 +83,48 @@
         shopDialogVisible: false,
         shopTitle: '添加',
         formRuleList: [],
+        ruleForm: {},
+        searchValue: {},
+        operationType: '',
+        carLoading: false,
+        enterpriseId: '',
+        dialogWidth: '60%',
+        page: 1,
+        staffName: '',
+        limitNo: true,
+        carNo: '',
       }
     },
     mounted() {
-      const dataList = rules();
-      this.formRuleList = dataList;
+      this.getList()
     },
     methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取车辆列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getCar(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Pagination.Total = res.data.count
+          }
+        })
+      },
       openModel(type) {
-        console.log(type, 24)
+        const dataList = rules();
+        this.formRuleList = dataList;
+        this.dialogWidth = '60%'
+        this.operationType = type
         if (type == 'add') {
-          this.staffTitle = '添加'
+          this.shopTitle = '添加'
         }
         this.shopDialogVisible = true
       },
@@ -77,21 +132,186 @@
       handleAdd() {
         let flag = this.$refs['childRules'].validateForm();
         if (flag) {
-          console.log(this.formRuleList);
+          this.carLoading = true
+          if (this.operationType == 'add') {
+            addCar({
+              provCarInfo: this.ruleForm
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.carLoading = false
+              this.shopDialogVisible = false
+            })
+          } else if (this.operationType == 'edit') {
+            putCar({
+              id: this.enterpriseId,
+              provCarInfo: this.ruleForm
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.carLoading = false
+              this.shopDialogVisible = false
+            })
+          } else if (this.operationType == 'binding') {
+            bindTruckUser({
+              userId: this.ruleForm.userId,
+              carNo: this.carNo,
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.carLoading = false
+              this.shopDialogVisible = false
+            })
+          }
         } else {
           this.$message.error('表单信息不完整,请继续填写完整');
         }
       },
+      // 删除
+      deleteItem(id) {
+        this.$confirm('此操作将永久删除该项, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delCar({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
       // 表格操作按钮
       buttonData(row, type) {
-        console.log(row, type, 4)
+        // console.log(row, type, 998)
+        this.enterpriseId = row.id
+        this.operationType = type
+        if (type == 'edit') {
+          const dataList = rules();
+          this.formRuleList = dataList;
+          this.dialogWidth = '60%'
+          this.shopTitle = '编辑'
+          this.ruleForm = JSON.parse(JSON.stringify(row.provCarInfo))
+          this.shopDialogVisible = true
+        } else if (type == 'del') {
+          this.deleteItem(row.id)
+        } else if (type == 'binding') {
+          this.limitNo = true
+          this.staffName = ''
+          this.page = 1
+          this.carNo = row.carNo
+          this.getUserList()
+          this.dialogWidth = '40%'
+          const dataList = vehicle();
+          this.formRuleList = dataList;
+          this.shopTitle = '车辆绑定司机信息'
+          this.shopDialogVisible = true
+          if(row.truckUserCarInfo.user.provUserId){
+            this.ruleForm.userId = row.truckUserCarInfo.user.provUserId
+          }
+        }
+      },
+      // 获取用户列表
+      getUserList() {
+        var params = {
+          page: this.page,
+          pageSize: 10,
+          name: this.staffName,
+          userType: 4,
+        }
+        getUser(params).then(res => {
+          if (res.code == 200) {
+            let arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.nickName
+              arrData.value = item1.provUserId
+              arrList.push(arrData)
+            })
+            if (this.limitNo == true) {
+              this.formRuleList.forEach(item => {
+                if (item.type == 'searchSelect') {
+                  item.options = item.options.concat(arrList);
+                  let some = [];
+                  item.options.forEach(el => {
+                    if (!some.some(e => e.value == el.value)) {
+                      some.push(el)
+                    }
+                  })
+                  item.options = some
+                  this.$forceUpdate()
+                }
+              })
+            }
+            if (arrList.length >= 10) {
+              this.page = ++this.page;
+            } else {
+              // 已经没数据了 不需要增加数据
+              this.limitNo = false;
+            }
+          }
+        })
+      },
+      // 触底事件
+      handleScroll() {
+        if (this.limitNo) {
+          this.getUserList()
+        }
+      },
+      // 重置选择员工
+      resetSelect() {
+        this.formRuleList.forEach(item => {
+          if (item.type == 'searchSelect') {
+            item.options = []
+          }
+        })
+        this.page = 1
+        this.limitNo = true
+        this.staffName = ''
+      },
+      // 搜索
+      remoteMethod(value) {
+        this.resetSelect()
+        this.staffName = value
+        this.getUserList()
       },
       changeSize(val) {
         this.Pagination.PageSize = val
+        this.getList()
       },
       changeCurrent(val) {
         this.Pagination.PageIndex = val
+        this.getList()
       },
+      closeDialog() {
+        this.ruleForm = {}
+        this.$refs.childRules.resetCheck();
+      }
     }
   }
 </script>

+ 90 - 0
src/views/manufacture/wanderAbout.vue

@@ -0,0 +1,90 @@
+<template>
+  <!-- 气瓶流转步骤 -->
+  <div>
+    <actionBar menuTitle="气瓶流转步骤" :formList="formList" :ruleForm="searchRuleForm"></actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    getOperationLog
+  } from '@/api/inspection'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import {
+    employee
+  } from "./roam.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        formList: [{
+          type: 'input',
+          label: '客户姓名',
+          field: 'name',
+          placeholder: '客户姓名',
+        }],
+        searchRuleForm: {
+          name: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
+        operationType: '',
+        searchValue: {},
+        ruleForm: {}
+      }
+    },
+    mounted() {
+      this.getList()
+    },
+    methods: {
+      // 获取气瓶流转步骤列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getOperationLog(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .el-dialog {
+    margin-top: 8vh !important;
+  }
+</style>

+ 210 - 0
src/views/manufacture/warehouse.vue

@@ -0,0 +1,210 @@
+<template>
+  <!-- 仓库管理 -->
+  <div>
+    <actionBar menuTitle="仓库管理" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel" @searchProtocol="searchProtocol"></actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px"></forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getWarehouse,
+    getWarehouseDetails,
+    addWarehouse,
+    putWarehouse,
+    delWarehouse,
+  } from '@/api/warehouse'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./entrepot.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '名称',
+          field: 'name',
+          placeholder: '名称',
+        }],
+        searchRuleForm: {
+          name: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
+        formRuleList: [],
+        operationType: '',
+        searchValue: {},
+        ruleForm: {},
+        enterpriseId: null,
+        confirmLoading: false,
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取商品列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getWarehouse(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      openModel(type) {
+        this.operationType = type
+        if (type == 'add') {
+          this.staffTitle = '添加'
+        }
+        this.staffDialogVisible = true
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          this.confirmLoading = true
+          if (this.operationType == 'add') {
+            var params = {
+              ...this.ruleForm
+            }
+            addWarehouse(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          } else if (this.operationType == 'edit') {
+            this.editItem()
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      editItem() {
+        var params = {
+          id: this.enterpriseId,
+          name: this.ruleForm.name,
+          address: this.ruleForm.address,
+        }
+        putWarehouse(params).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.getList()
+          }
+          this.staffDialogVisible = false
+          this.confirmLoading = false
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+      },
+      // 删除
+      deleteItem(id) {
+        this.$confirm('此操作将永久删除该商品, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delWarehouse({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      buttonData(row, type) {
+        this.enterpriseId = row.id
+        this.operationType = type
+        if (type == 'edit') {
+          this.staffDialogVisible = true
+          this.staffTitle = '编辑'
+          this.ruleForm = JSON.parse(JSON.stringify(row))
+        } else if (type == 'del') {
+          this.deleteItem(row.id)
+        }
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      closeDialog() {
+        this.ruleForm = {}
+        this.$refs.childRules.resetCheck();
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 239 - 0
src/views/marketing/allocation.vue

@@ -0,0 +1,239 @@
+<template>
+  <!-- 派费管理 -->
+  <div>
+    <actionBar menuTitle="派费管理" :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm"
+      @openModel="openModel" @searchProtocol="searchProtocol"></actionBar>
+    <tables :key="Math.random()" :suspension="false" :tableList="tableList" :tableData="tableData"
+      @buttonData="buttonData"></tables>
+    <!-- 分页 -->
+    <div class="paging_bottom" v-if="Total">
+      <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+        @changeCurrent="changeCurrent">
+      </pagination>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px"></forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getGoods,
+    getGoodsDetails,
+    addGoods,
+    putGoods,
+    delGoods,
+  } from '@/api/levy'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee
+  } from "./levy.js";
+  export default {
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '名称',
+          field: 'name',
+          placeholder: '名称',
+        }],
+        searchRuleForm: {
+          name: '',
+        },
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
+        formRuleList: [],
+        operationType: '',
+        searchValue: {},
+        confirmLoading: false,
+        enterpriseId: null,
+        ruleForm: {
+          name: '',
+          price: '',
+          remark: '',
+        },
+      }
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      openModel(type) {
+        if (type == 'add') {
+          this.staffTitle = '添加'
+        }
+        this.staffDialogVisible = true
+      },
+      // 获取商品列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getGoods(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      openModel(type) {
+        this.operationType = type
+        if (type == 'add') {
+          this.staffTitle = '添加'
+        }
+        this.staffDialogVisible = true
+      },
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          this.confirmLoading = true
+          if (this.operationType == 'add') {
+            var params = {
+              ...this.ruleForm
+            }
+            params.price = Number(params.price)
+            addGoods(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          } else if (this.operationType == 'edit') {
+            this.editItem()
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      editItem() {
+        var params = {
+          id: this.enterpriseId,
+          ...this.ruleForm
+        }
+        params.price = Number(params.price)
+        putGoods(params).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.getList()
+          }
+          this.staffDialogVisible = false
+          this.confirmLoading = false
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+      },
+      // 删除
+      deleteItem(id) {
+        this.$confirm('此操作将永久删除该商品, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delGoods({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      buttonData(row, type) {
+        this.enterpriseId = row.id
+        this.operationType = type
+        if (type == 'edit') {
+          this.staffDialogVisible = true
+          this.staffTitle = '编辑'
+          this.$nextTick(() => {
+            this.ruleForm.name = row.name
+            this.ruleForm.price = row.price
+            this.ruleForm.remark = row.remark
+          })
+        } else if (type == 'del') {
+          this.deleteItem(row.id)
+        }
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      // 清空表单
+      closeDialog() {
+        this.$refs.childRules.resetCheck();
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .card_podia {
+    display: flex;
+  }
+
+  .seating_form_card {
+    width: 70%;
+  }
+
+  .seating_order {
+    width: 30%;
+  }
+
+  .card_seating_order {
+    margin: 0px 20px;
+  }
+</style>

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff