LR 3 rokov pred
rodič
commit
8e1ef94542

+ 33 - 33
package-lock.json

@@ -3726,7 +3726,7 @@
     },
     "@videojs/http-streaming": {
       "version": "2.14.2",
-      "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.14.2.tgz",
+      "resolved": "https://registry.npmmirror.com/@videojs/http-streaming/-/http-streaming-2.14.2.tgz",
       "integrity": "sha512-K1raSfO/pq5r8iUas3OSYni0kXOj91n8ealIpV02khghzGv9LQ6O3YUqYd/eAhJ1HIrmZWOnrYpK/P+mhUExXQ==",
       "requires": {
         "@babel/runtime": "^7.12.5",
@@ -3741,7 +3741,7 @@
     },
     "@videojs/vhs-utils": {
       "version": "3.0.5",
-      "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz",
+      "resolved": "https://registry.npmmirror.com/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz",
       "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==",
       "requires": {
         "@babel/runtime": "^7.12.5",
@@ -3751,7 +3751,7 @@
     },
     "@videojs/xhr": {
       "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@videojs/xhr/-/xhr-2.6.0.tgz",
+      "resolved": "https://registry.npmmirror.com/@videojs/xhr/-/xhr-2.6.0.tgz",
       "integrity": "sha512-7J361GiN1tXpm+gd0xz2QWr3xNWBE+rytvo8J3KuggFaLg+U37gZQ2BuPLcnkfGffy2e+ozY70RHC8jt7zjA6Q==",
       "requires": {
         "@babel/runtime": "^7.5.5",
@@ -4893,7 +4893,7 @@
     },
     "@xmldom/xmldom": {
       "version": "0.7.5",
-      "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.5.tgz",
+      "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.7.5.tgz",
       "integrity": "sha512-V3BIhmY36fXZ1OtVcI9W+FxQqxVLsPKcNjWigIaa81dLC9IolJl5Mt4Cvhmr0flUnjSpTdrbMTSbXqYqV5dT6A=="
     },
     "@xtuc/ieee754": {
@@ -5005,7 +5005,7 @@
     },
     "aes-decrypter": {
       "version": "3.1.3",
-      "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz",
+      "resolved": "https://registry.npmmirror.com/aes-decrypter/-/aes-decrypter-3.1.3.tgz",
       "integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==",
       "requires": {
         "@babel/runtime": "^7.12.5",
@@ -5737,7 +5737,7 @@
     },
     "babel-plugin-syntax-dynamic-import": {
       "version": "6.18.0",
-      "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz",
+      "resolved": "https://registry.npmmirror.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz",
       "integrity": "sha512-MioUE+LfjCEz65Wf7Z/Rm4XCP5k2c+TbMd2Z2JKc7U9uwjBhAfNPE48KC4GTGKhppMeYVepwDBNO/nGY6NYHBA=="
     },
     "babel-plugin-syntax-object-rest-spread": {
@@ -9043,7 +9043,7 @@
     },
     "dom-walk": {
       "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz",
+      "resolved": "https://registry.npmmirror.com/dom-walk/-/dom-walk-0.1.2.tgz",
       "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="
     },
     "domain-browser": {
@@ -11292,7 +11292,7 @@
     },
     "global": {
       "version": "4.4.0",
-      "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz",
+      "resolved": "https://registry.npmmirror.com/global/-/global-4.4.0.tgz",
       "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
       "requires": {
         "min-document": "^2.19.0",
@@ -12431,7 +12431,7 @@
     },
     "individual": {
       "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/individual/-/individual-2.0.0.tgz",
+      "resolved": "https://registry.npmmirror.com/individual/-/individual-2.0.0.tgz",
       "integrity": "sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g=="
     },
     "infer-owner": {
@@ -12768,7 +12768,7 @@
     },
     "is-function": {
       "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz",
+      "resolved": "https://registry.npmmirror.com/is-function/-/is-function-1.0.2.tgz",
       "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="
     },
     "is-generator-fn": {
@@ -14519,7 +14519,7 @@
     },
     "keycode": {
       "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz",
+      "resolved": "https://registry.npmmirror.com/keycode/-/keycode-2.2.1.tgz",
       "integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg=="
     },
     "keyv": {
@@ -14985,7 +14985,7 @@
     },
     "m3u8-parser": {
       "version": "4.7.1",
-      "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.7.1.tgz",
+      "resolved": "https://registry.npmmirror.com/m3u8-parser/-/m3u8-parser-4.7.1.tgz",
       "integrity": "sha512-pbrQwiMiq+MmI9bl7UjtPT3AK603PV9bogNlr83uC+X9IoxqL5E4k7kU7fMQ0dpRgxgeSMygqUa0IMLQNXLBNA==",
       "requires": {
         "@babel/runtime": "^7.12.5",
@@ -15305,7 +15305,7 @@
     },
     "min-document": {
       "version": "2.19.0",
-      "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz",
+      "resolved": "https://registry.npmmirror.com/min-document/-/min-document-2.19.0.tgz",
       "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
       "requires": {
         "dom-walk": "^0.1.0"
@@ -15531,7 +15531,7 @@
     },
     "mpd-parser": {
       "version": "0.21.1",
-      "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.21.1.tgz",
+      "resolved": "https://registry.npmmirror.com/mpd-parser/-/mpd-parser-0.21.1.tgz",
       "integrity": "sha512-BxlSXWbKE1n7eyEPBnTEkrzhS3PdmkkKdM1pgKbPnPOH0WFZIc0sPOWi7m0Uo3Wd2a4Or8Qf4ZbS7+ASqQ49fw==",
       "requires": {
         "@babel/runtime": "^7.12.5",
@@ -15570,7 +15570,7 @@
     },
     "mux.js": {
       "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz",
+      "resolved": "https://registry.npmmirror.com/mux.js/-/mux.js-6.0.1.tgz",
       "integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==",
       "requires": {
         "@babel/runtime": "^7.11.2",
@@ -16701,7 +16701,7 @@
     },
     "pdfjs-dist": {
       "version": "2.6.347",
-      "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.6.347.tgz",
+      "resolved": "https://registry.npmmirror.com/pdfjs-dist/-/pdfjs-dist-2.6.347.tgz",
       "integrity": "sha512-QC+h7hG2su9v/nU1wEI3SnpPIrqJODL7GTDFvR74ANKGq1AFJW16PH8VWnhpiTi9YcLSFV9xLeWSgq+ckHLdVQ=="
     },
     "pend": {
@@ -16760,7 +16760,7 @@
     },
     "pkcs7": {
       "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/pkcs7/-/pkcs7-1.0.4.tgz",
+      "resolved": "https://registry.npmmirror.com/pkcs7/-/pkcs7-1.0.4.tgz",
       "integrity": "sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==",
       "requires": {
         "@babel/runtime": "^7.5.5"
@@ -18584,7 +18584,7 @@
     },
     "rust-result": {
       "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/rust-result/-/rust-result-1.0.0.tgz",
+      "resolved": "https://registry.npmmirror.com/rust-result/-/rust-result-1.0.0.tgz",
       "integrity": "sha512-6cJzSBU+J/RJCF063onnQf0cDUOHs9uZI1oroSGnHOph+CQTIJ5Pp2hK5kEQq1+7yE/EEWfulSNXAQ2jikPthA==",
       "requires": {
         "individual": "^2.0.0"
@@ -18628,7 +18628,7 @@
     },
     "safe-json-parse": {
       "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-4.0.0.tgz",
+      "resolved": "https://registry.npmmirror.com/safe-json-parse/-/safe-json-parse-4.0.0.tgz",
       "integrity": "sha512-RjZPPHugjK0TOzFrLZ8inw44s9bKox99/0AZW9o/BEQVrJfhI+fIHMErnPyRa89/yRXUUr93q+tiN6zhoVV4wQ==",
       "requires": {
         "rust-result": "^1.0.0"
@@ -21534,7 +21534,7 @@
     },
     "url-toolkit": {
       "version": "2.2.5",
-      "resolved": "https://registry.npmjs.org/url-toolkit/-/url-toolkit-2.2.5.tgz",
+      "resolved": "https://registry.npmmirror.com/url-toolkit/-/url-toolkit-2.2.5.tgz",
       "integrity": "sha512-mtN6xk+Nac+oyJ/PrI7tzfmomRVNFIWKUbG8jdYFt52hxbiReFAXIjYskvu64/dvuW71IcB7lV8l0HvZMac6Jg=="
     },
     "use": {
@@ -21630,7 +21630,7 @@
     },
     "video.js": {
       "version": "7.20.1",
-      "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.20.1.tgz",
+      "resolved": "https://registry.npmmirror.com/video.js/-/video.js-7.20.1.tgz",
       "integrity": "sha512-QMuj+bjwvLId9SY8uBAjO9sw7pCDhdVzJtwsAwg1MdVLXgVuxhhSYswdsdsRk+YMssHtReopINclvDlTGTxMLA==",
       "requires": {
         "@babel/runtime": "^7.12.5",
@@ -21650,12 +21650,12 @@
     },
     "videojs-font": {
       "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz",
+      "resolved": "https://registry.npmmirror.com/videojs-font/-/videojs-font-3.2.0.tgz",
       "integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA=="
     },
     "videojs-vtt.js": {
       "version": "0.15.3",
-      "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.3.tgz",
+      "resolved": "https://registry.npmmirror.com/videojs-vtt.js/-/videojs-vtt.js-0.15.3.tgz",
       "integrity": "sha512-5FvVsICuMRx6Hd7H/Y9s9GDeEtYcXQWzGMS+sl4UX3t/zoHp3y+isSfIPRochnTH7h+Bh1ILyC639xy9Z6kPag==",
       "requires": {
         "global": "^4.3.1"
@@ -21823,7 +21823,7 @@
     },
     "vue-pdf": {
       "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/vue-pdf/-/vue-pdf-4.3.0.tgz",
+      "resolved": "https://registry.npmmirror.com/vue-pdf/-/vue-pdf-4.3.0.tgz",
       "integrity": "sha512-zd3lJj6CbtrawgaaDDciTDjkJMUKiLWtbEmBg5CvFn9Noe9oAO/GNy/fc5c59qGuFCJ14ibIV1baw4S07e5bSQ==",
       "requires": {
         "babel-plugin-syntax-dynamic-import": "^6.18.0",
@@ -21836,12 +21836,12 @@
       "dependencies": {
         "@types/json-schema": {
           "version": "7.0.11",
-          "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
+          "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
           "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
         },
         "ajv": {
           "version": "6.12.6",
-          "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+          "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
           "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
           "requires": {
             "fast-deep-equal": "^3.1.1",
@@ -21852,12 +21852,12 @@
         },
         "json5": {
           "version": "2.2.1",
-          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
+          "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz",
           "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
         },
         "raw-loader": {
           "version": "4.0.2",
-          "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz",
+          "resolved": "https://registry.npmmirror.com/raw-loader/-/raw-loader-4.0.2.tgz",
           "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==",
           "requires": {
             "loader-utils": "^2.0.0",
@@ -21866,7 +21866,7 @@
           "dependencies": {
             "loader-utils": {
               "version": "2.0.2",
-              "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+              "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz",
               "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
               "requires": {
                 "big.js": "^5.2.2",
@@ -21878,7 +21878,7 @@
         },
         "schema-utils": {
           "version": "3.1.1",
-          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
+          "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-3.1.1.tgz",
           "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
           "requires": {
             "@types/json-schema": "^7.0.8",
@@ -21910,7 +21910,7 @@
     },
     "vue-resize-sensor": {
       "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/vue-resize-sensor/-/vue-resize-sensor-2.0.0.tgz",
+      "resolved": "https://registry.npmmirror.com/vue-resize-sensor/-/vue-resize-sensor-2.0.0.tgz",
       "integrity": "sha512-W+y2EAI/BxS4Vlcca9scQv8ifeBFck56DRtSwWJ2H4Cw1GLNUYxiZxUHHkuzuI5JPW/cYtL1bPO5xPyEXx4LmQ=="
     },
     "vue-router": {
@@ -22827,7 +22827,7 @@
     },
     "worker-loader": {
       "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-2.0.0.tgz",
+      "resolved": "https://registry.npmmirror.com/worker-loader/-/worker-loader-2.0.0.tgz",
       "integrity": "sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw==",
       "requires": {
         "loader-utils": "^1.0.0",
@@ -22836,7 +22836,7 @@
       "dependencies": {
         "schema-utils": {
           "version": "0.4.7",
-          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
+          "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-0.4.7.tgz",
           "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==",
           "requires": {
             "ajv": "^6.1.0",

+ 6 - 2
src/api/common/index.ts

@@ -1,6 +1,6 @@
 import axios from '@/utils/request'
 import { ElTableColumn } from 'element-ui/types/table-column'
-// import { serialize } from 'object-to-formdata'
+import { serialize } from 'object-to-formdata'
 const uris = {
   project: {
     page: '/tofly-sxgk/other/getUserPrjs',
@@ -119,7 +119,11 @@ export interface IBaseStandard {
 export const fetchProjects = () => axios.request<IResult<IOrg[]>>({ url: uris.project.page, method: 'get' })
 
 export const setProjectKey = (id: number) =>
-  axios.request<IRes<boolean>>({ url: uris.project.set, method: 'post', data: { prjId: id } })
+  axios.request<IRes<boolean>>({
+    url: uris.project.set,
+    method: 'post',
+    data: serialize({ prjId: id }, { dotsForObjectNotation: true, noFilesWithArrayNotation: true })
+  })
 
 export const addMenu = (data) => axios.request<IRes<boolean>>({ url: '/base/menu', method: 'post', data })
 

+ 61 - 61
src/components/Base/Page/index.vue

@@ -12,79 +12,79 @@
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
-@Component({ name: 'TfPage', inheritAttrs: false })
-export default class Page extends Vue {
-  @Prop({ type: Boolean, default: false }) isActive!: boolean
-  @Prop({ type: Boolean, default: true }) gutter!: boolean
-  $parent!: Vue & { preparing?: Function }
-  @Watch('isActive')
-  refetchData(active: boolean) {
-    if (active) {
-      const { preparing } = this.$parent
-      preparing && preparing()
+  import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
+  @Component({ name: 'TfPage', inheritAttrs: false })
+  export default class Page extends Vue {
+    @Prop({ type: Boolean, default: false }) isActive!: boolean
+    @Prop({ type: Boolean, default: true }) gutter!: boolean
+    $parent!: Vue & { preparing?: Function }
+    @Watch('isActive')
+    refetchData(active: boolean) {
+      if (active) {
+        const { preparing } = this.$parent
+        preparing && preparing()
+      }
     }
   }
-}
 </script>
 
 <style lang="scss" scoped>
-.container {
-  position: relative;
-  width: 100%;
-  height: 100%;
-  overflow: hidden auto;
-  display: flex;
-  flex-direction: column;
-  background-color: $--background-color-base !important;
-  @include base-scroll-bar();
-  &.no-gutter {
-    .actions {
-      margin-bottom: 0;
-    }
-    .content {
-      >>> .tf-table {
-        padding-top: 0;
-      }
-    }
-  }
-  .actions {
-    flex: 0 0 auto;
+  .container {
     position: relative;
-    position: sticky;
-    top: 0;
-    z-index: 100;
-    padding: $gutter $gutter 0;
-    background: $--color-white;
-    margin-bottom: $gutter;
-
-    >>> .el-form-item {
-      margin-bottom: $gutter;
-    }
-
-    >>> .el-form--inline {
-      .el-form-item {
-        margin-right: $gutter;
-      }
-    }
-    &.hidden {
-      display: none;
-    }
-  }
-  .content {
-    position: absolute;
     width: 100%;
     height: 100%;
     overflow: hidden auto;
+    display: flex;
+    flex-direction: column;
+    background-color: $--background-color-base !important;
     @include base-scroll-bar();
+    &.no-gutter {
+      .actions {
+        margin-bottom: 0;
+      }
+      .content {
+        >>> .tf-table {
+          padding-top: 0;
+        }
+      }
+    }
+    .actions {
+      flex: 0 0 auto;
+      position: relative;
+      position: sticky;
+      top: 0;
+      z-index: 100;
+      padding: $gutter $gutter 0;
+      background: $--color-white;
+      margin-bottom: $gutter;
+
+      >>> .el-form-item {
+        margin-bottom: $gutter;
+      }
 
-    &-wrapper {
+      >>> .el-form--inline {
+        .el-form-item {
+          margin-right: $gutter;
+        }
+      }
+      &.hidden {
+        display: none;
+      }
+    }
+    .content {
+      position: absolute;
       width: 100%;
-      flex: 1 1 100%;
-      display: flex;
-      position: relative;
-      z-index: 99;
+      height: 100%;
+      overflow: hidden auto;
+      @include base-scroll-bar();
+
+      &-wrapper {
+        width: 100%;
+        flex: 1 1 100%;
+        display: flex;
+        position: relative;
+        z-index: 99;
+      }
     }
   }
-}
 </style>

+ 1 - 0
src/views/spectrum/health/flaw/widget.vue

@@ -153,6 +153,7 @@
     preparing() {
       this.doQuery()
     }
+
     mounted() {
       this.preparing()
     }

+ 145 - 145
src/views/spectrum/monitorWarning/alarmHistory/widget.vue

@@ -1,5 +1,5 @@
 <template>
-  <tf-page>
+  <tf-page :gutter="false">
     <template v-slot:action>
       <QueryForm :selected="selected" :loading="loading" @query="onQuery" :types="types" />
     </template>
@@ -18,7 +18,7 @@
           :inactive-value="0"
           :value="row.deviceState"
           size="small"
-          style="user-select:none"
+          style="user-select: none"
         />
       </template>
     </tf-table>
@@ -26,166 +26,166 @@
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
-import QueryForm from './QueryForm.vue'
-import { elTableAlignLeft, getDefaultPagination } from '@/utils/constant'
-import { IPagination } from '@/api/common'
-import { ElTableColumn } from 'element-ui/types/table-column'
-import { historyPage, IWarningInfo, deviceTypePage, IDeviceType } from './api'
-import { getSiteIcon } from '@/views/spectrum/common/siteIcon/siteIcon' // 站点图标
-
-@Component({ name: 'Device', components: { QueryForm } })
-export default class Device extends Vue {
-  @Prop({ type: Boolean, default: false }) isActive!: boolean
-  teamCols: Partial<ElTableColumn>[] = [
-    { type: 'selection', width: '50px' },
-    { type: 'index', label: '序号', width: '60px' },
-    { prop: 'partitionName', label: '排水分区', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'groupByName', label: '监测分组', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'deviceTypeName', label: '设备类型', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'deviceName', label: '设备名称', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'deviceCode', label: '设备编号', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'collectionDate', label: '采集数据时间', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'msgtype', label: '类型', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'targetName', label: '参数', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'checkValue', label: '检测值', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'warningName', label: '预警等级', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'upperLimit', label: '上限', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'lowerLimit', label: '下限', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'dateTime', label: '有效时段', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'handleStateName', label: '处理状态', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'handleUserName', label: '处理人', minWidth: '120px', ...elTableAlignLeft() },
-    { prop: 'handleTime', label: '处理时间', minWidth: '120px', ...elTableAlignLeft() }
-  ]
-
-  visible = false
-
-  current: Partial<IWarningInfo> = {}
-
-  selected: IWarningInfo[] = []
-
-  histories: IWarningInfo[] = []
-
-  types: IDeviceType[] = []
-
-  loading = { query: false, export: false }
-
-  pagination: IPagination = getDefaultPagination()
-
-  query = {}
-
-  onQuery(query) {
-    this.query = { ...query }
-    this.doQuery({ current: 1 })
-  }
-
-  async doQuery(query = {}) {
-    this.loading.query = true
-    try {
-      const {
-        result: { records, size, total, current }
-      } = await historyPage({ ...this.pagination, ...this.query, ...query, ...this.$store.getters['project/id'] })
-      this.pagination = { current, size, total }
-      this.histories = records || []
-    } catch (error) {
-      console.log(error)
+  import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
+  import QueryForm from './QueryForm.vue'
+  import { elTableAlignLeft, getDefaultPagination } from '@/utils/constant'
+  import { IPagination } from '@/api/common'
+  import { ElTableColumn } from 'element-ui/types/table-column'
+  import { historyPage, IWarningInfo, deviceTypePage, IDeviceType } from './api'
+  import { getSiteIcon } from '@/views/spectrum/common/siteIcon/siteIcon' // 站点图标
+
+  @Component({ name: 'Device', components: { QueryForm } })
+  export default class Device extends Vue {
+    @Prop({ type: Boolean, default: false }) isActive!: boolean
+    teamCols: Partial<ElTableColumn>[] = [
+      { type: 'selection', width: '50px' },
+      { type: 'index', label: '序号', width: '60px' },
+      { prop: 'partitionName', label: '排水分区', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'groupByName', label: '监测分组', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'deviceTypeName', label: '设备类型', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'deviceName', label: '设备名称', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'deviceCode', label: '设备编号', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'collectionDate', label: '采集数据时间', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'msgtype', label: '类型', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'targetName', label: '参数', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'checkValue', label: '检测值', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'warningName', label: '预警等级', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'upperLimit', label: '上限', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'lowerLimit', label: '下限', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'dateTime', label: '有效时段', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'handleStateName', label: '处理状态', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'handleUserName', label: '处理人', minWidth: '120px', ...elTableAlignLeft() },
+      { prop: 'handleTime', label: '处理时间', minWidth: '120px', ...elTableAlignLeft() }
+    ]
+
+    visible = false
+
+    current: Partial<IWarningInfo> = {}
+
+    selected: IWarningInfo[] = []
+
+    histories: IWarningInfo[] = []
+
+    types: IDeviceType[] = []
+
+    loading = { query: false, export: false }
+
+    pagination: IPagination = getDefaultPagination()
+
+    query = {}
+
+    onQuery(query) {
+      this.query = { ...query }
+      this.doQuery({ current: 1 })
     }
-    this.loading.query = false
-  }
 
-  onPageChange(pagination) {
-    this.pagination = { ...this.pagination, ...pagination }
-    this.doQuery()
-  }
+    async doQuery(query = {}) {
+      this.loading.query = true
+      try {
+        const {
+          result: { records, size, total, current }
+        } = await historyPage({ ...this.pagination, ...this.query, ...query, ...this.$store.getters['project/id'] })
+        this.pagination = { current, size, total }
+        this.histories = records || []
+      } catch (error) {
+        console.log(error)
+      }
+      this.loading.query = false
+    }
 
-  onAdd() {
-    this.current = {}
-    this.visible = true
-  }
+    onPageChange(pagination) {
+      this.pagination = { ...this.pagination, ...pagination }
+      this.doQuery()
+    }
 
-  onUpdate(row) {
-    this.current = { ...row }
-    this.visible = true
-  }
+    onAdd() {
+      this.current = {}
+      this.visible = true
+    }
 
-  onExport(ids) {
-    console.log(ids)
-  }
+    onUpdate(row) {
+      this.current = { ...row }
+      this.visible = true
+    }
 
-  onDblClick(row) {
-    this.current = { ...row }
-    this.visible = true
-    console.log('row===>', row, this.current)
-    let site = { ...row }
-    site['siteState'] = 2
-    let icon = getSiteIcon(site)
-    let lon = site.longitude || null
-    let lat = site.latitude || null
-    if (!lon || !lat) {
-      this.$message.warning('无坐标信息,无法显示!')
-      return
+    onExport(ids) {
+      console.log(ids)
     }
-    let Cesium = (window as any).Cesium
-    let viewer = (window as any).viewer
-    let entity = viewer.entities.getById(site.id)
-    if (!entity) {
-      const position = Cesium.Cartesian3.fromDegrees(lon, lat, 0)
-      entity = new Cesium.Entity({
-        id: site.id,
-        position: position,
-        billboard: {
-          image: icon,
-          width: 40,
-          height: 70,
-          heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
-          eyeOffset: Cesium.Cartesian3.ZERO
+
+    onDblClick(row) {
+      this.current = { ...row }
+      this.visible = true
+      console.log('row===>', row, this.current)
+      let site = { ...row }
+      site['siteState'] = 2
+      let icon = getSiteIcon(site)
+      let lon = site.longitude || null
+      let lat = site.latitude || null
+      if (!lon || !lat) {
+        this.$message.warning('无坐标信息,无法显示!')
+        return
+      }
+      let Cesium = (window as any).Cesium
+      let viewer = (window as any).viewer
+      let entity = viewer.entities.getById(site.id)
+      if (!entity) {
+        const position = Cesium.Cartesian3.fromDegrees(lon, lat, 0)
+        entity = new Cesium.Entity({
+          id: site.id,
+          position: position,
+          billboard: {
+            image: icon,
+            width: 40,
+            height: 70,
+            heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+            eyeOffset: Cesium.Cartesian3.ZERO
+          }
+        })
+        viewer.entities.add(entity)
+      }
+      viewer.flyTo(entity, {
+        offset: {
+          heading: Cesium.Math.toRadians(0.0),
+          pitch: Cesium.Math.toRadians(-25),
+          range: 3000
         }
       })
-      viewer.entities.add(entity)
     }
-    viewer.flyTo(entity, {
-      offset: {
-        heading: Cesium.Math.toRadians(0.0),
-        pitch: Cesium.Math.toRadians(-25),
-        range: 3000
-      }
-    })
-  }
 
-  onSelectionChange(selections) {
-    this.selected = [...selections]
-  }
+    onSelectionChange(selections) {
+      this.selected = [...selections]
+    }
 
-  async getAllTypes() {
-    try {
-      const {
-        result: { records }
-      } = await deviceTypePage({ current: 1, size: 9999, ...this.$store.getters['project/id'] })
-      this.types = records || []
-    } catch (error) {
-      console.log(error)
+    async getAllTypes() {
+      try {
+        const {
+          result: { records }
+        } = await deviceTypePage({ current: 1, size: 9999, ...this.$store.getters['project/id'] })
+        this.types = records || []
+      } catch (error) {
+        console.log(error)
+      }
     }
-  }
 
-  preparing() {
-    this.doQuery()
-    this.getAllTypes()
-  }
+    preparing() {
+      this.doQuery()
+      this.getAllTypes()
+    }
 
-  mounted() {
-    this.getAllTypes()
-  }
+    mounted() {
+      this.getAllTypes()
+    }
 
-  destroyed() {
-    let viewer = (window as any).viewer
-    viewer.entities.removeAll()
-  }
+    destroyed() {
+      let viewer = (window as any).viewer
+      viewer.entities.removeAll()
+    }
 
-  @Watch('isActive')
-  refetchData(active: boolean) {
-    if (active) {
-      this.preparing()
+    @Watch('isActive')
+    refetchData(active: boolean) {
+      if (active) {
+        this.preparing()
+      }
     }
   }
-}
 </script>

+ 22 - 7
src/views/spectrum/reform/statistics/QuerySummary.vue

@@ -3,10 +3,25 @@
     <tf-title>统计分析概况</tf-title>
     <el-row :gutter="15">
       <el-col :span="12" class="content">
-        <div><span>排水分区:</span>临港污水系统</div>
-        <div><span>站点名称:</span>茶园</div>
-        <div><span>排水分组:</span>泵站退水口(备用)</div>
-        <div><span>分析备注:</span><el-button type="warning" icon="el-icon-plus" size="small" /></div>
+        <el-row type="flex">
+          <span style="white-space: nowrap">站点名称:</span>
+          <el-col>茶园</el-col>
+        </el-row>
+        <el-row type="flex">
+          <span style="white-space: nowrap">排水分区:</span>
+          <el-col>临港污水系统</el-col>
+        </el-row>
+        <el-row type="flex">
+          <span style="white-space: nowrap">排水分组:</span>
+          <el-col>泵站退水口(备用)</el-col>
+        </el-row>
+        <el-row type="flex">
+          <span style="white-space: nowrap">站点备注:</span>
+          <el-col>
+            这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注
+            这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注这里是备注
+          </el-col>
+        </el-row>
         <el-card class="card">
           <el-row type="flex" justify="space-between" v-for="(item, index) of notes" :key="item.id">
             <el-col>{{ index + 1 }}、{{ item.name }}:{{ item.des }}</el-col>
@@ -22,8 +37,8 @@
 <script lang="ts">
   import { Vue, Component } from 'vue-property-decorator'
 
-  @Component({})
-  export default class Summary extends Vue {
+  @Component({ name: 'QuerySummary' })
+  export default class QuerySummary extends Vue {
     notes = [
       { id: 1, name: 'COD', des: '变化趋于平稳。' },
       { id: 2, name: '浊度', des: '变化趋于平稳。' },
@@ -42,7 +57,7 @@
     line-height: 2;
     span {
       color: $--color-text-secondary;
-      margin-right: 1em;
+      margin-right: 0.875em;
     }
     >>> .el-button {
       padding: 2px;

+ 1 - 4
src/views/spectrum/reform/statistics/widget.vue

@@ -85,10 +85,7 @@
 
     query = {}
 
-    day = {
-      type: 'day',
-      datetime: []
-    }
+    day = { type: 'day', datetime: [] }
 
     onQuery(query) {
       this.query = { ...query }