Przeglądaj źródła

根据eslint的规则,优化程序。

yangzhijie 4 lat temu
rodzic
commit
628c4300fc
100 zmienionych plików z 3540 dodań i 2930 usunięć
  1. 21 3
      .eslintrc.js
  2. 3 3
      examples/App.vue
  3. 5 2
      examples/Desktop.vue
  4. 6 6
      examples/checkbox/src/CheckBoxExample.vue
  5. 3 3
      examples/date/src/DateExample.vue
  6. 3 3
      examples/datetime-v2/src/DateTimeV2Example.vue
  7. 3 3
      examples/datetime/src/DateTimeExample.vue
  8. 7 5
      examples/image-preview/src/ImagePreviewExample.vue
  9. 7 7
      examples/loading/src/LoadingExample.vue
  10. 16 16
      examples/main.js
  11. 5 5
      examples/modal/src/ModalExample.vue
  12. 5 5
      examples/navbar/src/NavbarExample.vue
  13. 6 6
      examples/page-size-select/src/PageSizeSelectExample.vue
  14. 5 5
      examples/print/src/PrintExample.vue
  15. 26 26
      examples/route/index.js
  16. 3 3
      examples/scanner/src/ScannerExample.vue
  17. 3 3
      examples/switches/src/SwitchesExample.vue
  18. 3 3
      examples/time/src/TimeExample.vue
  19. 6 6
      examples/tree/src/TreeExample.vue
  20. 4 4
      examples/upload-widget/src/UploadWidgetExample.vue
  21. 5 5
      examples/vue-bootstrap-pagination/src/VueBootstrapPaginationExample.vue
  22. 16 16
      examples/vue-monthly-picker/src/VueMonthlyPickerExample.vue
  23. 3 3
      examples/year-picker/src/YearPickerExample.vue
  24. 10 6
      packages/checkbox/src/Checkbox.vue
  25. 75 74
      packages/common/Common.js
  26. 25 25
      packages/common/DownloadService.js
  27. 17 17
      packages/common/Language.js
  28. 33 33
      packages/common/Notify.js
  29. 27 27
      packages/common/UserStorageResource.js
  30. 22 22
      packages/common/Uuid.js
  31. 12 12
      packages/customer-window/src/api/CustomerWindowResource.js
  32. 4 4
      packages/date/index.js
  33. 29 18
      packages/date/src/Date.vue
  34. 1 1
      packages/date/src/vue-datepicker-setting.js
  35. 4 4
      packages/datetime-v2/index.js
  36. 30 21
      packages/datetime-v2/src/DateTimeV2.vue
  37. 4 4
      packages/datetime/index.js
  38. 18 14
      packages/datetime/src/DateTime.vue
  39. 1 1
      packages/datetime/src/vue-datepicker-setting.js
  40. 12 12
      packages/html-window/src/api/HtmlWindowResource.js
  41. 2 2
      packages/i18n/en-US.js
  42. 2 2
      packages/i18n/zh-CN.js
  43. 4 4
      packages/image-preview/index.js
  44. 10 8
      packages/image-preview/src/ImagePreview.vue
  45. 86 74
      packages/info/src/DocGeneratorSelected.vue
  46. 16 5
      packages/info/src/EnumSelectWidgetInfo.vue
  47. 71 48
      packages/info/src/InfoHeader.vue
  48. 87 63
      packages/info/src/InfoMultiSearchWidget.vue
  49. 99 69
      packages/info/src/InfoSearchWidget.vue
  50. 61 59
      packages/info/src/InfoUtil.js
  51. 78 54
      packages/info/src/InfoWindow.vue
  52. 25 25
      packages/info/src/InfoWindowUtil.js
  53. 67 47
      packages/info/src/QueryCondition.vue
  54. 73 46
      packages/info/src/QueryConditionComplex.vue
  55. 35 17
      packages/info/src/QueryConditionSimple.vue
  56. 297 263
      packages/info/src/QueryPage.vue
  57. 66 46
      packages/info/src/QueryPageImage.vue
  58. 119 97
      packages/info/src/SearchAutoCompleteWidget.vue
  59. 111 72
      packages/info/src/SearchWidget.vue
  60. 67 44
      packages/info/src/customer/ClientOrgnizationInfo.vue
  61. 4 4
      packages/loading/index.js
  62. 31 25
      packages/loading/src/Loading.vue
  63. 4 4
      packages/modal/index.js
  64. 59 42
      packages/modal/src/Modal.vue
  65. 7 7
      packages/modal/src/ModalFix.js
  66. 4 4
      packages/navbar/index.js
  67. 17 9
      packages/navbar/src/Navbar.vue
  68. 4 4
      packages/page-size-select/index.js
  69. 6 4
      packages/page-size-select/src/PageSizeSelect.vue
  70. 4 4
      packages/print/print-epc.js
  71. 4 4
      packages/print/print-widget.js
  72. 60 54
      packages/print/src/PrintEpc.vue
  73. 45 45
      packages/print/src/PrintEpcUtil.js
  74. 51 51
      packages/print/src/PrintUtil.js
  75. 49 36
      packages/print/src/PrintWidget.vue
  76. 18 6
      packages/process/src/EnumSelectWidget.vue
  77. 134 102
      packages/process/src/MultiSearchWidget.vue
  78. 39 39
      packages/process/src/ProcessReport.vue
  79. 54 49
      packages/process/src/ProcessReportArchive.vue
  80. 83 73
      packages/process/src/ProcessReportDynamic.vue
  81. 61 52
      packages/process/src/ProcessReportResult.vue
  82. 164 162
      packages/process/src/ProcessReportResultPreview.vue
  83. 180 170
      packages/process/src/ProcessReportStatic.vue
  84. 100 100
      packages/process/src/api/ProcessReportResource.js
  85. 4 4
      packages/scanner/index.js
  86. 44 42
      packages/scanner/src/Scanner.vue
  87. 4 4
      packages/switches/index.js
  88. 60 26
      packages/switches/src/Switches.vue
  89. 4 4
      packages/time/index.js
  90. 26 16
      packages/time/src/Time.vue
  91. 4 4
      packages/tree/index.js
  92. 39 17
      packages/tree/src/TreeViewNode.vue
  93. 4 4
      packages/upload-widget/index.js
  94. 14 8
      packages/upload-widget/src/UploadWidget.vue
  95. 4 4
      packages/vue-bootstrap-pagination/index.js
  96. 24 21
      packages/vue-bootstrap-pagination/src/vue-bootstrap-pagination.vue
  97. 190 177
      packages/vue-datepicker/src/vue-datepicker.vue
  98. 4 4
      packages/vue-monthly-picker/index.js
  99. 65 60
      packages/vue-monthly-picker/src/VueMonthlyPicker.vue
  100. 4 4
      packages/year-picker/index.js

+ 21 - 3
.eslintrc.js

@@ -19,7 +19,7 @@ module.exports = {
     browser: true,
     node: true,
     es6: true,
-    jquery: true
+    jquery: true,
   },
   rules: {
     // override/add rules settings here, such as:
@@ -27,14 +27,14 @@ module.exports = {
     // 此规则禁用不必要的分号。
     'no-extra-semi': 'off',
     // 该规则强制使用一致的分号
-    semi: ['error', 'never'],
+    semi: ['error', 'always'],
     // 该规则强制使用一致的反勾号、双引号或单引号。
     quotes: ['error', 'single'],
     // 该规则旨在强制使用一致的缩进风格。默认是 4个空格。
     indent: ['error', 2],
     // 该规则旨在通过限制代码行的长度来提高代码的可读性和可维护性。
     // 一行的长度为行中的 Unicode 字符的数量。
-    'max-len': ['error', { code: 135 }],
+    'max-len': ['error', { code: 185 }],
     // 这个规则强制在对象和数组字面量中使用一致的拖尾逗号。
     // "always-multiline" 当最后一个元素或属性与闭括号 ] 或 } 在 不同的行时,要求使用拖尾逗号;当在 同一行时,禁止使用拖尾逗号。
     'comma-dangle': ['error', 'always-multiline'],
@@ -56,5 +56,23 @@ module.exports = {
         },
       },
     ],
+
+    'no-unused-vars': [0, {
+      // function 参数未使用不检查
+      'args': 'none'
+    }],
+
+    "vue/v-on-event-hyphenation": ["warn", "always", {
+      "autofix": true,
+      "ignore": []
+    }]
+
   },
+  "globals":{
+    "document": true,
+    "localStorage": true,
+    "window": true,
+    "BootstrapDialog": true,
+    "moment": true,
+  }
 }

+ 3 - 3
examples/App.vue

@@ -81,7 +81,7 @@
 
 
 export default {
-  name: 'Desktop',
+  name: 'App',
 
   components: {
   },
@@ -89,12 +89,12 @@ export default {
   data() {
     return {
 
-    }
+    };
   },
 
   methods: {
 
   },
-}
+};
 </script>
 

+ 5 - 2
examples/Desktop.vue

@@ -8,6 +8,9 @@
 
 
 export default {
+  
+  // eslint-disable-next-line
+  name: 'Desktop',
 
   components: {
   },
@@ -15,13 +18,13 @@ export default {
   data: function () {
     return {
 
-    }
+    };
   },
 
   methods: {
 
   },
-}
+};
 </script>
 
 <style>

+ 6 - 6
examples/checkbox/src/CheckBoxExample.vue

@@ -65,9 +65,9 @@
 
 
 <script>
-import { defineComponent, ref } from 'vue'
+import { defineComponent, ref } from 'vue';
 
-import Checkbox from '@/checkbox/src/Checkbox.vue'
+import Checkbox from '@/checkbox/src/Checkbox.vue';
 
 export default defineComponent({
 
@@ -75,11 +75,11 @@ export default defineComponent({
     'Checkbox': Checkbox,
   },
   setup() {
-    const value1 = ref(false)
-    const value2 = ref(true)
+    const value1 = ref(false);
+    const value2 = ref(true);
     return {
       value1, value2,
-    }
+    };
   },
-})
+});
 </script>

+ 3 - 3
examples/date/src/DateExample.vue

@@ -53,7 +53,7 @@
 <script>
 
 
-import DateTime from '@/date/index.js'
+import DateTime from '@/date/index.js';
 
 export default {
   name: 'DateExample',
@@ -67,13 +67,13 @@ export default {
       dateValue: '2021-10-09',
       dateValueV2: '2021-10-09 14:02:00',
       dateValueV3: '2022-10-09 14:02:00',
-    }
+    };
   },
 
   methods: {
 
   },
-}
+};
 </script>
 
 <style>

+ 3 - 3
examples/datetime-v2/src/DateTimeV2Example.vue

@@ -50,7 +50,7 @@
 <script>
 
 
-import DateTimeV2 from '../../../packages/datetime-v2/index.js'
+import DateTimeV2 from '../../../packages/datetime-v2/index.js';
 
 export default {
   name: 'App',
@@ -65,13 +65,13 @@ export default {
       dateValue2: '2021-10-09 14:02:02',
       dateValue3: '2021-10-09 14:02:03',
       dateValue4: '2021-10-09 14:02:04',
-    }
+    };
   },
 
   methods: {
 
   },
-}
+};
 </script>
 
 <style>

+ 3 - 3
examples/datetime/src/DateTimeExample.vue

@@ -53,7 +53,7 @@
 <script>
 
 
-import DateTime from '@/datetime/index.js'
+import DateTime from '@/datetime/index.js';
 
 export default {
   name: 'DateExample',
@@ -67,13 +67,13 @@ export default {
       dateValue1: '2021-10-09 12:00:01',
       dateValue2: '2021-10-09 14:02:00',
       dateValue3: '2022-10-09 14:02:00',
-    }
+    };
   },
 
   methods: {
 
   },
-}
+};
 </script>
 
 <style>

+ 7 - 5
examples/image-preview/src/ImagePreviewExample.vue

@@ -14,7 +14,7 @@
 
 <script>
 
-import ImagePreview from '@/image-preview/index.js'
+import ImagePreview from '@/image-preview/index.js';
 
 export default {
 
@@ -23,17 +23,19 @@ export default {
   },
   data: function () {
     return {
+      
+      // eslint-disable-next-line
       src: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fn.sinaimg.cn%2Fent%2Ftransform%2F20161205%2FY3Kh-fxyipxf7613936.jpg&refer=http%3A%2F%2Fn.sinaimg.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1649490096&t=fcae8a8f3a2b9b036708d353e3c5d073',
-    }
+    };
   },
 
   methods: {
     preview: function(){
-      this.$refs.imagePreview.previewImage(this.src)
+      this.$refs.imagePreview.previewImage(this.src);
     },
     preview1: function(){
-      this.$refs.imagePreview1.previewImage(this.src)
+      this.$refs.imagePreview1.previewImage(this.src);
     },
   },
-}
+};
 </script>

+ 7 - 7
examples/loading/src/LoadingExample.vue

@@ -6,7 +6,7 @@
 
 <script>
 
-import Loading from '@/loading/index.js'
+import Loading from '@/loading/index.js';
 
 export default {
 
@@ -16,17 +16,17 @@ export default {
   data: function () {
     return {
 
-    }
+    };
   },
 
   methods: {
     start: function(){
-      this.$refs.loading.show()
-      let _self = this
+      this.$refs.loading.show();
+      let _self = this;
       window.setTimeout(function(){
-        _self.$refs.loading.hide()
-      }, 5000)
+        _self.$refs.loading.hide();
+      }, 5000);
     },
   },
-}
+};
 </script>

+ 16 - 16
examples/main.js

@@ -1,15 +1,15 @@
-import {createApp} from 'vue'
-import {createRouter, createWebHashHistory} from 'vue-router'
-import { createI18n } from 'vue-i18n/dist/vue-i18n.cjs.js'
-import {VTooltip} from 'v-tooltip'
-import mRouter from './route/index.js'
-import App from './App.vue'
+import {createApp} from 'vue';
+import {createRouter, createWebHashHistory} from 'vue-router';
+import { createI18n } from 'vue-i18n/dist/vue-i18n.cjs.js';
+import {VTooltip} from 'v-tooltip';
+import mRouter from './route/index.js';
+import App from './App.vue';
 
-import zh from '@/i18n/zh-CN.js'
-import en from '@/i18n/en-US.js'
+import zh from '@/i18n/zh-CN.js';
+import en from '@/i18n/en-US.js';
 
 // 默认语言
-const default_lang = 'zh'
+const default_lang = 'zh';
 
 const i18n = createI18n({
   locale: default_lang,
@@ -17,12 +17,12 @@ const i18n = createI18n({
     'zh': zh,
     'en': en,
   },
-})
+});
 
 const router = createRouter({
   history: createWebHashHistory(),
   routes: mRouter.routes, // (缩写) 相当于 routes: routes
-})
+});
 
 
 // new Vue({
@@ -32,8 +32,8 @@ const router = createRouter({
 // 	render: h => h(App)
 // })
 
-let app = createApp(App)
-app.use(i18n)
-app.use(router)
-app.use(VTooltip)
-app.mount('#app')
+let app = createApp(App);
+app.use(i18n);
+app.use(router);
+app.use(VTooltip);
+app.mount('#app');

+ 5 - 5
examples/modal/src/ModalExample.vue

@@ -23,7 +23,7 @@
 
 <script>
 
-import Modal from '@/modal/index.js'
+import Modal from '@/modal/index.js';
 
 export default {
 
@@ -33,7 +33,7 @@ export default {
   data: function(){
     return {
 
-    }
+    };
   },
 
   mounted: function(){
@@ -42,13 +42,13 @@ export default {
 
   methods: {
     show: function(){
-      this.$refs.modal.showModal()
+      this.$refs.modal.showModal();
     },
     show1: function(){
-      this.$refs.modal1.showModal()
+      this.$refs.modal1.showModal();
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 5 - 5
examples/navbar/src/NavbarExample.vue

@@ -14,7 +14,7 @@
 </template>
 
 <script>
-import Navbar from '@/navbar/index.js'
+import Navbar from '@/navbar/index.js';
 
 export default {
 
@@ -24,7 +24,7 @@ export default {
   data: function(){
     return {
 
-    }
+    };
   },
 
   mounted: function(){
@@ -33,13 +33,13 @@ export default {
 
   methods: {
     show: function(){
-      this.$refs.modal.showModal()
+      this.$refs.modal.showModal();
     },
     show1: function(){
-      this.$refs.modal1.showModal()
+      this.$refs.modal1.showModal();
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 6 - 6
examples/page-size-select/src/PageSizeSelectExample.vue

@@ -1,13 +1,13 @@
 <template>
   <h1>页面大小控件</h1>
 
-  <PageSizeSelect @pageSizeChanged="pageSize = $event" />
+  <PageSizeSelect @page-size-changed="pageSize = $event" />
 
   {{ pageSize }}
 </template>
 
 <script>
-import PageSizeSelect from '@/page-size-select/index.js'
+import PageSizeSelect from '@/page-size-select/index.js';
 
 export default {
 
@@ -17,7 +17,7 @@ export default {
   data: function(){
     return {
       pageSize: 20,
-    }
+    };
   },
 
   mounted: function(){
@@ -26,13 +26,13 @@ export default {
 
   methods: {
     show: function(){
-      this.$refs.modal.showModal()
+      this.$refs.modal.showModal();
     },
     show1: function(){
-      this.$refs.modal1.showModal()
+      this.$refs.modal1.showModal();
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 5 - 5
examples/print/src/PrintExample.vue

@@ -9,8 +9,8 @@
 </template>
 
 <script>
-import PrintEpc from '@/print/print-epc.js'
-import PrintWidget from '@/print/print-widget.js'
+import PrintEpc from '@/print/print-epc.js';
+import PrintWidget from '@/print/print-widget.js';
 
 export default {
 
@@ -21,7 +21,7 @@ export default {
   data: function(){
     return {
       pageSize: 20,
-    }
+    };
   },
 
   mounted: function(){
@@ -30,10 +30,10 @@ export default {
 
   methods: {
     printEpc: function(){
-      this.$refs.printEpc.show()
+      this.$refs.printEpc.show();
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 26 - 26
examples/route/index.js

@@ -1,28 +1,28 @@
-import Desktop from '../Desktop.vue'
-const CheckBoxExample = () => import(/* webpackChunkName: "check-box-example" */ '../checkbox/src/CheckBoxExample.vue')
-const DateExample = () => import(/* webpackChunkName: "date-example" */ '../date/src/DateExample.vue')
-const DateTimeExample = () => import(/* webpackChunkName: "date-time-example" */ '../datetime/src/DateTimeExample.vue')
-const DateTimeV2Example = () => import(/* webpackChunkName: "date-time-v2-example" */ '../datetime-v2/src/DateTimeV2Example.vue')
-const ModalExample = () => import(/* webpackChunkName: "modal-example" */ '../modal/src/ModalExample.vue')
-const NavbarExample = () => import(/* webpackChunkName: "nav-bar-example" */ '../navbar/src/NavbarExample.vue')
-const ImagePreviewExample = () => import(/* webpackChunkName: "image-preview-example" */ '../image-preview/src/ImagePreviewExample.vue')
-const PageSizeSelectExample = () => import(/* webpackChunkName: "page-size-select-example" */ '../page-size-select/src/PageSizeSelectExample.vue')
-const PrintExample = () => import(/* webpackChunkName: "print-example" */ '../print/src/PrintExample.vue')
-const ScannerExample = () => import(/* webpackChunkName: "scanner-example" */ '../scanner/src/ScannerExample.vue')
-const SwitchesExample = () => import(/* webpackChunkName: "switches-example" */ '../switches/src/SwitchesExample.vue')
-const TimeExample = () => import(/* webpackChunkName: "time-example" */ '../time/src/TimeExample.vue')
-const TreeExample = () => import(/* webpackChunkName: "tree-example" */ '../tree/src/TreeExample.vue')
-const UploadWidgetExample = () => import(/* webpackChunkName: "tree-example" */ '../upload-widget/src/UploadWidgetExample.vue')
-const VueBootstrapPaginationExample = () => import(/* webpackChunkName: "tree-example" */ '../vue-bootstrap-pagination/src/VueBootstrapPaginationExample.vue')
-const VueMonthlyPickerExample = () => import(/* webpackChunkName: "vue-monthly-picker-example" */ '../vue-monthly-picker/src/VueMonthlyPickerExample.vue')
-const YearPickerExample = () => import(/* webpackChunkName: "year-picker-example" */ '../year-picker/src/YearPickerExample.vue')
-
-
-
-const LoadingExample = () => import(/* webpackChunkName: "loading-example" */ '../loading/src/LoadingExample.vue')
-const ProcessReport = () => import(/* webpackChunkName: "process-report" */ '../../packages/process/src/ProcessReport.vue')
-const InfoWindow = () => import(/* webpackChunkName: "info-window" */ '../../packages/info/src/InfoWindow.vue')
-const DocGeneratorSelected = () => import(/* webpackChunkName: "doc-generator-selected" */ '../../packages/info/src/DocGeneratorSelected.vue')
+import Desktop from '../Desktop.vue';
+const CheckBoxExample = () => import(/* webpackChunkName: "check-box-example" */ '../checkbox/src/CheckBoxExample.vue');
+const DateExample = () => import(/* webpackChunkName: "date-example" */ '../date/src/DateExample.vue');
+const DateTimeExample = () => import(/* webpackChunkName: "date-time-example" */ '../datetime/src/DateTimeExample.vue');
+const DateTimeV2Example = () => import(/* webpackChunkName: "date-time-v2-example" */ '../datetime-v2/src/DateTimeV2Example.vue');
+const ModalExample = () => import(/* webpackChunkName: "modal-example" */ '../modal/src/ModalExample.vue');
+const NavbarExample = () => import(/* webpackChunkName: "nav-bar-example" */ '../navbar/src/NavbarExample.vue');
+const ImagePreviewExample = () => import(/* webpackChunkName: "image-preview-example" */ '../image-preview/src/ImagePreviewExample.vue');
+const PageSizeSelectExample = () => import(/* webpackChunkName: "page-size-select-example" */ '../page-size-select/src/PageSizeSelectExample.vue');
+const PrintExample = () => import(/* webpackChunkName: "print-example" */ '../print/src/PrintExample.vue');
+const ScannerExample = () => import(/* webpackChunkName: "scanner-example" */ '../scanner/src/ScannerExample.vue');
+const SwitchesExample = () => import(/* webpackChunkName: "switches-example" */ '../switches/src/SwitchesExample.vue');
+const TimeExample = () => import(/* webpackChunkName: "time-example" */ '../time/src/TimeExample.vue');
+const TreeExample = () => import(/* webpackChunkName: "tree-example" */ '../tree/src/TreeExample.vue');
+const UploadWidgetExample = () => import(/* webpackChunkName: "tree-example" */ '../upload-widget/src/UploadWidgetExample.vue');
+const VueBootstrapPaginationExample = () => import(/* webpackChunkName: "tree-example" */ '../vue-bootstrap-pagination/src/VueBootstrapPaginationExample.vue');
+const VueMonthlyPickerExample = () => import(/* webpackChunkName: "vue-monthly-picker-example" */ '../vue-monthly-picker/src/VueMonthlyPickerExample.vue');
+const YearPickerExample = () => import(/* webpackChunkName: "year-picker-example" */ '../year-picker/src/YearPickerExample.vue');
+
+
+
+const LoadingExample = () => import(/* webpackChunkName: "loading-example" */ '../loading/src/LoadingExample.vue');
+const ProcessReport = () => import(/* webpackChunkName: "process-report" */ '../../packages/process/src/ProcessReport.vue');
+const InfoWindow = () => import(/* webpackChunkName: "info-window" */ '../../packages/info/src/InfoWindow.vue');
+const DocGeneratorSelected = () => import(/* webpackChunkName: "doc-generator-selected" */ '../../packages/info/src/DocGeneratorSelected.vue');
 
 export default {
   routes: [
@@ -110,4 +110,4 @@ export default {
     // 	component: Test,  // 引入 组件
     // },
   ],
-}
+};

+ 3 - 3
examples/scanner/src/ScannerExample.vue

@@ -5,7 +5,7 @@
 </template>
 
 <script>
-import Scanner from '@/scanner/index.js'
+import Scanner from '@/scanner/index.js';
 
 export default {
 
@@ -15,7 +15,7 @@ export default {
   data: function(){
     return {
 
-    }
+    };
   },
 
   mounted: function(){
@@ -25,7 +25,7 @@ export default {
   methods: {
         
   },
-}
+};
 </script>
 
 <style scoped>

+ 3 - 3
examples/switches/src/SwitchesExample.vue

@@ -47,7 +47,7 @@
 </template>
 
 <script>
-import Switches from '@/switches/index.js'
+import Switches from '@/switches/index.js';
 
 export default {
 
@@ -63,7 +63,7 @@ export default {
       value4: false,
       value5: false,
       value6: false,
-    }
+    };
   },
 
   mounted: function(){
@@ -73,7 +73,7 @@ export default {
   methods: {
         
   },
-}
+};
 </script>
 
 <style scoped>

+ 3 - 3
examples/time/src/TimeExample.vue

@@ -56,7 +56,7 @@
 <script>
 
 
-import Time from '@/time/index.js'
+import Time from '@/time/index.js';
 
 export default {
   name: 'DateExample',
@@ -70,13 +70,13 @@ export default {
       dateValue1: '12:00:01',
       dateValue2: '14:02:00',
       dateValue3: '14:02:00',
-    }
+    };
   },
 
   methods: {
 
   },
-}
+};
 </script>
 
 <style>

+ 6 - 6
examples/tree/src/TreeExample.vue

@@ -7,7 +7,7 @@
       :node="data"
       :is-root="true"
       :is-show-check="true"
-      @nodeSelect="categorySelect"
+      @node-select="categorySelect"
     />
 
     <div>选择的节点: {{ selectedNode.id }}.{{ selectedNode.text }}</div>
@@ -17,7 +17,7 @@
 <script>
 
 
-import TreeViewNode from '@/tree/index.js'
+import TreeViewNode from '@/tree/index.js';
 
 export default {
   name: 'DateExample',
@@ -52,7 +52,7 @@ export default {
       ],
 
       selectedNode: {},
-    }
+    };
   },
 
   methods: {
@@ -61,12 +61,12 @@ export default {
          * 类别选择发生改变
          */
     categorySelect: function (node) {
-      node.selected = !node.selected
-      this.selectedNode = node
+      node.selected = !node.selected;
+      this.selectedNode = node;
     },
 
   },
-}
+};
 </script>
 
 <style>

+ 4 - 4
examples/upload-widget/src/UploadWidgetExample.vue

@@ -8,7 +8,7 @@
 <script>
 
 
-import UploadWidget from '@/upload-widget/index.js'
+import UploadWidget from '@/upload-widget/index.js';
 
 export default {
 
@@ -19,17 +19,17 @@ export default {
   data: function () {
     return {
             
-    }
+    };
   },
 
   methods: {
 
     upload: function (files) {
-      alert('共计上传:' + files.length + '个文件。')
+      alert('共计上传:' + files.length + '个文件。');
     },
 
   },
-}
+};
 </script>
 
 <style>

+ 5 - 5
examples/vue-bootstrap-pagination/src/VueBootstrapPaginationExample.vue

@@ -13,7 +13,7 @@
 <script>
 
 
-import VueBootstrapPagination from '@/vue-bootstrap-pagination/index.js'
+import VueBootstrapPagination from '@/vue-bootstrap-pagination/index.js';
 
 export default {
 
@@ -32,16 +32,16 @@ export default {
 
       start: '',
       length: '',
-    }
+    };
   },
 
   methods: {
     query: function () {
-      this.start = (this.pagination.current_page - 1) * this.pagination.per_page
-      this.length = this.pagination.per_page
+      this.start = (this.pagination.current_page - 1) * this.pagination.per_page;
+      this.length = this.pagination.per_page;
     },
   },
-}
+};
 </script>
 
 <style>

+ 16 - 16
examples/vue-monthly-picker/src/VueMonthlyPickerExample.vue

@@ -72,11 +72,11 @@
           class="form-control"
         >
           <option
-            v-for="alignment in alignments"
-            :key="alignment"
-            :value="alignment"
+            v-for="alignment1 in alignments"
+            :key="alignment1"
+            :value="alignment1"
           >
-            {{ alignment }}
+            {{ alignment1 }}
           </option>
         </select>
       </div>
@@ -101,9 +101,9 @@
 </template>
 
 <script>
-import moment from 'moment'
-import VueMonthlyPicker from '@/vue-monthly-picker/index.js'
-import Switches from '@/switches/index.js'
+import moment from 'moment';
+import VueMonthlyPicker from '@/vue-monthly-picker/index.js';
+import Switches from '@/switches/index.js';
 
 export default {
   name: 'App',
@@ -141,35 +141,35 @@ export default {
       max: null,
       isLimitRange: false,
       clearOption: true,
-    }
+    };
   },
   computed: {
     rangeDisplay() {
       if (!this.min || !this.max) {
-        return 'Disabled'
+        return 'Disabled';
       }
-      return this.min.format('YYYY/MM') + '-' + this.max.format('YYYY/MM')
+      return this.min.format('YYYY/MM') + '-' + this.max.format('YYYY/MM');
     },
   },
   watch: {
     isLimitRange(newValue) {
       if (newValue) {
-        this.setSelectRange(moment().subtract(6, 'months'), moment().add(6, 'months'))
+        this.setSelectRange(moment().subtract(6, 'months'), moment().add(6, 'months'));
       } else {
-        this.setSelectRange(null, null)
+        this.setSelectRange(null, null);
       }
     },
   },
   methods: {
     handleSelect(value) {
-      console.log('Select', value)
+      console.log('Select', value);
     },
     setSelectRange(min, max) {
-      this.min = min
-      this.max = max
+      this.min = min;
+      this.max = max;
     },
   },
-}
+};
 </script>
 
 <style>

+ 3 - 3
examples/year-picker/src/YearPickerExample.vue

@@ -7,7 +7,7 @@
 </template>
 
 <script>
-import YearPicker from '@/year-picker/index.js'
+import YearPicker from '@/year-picker/index.js';
 
 export default {
 
@@ -17,7 +17,7 @@ export default {
   data: function(){
     return {
       year: '2022',
-    }
+    };
   },
 
   mounted: function(){
@@ -27,7 +27,7 @@ export default {
   methods: {
       
   },
-}
+};
 </script>
 
 <style scoped>

+ 10 - 6
packages/checkbox/src/Checkbox.vue

@@ -30,10 +30,11 @@
 </template>
 
 <script>
-import Uuid from '../../common/Uuid.js'
+import Uuid from '../../common/Uuid.js';
 
 
 export default {
+  // eslint-disable-next-line
   name: 'Checkbox',
 
 
@@ -41,7 +42,7 @@ export default {
     id: {
       type: String,
       default: function () {
-        return 'checkbox-id-' + Uuid.createUUID()
+        return 'checkbox-id-' + Uuid.createUUID();
       },
     },
     name: {
@@ -49,6 +50,7 @@ export default {
       default: null,
     },
     value: {
+      type: Boolean,
       default: undefined,
     },
     className: {
@@ -65,10 +67,12 @@ export default {
     },
   },
 
+  emits: ['update:value'],
+
   data: function () {
     return {
       'myValue': false,
-    }
+    };
   },
 
   computed: {
@@ -78,7 +82,7 @@ export default {
   watch: {
     value: {
       handler(newValue, oldValue) {
-        this.myValue = newValue
+        this.myValue = newValue;
       },
       immediate: true,
     },
@@ -87,10 +91,10 @@ export default {
   methods: {
     onChange() {
       // this.myValue = !this.myValue;
-      this.$emit('update:value', !this.myValue)
+      this.$emit('update:value', !this.myValue);
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 75 - 74
packages/common/Common.js

@@ -1,4 +1,4 @@
-var Notify = require('./Notify.js')
+var Notify = require('./Notify.js');
 
 
 export default {
@@ -7,41 +7,41 @@ export default {
 
   // 异常处理
   processException: function (XMLHttpRequest, textStatus, errorThrown) {
-    var _self = this
-    console.log(XMLHttpRequest)
+    var _self = this;
+    console.log(XMLHttpRequest);
     if (XMLHttpRequest.status == 400) {
       // 400 Bad Request
-      Notify.error('400', XMLHttpRequest.responseText, true)
+      Notify.error('400', XMLHttpRequest.responseText, true);
     } else if (XMLHttpRequest.status == 401) {
-      var currentUrl = window.location
-      var href = window.location.href
+      var currentUrl = window.location;
+      var href = window.location.href;
       // 当前未处于登陆的界面
       // 系统未登录
       if (href.indexOf('login') < 0 && href.indexOf('redirectUrl=') < 0) {
         // 处理钉钉免登陆
-        const clientId = this.getRouteParam('clientId')
-        const appName = this.getRouteParam('appName')
-        const corpId = this.getRouteParam('corpId')
+        const clientId = this.getRouteParam('clientId');
+        const appName = this.getRouteParam('appName');
+        const corpId = this.getRouteParam('corpId');
 
-        let newUrl
+        let newUrl;
         if (clientId != null && clientId.length > 0 && appName != null && appName.length > 0 && corpId != null && corpId.length > 0) {
-          newUrl = _self.getRedirectUrl('#/login?clientId=' + clientId + '&appName=' + appName + '&corpId=' + corpId + '&redirectUrl=' + encodeURIComponent(currentUrl))
+          newUrl = _self.getRedirectUrl('#/login?clientId=' + clientId + '&appName=' + appName + '&corpId=' + corpId + '&redirectUrl=' + encodeURIComponent(currentUrl));
         } else {
-          newUrl = _self.getRedirectUrl('#/login?redirectUrl=' + encodeURIComponent(currentUrl))
+          newUrl = _self.getRedirectUrl('#/login?redirectUrl=' + encodeURIComponent(currentUrl));
         }
-        window.location = newUrl
+        window.location = newUrl;
       }
     } else if (XMLHttpRequest.status == 500) {
       // 500 Internal Server Error
-      Notify.error('500', XMLHttpRequest.responseText, true)
+      Notify.error('500', XMLHttpRequest.responseText, true);
       if (XMLHttpRequest.responseText.indexOf('登录超时') > 0) {
         // 如果异常信息包含“登录超时”,则2秒后跳转到登录页面
         setTimeout(function () {
-          window.location = _self.getRedirectUrl('#/login')
-        }, 2 * 1000)
+          window.location = _self.getRedirectUrl('#/login');
+        }, 2 * 1000);
       }
     } else {
-      Notify.error('服务器异常', XMLHttpRequest.responseText, true)
+      Notify.error('服务器异常', XMLHttpRequest.responseText, true);
     }
   },
 
@@ -50,27 +50,27 @@ export default {
    * 获取主机地址
    */
   getRootPath: function () {
-    var protocol = window.location.protocol
+    var protocol = window.location.protocol;
     //console.log("protocol:" + protocol);
-    var host = window.location.host
+    var host = window.location.host;
     //console.log("host:" + host);
-    var localhostPaht = protocol + '//' + host
+    var localhostPaht = protocol + '//' + host;
     //console.log("localhostPaht:" + localhostPaht);
-    return localhostPaht
+    return localhostPaht;
   },
 
   getHostPageBaseURL: function () {
-    return this.getRootPath() + '/'
+    return this.getRootPath() + '/';
   },
 
   // 获取图片路径url
   getFileServerUrl: function () {
-    return this.getRootPath() + '/'
+    return this.getRootPath() + '/';
   },
 
   // 获取API的地址
   getApiURL: function (apiName) {
-    return this.getHostPageBaseURL() + 'api/' + apiName
+    return this.getHostPageBaseURL() + 'api/' + apiName;
   },
 
   /**
@@ -80,54 +80,54 @@ export default {
    */
   getApiUrl2: function (apiName) {
     if (apiName === undefined || apiName === null || apiName.length === 0) {
-      return this.getRootPath()
+      return this.getRootPath();
     }
     if (apiName[0] === '/') {
-      return this.getRootPath() + apiName
+      return this.getRootPath() + apiName;
     } else {
-      return this.getRootPath() + '/' + apiName
+      return this.getRootPath() + '/' + apiName;
     }
   },
 
 
   // 获取测试API的地址
   getTestApiURL: function (apiName) {
-    return 'http://xxx/' + 'api/' + apiName
+    return 'http://xxx/' + 'api/' + apiName;
   },
 
   // 获取图片路径
   getImageUrl: function (imageName) {
     if (imageName == null || imageName == '') {
-      return this.getFileServerUrl() + 'notFound.png'
+      return this.getFileServerUrl() + 'notFound.png';
     } else {
-      return this.getFileServerUrl() + imageName
+      return this.getFileServerUrl() + imageName;
     }
   },
 
   // 获取图片路径
   getImageSrc: function (className, imageName) {
-    var accountId = localStorage.getItem('account')
+    var accountId = localStorage.getItem('account');
     if (imageName == null) {
-      return null
+      return null;
     }
     if (imageName != null && imageName[0] == '/') {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + imageName
+      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + imageName;
     } else {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/' + imageName
+      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/' + imageName;
     }
   },
 
 
   // 获取略缩图图片路径
   getThumbnailImageSrc: function (className, imageName) {
-    var accountId = localStorage.getItem('account')
+    var accountId = localStorage.getItem('account');
     if (imageName == null) {
-      return null
+      return null;
     }
     if (imageName != null && imageName[0] == '/') {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/thumbnail' + imageName
+      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/thumbnail' + imageName;
     } else {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/thumbnail/' + imageName
+      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/thumbnail/' + imageName;
     }
   },
 
@@ -138,38 +138,38 @@ export default {
    * @return {[type]}           [description]
    */
   getAttachmentsSrc: function (className, imageName) {
-    var accountId = localStorage.getItem('account')
-    return this.getFileServerUrl() + 'Files/' + accountId + '/Attachments/' + className + '/' + imageName
+    var accountId = localStorage.getItem('account');
+    return this.getFileServerUrl() + 'Files/' + accountId + '/Attachments/' + className + '/' + imageName;
   },
 
   // 获取图片路径
   getVideoSrc: function (className, imageName) {
-    var accountId = localStorage.getItem('account')
+    var accountId = localStorage.getItem('account');
     if (imageName == undefined || imageName == '') {
-      return this.getHostPageBaseURL() + 'static/image/noImage.jpg'
+      return this.getHostPageBaseURL() + 'static/image/noImage.jpg';
     }
 
-    return this.getFileServerUrl() + 'Files/' + accountId + '/Video/' + className + '/' + imageName
+    return this.getFileServerUrl() + 'Files/' + accountId + '/Video/' + className + '/' + imageName;
   },
 
   // 给请求头中加上account和token信息
   addTokenToRequest: function (request) {
-    var token = $.cookie('token')
-    var account = $.cookie('account')
+    var token = $.cookie('token');
+    var account = $.cookie('account');
     if (token == undefined) {
-      var localStorageToken = localStorage.getItem('token')
+      var localStorageToken = localStorage.getItem('token');
       if (localStorageToken != undefined) {
-        token = localStorageToken
+        token = localStorageToken;
       }
     }
     if (account == undefined) {
-      var localStorageAccount = localStorage.getItem('account')
+      var localStorageAccount = localStorage.getItem('account');
       if (localStorageAccount != undefined) {
-        account = localStorageAccount
+        account = localStorageAccount;
       }
     }
-    request.setRequestHeader('account', account)
-    request.setRequestHeader('token', token)
+    request.setRequestHeader('account', account);
+    request.setRequestHeader('token', token);
 
   },
 
@@ -177,20 +177,21 @@ export default {
    * 获取Token
    */
   getToken: function () {
-    return $.cookie('token')
+    return $.cookie('token');
   },
 
   // 清空 Cookie
   clearCookie: function () {
-    var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
+    // eslint-disable-next-line
+    var keys = document.cookie.match('/[^ =;]+(?=\=)/g');
     if (keys) {
       for (var i = keys.length; i--;) {
         // 清除当前域名路径的有限日期
-        document.cookie = keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString()
+        document.cookie = keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString();
         // Domain Name域名 清除当前域名的
-        document.cookie = keys[i] + '=0;path=/;domain=' + document.domain + ';expires=' + new Date(0).toUTCString()
+        document.cookie = keys[i] + '=0;path=/;domain=' + document.domain + ';expires=' + new Date(0).toUTCString();
         // 清除一级域名下的或指定的
-        document.cookie = keys[i] + '=0;path=/;domain=baidu.com;expires=' + new Date(0).toUTCString()
+        document.cookie = keys[i] + '=0;path=/;domain=baidu.com;expires=' + new Date(0).toUTCString();
       }
     }
   },
@@ -198,9 +199,9 @@ export default {
 
   // 获取路由中的参数
   getRouteParam: function (name) {
-    var reg = new RegExp('(^|\\?|&)' + name + '=([^&]*)(\\s|&|$)', 'i')
-    if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, ' '))
-    return ''
+    var reg = new RegExp('(^|\\?|&)' + name + '=([^&]*)(\\s|&|$)', 'i');
+    if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, ' '));
+    return '';
   },
 
 
@@ -209,39 +210,39 @@ export default {
    * @param {*} url 
    */
   getRedirectUrl: function (url) {
-    var href = window.location.href
+    var href = window.location.href;
     if (href.indexOf('pcapp') >= 0) {
-      return this.getRootPath() + '/pcapp/' + url
+      return this.getRootPath() + '/pcapp/' + url;
     } else {
-      return this.getRootPath() + '/' + url
+      return this.getRootPath() + '/' + url;
     }
   },
 
   clearLocalStorage: function () {
     // 清理localStorage时需要保留的参数列表
     var reserveParams = ['hostPageBaseURL', 'workShopId', 'resourceInstanceId',
-      'resourceInstanceName', 'apsBaseUrl', 'cameraBaseURL']
+      'resourceInstanceName', 'apsBaseUrl', 'cameraBaseURL'];
     //存放的信息
-    var reserveParamValues = []
+    var reserveParamValues = [];
 
     //获取参数信息 
-    var len = reserveParams.length
-    for (var i = 0; i < len; i++) {
-      var reserveParam = reserveParams[i]
-      var reserveParamValue = ''
+    var len = reserveParams.length;
+    for (let i = 0; i < len; i++) {
+      var reserveParam = reserveParams[i];
+      var reserveParamValue = '';
       if (localStorage.getItem(reserveParam) != undefined) {
-        reserveParamValue = localStorage.getItem(reserveParam)
+        reserveParamValue = localStorage.getItem(reserveParam);
       }
-      reserveParamValues.push(reserveParamValue)
+      reserveParamValues.push(reserveParamValue);
     }
 
     //清理localStorage
-    window.localStorage.clear()
+    window.localStorage.clear();
 
     //还原参数信息
-    for (var i = 0; i < len; i++) {
-      localStorage.setItem(reserveParams[i], reserveParamValues[i])
+    for (let i = 0; i < len; i++) {
+      localStorage.setItem(reserveParams[i], reserveParamValues[i]);
     }
   },
-}
+};
 

+ 25 - 25
packages/common/DownloadService.js

@@ -1,4 +1,4 @@
-var Common = require('./Common.js')
+var Common = require('./Common.js');
 
 /**
  * 报表下载服务
@@ -11,12 +11,12 @@ export default {
 	 * @param {*} fileName 
 	 */
   downloadFile: function (url, fileName) {
-    var a = document.createElement('a')
-    a.download = fileName
-    a.href = url
-    $('body').append(a) // 修复firefox中无法触发click
-    a.click()
-    $(a).remove()
+    var a = document.createElement('a');
+    a.download = fileName;
+    a.href = url;
+    $('body').append(a); // 修复firefox中无法触发click
+    a.click();
+    $(a).remove();
   },
 
 
@@ -26,8 +26,8 @@ export default {
 	 * @author GuoZhiBo 20200410
 	 */
   reportDownload: function (fileName) {
-    var downloadUrl = Common.getApiURL('file/reportDownload') + '?fileName=' + window.encodeURIComponent(fileName)
-    this.downloadFile(downloadUrl, fileName)
+    var downloadUrl = Common.getApiURL('file/reportDownload') + '?fileName=' + window.encodeURIComponent(fileName);
+    this.downloadFile(downloadUrl, fileName);
   },
 
   /**
@@ -37,9 +37,9 @@ export default {
 	 * @author GuoZhiBo 20211008
 	 */
   fileDownload:function(className, fileName){
-	 	var downloadUrl = Common.getApiURL('file/fileDownload') + '?className=' + className
-	                + '&fileName=' + window.encodeURIComponent(fileName)
-	    this.downloadFile(downloadUrl, fileName)
+    var downloadUrl = Common.getApiURL('file/fileDownload') + '?className=' + className
+        + '&fileName=' + window.encodeURIComponent(fileName);
+    this.downloadFile(downloadUrl, fileName);
   },
 
   /**
@@ -48,20 +48,20 @@ export default {
 	 * @param {post请求需要的参数} params 
 	 */
   postDownloadFile: function (url, params) {
-    var form = document.createElement('form')
-    form.style.display = 'none'
-    form.action = url
-    form.method = 'post'
-    document.body.appendChild(form)
+    var form = document.createElement('form');
+    form.style.display = 'none';
+    form.action = url;
+    form.method = 'post';
+    document.body.appendChild(form);
     // 动态创建input并给value赋值
     for (var key in params) {
-      var input = document.createElement('input')
-      input.type = 'hidden'
-      input.name = key
-      input.value = params[key]
-      form.appendChild(input)
+      var input = document.createElement('input');
+      input.type = 'hidden';
+      input.name = key;
+      input.value = params[key];
+      form.appendChild(input);
     }
-    form.submit()
-    form.remove()
+    form.submit();
+    form.remove();
   },
-}
+};

+ 17 - 17
packages/common/Language.js

@@ -4,12 +4,12 @@ export default {
      */
   getMenuNameTrl: function (locale, menu) {
     if (menu == null || menu == '') {
-      return null
+      return null;
     }
     if (locale == 'en-US') {
-      return (menu.nameEng == null || menu.nameEng == '') ? menu.name : menu.nameEng
+      return (menu.nameEng == null || menu.nameEng == '') ? menu.name : menu.nameEng;
     } else {
-      return menu.name
+      return menu.name;
     }
   },
 
@@ -19,15 +19,15 @@ export default {
   getNameTrl: function (locale, data) {
 
     if (data.fieldName == 'ai.name') {
-      let a = 0
+      let a = 0;
     }
     if (data == null || data == '') {
-      return null
+      return null;
     }
     if (locale == 'en-US') {
-      return (data.nameEng == null || data.nameEng == '') ? data.name : data.nameEng
+      return (data.nameEng == null || data.nameEng == '') ? data.name : data.nameEng;
     } else {
-      return data.name
+      return data.name;
     }
   },
 
@@ -36,12 +36,12 @@ export default {
      */
   getHelpTrl: function (locale, data) {
     if (data == null || data == '') {
-      return null
+      return null;
     }
     if (locale == 'en-US') {
-      return (data.helpEng == null || data.helpEng == '') ? data.help : data.helpEng
+      return (data.helpEng == null || data.helpEng == '') ? data.help : data.helpEng;
     } else {
-      return data.help
+      return data.help;
     }
   },
 
@@ -50,23 +50,23 @@ export default {
      */
   getDisplayNameTrl: function (locale, data) {
     if (data == null || data == '') {
-      return null
+      return null;
     }
     if (locale == 'en-US') {
-      return (data.displayNameEng == null || data.displayNameEng == '') ? data.displayName : data.displayNameEng
+      return (data.displayNameEng == null || data.displayNameEng == '') ? data.displayName : data.displayNameEng;
     } else {
-      return data.displayName
+      return data.displayName;
     }
   },
 
   getGroupNameTrl: function (locale, data) {
     if (data == null || data == '') {
-      return null
+      return null;
     }
     if (locale == 'en-US') {
-      return (data.groupNameEng == null || data.groupNameEng == '') ? data.groupName : data.groupNameEng
+      return (data.groupNameEng == null || data.groupNameEng == '') ? data.groupName : data.groupNameEng;
     } else {
-      return data.groupName
+      return data.groupName;
     }
   },
-}
+};

+ 33 - 33
packages/common/Notify.js

@@ -1,15 +1,15 @@
-var ModalFix = require('../modal/src/ModalFix.JS')
+var ModalFix = require('../modal/src/ModalFix.JS');
 
 export default {
   /**
      * 显示模态框
      */
   show : function(options){
-    var dialog = BootstrapDialog.show(options)
+    var dialog = BootstrapDialog.show(options);
 
     dialog.getModal().on('hidden.bs.modal', {dialog: this}, function (event) {
-      ModalFix.fix()
-    })
+      ModalFix.fix();
+    });
   },
 
   /**
@@ -25,16 +25,16 @@ export default {
       title: title,
       message: content,
       type: BootstrapDialog.TYPE_WARNING,
-    })
+    });
 
     dialog.getModal().on('hidden.bs.modal', {dialog: this}, function (event) {
-      ModalFix.fix()
-    })
+      ModalFix.fix();
+    });
 
     if(autoClose && autoClose > 0){
       setTimeout(function(){
-        dialog.close()
-      }, autoClose)
+        dialog.close();
+      }, autoClose);
     }
   },
 
@@ -50,12 +50,12 @@ export default {
       title: title,
       message: content,
       type: BootstrapDialog.TYPE_WARNING,
-    		size: BootstrapDialog.SIZE_WIDE,
-    })
+      size: BootstrapDialog.SIZE_WIDE,
+    });
 
     dialog.getModal().on('hidden.bs.modal', {dialog: this}, function (event) {
-      ModalFix.fix()
-    })
+      ModalFix.fix();
+    });
   },
 
 
@@ -72,17 +72,17 @@ export default {
       title: title,
       message: content,
       type: BootstrapDialog.TYPE_INFO,
-    })
+    });
 
     dialog.getModal().on('hidden.bs.modal', {dialog: this}, function (event) {
-      ModalFix.fix()
-    })
+      ModalFix.fix();
+    });
 
         
     if(autoClose && autoClose > 0){
       setTimeout(function(){
-        dialog.close()
-      }, autoClose)
+        dialog.close();
+      }, autoClose);
     }
   },
 
@@ -100,18 +100,18 @@ export default {
       title: title,
       message: content,
       type: BootstrapDialog.TYPE_INFO,
-    		size: BootstrapDialog.SIZE_WIDE,
-    })
+      size: BootstrapDialog.SIZE_WIDE,
+    });
 
     dialog.getModal().on('hidden.bs.modal', {dialog: this}, function (event) {
-      ModalFix.fix()
-    })
+      ModalFix.fix();
+    });
 
         
     if(autoClose && autoClose > 0){
       setTimeout(function(){
-        dialog.close()
-      }, autoClose)
+        dialog.close();
+      }, autoClose);
     }
   },
 
@@ -128,17 +128,17 @@ export default {
       title: title,
       message: content,
       type: BootstrapDialog.TYPE_SUCCESS,
-    })
+    });
 
     dialog.getModal().on('hidden.bs.modal', {dialog: this}, function (event) {
-      ModalFix.fix()
-    })
+      ModalFix.fix();
+    });
 
         
     if(autoClose && autoClose > 0){
       setTimeout(function(){
-        dialog.close()
-      }, autoClose)
+        dialog.close();
+      }, autoClose);
     }
   },
 
@@ -155,11 +155,11 @@ export default {
       title: title,
       message: content,
       type: BootstrapDialog.TYPE_DANGER,
-    })
+    });
 
     dialog.getModal().on('hidden.bs.modal', {dialog: this}, function (event) {
-      ModalFix.fix()
-    })
+      ModalFix.fix();
+    });
   },
     
-}
+};

+ 27 - 27
packages/common/UserStorageResource.js

@@ -1,4 +1,4 @@
-var Common = require('./Common.js')
+var Common = require('./Common.js');
 
 /**
  * 工具类自动生成的API,请勿做任何修改,请勿做任何修改,请勿做任何修改(重要的事情说3遍)
@@ -13,7 +13,7 @@ export default {
 	 * 清空用户userStorage 
 	 */
   clearUserStorage: function(){
-    var requestUrl = 'UserStorageResource/clearUserStorage'
+    var requestUrl = 'UserStorageResource/clearUserStorage';
 
 
     return new Promise((resolve, reject) => {
@@ -25,16 +25,16 @@ export default {
 				
 				
         beforeSend: function(request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function(data) {
-          resolve(data)
+          resolve(data);
         },
         error: function(XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -43,7 +43,7 @@ export default {
 	 *  
 	 */
   downloadUserStorage: function(){
-    var requestUrl = 'UserStorageResource/downloadUserStorage'
+    var requestUrl = 'UserStorageResource/downloadUserStorage';
 
 
     return new Promise((resolve, reject) => {
@@ -55,16 +55,16 @@ export default {
 				
 				
         beforeSend: function(request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function(data) {
-          resolve(data)
+          resolve(data);
         },
         error: function(XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -73,9 +73,9 @@ export default {
 	 * 根据key查询UserStorageDto 
 	 */
   uniqueByKey: function(key){
-    var requestUrl = 'UserStorageResource/uniqueByKey/{key}'
+    var requestUrl = 'UserStorageResource/uniqueByKey/{key}';
     if(key != null){
-      requestUrl = requestUrl.replace('{key}', key)
+      requestUrl = requestUrl.replace('{key}', key);
     }
 
 
@@ -88,16 +88,16 @@ export default {
 				
 				
         beforeSend: function(request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function(data) {
-          resolve(data)
+          resolve(data);
         },
         error: function(XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -106,7 +106,7 @@ export default {
 	 * 保存用户localStorage 
 	 */
   uploadUserStorage: function(userStorageDtos){
-    var requestUrl = 'UserStorageResource/uploadUserStorage'
+    var requestUrl = 'UserStorageResource/uploadUserStorage';
 
 
     return new Promise((resolve, reject) => {
@@ -119,15 +119,15 @@ export default {
         data: JSON.stringify(userStorageDtos),
 				
         beforeSend: function(request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function(data) {
-          resolve(data)
+          resolve(data);
         },
         error: function(XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
-}
+};

+ 22 - 22
packages/common/Uuid.js

@@ -1,18 +1,18 @@
 export default {
   createUUID: function () {
-    var _self = this
+    var _self = this;
     // Loose interpretation of the specification DCE 1.1: Remote Procedure Call
     // since JavaScript doesn't allow access to internal systems, the last 48 bits 
     // of the node section is made up using a series of random numbers (6 octets long).
     //  
-    var dg = new Date(1582, 10, 15, 0, 0, 0, 0)
-    var dc = new Date()
-    var t = dc.getTime() - dg.getTime()
-    var tl = _self.getIntegerBits(t, 0, 31)
-    var tm = _self.getIntegerBits(t, 32, 47)
-    var thv = _self.getIntegerBits(t, 48, 59) + '1' // version 1, security version is 2
-    var csar = _self.getIntegerBits(_self.rand(4095), 0, 7)
-    var csl = _self.getIntegerBits(_self.rand(4095), 0, 7)
+    var dg = new Date(1582, 10, 15, 0, 0, 0, 0);
+    var dc = new Date();
+    var t = dc.getTime() - dg.getTime();
+    var tl = _self.getIntegerBits(t, 0, 31);
+    var tm = _self.getIntegerBits(t, 32, 47);
+    var thv = _self.getIntegerBits(t, 48, 59) + '1'; // version 1, security version is 2
+    var csar = _self.getIntegerBits(_self.rand(4095), 0, 7);
+    var csl = _self.getIntegerBits(_self.rand(4095), 0, 7);
     // since detection of anything about the machine/browser is far to buggy, 
     // include some more random numbers here
     // if NIC or an IP can be obtained reliably, that should be put in
@@ -21,39 +21,39 @@ export default {
 			_self.getIntegerBits(_self.rand(8191), 8, 15) +
 			_self.getIntegerBits(_self.rand(8191), 0, 7) +
 			_self.getIntegerBits(_self.rand(8191), 8, 15) +
-			_self.getIntegerBits(_self.rand(8191), 0, 15) // this last number is two octets long
-    return tl + tm + thv + csar + csl + n
+			_self.getIntegerBits(_self.rand(8191), 0, 15); // this last number is two octets long
+    return tl + tm + thv + csar + csl + n;
   },
 
   //Pull out only certain bits from a very large integer, used to get the time
   //code information for the first part of a UUID. Will return zero's if there 
   //aren't enough bits to shift where it needs to.
   getIntegerBits: function (val, start, end) {
-    var base16 = this.returnBase(val, 16)
-    var quadArray = new Array()
-    var quadString = ''
-    var i = 0
+    var base16 = this.returnBase(val, 16);
+    var quadArray = new Array();
+    var quadString = '';
+    var i = 0;
     for (i = 0; i < base16.length; i++) {
-      quadArray.push(base16.substring(i, i + 1))
+      quadArray.push(base16.substring(i, i + 1));
     }
     for (i = Math.floor(start / 4); i <= Math.floor(end / 4); i++) {
       if (!quadArray[i] || quadArray[i] == '')
-        quadString += '0'
+        quadString += '0';
       else
-        quadString += quadArray[i]
+        quadString += quadArray[i];
     }
-    return quadString
+    return quadString;
   },
 
   //Replaced from the original function to leverage the built in methods in
   //JavaScript. Thanks to Robert Kieffer for pointing this one out
   returnBase: function (number, base) {
-    return (number).toString(base).toUpperCase()
+    return (number).toString(base).toUpperCase();
   },
 
   //pick a random number within a range of numbers
   //int b rand(int a); where 0 <= b <= a
   rand: function (max) {
-    return Math.floor(Math.random() * (max + 1))
+    return Math.floor(Math.random() * (max + 1));
   },
-}
+};

+ 12 - 12
packages/customer-window/src/api/CustomerWindowResource.js

@@ -1,4 +1,4 @@
-var Common = require('../../../common/Common.js')
+var Common = require('../../../common/Common.js');
 
 /**
  * 工具类自动生成的API,请勿做任何修改,请勿做任何修改,请勿做任何修改(重要的事情说3遍)
@@ -13,12 +13,12 @@ export default {
 	 * 根据自定义窗口编号查询自定义窗口DTO 
 	 */
   uniqueByNo: function(no){
-    var requestUrl = 'CustomerWindowResource/uniqueByNo'
-    var paramCount = 0
+    var requestUrl = 'CustomerWindowResource/uniqueByNo';
+    var paramCount = 0;
     if(no != null){
-      requestUrl += (paramCount > 0) ? '&' : '?'
-      requestUrl += ('no=' + no)
-      paramCount ++
+      requestUrl += (paramCount > 0) ? '&' : '?';
+      requestUrl += ('no=' + no);
+      paramCount ++;
     }
     return new Promise((resolve, reject) => {
       $.ajax({
@@ -29,16 +29,16 @@ export default {
 				
 				
         beforeSend: function(request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function(data) {
-          resolve(data)
+          resolve(data);
         },
         error: function(XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 	
-}
+};

+ 4 - 4
packages/date/index.js

@@ -1,8 +1,8 @@
 
-import Date from './src/Date.vue'
+import Date from './src/Date.vue';
 
 Date.install = function(Vue) {
-  Vue.component(Date.name, Date)
-}
+  Vue.component(Date.name, Date);
+};
 
-export default Date
+export default Date;

+ 29 - 18
packages/date/src/Date.vue

@@ -8,29 +8,40 @@
 </template>
 
 <script>
-var VueDatepicker = require('../../vue-datepicker/src/vue-datepicker.vue').default
-var VueDatepickerOption0 = require('./vue-datepicker-setting.js')
+var VueDatepicker = require('../../vue-datepicker/src/vue-datepicker.vue').default;
+var VueDatepickerOption0 = require('./vue-datepicker-setting.js');
 
 export default {
+  // eslint-disable-next-line
   name: 'Date',
 
   components: {
     'date-picker': VueDatepicker,
   },
-  props: [
-    'dateValue', 'readonly',
-  ],
+  
+  props: {
+    'dateValue':{
+      type: String,
+      default: null,
+    },
+    'readonly':{
+      type: Boolean,
+      default: null,
+    },
+  },
+
+  emits: ['on-value-change', 'input'],
 
   data: function () {
-    var vueDatepickerOption = VueDatepickerOption0()
-    vueDatepickerOption.option.type = 'day'
-    vueDatepickerOption.option.format = 'YYYY-MM-DD'
+    var vueDatepickerOption = VueDatepickerOption0();
+    vueDatepickerOption.option.type = 'day';
+    vueDatepickerOption.option.format = 'YYYY-MM-DD';
 
-    vueDatepickerOption.timeoption.type = 'min'
-    vueDatepickerOption.timeoption.format = 'YYYY-MM-DD'
+    vueDatepickerOption.timeoption.type = 'min';
+    vueDatepickerOption.timeoption.format = 'YYYY-MM-DD';
 
-    vueDatepickerOption.multiOption.type = 'multi-day'
-    vueDatepickerOption.multiOption.format = 'YYYY-MM-DD'
+    vueDatepickerOption.multiOption.type = 'multi-day';
+    vueDatepickerOption.multiOption.format = 'YYYY-MM-DD';
     return {
       starttime: {
         time: this.dateValue,
@@ -44,7 +55,7 @@ export default {
       timeoption: vueDatepickerOption.timeoption,
       multiOption: vueDatepickerOption.multiOption,
       limit: vueDatepickerOption.limit,
-    }
+    };
   },
 
   watch: {
@@ -55,15 +66,15 @@ export default {
 
     'starttime.time': function (val) {
       // 组件内对starttime.time变更后向外部发送事件通知
-      this.$emit('on-value-change', val)
-      this.$emit('input', val)
-      console.log('name has been changed:', val)
+      this.$emit('on-value-change', val);
+      this.$emit('input', val);
+      console.log('name has been changed:', val);
     },
 
     dateValue: function (val) {
-      this.starttime.time = val
+      this.starttime.time = val;
     },
   },
-}
+};
 </script>
 

+ 1 - 1
packages/date/src/vue-datepicker-setting.js

@@ -57,5 +57,5 @@ export default function () {
         to: '2016-02-20',
       },
     ],
-  }
+  };
 }

+ 4 - 4
packages/datetime-v2/index.js

@@ -1,8 +1,8 @@
 
-import DateTimeV2 from './src/DateTimeV2.vue'
+import DateTimeV2 from './src/DateTimeV2.vue';
 
 DateTimeV2.install = function(Vue) {
-  Vue.component(DateTimeV2.name, DateTimeV2)
-}
+  Vue.component(DateTimeV2.name, DateTimeV2);
+};
 
-export default DateTimeV2
+export default DateTimeV2;

+ 30 - 21
packages/datetime-v2/src/DateTimeV2.vue

@@ -31,14 +31,23 @@ export default {
 
   },
 
-  props: [
-    'dateValue', 'readonly',
-  ],
+  props: {
+    'dateValue':{
+      type: String,
+      default: null,
+    },
+    'readonly':{
+      type: Boolean,
+      default: null,
+    },
+  },
+
+  emits: ['on-value-change'],
 
   data: function () {
     return {
       'isValid': true,
-    }
+    };
   },
 
 
@@ -49,9 +58,9 @@ export default {
          */
     dateTime: function () {
       if (this.dateValue == null || this.dateValue.length == 0) {
-        return null
+        return null;
       } else {
-        return moment(this.dateValue, 'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DDTHH:mm:ss')
+        return moment(this.dateValue, 'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DDTHH:mm:ss');
       }
     },
 
@@ -67,21 +76,21 @@ export default {
          */
     isValidDateTime: function (text) {
       if (text == null || text.length == 0) {
-        return false
+        return false;
       }
-      return moment(text, 'YYYY-MM-DD HH:mm:ss', true).isValid()
+      return moment(text, 'YYYY-MM-DD HH:mm:ss', true).isValid();
     },
 
     textValueChanged: function (event) {
-      let newValue = event.target.value
+      let newValue = event.target.value;
 
       // 日期时间校验
       if (this.isValidDateTime(newValue)) {
-        this.isValid = true
-        console.log('DateTimeV2 input value changed: orginal value: %s, current value: %s', this.dateValue, newValue)
-        this.$emit('on-value-change', newValue)
+        this.isValid = true;
+        console.log('DateTimeV2 input value changed: orginal value: %s, current value: %s', this.dateValue, newValue);
+        this.$emit('on-value-change', newValue);
       } else {
-        this.isValid = false
+        this.isValid = false;
       }
     },
 
@@ -90,23 +99,23 @@ export default {
          * 值改变事件
          */
     datetimeLocalValueChanged: function (event) {
-      let newValue = event.target.value
-      let parsedDateTime = ''
+      let newValue = event.target.value;
+      let parsedDateTime = '';
       if (newValue != null && newValue.length > 0) {
-        parsedDateTime = moment(newValue).format('YYYY-MM-DD HH:mm:ss')
+        parsedDateTime = moment(newValue).format('YYYY-MM-DD HH:mm:ss');
       }
 
       // 日期时间校验
       if (this.isValidDateTime(parsedDateTime)) {
-        this.isValid = true
-        console.log('DateTimeV2 value changed: orginal value: %s, current value: %s', newValue, parsedDateTime)
-        this.$emit('on-value-change', parsedDateTime)
+        this.isValid = true;
+        console.log('DateTimeV2 value changed: orginal value: %s, current value: %s', newValue, parsedDateTime);
+        this.$emit('on-value-change', parsedDateTime);
       } else {
-        this.isValid = false
+        this.isValid = false;
       }
     },
   },
-}
+};
 </script>
 
 <style>

+ 4 - 4
packages/datetime/index.js

@@ -1,8 +1,8 @@
 
-import DateTime from './src/DateTime.vue'
+import DateTime from './src/DateTime.vue';
 
 DateTime.install = function(Vue) {
-  Vue.component(DateTime.name, DateTime)
-}
+  Vue.component(DateTime.name, DateTime);
+};
 
-export default DateTime
+export default DateTime;

+ 18 - 14
packages/datetime/src/DateTime.vue

@@ -8,8 +8,8 @@
 </template>
 
 <script>
-var VueDatepicker = require('../../vue-datepicker/src/vue-datepicker.vue').default
-var VueDatepickerOption1 = require('./vue-datepicker-setting.js')
+var VueDatepicker = require('../../vue-datepicker/src/vue-datepicker.vue').default;
+var VueDatepickerOption1 = require('./vue-datepicker-setting.js');
 
 export default {
   name: 'DateTime',
@@ -20,22 +20,26 @@ export default {
   props: {
     'dateValue':{
       type: String,
+      default: null,
     },
     'readonly':{
       type: Boolean,
+      default: null,
     },
   },
 
+  emits: ['on-value-change'],
+
   data: function () {
-    var vueDatepickerOption = VueDatepickerOption1()
-    vueDatepickerOption.option.type = 'min'
-    vueDatepickerOption.option.format = 'YYYY-MM-DD HH:mm:ss'
+    var vueDatepickerOption = VueDatepickerOption1();
+    vueDatepickerOption.option.type = 'min';
+    vueDatepickerOption.option.format = 'YYYY-MM-DD HH:mm:ss';
 
-    vueDatepickerOption.timeoption.type = 'min'
-    vueDatepickerOption.timeoption.format = 'YYYY-MM-DD HH:mm:ss'
+    vueDatepickerOption.timeoption.type = 'min';
+    vueDatepickerOption.timeoption.format = 'YYYY-MM-DD HH:mm:ss';
 
-    vueDatepickerOption.multiOption.type = 'multi-day'
-    vueDatepickerOption.multiOption.format = 'YYYY-MM-DD HH:mm:ss'
+    vueDatepickerOption.multiOption.type = 'multi-day';
+    vueDatepickerOption.multiOption.format = 'YYYY-MM-DD HH:mm:ss';
     return {
       starttime: {
         time: this.dateValue,
@@ -49,7 +53,7 @@ export default {
       timeoption: vueDatepickerOption.timeoption,
       multiOption: vueDatepickerOption.multiOption,
       limit: vueDatepickerOption.limit,
-    }
+    };
   },
 
   watch: {
@@ -60,12 +64,12 @@ export default {
 
     'starttime.time': function (val) {
       // 组件内对starttime.time变更后向外部发送事件通知
-      this.$emit('on-value-change', val)
-      console.log('name has been changed:', val)
+      this.$emit('on-value-change', val);
+      console.log('name has been changed:', val);
     },
     dateValue: function (val) {
-      this.starttime.time = val
+      this.starttime.time = val;
     },
   },
-}
+};
 </script>

+ 1 - 1
packages/datetime/src/vue-datepicker-setting.js

@@ -57,5 +57,5 @@ export default function () {
         to: '2016-02-20',
       },
     ],
-  }
+  };
 }

+ 12 - 12
packages/html-window/src/api/HtmlWindowResource.js

@@ -1,4 +1,4 @@
-var Common = require('../../../common/Common.js')
+var Common = require('../../../common/Common.js');
 
 /**
  * 工具类自动生成的API,请勿做任何修改,请勿做任何修改,请勿做任何修改(重要的事情说3遍)
@@ -13,12 +13,12 @@ export default {
 	 * 根据HTML窗口编号查询HTML窗口DTO 
 	 */
   uniqueByNo: function(no){
-    var requestUrl = 'HtmlWindowResource/uniqueByNo'
-    var paramCount = 0
+    var requestUrl = 'HtmlWindowResource/uniqueByNo';
+    var paramCount = 0;
     if(no != null){
-      requestUrl += (paramCount > 0) ? '&' : '?'
-      requestUrl += ('no=' + no)
-      paramCount ++
+      requestUrl += (paramCount > 0) ? '&' : '?';
+      requestUrl += ('no=' + no);
+      paramCount ++;
     }
     return new Promise((resolve, reject) => {
       $.ajax({
@@ -29,15 +29,15 @@ export default {
 				
 				
         beforeSend: function(request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function(data) {
-          resolve(data)
+          resolve(data);
         },
         error: function(XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
-}
+};

+ 2 - 2
packages/i18n/en-US.js

@@ -59,8 +59,8 @@ const lang = {
   imagePreview: {
     imagePreview: 'Image preview',
   },
-}
+};
 
 export default {
   lang : lang,
-}
+};

+ 2 - 2
packages/i18n/zh-CN.js

@@ -60,9 +60,9 @@ const lang = {
   imagePreview: {
     imagePreview: '图片预览',
   },
-}
+};
 
 
 export default {
   lang : lang,
-}
+};

+ 4 - 4
packages/image-preview/index.js

@@ -1,8 +1,8 @@
 
-import ImagePreview from './src/ImagePreview.vue'
+import ImagePreview from './src/ImagePreview.vue';
 
 ImagePreview.install = function(Vue) {
-  Vue.component(ImagePreview.name, ImagePreview)
-}
+  Vue.component(ImagePreview.name, ImagePreview);
+};
 
-export default ImagePreview
+export default ImagePreview;

+ 10 - 8
packages/image-preview/src/ImagePreview.vue

@@ -21,8 +21,8 @@
 
 
 <script>
-var Common = require('../../common/Common.js')
-var Modal = require('../../modal/src/Modal.vue').default
+var Common = require('../../common/Common.js');
+var Modal = require('../../modal/src/Modal.vue').default;
 
 export default {
   name: 'ImagePreview',
@@ -34,16 +34,18 @@ export default {
   props: {
     'className':{
       type: String,
+      default: null,
     },
     'imageName':{
       type: String,
+      default: null,
     },
   }, 
 
   data: function () {
     return {
       'src': null,
-    }
+    };
   },
 
   methods: {
@@ -52,8 +54,8 @@ export default {
          */
     preview: function (className, imageName) {
       if (imageName != null && imageName != '') {
-        this.$refs.modal.show = true
-        this.src = Common.getImageSrc(className, imageName)
+        this.$refs.modal.show = true;
+        this.src = Common.getImageSrc(className, imageName);
       }
     },
 
@@ -61,11 +63,11 @@ export default {
          * 预览图片
          */
     previewImage: function (imageName) {
-      this.$refs.modal.show = true
-      this.src = imageName
+      this.$refs.modal.show = true;
+      this.src = imageName;
     },
   },
-}
+};
 </script>
 
 

+ 86 - 74
packages/info/src/DocGeneratorSelected.vue

@@ -78,7 +78,9 @@
                 :value="getDisplayValue(rowData,infoGridField)"
                 @keyup="valueChange($event, rowData, infoGridField)"
               />
-              <span v-if="infoGridField.simpleDisplayType == undefined">{{ rowData.data[infoGridField.fieldName]==undefined?"":rowData.data[infoGridField.fieldName].displayValue[0] }}</span>
+              <span v-if="infoGridField.simpleDisplayType == undefined">
+                {{ rowData.data[infoGridField.fieldName]==undefined?"":rowData.data[infoGridField.fieldName].displayValue[0] }}
+              </span>
             </td>
           </tr>
         </tbody>
@@ -99,43 +101,53 @@
 </template>
 
 <script>
-var Common = require('../../common/Common.js')
-var Notify = require('../../common/Notify.js')
-var InfoUtil = require('./InfoUtil.js')
+var Common = require('../../common/Common.js');
+var Notify = require('../../common/Notify.js');
+var InfoUtil = require('./InfoUtil.js');
 
 export default {
 
   components: {
   },
-  props: [
-    'infoWindowNo',     // 查询窗口编号
-    'infoGridFields',   // 表格字段
-  ],
+  props: {
+    // 查询窗口编号
+    'infoWindowNo': {
+      type: String,
+      default: null,
+    }, 
+    // 表格字段
+    'infoGridFields': {
+      type: Object,
+      default: null,
+    },
+  },
+
+  emits: ['selectChanged'],
 
   data: function () {
     return {
       dataList: [],
       sortStyle: '',
       sortClause: '',
-    }
+    };
   },
-
+  
   computed: {
     /**
          * 自动计算表格的宽度
          */
     tableWidth: function () {
-      var totalWidth = 50
+      var totalWidth = 50;
       if (this.infoGridFields !== undefined) {
         this.infoGridFields.forEach(function (infoGridField) {
           if (infoGridField.width !== undefined
                         && infoGridField.width !== null
                         && infoGridField.width !== '') {
-            totalWidth += Number(infoGridField.width)
+            totalWidth += Number(infoGridField.width);
           }
-        })
+        });
       }
-      return totalWidth + 'px'
+      return totalWidth + 'px';
     },
   },
 
@@ -146,9 +158,9 @@ export default {
          * @author YangZhiJie 20210909
          */
     ondragstart: function (event, gridFieldItem) {
-      var _self = this
-      _self.startX = event.pageX
-      _self.startWidth = Number(gridFieldItem.width)
+      var _self = this;
+      _self.startX = event.pageX;
+      _self.startWidth = Number(gridFieldItem.width);
     },
 
     /**
@@ -156,8 +168,8 @@ export default {
          * @author YangZhiJie 20210909
          */
     ondrag: function (event, gridFieldItem) {
-      var _self = this
-      gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX)
+      var _self = this;
+      gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX);
     },
 
     /**
@@ -165,7 +177,7 @@ export default {
          * @author YangZhiJie 20210909
          */
     ondragend: function (event, gridFieldItem, index) {
-      var _self = this
+      var _self = this;
       var gridFieldItemClone = {
         'id': gridFieldItem.id,
         'index': index,
@@ -173,14 +185,14 @@ export default {
         'width': gridFieldItem.width,
         'sortNo': gridFieldItem.sortNo,
         'fieldName': gridFieldItem.fieldName,
-      }
-      gridFieldItemClone.width = _self.startWidth + (event.pageX - _self.startX)
+      };
+      gridFieldItemClone.width = _self.startWidth + (event.pageX - _self.startX);
       if (gridFieldItemClone.width < 50) {
-        gridFieldItemClone.width = 50
+        gridFieldItemClone.width = 50;
       }
-      gridFieldItem.width = gridFieldItemClone.width
-      InfoUtil.saveInfoGridField(_self.infoWindowNo, gridFieldItemClone)
-      InfoUtil.restoreInfoGridField(_self.infoWindowNo, _self.infoGridFields)
+      gridFieldItem.width = gridFieldItemClone.width;
+      InfoUtil.saveInfoGridField(_self.infoWindowNo, gridFieldItemClone);
+      InfoUtil.restoreInfoGridField(_self.infoWindowNo, _self.infoGridFields);
     },
 
 
@@ -189,16 +201,16 @@ export default {
          * @author YangZhiJie 20210909
          */
     onSort: function (infoGridField) {
-      var _self = this
-      var fieldName = null
+      var _self = this;
+      var fieldName = null;
       if (infoGridField.sortFieldName != undefined && infoGridField.sortFieldName != '') {
-        fieldName = infoGridField.sortFieldName
+        fieldName = infoGridField.sortFieldName;
       } else {
-        fieldName = infoGridField.fieldName
+        fieldName = infoGridField.fieldName;
       }
-      _self.sortClause = fieldName + _self.sortStyle
-      _self.sortStyle = ((_self.sortStyle === ' ASC') ? ' DESC' : ' ASC')
-      console.warn('暂时不支持排序。')
+      _self.sortClause = fieldName + _self.sortStyle;
+      _self.sortStyle = ((_self.sortStyle === ' ASC') ? ' DESC' : ' ASC');
+      console.warn('暂时不支持排序。');
     },
 
 
@@ -207,15 +219,15 @@ export default {
          * @author YangZhiJie 20210909
          */
     fixedTableHeader: function () {
-      let _self = this
+      let _self = this;
       _self.$nextTick(function () {
-        var $th = $('.table-fix-head-2').find('thead')
-        var $fixedCell = $('.table-fix-head-2').find('.fixed-cell')
+        var $th = $('.table-fix-head-2').find('thead');
+        var $fixedCell = $('.table-fix-head-2').find('.fixed-cell');
         $('.table-fix-head-2').on('scroll', function () {
-          $th.css('transform', 'translateY(' + this.scrollTop + 'px)')
-          $fixedCell.css('transform', 'translateX(' + this.scrollLeft + 'px)')
-        })
-      })
+          $th.css('transform', 'translateY(' + this.scrollTop + 'px)');
+          $fixedCell.css('transform', 'translateX(' + this.scrollLeft + 'px)');
+        });
+      });
     },
 
 
@@ -224,18 +236,18 @@ export default {
          * @author YangZhiJie 20210909
          */
     valueChange: function (event, rowData, infoGridField) {
-      var _self = this
-      var value = event.target.value
-      const fieldName = infoGridField.fieldName
+      var _self = this;
+      var value = event.target.value;
+      const fieldName = infoGridField.fieldName;
       if (rowData.data[fieldName] == undefined) {
         var tempFieldValue = {
           displayValue: [value],
-        }
-        this.$set(rowData.data, fieldName, tempFieldValue)
+        };
+        this.$set(rowData.data, fieldName, tempFieldValue);
       } else {
-        this.$set(rowData.data[fieldName].displayValue, 0, value)
+        this.$set(rowData.data[fieldName].displayValue, 0, value);
       }
-      rowData.checked = true
+      rowData.checked = true;
     },
 
     /**
@@ -243,11 +255,11 @@ export default {
          * @author YangZhiJie 20210909
          */
     getDisplayValue(rowData, infoGridField) {
-      let fieldValue = rowData.data[infoGridField.fieldName]
+      let fieldValue = rowData.data[infoGridField.fieldName];
       if (fieldValue === undefined || fieldValue === null) {
-        return ''
+        return '';
       } else {
-        return fieldValue.displayValue[0]
+        return fieldValue.displayValue[0];
       }
     },
 
@@ -257,38 +269,38 @@ export default {
          * @author YangZhiJie 20210908
          */
     parseDataList: function (dataList) {
-      let _self = this
+      let _self = this;
       if (dataList === null || dataList === undefined) {
-        return
+        return;
       }
       if (!Array.isArray(dataList)) {
-        console.error('参数异常,参数不是数组类型。')
-        console.error(dataList)
-        return
+        console.error('参数异常,参数不是数组类型。');
+        console.error(dataList);
+        return;
       }
 
-      const tempDataList = JSON.parse(JSON.stringify(dataList))
+      const tempDataList = JSON.parse(JSON.stringify(dataList));
       for (let index = 0, length = tempDataList.length; index < length; index++) {
-        let tempData = tempDataList[index]
-        let rowData = this.getRowDataById(tempData.id)
+        let tempData = tempDataList[index];
+        let rowData = this.getRowDataById(tempData.id);
         if(tempData.checked === true){
           if(rowData === null){
-            this.$set(this.dataList, this.dataList.length, tempData)
+            this.$set(this.dataList, this.dataList.length, tempData);
           } else {
-            let dataListIndex = this.dataList.indexOf(rowData)
-            this.$set(this.dataList, dataListIndex, tempData)
+            let dataListIndex = this.dataList.indexOf(rowData);
+            this.$set(this.dataList, dataListIndex, tempData);
           }
         } else if(tempData.checked === false){
           if(rowData !== null){
-            let dataListIndex = this.dataList.indexOf(rowData)
-            this.dataList.splice(dataListIndex, 1)
+            let dataListIndex = this.dataList.indexOf(rowData);
+            this.dataList.splice(dataListIndex, 1);
           }
         }
       }
 
       this.$nextTick(function(){
-        _self.fixedTableHeader()
-      })
+        _self.fixedTableHeader();
+      });
     },
 
     /**
@@ -297,11 +309,11 @@ export default {
          * @author YangZhiJie 2021-09-08
          */
     removeRow: function(rowData){
-      let index = this.dataList.indexOf(rowData)
+      let index = this.dataList.indexOf(rowData);
       if(index >= 0){
-        this.dataList.splice(index, 1)
+        this.dataList.splice(index, 1);
       }
-      this.$emit('selectChanged')
+      this.$emit('selectChanged');
     },
 
     /**
@@ -311,10 +323,10 @@ export default {
     getRowDataById: function(id){
       for (let index = 0, length = this.dataList.length; index < length; index++) {
         if(this.dataList[index].id === id){
-          return this.dataList[index]
+          return this.dataList[index];
         }
       }
-      return null
+      return null;
     },
 
     /**
@@ -323,8 +335,8 @@ export default {
          * @author YangZhiJie 20210909
          */
     isSelectedById: function(id){
-      let rowData = this.getRowDataById(id)
-      return rowData === null ? false : true
+      let rowData = this.getRowDataById(id);
+      return rowData === null ? false : true;
     },
 
 
@@ -334,11 +346,11 @@ export default {
          * @author YangZhiJie 20210909
          */
     getSelectedData: function(){
-      return this.dataList
+      return this.dataList;
     },
 
   },
-}
+};
 </script>
 
 <style scoped>

+ 16 - 5
packages/info/src/EnumSelectWidgetInfo.vue

@@ -10,12 +10,23 @@
 
 <script>
 export default {
-  props: ['field', 'fieldValue'],
+  props: {
+    'field': {
+      type: Object,
+      default: null,
+    },
+    'fieldValue': {
+      type: Object,
+      default: null,
+    },
+  },
+
+  emits: ['valueChanged'],
 
   data: function(){
     return {
       selectedValue: ((this.fieldValue == undefined || this.fieldValue.displayValue == undefined) ? '' : this.fieldValue.displayValue[0]),
-    }
+    };
   },
 
   watch: {
@@ -24,12 +35,12 @@ export default {
         var newFieldValue = {
           displayValue: [curVal],
           fieldType: 'String',
-        }
-        this.$emit('valueChanged', newFieldValue)
+        };
+        this.$emit('valueChanged', newFieldValue);
       }
     },
   },
-}
+};
 
 </script>
 <style scoped>

+ 71 - 48
packages/info/src/InfoHeader.vue

@@ -32,7 +32,7 @@
             @click="stopPropagation($event)"
           >
             <div
-              v-for="(item,index) in infoFilterFieldsClone"
+              v-for="(item) in infoFilterFieldsClone"
               :key="item.key" style="margin-left: 15px;margin-right: 15px;"
             >
               <div class="column">
@@ -110,9 +110,9 @@
 
 <script>
 
-var InfoUtil = require('./InfoUtil.js')
+var InfoUtil = require('./InfoUtil.js');
 
-import vuedraggable from 'vuedraggable'
+import vuedraggable from 'vuedraggable';
 
 export default {
 
@@ -120,37 +120,60 @@ export default {
   components: {
     vuedraggable,
   },
-  props: ['infoFilterFields', 'headerName', 'infoGridFields', 'htmlHelpUrl', 'infoWindowNo'],
+  props: {
+    'infoFilterFields': {
+      type: Object,
+      default: null,
+    },
+    'headerName': {
+      type: String,
+      default: null,
+    }, 
+    'infoGridFields': {
+      type: Object,
+      default: null,
+    },
+    'htmlHelpUrl': {
+      type: String,
+      default: null,
+    }, 
+    'infoWindowNo': {
+      type: String,
+      default: null,
+    }, 
+  },
+
+  emits: ['gridFieldPropertyChanged', 'filterFieldPropertyChanged'],
     
   data: function () {
     return {
       sortMap: {},
       infoFilterFieldsClone: [],
       infoGridFieldsClone: [],
-    }
+    };
   },
 
   watch: {
     'infoFilterFields': function () {
-      this.cloneInfoFilterFields()
+      this.cloneInfoFilterFields();
     },
     'infoGridFields': function () {
-      this.cloneInfoGridFields()
+      this.cloneInfoGridFields();
     },
   },
   mounted: function () {
-    this.cloneInfoFilterFields()
-    this.cloneInfoGridFields()
+    this.cloneInfoFilterFields();
+    this.cloneInfoGridFields();
   },
 
   methods: {
     cloneInfoFilterFields: function () {
-      var _self = this
+      var _self = this;
       if (_self.infoFilterFields != null) {
-        _self.infoFilterFieldsClone.splice(0, _self.infoFilterFieldsClone.length)
+        _self.infoFilterFieldsClone.splice(0, _self.infoFilterFieldsClone.length);
 
                 
-        let tempInfoFilterFields = []
+        let tempInfoFilterFields = [];
 
         for (var i = 0, len1 = _self.infoFilterFields.length; i < len1; i++) {
           var fieldClone = {
@@ -160,27 +183,27 @@ export default {
             'mandatory': _self.infoFilterFields[i].mandatory,
             'isShow': _self.infoFilterFields[i].isShow,
             'sortNo': _self.infoFilterFields[i].sortNo,
-          }
-          tempInfoFilterFields.push(fieldClone)
+          };
+          tempInfoFilterFields.push(fieldClone);
         }
 
         tempInfoFilterFields.sort(function (item1, item2) {
-          return item1.sortNo - item2.sortNo
-        })
+          return item1.sortNo - item2.sortNo;
+        });
 
         tempInfoFilterFields.forEach(function(tempInfoFilterField){
-          _self.infoFilterFieldsClone.push(tempInfoFilterField)
-        })
+          _self.infoFilterFieldsClone.push(tempInfoFilterField);
+        });
       }
     },
     cloneInfoGridFields: function () {
 
-      var _self = this
+      var _self = this;
 
       if (_self.infoGridFields != null) {
-        _self.infoGridFieldsClone.splice(0, _self.infoGridFieldsClone.length)
+        _self.infoGridFieldsClone.splice(0, _self.infoGridFieldsClone.length);
 
-        let tempInfoGridFields = []
+        let tempInfoGridFields = [];
 
         for (var i = 0, len1 = _self.infoGridFields.length; i < len1; i++) {
           var fieldClone = {
@@ -191,17 +214,17 @@ export default {
             'isShow': _self.infoGridFields[i].isShow,
             'sortNo': _self.infoGridFields[i].sortNo,
             'width': _self.infoGridFields[i].width,
-          }
-          tempInfoGridFields.push(fieldClone)
+          };
+          tempInfoGridFields.push(fieldClone);
         }
 
         tempInfoGridFields.sort(function (item1, item2) {
-          return item1.sortNo - item2.sortNo
-        })
+          return item1.sortNo - item2.sortNo;
+        });
 
         tempInfoGridFields.forEach(function(tempInfoGridField){
-          _self.infoGridFieldsClone.push(tempInfoGridField)
-        })
+          _self.infoGridFieldsClone.push(tempInfoGridField);
+        });
       }
             
     },
@@ -209,57 +232,57 @@ export default {
          * 打开帮助页面
          */
     openHtmlHelp: function (htmlHelpUrl) {
-      window.open(htmlHelpUrl)
+      window.open(htmlHelpUrl);
     },
 
     //将数据传递给父组件
     visibleChanged: function (infoFilterFieldItem) {
-      var _self = this
+      var _self = this;
       _self.$nextTick(function () {
         if (infoFilterFieldItem.mandatory) {
-          infoFilterFieldItem.ishow = true
-          return
+          infoFilterFieldItem.ishow = true;
+          return;
         }
-        _self.$emit('filterFieldPropertyChanged', _self.infoFilterFieldsClone)
-      })
+        _self.$emit('filterFieldPropertyChanged', _self.infoFilterFieldsClone);
+      });
     },
 
     gridFieldvisibleChanged: function (item) {
-      var _self = this
+      var _self = this;
       _self.$nextTick(function () {
         if (item.mandatory) {
-          item.ishow = true
-          return
+          item.ishow = true;
+          return;
         }
-        this.$emit('gridFieldPropertyChanged', _self.infoGridFieldsClone)
-      })
+        this.$emit('gridFieldPropertyChanged', _self.infoGridFieldsClone);
+      });
     },
 
     // 停止冒泡
     stopPropagation: function (e) {
-      e.stopPropagation()
+      e.stopPropagation();
     },
         
     filterFieldSortChaned: function () {
-      console.log('filterFieldSortChaned')
-      var _self = this
+      console.log('filterFieldSortChaned');
+      var _self = this;
       for (var i = 0, len1 = _self.infoFilterFieldsClone.length; i < len1; i++) {
-        _self.infoFilterFieldsClone[i].sortNo = i * 10
+        _self.infoFilterFieldsClone[i].sortNo = i * 10;
       }
-      this.$emit('filterFieldPropertyChanged', _self.infoFilterFieldsClone)
+      this.$emit('filterFieldPropertyChanged', _self.infoFilterFieldsClone);
     },
 
     gridFieldSortChaned: function () {
-      console.log('gridFieldSortChaned')
-      var _self = this
+      console.log('gridFieldSortChaned');
+      var _self = this;
       for (var i = 0, len1 = _self.infoGridFieldsClone.length; i < len1; i++) {
-        _self.infoGridFieldsClone[i].sortNo = i * 10
+        _self.infoGridFieldsClone[i].sortNo = i * 10;
       }
-      this.$emit('gridFieldPropertyChanged', _self.infoGridFieldsClone)
+      this.$emit('gridFieldPropertyChanged', _self.infoGridFieldsClone);
     },
 
   },
-}
+};
 
 </script>
 <style scoped>

+ 87 - 63
packages/info/src/InfoMultiSearchWidget.vue

@@ -2,7 +2,8 @@
   <div class="content">
     <div class="box">
       <span
-        v-for="item in selectedDatas"
+        v-for="(item, index) in selectedDatas"
+        :key="item + '-' + index"
         class="selected-tag"
       >
         {{ item.value }}
@@ -26,30 +27,53 @@
       @ok="searchDialogOk"
       @cancel="searchDialogCancel"
     >
-      <InfoFilter
-        ref="info"
-        :field-value="fieldValue"
-        :where-clause="whereClause"
-        :is-search-widget="true"
-        @dataSelected="dataSelected"
-        @deleteSelected="deleteSelected"
-      />
-      <div slot="header">{{ infoWindowDto.name }}</div>
+      <template #header>
+        <div>{{ infoWindowDto.name }}</div>
+      </template>
+      <template #default>
+        <InfoFilter
+          ref="info"
+          :field-value="fieldValue"
+          :where-clause="whereClause"
+          :is-search-widget="true"
+          @data-selected="dataSelected"
+          @delete-selected="deleteSelected"
+        />
+      </template>
     </Modal>
     <Loading ref="loading" />
   </div>
 </template>
 <script>
-var Modal = require('../../modal/src/Modal.vue').default
-var InfoFilter = require('./InfoWindow.vue').default
-var Loading = require('../../loading/src/Loading.vue').default
+var Modal = require('../../modal/src/Modal.vue').default;
+var InfoFilter = require('./InfoWindow.vue').default;
+var Loading = require('../../loading/src/Loading.vue').default;
 
 export default {
 
   components: {
     Modal, InfoFilter, Loading,
   },
-  props: ['infoWindowNo', 'fieldValue', 'whereClause', 'displayName'],
+  props: {
+    'infoWindowNo':{
+      type: String,
+      default: null,
+    }, 
+    'fieldValue': {
+      type: Object,
+      default: null,
+    },
+    'whereClause': {
+      type: String,
+      default: null,
+    }, 
+    'displayName': {
+      type: String,
+      default: null,
+    }, 
+  },
+
+  emits: ['valueChanged'],
 
   data: function () {
     return {
@@ -60,7 +84,7 @@ export default {
       searchText: '',
       selectIndex: -1,
       selectedDatas: [],
-    }
+    };
   },
 
   computed: {
@@ -69,28 +93,28 @@ export default {
 
   watch: {
     fieldValue: function (to) {
-      this.reComputeSearchText(to)
+      this.reComputeSearchText(to);
     },
 
   },
 
   mounted: function () {
-    this.reComputeSearchText(this.fieldValue)
+    this.reComputeSearchText(this.fieldValue);
   },
 
   methods: {
     // 显示搜索对话框
     showSearchDialog: function () {
-      var _self = this
-      _self.$refs.modal.showModal()
+      var _self = this;
+      _self.$refs.modal.showModal();
       _self.$nextTick(function () {
-        _self.$refs.modal.showModal()
+        _self.$refs.modal.showModal();
         if (_self.$refs.info.infoWindowNo != _self.infoWindowNo) {
-          _self.$refs.info.loadByInfoWindowNo(_self.infoWindowNo)
+          _self.$refs.info.loadByInfoWindowNo(_self.infoWindowNo);
         } else {
-          _self.$refs.info.refresh()
+          _self.$refs.info.refresh();
         }
-      })
+      });
     },
 
     searchDialogOk: function () {
@@ -103,48 +127,48 @@ export default {
 
     // 数据已经选择
     dataSelected: function (data) {
-      var _self = this
+      var _self = this;
 
       if (data == undefined) {
-        return
+        return;
       }
 
-      console.log('已经选择了数据:' + data.id)
+      console.log('已经选择了数据:' + data.id);
 
-      var newIds = []
+      var newIds = [];
       if (_self.fieldValue.ids != undefined) {
         for (var i = 0; i < _self.fieldValue.ids.length; i++) {
-          newIds.push(_self.fieldValue.ids[i])
+          newIds.push(_self.fieldValue.ids[i]);
         }
       }
 
       if (newIds.indexOf(data.id) < 0) {
-        newIds.push(data.id)
+        newIds.push(data.id);
       }
 
-      var displayValue = _self.fieldValue.displayValue
+      var displayValue = _self.fieldValue.displayValue;
       if (_self.displayName != undefined && _self.displayName != '') {
-        var arr = _self.displayName.split(',')
-        var text = ''
+        var arr = _self.displayName.split(',');
+        var text = '';
         arr.forEach(function (item) {
-          console.log('选择的text:' + data.data[item].displayValue[0])
-          text += data.data[item].displayValue[0]
-        })
-        displayValue.push(text)
+          console.log('选择的text:' + data.data[item].displayValue[0]);
+          text += data.data[item].displayValue[0];
+        });
+        displayValue.push(text);
       }
 
       var newFieldValue = {
         displayValue: displayValue,
         fieldType: 'MultiSearchBoxEditor',
         ids: newIds,
-      }
-      _self.$emit('valueChanged', newFieldValue)
+      };
+      _self.$emit('valueChanged', newFieldValue);
     },
 
     // 值改变
     valueChanged: function (fieldValue) {
-      this.$emit('valueChanged', fieldValue)
-      this.reComputeSearchText(fieldValue)
+      this.$emit('valueChanged', fieldValue);
+      this.reComputeSearchText(fieldValue);
     },
 
     /**
@@ -153,46 +177,46 @@ export default {
          * @return {[type]}
          */
     reComputeSearchText: function (fieldValue) {
-      var arr = []
-      var ids = fieldValue.ids
-      var displayValue = fieldValue.displayValue
+      var arr = [];
+      var ids = fieldValue.ids;
+      var displayValue = fieldValue.displayValue;
       if (ids != undefined && displayValue != undefined && ids.length == displayValue.length) {
         for (var i = 0; i < ids.length; i++) {
           var obj = {
             id: ids[i],
             value: displayValue[i],
-          }
-          arr.push(obj)
+          };
+          arr.push(obj);
         }
       }
-      return this.selectedDatas = arr
+      return this.selectedDatas = arr;
     },
 
     // 删除选中数据
     deleteSelected: function (item) {
-      var id = item.id
-      var _self = this
-      var newIds = []
-      var displayValues = []
+      var id = item.id;
+      var _self = this;
+      var newIds = [];
+      var displayValues = [];
       if (_self.fieldValue.ids != undefined) {
-        for (var i = 0; i < _self.fieldValue.ids.length; i++) {
-          newIds.push(_self.fieldValue.ids[i])
+        for (let i = 0; i < _self.fieldValue.ids.length; i++) {
+          newIds.push(_self.fieldValue.ids[i]);
         }
       }
 
       if (_self.fieldValue.displayValue != undefined) {
-        for (var i = 0; i < _self.fieldValue.displayValue.length; i++) {
-          displayValues.push(_self.fieldValue.displayValue[i])
+        for (let i = 0; i < _self.fieldValue.displayValue.length; i++) {
+          displayValues.push(_self.fieldValue.displayValue[i]);
         }
       }
 
-      var index = newIds.indexOf(id)
+      var index = newIds.indexOf(id);
       if (index > -1) {
-        newIds.splice(index, 1)
-        _self.fieldValue.ids.splice(index, 1)
+        newIds.splice(index, 1);
+        _self.fieldValue.ids.splice(index, 1);
         if (displayValues.length > index) {
-          displayValues.splice(index, 1)
-          _self.fieldValue.displayValue.splice(index, 1)
+          displayValues.splice(index, 1);
+          _self.fieldValue.displayValue.splice(index, 1);
         }
       }
 
@@ -200,13 +224,13 @@ export default {
         displayValue: displayValues,
         fieldType: 'MultiSearchBoxEditor',
         ids: newIds,
-      }
+      };
 
-      this.$emit('valueChanged', newFieldValue)
-      this.reComputeSearchText(newFieldValue)
+      this.$emit('valueChanged', newFieldValue);
+      this.reComputeSearchText(newFieldValue);
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 99 - 69
packages/info/src/InfoSearchWidget.vue

@@ -25,22 +25,26 @@
       @ok="searchDialogOk"
       @cancel="searchDialogCancel"
     >
-      <InfoWindow
-        v-if="showSubInfoWindow"
-        ref="info"
-        :where-clause="whereClause"
-        :field-value="fieldValue"
-        :is-search-widget="true"
-        @dataSelected="dataSelected"
-      />
-      <div slot="header">{{ titleName }}</div>
+      <template #header>
+        <div>{{ titleName }}</div>
+      </template>
+      <template #default>
+        <InfoWindow
+          v-if="showSubInfoWindow"
+          ref="info"
+          :where-clause="whereClause"
+          :field-value="fieldValue"
+          :is-search-widget="true"
+          @data-selected="dataSelected"
+        />
+      </template>
     </Modal>
     <SearchAutoCompleteWidget
       ref="autoComplete"
       :info-window-no="infoWindowNo"
       :where-clause="whereClause"
       class="auto-complete"
-      @selectData="dataSelected"
+      @select-data="dataSelected"
     />
 
     <Loading ref="loading" />
@@ -48,9 +52,9 @@
 </template>
 <script>
 
-var Modal = require('../../modal/src/Modal.vue').default
-var SearchAutoCompleteWidget = require('./SearchAutoCompleteWidget.vue').default
-var Loading = require('../../loading/src/Loading.vue').default
+var Modal = require('../../modal/src/Modal.vue').default;
+var SearchAutoCompleteWidget = require('./SearchAutoCompleteWidget.vue').default;
+var Loading = require('../../loading/src/Loading.vue').default;
 
 export default {
   // infoWindowNo: 查询窗口Id
@@ -67,25 +71,51 @@ export default {
   components: {
     Modal, SearchAutoCompleteWidget, Loading,
   },
-  props: ['infoWindowNo', 'fieldValue', 'titleName', 'displayName', 'whereClause'],
+  props: {
+    'infoWindowNo':{
+      type: String,
+      default: null,
+    }, 
+    'fieldValue': {
+      type: Object,
+      default: null,
+    },
+    'titleName':
+    {
+      type: String,
+      default: null,
+    }, 
+    'displayName':
+    {
+      type: String,
+      default: null,
+    }, 
+    'whereClause':
+    {
+      type: String,
+      default: null,
+    }, 
+  },
+
+  emits: ['valueChanged', 'dataSelected'],
 
   data: function () {
     return {
-      labelNames: [],
       isVisible: [],
       searchText: '',
       leftPosition: 0,
       showSubInfoWindow: false,	// 显示子查询窗口
-    }
+    };
   },
 
   computed: {
     titleNames: function () {
-      if (this.labelNames == undefined || this.labelNames.length == 0) {
-        this.labelNames = this.field.name.split(',')
+      let labelNames = '';
+      if (this.field != null || this.field.name != null || this.field.name.length > 0) {
+        labelNames = this.field.name.split(',');
       }
-      this.reCalVisible()
-      return this.labelNames
+      this.reCalVisible();
+      return labelNames;
     },
 
 
@@ -93,64 +123,64 @@ export default {
          * 是否是有效的数据
          */
     validInput: function () {
-      var isValid = true
+      var isValid = true;
       if (this.searchText != undefined && this.searchText.length > 0) {
         if (this.fieldValue != undefined && (this.fieldValue.id == undefined || this.fieldValue.id <= 0)) {
-          isValid = false
+          isValid = false;
         } else if (this.fieldValue != undefined && (this.fieldValue.displayValue != undefined && this.fieldValue.displayValue[0] != this.searchText)) {
-          isValid = false
+          isValid = false;
         }
       }
 
       return {
         'invalid-input': isValid == false,
-      }
+      };
     },
   },
 
   watch: {
     redraw: function () {
-      console.log('searchWidgetRedraw')
-      this.reCalVisible()
+      console.log('searchWidgetRedraw');
+      this.reCalVisible();
     },
 
     fieldValue: {
       handler(currentValue, oldValue) {
-        console.log('currentValue:' + JSON.stringify(currentValue))
-        this.searchText = this.initSearchText(currentValue)
-        console.log('searchText:' + this.searchText)
+        console.log('currentValue:' + JSON.stringify(currentValue));
+        this.searchText = this.initSearchText(currentValue);
+        console.log('searchText:' + this.searchText);
       },
       deep: true,
     },
 
     // 查询条件变化时,重新查询数据
     whereClause: function () {
-      this.$refs.info.loadByInfoWindowNo(this.infoWindowNo)
+      this.$refs.info.loadByInfoWindowNo(this.infoWindowNo);
     },
   },
 
   methods: {
     selectDown: function () {
-      this.$refs.autoComplete.selectDown()
+      this.$refs.autoComplete.selectDown();
     },
 
     selectUp: function () {
-      this.$refs.autoComplete.selectUp()
+      this.$refs.autoComplete.selectUp();
     },
 
     selectEnter: function () {
-      var _self = this
+      var _self = this;
 
-      var data = _self.$refs.autoComplete.getSelectData()
+      var data = _self.$refs.autoComplete.getSelectData();
       if (data != undefined) {
-        _self.dataSelected(data)
-        _self.$refs.autoComplete.hide()
+        _self.dataSelected(data);
+        _self.$refs.autoComplete.hide();
       } else {
         if (_self.searchText == undefined || _self.searchText.length == 0) {
           if (_self.$refs.autoComplete.isVisible() == true) {
-            _self.$refs.autoComplete.hide()
+            _self.$refs.autoComplete.hide();
           } else {
-            _self.$refs.autoComplete.initSearch('')
+            _self.$refs.autoComplete.initSearch('');
           }
         }
       }
@@ -158,96 +188,96 @@ export default {
 
     // 显示搜索对话框
     showSearchDialog: function () {
-      var _self = this
-      console.log(this.$refs.modal)
-      this.$refs.modal.showModal()
-      this.showSubInfoWindow = true
+      var _self = this;
+      console.log(this.$refs.modal);
+      this.$refs.modal.showModal();
+      this.showSubInfoWindow = true;
 
-      _self.$refs.autoComplete.hide()
+      _self.$refs.autoComplete.hide();
 
       this.$nextTick(function () {
         if (this.$refs.info) {
           if (this.$refs.info.infoWindowNo != this.infoWindowNo) {
-            _self.$refs.info.loadByInfoWindowNo(this.infoWindowNo)
+            _self.$refs.info.loadByInfoWindowNo(this.infoWindowNo);
           } else {
-            _self.$refs.info.refresh()
+            _self.$refs.info.refresh();
           }
         }
-      })
+      });
     },
 
     /**
          * 搜索框【确定】按钮点击事件
          */
     searchDialogOk: function () {
-      var _self = this
-      var selectedModelDatas = _self.$refs.info.getSelectedModelDatas()
+      var _self = this;
+      var selectedModelDatas = _self.$refs.info.getSelectedModelDatas();
       if (selectedModelDatas != undefined || selectedModelDatas.length > 0) {
         // 选中了数据,更新数据
-        _self.dataSelected(selectedModelDatas[0])
+        _self.dataSelected(selectedModelDatas[0]);
       }
-      this.showSubInfoWindow = false
+      this.showSubInfoWindow = false;
     },
 
     searchDialogCancel: function () {
 
-      this.showSubInfoWindow = false
+      this.showSubInfoWindow = false;
     },
 
     // 输入的文本发生改变
     textChange: function (e) {
-      var text = e.target.value
-      console.log('textChange: ' + text)
+      var text = e.target.value;
+      console.log('textChange: ' + text);
       if (text == undefined || text.length == 0) {
         var newFieldValue = {
           id: null,
           displayValue: [],
           fieldType: 'Key',
-        }
-        this.$emit('valueChanged', newFieldValue)
+        };
+        this.$emit('valueChanged', newFieldValue);
       }
-      this.$refs.autoComplete.initSearch(text)
+      this.$refs.autoComplete.initSearch(text);
     },
 
     // 数据已经选择
     dataSelected: function (modelData) {
-      var _self = this
-      this.$refs.modal.hideModal()
+      var _self = this;
+      this.$refs.modal.hideModal();
 
-      _self.$refs.autoComplete.hide()
+      _self.$refs.autoComplete.hide();
 
       if (modelData == undefined) {
-        return
+        return;
       }
 
-      console.log('已经选择了数据:' + modelData.id)
+      console.log('已经选择了数据:' + modelData.id);
 
       var newFieldValue = {
         id: modelData.id,
         displayValue: [modelData.data[_self.displayName].displayValue[0]],
         fieldType: 'Key',
-      }
+      };
 
       if (newFieldValue.displayValue.length > 0) {
-        _self.searchText = newFieldValue.displayValue[0]
+        _self.searchText = newFieldValue.displayValue[0];
       }
-      this.$emit('valueChanged', newFieldValue)
-      this.$emit('dataSelected', modelData)
+      this.$emit('valueChanged', newFieldValue);
+      this.$emit('dataSelected', modelData);
     },
 
     initSearchText: function (tempFieldValue) {
       if (tempFieldValue == undefined || tempFieldValue.displayValue == undefined || tempFieldValue.displayValue.length == 0) {
-        return ''
+        return '';
       } else {
-        return tempFieldValue.displayValue[0]
+        return tempFieldValue.displayValue[0];
       }
     },
 
     mounted: function () {
-      this.searchText = this.initSearchText(this.fieldValue)
+      this.searchText = this.initSearchText(this.fieldValue);
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 61 - 59
packages/info/src/InfoUtil.js

@@ -1,4 +1,6 @@
-var UserStorageResource = require('../../common/UserStorageResource.js')
+var UserStorageResource = require('../../common/UserStorageResource.js');
+var Common = require('../../common/Common.js');
+
 
 export default {
 
@@ -11,132 +13,132 @@ export default {
       'mandatory': field.mandatory,
       'sortNo':field.sortNo,
       'width':field.width,
-    }
-    return fieldClone
+    };
+    return fieldClone;
   },
   // 获取InfoFilterField的Key
   getInfoFilterFieldKey: function(infoFilterFieldItem){
     if(infoFilterFieldItem == undefined){
-      return undefined
+      return undefined;
     }
-    return '#InfoFilterFieldItem_' + infoFilterFieldItem.id + '_' + infoFilterFieldItem.fieldName + '_' + infoFilterFieldItem.rowNumber
+    return '#InfoFilterFieldItem_' + infoFilterFieldItem.id + '_' + infoFilterFieldItem.fieldName + '_' + infoFilterFieldItem.rowNumber;
   },
 
   saveInfoFilterFields: function (infoWindowNo, filterFields) {
-    var key = 'InfoFilterFields_' + infoWindowNo
+    var key = 'InfoFilterFields_' + infoWindowNo;
     var userStorageDtos = [
       {
         key: key,
         value: JSON.stringify(filterFields),
       },
-    ]
+    ];
     return new Promise(function (resolve, reject) {
       UserStorageResource.uploadUserStorage(userStorageDtos).then(successData => {
-        resolve()
+        resolve();
       }, errorData => {
-        Common.processException(errorData)
-        reject()
-      })
-    })
+        Common.processException(errorData);
+        reject();
+      });
+    });
   },
 
   saveInfoGridFields: function (infoWindowNo, filterGrids) {
-    var key = 'InfoGridFields_' + infoWindowNo
+    var key = 'InfoGridFields_' + infoWindowNo;
 
     var userStorageDtos = [
       {
         key: key,
         value: JSON.stringify(filterGrids),
       },
-    ]
+    ];
 
     return new Promise(function (resolve, reject) {
       UserStorageResource.uploadUserStorage(userStorageDtos).then(successData => {
-        resolve()
+        resolve();
       }, errorData => {
-        Common.processException(errorData)
-        reject()
-      })
-    })
+        Common.processException(errorData);
+        reject();
+      });
+    });
 
   },
 
   restoreInfoFilterFields: function (infoWindowNo, localInfoFilterFields) {
-    var key = 'InfoFilterFields_' + infoWindowNo
+    var key = 'InfoFilterFields_' + infoWindowNo;
     if (localInfoFilterFields != null) {
       UserStorageResource.uniqueByKey(key).then(successData => {
-        var remoteInfoFilterFields = null
-	            if (successData != null) {
-	                remoteInfoFilterFields = JSON.parse(successData)
-	            }else{
-	            	remoteInfoFilterFields = null
-	            }
+        var remoteInfoFilterFields = null;
+        if (successData != null) {
+          remoteInfoFilterFields = JSON.parse(successData);
+        }else{
+          remoteInfoFilterFields = null;
+        }
         if (remoteInfoFilterFields != null) {
           localInfoFilterFields.forEach(localInfoFilterField => {
             remoteInfoFilterFields.forEach(remoteInfoFilterField => {
               if (remoteInfoFilterField != null && localInfoFilterField != null && 
 								localInfoFilterField.fieldName == remoteInfoFilterField.fieldName) {
-                localInfoFilterField.isShow = remoteInfoFilterField.isShow
-							    localInfoFilterField.sortNo = remoteInfoFilterField.sortNo == null ? 0 : remoteInfoFilterField.sortNo
+                localInfoFilterField.isShow = remoteInfoFilterField.isShow;
+                localInfoFilterField.sortNo = remoteInfoFilterField.sortNo == null ? 0 : remoteInfoFilterField.sortNo;
               }
-            })
-          })
+            });
+          });
           localInfoFilterFields.sort(function(item1, item2){
-		                return item1.sortNo - item2.sortNo 
-		            })
+            return item1.sortNo - item2.sortNo; 
+          });
         }else{
           localInfoFilterFields.forEach(localInfoFilterField => {
             if(localInfoFilterField.sortNo == undefined){
-              localInfoFilterField.sortNo = SortNoUtil.newSortNo()
+              localInfoFilterField.sortNo = 10;
             }
-          })
+          });
           localInfoFilterFields.sort(function(item1, item2){
-		                return item1.sortNo - item2.sortNo 
-		            })
+            return item1.sortNo - item2.sortNo; 
+          });
         }
       }, errorData => {
-        Common.processException(errorData)
-      })
+        Common.processException(errorData);
+      });
     }
   },
 
   restoreInfoGridFields: function (infoWindowNo, localInfoGridFields) {
-    var key = 'InfoGridFields_' + infoWindowNo
+    var key = 'InfoGridFields_' + infoWindowNo;
     if (localInfoGridFields != null) {
       UserStorageResource.uniqueByKey(key).then(successData => {
-        var remoteInfoGridFields = null
-	            if (successData != null) {
-	                remoteInfoGridFields = JSON.parse(successData)
-	            }else{
-	            	remoteInfoGridFields = null
-	            }
+        var remoteInfoGridFields = null;
+        if (successData != null) {
+          remoteInfoGridFields = JSON.parse(successData);
+        }else{
+          remoteInfoGridFields = null;
+        }
         if (remoteInfoGridFields != null && remoteInfoGridFields != undefined) {
           localInfoGridFields.forEach(localInfoGridField => {
             remoteInfoGridFields.forEach(remoteInfoGridField => {
               if (remoteInfoGridField != null && localInfoGridField != null && 
 								localInfoGridField.fieldName == remoteInfoGridField.fieldName) {
-                localInfoGridField.isShow = remoteInfoGridField.isShow
-							    localInfoGridField.sortNo = remoteInfoGridField.sortNo == null ? 0 : remoteInfoGridField.sortNo
-                localInfoGridField.width = remoteInfoGridField.width
+                localInfoGridField.isShow = remoteInfoGridField.isShow;
+                localInfoGridField.sortNo = remoteInfoGridField.sortNo == null ? 0 : remoteInfoGridField.sortNo;
+                localInfoGridField.width = remoteInfoGridField.width;
               }
-            })
-          })
+            });
+          });
           localInfoGridFields.sort(function(item1, item2){
-		                return item1.sortNo - item2.sortNo 
-		            })
+            return item1.sortNo - item2.sortNo; 
+          });
         }else{
           localInfoGridFields.forEach(localInfoGridField => {
             if(localInfoGridField.sortNo == undefined){
-              localInfoGridField.sortNo = SortNoUtil.newSortNo()
+              localInfoGridField.sortNo = 10;
             }
-          })
+          });
           localInfoGridFields.sort(function(item1, item2){
-		                return item1.sortNo - item2.sortNo 
-		            })
+            return item1.sortNo - item2.sortNo; 
+          });
         }
       }, errorData => {
-        Common.processException(errorData)
-      })
+        Common.processException(errorData);
+      });
     }
   },
-}
+};

+ 78 - 54
packages/info/src/InfoWindow.vue

@@ -9,18 +9,18 @@
       :is-search-widget="isSearchWidget"
       :parent-model-data="parentModelData"
       :model-data="modelData"
-      @dataSelected="dataSelected"
-      @deleteSelected="deleteSelected"
+      @data-selected="dataSelected"
+      @delete-selected="deleteSelected"
     />
 
     <Loading ref="loading" />
   </div>
 </template>
 <script>
-var Common = require('../../common/Common.js')
-var QueryPage = require('./QueryPage.vue').default
-var Loading = require('../../loading/src/Loading.vue').default
-var ClientOrgnization = require('./customer/ClientOrgnizationInfo.vue').default
+var Common = require('../../common/Common.js');
+var QueryPage = require('./QueryPage.vue').default;
+var Loading = require('../../loading/src/Loading.vue').default;
+var ClientOrgnization = require('./customer/ClientOrgnizationInfo.vue').default;
 
 export default {
   name: 'InfoWindow',
@@ -30,136 +30,160 @@ export default {
     Loading,
     ClientOrgnization,
   },
-  props: ['whereClause', 'isSearchWidget', 'parentModelData', 'modelData', 'fieldValue'],
+  props: {
+    'whereClause':
+        {
+          type: String,
+          default: null,
+        },
+    'isSearchWidget': {
+      type: Boolean,
+      default: null,
+    },
+    'parentModelData': {
+      type: Object,
+      default: null,
+    },
+    'modelData': {
+      type: Object,
+      default: null,
+    },
+    'fieldValue': {
+      type: Object,
+      default: null,
+    },
+  },
+
+  emits: ['dataSelected', 'valueChanged', 'deleteSelected'],
   data: function () {
     return {
       'infoWindowNo': '',
       'infoWindowDto': {},
       // 显示部件名称
       'componentName': undefined,
-    }
+    };
   },
 
   watch: {
     '$route': function (to, from) {
-      this.getInfoWindowNo()
-      this.loadData()
+      this.getInfoWindowNo();
+      this.loadData();
     },
   },
 
   mounted: function () {
-    this.getInfoWindowNo()
-    this.loadData()
+    this.getInfoWindowNo();
+    this.loadData();
   },
 
   methods: {
     /**
-         * 加载数据
-         */
+             * 加载数据
+             */
     loadData: function () {
       if (this.infoWindowNo == undefined || this.infoWindowNo.length == 0) {
-        return
+        return;
       }
 
-      var _self = this
-      _self.$refs.loading.show()
+      var _self = this;
+      _self.$refs.loading.show();
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/uniqueByNo'),
         type: 'GET',
         dataType: 'json',
         data: { 'infoWindowNo': _self.infoWindowNo },
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          _self.$refs.loading.hide()
-          console.log(data)
-          _self.infoWindowDto = data
+          _self.$refs.loading.hide();
+          console.log(data);
+          _self.infoWindowDto = data;
 
           // 计算显示的部件
           if (_self.infoWindowDto.componentName != undefined && _self.infoWindowDto.componentName != '') {
-            _self.componentName = _self.infoWindowDto.componentName
+            _self.componentName = _self.infoWindowDto.componentName;
           } else if (_self.infoWindowDto.infoWindowType == undefined || _self.infoWindowDto.infoWindowType == 'TableGrid'
                         || _self.infoWindowDto.infoWindowType == 'NONE') {
-            _self.componentName = 'QueryPage'
+            _self.componentName = 'QueryPage';
           }
 
           _self.$nextTick(function () {
             if (_self.infoWindowDto.componentName == undefined || _self.infoWindowDto.componentName == '') {
               if (_self.infoWindowDto.infoWindowType == undefined || _self.infoWindowDto.infoWindowType == 'TableGrid' || _self.infoWindowDto.infoWindowType == 'NONE') {
-                _self.$refs.infoComponent.initWidget(data)
+                _self.$refs.infoComponent.initWidget(data);
               } else {
-                _self.$refs.infoComponent.initWidget(data)
+                _self.$refs.infoComponent.initWidget(data);
               }
             }
-          })
+          });
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.$refs.loading.hide()
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          _self.$refs.loading.hide();
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
 
     /**
-         * 根据 infoWindowNo 加载数据
-         */
+             * 根据 infoWindowNo 加载数据
+             */
     loadByInfoWindowNo: function (infoWindowNo) {
-      this.infoWindowNo = infoWindowNo
-      this.loadData()
+      this.infoWindowNo = infoWindowNo;
+      this.loadData();
     },
 
     /**
-         * 数据选择事件
-         */
+             * 数据选择事件
+             */
     dataSelected: function (data) {
-      this.$emit('dataSelected', data)
+      this.$emit('dataSelected', data);
     },
 
     valueChanged: function (fieldValue) {
-      this.$emit('valueChanged', fieldValue)
+      this.$emit('valueChanged', fieldValue);
     },
 
     /**
-         * 数据删除事件
-         */
+             * 数据删除事件
+             */
     deleteSelected: function (data) {
-      this.$emit('deleteSelected', data)
+      this.$emit('deleteSelected', data);
     },
 
     /**
-         * 获取选择的数据
-         */
+             * 获取选择的数据
+             */
     getSelectedModelDatas: function (data) {
-      var _self = this
-      return _self.$refs.infoComponent.getSelectedModelDatas()
+      var _self = this;
+      return _self.$refs.infoComponent.getSelectedModelDatas();
     },
 
     refresh: function () {
-      var _self = this
+      var _self = this;
       if (_self.$refs.infoComponent != undefined) {
         if (_self.componentName == 'QueryPage') {
-          _self.$refs.infoComponent.pageSearch()
+          _self.$refs.infoComponent.pageSearch();
         } else if (_self.componentName == 'ClientOrgnization') {
-          _self.$refs.infoComponent.refresh()
+          _self.$refs.infoComponent.refresh();
         }
       }
     },
 
     /**
-         * 获取查询窗口的编号
-         */
-    getInfoWindowNo: function(){
+             * 获取查询窗口的编号
+             */
+    getInfoWindowNo: function () {
       if (this.$route.params != undefined) {
-        var routeInfoWindowNo = this.$route.params.infoWindowNo
+        var routeInfoWindowNo = this.$route.params.infoWindowNo;
 
         // 如果是搜索框,那么填充查询窗口编号
-        if(this.isSearchWidget != true){
-          this.infoWindowNo = routeInfoWindowNo
+        if (this.isSearchWidget != true) {
+          this.infoWindowNo = routeInfoWindowNo;
         }
       }
     },
   },
-}
+};
 
 </script>

+ 25 - 25
packages/info/src/InfoWindowUtil.js

@@ -5,32 +5,32 @@ export default {
      * @param {*} infoFilterField 过滤字段
      */
   cloneInfoFilterFields: function (infoFilterFields) {
-    var cloneInfoFilterFields = []
+    var cloneInfoFilterFields = [];
     for (var i = 0, len = infoFilterFields.length; i < len; i++) {
-      var infoFilterField = infoFilterFields[i]
+      var infoFilterField = infoFilterFields[i];
       if (infoFilterField.constraintEnum == 'Between') {
-        var cloneObject1 = this.cloneInfoFilterField(infoFilterField)
-        cloneObject1.index = 1
-        cloneInfoFilterFields.push(cloneObject1)
+        let cloneObject1 = this.cloneInfoFilterField(infoFilterField);
+        cloneObject1.index = 1;
+        cloneInfoFilterFields.push(cloneObject1);
 
-        var cloneObject2 = this.cloneInfoFilterField(infoFilterField)
-        cloneObject2.index = 2
-        cloneObject2.name = '~'
-        cloneObject2.value = cloneObject1.value
-        cloneInfoFilterFields.push(cloneObject2)
+        let cloneObject2 = this.cloneInfoFilterField(infoFilterField);
+        cloneObject2.index = 2;
+        cloneObject2.name = '~';
+        cloneObject2.value = cloneObject1.value;
+        cloneInfoFilterFields.push(cloneObject2);
       } else {
-        var cloneObject1 = this.cloneInfoFilterField(infoFilterField)
-        cloneObject1.index = 1
-        cloneInfoFilterFields.push(cloneObject1)
+        let cloneObject1 = this.cloneInfoFilterField(infoFilterField);
+        cloneObject1.index = 1;
+        cloneInfoFilterFields.push(cloneObject1);
       }
     }
 
     // 排序
     cloneInfoFilterFields.sort(function (item1, item2) {
-      return item1.sortNo - item2.sortNo
-    })
+      return item1.sortNo - item2.sortNo;
+    });
 
-    return cloneInfoFilterFields
+    return cloneInfoFilterFields;
   },
 
   /**
@@ -63,25 +63,25 @@ export default {
         'value2': infoFilterField.value.value2,
       },
       'keyValues':infoFilterField.keyValues,
-    }
+    };
 
 
     if (cloneObject.displayType == 'ListBoxEnumEditor' || cloneObject.displayType == 'SearchBoxEditor') {
-      var fieldValue = {
+      let fieldValue = {
         id: {},
         displayValue: [],
         fieldType: 'Key',
-      }
-      cloneObject.fieldValue = fieldValue
+      };
+      cloneObject.fieldValue = fieldValue;
     } else if (cloneObject.displayType == 'MultiSearchBoxEditor') {
-      var fieldValue = {
+      let fieldValue = {
         displayValue: [],
         fieldType: 'MultiSearchBoxEditor',
         ids: [],
-      }
-      cloneObject.fieldValue = fieldValue
+      };
+      cloneObject.fieldValue = fieldValue;
     }
 
-    return cloneObject
+    return cloneObject;
   },
-}
+};

+ 67 - 47
packages/info/src/QueryCondition.vue

@@ -31,10 +31,10 @@
             :info-buttons="infoButtons"
             :is-search-widget="isSearchWidget"
             :show-button="showButton"
-            @simpleSearch="simpleSearch"
-            @refreshSearch="refreshSearch"
-            @executeProcess="executeProcess($event)"
-            @executeExport="executeExport"
+            @simple-search="simpleSearch"
+            @refresh-search="refreshSearch"
+            @execute-process="executeProcess($event)"
+            @execute-export="executeExport"
           />
         </div>
 
@@ -48,9 +48,9 @@
             :info-buttons="infoButtons"
             :is-search-widget="isSearchWidget"
             :show-button="showButton"
-            @complexSearch="complexSearch"
-            @executeProcess="executeProcess($event)"
-            @executeExport="executeExport"
+            @complex-search="complexSearch"
+            @execute-process="executeProcess($event)"
+            @execute-export="executeExport"
           />
         </div>
         <slot name="body" />
@@ -60,9 +60,9 @@
 </template>
 
 <script>
-var InfoWindowUtil = require('./InfoWindowUtil.js')
-var QueryConditionSimple = require('./QueryConditionSimple.vue').default
-var QueryConditionComplex = require('./QueryConditionComplex.vue').default
+var InfoWindowUtil = require('./InfoWindowUtil.js');
+var QueryConditionSimple = require('./QueryConditionSimple.vue').default;
+var QueryConditionComplex = require('./QueryConditionComplex.vue').default;
 
 export default {
   name: 'QueryCondition',
@@ -71,7 +71,27 @@ export default {
     QueryConditionSimple, QueryConditionComplex,
   },
 
-  props: ['infoFilterFields', 'infoButtons', 'isSearchWidget', 'showButton'],
+  props: {
+    'infoFilterFields': {
+      type: Object,
+      default: null,
+    },
+    'infoButtons': {
+      type: Object,
+      default: null,
+    },
+    'isSearchWidget':{
+      type: Boolean,
+      default: null,
+    },
+    'showButton':{
+      type: Boolean,
+      default: null,
+    },
+  },
+    
+
+  emits: ['simpleSearch', 'complexSearch', 'refreshSearch', 'executeProcess', 'executeExport'],
 
   data: function () {
     return {
@@ -79,29 +99,29 @@ export default {
       isSimple: true,
       filterFields: [],
       selectedText: [],
-    }
+    };
   },
-    
+
   watch: {
     $route: function (to, from) {
-      var _self = this
-      _self.simpleConditionValue = ''
-      _self.filterFields = []
+      var _self = this;
+      _self.simpleConditionValue = '';
+      _self.filterFields = [];
     },
 
     infoFilterFields: function (currentValue, oldValue) {
-      var _self = this
+      var _self = this;
 
-      _self.filterFields.splice(0, _self.filterFields.length)
+      _self.filterFields.splice(0, _self.filterFields.length);
 
       if (currentValue == undefined) {
-        return
+        return;
       }
 
-      var cloneInfoFilterFields = InfoWindowUtil.cloneInfoFilterFields(currentValue)
+      var cloneInfoFilterFields = InfoWindowUtil.cloneInfoFilterFields(currentValue);
 
       for (var i = 0, len = cloneInfoFilterFields.length; i < len; i++) {
-        _self.filterFields.push(cloneInfoFilterFields[i])
+        _self.filterFields.push(cloneInfoFilterFields[i]);
       }
     },
   },
@@ -113,7 +133,7 @@ export default {
          * @return {Object} 查询条件
          */
     isSimpleQuery: function () {
-      return this.isSimple === true
+      return this.isSimple === true;
     },
 
     /**
@@ -121,14 +141,14 @@ export default {
          * @return {Object} 查询条件
          */
     getQueryCondition: function () {
-      var _self = this
-      var values = []
+      var _self = this;
+      var values = [];
       if (_self.isSimple === true) {
-        values = this.$refs.queryConditionSimple.getQueryCondition()
+        values = this.$refs.queryConditionSimple.getQueryCondition();
       } else if (_self.isSimple === false) {
-        values = this.$refs.queryConditionComplex.getQueryCondition()
+        values = this.$refs.queryConditionComplex.getQueryCondition();
       }
-      return values
+      return values;
     },
 
     /**
@@ -136,8 +156,8 @@ export default {
          * @return {void} 
          */
     simpleSearch: function () {
-      this.isSimple = true
-      this.$emit('simpleSearch')
+      this.isSimple = true;
+      this.$emit('simpleSearch');
     },
 
 
@@ -147,9 +167,9 @@ export default {
          * @return {Array} 查询条件
          */
     getSimpleQueryCondition: function () {
-      var _self = this
-      var values = []
-      return values
+      var _self = this;
+      var values = [];
+      return values;
     },
 
 
@@ -158,15 +178,15 @@ export default {
          * @return {void} 
          */
     complexSearch: function () {
-      this.isSimple = false
-      this.$emit('complexSearch')
+      this.isSimple = false;
+      this.$emit('complexSearch');
     },
 
     /**
          * 刷新搜索
          */
     refreshSearch: function () {
-      this.$emit('refreshSearch')
+      this.$emit('refreshSearch');
     },
 
     /**
@@ -174,7 +194,7 @@ export default {
          *
          */
     executeProcess: function (infoButton) {
-      this.$emit('executeProcess', infoButton)
+      this.$emit('executeProcess', infoButton);
     },
 
     /**
@@ -182,7 +202,7 @@ export default {
          * @return {void} 
          */
     executeExport: function () {
-      this.$emit('executeExport')
+      this.$emit('executeExport');
     },
 
     /**
@@ -191,30 +211,30 @@ export default {
          * @return {void}     
          */
     changeSearch: function (val) {
-      var _self = this
+      var _self = this;
       if (val === false) {
-        this.simpleConditionValue = ''
-        _self.isSimple = false
+        this.simpleConditionValue = '';
+        _self.isSimple = false;
       }else if(val === true){
-        _self.isSimple = true
+        _self.isSimple = true;
       }else{
-        _self.isSimple = val
+        _self.isSimple = val;
       }
             
-      _self.$emit('changeSearch', val)
+      _self.$emit('changeSearch', val);
 
       // 当前查询是简单查询,切换到高级查询的时候,清空查询条件
       if (this.isSimple === true && val === false) {
         if (_self.filterFields != undefined) {
           _self.filterFields.forEach(function (item) {
-            item.value.value1 = ''
-            item.value.value2 = ''
-          })
+            item.value.value1 = '';
+            item.value.value2 = '';
+          });
         }
       }
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 73 - 46
packages/info/src/QueryConditionComplex.vue

@@ -88,7 +88,7 @@
               v-if="item.displayType =='ListBoxEnumEditor'"
               :field="item"
               :field-value="item.fieldValue"
-              @valueChanged="tabValueChanged($event, item, 'value1')"
+              @value-changed="tabValueChanged($event, item, 'value1')"
             />
 
             <InfoSearchWidget
@@ -99,7 +99,7 @@
               :field-value="item.fieldValue"
               :display-name="item.listFieldNames"
               class="m-form-input"
-              @valueChanged="tabValueChanged($event, item)"
+              @value-changed="tabValueChanged($event, item)"
             />
 
             <!-- 多选搜索框 number类型-->
@@ -110,7 +110,7 @@
               :field-value="item.fieldValue"
               :display-name="item.listFieldNames"
               class="m-form-input"
-              @valueChanged="multiSearchValueChange($event, item)"
+              @value-changed="multiSearchValueChange($event, item)"
             />
           </div>
           <div
@@ -146,8 +146,17 @@
               <option value="false">{{ $t('lang.QueryConditionComplex.false') }}</option>
             </select>
 
-            <!-- <input v-if="item.displayType =='CheckBoxEditor'" type="checkbox" class="form-control form-control-complex form-input" :id="item.id" v-model="item.value.value2" @keyup.enter="complexSearch()"> -->
-            <!-- <input v-if="item.displayType =='DateTimeBoxEditor'" type="date" placeholder="yyyy-MM-dd" class="form-control form-control-complex form-input" :id="item.id" v-model="item.value.value2" @keyup.enter="complexSearch()"> -->
+            <!-- <input v-if="item.displayType =='CheckBoxEditor'" 
+                type="checkbox" class="form-control form-control-complex form-input" 
+                :id="item.id" v-model="item.value.value2" 
+                @keyup.enter="complexSearch()"> -->
+            <!-- <input v-if="item.displayType =='DateTimeBoxEditor'" 
+                type="date" 
+                placeholder="yyyy-MM-dd" 
+                class="form-control form-control-complex form-input" 
+                :id="item.id" 
+                v-model="item.value.value2" 
+                @keyup.enter="complexSearch()"> -->
             <DateTimeV2
               v-if="item.displayType =='DateTimeBoxEditor'"
               :date-value="item.value.value2"
@@ -186,7 +195,7 @@
               :field="item"
               :field-value="item.fieldValue"
               class="m-form-input"
-              @valueChanged="tabValueChanged($event, item)"
+              @value-changed="tabValueChanged($event, item)"
             />
 
             <!--单选number类型-->
@@ -198,14 +207,14 @@
               :field-value="item.fieldValue"
               :display-name="item.listFieldNames"
               class="m-form-input"
-              @valueChanged="tabValueChanged($event, item)"
+              @value-changed="tabValueChanged($event, item)"
             />
           </div>
         </div>
       </div>
     </div>
 
-    <div slot="footer">
+    <div>
       <div>
         <div>
           <button
@@ -245,14 +254,14 @@
 
 <script>
 
-var EnumSelectWidgetInfo = require('./EnumSelectWidgetInfo.vue').default
-var DateTimeV2 = require('../../datetime-v2/src/DateTimeV2.vue').default
-var InfoSearchWidget = require('./InfoSearchWidget.vue').default
-var InfoMultiSearchWidget = require('./InfoMultiSearchWidget.vue').default
-var YearPicker = require('../../year-picker/src/YearPicker.vue').default
-var DateWidget = require('../../date/src/Date.vue').default
-var VueMonthlyPicker = require('../../vue-monthly-picker/src/VueMonthlyPicker.vue').default
-var Language = require('../../common/Language.js')
+var EnumSelectWidgetInfo = require('./EnumSelectWidgetInfo.vue').default;
+var DateTimeV2 = require('../../datetime-v2/src/DateTimeV2.vue').default;
+var InfoSearchWidget = require('./InfoSearchWidget.vue').default;
+var InfoMultiSearchWidget = require('./InfoMultiSearchWidget.vue').default;
+var YearPicker = require('../../year-picker/src/YearPicker.vue').default;
+var DateWidget = require('../../date/src/Date.vue').default;
+var VueMonthlyPicker = require('../../vue-monthly-picker/src/VueMonthlyPicker.vue').default;
+var Language = require('../../common/Language.js');
 
 export default {
 
@@ -266,22 +275,40 @@ export default {
     YearPicker,
   },
 
-  props: ['filterFields', 'infoButtons', 'isSearchWidget', 'showButton'],
+  props: {
+    'filterFields': {
+      type: Object,
+      default: null,
+    },
+    'infoButtons': {
+      type: Object,
+      default: null,
+    },
+    'isSearchWidget':{
+      type: Boolean,
+      default: null,
+    },
+    'showButton':{
+      type: Boolean,
+      default: null,
+    },
+  },
+
+  emits: ['complexSearch', 'executeExport', 'executeProcess'],
 
   data: function () {
-    this.Language = Language
+    this.Language = Language;
     return {
       simpleConditionValue: '',
       selectedText: [],
-    }
+    };
   },
-
   methods: {
     /**
                  * 日期时间选择框值改变事件
                  */
     dateValueChange: function (value, item, fieldName) {
-      item.value[fieldName] = value
+      item.value[fieldName] = value;
     },
     /**
          * 年月选择器时间改变
@@ -296,8 +323,8 @@ export default {
          * @param {Object} val
          */
     textChanged: function (item, key, val) {
-      var value = val + ' '
-      item.value[key] = value.replace(/(^\s*)|(\s*$)/g, '')
+      var value = val + ' ';
+      item.value[key] = value.replace(/(^\s*)|(\s*$)/g, '');
     },
 
 
@@ -308,33 +335,33 @@ export default {
            * @return {void}               
            */
     tabValueChanged: function (newFieldValue, item) {
-      item.fieldValue = newFieldValue
+      item.fieldValue = newFieldValue;
 
       if (item.index == 1) {
         if (item.displayType == 'ListBoxEnumEditor') {
-          item.value.value1 = newFieldValue.displayValue[0]
+          item.value.value1 = newFieldValue.displayValue[0];
         } else {
-          item.value.value1 = newFieldValue.id
+          item.value.value1 = newFieldValue.id;
         }
       } else if (item.index == 2) {
-        item.value.value2 = newFieldValue.id
+        item.value.value2 = newFieldValue.id;
       }
 
-      item.value.infoFilterFieldId = item.id
+      item.value.infoFilterFieldId = item.id;
     },
 
     // 多选搜索框值发生改变事件
     multiSearchValueChange: function (newFieldValue, item) {
-      var _self = this
-      item.fieldValue = newFieldValue
-      var ids = newFieldValue.ids
-      var texts = newFieldValue.displayValue
+      var _self = this;
+      item.fieldValue = newFieldValue;
+      var ids = newFieldValue.ids;
+      var texts = newFieldValue.displayValue;
       if (item.index == 1) {
-        item.value.value1 = ids.join(',')
+        item.value.value1 = ids.join(',');
       } else if (item.index == 2) {
-        item.value.value2 = ids.join(',')
+        item.value.value2 = ids.join(',');
       }
-      item.value.infoFilterFieldId = item.id
+      item.value.infoFilterFieldId = item.id;
     },
 
     /**
@@ -342,7 +369,7 @@ export default {
          * @return {void} 
          */
     complexSearch: function () {
-      this.$emit('complexSearch')
+      this.$emit('complexSearch');
     },
 
     /**
@@ -350,7 +377,7 @@ export default {
          * @return {void} 
          */
     executeExport: function () {
-      this.$emit('executeExport')
+      this.$emit('executeExport');
     },
 
     /**
@@ -358,15 +385,15 @@ export default {
          * @return {Object} 查询条件
          */
     getQueryCondition: function () {
-      var _self = this
-      var values = []
+      var _self = this;
+      var values = [];
       _self.filterFields.forEach(function (item) {
         if (item.index == 1) {
-          item.value.fieldName = item.fieldName
-          values.push(item.value)
+          item.value.fieldName = item.fieldName;
+          values.push(item.value);
         }
-      })
-      return values
+      });
+      return values;
     },
 
     /**
@@ -374,7 +401,7 @@ export default {
          *
          */
     executeProcess: function (infoButton) {
-      this.$emit('executeProcess', infoButton)
+      this.$emit('executeProcess', infoButton);
     },
 
     /**
@@ -382,11 +409,11 @@ export default {
          */
     mouseWheelEvent: function (event) {
       if (event || Window.event) {
-        event.preventDefault()
+        event.preventDefault();
       }
     },
   },
-}
+};
 </script>
 
 

+ 35 - 17
packages/info/src/QueryConditionSimple.vue

@@ -56,23 +56,41 @@
 
 <script>
 
-var Language = require('../../common/Language.js')
+var Language = require('../../common/Language.js');
 
 export default {
 
   components: {
   },
 
-  props: ['infoFilterFields', 'infoButtons', 'isSearchWidget', 'showButton'],
+  props: {
+    'infoFilterFields': {
+      type: Object,
+      default: null,
+    },
+    'infoButtons': {
+      type: Object,
+      default: null,
+    }, 
+    'isSearchWidget':{
+      type: Boolean,
+      default: false,
+    },
+    'showButton':{
+      type: Boolean,
+      default: false,
+    },
+  },
+
+  emits: ['simpleSearch', 'refreshSearch', 'executeExport', 'executeProcess'],
 
   data: function () {
-    this.Language = Language
+    this.Language = Language;
     return {
       simpleConditionValue: '',
       selectedText: [],
-    }
+    };
   },
-
   methods: {
 
 
@@ -81,14 +99,14 @@ export default {
          * @return {void} 
          */
     simpleSearch: function () {
-      this.$emit('simpleSearch')
+      this.$emit('simpleSearch');
     },
 
     /**
          * 刷新搜索
          */
     refreshSearch: function () {
-      this.$emit('refreshSearch')
+      this.$emit('refreshSearch');
     },
 
     /**
@@ -96,7 +114,7 @@ export default {
          * @return {void} 
          */
     executeExport: function () {
-      this.$emit('executeExport')
+      this.$emit('executeExport');
     },
 
     /**
@@ -104,7 +122,7 @@ export default {
          *
          */
     executeProcess: function (infoButton) {
-      this.$emit('executeProcess', infoButton)
+      this.$emit('executeProcess', infoButton);
     },
 
     /**
@@ -112,19 +130,19 @@ export default {
          * @return {Object} 查询条件
          */
     getQueryCondition: function () {
-      var _self = this
-      var values = []
+      var _self = this;
+      var values = [];
       _self.infoFilterFields.forEach(function (item) {
         if (item.displayType == 'TextEditor' && item.constraintEnum != 'Between') {
-          item.value.value1 = _self.simpleConditionValue
-          item.value.fieldName = item.fieldName
-          values.push(item.value)
+          item.value.value1 = _self.simpleConditionValue;
+          item.value.fieldName = item.fieldName;
+          values.push(item.value);
         }
-      })
-      return values
+      });
+      return values;
     },
   },
-}
+};
 </script>
 
 

+ 297 - 263
packages/info/src/QueryPage.vue

@@ -18,8 +18,8 @@
             :header-name="infoWindowDto.name"
             :info-filter-fields="infoFilterFields"
             :info-window-no="infoWindowDto.no"
-            @filterFieldPropertyChanged="filterFieldPropertyChanged($event)"
-            @gridFieldPropertyChanged="gridFieldPropertyChanged($event)"
+            @filter-field-property-changed="filterFieldPropertyChanged($event)"
+            @grid-field-property-changed="gridFieldPropertyChanged($event)"
           />
         </div>
         <div
@@ -32,11 +32,11 @@
             :info-buttons="infoWindowDto.infoButtons"
             :is-search-widget="isSearchWidget"
             :show-button="true"
-            @simpleSearch="simpleSearch"
-            @complexSearch="complexSearch"
-            @refreshSearch="pageSearch"
-            @executeProcess="executeProcess($event)"
-            @executeExport="executeExport"
+            @simple-search="simpleSearch"
+            @complex-search="complexSearch"
+            @refresh-search="pageSearch"
+            @execute-process="executeProcess($event)"
+            @execute-export="executeExport"
           />
         </div>
       </div>
@@ -66,7 +66,7 @@
                 />
               </th>
               <th
-                v-for="(infoGridField,index) in infoGridFields"
+                v-for="(infoGridField) in infoGridFields"
                 v-show="infoGridField.isShow"
                 :key="infoGridField.fieldName"
                 :width="infoGridField.width + 'px'"
@@ -112,6 +112,7 @@
                 v-for="item2 in infoGridFields"
                 v-show="item2.isShow"
                 id="item.id"
+                :key="'td-' + item2.id"
               >
                 <span v-if="item2.simpleDisplayType == 'Image'">
                   <QueryPageImage
@@ -134,8 +135,19 @@
       style="margin-top: 10px;"
     >
       <div class="pull-left">
-        <span>{{ $t('lang.QueryPage.the') }}{{ (pagination.current_page-1)*pagination.per_page+1 }}-{{ pagination.current_page*pagination.per_page }}{{ $t('lang.QueryPage.strip') }},{{ $t('lang.QueryPage.total') }}{{ pagination.total }}{{ $t('lang.QueryPage.strip') }},{{ $t('lang.QueryPage.displayOnEachPage') }}</span>
-        <PageSizeSelect @pageSizeChanged="gridSizeSelect" />
+        <span>{{ $t('lang.QueryPage.the') }}
+          {{ (pagination.current_page-1)*pagination.per_page+1 }}
+          -
+          {{ pagination.current_page*pagination.per_page }}
+          {{ $t('lang.QueryPage.strip') }}
+          ,
+          {{ $t('lang.QueryPage.total') }}
+          {{ pagination.total }}
+          {{ $t('lang.QueryPage.strip') }}
+          ,
+          {{ $t('lang.QueryPage.displayOnEachPage') }}
+        </span>
+        <PageSizeSelect @page-size-changed="gridSizeSelect" />
         <span>{{ $t('lang.QueryPage.strip') }}</span>
       </div>
       <div class="pull-right">
@@ -147,66 +159,89 @@
     </div>
     <Loading ref="loading" />
     <Modal ref="modal">
-      <ProcessReportResult
-        :process-report-result="processReportResult"
-        :pdf-only="pdfOnly"
-        :excel-only="excelOnly"
-      />
-      <div slot="header">{{ $t('lang.QueryPage.resultsOfEnforcement') }}</div>
+      <template #default>
+        <ProcessReportResult
+          :process-report-result="processReportResult"
+          :pdf-only="pdfOnly"
+          :excel-only="excelOnly"
+        />
+      </template>
+      <template #header>
+        <div>{{ $t('lang.QueryPage.resultsOfEnforcement') }}</div>
+      </template>
     </Modal>
   </div>
 </template>
 
 <script>
-var Common = require('../../common/Common.js')
-var Modal = require('../../modal/src/Modal.vue').default
+var Common = require('../../common/Common.js');
+var Modal = require('../../modal/src/Modal.vue').default;
 
-var PageSizeSelect = require('../../page-size-select/src/PageSizeSelect.vue').default
-var Pagination = require('../../vue-bootstrap-pagination/src/vue-bootstrap-pagination.vue').default
+var PageSizeSelect = require('../../page-size-select/src/PageSizeSelect.vue').default;
+var Pagination = require('../../vue-bootstrap-pagination/src/vue-bootstrap-pagination.vue').default;
 
-var QueryCondition = require('./QueryCondition.vue').default
-var InfoHeader = require('./InfoHeader.vue').default
-var InfoUtil = require('./InfoUtil.js')
-var Notify = require('../../common/Notify.js').default
+var QueryCondition = require('./QueryCondition.vue').default;
+var InfoHeader = require('./InfoHeader.vue').default;
+var InfoUtil = require('./InfoUtil.js');
+var Notify = require('../../common/Notify.js').default;
 
-var Loading = require('../../loading/src/Loading.vue').default
-var ProcessReportResult = require('../../process/src/ProcessReportResult.vue').default
-var Uuid = require('../../common/Uuid.js')
-var QueryPageImage = require('./QueryPageImage.vue').default
+var Loading = require('../../loading/src/Loading.vue').default;
+var ProcessReportResult = require('../../process/src/ProcessReportResult.vue').default;
+var Uuid = require('../../common/Uuid.js');
+var QueryPageImage = require('./QueryPageImage.vue').default;
 
-var DownloadService = require('../../common/DownloadService.js')
-var HtmlWindowResource = require('../../html-window/src/api/HtmlWindowResource.js')
-var CustomerWindowResource = require('../../customer-window/src/api/CustomerWindowResource.js')
-var ProcessReportResource = require('../../process/src/api/ProcessReportResource.js')
+var DownloadService = require('../../common/DownloadService.js');
+var HtmlWindowResource = require('../../html-window/src/api/HtmlWindowResource.js');
+var CustomerWindowResource = require('../../customer-window/src/api/CustomerWindowResource.js');
+var ProcessReportResource = require('../../process/src/api/ProcessReportResource.js');
 
-var UserStorageResource = require('../../common/UserStorageResource.js')
+var UserStorageResource = require('../../common/UserStorageResource.js');
 
-var Language = require('../../common/Language.js')
+var Language = require('../../common/Language.js');
 
 export default {
 
   name: 'QueryPage',
 
   components: {
-    Common,
     Pagination,
     QueryCondition,
     Modal,
     InfoHeader,
-    Notify,
     Loading,
     ProcessReportResult,
-    Uuid,
-    InfoUtil,
     PageSizeSelect,
     QueryPageImage,
-    DownloadService,
   },
 
-  props: ['whereClause', 'isSearchWidget', 'parentModelData', 'modelData', 'fieldValue'],
+  
+  props: {
+    'whereClause':{
+      type: String,
+      default: null,
+    },  
+    'isSearchWidget':{
+      type: Boolean,
+      default: false,
+    }, 
+    'parentModelData': {
+      type: Object,
+      default: null,
+    },
+    'modelData': {
+      type: Object,
+      default: null,
+    },
+    'fieldValue': {
+      type: Object,
+      default: null,
+    },
+  },
+
+  emits: ['dataSelected'],
 
   data: function () {
-    this.Language = Language
+    this.Language = Language;
     return {
       infoWindowDto: {},
       queryResult: {},
@@ -235,19 +270,19 @@ export default {
       infoFilterFields: [],
       // 表格外面的DIV的id
       tableOutDivId: Uuid.createUUID(),
-    }
+    };
   },
   computed: {
     tableWidth: function () {
-      var totalWidth = 50
+      var totalWidth = 50;
       if (this.infoWindowDto != undefined && this.infoGridFields != undefined) {
         this.infoGridFields.forEach(function (item) {
           if (item.isShow) {
-            totalWidth += Number(item.width)
+            totalWidth += Number(item.width);
           }
-        })
+        });
       }
-      return totalWidth + 'px'
+      return totalWidth + 'px';
     },
   },
   watch: {
@@ -256,24 +291,24 @@ export default {
          * 是否选择了全部的数据
          */
     isSelectAll: function (val) {
-      var _self = this
+      var _self = this;
       if (_self.multipleSelect) {
         if (_self.isSelectAll) {
-          _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length)
+          _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length);
           if (val) {
             _self.infoWindowData.dataList.forEach(function (item) {
-              item.select = true
-              _self.selectedModelDatas.push(item)
-            })
+              item.select = true;
+              _self.selectedModelDatas.push(item);
+            });
           }
         } else {
           _self.infoWindowData.dataList.forEach(function (item) {
-            item.select = false
-          })
-          _self.selectedModelDatas = []
+            item.select = false;
+          });
+          _self.selectedModelDatas = [];
         }
       } else {
-        _self.isSelectAll = false
+        _self.isSelectAll = false;
       }
     },
 
@@ -281,8 +316,8 @@ export default {
          * 路由发生改变
          */
     $route: function (to, from) {
-      var _self = this
-      _self.infoWindowData = {}
+      var _self = this;
+      _self.infoWindowData = {};
     },
 
     /**
@@ -301,80 +336,80 @@ export default {
          * fieldValue发生改变
          */
     fieldValue: function (to, from) {
-      this.reSelectedNode(to)
+      this.reSelectedNode(to);
     },
   },
 
   methods: {
     // 页码数量改变
     gridSizeSelect: function (newPageSize) {
-      this.pagination.per_page = newPageSize
-      this.pagination.current_page = 1
+      this.pagination.per_page = newPageSize;
+      this.pagination.current_page = 1;
     },
 
     ondragstart: function (event, gridFieldItem) {
-      var _self = this
-      _self.startX = event.pageX
-      _self.startWidth = Number(gridFieldItem.width)
-      event.dataTransfer.setDragImage(event.target, 0, 20)
-      event.dataTransfer.effectAllowed = 'move'
+      var _self = this;
+      _self.startX = event.pageX;
+      _self.startWidth = Number(gridFieldItem.width);
+      event.dataTransfer.setDragImage(event.target, 0, 20);
+      event.dataTransfer.effectAllowed = 'move';
     },
 
     ondrag: function (event, gridFieldItem) {
-      var _self = this
-      gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX)
+      var _self = this;
+      gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX);
     },
 
     ondragend: function (event, gridFieldItem, index) {
-      var _self = this
-      let newWidth = _self.startWidth + (event.pageX - _self.startX)
+      var _self = this;
+      let newWidth = _self.startWidth + (event.pageX - _self.startX);
       if (newWidth < 50) {
-        newWidth = 50
+        newWidth = 50;
       }
-      gridFieldItem.width = newWidth
+      gridFieldItem.width = newWidth;
 
-      InfoUtil.saveInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields)
+      InfoUtil.saveInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields);
 
     },
 
 
     ondragover: function (event, gridFieldItem) {
-      event.preventDefault()
-      event.dataTransfer.dropEffect = 'move'
+      event.preventDefault();
+      event.dataTransfer.dropEffect = 'move';
     },
 
 
     // 初始化数据
     initWidget: function (data) {
-      var _self = this
+      var _self = this;
       if (data == undefined) {
-        return
+        return;
       }
 
-      _self.infoWindowDto = data
-      _self.infoFilterFields = data.infoFilterFields
-      _self.infoGridFields = data.infoGridFields
+      _self.infoWindowDto = data;
+      _self.infoFilterFields = data.infoFilterFields;
+      _self.infoGridFields = data.infoGridFields;
       // var sortNo = 10;
       _self.infoGridFields.forEach(function (item) {
-        _self.$set(item, 'width', 150)
-      })
+        _self.$set(item, 'width', 150);
+      });
       _self.infoFilterFields.forEach(function (item) {
         item.value = {
           'infoFilterFieldId': item.id,
           'value1': '',
           'value2': '',
-        }
-      })
-      InfoUtil.restoreInfoFilterFields(_self.infoWindowDto.no, _self.infoFilterFields)
-      InfoUtil.restoreInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields)
+        };
+      });
+      InfoUtil.restoreInfoFilterFields(_self.infoWindowDto.no, _self.infoFilterFields);
+      InfoUtil.restoreInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields);
 
 
-      _self.simpleSearch()
+      _self.simpleSearch();
     },
 
     complexSearch: function () {
-      var _self = this
-      _self.pagination.current_page = 1
+      var _self = this;
+      _self.pagination.current_page = 1;
       var infoQueryParam = {
         infoWindowNo: _self.infoWindowDto.no,
         start: (_self.pagination.current_page - 1) * _self.pagination.per_page,
@@ -385,21 +420,21 @@ export default {
         parentModelData: _self.parentModelData,
         modelData: _self.modelData,
         isSearchWidget: _self.isSearchWidget,
-      }
-      _self.infoQueryParam = infoQueryParam
-      _self.currentIsSimpleSearch = false
-      _self.queryInfoWindowDataComplex()
+      };
+      _self.infoQueryParam = infoQueryParam;
+      _self.currentIsSimpleSearch = false;
+      _self.queryInfoWindowDataComplex();
     },
 
     pageSearch: function () {
-      var _self = this
-      _self.infoQueryParam.start = (_self.pagination.current_page - 1) * _self.pagination.per_page
-      _self.infoQueryParam.length = _self.pagination.per_page
-      var isSimpleQuery = _self.$refs.queryCondition.isSimpleQuery()
+      var _self = this;
+      _self.infoQueryParam.start = (_self.pagination.current_page - 1) * _self.pagination.per_page;
+      _self.infoQueryParam.length = _self.pagination.per_page;
+      var isSimpleQuery = _self.$refs.queryCondition.isSimpleQuery();
       if (isSimpleQuery) {
-        _self.queryInfoWindowDataSimple()
+        _self.queryInfoWindowDataSimple();
       } else {
-        _self.queryInfoWindowDataComplex()
+        _self.queryInfoWindowDataComplex();
       }
     },
 
@@ -408,8 +443,8 @@ export default {
        * @return {void} 
        */
     simpleSearch: function () {
-      var _self = this
-      _self.pagination.current_page = 1
+      var _self = this;
+      _self.pagination.current_page = 1;
       var infoQueryParam = {
         infoWindowNo: _self.infoWindowDto.no,
         start: (_self.pagination.current_page - 1) * _self.pagination.per_page,
@@ -420,99 +455,99 @@ export default {
         parentModelData: _self.parentModelData,
         modelData: _self.modelData,
         isSearchWidget: _self.isSearchWidget,
-      }
-      _self.infoQueryParam = infoQueryParam
-      _self.currentIsSimpleSearch = true
-      _self.queryInfoWindowDataSimple()
+      };
+      _self.infoQueryParam = infoQueryParam;
+      _self.currentIsSimpleSearch = true;
+      _self.queryInfoWindowDataSimple();
     },
 
     queryInfoWindowDataComplex: function () {
-      var _self = this
-      _self.$refs.loading.show()
+      var _self = this;
+      _self.$refs.loading.show();
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataComplex'),
         type: 'post',
         dataType: 'json',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         contentType: 'application/json',
         data: JSON.stringify(_self.infoQueryParam),
         success: function (data) {
-          _self.$refs.loading.hide()
+          _self.$refs.loading.hide();
           data.dataList.forEach(function (item) {
-            item.select = false
-          })
-          _self.infoWindowData = data
-          _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length)
+            item.select = false;
+          });
+          _self.infoWindowData = data;
+          _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length);
 
-          _self.reSelectedNode(_self.fieldValue)
-          _self.pagination.total = data.totalSize
-          _self.pagination.last_page = Math.ceil(data.totalSize / data.range.length)
+          _self.reSelectedNode(_self.fieldValue);
+          _self.pagination.total = data.totalSize;
+          _self.pagination.last_page = Math.ceil(data.totalSize / data.range.length);
 
-          _self.fixedTableHeader()
+          _self.fixedTableHeader();
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.$refs.loading.hide()
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          _self.$refs.loading.hide();
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
 
     queryInfoWindowDataSimple: function () {
-      var _self = this
+      var _self = this;
       if (_self.$refs.loading) {
-        _self.$refs.loading.show()
+        _self.$refs.loading.show();
       }
 
-      _self.infoQueryParam.whereClause = _self.whereClause
+      _self.infoQueryParam.whereClause = _self.whereClause;
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataSimple'),
         type: 'post',
         dataType: 'json',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         contentType: 'application/json',
         data: JSON.stringify(_self.infoQueryParam),
         success: function (data) {
           if (_self.$refs.loading) {
-            _self.$refs.loading.hide()
+            _self.$refs.loading.hide();
           }
           data.dataList.forEach(function (item) {
-            item.select = false
-          })
-          _self.infoWindowData = data
+            item.select = false;
+          });
+          _self.infoWindowData = data;
 
-          _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length)
+          _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length);
 
-          _self.reSelectedNode(_self.fieldValue)
-          _self.pagination.total = data.totalSize
-          _self.pagination.last_page = Math.ceil(data.totalSize / data.range.length)
+          _self.reSelectedNode(_self.fieldValue);
+          _self.pagination.total = data.totalSize;
+          _self.pagination.last_page = Math.ceil(data.totalSize / data.range.length);
 
-          _self.fixedTableHeader()
+          _self.fixedTableHeader();
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
           if (_self.$refs.loading) {
-            _self.$refs.loading.hide()
+            _self.$refs.loading.hide();
           }
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
 
     /**
          * 双击表格行事件
          */
     selectNode: function (modelData) {
-      this.$emit('dataSelected', modelData)
+      this.$emit('dataSelected', modelData);
     },
 
     /**
          * 选择/取消选择表格行中的复选框事件
          */
     selectNodeForSearch: function (modelData) {
-      var _self = this
+      var _self = this;
       if ((_self.fieldValue != undefined) && (_self.fieldValue.fieldType == 'ManyToManyKey')) {
         // CRUD-ManyToManySetBoxEditor多选搜索框-多选
 
@@ -522,25 +557,25 @@ export default {
       } else if ((_self.fieldValue != undefined) && (_self.fieldValue.fieldType == 'Key')) {
         // 单选
         // 清空选择项
-        _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length)
+        _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length);
       }
-      var currentStatus = modelData.select
-      var index = _self.selectedModelDatas.indexOf(modelData)
+      var currentStatus = modelData.select;
+      var index = _self.selectedModelDatas.indexOf(modelData);
       if (!_self.multipleSelect) {
-        _self.selectedModelDatas = []
+        _self.selectedModelDatas = [];
         _self.infoWindowData.dataList.forEach(function (item) {
-          item.select = false
-        })
+          item.select = false;
+        });
       }
 
-      modelData.select = !currentStatus
+      modelData.select = !currentStatus;
 
       if (index < 0) {
-        _self.selectedModelDatas.push(modelData)
-        _self.$emit('dataSelected', modelData)
+        _self.selectedModelDatas.push(modelData);
+        _self.$emit('dataSelected', modelData);
       } else {
-        _self.selectedModelDatas.splice(index, 1)
-        _self.$emit('deleteSelected', modelData)
+        _self.selectedModelDatas.splice(index, 1);
+        _self.$emit('deleteSelected', modelData);
       }
     },
 
@@ -548,32 +583,32 @@ export default {
          * 获取选择的数据
          */
     getSelectedModelDatas: function (data) {
-      var _self = this
-      return _self.selectedModelDatas
+      var _self = this;
+      return _self.selectedModelDatas;
     },
 
     /**
          * 条件字段属性发生改变
          */
     filterFieldPropertyChanged: function (infoFilterFieldsClone) {
-      let _self = this
+      let _self = this;
       InfoUtil.saveInfoFilterFields(_self.infoWindowDto.no, infoFilterFieldsClone).then(successData => {
-        InfoUtil.restoreInfoFilterFields(_self.infoWindowDto.no, _self.infoFilterFields)
+        InfoUtil.restoreInfoFilterFields(_self.infoWindowDto.no, _self.infoFilterFields);
       }, errorData => {
-        console.log(errorData)
-      })
+        console.log(errorData);
+      });
     },
 
     /**
          * 表格字段属性发生改变
          */
     gridFieldPropertyChanged: function (infoGridFieldsClone) {
-      let _self = this
+      let _self = this;
       InfoUtil.saveInfoGridFields(_self.infoWindowDto.no, infoGridFieldsClone).then(successData => {
-        InfoUtil.restoreInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields)
+        InfoUtil.restoreInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields);
       }, errorData => {
-        console.log(errorData)
-      })
+        console.log(errorData);
+      });
     },
 
     /**
@@ -582,128 +617,127 @@ export default {
          * @return {void}             
          */
     executeProcess: function (infoButton) {
-      var _self = this
+      var _self = this;
 
       if (infoButton == null) {
-        return
+        return;
       }
 
       if (infoButton.htmlWindowNo != null && infoButton.htmlWindowNo.length > 0) {
         HtmlWindowResource.uniqueByNo(infoButton.htmlWindowNo).then(htmlWindowDto => {
           if (htmlWindowDto != undefined) {
-            var htmlWindowUrl = htmlWindowDto.htmlFileName
-            var autoCloseInterval = htmlWindowDto.autoCloseInterval
-            var regExp = new RegExp('[{].*?[}]', 'g')
-            var result = htmlWindowUrl.match(regExp)
+            var htmlWindowUrl = htmlWindowDto.htmlFileName;
+            var autoCloseInterval = htmlWindowDto.autoCloseInterval;
+            var regExp = new RegExp('[{].*?[}]', 'g');
+            var result = htmlWindowUrl.match(regExp);
             if (htmlWindowUrl != undefined && htmlWindowUrl != '') {
               for (var index = 0, len = result.length; index < len; index++) {
-                var tempResult = result[index]
-                console.log('{' + tempResult + '}匹配')
+                var tempResult = result[index];
+                console.log('{' + tempResult + '}匹配');
                 if (tempResult == '{URL}') {
-                  htmlWindowUrl = htmlWindowUrl.replace('{URL}', Common.getRedirectUrl(''))
-                  console.log('{' + htmlWindowUrl + '}地址')
+                  htmlWindowUrl = htmlWindowUrl.replace('{URL}', Common.getRedirectUrl(''));
+                  console.log('{' + htmlWindowUrl + '}地址');
                 } else if (tempResult == '{RecordId}') {
                   if (_self.selectedModelDatas.length == 0) {
-                    Notify.error('错误', '未选择可操作的数据', true)
-                    return
+                    Notify.error('错误', '未选择可操作的数据', true);
+                    return;
                   }
-                  htmlWindowUrl = htmlWindowUrl.replace('{RecordId}', _self.getFirstSelectRecordId())
+                  htmlWindowUrl = htmlWindowUrl.replace('{RecordId}', _self.getFirstSelectRecordId());
                 } else if (tempResult == '{RecordIds}') {
                   if (_self.selectedModelDatas.length == 0) {
-                    Notify.error('错误', '未选择可操作的数据', true)
-                    return
+                    Notify.error('错误', '未选择可操作的数据', true);
+                    return;
                   }
-                  htmlWindowUrl = htmlWindowUrl.replace('{RecordIds}', _self.getSelectedRecordIds())
+                  htmlWindowUrl = htmlWindowUrl.replace('{RecordIds}', _self.getSelectedRecordIds());
                 } else if (tempResult == '{Token}') {
-                  htmlWindowUrl = htmlWindowUrl.replace('{Token}', Common.getToken())
+                  htmlWindowUrl = htmlWindowUrl.replace('{Token}', Common.getToken());
                 } else if (tempResult == '{infoWindowNo}') {
-                  htmlWindowUrl = htmlWindowUrl.replace('{infoWindowNo}', _self.infoWindowDto.no)
+                  htmlWindowUrl = htmlWindowUrl.replace('{infoWindowNo}', _self.infoWindowDto.no);
                 } else {
                   if (_self.selectedModelDatas.length == 0) {
-                    Notify.error('错误', '未选择可操作的数据', true)
-                    return
+                    Notify.error('错误', '未选择可操作的数据', true);
+                    return;
                   } else if (_self.selectedModelDatas.length > 1) {
-                    Notify.error('错误', '请选择一条数据', true)
-                    return
+                    Notify.error('错误', '请选择一条数据', true);
+                    return;
                   }
-                  var tempResult1 = tempResult.replace('{', '').replace('}', '')
-                  htmlWindowUrl = htmlWindowUrl.replace(tempResult, _self.getFirstSelectModelDataFieldValue(tempResult1))
+                  var tempResult1 = tempResult.replace('{', '').replace('}', '');
+                  htmlWindowUrl = htmlWindowUrl.replace(tempResult, _self.getFirstSelectModelDataFieldValue(tempResult1));
                 }
               }
 
-              var openWindow = window.open(htmlWindowUrl)
+              var openWindow = window.open(htmlWindowUrl);
 
               // 自动关闭
               if (autoCloseInterval != undefined) {
                 setTimeout(function () {
-                  openWindow.close()
-                  openWindow = undefined
-                }, autoCloseInterval * 1000)
+                  openWindow.close();
+                  openWindow = undefined;
+                }, autoCloseInterval * 1000);
               }
             }
           }
         }, errorData => {
-          Common.processException(errorData)
-        })
+          Common.processException(errorData);
+        });
       } else if (infoButton.customerWindowNo != null && infoButton.customerWindowNo.length > 0) {
         CustomerWindowResource.uniqueByNo(infoButton.customerWindowNo).then(customerWindowDto => {
-          var customerWindowRouteUrl = customerWindowDto.routeUrl
+          var customerWindowRouteUrl = customerWindowDto.routeUrl;
           if (customerWindowRouteUrl != undefined && customerWindowRouteUrl != '') {
             if (customerWindowRouteUrl == 'exportInfoData') {
               var downloadUrl = Common.getApiURL('exportResource/exportInfoData') + '?infoWindowNo=' + _self.infoWindowDto.no
                                 + '&recordIds=' + _self.getSelectedRecordIds().join(',')
-                                + '&token=' + Common.getToken()
-              window.open(downloadUrl)
+                                + '&token=' + Common.getToken();
+              window.open(downloadUrl);
             } else {
               // if (_self.selectedModelDatas.length == 0) {
               // Notify.error("错误", "未选择可操作的数据", true);
               // return;
               // }
-              localStorage.setItem(_self.uuid, JSON.stringify(_self.selectedModelDatas))
+              localStorage.setItem(_self.uuid, JSON.stringify(_self.selectedModelDatas));
 
               var routeDate = {
                 path: customerWindowRouteUrl,
                 query: {
                   'uuid': _self.uuid,
                 },
-              }
-              _self.$router.push(routeDate)
+              };
+              _self.$router.push(routeDate);
             }
           }
         }, errorData => {
-          Common.processException(errorData)
-        })
+          Common.processException(errorData);
+        });
       } else if (infoButton.processReportNo != null && infoButton.processReportNo.length > 0) {
 
-        var processReportNo = infoButton.processReportNo
+        var processReportNo = infoButton.processReportNo;
         if (processReportNo != undefined && processReportNo != '') {
-          var _self = this
-          var ids = _self.getSelectedRecordIds()
+          var ids = _self.getSelectedRecordIds();
           if (ids.length < 1) {
-            Notify.error('错误', '未选择可操作的数据', true)
-            return
+            Notify.error('错误', '未选择可操作的数据', true);
+            return;
           }
 
-          _self.$refs.loading.show()
+          _self.$refs.loading.show();
           ProcessReportResource.uniqueByNo(infoButton.processReportNo).then(successData => {
-            _self.processReportDto = successData
+            _self.processReportDto = successData;
             if (successData) {
-              _self.pdfOnly = successData.pdfOnly
-              _self.excelOnly = successData.excelOnly
+              _self.pdfOnly = successData.pdfOnly;
+              _self.excelOnly = successData.excelOnly;
             }
             ProcessReportResource.runProcessByIds(infoButton.processReportNo, ids).then(successData => {
-              _self.$refs.modal.show = true
-              _self.$refs.loading.hide()
-              _self.processReportResult = successData
-              _self.$emit('processExecuteFinish')
+              _self.$refs.modal.show = true;
+              _self.$refs.loading.hide();
+              _self.processReportResult = successData;
+              _self.$emit('processExecuteFinish');
             }, errorData => {
-              _self.$refs.loading.hide()
-              Common.processException(errorData)
-            })
+              _self.$refs.loading.hide();
+              Common.processException(errorData);
+            });
           }, errorData => {
-            _self.$refs.loading.hide()
-            Common.processException(errorData)
-          })
+            _self.$refs.loading.hide();
+            Common.processException(errorData);
+          });
         }
       }
     },
@@ -713,33 +747,33 @@ export default {
          * @return {void} 
          */
     executeExport: function () {
-      var _self = this
+      var _self = this;
 
-      var infoFilterFieldValues = _self.$refs.queryCondition.getQueryCondition()
-      var infoFilterFieldValueStrs = JSON.stringify(infoFilterFieldValues)
+      var infoFilterFieldValues = _self.$refs.queryCondition.getQueryCondition();
+      var infoFilterFieldValueStrs = JSON.stringify(infoFilterFieldValues);
 
-      var isSimpleQuery = _self.$refs.queryCondition.isSimpleQuery()
+      var isSimpleQuery = _self.$refs.queryCondition.isSimpleQuery();
 
       var downloadUrl = Common.getApiURL('exportResource/exportInfoData') + '?infoWindowNo=' + _self.infoWindowDto.no
                 + '&recordIds=' + _self.getSelectedRecordIds().join(',')
                 + '&infoFilterFieldValues=' + _self.uuid
-                + '&simpleSearch=' + isSimpleQuery
+                + '&simpleSearch=' + isSimpleQuery;
 
 
-      var timeStr = moment().format('_YYYYMMDD_hhmmss')
-      var fileName = (_self.infoWindowDto == null ? '导出数据' + timeStr + '.xls' : _self.infoWindowDto.name + timeStr + '.xls')
+      var timeStr = moment().format('_YYYYMMDD_hhmmss');
+      var fileName = (_self.infoWindowDto == null ? '导出数据' + timeStr + '.xls' : _self.infoWindowDto.name + timeStr + '.xls');
       let userStorageDtos = [
         {
           key: _self.uuid,
           value: infoFilterFieldValueStrs,
         },
-      ]
+      ];
       // 组装查询条件,然后放到后台数据库当中
       UserStorageResource.uploadUserStorage(userStorageDtos).then(successData => {
-        DownloadService.downloadFile(downloadUrl, fileName)
+        DownloadService.downloadFile(downloadUrl, fileName);
       }, errorData => {
-        Common.processException(errorData)
-      })
+        Common.processException(errorData);
+      });
     },
 
 
@@ -747,66 +781,66 @@ export default {
          * 获取选择数据的Id集合
          */
     getSelectedRecordIds: function () {
-      var _self = this
-      var recordIds = []
+      var _self = this;
+      var recordIds = [];
       _self.selectedModelDatas.forEach(function (selectedModelData) {
-        recordIds.push(selectedModelData.id)
-      })
-      return recordIds
+        recordIds.push(selectedModelData.id);
+      });
+      return recordIds;
     },
 
     /**
          * 获取选中的第一个数据的Id
          */
     getFirstSelectRecordId: function () {
-      var _self = this
+      var _self = this;
       if (_self.selectedModelDatas.length > 0) {
-        return _self.selectedModelDatas[0].id
+        return _self.selectedModelDatas[0].id;
       }
-      return undefined
+      return undefined;
     },
 
     /**
          * 获取选中的第一个数据的FieldValue
          */
     getFirstSelectModelDataFieldValue: function (name) {
-      var _self = this
+      var _self = this;
       if (_self.selectedModelDatas.length > 0) {
         if (_self.selectedModelDatas[0].data[name] != undefined) {
-          return _self.selectedModelDatas[0].data[name].displayValue[0]
+          return _self.selectedModelDatas[0].data[name].displayValue[0];
         }
       }
-      return undefined
+      return undefined;
     },
 
     /**
          * 切换全选/单选
          */
     changeSelectMode: function () {
-      this.multipleSelect = !this.multipleSelect
+      this.multipleSelect = !this.multipleSelect;
     },
 
     /**
          * 排序
          */
     onSort: function (infoGridField) {
-      var _self = this
-      var fieldName = null
+      var _self = this;
+      var fieldName = null;
       if (infoGridField.sortFieldName != undefined && infoGridField.sortFieldName != '') {
-        fieldName = infoGridField.sortFieldName
+        fieldName = infoGridField.sortFieldName;
       } else {
-        fieldName = infoGridField.fieldName
+        fieldName = infoGridField.fieldName;
       }
-      var sortStr = fieldName + _self.sortStyle
+      var sortStr = fieldName + _self.sortStyle;
 
-      _self.infoQueryParam.sortClause = sortStr
+      _self.infoQueryParam.sortClause = sortStr;
       if (_self.currentIsSimpleSearch) {
-        _self.queryInfoWindowDataSimple()
+        _self.queryInfoWindowDataSimple();
       } else {
-        _self.queryInfoWindowDataComplex()
+        _self.queryInfoWindowDataComplex();
       }
 
-      _self.sortStyle = _self.sortStyle == ' ASC' ? ' DESC' : ' ASC'
+      _self.sortStyle = _self.sortStyle == ' ASC' ? ' DESC' : ' ASC';
     },
 
     /**
@@ -814,27 +848,27 @@ export default {
          */
     reSelectedNode: function (fieldValue) {
       if (!fieldValue) {
-        return
+        return;
       }
-      var _self = this
-      var ids = []
+      var _self = this;
+      var ids = [];
       if (fieldValue.displayType == 'MultiSearchBoxEditor') {
-        ids = fieldValue.ids
+        ids = fieldValue.ids;
       } else if (fieldValue.fieldType == 'ManyToManyKey') {
-        ids = fieldValue.ids
+        ids = fieldValue.ids;
       } else if (fieldValue.fieldType == 'Key') {
-        ids.push(fieldValue.id)
+        ids.push(fieldValue.id);
       } else {
-        return
+        return;
       }
 
-      _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length)
+      _self.selectedModelDatas.splice(0, _self.selectedModelDatas.length);
       if (this.infoWindowData && this.infoWindowData.dataList) {
         this.infoWindowData.dataList.forEach(function (node) {
           if (ids.indexOf(node.id) > -1) {
-            _self.selectedModelDatas.push(node)
+            _self.selectedModelDatas.push(node);
           }
-        })
+        });
       }
     },
 
@@ -844,17 +878,17 @@ export default {
          * 冻结表头
          */
     fixedTableHeader: function () {
-      let _self = this
+      let _self = this;
       _self.$nextTick(function () {
-        var $th = $('#' + _self.tableOutDivId).find('thead')
+        var $th = $('#' + _self.tableOutDivId).find('thead');
         $('#' + _self.tableOutDivId).on('scroll', function () {
-          $th.css('transform', 'translateY(' + this.scrollTop + 'px)')
-        })
-      })
+          $th.css('transform', 'translateY(' + this.scrollTop + 'px)');
+        });
+      });
     },
 
   },
-}
+};
 </script>
 
 <style scoped>

+ 66 - 46
packages/info/src/QueryPageImage.vue

@@ -1,13 +1,18 @@
 <template>
   <div>
     <span>
-      <img
-        v-for="item,index in images"
-        v-if="images && images.length > 0"
-        :src="getImageSrc(item)"
-        class="img-thumbnail m-div"
-        @click="showImage(item)"
-      />
+      <template
+        v-for="(item,index) in images"
+        :key="'image-' + index"
+      >
+        <img
+          v-if="images && images.length > 0"
+          :src="getImageSrc(item)"
+          class="img-thumbnail m-div"
+          @click="showImage(item)"
+        />
+
+      </template>
     </span>
     <Modal
       ref="fullImage"
@@ -15,87 +20,102 @@
       :title="$t('lang.QueryPageImage.viewPicture')"
       :show-ok-button="false"
     >
-      <img
-        v-for="item,index in images"
-        v-if="selectedImage && selectedImage.length > 0"
-        :src="getImageSrc(selectedImage)"
-        style="height: 100%;width: 100%"
-      />
-
-      <div slot="footer">
-        <button
-          class="btn btn-success"
-          type="button"
-          @click="download"
+      <template #default>
+        <template
+          v-for="(item,index) in images"
+          :key="'image-' + index"
         >
-          {{ $t('lang.QueryPageImage.downloadPictures') }}
-        </button>
-      </div>
+          <img
+            v-if="selectedImage && selectedImage.length > 0"
+            :src="getImageSrc(selectedImage)"
+            style="height: 100%;width: 100%"
+          />
+        </template>
+      </template>
+      <template #footer>
+        <div>
+          <button
+            class="btn btn-success"
+            type="button"
+            @click="download"
+          >
+            {{ $t('lang.QueryPageImage.downloadPictures') }}
+          </button>
+        </div>
+      </template>
     </Modal>
   </div>
 </template>
 
 <script>
-var Common = require('../../common/Common.js')
-var Modal = require('../../modal/src/Modal.vue').default
-var ImagePreview = require('../../image-preview/src/ImagePreview.vue').default
+var Common = require('../../common/Common.js');
+var Modal = require('../../modal/src/Modal.vue').default;
 
 export default {
 
   components: {
-    Modal, ImagePreview,
+    Modal,
+  },
+  props: {
+    'className': {
+      type: Object,
+      default: null,
+    }, 
+    'imageNames':{
+      type: String,
+      default: null,
+    },
   },
-  props: ['className', 'imageNames'],
   data: function () {
-    this.Common = Common
+    this.Common = Common;
     return {
       images: [],
       selectedImage: '',
-    }
+    };
   },
   watch: {
     /**
-         * fieldValue发生改变
-         */
+             * fieldValue发生改变
+             */
     imageNames: function (value) {
       if (value == undefined || value.length == 0) {
-        this.images = []
+        this.images = [];
       } else {
-        this.images = value.split(',')
+        this.images = value.split(',');
       }
     },
   },
   mounted: function () {
     if (this.imageNames == undefined || this.imageNames.length == 0) {
-      this.images = []
+      this.images = [];
     } else {
-      this.images = this.imageNames.split(',')
+      this.images = this.imageNames.split(',');
     }
   },
 
   methods: {
     showImage: function (item) {
-      this.selectedImage = item
-      this.$refs.fullImage.show = true
+      this.selectedImage = item;
+      this.$refs.fullImage.show = true;
     },
     /**
-       * 获取图片地址
-       * @param  {String} item 图片名称
-       * @return {String}      图片URL地址
-       */
+           * 获取图片地址
+           * @param  {String} item 图片名称
+           * @return {String}      图片URL地址
+           */
     getImageSrc: function (item) {
-      var _self = this
+      var _self = this;
       if (item != undefined && item != null) {
-        return Common.getImageSrc(_self.selectClause, item)
+        return Common.getImageSrc(_self.selectClause, item);
       } else {
-        return ''
+        return '';
       }
     },
     download: function () {
-      window.open(this.getImageSrc(this.selectedImage))
+      window.open(this.getImageSrc(this.selectedImage));
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 119 - 97
packages/info/src/SearchAutoCompleteWidget.vue

@@ -10,6 +10,7 @@
           <tr>
             <td
               v-for="item in infoWindowDto.infoGridFields"
+              :key="'td-info-grid-field-' + item.fieldName"
               align="center"
               width="100px"
               height="40px"
@@ -21,12 +22,14 @@
         <tbody>
           <tr
             v-for="(item1, index) in infoWindowData.dataList"
+            :key="'tr-' + item1.id"
             height="40px"
             :class="{'select-tr': index == selectIndex}"
             @click="selectNode(item1)"
           >
             <td
               v-for="item2 in infoWindowDto.infoGridFields"
+              :key="'tr-' + item1.id + '-td-' + item2.fieldName"
               align="center"
             >
               {{ (item1.data[item2.fieldName] == undefined) ? "" : item1.data[item2.fieldName].displayValue[0] }}
@@ -39,15 +42,34 @@
   </div>
 </template>
 <script>
-var Common = require('../../common/Common.js')
-var Modal = require('../../modal/src/Modal.vue').default
+var Common = require('../../common/Common.js');
 
 export default {
 
-  components: {
-    Modal,
+  props: {
+    'infoWindowNo':{
+      type: String,
+      default: null,
+    },
+    'leftPosition':{
+      type: Number,
+      default: null,
+    },
+    'whereClause':{
+      type: String,
+      default: null,
+    },
+    'parentModelData': {
+      type: Object,
+      default: null,
+    },
+    'modelData': {
+      type: Object,
+      default: null,
+    },
   },
-  props: ['infoWindowNo', 'fieldId', 'leftPosition', 'whereClause', 'parentModelData', 'modelData'],
+
+  emits: ['selectData'],
 
   data: function () {
     return {
@@ -57,36 +79,36 @@ export default {
       selectIndex: -1,
       realLeft: {},
       isSearchWidget: true,
-    }
+    };
   },
 
   computed: {
     realLeftComputed: function () {
-      return (((this.realLeft > 0) ? this.realLeft : 0) + 'px')
+      return (((this.realLeft > 0) ? this.realLeft : 0) + 'px');
     },
   },
 
   watch: {
     infoWindowData: function (val) {
-      var _self = this
+      var _self = this;
       if (val.dataList != undefined && val.dataList.length > 0) {
-        _self.isShowAuto = true
+        _self.isShowAuto = true;
       } else {
-        _self.isShowAuto = false
+        _self.isShowAuto = false;
       }
     },
 
     /**
-         * 距离左侧的距离
-         * @param  {[type]} currentValue [description]
-         * @param  {[type]} oldValue     [description]
-         * @return {[type]}              [description]
-         */
+             * 距离左侧的距离
+             * @param  {[type]} currentValue [description]
+             * @param  {[type]} oldValue     [description]
+             * @return {[type]}              [description]
+             */
     leftPosition: function (currentValue, oldValue) {
-      var _self = this
-      console.log('initialLeft changed: ' + currentValue)
-      _self.realLeft = currentValue
-      console.log('realLeft2:' + _self.realLeft)
+      var _self = this;
+      console.log('initialLeft changed: ' + currentValue);
+      _self.realLeft = currentValue;
+      console.log('realLeft2:' + _self.realLeft);
     },
   },
 
@@ -96,157 +118,157 @@ export default {
 
   methods: {
     /**
-         * 向下
-         * @return {void} 
-         */
+             * 向下
+             * @return {void} 
+             */
     selectDown: function () {
-      var _self = this
-      var length = _self.infoWindowData.dataList.length
+      var _self = this;
+      var length = _self.infoWindowData.dataList.length;
       if (_self.selectIndex < (length - 1)) {
-        _self.selectIndex++
+        _self.selectIndex++;
       }
     },
 
     /**
-         * 向上
-         * @return {void} 
-         */
+             * 向上
+             * @return {void} 
+             */
     selectUp: function () {
-      var _self = this
-      var length = _self.infoWindowData.dataList.length
+      var _self = this;
+      var length = _self.infoWindowData.dataList.length;
       if (_self.selectIndex > 0) {
-        _self.selectIndex--
+        _self.selectIndex--;
       }
     },
 
     /**
-         * 获取当前数据 供外部调用
-         * @return {Object} ModelData
-         */
+             * 获取当前数据 供外部调用
+             * @return {Object} ModelData
+             */
     getSelectData: function () {
-      var _self = this
+      var _self = this;
 
       if (_self.selectIndex < 0) {
-        return undefined
+        return undefined;
       }
 
-      var data = _self.infoWindowData.dataList[_self.selectIndex]
-      return data
+      var data = _self.infoWindowData.dataList[_self.selectIndex];
+      return data;
     },
 
     /**
-         * 获取第一行数据
-         */
+             * 获取第一行数据
+             */
     getFirstData: function () {
-      var _self = this
+      var _self = this;
       if (_self.infoWindowData != null && _self.infoWindowData.dataList != null && _self.infoWindowData.dataList.length > 0) {
-        return _self.infoWindowData.dataList[0]
+        return _self.infoWindowData.dataList[0];
       }
-      return null
+      return null;
     },
 
     /**
-         * 隐藏
-         * @return {[type]} [description]
-         */
+             * 隐藏
+             * @return {[type]} [description]
+             */
     hide: function () {
-      var _self = this
-      _self.isShowAuto = false
+      var _self = this;
+      _self.isShowAuto = false;
     },
 
 
     /**
-         * 是否可见
-         * @return {Boolean} [description]
-         */
+             * 是否可见
+             * @return {Boolean} [description]
+             */
     isVisible: function () {
-      return this.isShowAuto
+      return this.isShowAuto;
     },
 
     /**
-         * 查询InfoWindowDto
-         * @return {void} 
-         */
+             * 查询InfoWindowDto
+             * @return {void} 
+             */
     getInfoWindowDto: function (resolve, reject) {
-      var _self = this
+      var _self = this;
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/uniqueByNo'),
         type: 'GET',
         dataType: 'json',
         data: { 'infoWindowNo': _self.infoWindowNo },
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          _self.infoWindowDto = data
-          resolve()
+          _self.infoWindowDto = data;
+          resolve();
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
-          reject()
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
+          reject();
         },
-      })
+      });
     },
 
     /**
-         * 生成查询条件
-         * @param  {String} text 查询条件
-         * @return {Array}      
-         */
+             * 生成查询条件
+             * @param  {String} text 查询条件
+             * @return {Array}      
+             */
     getSimpleQueryCondition: function (text) {
-      var _self = this
-      var values = []
+      var _self = this;
+      var values = [];
       if (_self.infoWindowDto.infoFilterFields != undefined) {
         _self.infoWindowDto.infoFilterFields.forEach(function (item) {
           if (item.displayType == 'TextEditor') {
             var value = {
               fieldName: item.fieldName,
               value1: text,
-            }
-            values.push(value)
+            };
+            values.push(value);
           }
-        })
+        });
       }
-      return values
+      return values;
     },
 
     /**
-         * 根据条件初始化查询
-         * @param  {String} text 查询条件
-         * @return {void}      
-         */
+             * 根据条件初始化查询
+             * @param  {String} text 查询条件
+             * @return {void}      
+             */
     initSearch: function (text) {
-      var _self = this
+      var _self = this;
       if (text != undefined) {
         if (_self.infoWindowDto == undefined || _self.infoWindowDto.infoGridFields == undefined) {
           new Promise(_self.getInfoWindowDto).then(function (value) {
             // success
-            _self.getInfoWindowData(text)
+            _self.getInfoWindowData(text);
           }, function (error) {
             // error
-          })
+          });
         } else {
-          _self.getInfoWindowData(text)
+          _self.getInfoWindowData(text);
         }
       } else {
-        _self.isShowAuto = false
+        _self.isShowAuto = false;
       }
     },
 
     /**
-         * 选择节点
-         * @return {void} 
-         */
+             * 选择节点
+             * @return {void} 
+             */
     selectNode: function (data) {
-      this.$emit('selectData', data)
+      this.$emit('selectData', data);
     },
     /**
-         * 查询infoWindowData
-         * @return {void} 
-         */
+             * 查询infoWindowData
+             * @return {void} 
+             */
     getInfoWindowData: function (text) {
-      var _self = this
-      var infoFilterFieldValues = _self.getSimpleQueryCondition(text)
+      var _self = this;
+      var infoFilterFieldValues = _self.getSimpleQueryCondition(text);
 
       var infoQueryParam = {
         infoWindowNo: _self.infoWindowNo,
@@ -258,28 +280,28 @@ export default {
         modelData: _self.modelData,
         parentModelData: _self.parentModelData,
         isSearchWidget: _self.isSearchWidget,
-      }
+      };
 
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataSimple'),
         type: 'post',
         dataType: 'json',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         contentType: 'application/json',
         data: JSON.stringify(infoQueryParam),
         success: function (data) {
-          _self.infoWindowData = data
-          _self.selectIndex = -1
+          _self.infoWindowData = data;
+          _self.selectIndex = -1;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 111 - 72
packages/info/src/SearchWidget.vue

@@ -33,15 +33,19 @@
       @ok="searchDialogOk"
       @cancel="searchDialogCancel"
     >
-      <info
-        ref="info"
-        :field-value="fieldValue"
-        :where-clause="whereClause"
-        :is-search-widget="true"
-        :model-data="modelData"
-        @dataSelected="dataSelected"
-      />
-      <div slot="header">{{ titleName }}</div>
+      <template #default>
+        <info
+          ref="info"
+          :field-value="fieldValue"
+          :where-clause="whereClause"
+          :is-search-widget="true"
+          :model-data="modelData"
+          @data-selected="dataSelected"
+        />
+      </template>
+      <template #header>
+        <div>{{ titleName }}</div>
+      </template>
     </Modal>
 
     <SearchAutoCompleteWidget
@@ -49,7 +53,7 @@
       :info-window-no="infoWindowNo"
       :where-clause="whereClause"
       class="auto-complete"
-      @selectData="dataSelected"
+      @select-data="dataSelected"
     />
 
     <Loading ref="loading" />
@@ -58,10 +62,10 @@
 
 
 <script>
-var Modal = require('../../modal/src/Modal.vue').default
-var Info = require('./InfoWindow.vue').default
-var SearchAutoCompleteWidget = require('./SearchAutoCompleteWidget.vue').default
-var Loading = require('../../loading/src/Loading.vue').default
+var Modal = require('../../modal/src/Modal.vue').default;
+var Info = require('./InfoWindow.vue').default;
+var SearchAutoCompleteWidget = require('./SearchAutoCompleteWidget.vue').default;
+var Loading = require('../../loading/src/Loading.vue').default;
 
 export default {
   name: 'SearchWidget',
@@ -80,63 +84,98 @@ export default {
   // displayName: 文本框中显示的字段
   // whereClause: 约束条件
 
-  props: ['infoWindowNo', 'fieldValue', 'titleName', 'displayName', 'whereClause', 'readonly', 'modelData', 'classSize'],
+  props: {
+    'infoWindowNo':{
+      type: String,
+      default: null,
+    },
+    'fieldValue': {
+      type: Object,
+      default: null,
+    },
+    'titleName':{
+      type: String,
+      default: null,
+    },
+    'displayName':{
+      type: String,
+      default: null,
+    },
+    'whereClause':{
+      type: String,
+      default: null,
+    },
+    'readonly': {
+      type: Boolean,
+      default: false,
+    },
+    'modelData': {
+      type: Object,
+      default: null,
+    },
+    'classSize':{
+      type: String,
+      default: null,
+    },
+  },
+
+  emits: ['valueChanged', 'dataSelected'],
 
   data: function () {
-    var inputSearchText = this.initSearchText(this.fieldValue)
+    var inputSearchText = this.initSearchText(this.fieldValue);
 
     return {
       isVisible: [],
       searchText: inputSearchText,
       leftPosition: 0,
-    }
+    };
   },
 
   computed: {
 
 
     /**
-         * 是否是有效的数据
-         */
+             * 是否是有效的数据
+             */
     validInput: function () {
-      var _self = this
-      var isValid = true
+      var _self = this;
+      var isValid = true;
       if (this.searchText != undefined && this.searchText.length > 0) {
         if (this.fieldValue != undefined && (this.fieldValue.id == undefined || this.fieldValue.id <= 0)) {
-          isValid = false
+          isValid = false;
         } else if (this.fieldValue != undefined && (this.fieldValue.displayValue != undefined && this.fieldValue.displayValue[0] != this.searchText)) {
-          isValid = false
+          isValid = false;
         }
       }
-      var isflag = false
+      var isflag = false;
       if (_self.classSize != undefined) {
-        isflag = true
+        isflag = true;
       }
       var ss = {
         'invalid-input': isValid == false,
         'classSize': isflag == true,
-      }
-      return ss
+      };
+      return ss;
     },
   },
 
   watch: {
     redraw: function () {
-      console.log('searchWidgetRedraw')
+      console.log('searchWidgetRedraw');
     },
 
     fieldValue: {
       handler(currentValue, oldValue) {
-        console.log('currentValue:' + JSON.stringify(currentValue))
-        this.searchText = this.initSearchText(currentValue)
-        console.log('searchText:' + this.searchText)
+        console.log('currentValue:' + JSON.stringify(currentValue));
+        this.searchText = this.initSearchText(currentValue);
+        console.log('searchText:' + this.searchText);
       },
       deep: true,
     },
 
     // 查询条件变化时,重新查询数据
     whereClause: function () {
-      this.$refs.info.loadByInfoWindowNo(this.infoWindowNo)
+      this.$refs.info.loadByInfoWindowNo(this.infoWindowNo);
     },
   },
 
@@ -145,26 +184,26 @@ export default {
 
   methods: {
     selectDown: function () {
-      this.$refs.autoComplete.selectDown()
+      this.$refs.autoComplete.selectDown();
     },
 
     selectUp: function () {
-      this.$refs.autoComplete.selectUp()
+      this.$refs.autoComplete.selectUp();
     },
 
     selectEnter: function () {
-      var _self = this
+      var _self = this;
 
-      var data = _self.$refs.autoComplete.getSelectData()
+      var data = _self.$refs.autoComplete.getSelectData();
       if (data != undefined) {
-        _self.dataSelected(data)
-        _self.$refs.autoComplete.hide()
+        _self.dataSelected(data);
+        _self.$refs.autoComplete.hide();
       } else {
         if (_self.searchText == undefined || _self.searchText.length == 0) {
           if (_self.$refs.autoComplete.isVisible() == true) {
-            _self.$refs.autoComplete.hide()
+            _self.$refs.autoComplete.hide();
           } else {
-            _self.$refs.autoComplete.initSearch('')
+            _self.$refs.autoComplete.initSearch('');
           }
         }
       }
@@ -172,34 +211,34 @@ export default {
 
     // 显示搜索对话框
     showSearchDialog: function () {
-      var _self = this
+      var _self = this;
 
       // 如果是只读,则直接返回。
       if (_self.readonly != undefined && _self.readonly == true) {
-        return
+        return;
       }
 
-      console.log(this.$refs.modal)
-      this.$refs.modal.showModal()
+      console.log(this.$refs.modal);
+      this.$refs.modal.showModal();
 
-      _self.$refs.autoComplete.hide()
+      _self.$refs.autoComplete.hide();
 
       if (this.$refs.info.infoWindowNo != _self.infoWindowNo) {
-        this.$refs.info.loadByInfoWindowNo(this.infoWindowNo)
+        this.$refs.info.loadByInfoWindowNo(this.infoWindowNo);
       } else {
-        _self.$refs.info.refresh()
+        _self.$refs.info.refresh();
       }
     },
 
     /**
-         * 搜索框【确定】按钮点击事件
-         */
+             * 搜索框【确定】按钮点击事件
+             */
     searchDialogOk: function () {
-      var _self = this
-      var selectedModelDatas = _self.$refs.info.getSelectedModelDatas()
+      var _self = this;
+      var selectedModelDatas = _self.$refs.info.getSelectedModelDatas();
       if (selectedModelDatas != undefined || selectedModelDatas.length > 0) {
         // 选中了数据,更新数据
-        _self.dataSelected(selectedModelDatas[0])
+        _self.dataSelected(selectedModelDatas[0]);
       }
     },
 
@@ -209,60 +248,60 @@ export default {
 
     // 输入的文本发生改变
     textChange: function (e) {
-      var text = e.target.value
-      console.log('textChange: ' + text)
+      var text = e.target.value;
+      console.log('textChange: ' + text);
       if (text == undefined || text.length == 0) {
         var newFieldValue = {
           id: undefined,
           displayValue: [],
           fieldType: 'Key',
-        }
-        this.$emit('valueChanged', newFieldValue)
+        };
+        this.$emit('valueChanged', newFieldValue);
       }
-      this.$refs.autoComplete.initSearch(text)
+      this.$refs.autoComplete.initSearch(text);
     },
 
     // 数据已经选择
     dataSelected: function (modelData) {
-      var _self = this
-      this.$refs.modal.hideModal()
+      var _self = this;
+      this.$refs.modal.hideModal();
 
-      _self.$refs.autoComplete.hide()
+      _self.$refs.autoComplete.hide();
 
       if (modelData == undefined) {
-        return
+        return;
       }
 
-      console.log('已经选择了数据:' + modelData.id)
-      var displayValue = ''
+      console.log('已经选择了数据:' + modelData.id);
+      var displayValue = '';
       if (modelData.data && modelData.data[_self.displayName]) {
-        displayValue = modelData.data[_self.displayName].displayValue[0]
+        displayValue = modelData.data[_self.displayName].displayValue[0];
       } else if (modelData[_self.displayName]) {
-        displayValue = modelData[_self.displayName]
+        displayValue = modelData[_self.displayName];
       }
 
       var newFieldValue = {
         id: modelData.id,
         displayValue: [displayValue],
         fieldType: 'Key',
-      }
+      };
 
       if (newFieldValue.displayValue.length > 0) {
-        _self.searchText = newFieldValue.displayValue[0]
+        _self.searchText = newFieldValue.displayValue[0];
       }
-      this.$emit('valueChanged', newFieldValue)
-      this.$emit('dataSelected', modelData)
+      this.$emit('valueChanged', newFieldValue);
+      this.$emit('dataSelected', modelData);
     },
 
     initSearchText: function (tempFieldValue) {
       if (tempFieldValue == undefined || tempFieldValue.displayValue == undefined || tempFieldValue.displayValue.length == 0) {
-        return ''
+        return '';
       } else {
-        return tempFieldValue.displayValue[0]
+        return tempFieldValue.displayValue[0];
       }
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 67 - 44
packages/info/src/customer/ClientOrgnizationInfo.vue

@@ -11,8 +11,8 @@
               :node="clientOrgnization"
               :is-root="true"
               :is-show-check="clientOrgnization.isShowCheck"
-              @nodeExpand="nodeExpand"
-              @nodeSelect="nodeSelect"
+              @node-expand="nodeExpand"
+              @node-select="nodeSelect"
             />
           </div>
         </div>
@@ -23,16 +23,39 @@
 </template>
 
 <script>
-var Common = require('../../../common/Common.js')
-var Loading = require('../../../loading/src/Loading.vue').default
-var TreeViewNode = require('../../../tree/src/TreeViewNode.vue').default
+var Common = require('../../../common/Common.js');
+var Loading = require('../../../loading/src/Loading.vue').default;
+var TreeViewNode = require('../../../tree/src/TreeViewNode.vue').default;
 
 export default {
 
   components: {
-    Common, TreeViewNode, Loading,
+    TreeViewNode, Loading,
+  },
+  props: {
+    'whereClause': {
+      type: String,
+      default: '',
+    }, 
+    'isSearchWidget': {
+      type: Boolean,
+      default: false,
+    },
+    'modelData': {
+      type: Object,
+      default: null,
+    },
+    'parentModelData': {
+      type: Object,
+      default: null,
+    },
+    'fieldValue': {
+      type: Object,
+      default: null,
+    },
   },
-  props: ['whereClause', 'isSearchWidget', 'modelData', 'parentModelData', 'fieldValue'],
+
+  emits: ['dataSelected', 'deleteSelected'],
 
   data: function () {
     return {
@@ -40,52 +63,52 @@ export default {
       'datas': [],
       sendData: {},
       clientOrgnizations: [],
-    }
+    };
   },
 
   watch: {
     fieldValue: function (to, from) {
-      this.reSelectedNode(to)
+      this.reSelectedNode(to);
     },
   },
 
   mounted: function () {
-    this.refresh()
+    this.refresh();
   },
 
   methods: {
     // 节点打开事件
     nodeExpand: function (node) {
-      console.log(node)
+      console.log(node);
     },
 
     // 节点选择事件
     nodeSelect: function (node) {
-      console.log(node)
+      console.log(node);
       if (!node.isClient) {
-        node.selected = !node.selected
+        node.selected = !node.selected;
         if (node.selected) {
           // 增加
-          var modelData1 = {
+          let modelData1 = {
             'id': node.id,
             'data': {
               'name': {
                 'displayValue': [node.name],
               },
             },
-          }
-          this.$emit('dataSelected', modelData1)
+          };
+          this.$emit('dataSelected', modelData1);
         } else {
           // 减少
-          var modelData1 = {
+          let modelData1 = {
             'id': node.id,
             'data': {
               'name': {
                 'displayValue': [node.name],
               },
             },
-          }
-          this.$emit('deleteSelected', modelData1)
+          };
+          this.$emit('deleteSelected', modelData1);
         }
         // this.reSelectedNode(newFieldValue);
       }
@@ -93,36 +116,36 @@ export default {
 
     // 获取单位部门
     refresh: function () {
-      var _self = this
+      var _self = this;
       $.ajax({
         type: 'get',
         dataType: 'json',
         url: Common.getApiURL('orgnizationResource/getClientOrgnizations'),
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
           function setOpen(node) {
-            node.open = false
-            node.selected = false
+            node.open = false;
+            node.selected = false;
             if (node.isClient) {
-              node.isShowCheck = false
+              node.isShowCheck = false;
             } else {
-              node.isShowCheck = true
+              node.isShowCheck = true;
             }
-            node.text = node.name
+            node.text = node.name;
             if (node.childrenDatas != undefined && node.childrenDatas.length > 0) {
               node.childrenDatas.forEach(function (item) {
-                setOpen(item)
-              })
+                setOpen(item);
+              });
             }
           }
           data.forEach(function (item) {
             if (item.childrenDatas == null) {
-              item.open = true
+              item.open = true;
             }
-            setOpen(item)
-          })
+            setOpen(item);
+          });
           // add by jack 20180201
           // 展开一级树
           // if (data.childrenDatas != undefined && data.childrenDatas.length > 0) {
@@ -131,41 +154,41 @@ export default {
           //	});
           // }
 
-          _self.clientOrgnizations = data
-          _self.reSelectedNode(_self.fieldValue)
+          _self.clientOrgnizations = data;
+          _self.reSelectedNode(_self.fieldValue);
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
 
     reSelectedNode: function (fieldValue) {
       if (fieldValue == undefined) {
-        return
+        return;
       }
-      var ids = fieldValue.ids
+      var ids = fieldValue.ids;
       function setOpen(node) {
         if (ids.indexOf(node.id) > -1) {
-          node.selected = true
+          node.selected = true;
         } else {
-          node.selected = false
+          node.selected = false;
         }
         if (node.childrenDatas != undefined && node.childrenDatas.length > 0) {
           node.childrenDatas.forEach(function (item) {
-            setOpen(item)
-          })
+            setOpen(item);
+          });
         }
       }
       if (ids != undefined) {
         this.clientOrgnizations.forEach(function (item) {
-          setOpen(item)
-        })
+          setOpen(item);
+        });
       }
     },
 
   },
-}
+};
 </script>
     
 <style scoped>

+ 4 - 4
packages/loading/index.js

@@ -1,8 +1,8 @@
 
-import Loading from './src/Loading.vue'
+import Loading from './src/Loading.vue';
 
 Loading.install = function(Vue) {
-  Vue.component(Loading.name, Loading)
-}
+  Vue.component(Loading.name, Loading);
+};
 
-export default Loading
+export default Loading;

+ 31 - 25
packages/loading/src/Loading.vue

@@ -21,69 +21,75 @@
 </template>
 
 <script>
-var UUID = require('../../common/Uuid.js')
+var UUID = require('../../common/Uuid.js');
 
 export default {
+  // eslint-disable-next-line
   name: 'Loading',
-  props: ['text'],
+  props: {
+    'text': {
+      type: String,
+      default: '',
+    },
+  },
   data: function () {
     return {
       'id': 'loading_' + UUID.createUUID(),
       'visible': false,
       'uuid': UUID.createUUID(),
-    }
+    };
   },
 
   mounted: function () {
-    this.hide()
+    this.hide();
   },
 
   methods: {
     // 居中显示
     centerLoader: function () {
-      var _self = this
-      var winW = $(window).width()
-      var winH = $(window).height()
+      var _self = this;
+      var winW = $(window).width();
+      var winH = $(window).height();
 
-      var id = '#' + _self.id
-      var spinnerW = $(id).outerWidth()
-      var spinnerH = $(id).outerHeight()
+      var id = '#' + _self.id;
+      var spinnerW = $(id).outerWidth();
+      var spinnerH = $(id).outerHeight();
 
       $(id).css({
         'position': 'absolute',
         'left': ((winW / 2) - (spinnerW / 2)) + 'px',
         'top': ((winH / 2) - (spinnerH / 2)) + 'px',
-      })
+      });
     },
 
     // 显示加载中的界面
     show: function () {
-      var _self = this
-      _self.visible = true
+      var _self = this;
+      _self.visible = true;
 
-      window[_self.uuid] = document.activeElement
+      window[_self.uuid] = document.activeElement;
 
       _self.$nextTick(function () {
-        _self.centerLoader()
+        _self.centerLoader();
         $(window).resize(function () {
-          _self.centerLoader()
-        })
-        $(_self.$refs.focusInput).focus()
-      })
+          _self.centerLoader();
+        });
+        $(_self.$refs.focusInput).focus();
+      });
     },
 
     // 隐藏加载中的界面
     hide: function () {
-      var _self = this
+      var _self = this;
       if (window[_self.uuid] != undefined) {
-        console.log('loading uuid:' + window[_self.uuid])
-        window[_self.uuid].focus()
-        window[_self.uuid] = undefined
+        console.log('loading uuid:' + window[_self.uuid]);
+        window[_self.uuid].focus();
+        window[_self.uuid] = undefined;
       }
-      _self.visible = false
+      _self.visible = false;
     },
   },
-}
+};
 
 </script>
 

+ 4 - 4
packages/modal/index.js

@@ -1,8 +1,8 @@
 
-import Modal from './src/Modal.vue'
+import Modal from './src/Modal.vue';
 
 Modal.install = function(Vue) {
-  Vue.component(Modal.name, Modal)
-}
+  Vue.component(Modal.name, Modal);
+};
 
-export default Modal
+export default Modal;

+ 59 - 42
packages/modal/src/Modal.vue

@@ -31,31 +31,52 @@
 
 <script>
 
-var ModalFix = require('./ModalFix.js')
+var ModalFix = require('./ModalFix.js');
 
 export default {
+  // eslint-disable-next-line
   name: 'Modal',
   props: {
-    title: String,
-    small: [Boolean, String],
-    large: [Boolean, String],
-    full: [Boolean, String],
+    title: {
+      type: String,
+      default: '',
+    },
+    small: {
+      type: [Boolean, String],
+      default: false,
+    },
+    large: {
+      type: [Boolean, String],
+      default: false,
+    },
+    full: {
+      type: [Boolean, String],
+      default: false,
+    },
     // 为true时无法通过点击遮罩层关闭modal
-    force: Boolean,
+    force: {
+      type: Boolean,
+      default: null,
+    },
     // 自定义组件transition
-    transition: String,
-    	// 显示确定按钮
-    	showOkButton: {
+    transition: {
+      type: String,
+      default: '',
+    },
+    // 显示确定按钮
+    showOkButton: {
       type: Boolean,
       default: true,
-    	},
-    	// 显示取消按钮
-    	showCanelButton: {
+    },
+    // 显示取消按钮
+    showCanelButton: {
       type: Boolean,
       default: true,
     },
   },
 
+  emits: ['ok', 'cancel', 'close'],
+
   data: function(){
     return {
       show: false,
@@ -65,7 +86,7 @@ export default {
       okClass : '',
       cancelClass : '',
       closeClass: '',
-    }
+    };
   },
 
   computed: {
@@ -74,22 +95,21 @@ export default {
         'modal-lg': this.large || this.large == 'true',
         'modal-sm': this.small || this.small == 'true',
         'modal-full': this.full || this.full == 'true',
-      }
+      };
     },
   },
-
   watch: {
     show : function (value) {
-      console.log('modal watch show = ' + value)
+      console.log('modal watch show = ' + value);
       // 在显示时去掉body滚动条,防止出现双滚动条
       if (value) {
         if(document.body.className.indexOf('modal-open') < 0){
-          document.body.className += ' modal-open'
+          document.body.className += ' modal-open';
         }
       } else {
         this.$nextTick(function(){
-          ModalFix.fix()
-        })
+          ModalFix.fix();
+        });
       }
     },
   },
@@ -97,47 +117,44 @@ export default {
   created: function() {
     if (this.show) {
       if(document.body.className.indexOf('modal-open') < 0){
-        document.body.className += ' modal-open'
+        document.body.className += ' modal-open';
       }
     }
   },
-    
-  mounted: function(){
-    	
-  },
+  
 
   methods: {
     ok: function() {
-      this.$emit('ok')
-      this.show = false
+      this.$emit('ok');
+      this.show = false;
       this.$nextTick(function(){
-        ModalFix.fix()
-      })           
+        ModalFix.fix();
+      });           
     },
 
     cancel: function () {
-      this.$emit('cancel')
-      this.show = false
+      this.$emit('cancel');
+      this.show = false;
       this.$nextTick(function(){
-        ModalFix.fix()
-      })
+        ModalFix.fix();
+      });
     },
 
     close: function() {
-      this.$emit('close')
-      this.show = false
+      this.$emit('close');
+      this.show = false;
       this.$nextTick(function(){
-        ModalFix.fix()
-      })           
+        ModalFix.fix();
+      });           
     },
 
     // 点击遮罩层
     clickMask: function () {
       if (!this.force) {
-        this.cancel()
+        this.cancel();
         this.$nextTick(function(){
-          ModalFix.fix()
-        })
+          ModalFix.fix();
+        });
       }
     },
         
@@ -145,17 +162,17 @@ export default {
          * 显示
          */
     showModal: function(){
-        	this.show = true
+      this.show = true;
     },
         
     /**
          * 隐藏
          */
     hideModal: function(){
-        	this.show = false
+      this.show = false;
     },
   },
-}
+};
 </script>
 
 

+ 7 - 7
packages/modal/src/ModalFix.js

@@ -3,32 +3,32 @@ export default {
      * 获取BootstrapDialog插件显示的模态框的数量
      */
   getBootstrapDialogCount: function(){
-    return $('div[class*=\'modal\'][class*=\'bootstrap-dialog\']').length
+    return $('div[class*=\'modal\'][class*=\'bootstrap-dialog\']').length;
   },
 
   /**
      * 获取Modal.vue插件显示的数量
      */
   getActiveModalCount: function(){
-    return $('div:visible').children('div.modal').length
+    return $('div:visible').children('div.modal').length;
   },
 
   /**
      * 获取HTML界面模态框可见的总数
      */
   getActiveCount: function(){
-    return this.getBootstrapDialogCount() + this.getActiveModalCount()
+    return this.getBootstrapDialogCount() + this.getActiveModalCount();
   },
 
   fix: function(){
-    var activeModalCount = this.getActiveCount()
+    var activeModalCount = this.getActiveCount();
     if(activeModalCount == 0){
       // 界面已经没有活动的模态框
-      document.body.className = document.body.className.replace(/\s?modal-open/, '')
+      document.body.className = document.body.className.replace(/\s?modal-open/, '');
     }else{
       if(document.body.className.indexOf('modal-open') < 0){
-        document.body.className += ' modal-open'
+        document.body.className += ' modal-open';
       }
     }
   },
-}
+};

+ 4 - 4
packages/navbar/index.js

@@ -1,8 +1,8 @@
 
-import Navbar from './src/Navbar.vue'
+import Navbar from './src/Navbar.vue';
 
 Navbar.install = function(Vue) {
-  Vue.component(Navbar.name, Navbar)
-}
+  Vue.component(Navbar.name, Navbar);
+};
 
-export default Navbar
+export default Navbar;

+ 17 - 9
packages/navbar/src/Navbar.vue

@@ -19,30 +19,38 @@
 <script>
 
 export default {
+  // eslint-disable-next-line
   name: 'Navbar',
 
   components: {
 
   },
-  props: [
-    //是否需要返回按钮,true:需要返回按钮,false:不需要返回按钮
-    'isGoBack',
-    //标题
-    'title',
-  ],
+  props: {
+    // 是否需要返回按钮,true:需要返回按钮,false:不需要返回按钮
+    'isGoBack':{
+      type: Boolean,
+      default: true,
+    },
+    // 标题
+    'title':
+    {
+      type: String,
+      default: '',
+    },
+  },
 
   data: function () {
     return {
       data: '',
-    }
+    };
   },
 
   methods: {
     goBack: function () {
-      history.back()
+      history.back();
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 4 - 4
packages/page-size-select/index.js

@@ -1,10 +1,10 @@
 
-import PageSizeSelect from './src/PageSizeSelect.vue'
+import PageSizeSelect from './src/PageSizeSelect.vue';
 
 
 PageSizeSelect.install = function(Vue) {
-  Vue.component(PageSizeSelect.name, PageSizeSelect)
-}
+  Vue.component(PageSizeSelect.name, PageSizeSelect);
+};
 
 
-export default PageSizeSelect
+export default PageSizeSelect;

+ 6 - 4
packages/page-size-select/src/PageSizeSelect.vue

@@ -15,24 +15,26 @@
 // 外部可以注册事件pageSizeChanged
 
 export default {
-    	name: 'PageSizeSelect',
+  name: 'PageSizeSelect',
 
   components : {
 
   },
 
+  emits: ['pageSizeChanged'],
+
   data: function(){
     return {
       pageSize : 20,
-    }
+    };
   },
 
   watch:{
     pageSize: function(newValue, oldValue){
-      this.$emit('pageSizeChanged', newValue)
+      this.$emit('pageSizeChanged', newValue);
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 4 - 4
packages/print/print-epc.js

@@ -1,8 +1,8 @@
 
-import PrintEpc from './src/PrintEpc.vue'
+import PrintEpc from './src/PrintEpc.vue';
 
 PrintEpc.install = function(Vue) {
-  Vue.component(PrintEpc.name, PrintEpc)
-}
+  Vue.component(PrintEpc.name, PrintEpc);
+};
 
-export default PrintEpc
+export default PrintEpc;

+ 4 - 4
packages/print/print-widget.js

@@ -1,8 +1,8 @@
 
-import PrintWidget from './src/PrintWidget.vue'
+import PrintWidget from './src/PrintWidget.vue';
 
 PrintWidget.install = function(Vue) {
-  Vue.component(PrintWidget.name, PrintWidget)
-}
+  Vue.component(PrintWidget.name, PrintWidget);
+};
 
-export default PrintWidget
+export default PrintWidget;

+ 60 - 54
packages/print/src/PrintEpc.vue

@@ -70,9 +70,9 @@
 </template>
 
 <script>
-var PrintEpcUtil = require('./PrintEpcUtil.js')
-var Modal = require('../../modal/src/Modal.vue').default
-var Loading = require('../../loading/src/Loading.vue').default
+var PrintEpcUtil = require('./PrintEpcUtil.js');
+var Modal = require('../../modal/src/Modal.vue').default;
+var Loading = require('../../loading/src/Loading.vue').default;
 
 export default {
   name: 'PrintEpc',
@@ -81,7 +81,13 @@ export default {
     Modal, Loading,
   },
 
-  props: ['printerName'],
+  props: {
+    'printerName':
+    {
+      type: String,
+      default: '',
+    },
+  },
 
   data: function () {
     return {
@@ -95,7 +101,7 @@ export default {
         epcs: '',       // 读取的标签信息
         epc: '',        // 打印的EPC
       },
-    }
+    };
   },
 
 
@@ -104,37 +110,37 @@ export default {
          * 打印PrintPages
          */
     printPrintPages: function (printPages) {
-      let _self = this
+      let _self = this;
 
       if (printPages == null || printPages.length == 0) {
-        this.printResult.command = 'write'
-        this.printResult.success = false
-        this.printResult.message = '无可打印的数据。'
+        this.printResult.command = 'write';
+        this.printResult.success = false;
+        this.printResult.message = '无可打印的数据。';
 
-        this.$refs.printResultModal.show = true
-        return
+        this.$refs.printResultModal.show = true;
+        return;
       }
 
       if (printPages.length > 1) {
-        this.printResult.command = 'write'
-        this.printResult.success = false
-        this.printResult.message = '使用发卡机发卡,每次只能发一个标签,打印程序收到了' + printPages.length + '个标签数据。'
+        this.printResult.command = 'write';
+        this.printResult.success = false;
+        this.printResult.message = '使用发卡机发卡,每次只能发一个标签,打印程序收到了' + printPages.length + '个标签数据。';
 
-        this.$refs.printResultModal.show = true
-        return
+        this.$refs.printResultModal.show = true;
+        return;
       }
 
-      let printPage = printPages[0]
-      let epc = null
+      let printPage = printPages[0];
+      let epc = null;
       for (let index = 0; index < printPage.printItems.length; index++) {
         if (printPage.printItems[index].displayType == 'EPC') {
-          epc = printPage.printItems[index].content
+          epc = printPage.printItems[index].content;
         }
       }
 
-      _self.lastWriteEpc = epc
+      _self.lastWriteEpc = epc;
 
-      this.printSingleEpc(epc)
+      this.printSingleEpc(epc);
     },
 
     /**
@@ -142,76 +148,76 @@ export default {
          * @param epc 待打印的EPC的内容
          */
     printSingleEpc: function (epc) {
-      let _self = this
+      let _self = this;
 
-      _self.$refs.printResultModal.show = false
+      _self.$refs.printResultModal.show = false;
 
-      let promise = PrintEpcUtil.printSingleEpc(this.printerName, epc)
+      let promise = PrintEpcUtil.printSingleEpc(this.printerName, epc);
 
-      _self.$refs.loading.show()
+      _self.$refs.loading.show();
       promise.then(successData => {
-        _self.$refs.loading.hide()
+        _self.$refs.loading.hide();
         if (successData.success == false) {
-          successData.command = 'write'
-          _self.printResult = successData
-          _self.$refs.printResultModal.show = true
+          successData.command = 'write';
+          _self.printResult = successData;
+          _self.$refs.printResultModal.show = true;
         }
       }, errorData => {
-        _self.$refs.loading.hide()
+        _self.$refs.loading.hide();
         if (errorData.success == false) {
-          errorData.command = 'write'
-          _self.printResult = errorData
-          _self.$refs.printResultModal.show = true
+          errorData.command = 'write';
+          _self.printResult = errorData;
+          _self.$refs.printResultModal.show = true;
         }
-      })
+      });
     },
 
     /**
          * 恢复EPC
          */
     restoreEpc: function () {
-      let _self = this
+      let _self = this;
 
-      _self.$refs.printResultModal.show = true
+      _self.$refs.printResultModal.show = true;
 
-      let promise = PrintEpcUtil.resetTag(this.printerName)
+      let promise = PrintEpcUtil.resetTag(this.printerName);
 
       promise.then(successData => {
-        successData.command = 'restore'
-        _self.printResult = successData
-        _self.$refs.printResultModal.show = true
+        successData.command = 'restore';
+        _self.printResult = successData;
+        _self.$refs.printResultModal.show = true;
       }, errorData => {
-        successData.command = 'restore'
-        _self.printResult = errorData
-        _self.$refs.printResultModal.show = true
-      })
+        errorData.command = 'restore';
+        _self.printResult = errorData;
+        _self.$refs.printResultModal.show = true;
+      });
     },
 
     /**
          * 读取EPC
          */
     readEpc: function () {
-      let _self = this
+      let _self = this;
 
-      _self.$refs.printResultModal.show = true
+      _self.$refs.printResultModal.show = true;
 
-      let promise = PrintEpcUtil.readEpc(this.printerName)
+      let promise = PrintEpcUtil.readEpc(this.printerName);
 
       promise.then(successData => {
-        successData.command = 'read'
-        _self.printResult = successData
+        successData.command = 'read';
+        _self.printResult = successData;
       }, errorData => {
-        errorData.command = 'read'
-        _self.printResult = errorData
-      })
+        errorData.command = 'read';
+        _self.printResult = errorData;
+      });
     },
 
     /**
          * 显示模态框
          */
     show: function () {
-      this.$refs.printResultModal.show = true
+      this.$refs.printResultModal.show = true;
     },
   },
-}
+};
 </script>

+ 45 - 45
packages/print/src/PrintEpcUtil.js

@@ -2,7 +2,7 @@
 /**
  * node-red EPC 发卡程序
  */
-var Uuid = require('../../common/Uuid.js')
+var Uuid = require('../../common/Uuid.js');
 
 
 export default {
@@ -16,102 +16,102 @@ export default {
    */
   printSingleEpc: function (printerName, epc) {    
     if (epc == null || epc.length == 0) {
-      var promise = new Promise((resolve, reject) => {
+      let promise = new Promise((resolve, reject) => {
         reject({
           success: false,
           message: '打印数据中没有EPC的定义。',
-        })
+        });
 
-      })
-      return promise
+      });
+      return promise;
     }
 
-    var _self = this
+    var _self = this;
     var commandData = {
       id: Uuid.createUUID(),
       printerName: printerName,
       command: 'writeEpc',
       epc: epc,
-    }
+    };
 
-    var commandStr = JSON.stringify(commandData)
-    var promise = new Promise((resolve, reject) => {
-      _self.connectNodeRed(resolve, reject, commandStr)
-    })
+    var commandStr = JSON.stringify(commandData);
+    let promise = new Promise((resolve, reject) => {
+      _self.connectNodeRed(resolve, reject, commandStr);
+    });
 
-    return promise
+    return promise;
   },
 
 
   readEpc: function (printerName) {
-    var _self = this
+    var _self = this;
     var commandData = {
       id: Uuid.createUUID(),
       printerName: printerName,
       command: 'readEpc',
-    }
+    };
 
-    var commandStr = JSON.stringify(commandData)
+    var commandStr = JSON.stringify(commandData);
     var promise = new Promise((resolve, reject) => {
-      _self.connectNodeRed(resolve, reject, commandStr, null)
-    })
+      _self.connectNodeRed(resolve, reject, commandStr, null);
+    });
 
-    return promise
+    return promise;
   },
 
   /**
    * 恢复标签,清除密码区域
    */
   resetTag: function(printerName){
-    var _self = this
+    var _self = this;
     var commandData = {
       id: Uuid.createUUID(),
       printerName: printerName,
       command: 'resetTag',
-    }
+    };
 
-    var commandStr = JSON.stringify(commandData)
+    var commandStr = JSON.stringify(commandData);
     var promise = new Promise((resolve, reject) => {
-      _self.connectNodeRed(resolve, reject, commandStr, null)
-    })
+      _self.connectNodeRed(resolve, reject, commandStr, null);
+    });
 
-    return promise
+    return promise;
   },
 
   // 连接node red的websocket
   connectNodeRed: function (resolve, reject, commandStr) {
-    var _self = this
+    var _self = this;
 
-    _self.webSocket = new WebSocket(this.socketUrl)
+    _self.webSocket = new WebSocket(this.socketUrl);
 
     _self.webSocket.onopen = function (event) {
-      console.log('打印 Websocket 连接成功。')
+      console.log('打印 Websocket 连接成功。');
       if (commandStr != null && commandStr.length > 0) {
-        _self.sendCommand(commandStr)
+        _self.sendCommand(commandStr);
       } else {
-        _self.close()
+        _self.close();
       }
-    }
+    };
 
     _self.webSocket.onclose = function (event) {
-      console.log('打印 Websocket 断开连接。')
-    }
+      console.log('打印 Websocket 断开连接。');
+    };
 
     _self.webSocket.onerror = function (event) {
-      console.log('打印 Websocket 出错。')
-      _self.close()
+      console.log('打印 Websocket 出错。');
+      _self.close();
       reject({
         success: false,
         message: '打印 Websocket 出错。' + event.data,
-      })
-    }
+      });
+    };
 
     _self.webSocket.onmessage = function (event) {
-      var data = JSON.parse(event.data)
-      console.log(data)
-      resolve(data)
-      _self.close()
-    }
+      var data = JSON.parse(event.data);
+      console.log(data);
+      resolve(data);
+      _self.close();
+    };
   },
 
 
@@ -121,7 +121,7 @@ export default {
    */
   sendCommand: function (command) {
     if (this.webSocket) {
-      this.webSocket.send(command)
+      this.webSocket.send(command);
     }
   },
 
@@ -130,9 +130,9 @@ export default {
    */
   close: function () {
     if (this.webSocket) {
-      this.webSocket.close()
-      this.webSocket = null
+      this.webSocket.close();
+      this.webSocket = null;
     };
   },
-}
+};
 

+ 51 - 51
packages/print/src/PrintUtil.js

@@ -3,8 +3,8 @@
  * node-red打印程序
  */
 
-var Common = require('../../common/Common.js')
-var Uuid = require('../../common/Uuid.js')
+var Common = require('../../common/Common.js');
+var Uuid = require('../../common/Uuid.js');
 
 
 export default {
@@ -16,16 +16,16 @@ export default {
    * 获取所有的打印机
    */
   getPrinters: function () {
-    var _self = this
+    var _self = this;
     var command = {
       id: Uuid.createUUID(),
       command: 'getPrinters',
       data: null,
-    }
-    var commandStr = JSON.stringify(command)
+    };
+    var commandStr = JSON.stringify(command);
     return new Promise((resolve, reject) => {
-      _self.connectNodeRed(resolve, reject, commandStr)
-    })
+      _self.connectNodeRed(resolve, reject, commandStr);
+    });
   },
 
   /**
@@ -34,25 +34,25 @@ export default {
    * @param {打印机名称, 取值"TOSHIBA" ,"GK888t","Zebra"} printerName 
    */
   print: function (url, printerName) {
-    var _self = this
+    var _self = this;
     return new Promise((resolve, reject) => {
       $.ajax({
         type: 'get',
         url: url,
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
           if (data && data.length > 0) {
-            var printPagesStr = JSON.parse(data)
-            _self.printPrintPages(printPagesStr, printerName)
+            var printPagesStr = JSON.parse(data);
+            _self.printPrintPages(printPagesStr, printerName);
           }
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -60,23 +60,23 @@ export default {
    * @param {*} printPages 
    */
   printPrintPages: function(printPages, printerName){
-    var _self = this
+    var _self = this;
     var commandData = {
       id: Uuid.createUUID(),
       command: 'print',
       printerName: printerName,
       data: printPages,
-    }
-    var commandStr = JSON.stringify(commandData)
+    };
+    var commandStr = JSON.stringify(commandData);
     var promise = new Promise((resolve, reject) => {
-      _self.connectNodeRed(resolve, reject, commandStr)
-    })
+      _self.connectNodeRed(resolve, reject, commandStr);
+    });
     promise.then(successData => {
       // resolve();
     }, errorData => {
-      console.log(errorData)
+      console.log(errorData);
       // reject(errorData);
-    })
+    });
   },
 
 
@@ -85,55 +85,55 @@ export default {
    * @param {*} printPages 
    */
   printPreview: function(printPages, printerName){
-    var _self = this
+    var _self = this;
     var commandData = {
       id: Uuid.createUUID(),
       command: 'printPreview',
       printerName: printerName,
       data: printPages,
-    }
-    var commandStr = JSON.stringify(commandData)
+    };
+    var commandStr = JSON.stringify(commandData);
     var promise = new Promise((resolve, reject) => {
-      _self.connectNodeRed(resolve, reject, commandStr)
-    })
-    console.log(promise)
-    return promise
+      _self.connectNodeRed(resolve, reject, commandStr);
+    });
+    console.log(promise);
+    return promise;
   },
 
 
   // 连接node red的websocket
   connectNodeRed: function (resolve, reject, commandStr) {
-    var _self = this
-    let printers = []
-    _self.webSocket = new WebSocket(this.socketUrl)
+    var _self = this;
+    let printers = [];
+    _self.webSocket = new WebSocket(this.socketUrl);
     _self.webSocket.onopen = function (event) {
-      console.log('打印 Websocket 连接成功。')
+      console.log('打印 Websocket 连接成功。');
       if (commandStr != null && commandStr.length > 0) {
-        _self.sendCommand(commandStr)
+        _self.sendCommand(commandStr);
       } else {
-        _self.close()
+        _self.close();
       }
-    }
+    };
     _self.webSocket.onclose = function (event) {
-      console.log('打印 Websocket 断开连接。')
-      resolve(printers)
-    }
+      console.log('打印 Websocket 断开连接。');
+      resolve(printers);
+    };
     _self.webSocket.onerror = function (event) {
-      console.log('打印 Websocket 出错。')
-      _self.close()
-      reject()
-    }
+      console.log('打印 Websocket 出错。');
+      _self.close();
+      reject();
+    };
     _self.webSocket.onmessage = function (event) {
-      var data = JSON.parse(event.data)
+      var data = JSON.parse(event.data);
       if (data.command == 'getPrinters') {
-        printers = data.data
+        printers = data.data;
       }
 
       if (data.command == 'printPreview') {
-        printers = data.previewImages
+        printers = data.previewImages;
       }
-      _self.close()
-    }
+      _self.close();
+    };
   },
 
 
@@ -143,7 +143,7 @@ export default {
    */
   sendCommand: function (command) {
     if (this.webSocket) {
-      this.webSocket.send(command)
+      this.webSocket.send(command);
     }
   },
 
@@ -152,9 +152,9 @@ export default {
    */
   close: function () {
     if (this.webSocket) {
-      this.webSocket.close()
-      this.webSocket = null
+      this.webSocket.close();
+      this.webSocket = null;
     };
   },
-}
+};
 

+ 49 - 36
packages/print/src/PrintWidget.vue

@@ -29,7 +29,7 @@
 
 <script>
 
-var PrintUtil = require('./PrintUtil.js')
+var PrintUtil = require('./PrintUtil.js');
 
 export default {
   name: 'PrintWidget',
@@ -37,91 +37,104 @@ export default {
   components: {
   },
     
-  props: [
-    'printerLocalstorageId', // 控件唯一的Id,用于localstorage存储打印机名称
-    'showPrintButton', // 是否显示打印按钮
-  ],
+  props: {
+    // 控件唯一的Id,用于localstorage存储打印机名称
+    'printerLocalstorageId':
+    {
+      type: String,
+      default: '',
+    }, 
+    // 是否显示打印按钮
+    'showPrintButton':
+    {
+      type: Boolean,
+      default: false,
+    }, 
+  },
+
+
+  emits: ['changePrinter', 'print'],
 
   data: function () {
     return {
       'printers': [], // 系统上的打印机
       'selectedPrinter': '',   // 选择的打印机
-    }
+    };
   },
 
 
 
   mounted: function () {
-    var _self = this
-    _self.restoreSelectedPrinter()
+    var _self = this;
+    _self.restoreSelectedPrinter();
     PrintUtil.getPrinters().then(successData => {
       if (successData != null && successData.length > 0) {
         successData.forEach(item => {
-          _self.printers.push(item)
-        })
+          _self.printers.push(item);
+        });
       }
-      _self.restoreSelectedPrinter()
+      _self.restoreSelectedPrinter();
     }, errorData => {
-      console.log(errorData)
-      _self.restoreSelectedPrinter()
-    })
+      console.log(errorData);
+      _self.restoreSelectedPrinter();
+    });
   },
 
   methods: {
 
     /**
-         * 选择的打印机发生改变,保存打印机的设置
-         */
+     * 选择的打印机发生改变,保存打印机的设置
+     */
     selectedPrinterChanged: function () {
-      this.$emit('changePrinter')
+      this.$emit('changePrinter');
       if (this.selectedPrinter != null) {
-        localStorage.setItem(this.key, this.selectedPrinter)
+        localStorage.setItem(this.key, this.selectedPrinter);
       } else {
-        localStorage.removeItem(this.key)
+        localStorage.removeItem(this.key);
       }
     },
 
     /**
-         * 恢复选择的打印机
-         */
+     * 恢复选择的打印机
+     */
     restoreSelectedPrinter: function () {
-      var selectedPrinterStr = localStorage.getItem(this.key)
+      var selectedPrinterStr = localStorage.getItem(this.key);
       if (selectedPrinterStr != null && selectedPrinterStr.length > 0) {
-        this.selectedPrinter = selectedPrinterStr
+        this.selectedPrinter = selectedPrinterStr;
       } else {
-        this.selectedPrinter = ''
+        this.selectedPrinter = '';
       }
     },
 
     /**
-         * 打印文件
-         */
+     * 打印文件
+     */
     print: function () {
-      var _self = this
-      this.$emit('print', _self.selectedPrinter)
+      var _self = this;
+      this.$emit('print', _self.selectedPrinter);
     },
 
     /**
-         * 获取选择打印机的名称
-         */
+     * 获取选择打印机的名称
+     */
     getSelectedPrinterName: function () {
-      return this.selectedPrinter
+      return this.selectedPrinter;
     },
 
     /**
-         * 获取选择打印的类型
-         */
+     * 获取选择打印的类型
+     */
     getSelectedPrinterType: function(){
       for(let index = 0; index < this.printers.length; index ++){
         if(this.printers[index].name === this.selectedPrinter){
-          return this.printers[index].type
+          return this.printers[index].type;
         }
       }
-      return null
+      return null;
     },
 
   },
-}
+};
 </script>
 
 <style scoped>

+ 18 - 6
packages/process/src/EnumSelectWidget.vue

@@ -19,27 +19,39 @@
 
 <script>
 export default {
-  props: ['keyValues', 'enumValue'],
+  props: {
+    'keyValues':{
+      type: Array,
+      default: function(){
+        return [];
+      },
+    }, 
+    'enumValue':{
+      type: String,
+      default: '',
+    },
+  },
 
+  emits: ['valueChanged'],
   data: function () {
     return {
       selectedValue: (this.enumValue == undefined ? '' : this.enumValue),
-    }
+    };
   },
 
   watch: {
     selectedValue: function (curVal, oldVal) {
-      console.log('Enum Selected Value changed:' + curVal)
+      console.log('Enum Selected Value changed:' + curVal);
       if (curVal != oldVal) {
-        this.$emit('valueChanged', curVal)
+        this.$emit('valueChanged', curVal);
       }
     },
 
     enumValue: function (val) {
-      this.selectedValue = val
+      this.selectedValue = val;
     },
   },
-}
+};
 
 </script>
 

+ 134 - 102
packages/process/src/MultiSearchWidget.vue

@@ -20,7 +20,8 @@
             :class="{'div-readonly':readonly}"
           >
             <span
-              v-for="item in selectDatas"
+              v-for="(item) in selectDatas"
+              :key="item.id"
               class="selected-tag"
             >
               {{ item.text }}
@@ -46,11 +47,18 @@
             @ok="searchDialogOk"
             @cancel="searchDialogCancel"
           >
-            <info
-              ref="info"
-              @dataSelected="dataSelected"
-            />
-            <div slot="header">{{ field.name }}</div>
+            <template #default>
+              <info
+                ref="info"
+                @data-selected="dataSelected"
+              />
+            </template>
+
+            <template #header>
+              <div>
+                {{ field.name }}
+              </div>
+            </template>
           </Modal>
         </div>
         <div
@@ -62,6 +70,7 @@
               <tr>
                 <td
                   v-for="item in infoWindowDto.infoGridFields"
+                  :key="'td-' + item.fieldName"
                   align="center"
                   width="100px"
                 >
@@ -72,11 +81,13 @@
             <tbody>
               <tr
                 v-for="item1 in infoWindowData.dataList"
+                :key="'row-data-' + item1.id"
                 height="40px"
                 @click="selectNode(item1)"
               >
                 <td
                   v-for="item2 in infoWindowDto.infoGridFields"
+                  :key="'row-column-data-' + item1.id + '-' + item2.fieldName"
                   align="center"
                 >
                   {{ item1.data[item2.fieldName].displayValue[0] }}
@@ -90,6 +101,7 @@
     <div
       v-for="(titleName, index) in titleNames"
       v-show="isVisible[index]"
+      :key="titleName + '-' + index"
       :class="{'form-group' : index > 0}"
     >
       <label
@@ -116,69 +128,89 @@
   </div>
 </template>
 <script>
-var Modal = require('../../modal/src/Modal.vue').default
-var Info = require('../../info/src/InfoWindow.vue').default
-var Common = require('../../common/Common.js')
+var Modal = require('../../modal/src/Modal.vue').default;
+var Info = require('../../info/src/InfoWindow.vue').default;
+var Common = require('../../common/Common.js');
 
 export default {
 
   components: {
     Modal, Info,
   },
-  props: ['infoWindowNo', 'field', 'fieldValue', 'readonly'],
+  props: {
+    'infoWindowNo':{
+      type: String,
+      default: null,
+    }, 
+    'field':{
+      type: Object,
+      default: null,
+    }, 
+    'fieldValue':{
+      type: Object,
+      default: null,
+    }, 
+    'readonly':{
+      type: Boolean,
+      default: false,
+    },
+  },
+
+  emits: [ 'getData', 'valueChanged'],
 
   data: function () {
     return {
-      labelNames: [],
       isVisible: [],
       infoWindowDto: {},
       infoWindowData: {},
       isShowAuto: false,
       searchText: '',
       selectDatas: [],
-    }
+    };
   },
 
   computed: {
     titleNames: function () {
-      if (this.labelNames == undefined || this.labelNames.length == 0) {
-        this.labelNames = this.field.displayName.split(',')
+      if (this.field == null && this.field.displayName == null) {
+        return '';
+      } else {
+        let labelNames = this.field.displayName.split(',');
+        return labelNames;
       }
-      return this.labelNames
     },
   },
 
   watch: {
     infoWindowData: function (val) {
-      var _self = this
+      var _self = this;
       if (val.dataList != undefined && val.dataList.length > 0) {
-        _self.isShowAuto = true
+        _self.isShowAuto = true;
       } else {
-        _self.isShowAuto = false
+        _self.isShowAuto = false;
       }
     },
   },
 
   mounted: function () {
-    this.getInfoWindowDto()
+    this.getInfoWindowDto();
   },
 
   methods: {
     // 显示搜索对话框
     showSearchDialog: function () {
-      var _self = this
+      var _self = this;
       if (this.readonly) {
-        return
+        return;
       }
-      _self.$refs.modal.showModal()
+      _self.$refs.modal.showModal();
       _self.$nextTick(function () {
-        _self.$refs.modal.showModal()
+        _self.$refs.modal.showModal();
         if (_self.$refs.info.infoWindowNo != _self.infoWindowNo) {
-          _self.$refs.info.loadByInfoWindowNo(_self.infoWindowNo)
+          _self.$refs.info.loadByInfoWindowNo(_self.infoWindowNo);
         } else {
-          _self.$refs.info.refresh()
+          _self.$refs.info.refresh();
         }
-      })
+      });
     },
 
     searchDialogOk: function () {
@@ -191,8 +223,8 @@ export default {
 
     // 输入的文本发生改变
     textChange: function (e) {
-      var _self = this
-      var text = _self.searchText
+      var _self = this;
+      var text = _self.searchText;
 
       // if(text == undefined || text.length == 0){
       // 	var newFieldValue = {
@@ -204,65 +236,65 @@ export default {
       // }
 
       if (text.trim() != '') {
-        _self.getInfoWindowData(text)
+        _self.getInfoWindowData(text);
       } else {
-        _self.isShowAuto = false
+        _self.isShowAuto = false;
       }
     },
 
     /**
-         * 查询InfoWindowDto
-         * @return {void} 
-         */
+                 * 查询InfoWindowDto
+                 * @return {void} 
+                 */
     getInfoWindowDto: function () {
-      var _self = this
+      var _self = this;
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/uniqueByNo'),
         type: 'GET',
         dataType: 'json',
         data: { 'infoWindowNo': _self.infoWindowNo },
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          _self.infoWindowDto = data
+          _self.infoWindowDto = data;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
 
     /**
-         * 生成查询条件
-         * @param  {String} text 查询条件
-         * @return {Array}      
-         */
+                 * 生成查询条件
+                 * @param  {String} text 查询条件
+                 * @return {Array}      
+                 */
     getSimpleQueryCondition: function (text) {
-      var _self = this
-      var values = []
+      var _self = this;
+      var values = [];
       if (_self.infoWindowDto.infoFilterFields != undefined) {
         _self.infoWindowDto.infoFilterFields.forEach(function (item) {
           if (item.displayType == 'TextEditor') {
             var value = {
               infoFilterFieldId: item.id,
               value1: text,
-            }
-            values.push(value)
+            };
+            values.push(value);
           }
-        })
+        });
       }
-      return values
+      return values;
     },
 
     /**
-         * 查询infoWindowData
-         * @return {void} 
-         */
+                 * 查询infoWindowData
+                 * @return {void} 
+                 */
     getInfoWindowData: function (text) {
-      var _self = this
+      var _self = this;
 
-      var infoFilterFieldValues = _self.getSimpleQueryCondition(text)
+      var infoFilterFieldValues = _self.getSimpleQueryCondition(text);
 
       var infoQueryParam = {
         infoWindowNo: _self.infoWindowNo,
@@ -270,119 +302,119 @@ export default {
         length: 5,
         sortClause: '',
         infoFilterFieldValues: infoFilterFieldValues,
-      }
+      };
 
       $.ajax({
         url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataSimple'),
         type: 'post',
         dataType: 'json',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         contentType: 'application/json',
         data: JSON.stringify(infoQueryParam),
         success: function (data) {
-          _self.infoWindowData = data
+          _self.infoWindowData = data;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
 
     /**
-         * 选择数据(自动提示框)
-         * @return {void} 
-         */
+                 * 选择数据(自动提示框)
+                 * @return {void} 
+                 */
     selectNode: function (data) {
-      var _self = this
-      _self.isShowAuto = false
-      _self.dataSelected(data)
+      var _self = this;
+      _self.isShowAuto = false;
+      _self.dataSelected(data);
 
     },
 
     deleteRecord: function (selectData) {
-      var _self = this
-      var index = _self.selectDatas.indexOf(selectData)
+      var _self = this;
+      var index = _self.selectDatas.indexOf(selectData);
       if (index > -1) {
-        _self.selectDatas.splice(index, 1)
-        _self.getSelectDataIds()
+        _self.selectDatas.splice(index, 1);
+        _self.getSelectDataIds();
       }
 
     },
 
     // 数据已经选择
     dataSelected: function (data) {
-      var _self = this
+      var _self = this;
 
-      var index = _self.selectDatas.indexOf(data)
+      var index = _self.selectDatas.indexOf(data);
 
       if (index > -1) {
-        return
+        return;
       }
 
       if (this.$refs.modal != undefined) {
-        this.$refs.modal.hideModal()
+        this.$refs.modal.hideModal();
       }
-      _self.$refs.modal.hideModal()
+      _self.$refs.modal.hideModal();
 
-      var text = []
+      var text = [];
 
-      var listDisplayFieldNames = this.field.listDisplayFieldNames
-      var displayValues = listDisplayFieldNames.split(',')
+      var listDisplayFieldNames = this.field.listDisplayFieldNames;
+      var displayValues = listDisplayFieldNames.split(',');
       for (var i = 0; i < displayValues.length; i++) {
-        var fieldValue = data.data[displayValues[i]]
+        var fieldValue = data.data[displayValues[i]];
         if (fieldValue != undefined && fieldValue.displayValue != undefined) {
-          text[i] = fieldValue.displayValue[0]
+          text[i] = fieldValue.displayValue[0];
         } else {
-          text[i] = ''
+          text[i] = '';
         }
       }
 
-      data.text = text[0]
+      data.text = text[0];
 
-      _self.selectDatas.push(data)
+      _self.selectDatas.push(data);
 
 
       /*var selectDataIds = [];
-            _self.selectDatas.forEach(function(item){
-                selectDataIds.push(item.id);
-            })
-
-            var newFieldValue = {
-                displayValue: selectDataIds,
-                fieldType: 'MultiSearchBoxEditor'
-            }
-            this.$emit("valueChanged", newFieldValue);*/
-
-      _self.getSelectDataIds()
-      this.$emit('getData', data)
+                        _self.selectDatas.forEach(function(item){
+                            selectDataIds.push(item.id);
+                        })
+            
+                        var newFieldValue = {
+                            displayValue: selectDataIds,
+                            fieldType: 'MultiSearchBoxEditor'
+                        }
+                        this.$emit("valueChanged", newFieldValue);*/
+
+      _self.getSelectDataIds();
+      this.$emit('getData', data);
     },
 
     getSelectDataIds: function () {
-      var _self = this
-      var selectDataIds = []
+      var _self = this;
+      var selectDataIds = [];
       _self.selectDatas.forEach(function (item) {
-        selectDataIds.push(item.id)
-      })
+        selectDataIds.push(item.id);
+      });
 
       var newFieldValue = {
         displayValue: selectDataIds,
         fieldType: 'MultiSearchBoxEditor',
-      }
-      this.$emit('valueChanged', newFieldValue)
+      };
+      this.$emit('valueChanged', newFieldValue);
     },
 
     // 获取String字符串
     getFieldStringValue: function (index) {
       if (this.fieldValue == undefined || this.fieldValue.displayValue == undefined || this.fieldValue.displayValue.length < index) {
-        return ''
+        return '';
       } else {
-        return this.fieldValue.displayValue[index]
+        return this.fieldValue.displayValue[index];
       }
     },
   },
-}
+};
 </script>
 
 <style scoped>

+ 39 - 39
packages/process/src/ProcessReport.vue

@@ -3,21 +3,21 @@
     <ProcessReportDynamic
       v-if="reportType == 'DYNAMIC'"
       :process-report-dto="processReportDto"
-      @valueChanged="valueChanged"
+      @value-changed="valueChanged"
     />
     <ProcessReportStatic
       v-if="reportType == 'STATIC'"
       :process-report-dto="processReportDto"
-      @valueChanged="valueChanged"
+      @value-changed="valueChanged"
     />
   </div>
 </template>
 
 <script>
 
-var Common = require('../../common/Common.js')
-var ProcessReportDynamic = require('./ProcessReportDynamic.vue').default
-var ProcessReportStatic = require('./ProcessReportStatic.vue').default
+var Common = require('../../common/Common.js');
+var ProcessReportDynamic = require('./ProcessReportDynamic.vue').default;
+var ProcessReportStatic = require('./ProcessReportStatic.vue').default;
 
 export default {
   name: 'ProcessReport',
@@ -31,19 +31,19 @@ export default {
     return {
       'reportType': '',
       'processReportDto': {},
-    }
+    };
   },
 
   watch: {
     '$route': function (to, from) {
-      this.processReportNo = this.$route.params.no
-      this.loadData()
+      this.processReportNo = this.$route.params.no;
+      this.loadData();
     },
   },
 
   mounted: function () {
-    this.processReportNo = this.$route.params.no
-    this.loadData()
+    this.processReportNo = this.$route.params.no;
+    this.loadData();
   },
 
   methods: {
@@ -53,20 +53,20 @@ export default {
          * @return {void} 
          */
     loadData: function () {
-      var _self = this
+      var _self = this;
       $.ajax({
         url: Common.getApiURL('ProcessReportResource/uniqueByNo'),
         type: 'get',
         dataType: 'json',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         data: {
           no: _self.processReportNo,
         },
         success: function (data) {
-          console.log('参数结果' + data.reportType)
-          _self.reportType = data.reportType
+          console.log('参数结果' + data.reportType);
+          _self.reportType = data.reportType;
 
           if (data.processReportParameters) {
             data.processReportParameters.forEach(function (item) {
@@ -75,67 +75,67 @@ export default {
                   id: '',
                   displayValue: [],
                   fieldType: 'String',
-                }
+                };
               }
-            })
+            });
           }
 
-          _self.processReportDto = data
+          _self.processReportDto = data;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
     // 值改变事件
     valueChanged: function (processReportParameter) {
-      var _self = this
-      console.log('processReportParameter:' + JSON.stringify(processReportParameter))
+      var _self = this;
+      console.log('processReportParameter:' + JSON.stringify(processReportParameter));
       if (_self.processReportDto && _self.processReportDto.processReportParameters) {
-        for (var i = 0; i < _self.processReportDto.processReportParameters.length; i++) {
+        for (let i = 0; i < _self.processReportDto.processReportParameters.length; i++) {
           if (_self.processReportDto.processReportParameters[i].fieldName == processReportParameter.fieldName) {
-            _self.processReportDto.processReportParameters[i].fieldValue = processReportParameter.fieldValue
+            _self.processReportDto.processReportParameters[i].fieldValue = processReportParameter.fieldValue;
           }
         }
       }
       if (processReportParameter.calloutProcessNo && processReportParameter.calloutProcessNo != '') {
-        _self.callout(processReportParameter.calloutProcessNo)
+        _self.callout(processReportParameter.calloutProcessNo);
       }
 
 
 
       if (_self.processReportDto != null && _self.processReportDto.processReportParameters != null) {
-        for (var i = 0; i < _self.processReportDto.processReportParameters.length; i++) {
-          var item = _self.processReportDto.processReportParameters[i]
+        for (let i = 0; i < _self.processReportDto.processReportParameters.length; i++) {
+          var item = _self.processReportDto.processReportParameters[i];
           if (item.fieldName != processReportParameter.fieldName
                         && item.whereClause != null
                         && item.whereClause.indexOf(':' + processReportParameter.fieldName) >= 0) {
-            item.fieldValue.id = ''
-            item.fieldValue.displayValue.splice(0, item.fieldValue.displayValue.length)
-            _self.$set(_self.processReportDto.processReportParameters, i, item)
+            item.fieldValue.id = '';
+            item.fieldValue.displayValue.splice(0, item.fieldValue.displayValue.length);
+            _self.$set(_self.processReportDto.processReportParameters, i, item);
           }
         }
       }
 
     },
     callout: function (calloutProcessNo) {
-      var _self = this
+      var _self = this;
       $.ajax({
         url: Common.getApiURL('ProcessReportResource/runProcessReportCallout/') + calloutProcessNo,
         type: 'POST',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         contentType: 'application/json',
         data: JSON.stringify(_self.processReportDto),
         success: function (data) {
           if (data && data.processReportParameterDtos) {
-            var processReportParameterDtos = data.processReportParameterDtos
+            var processReportParameterDtos = data.processReportParameterDtos;
             for (var i = 0; i < data.processReportParameterDtos.length; i++) {
-              var fieldName = data.processReportParameterDtos[i].fieldName
+              var fieldName = data.processReportParameterDtos[i].fieldName;
               for (var j = 0; j < _self.processReportDto.processReportParameters.length; j++) {
                 if (_self.processReportDto.processReportParameters[j].fieldName == fieldName) {
-                  var parameter = _self.processReportDto.processReportParameters[j]
+                  var parameter = _self.processReportDto.processReportParameters[j];
                   var cloneObject = {
                     'index': 1,
                     'isMandatory': false,
@@ -157,8 +157,8 @@ export default {
                     'listDisplayFieldName': parameter.listDisplayFieldName,
                     'displayName': parameter.displayName,
 
-                  }
-                  _self.$set(_self.processReportDto.processReportParameters, j, cloneObject)
+                  };
+                  _self.$set(_self.processReportDto.processReportParameters, j, cloneObject);
                 }
               }
             }
@@ -167,14 +167,14 @@ export default {
 
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
 
     },
 
   },
-}
+};
 </script>
 <style scoped>
 .control-label {

+ 54 - 49
packages/process/src/ProcessReportArchive.vue

@@ -78,6 +78,7 @@
         </div>
         <div
           v-for="item,index in processReportResult.reportResults"
+          :key="'reportResult-' + index"
           class="form-group"
         >
           <label>报表路径{{ index + 1 }}</label>
@@ -94,16 +95,20 @@
 </template>
 
 <script>
-var Common = require('../../common/Common.js')
-var Notify = require('../../common/Notify.js')
-var DateTimeWidget = require('../../datetime/src/DateTime.vue').default
+var Common = require('../../common/Common.js');
+var Notify = require('../../common/Notify.js');
+var DateTimeWidget = require('../../datetime/src/DateTime.vue').default;
 
 export default {
 
   components: {
     DateTimeWidget,
   },
-  props: ['processReportResult'],
+  props: {
+    'processReportResult':{
+      type: Object,
+      default: null,
+    }},
 
   data: function () {
     return {
@@ -115,40 +120,40 @@ export default {
       userName: '',
       archiveDate: '',
       interval: '',
-    }
+    };
   },
   watch: {
     'processReportResult': function () {
-      this.initArchiveAuthority()
+      this.initArchiveAuthority();
     },
   },
   mounted: function () {
-    var _self = this
-    this.initArchiveAuthority()
+    var _self = this;
+    this.initArchiveAuthority();
     this.interval = window.setInterval(function () {
-      _self.updateDate()
-    }, 1000)
+      _self.updateDate();
+    }, 1000);
 
   },
   unmounted: function () {
-    clearInterval(this.interval)
+    clearInterval(this.interval);
   },
 
   methods: {
     initArchiveAuthority: function () {
-      var _self = this
+      var _self = this;
       if (this.processReportResult) {
-        this.title = this.processReportResult.processReportName
+        this.title = this.processReportResult.processReportName;
       }
 
-      var loginInfoJson = localStorage.getItem('json_LoginInfo')
-      var loginInfo = JSON.parse(loginInfoJson)
+      var loginInfoJson = localStorage.getItem('json_LoginInfo');
+      var loginInfo = JSON.parse(loginInfoJson);
       if (loginInfo != null) {
-        _self.userName = loginInfo.userName
+        _self.userName = loginInfo.userName;
       }
       if (_self.processReportResult == null || _self.processReportResult.processReportNo == null) {
-        _self.archiveAuthority = false
-        return
+        _self.archiveAuthority = false;
+        return;
       }
       $.ajax({
         url: Common.getApiURL('ProcessReportResource/getArchiveAuthority'),
@@ -158,34 +163,34 @@ export default {
           'processReportNo': _self.processReportResult.processReportNo,
         },
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          _self.archiveAuthority = data
+          _self.archiveAuthority = data;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
     dateChange: function (value) {
-      this.businessDate = value
+      this.businessDate = value;
     },
     archive: function () {
-      var _self = this
-      var url = ''
-      var reportNames = ''
-      var reportResults = this.processReportResult.reportResults
+      var _self = this;
+      var url = '';
+      var reportNames = '';
+      var reportResults = this.processReportResult.reportResults;
       for (var i = 0; i < reportResults.length; i++) {
-        var reportResult = reportResults[i]
-        var pdfDownLoadUrl = reportResult.pdfDownLoadUrl
+        var reportResult = reportResults[i];
+        var pdfDownLoadUrl = reportResult.pdfDownLoadUrl;
         if (pdfDownLoadUrl && pdfDownLoadUrl.length > 4) {
-          url += pdfDownLoadUrl.substring(0, pdfDownLoadUrl.length - 4)
-          reportNames += reportResult.reportName
+          url += pdfDownLoadUrl.substring(0, pdfDownLoadUrl.length - 4);
+          reportNames += reportResult.reportName;
         }
         if (i + 1 < reportResults.length) {
-          url += ','
-          reportNames += ','
+          url += ',';
+          reportNames += ',';
         }
       }
       $.ajax({
@@ -200,38 +205,38 @@ export default {
           'reportNames': reportNames,
         },
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          Notify.success('归档成功', '归档成功,可以在【归档查询】页面查询所有归档信息', 1500)
-          _self.startArchive = false
+          Notify.success('归档成功', '归档成功,可以在【归档查询】页面查询所有归档信息', 1500);
+          _self.startArchive = false;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
     //格式化日期成 "yyyy-MM-dd HH-mm-SS"格式
     updateDate: function () {
-      var date = new Date()
-      var seperator1 = '-'
-      var seperator2 = ':'
-      var month = date.getMonth() + 1
-      var strDate = date.getDate()
+      var date = new Date();
+      var seperator1 = '-';
+      var seperator2 = ':';
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
       if (month >= 1 && month <= 9) {
-        month = '0' + month
+        month = '0' + month;
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = '0' + strDate
+        strDate = '0' + strDate;
       }
       var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
                 + ' ' + date.getHours() + seperator2 + date.getMinutes() + seperator2
-                + (date.getSeconds() < 10 ? '0' : '') + date.getSeconds()
-      this.archiveDate = currentdate
+                + (date.getSeconds() < 10 ? '0' : '') + date.getSeconds();
+      this.archiveDate = currentdate;
     },
     searchArchiveRecord: function () {
-      this.$router.push('/desktop/archive')
+      this.$router.push('/desktop/archive');
     },
   },
-}
+};
 </script>

+ 83 - 73
packages/process/src/ProcessReportDynamic.vue

@@ -10,7 +10,8 @@
     <div>
       <div class="form-inline">
         <div
-          v-for="item in parameters"
+          v-for="(item, index) in parameters"
+          :key="'parameter-' + index"
           class="form-group m-form-group"
         >
           <div class="form-inline-div">
@@ -74,7 +75,7 @@
               :field="item"
               :field-value="item.fieldValue"
               class="m-input-group"
-              @valueChanged="valueChanged($event, item)"
+              @value-changed="valueChanged($event, item)"
             />
 
             <MultiSearchWidget
@@ -83,7 +84,7 @@
               :field="item"
               :field-value="item.fieldValue"
               class="m-input-group"
-              @valueChanged="tabValueChanged($event, item)"
+              @value-changed="tabValueChanged($event, item)"
             />
 
             <SearchWidget
@@ -95,14 +96,17 @@
               :display-name="item.listDisplayFieldNames"
               class="m-input-group"
               :parent-model-data="parentModelData"
-              @valueChanged="tabValueChanged($event, item)"
+              @value-changed="tabValueChanged($event, item)"
             />
           </div>
           <!--<div v-if = "item.constraintEnum == 'Between'" class="form-inline-div">
 						<label v-if="item.displayType != 'ListBoxEnumEditor'" :for="'editor_' + item.id">——</label>
-						<input v-if="item.displayType =='NumberEditor'" type="number" v-model="item.value2" class="form-control m-input-group" :id="'editor_' + item.id" placeholder="请输入数字" @change="valueChanged(item)"/>
+						<input v-if="item.displayType =='NumberEditor'" type="number" v-model="item.value2" 
+              class="form-control m-input-group" :id="'editor_' + item.id" placeholder="请输入数字" @change="valueChanged(item)"/>
 		
-						<DateTime v-if="item.displayType =='DateTimeBoxEditor'" :dateValue="item.value2" class="form-control m-input-group" name="datetime" :id="'editor_' + item.id" @on-value-change="changeValue(item, $event)" />
+						<DateTime v-if="item.displayType =='DateTimeBoxEditor'" :dateValue="item.value2" 
+            class="form-control m-input-group" name="datetime" 
+            :id="'editor_' + item.id" @on-value-change="changeValue(item, $event)" />
 					</div>	-->
         </div>
       </div>
@@ -135,16 +139,15 @@
 
 <script>
 
-var Common = require('../../common/Common.js')
-var Notify = require('../../common/Notify.js')
+var Common = require('../../common/Common.js');
 
-var Navbar = require('../../navbar/src/Navbar.vue').default
-var DateTime = require('../../datetime/src/DateTime.vue').default
-var MultiSearchWidget = require('./MultiSearchWidget.vue').default
-var Loading = require('../../loading/src/Loading.vue').default
-var ProcessReportResultPreview = require('./ProcessReportResultPreview.vue').default
-var SearchWidget = require('../../info/src/SearchWidget.vue').default
-var Switches = require('../../switches/src/Switches.vue').default
+var Navbar = require('../../navbar/src/Navbar.vue').default;
+var DateTime = require('../../datetime/src/DateTime.vue').default;
+var MultiSearchWidget = require('./MultiSearchWidget.vue').default;
+var Loading = require('../../loading/src/Loading.vue').default;
+var ProcessReportResultPreview = require('./ProcessReportResultPreview.vue').default;
+var SearchWidget = require('../../info/src/SearchWidget.vue').default;
+var Switches = require('../../switches/src/Switches.vue').default;
 
 
 
@@ -159,7 +162,14 @@ export default {
     Switches,
     Navbar,
   },
-  props: ['processReportDto'],
+  props: {
+    'processReportDto':{
+      type: Object,
+      default: null,
+    },
+  },
+
+  emits:['valueChanged'],
   data: function () {
     return {
       'processReportId': '',
@@ -171,28 +181,28 @@ export default {
         'data': {
         },
       },
-    }
+    };
   },
 
   //监控processReportDto,当dto变化时重新渲染界面
   watch: {
     'processReportDto': function (to, from) {
-      this.parameters = []
-      this.processReportResult.reportResults = undefined
-      this.initData(this.processReportDto)
+      this.parameters = [];
+      this.processReportResult.reportResults = undefined;
+      this.initData(this.processReportDto);
     },
     'processReportDto.processReportParameters': function () {
-      this.initData(this.processReportDto)
+      this.initData(this.processReportDto);
     },
     // 路由切换的时候清空报表结果数据
     '$route': function () {
-      this.processReportResult = {}
+      this.processReportResult = {};
     },
 
   },
 
   mounted: function () {
-    this.initData(this.processReportDto)
+    this.initData(this.processReportDto);
   },
 
   methods: {
@@ -200,7 +210,7 @@ export default {
          * 打开帮助页面
          */
     openHtmlHelp: function (htmlHelpUrl) {
-      window.open(htmlHelpUrl)
+      window.open(htmlHelpUrl);
     },
 
 
@@ -210,17 +220,17 @@ export default {
          * @return {void}
          */
     initData: function (data) {
-      console.log('获取的参数列表:' + JSON.stringify(data))
-      var _self = this
+      console.log('获取的参数列表:' + JSON.stringify(data));
+      var _self = this;
       if (data == undefined) {
-        return
+        return;
       }
-      _self.parameters = []
+      _self.parameters = [];
       if (data.processReportParameters) {
         data.processReportParameters.forEach(function (item) {
           if (item.constraintEnum == 'Between') {
-            var cloneObject1 = _self.cloneParameter(item)
-            _self.parameters.push(cloneObject1)
+            var cloneObject1 = _self.cloneParameter(item);
+            _self.parameters.push(cloneObject1);
             var cloneObject = {
               'index': 2,
               'isMandatory': false,
@@ -247,22 +257,22 @@ export default {
               'displayName': '~',
               'infoWindowNo': item.infoWindowNo,
 
-            }
-            _self.parentModelData.data[cloneObject.fieldName] = cloneObject.fieldValue
-            console.log(cloneObject)
-            _self.parameters.push(cloneObject)
+            };
+            _self.parentModelData.data[cloneObject.fieldName] = cloneObject.fieldValue;
+            console.log(cloneObject);
+            _self.parameters.push(cloneObject);
           } else {
-            var obj = _self.cloneParameter(item)
-            _self.parameters.push(obj)
+            var obj = _self.cloneParameter(item);
+            _self.parameters.push(obj);
           }
-        })
+        });
       }
       // 排序
       _self.parameters.sort(function (a, b) {
-        return a.sortNo - b.sortNo
-      })
+        return a.sortNo - b.sortNo;
+      });
 
-      console.log(_self.parameters)
+      console.log(_self.parameters);
       //_self.processReportDto = data;
     },
 
@@ -271,52 +281,52 @@ export default {
          * @return {void}
          */
     runProcessDynamic: function () {
-      var _self = this
+      var _self = this;
       _self.processResultData = {
         'processReportNo': _self.processReportDto.no,
         'modelData': {
           data: {},
         },
-      }
+      };
       _self.parameters.forEach(function (item) {
-        var fieldName = item.fieldName
-        _self.processResultData.modelData.data[fieldName] = item.fieldValue
-      })
-      _self.processReportResult = {}
+        var fieldName = item.fieldName;
+        _self.processResultData.modelData.data[fieldName] = item.fieldValue;
+      });
+      _self.processReportResult = {};
 
-      _self.$refs.loading.show()
+      _self.$refs.loading.show();
       $.ajax({
         url: Common.getApiURL('ProcessReportResource/runProcessDynamic'),
         type: 'post',
         dataType: 'json',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         contentType: 'application/json',
         data: JSON.stringify(_self.processResultData),
         success: function (data) {
-          _self.$refs.loading.hide()
-          _self.processReportResult = data
+          _self.$refs.loading.hide();
+          _self.processReportResult = data;
 
           if (_self.processReportResult.reportResults != undefined && _self.processReportResult.reportResults.length > 0) {
             _self.processReportResult.reportResults.forEach(function (item, index) {
-              _self.$set(item, 'previewIndex', 1)
+              _self.$set(item, 'previewIndex', 1);
               if (index == 0) {
-                _self.$set(item, 'showPreview', true)
+                _self.$set(item, 'showPreview', true);
               } else {
-                _self.$set(item, 'showPreview', false)
+                _self.$set(item, 'showPreview', false);
               }
-            })
+            });
           }
           // _self.processReportDto.excelOnly = false;
           // _self.processReportDto.pdfOnly = true;
 
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.$refs.loading.hide()
-          Common.processException(XMLHttpRequest, textStatus, errorThrown)
+          _self.$refs.loading.hide();
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      })
+      });
     },
 
     /**
@@ -326,8 +336,8 @@ export default {
          * @return {void}          
          */
     changeValue: function (item, newValue) {
-      this.$set(item.fieldValue.displayValue, 0, newValue)
-      this.valueChanged(item)
+      this.$set(item.fieldValue.displayValue, 0, newValue);
+      this.valueChanged(item);
     },
 
     /**
@@ -338,10 +348,10 @@ export default {
          */
     tabValueChanged: function (newFieldValue, item) {
       //item.fieldValue = newFieldValue;
-      this.$set(item.fieldValue, 'displayValue', newFieldValue.displayValue)
-      this.$set(item.fieldValue, 'id', newFieldValue.id)
-      this.$set(item.fieldValue, 'fieldType', newFieldValue.fieldType)
-      this.valueChanged(item)
+      this.$set(item.fieldValue, 'displayValue', newFieldValue.displayValue);
+      this.$set(item.fieldValue, 'id', newFieldValue.id);
+      this.$set(item.fieldValue, 'fieldType', newFieldValue.fieldType);
+      this.valueChanged(item);
     },
 
     /**
@@ -371,36 +381,36 @@ export default {
         'infoWindowNo': parameter.infoWindowNo,
         'value2': '',
 
-      }
+      };
       if (parameter.fieldValue) {
-        cloneObject.fieldValue = parameter.fieldValue
+        cloneObject.fieldValue = parameter.fieldValue;
       } else {
         cloneObject.fieldValue = {
           'id': parameter.id,
           'constraintEnum': parameter.constraintEnum,
           'displayValue': [],
           'fieldType': 'String',
-        }
+        };
       }
-      this.parentModelData.data[cloneObject.fieldName] = cloneObject.fieldValue
-      return cloneObject
+      this.parentModelData.data[cloneObject.fieldName] = cloneObject.fieldValue;
+      return cloneObject;
 
     },
     // 值改变事件
     valueChanged: function (processReportParameter) {
       // this.fieldValue = newFieldValue;
-      this.$emit('valueChanged', processReportParameter)
-      this.parentModelData.data[processReportParameter.fieldName] = processReportParameter.fieldValue
+      this.$emit('valueChanged', processReportParameter);
+      this.parentModelData.data[processReportParameter.fieldName] = processReportParameter.fieldValue;
       this.parameters.forEach(function (item) {
         if (item.fieldName == processReportParameter.fieldName) {
-          item = processReportParameter
+          item = processReportParameter;
         }
-      })
+      });
     },
 
   },
 
-}
+};
 </script>
 <style scoped>
 .m-form-group label {

+ 61 - 52
packages/process/src/ProcessReportResult.vue

@@ -9,7 +9,8 @@
         class="processResult-textarea"
         rows="10"
         style="width:100%"
-      >1.{{ processReportResult.processResult.result }}</textarea>
+        :value="processReportResult.processResult.result"
+      />
       <div v-else>
         <h5
           class="control-label"
@@ -19,11 +20,6 @@
         </h5>
       </div>
     </div>
-    <!--
-          	作者:ChenMu
-          	时间:2020-01-20
-          	描述:jasper显示
-          -->
     <div class="form-group">
       <div
         v-if="processReportResult.processResult != undefined && pdfOnly != true"
@@ -38,36 +34,41 @@
           Excel报表
         </a>
       </div>
-      <div
+
+      <template
         v-for="(reportResult, index) in processReportResult.reportResults"
-        v-if="processReportResult.reportResults != undefined"
-        id="pr.id"
-        class="form-group"
+        :key="'reportResult' + index"
       >
-        <h3 class="control-label">
-          {{ index + 1 + (processReportResult.processResult == undefined ? 0 : 1) }}.{{ reportResult.reportName }}
-        </h3>
-        <div>
-          <button
-            v-if="reportResult.isSuccess && pdfOnly != true"
-            class="btn btn-success"
-            @click="reportDownload(reportResult.excelDownLoadUrl, reportResult.reportDefinitionType)"
-          >
-            Excel报表
-          </button>
-          <button
-            v-if="reportResult.isSuccess && excelOnly != true"
-            class="btn btn-success"
-            @click="reportDownload(reportResult.pdfDownLoadUrl, reportResult.reportDefinitionType)"
-          >
-            PDF报表
-          </button>
-          <span
-            v-else
-            class="control-label label-danger"
-          >生成失败</span>
+        <div
+          v-if="processReportResult.reportResults != undefined"
+          id="pr.id"
+          class="form-group"
+        >
+          <h3 class="control-label">
+            {{ index + 1 + (processReportResult.processResult == undefined ? 0 : 1) }}.{{ reportResult.reportName }}
+          </h3>
+          <div>
+            <button
+              v-if="reportResult.isSuccess && pdfOnly != true"
+              class="btn btn-success"
+              @click="reportDownload(reportResult.excelDownLoadUrl, reportResult.reportDefinitionType)"
+            >
+              Excel报表
+            </button>
+            <button
+              v-if="reportResult.isSuccess && excelOnly != true"
+              class="btn btn-success"
+              @click="reportDownload(reportResult.pdfDownLoadUrl, reportResult.reportDefinitionType)"
+            >
+              PDF报表
+            </button>
+            <span
+              v-else
+              class="control-label label-danger"
+            >生成失败</span>
+          </div>
         </div>
-      </div>
+      </template>
     </div>
 
     <!--<ProcessReportArchive :processReportResult="processReportResult"></ProcessReportArchive>-->
@@ -75,36 +76,44 @@
 </template>
 
 <script>
-var Common = require('../../common/Common.js')
-var ProcessReportArchive = require('./ProcessReportArchive.vue').default
-var DownloadService = require('../../common/DownloadService.js')
+var Common = require('../../common/Common.js');
+// var ProcessReportArchive = require('./ProcessReportArchive.vue').default;
+var DownloadService = require('../../common/DownloadService.js');
 
 export default {
   name: 'ProcessReportResult',
 
   components: {
-    Common,
-    ProcessReportArchive,
-    DownloadService,
+    // ProcessReportArchive,
+  },
 
+  props: {
+    'processReportResult': {
+      type: Object,
+      default: null,
+    }, 'pdfOnly': {
+      type: Boolean,
+      default: false,
+    }, 'excelOnly': {
+      type: Boolean,
+      default: false,
+    },
   },
-    
-  props: ['processReportResult', 'pdfOnly', 'excelOnly'],
 
   data: function () {
     return {
 
-    }
+    };
   },
 
   computed: {
     // 是否文本区域显示流程结果
     isTextAreaShowProcessResult: function () {
-      var result = this.processReportResult.processResult.result
+      var result = this.processReportResult.processResult.result;
       if (result != undefined && result.length > 100) {
-        return true
+        return true;
       } else {
-        return false
+        return false;
       }
     },
 
@@ -116,17 +125,17 @@ export default {
 
   methods: {
     /**
-         * 下载报表
-         * @param {Object} fileName
-         * @author GuoZhiBo 20200410
-         */
+             * 下载报表
+             * @param {Object} fileName
+             * @author GuoZhiBo 20200410
+             */
     reportDownload: function (fileName, reportDefinitionType) {
       if (reportDefinitionType == 'UReport2') {
-        window.open(Common.getRootPath() + fileName)
+        window.open(Common.getRootPath() + fileName);
       } else {
-        DownloadService.reportDownload(fileName)
+        DownloadService.reportDownload(fileName);
       }
     },
   },
-}
+};
 </script>

+ 164 - 162
packages/process/src/ProcessReportResultPreview.vue

@@ -6,10 +6,11 @@
     >
       <textarea
         v-if="isTextAreaShowProcessResult"
+        :value="processReportResult.processResult.result"
         class="processResult-textarea"
         rows="10"
         style="width:100%"
-      >1.{{ processReportResult.processResult.result }}</textarea>
+      />
       <div v-if="isDivShowProcessResult">
         <h3 class="control-label">1.{{ processReportResult.processResult.result }}</h3>
       </div>
@@ -31,129 +32,120 @@
       v-if="processReportResult.reportResults != undefined"
       :process-report-result="processReportResult"
     />
-    <div
+
+    <template
       v-for="(reportResult, index) in processReportResult.reportResults"
-      v-if="processReportResult.reportResults != undefined"
-      id="pr.id"
-      class="form-group"
+      :key="'reportResult-' + index"
     >
-      <div class="panel panel-default">
-        <div
-          class="panel-heading"
-          style="height: 50px;"
-          @click.self="reportResult.showPreview = !reportResult.showPreview"
-        >
-          <div class="pull-left">
-            {{ index + 1 + (processReportResult.processResult == undefined ? 0 : 1) }}.{{ reportResult.reportName }}
-          </div>
-          <div
-            class="pull-left"
-            style="padding-left: 30px; cursor: pointer;"
-            @click="iframeBack(reportResult, index)"
-          >
-            后退
-          </div>
-          <div
-            class="pull-left"
-            style="padding-left: 30px; cursor: pointer;"
-            @click="iframeForward(reportResult, index)"
-          >
-            前进
-          </div>
-          <div
-            v-if="reportResult.reportDefinitionType == 'UReport2'"
-            class="pull-left"
-            style="padding-left: 30px; cursor: pointer;"
-            @click="editReport(reportResult, index)"
-          >
-            编辑
-          </div>
+      <div
+        v-if="processReportResult.reportResults != undefined"
+        id="pr.id"
+        class="form-group"
+      >
+        <div class="panel panel-default">
           <div
-            class="pull-right"
-            style="width: 200px;"
+            class="panel-heading"
+            style="height: 50px;"
+            @click.self="reportResult.showPreview = !reportResult.showPreview"
           >
-            <div class="input-group m-input-group">
-              <select
-                v-model="reportResult.previewIndex"
-                class="form-control"
-              >
-                <option
-                  v-if="excelOnly != true"
-                  value="1"
-                >
-                  PDF
-                </option>
-                <option
-                  v-if="pdfOnly != true"
-                  value="2"
-                >
-                  Excel
-                </option>
-              </select>
-              <span
-                class="input-group-addon btn-download"
-                @click="download(reportResult)"
-              >下载</span>
+            <div class="pull-left">
+              {{ index + 1 + (processReportResult.processResult == undefined ? 0 : 1) }}.{{ reportResult.reportName }}
+            </div>
+            <div
+              class="pull-left"
+              style="padding-left: 30px; cursor: pointer;"
+              @click="iframeBack(reportResult, index)"
+            >
+              后退
+            </div>
+            <div
+              class="pull-left"
+              style="padding-left: 30px; cursor: pointer;"
+              @click="iframeForward(reportResult, index)"
+            >
+              前进
             </div>
-          </div>
-        </div>
-        <div
-          v-if="reportResult.showPreview"
-          class="panel-body"
-        >
-          <div v-if="reportResult.isSuccess">
             <div
-              v-if="reportResult.previewIndex == 1"
-              class="embed-responsive embed-responsive-4by3"
+              v-if="reportResult.reportDefinitionType == 'UReport2'"
+              class="pull-left"
+              style="padding-left: 30px; cursor: pointer;"
+              @click="editReport(reportResult, index)"
             >
-              <embed
-                :id="uuid + 'pdfIframe' + index"
-                class="embed-responsive-item"
-                type="application/pdf"
-                :src="getReport(reportResult.pdfDownLoadUrl, '#' + uuid + 'pdfIframe' + index)"
-              />
+              编辑
             </div>
             <div
-              v-else
-              class="embed-responsive embed-responsive-4by3"
+              class="pull-right"
+              style="width: 200px;"
             >
-              <iframe
-                :id="uuid + 'htmlIframe' + index"
-                class="embed-responsive-item"
-                :src="getReport(reportResult.htmlPreviewUrl, '#' + uuid + 'htmlIframe' + index)"
-              />
+              <div class="input-group m-input-group">
+                <select
+                  v-model="reportResult.previewIndex"
+                  class="form-control"
+                >
+                  <option
+                    v-if="excelOnly != true"
+                    value="1"
+                  >
+                    PDF
+                  </option>
+                  <option
+                    v-if="pdfOnly != true"
+                    value="2"
+                  >
+                    Excel
+                  </option>
+                </select>
+                <span
+                  class="input-group-addon btn-download"
+                  @click="download(reportResult)"
+                >下载</span>
+              </div>
             </div>
           </div>
-          <div v-else>
-            生成失败
+          <div
+            v-if="reportResult.showPreview"
+            class="panel-body"
+          >
+            <div v-if="reportResult.isSuccess">
+              <div
+                v-if="reportResult.previewIndex == 1"
+                class="embed-responsive embed-responsive-4by3"
+              >
+                <embed
+                  :id="uuid + 'pdfIframe' + index"
+                  class="embed-responsive-item"
+                  type="application/pdf"
+                  :src="getReport(reportResult.pdfDownLoadUrl, '#' + uuid + 'pdfIframe' + index)"
+                />
+              </div>
+              <div
+                v-else
+                class="embed-responsive embed-responsive-4by3"
+              >
+                <iframe
+                  :id="uuid + 'htmlIframe' + index"
+                  class="embed-responsive-item"
+                  :src="getReport(reportResult.htmlPreviewUrl, '#' + uuid + 'htmlIframe' + index)"
+                />
+              </div>
+            </div>
+            <div v-else>
+              生成失败
+            </div>
           </div>
         </div>
       </div>
-
-      <!-- <h3 class = "control-label">
-	          {{index + 1 + (processReportResult.processResult == undefined ? 0 : 1)}}.{{reportResult.reportName}}
-	        </h3>
-	        <div>
-	        	<a v-if="reportResult.isSuccess" v-bind:href="reportResult.excelDownLoadUrl" target="_blank" role="button" class="btn btn-info">	
-	        		Excel报表
-	        	</a>
-	        	<a v-if="reportResult.isSuccess" v-bind:href="reportResult.pdfDownLoadUrl" target="_blank" role="button" class="btn btn-info">
-	        		PDF报表
-	        	</a>
-	        	<span class = "control-label label-danger" v-else>生成失败</span>
-	        </div> -->
-    </div>
+    </template>
   </div>
 </template>
 
 <script>
 
-var Common = require('../../common/Common.js')
-var Uuid = require('../../common/Uuid.js')
-
-var DownloadService = require('../../common/DownloadService.js')
-
-var ProcessReportArchive = require('./ProcessReportArchive.vue').default
+var Common = require('../../common/Common.js');
+var Uuid = require('../../common/Uuid.js');
+var Notify = require('../../common/Notify.js');
+var DownloadService = require('../../common/DownloadService.js');
+var ProcessReportArchive = require('./ProcessReportArchive.vue').default;
 
 export default {
   name: 'ProcessReportResultPreview',
@@ -161,132 +153,142 @@ export default {
   components: {
     ProcessReportArchive,
   },
-    
-  props: ['processReportResult', 'pdfOnly', 'excelOnly'],
+
+  props: {
+    'processReportResult': {
+      type: Object,
+      default: null,
+    }, 'pdfOnly': {
+      type: Boolean,
+      default: false,
+    }, 'excelOnly': {
+      type: Boolean,
+      default: false,
+    },
+  },
 
   data: function () {
     return {
       'uuid': Uuid.createUUID(),
-    }
+    };
   },
 
   computed: {
     // 是否文本区域显示流程结果
     isTextAreaShowProcessResult: function () {
-      var result = this.processReportResult.processResult.result
+      var result = this.processReportResult.processResult.result;
       if (result != undefined && result.length > 100) {
-        return true
+        return true;
       } else {
-        return false
+        return false;
       }
     },
 
     // 是否Div显示流程个结果
     isDivShowProcessResult: function () {
-      var result = this.processReportResult.processResult.result
+      var result = this.processReportResult.processResult.result;
       if (result != undefined && result.length <= 100) {
-        return true
+        return true;
       } else {
-        return false
+        return false;
       }
     },
 
   },
-    
+
   methods: {
     /**
-         * 根据id和url获取文件,请求头增加token
-         * @author GuoZhiBo 20200507
-         * @param {Object} url
-         * @param {Object} id
-         */
+             * 根据id和url获取文件,请求头增加token
+             * @author GuoZhiBo 20200507
+             * @param {Object} url
+             * @param {Object} id
+             */
     getReport: function (url, id) {
-      var _self = this
-      var account = localStorage.getItem('account')
-      var token = localStorage.getItem('token')
-      let absoluteUrl = null
+      var _self = this;
+      var account = localStorage.getItem('account');
+      var token = localStorage.getItem('token');
+      let absoluteUrl = null;
       if (url.indexOf('ureport') > 0) {
-        absoluteUrl = Common.getRootPath() + url
+        absoluteUrl = Common.getRootPath() + url;
 
         _self.$nextTick(function () {
-          var iframe = document.querySelector(id)
-          iframe.src = absoluteUrl
-        })
+          var iframe = document.querySelector(id);
+          iframe.src = absoluteUrl;
+        });
       } else {
-        absoluteUrl = Common.getFileServerUrl() + 'Files/' + account + '/GeneratedReport/' + url
+        absoluteUrl = Common.getFileServerUrl() + 'Files/' + account + '/GeneratedReport/' + url;
 
         _self.$nextTick(function () {
-          var iframe = document.querySelector(id)
-          var headers = [['token', token, 'account', account]]
-          var xhr = new XMLHttpRequest()
-          xhr.open('GET', absoluteUrl)
-          xhr.responseType = 'blob'
+          var iframe = document.querySelector(id);
+          var headers = [['token', token, 'account', account]];
+          var xhr = new XMLHttpRequest();
+          xhr.open('GET', absoluteUrl);
+          xhr.responseType = 'blob';
           headers.forEach(function (header) {
-            xhr.setRequestHeader(header[0], header[1])
-            xhr.setRequestHeader(header[2], header[3])
-          })
+            xhr.setRequestHeader(header[0], header[1]);
+            xhr.setRequestHeader(header[2], header[3]);
+          });
           xhr.onload = function () {// 请求完成处理函数
             if (this.status === 200) {
-              var blob = this.response// 获取返回值
-              iframe.src = window.URL.createObjectURL(this.response)
+              //var blob = this.response;// 获取返回值
+              iframe.src = window.URL.createObjectURL(this.response);
             }
-          }
-          xhr.send()
-        })
+          };
+          xhr.send();
+        });
       }
 
 
     },
     /**
-         * 下载文件
-         */
+             * 下载文件
+             */
     download: function (item) {
       if (item.previewIndex == 1) {
-        console.log(item.pdfDownLoadUrl)
-        DownloadService.reportDownload(item.pdfDownLoadUrl)
+        console.log(item.pdfDownLoadUrl);
+        DownloadService.reportDownload(item.pdfDownLoadUrl);
       } else {
-        DownloadService.reportDownload(item.excelDownLoadUrl)
+        DownloadService.reportDownload(item.excelDownLoadUrl);
       }
     },
 
     /**
-         * 后退
-         */
+             * 后退
+             */
     iframeBack: function (reportResult, index) {
       if (reportResult.previewIndex == 1) {
-        document.getElementById('pdfIframe' + index).contentWindow.history.back()
+        document.getElementById('pdfIframe' + index).contentWindow.history.back();
       } else {
-        document.getElementById('htmlIframe' + index).contentWindow.history.back()
+        document.getElementById('htmlIframe' + index).contentWindow.history.back();
       }
     },
 
 
     /**
-         * 前进
-         */
+             * 前进
+             */
     iframeForward: function (reportResult, index) {
       if (reportResult.previewIndex == 1) {
-        document.getElementById('pdfIframe' + index).contentWindow.history.forward()
+        document.getElementById('pdfIframe' + index).contentWindow.history.forward();
       } else {
-        document.getElementById('htmlIframe' + index).contentWindow.history.forward()
+        document.getElementById('htmlIframe' + index).contentWindow.history.forward();
       }
     },
 
 
     /**
-         * 打开报表编辑界面
-         */
+             * 打开报表编辑界面
+             */
     editReport: function (reportResult) {
-      var _self = this
       if (reportResult.reportDefinitionType != 'UReport2') {
-        Notify.error('错误', '当前的报表不支持用户自定义', false)
-        return
+        Notify.error('错误', '当前的报表不支持用户自定义', false);
+        return;
       }
-      let reportDesignerUrl = reportResult.htmlPreviewUrl.replace('preview', 'designer')
-      window.open(reportDesignerUrl)
+      let reportDesignerUrl = reportResult.htmlPreviewUrl.replace('preview', 'designer');
+      window.open(reportDesignerUrl);
     },
   },
-}
+};
 </script>
 <style scoped>
 .btn-download {

+ 180 - 170
packages/process/src/ProcessReportStatic.vue

@@ -8,111 +8,114 @@
       <h5>{{ processReportDto.description }}</h5>
     </div>
     <div class="form-inline">
-      <div
-        v-for="item in processReportDtos.processReportParameters"
-        v-if="processReportDtos != undefined && processReportDtos.processReportParameters != undefined"
-        class="form-group"
-      >
-        <label
-          v-if="item.displayType != 'ListBoxEnumEditor'"
-          class="m-label"
-          :for="'editor_' + item.id"
-        >{{ item.displayName }}</label>
-        <span
-          v-show="!item.mandatory"
-          style="color: red;"
-        >该项为必填项字段</span>
-
-        <div class="input-group">
-          <input
-            v-if="item.displayType =='TextEditor'"
-            :id="'editor_' + item.id"
-            v-model="item.fieldValue.displayValue[0]"
-            type="text"
-            class="form-control"
-            placeholder="请输入内容"
-            @change="valueChanged(item)"
-          />
-
-          <textarea
-            v-if="item.displayType =='TextAreaEditor'"
-            :id="'editor_' + item.id"
-            v-model="item.fieldValue.displayValue[0]"
-            rows="5"
-            type="text"
-            class="form-control"
-            placeholder="请输入内容"
-            @change="valueChanged(item)"
-          />
-
-          <input
-            v-if="item.displayType =='NumberEditor'"
-            :id="'editor_' + item.id"
-            v-model="item.fieldValue.displayValue[0]"
-            type="number"
-            class="form-control"
-            placeholder="请输入数字"
-            @change="valueChanged(item)"
-          />
-
-          <Switches
-            v-if="item.displayType =='CheckBoxEditor'"
-            v-model="item.fieldValue.displayValue[0]"
-            color="green"
-            type-bold="true"
-            @change="valueChanged(item)"
-          />
-
-          <DateTime
-            v-if="item.displayType =='DateTimeBoxEditor'"
-            :id="'editor_' + item.id"
-            :date-value="item.fieldValue.displayValue[0]"
-            class="form-control"
-            name="datetime"
-            @on-value-change="changeValue(item, $event)"
-          />
-
-          <EnumSelectWidget
-            v-if="item.displayType =='ListBoxEnumEditor'"
-            :key-values="item.keyValues"
-            :enum-value="item.fieldValue.displayValue[0]"
-            @valueChanged="changeValue(item, $event)"
-          />
-
-          <MultiSearchWidget
-            v-if="item.displayType =='MultiSearchBoxEditor'"
-            :info-window-no="item.infoWindowNo"
-            :field="item"
-            :field-value="item.fieldValue"
-            @valueChanged="tabValueChanged($event, item)"
-          />
-
-          <SearchWidget
-            v-if="item.displayType =='SearchBoxEditor'"
-            :where-clause="item.whereClause"
-            :info-window-no="item.infoWindowNo"
-            :field="item"
-            :field-value="item.fieldValue"
-            :display-name="item.listDisplayFieldNames"
-            :model-data="modelData"
-            @valueChanged="tabValueChanged($event, item)"
-          />
-
-          <VueMonthlyPicker
-            v-if="item.displayType =='YearMonthEditor'"
-            :value="item.fieldValue.displayValue[0]"
-            :allow-change-value="false"
-            date-format="YYYY-MM"
-            class="vue-monthly-picker m-date-fieldEditView"
-            @selected="changeValue(item, $event)"
-          />
-          <YearPicker
-            v-if="item.displayType =='YearEditor'"
-            :date-value="item.fieldValue.displayValue[0]"
-            @selected="changeValue(item, $event)"
-          />
+      <template v-for="item in processReportDtos.processReportParameters" :key="'processReportParameter-' + item.fieldName">
+        <div
+        
+          v-if="processReportDtos != undefined && processReportDtos.processReportParameters != undefined"
+        
+          class="form-group"
+        >
+          <label
+            v-if="item.displayType != 'ListBoxEnumEditor'"
+            class="m-label"
+            :for="'editor_' + item.id"
+          >{{ item.displayName }}</label>
+          <span
+            v-show="!item.mandatory"
+            style="color: red;"
+          >该项为必填项字段</span>
+
+          <div class="input-group">
+            <input
+              v-if="item.displayType =='TextEditor'"
+              :id="'editor_' + item.id"
+              v-model="item.fieldValue.displayValue[0]"
+              type="text"
+              class="form-control"
+              placeholder="请输入内容"
+              @change="valueChanged(item)"
+            />
+
+            <textarea
+              v-if="item.displayType =='TextAreaEditor'"
+              :id="'editor_' + item.id"
+              v-model="item.fieldValue.displayValue[0]"
+              rows="5"
+              type="text"
+              class="form-control"
+              placeholder="请输入内容"
+              @change="valueChanged(item)"
+            />
+
+            <input
+              v-if="item.displayType =='NumberEditor'"
+              :id="'editor_' + item.id"
+              v-model="item.fieldValue.displayValue[0]"
+              type="number"
+              class="form-control"
+              placeholder="请输入数字"
+              @change="valueChanged(item)"
+            />
+
+            <Switches
+              v-if="item.displayType =='CheckBoxEditor'"
+              v-model="item.fieldValue.displayValue[0]"
+              color="green"
+              type-bold="true"
+              @change="valueChanged(item)"
+            />
+
+            <DateTime
+              v-if="item.displayType =='DateTimeBoxEditor'"
+              :id="'editor_' + item.id"
+              :date-value="item.fieldValue.displayValue[0]"
+              class="form-control"
+              name="datetime"
+              @on-value-change="changeValue(item, $event)"
+            />
+
+            <EnumSelectWidget
+              v-if="item.displayType =='ListBoxEnumEditor'"
+              :key-values="item.keyValues"
+              :enum-value="item.fieldValue.displayValue[0]"
+              @value-changed="changeValue(item, $event)"
+            />
+
+            <MultiSearchWidget
+              v-if="item.displayType =='MultiSearchBoxEditor'"
+              :info-window-no="item.infoWindowNo"
+              :field="item"
+              :field-value="item.fieldValue"
+              @value-changed="tabValueChanged($event, item)"
+            />
+
+            <SearchWidget
+              v-if="item.displayType =='SearchBoxEditor'"
+              :where-clause="item.whereClause"
+              :info-window-no="item.infoWindowNo"
+              :field="item"
+              :field-value="item.fieldValue"
+              :display-name="item.listDisplayFieldNames"
+              :model-data="modelData"
+              @value-changed="tabValueChanged($event, item)"
+            />
+
+            <VueMonthlyPicker
+              v-if="item.displayType =='YearMonthEditor'"
+              :value="item.fieldValue.displayValue[0]"
+              :allow-change-value="false"
+              date-format="YYYY-MM"
+              class="vue-monthly-picker m-date-fieldEditView"
+              @selected="changeValue(item, $event)"
+            />
+            <YearPicker
+              v-if="item.displayType =='YearEditor'"
+              :date-value="item.fieldValue.displayValue[0]"
+              @selected="changeValue(item, $event)"
+            />
+          </div>
         </div>
-      </div>
+      </template>
     </div>
     <div>
       <div class="form-group">
@@ -142,17 +145,17 @@
 </template>
 
 <script>
-var Common = require('../../common/Common.js')
-var DateTime = require('../../datetime/src/DateTime.vue').default
-var YearPicker = require('../../year-picker/src/YearPicker.vue').default
-var MultiSearchWidget = require('./MultiSearchWidget.vue').default
-var Loading = require('../../loading/src/Loading.vue').default
-var ProcessReportResultPreview = require('./ProcessReportResultPreview.vue').default
-var SearchWidget = require('../../info/src/SearchWidget.vue').default
-var Switches = require('../../switches/src/Switches.vue').default
-var Navbar = require('../../navbar/src/Navbar.vue').default
-var VueMonthlyPicker = require('../../vue-monthly-picker/src/VueMonthlyPicker.vue').default
-var EnumSelectWidget = require('./EnumSelectWidget.vue').default
+var Common = require('../../common/Common.js');
+var DateTime = require('../../datetime/src/DateTime.vue').default;
+var YearPicker = require('../../year-picker/src/YearPicker.vue').default;
+var MultiSearchWidget = require('./MultiSearchWidget.vue').default;
+var Loading = require('../../loading/src/Loading.vue').default;
+var ProcessReportResultPreview = require('./ProcessReportResultPreview.vue').default;
+var SearchWidget = require('../../info/src/SearchWidget.vue').default;
+var Switches = require('../../switches/src/Switches.vue').default;
+var Navbar = require('../../navbar/src/Navbar.vue').default;
+var VueMonthlyPicker = require('../../vue-monthly-picker/src/VueMonthlyPicker.vue').default;
+var EnumSelectWidget = require('./EnumSelectWidget.vue').default;
 
 
 
@@ -170,7 +173,14 @@ export default {
     YearPicker,
     EnumSelectWidget,
   },
-  props: ['processReportDto'],
+  props: {
+    'processReportDto':{
+      type: Object,
+      default: null,
+    },
+  },
+
+  emits:['valueChanged'],
   data: function () {
     return {
       processReportId: '',
@@ -184,25 +194,25 @@ export default {
         },
       },
 
-    }
+    };
   },
 
   //监控processReportDto,当dto变化时重新渲染界面
   watch: {
-    'processReportDto': function (to, from) {
-      this.processReportResult.reportResults = undefined
-      this.initData(this.processReportDto)
+    'processReportDto': function (to, from) { // eslint-disable-line
+      this.processReportResult.reportResults = undefined;
+      this.initData(this.processReportDto);
     },
     'processReportDto.processReportParameters': function () {
-      this.initData(this.processReportDto)
+      this.initData(this.processReportDto);
     },
     $route: function () {
-      this.processReportResult = {}
+      this.processReportResult = {};
     },
   },
 
   mounted: function () {
-    this.initData(this.processReportDto)
+    this.initData(this.processReportDto);
   },
 
   methods: {
@@ -210,7 +220,7 @@ export default {
          * 打开帮助页面
          */
     openHtmlHelp: function (htmlHelpUrl) {
-      window.open(htmlHelpUrl)
+      window.open(htmlHelpUrl);
     },
 
     /**
@@ -219,18 +229,18 @@ export default {
          * @return {void}
          */
     initData: function (data) {
-      var _self = this
+      var _self = this;
       if (data == undefined) {
-        return
+        return;
       }
-      _self.processReportDtos = ''
+      _self.processReportDtos = '';
       if (data.processReportParameters) {
         data.processReportParameters.forEach(function (item) {
           if (item.mandatory == undefined) {
-            item.mandatory = true
+            item.mandatory = true;
           }
           if (item.listDisplayFieldName == undefined) {
-            item.listDisplayFieldName = item.listDisplayFieldNames
+            item.listDisplayFieldName = item.listDisplayFieldNames;
           }
 
           if (item.fieldValue == undefined) {
@@ -238,39 +248,39 @@ export default {
               id: '',
               displayValue: [],
               fieldType: 'String',
-            }
+            };
           }
 
           if (item.displayType == 'YearMonthEditor') {
-            item.fieldValue.displayValue[0] = moment().format('YYYY-MM')
+            item.fieldValue.displayValue[0] = moment().format('YYYY-MM');
           }
-          _self.modelData.data[item.fieldName] = item.fieldValue
-        })
+          _self.modelData.data[item.fieldName] = item.fieldValue;
+        });
       }
 
-      _self.processReportDtos = data
+      _self.processReportDtos = data;
     },
 
     /**
          * 判断参数是否填写
          */
     judgeDataFull: function () {
-      var _self = this
+      var _self = this;
 
-      _self.complete = true
+      _self.complete = true;
       if (
         _self.processReportDtos &&
                 _self.processReportDtos.processReportParameters
       ) {
         _self.processReportDtos.processReportParameters.forEach(
-          function (item, index) {
-            item.mandatory = true
+          function (item) {
+            item.mandatory = true;
             if (item.fieldValue.displayValue.length <= 0) {
-              item.mandatory = false
+              item.mandatory = false;
             }
-            _self.complete = _self.complete && item.mandatory
+            _self.complete = _self.complete && item.mandatory;
           },
-        )
+        );
       }
     },
 
@@ -279,47 +289,47 @@ export default {
          * @return {void}
          */
     subDatas: function () {
-      var _self = this
-      _self.judgeDataFull()
+      var _self = this;
+      _self.judgeDataFull();
 
       _self.processResultData = {
         processReportNo: _self.processReportDto.no,
         modelData: {
           data: {},
         },
-      }
+      };
 
       if (
         _self.processReportDtos &&
                 _self.processReportDtos.processReportParameters
       ) {
         _self.processReportDtos.processReportParameters.forEach(
-          function (item, index) {
-            var fieldName = item.fieldName
+          function (item) {
+            var fieldName = item.fieldName;
             _self.processResultData.modelData.data[fieldName] =
-                            item.fieldValue
+                            item.fieldValue;
           },
-        )
+        );
       }
 
-      _self.processReportResult = {}
+      _self.processReportResult = {};
       if (!_self.complete) {
-        return
+        return;
       }
-      _self.$refs.loading.show()
+      _self.$refs.loading.show();
 
       $.ajax({
         url: Common.getApiURL('ProcessReportResource/runProcess'),
         type: 'post',
         dataType: 'json',
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         contentType: 'application/json',
         data: JSON.stringify(_self.processResultData),
         success: function (data) {
-          _self.$refs.loading.hide()
-          _self.processReportResult = data
+          _self.$refs.loading.hide();
+          _self.processReportResult = data;
 
           if (
             _self.processReportResult.reportResults != undefined &&
@@ -327,25 +337,25 @@ export default {
           ) {
             _self.processReportResult.reportResults.forEach(
               function (item, index) {
-                _self.$set(item, 'previewIndex', 2)
+                _self.$set(item, 'previewIndex', 2);
                 if (index == 0) {
-                  _self.$set(item, 'showPreview', true)
+                  _self.$set(item, 'showPreview', true);
                 } else {
-                  _self.$set(item, 'showPreview', false)
+                  _self.$set(item, 'showPreview', false);
                 }
               },
-            )
+            );
           }
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.$refs.loading.hide()
+          _self.$refs.loading.hide();
           Common.processException(
             XMLHttpRequest,
             textStatus,
             errorThrown,
-          )
+          );
         },
-      })
+      });
     },
 
     /**
@@ -355,8 +365,8 @@ export default {
          * @return {void}
          */
     changeValue: function (item, newValue) {
-      this.$set(item.fieldValue.displayValue, 0, newValue)
-      this.valueChanged(item)
+      this.$set(item.fieldValue.displayValue, 0, newValue);
+      this.valueChanged(item);
 
     },
     /**
@@ -372,20 +382,20 @@ export default {
         item.fieldValue,
         'displayValue',
         newFieldValue.displayValue,
-      )
-      this.$set(item.fieldValue, 'id', newFieldValue.id)
-      this.$set(item.fieldValue, 'fieldType', newFieldValue.fieldType)
-      this.valueChanged(item)
+      );
+      this.$set(item.fieldValue, 'id', newFieldValue.id);
+      this.$set(item.fieldValue, 'fieldType', newFieldValue.fieldType);
+      this.valueChanged(item);
     },
     // 值改变事件
     valueChanged: function (processReportParameter) {
       // this.fieldValue = newFieldValue;
-      this.$emit('valueChanged', processReportParameter)
-      this.modelData.data[processReportParameter.fieldName] = processReportParameter.fieldValue
+      this.$emit('valueChanged', processReportParameter);
+      this.modelData.data[processReportParameter.fieldName] = processReportParameter.fieldValue;
     },
 
   },
-}
+};
 </script>
 <style scoped>
 .control-label {

+ 100 - 100
packages/process/src/api/ProcessReportResource.js

@@ -1,4 +1,4 @@
-const Common = require('../../../common/Common.js')
+const Common = require('../../../common/Common.js');
 
 /**
  * 工具类自动生成的API,请勿做任何修改,请勿做任何修改,请勿做任何修改(重要的事情说3遍)
@@ -13,7 +13,7 @@ export default {
 	 * 自动运行流程和报表
 	 */
   autoRun: function (processReportExecutorDto) {
-    const requestUrl = 'ProcessReportResource/autoRun'
+    const requestUrl = 'ProcessReportResource/autoRun';
 
     return new Promise((resolve, reject) => {
       $.ajax({
@@ -23,16 +23,16 @@ export default {
         data: JSON.stringify(processReportExecutorDto),
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -41,7 +41,7 @@ export default {
 	 * 格式化流程和报表
 	 */
   formatReportResult: function () {
-    const requestUrl = 'ProcessReportResource/formatReportResult'
+    const requestUrl = 'ProcessReportResource/formatReportResult';
 
     return new Promise((resolve, reject) => {
       $.ajax({
@@ -51,16 +51,16 @@ export default {
         dataType: 'json',
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -69,12 +69,12 @@ export default {
 	 * 根据流程和报表Id的归档权限 (该接口暂时只和登录的用户角色有关,以后可以扩展为根据processReportId来划分)
 	 */
   getArchiveAuthority: function (processReportNo) {
-    let requestUrl = 'ProcessReportResource/getArchiveAuthority'
-    let paramCount = 0
+    let requestUrl = 'ProcessReportResource/getArchiveAuthority';
+    let paramCount = 0;
     if (processReportNo != null) {
-      requestUrl += (paramCount > 0) ? '&' : '?'
-      requestUrl += ('processReportNo=' + processReportNo)
-      paramCount++
+      requestUrl += (paramCount > 0) ? '&' : '?';
+      requestUrl += ('processReportNo=' + processReportNo);
+      paramCount++;
     }
 
     return new Promise((resolve, reject) => {
@@ -83,16 +83,16 @@ export default {
         type: 'get',
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -101,7 +101,7 @@ export default {
 	 *
 	 */
   getProcessReportKeyValues: function () {
-    const requestUrl = 'ProcessReportResource/getProcessReportKeyValues'
+    const requestUrl = 'ProcessReportResource/getProcessReportKeyValues';
 
     return new Promise((resolve, reject) => {
       $.ajax({
@@ -111,16 +111,16 @@ export default {
         dataType: 'json',
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -129,9 +129,9 @@ export default {
 	 * 运行Callout
 	 */
   runCallout: function (no, modelData) {
-    let requestUrl = 'ProcessReportResource/runCallout/{no}'
+    let requestUrl = 'ProcessReportResource/runCallout/{no}';
     if (no != null) {
-      requestUrl = requestUrl.replace('{no}', no)
+      requestUrl = requestUrl.replace('{no}', no);
     }
 
     return new Promise((resolve, reject) => {
@@ -144,16 +144,16 @@ export default {
         data: JSON.stringify(modelData),
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -162,22 +162,22 @@ export default {
 	 * 运行超链接报表
 	 */
   runHyperLinkReport: function (jasperFileName, token, moduleNo) {
-    let requestUrl = 'ProcessReportResource/runHyperLinkReport'
-    let paramCount = 0
+    let requestUrl = 'ProcessReportResource/runHyperLinkReport';
+    let paramCount = 0;
     if (jasperFileName != null) {
-      requestUrl += (paramCount > 0) ? '&' : '?'
-      requestUrl += ('jasperFileName=' + jasperFileName)
-      paramCount++
+      requestUrl += (paramCount > 0) ? '&' : '?';
+      requestUrl += ('jasperFileName=' + jasperFileName);
+      paramCount++;
     }
     if (token != null) {
-      requestUrl += (paramCount > 0) ? '&' : '?'
-      requestUrl += ('token=' + token)
-      paramCount++
+      requestUrl += (paramCount > 0) ? '&' : '?';
+      requestUrl += ('token=' + token);
+      paramCount++;
     }
     if (moduleNo != null) {
-      requestUrl += (paramCount > 0) ? '&' : '?'
-      requestUrl += ('moduleNo=' + moduleNo)
-      paramCount++
+      requestUrl += (paramCount > 0) ? '&' : '?';
+      requestUrl += ('moduleNo=' + moduleNo);
+      paramCount++;
     }
 
     return new Promise((resolve, reject) => {
@@ -188,16 +188,16 @@ export default {
         dataType: 'octet-stream',
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -206,7 +206,7 @@ export default {
 	 * 运行流程
 	 */
   runProcess: function (processResultData) {
-    const requestUrl = 'ProcessReportResource/runProcess'
+    const requestUrl = 'ProcessReportResource/runProcess';
 
     return new Promise((resolve, reject) => {
       $.ajax({
@@ -218,16 +218,16 @@ export default {
         data: JSON.stringify(processResultData),
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -236,9 +236,9 @@ export default {
 	 * 运行流程
 	 */
   runProcessByIds: function (no, recordIds) {
-    let requestUrl = 'ProcessReportResource/runProcessByIds/{no}'
+    let requestUrl = 'ProcessReportResource/runProcessByIds/{no}';
     if (no != null) {
-      requestUrl = requestUrl.replace('{no}', no)
+      requestUrl = requestUrl.replace('{no}', no);
     }
 
     return new Promise((resolve, reject) => {
@@ -251,16 +251,16 @@ export default {
         data: JSON.stringify(recordIds),
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -269,7 +269,7 @@ export default {
 	 * 运行动态参数报表
 	 */
   runProcessDynamic: function (processResultData) {
-    const requestUrl = 'ProcessReportResource/runProcessDynamic'
+    const requestUrl = 'ProcessReportResource/runProcessDynamic';
 
     return new Promise((resolve, reject) => {
       $.ajax({
@@ -281,16 +281,16 @@ export default {
         data: JSON.stringify(processResultData),
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -299,9 +299,9 @@ export default {
 	 * 运行Callout
 	 */
   runProcessReportCallout: function (no, processReportDto) {
-    let requestUrl = 'ProcessReportResource/runProcessReportCallout/{no}'
+    let requestUrl = 'ProcessReportResource/runProcessReportCallout/{no}';
     if (no != null) {
-      requestUrl = requestUrl.replace('{no}', no)
+      requestUrl = requestUrl.replace('{no}', no);
     }
 
     return new Promise((resolve, reject) => {
@@ -314,16 +314,16 @@ export default {
         data: JSON.stringify(processReportDto),
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
 
   /**
@@ -332,12 +332,12 @@ export default {
 	 * 根据流程和报表Id获取流程和报表的定义
 	 */
   uniqueByNo: function (no) {
-    let requestUrl = 'ProcessReportResource/uniqueByNo'
-    let paramCount = 0
+    let requestUrl = 'ProcessReportResource/uniqueByNo';
+    let paramCount = 0;
     if (no != null) {
-      requestUrl += (paramCount > 0) ? '&' : '?'
-      requestUrl += ('no=' + no)
-      paramCount++
+      requestUrl += (paramCount > 0) ? '&' : '?';
+      requestUrl += ('no=' + no);
+      paramCount++;
     }
 
     return new Promise((resolve, reject) => {
@@ -348,15 +348,15 @@ export default {
         dataType: 'json',
 
         beforeSend: function (request) {
-          Common.addTokenToRequest(request)
+          Common.addTokenToRequest(request);
         },
         success: function (data) {
-          resolve(data)
+          resolve(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          reject(XMLHttpRequest)
+        error: function (XMLHttpRequest, textStatus, errorThrown) {   // eslint-disable-line
+          reject(XMLHttpRequest);
         },
-      })
-    })
+      });
+    });
   },
-}
+};

+ 4 - 4
packages/scanner/index.js

@@ -1,8 +1,8 @@
 
-import Scanner from './src/Scanner.vue'
+import Scanner from './src/Scanner.vue';
 
 Scanner.install = function(Vue) {
-  Vue.component(Scanner.name, Scanner)
-}
+  Vue.component(Scanner.name, Scanner);
+};
 
-export default Scanner
+export default Scanner;

+ 44 - 42
packages/scanner/src/Scanner.vue

@@ -42,72 +42,74 @@ export default {
   name: 'Scanner',  // eslint-disable-line
   components: {
   },
+
+  emits: ['upload'],
   data: function () {
     return {
       connected: false,
       base64Data: null,
-    }
+    };
   },
 
   mounted: function () {
-    this.init()
+    this.init();
   },
 
   beforeUnmount: function () {
-    var _self = this
+    var _self = this;
     if (_self.webSocket != null) {
-      _self.webSocket.close()
-      _self.webSocket = null
+      _self.webSocket.close();
+      _self.webSocket = null;
     }
   },
 
   methods: {
 
     addText: function (text) {
-      console.log(text)
+      console.log(text);
     },
 
 
     init: function () {
-      let _self = this
+      let _self = this;
       if (_self.webSocket != null) {
-        _self.webSocket.close()
-        _self.webSocket = null
+        _self.webSocket.close();
+        _self.webSocket = null;
       }
 
       // 打开一个 web socket
-      _self.webSocket = new WebSocket('ws://127.0.0.1:9005/scanner')
+      _self.webSocket = new WebSocket('ws://127.0.0.1:9005/scanner');
 
       _self.webSocket.onopen = function () {
-        _self.addText('连接成功。')
-        _self.connected = true
-      }
+        _self.addText('连接成功。');
+        _self.connected = true;
+      };
 
       _self.webSocket.onmessage = function (evt) {
-        console.log(evt.data)
-        var response = JSON.parse(evt.data)
+        console.log(evt.data);
+        var response = JSON.parse(evt.data);
         if (response.code == 2) {
-          var data = response.message
-          _self.showPdfFile(data)
+          var data = response.message;
+          _self.showPdfFile(data);
         } else if (response.code <= 1) {
-          _self.addText(response.message)
+          _self.addText(response.message);
         } else {
-          _self.addText(evt.data)
+          _self.addText(evt.data);
         }
-      }
+      };
 
       _self.webSocket.onclose = function () {
-        _self.addText('连接关闭。')
-        _self.connected = false
-      }
+        _self.addText('连接关闭。');
+        _self.connected = false;
+      };
 
       _self.webSocket.onerror = function (e) {
-        console.log(e)
-        _self.addText('连接异常,' + e + '。')
-        _self.connected = false
-      }
+        console.log(e);
+        _self.addText('连接异常,' + e + '。');
+        _self.connected = false;
+      };
 
-      _self.addText('开始连接。')
+      _self.addText('开始连接。');
     },
 
 
@@ -115,8 +117,8 @@ export default {
          * 扫描
          */
     acquire: function () {
-      let _self = this
-      _self.webSocket.send('{"code":1}')
+      let _self = this;
+      _self.webSocket.send('{"code":1}');
     },
 
     /**
@@ -124,9 +126,9 @@ export default {
          */
     showPdfFile: function (data) {
       if (data == null || data.length == 0) {
-        this.base64Data = null
+        this.base64Data = null;
       } else {
-        this.base64Data = 'data:application/pdf;base64,' + data
+        this.base64Data = 'data:application/pdf;base64,' + data;
       }
     },
 
@@ -139,18 +141,18 @@ export default {
           title: '错误',
           message: '请先扫描文件。',
           type: BootstrapDialog.TYPE_DANGER,
-        })
-        return
+        });
+        return;
       }
 
-      var timeStr = '扫描文件' + moment().format('_YYYYMMDD_hhmmss') + '.pdf'
-      let file = this.dataURLtoFile(this.base64Data, timeStr)
+      var timeStr = '扫描文件' + moment().format('_YYYYMMDD_hhmmss') + '.pdf';
+      let file = this.dataURLtoFile(this.base64Data, timeStr);
       let e = {
         target: {
           files: [file],
         },
-      }
-      this.$emit('upload', e)
+      };
+      this.$emit('upload', e);
     },
 
     /**
@@ -163,14 +165,14 @@ export default {
         mime = arr[0].match(/:(.*?);/)[1],
         bstr = atob(arr[1]),
         n = bstr.length,
-        u8arr = new Uint8Array(n)
+        u8arr = new Uint8Array(n);
       while (n--) {
-        u8arr[n] = bstr.charCodeAt(n)
+        u8arr[n] = bstr.charCodeAt(n);
       }
-      return new File([u8arr], fileName, { type: mime })
+      return new File([u8arr], fileName, { type: mime });
     },
   },
-}
+};
 
 </script>
 <style>

+ 4 - 4
packages/switches/index.js

@@ -1,8 +1,8 @@
 
-import Switches from './src/Switches.vue'
+import Switches from './src/Switches.vue';
 
 Switches.install = function(Vue) {
-  Vue.component(Switches.name, Switches)
-}
+  Vue.component(Switches.name, Switches);
+};
 
-export default Switches
+export default Switches;

+ 60 - 26
packages/switches/src/Switches.vue

@@ -32,27 +32,61 @@ export default {
 
 
 
-  props: [
-    'modelValue', // 选择状态, false
-    'disabled', // 禁用, false
-    'showText',   // 是否显示文字提示
-    'textTrueIn',  // True状态下的文字
-    'textFalseIn', // False状态下的文字
-    'color',    // 显示的颜色default,primary,success,info,warning,danger
-    'type-bold',    // 大图标
-  ],
+  props: {
+    // 选择状态, false
+    'modelValue':
+    {
+      type: Boolean,
+      default: false,
+    }, 
+    // 禁用, false
+    'disabled':
+    {
+      type: Boolean,
+      default: false,
+    }, 
+    // 是否显示文字提示
+    'showText':
+    {
+      type: Boolean,
+      default: false,
+    }, 
+    // True状态下的文字
+    'textTrueIn':
+    {
+      type: String,
+      default: '',
+    },  
+    // False状态下的文字
+    'textFalseIn':
+    {
+      type: String,
+      default: '',
+    }, 
+    // 显示的颜色default,primary,success,info,warning,danger
+    'color':
+    {
+      type: String,
+      default: '',
+    }, 
+    // 大图标
+    'typeBold':{
+      type: Boolean,
+      default: false,
+    },
+  },
 
   emits: ['update:modelValue'],
 
   data: function () {
-    var tempValue = false
-    var colors = 'red'
+    var tempValue = false;
+    var colors = 'red';
     if (this.modelValue != undefined) {
-      tempValue = (this.modelValue == 'true' || this.modelValue == true)
+      tempValue = (this.modelValue == 'true' || this.modelValue == true);
       if (this.modelValue == 'true' || this.modelValue == true) {
-        colors = 'green'
+        colors = 'green';
       } else {
-        colors = 'red'
+        colors = 'red';
       }
     }
 
@@ -62,12 +96,12 @@ export default {
       'textFalse': (this.textFalseIn == undefined) ? '否' : this.textFalseIn,
       'theme': 'default',
       'colorCss': colors,
-    }
+    };
   },
 
   computed: {
     classObject: function () {
-      var _self = this
+      var _self = this;
 
       return {
         'vue-switcher': true,
@@ -77,21 +111,21 @@ export default {
         ['vue-switcher--bold--unchecked']: !!_self.typeBold && !_self.value,
         [`vue-switcher-theme--${_self.theme}`]: _self.theme,
         [`vue-switcher-color--${_self.colorCss}`]: _self.colorCss,
-      }
+      };
     },
   },
   watch: {
     value: function (val, oldVal) {   // eslint-disable-line
-      this.$emit('update:modelValue', val)
+      this.$emit('update:modelValue', val);
     },
 
     modelValue: function (val, oldVal) {    // eslint-disable-line
       if (val != undefined) {
-        this.value = (val == 'true' || val == true)
+        this.value = (val == 'true' || val == true);
         if (val == 'true' || val == true) {
-          this.colorCss = 'green'
+          this.colorCss = 'green';
         } else {
-          this.colorCss = 'red'
+          this.colorCss = 'red';
         }
       }
 
@@ -99,15 +133,15 @@ export default {
   },
   methods: {
     clickEvent: function (e) {
-      var clientX = e.clientX
-      var elm = $(e.target)
-      var left = elm.offset().left
+      var clientX = e.clientX;
+      var elm = $(e.target);
+      var left = elm.offset().left;
       if (clientX - left > 50) {
-        e.preventDefault()
+        e.preventDefault();
       }
     },
   },
-}
+};
 </script>
 
 <style>

+ 4 - 4
packages/time/index.js

@@ -1,8 +1,8 @@
 
-import Time from './src/Time.vue'
+import Time from './src/Time.vue';
 
 Time.install = function(Vue) {
-  Vue.component(Time.name, Time)
-}
+  Vue.component(Time.name, Time);
+};
 
-export default Time
+export default Time;

+ 26 - 16
packages/time/src/Time.vue

@@ -5,26 +5,36 @@
 <script>
 
 export default {
+  // eslint-disable-next-line
   name: 'Time',
 
-  props:[
-    'modelValue',
-    'readonly',
-  ],
+  props:{
+    'modelValue':
+    {
+      type: String,
+      default: '',
+    }, 
+    'readonly':{
+      type: Boolean,
+      default: false,
+    },
+  },
+
+  emits: ['update:modelValue', 'on-value-change'],
 
   data: function(){
     return{
       innerValue : '',
-    }
+    };
   },
 
   watch:{
     modelValue: {
       handler(newValue, oldValue){    // eslint-disable-line
         if(newValue != null && newValue != ''){
-          this.innerValue = this.getTimeValue(newValue)
+          this.innerValue = this.getTimeValue(newValue);
         }else{
-          this.innerValue = newValue
+          this.innerValue = newValue;
         }
       },
       immediate: true,
@@ -33,26 +43,26 @@ export default {
 
     innerValue: function(newValue, oldValue){  // eslint-disable-line
       // 向外部发送事件通知
-      let newValue1 = ''
+      let newValue1 = '';
       if(newValue == null || newValue == ''){
-        newValue1 = newValue
+        newValue1 = newValue;
       }else{
-        newValue1 = newValue + ':00'
+        newValue1 = newValue + ':00';
       }
-      console.log('time has been changed:', newValue1)
-      this.$emit('update:modelValue', newValue1)
-      this.$emit('on-value-change', newValue1)
+      console.log('time has been changed:', newValue1);
+      this.$emit('update:modelValue', newValue1);
+      this.$emit('on-value-change', newValue1);
     },
   },
 
   methods: {
     getTimeValue: function(value){
       if(value != null && value.length == 8){
-        return value.substring(0, 5)
+        return value.substring(0, 5);
       }else{
-        return value
+        return value;
       }
     },
   },
-}
+};
 </script>

+ 4 - 4
packages/tree/index.js

@@ -1,8 +1,8 @@
 
-import TreeViewNode from './src/TreeViewNode.vue'
+import TreeViewNode from './src/TreeViewNode.vue';
 
 TreeViewNode.install = function(Vue) {
-  Vue.component(TreeViewNode.name, TreeViewNode)
-}
+  Vue.component(TreeViewNode.name, TreeViewNode);
+};
 
-export default TreeViewNode
+export default TreeViewNode;

+ 39 - 17
packages/tree/src/TreeViewNode.vue

@@ -19,14 +19,18 @@
 
       <font>{{ node.text }}</font>
 
-      <TreeViewNode
+      <template
         v-for="childrenNode in node.childrenDatas"
-        v-if="node.open && node.childrenDatas != undefined && node.childrenDatas.length > 0"
-        :node="childrenNode"
-        :is-show-check="childrenNode.isShowCheck"
-        @nodeExpand="nodeExpand"
-        @nodeSelect="nodeSelect"
-      />
+        :key="childrenNode.id"
+      >
+        <TreeViewNode
+          v-if="node.open && node.childrenDatas != undefined && node.childrenDatas.length > 0"
+          :node="childrenNode"
+          :is-show-check="childrenNode.isShowCheck"
+          @node-expand="nodeExpand"
+          @node-select="nodeSelect"
+        />
+      </template>
     </li>
   </ul>
 </template>
@@ -38,21 +42,38 @@ export default {
   components: {
 
   },
-  props: ['node', 'isShowCheck', 'isRoot'],
+
+  props: {
+    'node': {
+      type: Object,
+      default: null,
+    },
+    'isShowCheck': {
+      type: Boolean,
+      default: false,
+    },
+    'isRoot': {
+      type: Boolean,
+      default: false,
+    },
+  },
+
+  emits: ['nodeExpand','nodeSelect'],
+
   data: function () {
     return {
-    }
+    };
   },
 
   computed: {
     // 节点是否打开
     isNodeOpen: function () {
       if (this.node.childrenDatas == undefined || this.node.childrenDatas.length == 0) {
-        console.log(this.node.text + '无子节点')
-        return undefined
+        console.log(this.node.text + '无子节点');
+        return undefined;
       } else {
-        console.log(this.node.text + '有子节点' + this.node.open)
-        return this.node.open == true
+        console.log(this.node.text + '有子节点' + this.node.open);
+        return this.node.open == true;
       }
 
     },
@@ -64,20 +85,21 @@ export default {
   methods: {
     nodeExpand: function (node) {
       if (node === this.node) {
-        this.node.open = !this.node.open
+        // eslint-disable-next-line
+                this.node.open = !this.node.open;
       }
       // 触发父组件的事件
       // if(node.open){
-      this.$emit('nodeExpand', node)
+      this.$emit('nodeExpand', node);
       // }
     },
 
     nodeSelect: function (node) {
-      this.$emit('nodeSelect', node)
+      this.$emit('nodeSelect', node);
     },
 
   },
-}
+};
 </script>
 
 <style scoped>

+ 4 - 4
packages/upload-widget/index.js

@@ -1,8 +1,8 @@
 
-import UploadWidget from './src/UploadWidget.vue'
+import UploadWidget from './src/UploadWidget.vue';
 
 UploadWidget.install = function(Vue) {
-  Vue.component(UploadWidget.name, UploadWidget)
-}
+  Vue.component(UploadWidget.name, UploadWidget);
+};
 
-export default UploadWidget
+export default UploadWidget;

+ 14 - 8
packages/upload-widget/src/UploadWidget.vue

@@ -28,21 +28,27 @@ export default {
   /**
 	 * fileType: 上传文件类型,eg:".xls,.doc,.txt,.pdf"
 	 */
-  props: ['fileType'],
+  props: {
+    'fileType': {
+      type: String,
+      default: '',
+    },
+  },
+
+  emits: [ 'upload' ],
 
   data: function () {
     return {
 
-    }
+    };
   },
-
   methods: {
     /**
      * 点击上传按钮事件
      * @return {[type]} [description]
      */
     clickButton: function () {
-      $(this.$refs.fileInput).click()
+      $(this.$refs.fileInput).click();
     },
 
     /**
@@ -50,13 +56,13 @@ export default {
      * @return {[type]} [description]
      */
     onFileChange: function (e) {
-      var files = e.target.files || e.dataTransfer.files
+      var files = e.target.files || e.dataTransfer.files;
       if (!files.length)
-        return
-      this.$emit('upload', files)
+        return;
+      this.$emit('upload', files);
     },
   },
-}
+};
 </script>
 
 

+ 4 - 4
packages/vue-bootstrap-pagination/index.js

@@ -1,8 +1,8 @@
 
-import VueBootstrapPagination from './src/vue-bootstrap-pagination.vue'
+import VueBootstrapPagination from './src/vue-bootstrap-pagination.vue';
 
 VueBootstrapPagination.install = function(Vue) {
-  Vue.component(VueBootstrapPagination.name, VueBootstrapPagination)
-}
+  Vue.component(VueBootstrapPagination.name, VueBootstrapPagination);
+};
 
-export default VueBootstrapPagination
+export default VueBootstrapPagination;

+ 24 - 21
packages/vue-bootstrap-pagination/src/vue-bootstrap-pagination.vue

@@ -11,7 +11,7 @@
         </a>
       </li>
 
-      <li v-for="num in array" :class="{ 'active' : num === pagination.current_page }">
+      <li v-for="num in array" :key="'pagination-' + num" :class="{ 'active' : num === pagination.current_page }">
         <a href="#" @click.prevent="changePage(num)">{{ num }}</a>
       </li>
 
@@ -42,30 +42,32 @@ export default {
     },
     options: {
       type: Object,
+      default: null,
     },
     size: {
       type: String,
+      default: null,
     },
   },
   computed: {
     array() {
       if (this.pagination.last_page <= 0) {
-        return []
+        return [];
       }
-      let from = this.pagination.current_page - this.config.offset
+      let from = this.pagination.current_page - this.config.offset;
       if (from < 1) {
-        from = 1
+        from = 1;
       }
-      let to = from + (this.config.offset * 2)
+      let to = from + (this.config.offset * 2);
       if (to >= this.pagination.last_page) {
-        to = this.pagination.last_page
+        to = this.pagination.last_page;
       }
-      const arr = []
+      const arr = [];
       while (from <= to) {
-        arr.push(from)
-        from += 1
+        arr.push(from);
+        from += 1;
       }
-      return arr
+      return arr;
     },
     config() {
       return Object.assign({
@@ -75,39 +77,40 @@ export default {
         previousText: '«',
         nextText: '»',
         alwaysShowPrevNext: false,
-      }, this.options)
+      }, this.options);
     },
     sizeClass() {
       if (this.size === 'large') {
-        return 'pagination-lg'
+        return 'pagination-lg';
       } else if (this.size === 'small') {
-        return 'pagination-sm'
+        return 'pagination-sm';
       }
-      return ''
+      return '';
     },
   },
   watch: {
     'pagination.per_page'(newVal, oldVal) { // eslint-disable-line
       if (+newVal !== +oldVal) {
-        this.callback()
+        this.callback();
       }
     },
   },
   methods: {
     showPrevious() {
-      return this.config.alwaysShowPrevNext || this.pagination.current_page > 1
+      return this.config.alwaysShowPrevNext || this.pagination.current_page > 1;
     },
     showNext() {
       return this.config.alwaysShowPrevNext ||
-          this.pagination.current_page < this.pagination.last_page
+          this.pagination.current_page < this.pagination.last_page;
     },
     changePage(page) {
       if (this.pagination.current_page === page) {
-        return
+        return;
       }
-      this.pagination.current_page = page
-      this.callback()
+      // eslint-disable-next-line
+      this.pagination.current_page = page;
+      this.callback();
     },
   },
-}
+};
 </script>

+ 190 - 177
packages/vue-datepicker/src/vue-datepicker.vue

@@ -68,7 +68,8 @@
               class="day"
               track-by="$index"
               :class="{'checked':day.checked,'unavailable':day.unavailable,'passive-day': !(day.inMonth)}"
-              :style="day.checked ? (option.color && option.color.checkedDay ? { background: option.color.checkedDay } : { background: '#F50057' }) : {}"
+              :style="day.checked ? 
+                (option.color && option.color.checkedDay ? { background: option.color.checkedDay } : { background: '#F50057' }) : {}"
               @click="checkDay(day)"
             >
               {{ day.value }}
@@ -154,17 +155,17 @@
   </div>
 </template>
 <script>
-'use strict'
+'use strict';
 
 Object.defineProperty(exports, '__esModule', {
   value: true,
-})
+});
 
-var _moment = require('moment')
+var _moment = require('moment');
 
-var _moment2 = _interopRequireDefault(_moment)
+var _moment2 = _interopRequireDefault(_moment);
 
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj } }
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 exports.default = {
   name: 'vue-datepicker',
@@ -185,7 +186,9 @@ exports.default = {
           type: 'day',
           SundayFirst: false,
           week: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
-          month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+          month: ['January', 'February', 'March', 'April', 'May'
+            , 'June', 'July', 'August', 'September', 'October'
+            , 'November', 'December'],
           format: 'YYYY-MM-DD',
           color: {
             checked: '#F50057',
@@ -209,40 +212,40 @@ exports.default = {
           },
           overlayOpacity: 0.5,
           dismissible: true,
-        }
+        };
       },
     },
     limit: {
       type: Array,
       default: function _default() {
-        return []
+        return [];
       },
     },
   },
   data: function data() {
     function hours() {
-      var list = []
-      var hour = 24
+      var list = [];
+      var hour = 24;
       while (hour > 0) {
-        hour--
+        hour--;
         list.push({
           checked: false,
           value: hour < 10 ? '0' + hour : hour,
-        })
+        });
       }
-      return list
+      return list;
     }
     function mins() {
-      var list = []
-      var min = 60
+      var list = [];
+      var min = 60;
       while (min > 0) {
-        min--
+        min--;
         list.push({
           checked: false,
           value: min < 10 ? '0' + min : min,
-        })
+        });
       }
-      return list
+      return list;
     }
     return {
       hours: hours(),
@@ -273,41 +276,43 @@ exports.default = {
       },
       dayList: [],
       selectedDays: [],
-    }
+    };
   },
 
   methods: {
     pad: function pad(n) {
-      n = Math.floor(n)
-      return n < 10 ? '0' + n : n
+      n = Math.floor(n);
+      return n < 10 ? '0' + n : n;
     },
     nextMonth: function nextMonth(type) {
-      var next = null
-      type === 'next' ? next = (0, _moment2.default)(this.checked.currentMoment).add(1, 'M') : next = (0, _moment2.default)(this.checked.currentMoment).add(-1, 'M')
-      this.showDay(next)
+      var next = null;
+      type === 'next' 
+        ? next = (0, _moment2.default)(this.checked.currentMoment).add(1, 'M') 
+        : next = (0, _moment2.default)(this.checked.currentMoment).add(-1, 'M');
+      this.showDay(next);
     },
     showDay: function showDay(time) {
       if (time === undefined || !Date.parse(time)) {
-        this.checked.currentMoment = (0, _moment2.default)()
+        this.checked.currentMoment = (0, _moment2.default)();
       } else {
-        this.checked.currentMoment = (0, _moment2.default)(time, this.option.format)
+        this.checked.currentMoment = (0, _moment2.default)(time, this.option.format);
       }
-      this.showOne('day')
-      this.checked.year = (0, _moment2.default)(this.checked.currentMoment).format('YYYY')
-      this.checked.month = (0, _moment2.default)(this.checked.currentMoment).format('MM')
-      this.checked.day = (0, _moment2.default)(this.checked.currentMoment).format('DD')
-      this.displayInfo.month = this.library.month[(0, _moment2.default)(this.checked.currentMoment).month()]
-      var days = []
-      var currentMoment = this.checked.currentMoment
-      var firstDay = (0, _moment2.default)(currentMoment).date(1).day()
+      this.showOne('day');
+      this.checked.year = (0, _moment2.default)(this.checked.currentMoment).format('YYYY');
+      this.checked.month = (0, _moment2.default)(this.checked.currentMoment).format('MM');
+      this.checked.day = (0, _moment2.default)(this.checked.currentMoment).format('DD');
+      this.displayInfo.month = this.library.month[(0, _moment2.default)(this.checked.currentMoment).month()];
+      var days = [];
+      var currentMoment = this.checked.currentMoment;
+      var firstDay = (0, _moment2.default)(currentMoment).date(1).day();
       // gettting previous and next month
       // let currentMonth = moment(currentMoment)
-      var previousMonth = (0, _moment2.default)(currentMoment)
-      var nextMonth = (0, _moment2.default)(currentMoment)
-      nextMonth.add(1, 'months')
-      previousMonth.subtract(1, 'months')
-      var monthDays = (0, _moment2.default)(currentMoment).daysInMonth()
-      var oldtime = this.checked.oldtime
+      var previousMonth = (0, _moment2.default)(currentMoment);
+      var nextMonth = (0, _moment2.default)(currentMoment);
+      nextMonth.add(1, 'months');
+      previousMonth.subtract(1, 'months');
+      var monthDays = (0, _moment2.default)(currentMoment).daysInMonth();
+      var oldtime = this.checked.oldtime;
       for (var i = 1; i <= monthDays; ++i) {
         days.push({
           value: i,
@@ -315,13 +320,15 @@ exports.default = {
           unavailable: false,
           checked: false,
           moment: (0, _moment2.default)(currentMoment).date(i),
-        })
-        if (i === Math.ceil((0, _moment2.default)(currentMoment).format('D')) && (0, _moment2.default)(oldtime, this.option.format).year() === (0, _moment2.default)(currentMoment).year() && (0, _moment2.default)(oldtime, this.option.format).month() === (0, _moment2.default)(currentMoment).month()) {
-          days[i - 1].checked = true
+        });
+        if (i === Math.ceil((0, _moment2.default)(currentMoment).format('D')) 
+            && (0, _moment2.default)(oldtime, this.option.format).year() === (0, _moment2.default)(currentMoment).year() 
+            && (0, _moment2.default)(oldtime, this.option.format).month() === (0, _moment2.default)(currentMoment).month()) {
+          days[i - 1].checked = true;
         }
-        this.checkBySelectDays(i, days)
+        this.checkBySelectDays(i, days);
       }
-      if (firstDay === 0) firstDay = 7
+      if (firstDay === 0) firstDay = 7;
       for (var _i = 0; _i < firstDay - (this.option.SundayFirst ? 0 : 1); _i++) {
         var passiveDay = {
           value: previousMonth.daysInMonth() - _i,
@@ -330,43 +337,46 @@ exports.default = {
           unavailable: false,
           checked: false,
           moment: (0, _moment2.default)(currentMoment).date(1).subtract(_i + 1, 'days'),
-        }
-        days.unshift(passiveDay)
+        };
+        days.unshift(passiveDay);
       }
       if (this.limit.length > 0) {
-        var _iteratorNormalCompletion = true
-        var _didIteratorError = false
-        var _iteratorError = undefined
+        var _iteratorNormalCompletion = true;
+        var _didIteratorError = false;
+        var _iteratorError = undefined;
 
         try {
-          for (var _iterator = this.limit[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
-            var li = _step.value
+          for (var _iterator = this.limit[Symbol.iterator](), _step; 
+            !(_iteratorNormalCompletion = (_step = _iterator.next()).done);
+            _iteratorNormalCompletion = true) {
+            var li = _step.value;
 
             switch (li.type) {
             case 'fromto':
-              days = this.limitFromTo(li, days)
-              break
+              days = this.limitFromTo(li, days);
+              break;
             case 'weekday':
-              days = this.limitWeekDay(li, days)
-              break
+              days = this.limitWeekDay(li, days);
+              break;
             }
           }
         } catch (err) {
-          _didIteratorError = true
-          _iteratorError = err
+          _didIteratorError = true;
+          _iteratorError = err;
         } finally {
           try {
             if (!_iteratorNormalCompletion && _iterator.return) {
-              _iterator.return()
+              _iterator.return();
             }
           } finally {
             if (_didIteratorError) {
-              throw _iteratorError
+              // eslint-disable-next-line
+              throw _iteratorError;
             }
           }
         }
       }
-      var passiveDaysAtFinal = 42 - days.length
+      var passiveDaysAtFinal = 42 - days.length;
       for (var _i2 = 1; _i2 <= passiveDaysAtFinal; _i2++) {
         var _passiveDay = {
           value: _i2,
@@ -375,227 +385,230 @@ exports.default = {
           unavailable: false,
           checked: false,
           moment: (0, _moment2.default)(currentMoment).add(1, 'months').date(_i2),
-        }
-        days.push(_passiveDay)
+        };
+        days.push(_passiveDay);
       }
-      this.dayList = days
+      this.dayList = days;
     },
     checkBySelectDays: function checkBySelectDays(d, days) {
-      var _this = this
+      var _this = this;
 
       this.selectedDays.forEach(function (day) {
-        if (_this.checked.year === (0, _moment2.default)(day).format('YYYY') && _this.checked.month === (0, _moment2.default)(day).format('MM') && d === Math.ceil((0, _moment2.default)(day).format('D'))) {
-          days[d - 1].checked = true
+        if (_this.checked.year === 
+              (0, _moment2.default)(day).format('YYYY') && _this.checked.month === (0, _moment2.default)(day).format('MM') && d === Math.ceil((0, _moment2.default)(day).format('D'))) {
+          days[d - 1].checked = true;
         }
-      })
+      });
     },
     limitWeekDay: function limitWeekDay(limit, days) {
       days.map(function (day) {
         if (limit.available.indexOf(Math.floor(day.moment.format('d'))) === -1) {
-          day.unavailable = true
+          day.unavailable = true;
         }
-      })
-      return days
+      });
+      return days;
     },
     limitFromTo: function limitFromTo(limit, days) {
-      var _this2 = this
+      var _this2 = this;
 
       if (limit.from || limit.to) {
         days.map(function (day) {
           if (_this2.getLimitCondition(limit, day)) {
-            day.unavailable = true
+            day.unavailable = true;
           }
-        })
+        });
       }
-      return days
+      return days;
     },
     getLimitCondition: function getLimitCondition(limit, day) {
-      var tmpMoment = (0, _moment2.default)(this.checked.year + '-' + this.pad(this.checked.month) + '-' + this.pad(day.value))
+      var tmpMoment = (0, _moment2.default)(this.checked.year + '-' + this.pad(this.checked.month) + '-' + this.pad(day.value));
       if (limit.from && !limit.to) {
-        return !tmpMoment.isAfter(limit.from)
+        return !tmpMoment.isAfter(limit.from);
       } else if (!limit.from && limit.to) {
-        return !tmpMoment.isBefore(limit.to)
+        return !tmpMoment.isBefore(limit.to);
       } else {
-        return !tmpMoment.isBetween(limit.from, limit.to)
+        return !tmpMoment.isBetween(limit.from, limit.to);
       }
     },
     checkDay: function checkDay(obj) {
       if (obj.unavailable || obj.value === '') {
-        return false
+        return false;
       }
       if (!obj.inMonth) {
-        this.nextMonth(obj.action)
+        this.nextMonth(obj.action);
       }
       if (this.option.type === 'day' || this.option.type === 'min') {
         this.dayList.forEach(function (x) {
-          x.checked = false
-        })
-        this.checked.day = this.pad(obj.value)
-        obj.checked = true
+          x.checked = false;
+        });
+        this.checked.day = this.pad(obj.value);
+        obj.checked = true;
       } else {
-        var day = this.pad(obj.value)
-        var ctime = this.checked.year + '-' + this.checked.month + '-' + day
+        var day = this.pad(obj.value);
+        var ctime = this.checked.year + '-' + this.checked.month + '-' + day;
         if (obj.checked === true) {
-          obj.checked = false
-          this.selectedDays.$remove(ctime)
+          obj.checked = false;
+          this.selectedDays.$remove(ctime);
         } else {
-          this.selectedDays.push(ctime)
-          obj.checked = true
+          this.selectedDays.push(ctime);
+          obj.checked = true;
         }
       }
       switch (this.option.type) {
       case 'day':
-        this.picked()
-        break
+        this.picked();
+        break;
       case 'min':
-        this.showOne('hour')
+        this.showOne('hour');
         // shift activated time items to visible position.
-        this.shiftActTime()
-        break
+        this.shiftActTime();
+        break;
       }
     },
     showYear: function showYear() {
-      var _this3 = this
+      var _this3 = this;
 
-      var year = (0, _moment2.default)(this.checked.currentMoment).year()
-      this.library.year = []
-      var yearTmp = []
+      var year = (0, _moment2.default)(this.checked.currentMoment).year();
+      this.library.year = [];
+      var yearTmp = [];
       for (var i = year - 100; i < year + 5; ++i) {
-        yearTmp.push(i)
+        yearTmp.push(i);
       }
-      this.library.year = yearTmp
-      this.showOne('year')
+      this.library.year = yearTmp;
+      this.showOne('year');
       this.$nextTick(function () {
-        var listDom = document.getElementById('yearList')
-        listDom.scrollTop = listDom.scrollHeight - 100
-        _this3.addYear()
-      })
+        var listDom = document.getElementById('yearList');
+        listDom.scrollTop = listDom.scrollHeight - 100;
+        _this3.addYear();
+      });
     },
     showOne: function showOne(type) {
       switch (type) {
       case 'year':
-        this.showInfo.hour = false
-        this.showInfo.day = false
-        this.showInfo.year = true
-        this.showInfo.month = false
-        break
+        this.showInfo.hour = false;
+        this.showInfo.day = false;
+        this.showInfo.year = true;
+        this.showInfo.month = false;
+        break;
       case 'month':
-        this.showInfo.hour = false
-        this.showInfo.day = false
-        this.showInfo.year = false
-        this.showInfo.month = true
-        break
+        this.showInfo.hour = false;
+        this.showInfo.day = false;
+        this.showInfo.year = false;
+        this.showInfo.month = true;
+        break;
       case 'day':
-        this.showInfo.hour = false
-        this.showInfo.day = true
-        this.showInfo.year = false
-        this.showInfo.month = false
-        break
+        this.showInfo.hour = false;
+        this.showInfo.day = true;
+        this.showInfo.year = false;
+        this.showInfo.month = false;
+        break;
       case 'hour':
-        this.showInfo.hour = true
-        this.showInfo.day = false
-        this.showInfo.year = false
-        this.showInfo.month = false
-        break
+        this.showInfo.hour = true;
+        this.showInfo.day = false;
+        this.showInfo.year = false;
+        this.showInfo.month = false;
+        break;
       default:
-        this.showInfo.day = true
-        this.showInfo.year = false
-        this.showInfo.month = false
-        this.showInfo.hour = false
+        this.showInfo.day = true;
+        this.showInfo.year = false;
+        this.showInfo.month = false;
+        this.showInfo.hour = false;
       }
     },
     showMonth: function showMonth() {
-      this.showOne('month')
+      this.showOne('month');
     },
     addYear: function addYear() {
-      var _this4 = this
+      var _this4 = this;
 
-      var listDom = document.getElementById('yearList')
+      var listDom = document.getElementById('yearList');
+      // eslint-disable-next-line
       listDom.addEventListener('scroll', function (e) {
         if (listDom.scrollTop < listDom.scrollHeight - 100) {
-          var len = _this4.library.year.length
-          var lastYear = _this4.library.year[len - 1]
-          _this4.library.year.push(lastYear + 1)
+          var len = _this4.library.year.length;
+          var lastYear = _this4.library.year[len - 1];
+          _this4.library.year.push(lastYear + 1);
         }
-      }, false)
+      }, false);
     },
     setYear: function setYear(year) {
-      this.checked.currentMoment = (0, _moment2.default)(year + '-' + this.checked.month + '-' + this.checked.day)
-      this.showDay(this.checked.currentMoment)
+      this.checked.currentMoment = (0, _moment2.default)(year + '-' + this.checked.month + '-' + this.checked.day);
+      this.showDay(this.checked.currentMoment);
     },
     setMonth: function setMonth(month) {
-      var mo = this.library.month.indexOf(month) + 1
+      var mo = this.library.month.indexOf(month) + 1;
       if (mo < 10) {
-        mo = '0' + '' + mo
+        mo = '0' + '' + mo;
       }
-      this.checked.currentMoment = (0, _moment2.default)(this.checked.year + '-' + mo + '-' + this.checked.day)
-      this.showDay(this.checked.currentMoment)
+      this.checked.currentMoment = (0, _moment2.default)(this.checked.year + '-' + mo + '-' + this.checked.day);
+      this.showDay(this.checked.currentMoment);
     },
     showCheck: function showCheck() {
       if (this.date.time === '') {
-        this.showDay()
+        this.showDay();
       } else {
         if (this.option.type === 'day' || this.option.type === 'min') {
-          this.checked.oldtime = this.date.time
-          this.showDay(this.date.time)
+          this.checked.oldtime = this.date.time;
+          this.showDay(this.date.time);
         } else {
-          this.selectedDays = JSON.parse(this.date.time)
+          this.selectedDays = JSON.parse(this.date.time);
           if (this.selectedDays.length) {
-            this.checked.oldtime = this.selectedDays[0]
-            this.showDay(this.selectedDays[0])
+            this.checked.oldtime = this.selectedDays[0];
+            this.showDay(this.selectedDays[0]);
           } else {
-            this.showDay()
+            this.showDay();
           }
         }
       }
-      this.showInfo.check = true
+      this.showInfo.check = true;
     },
     setTime: function setTime(type, obj, list) {
-      var _iteratorNormalCompletion2 = true
-      var _didIteratorError2 = false
-      var _iteratorError2 = undefined
+      var _iteratorNormalCompletion2 = true;
+      var _didIteratorError2 = false;
+      var _iteratorError2 = undefined;
 
       try {
         for (var _iterator2 = list[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
-          var item = _step2.value
+          var item = _step2.value;
 
-          item.checked = false
+          item.checked = false;
           if (item.value === obj.value) {
-            item.checked = true
-            this.checked[type] = item.value
+            item.checked = true;
+            this.checked[type] = item.value;
           }
         }
       } catch (err) {
-        _didIteratorError2 = true
-        _iteratorError2 = err
+        _didIteratorError2 = true;
+        _iteratorError2 = err;
       } finally {
         try {
           if (!_iteratorNormalCompletion2 && _iterator2.return) {
-            _iterator2.return()
+            _iterator2.return();
           }
         } finally {
           if (_didIteratorError2) {
-            throw _iteratorError2
+            // eslint-disable-next-line
+            throw _iteratorError2;
           }
         }
       }
     },
     picked: function picked() {
       if (this.option.type === 'day' || this.option.type === 'min') {
-        var ctime = this.checked.year + '-' + this.checked.month + '-' + this.checked.day + ' ' + this.checked.hour + ':' + this.checked.min
-        this.checked.currentMoment = (0, _moment2.default)(ctime, 'YYYY-MM-DD HH:mm')
-        this.date.time = (0, _moment2.default)(this.checked.currentMoment).format(this.option.format)
+        var ctime = this.checked.year + '-' + this.checked.month + '-' + this.checked.day + ' ' + this.checked.hour + ':' + this.checked.min;
+        this.checked.currentMoment = (0, _moment2.default)(ctime, 'YYYY-MM-DD HH:mm');
+        this.date.time = (0, _moment2.default)(this.checked.currentMoment).format(this.option.format);
       } else {
-        this.date.time = JSON.stringify(this.selectedDays)
+        this.date.time = JSON.stringify(this.selectedDays);
       }
-      this.showInfo.check = false
-      this.$emit('change', this.date.time)
+      this.showInfo.check = false;
+      this.$emit('change', this.date.time);
     },
     dismiss: function dismiss(evt) {
       if (evt.target.className === 'datepicker-overlay') {
         if (this.option.dismissible === undefined || this.option.dismissible) {
-          this.showInfo.check = false
-          this.$emit('cancel')
+          this.showInfo.check = false;
+          this.$emit('cancel');
         }
       }
     },
@@ -603,14 +616,14 @@ exports.default = {
       // shift activated time items to visible position.
       this.$nextTick(function () {
         if (!document.querySelector('.hour-item.active')) {
-          return false
+          return false;
         }
-        document.querySelector('.hour-box').scrollTop = (document.querySelector('.hour-item.active').offsetTop || 0) - 250
-        document.querySelector('.min-box').scrollTop = (document.querySelector('.min-item.active').offsetTop || 0) - 250
-      })
+        document.querySelector('.hour-box').scrollTop = (document.querySelector('.hour-item.active').offsetTop || 0) - 250;
+        document.querySelector('.min-box').scrollTop = (document.querySelector('.min-item.active').offsetTop || 0) - 250;
+      });
     },
   },
-}
+};
 </script>
 
 

+ 4 - 4
packages/vue-monthly-picker/index.js

@@ -1,8 +1,8 @@
 
-import VueMonthlyPicker from './src/VueMonthlyPicker.vue'
+import VueMonthlyPicker from './src/VueMonthlyPicker.vue';
 
 VueMonthlyPicker.install = function(Vue) {
-  Vue.component(VueMonthlyPicker.name, VueMonthlyPicker)
-}
+  Vue.component(VueMonthlyPicker.name, VueMonthlyPicker);
+};
 
-export default VueMonthlyPicker
+export default VueMonthlyPicker;

+ 65 - 60
packages/vue-monthly-picker/src/VueMonthlyPicker.vue

@@ -26,7 +26,7 @@
             <span class="next" :class="{deactive: !canNext}" @click="nextYear" />
           </div>
           <div class="flexbox monthItem">
-            <template v-for="(month, idx) in monthLabels">
+            <template v-for="(monthLabel, idx) in monthLabels">
               <div
                 v-if="isActive(idx)"
                 :key="'active-' + idx"
@@ -35,7 +35,7 @@
                 :style="[{'background-color': getBackgroundColor(year, idx)}]"
                 @click="selectMonth(idx)"
               >
-                {{ month }}
+                {{ monthLabel }}
               </div>
               <div
                 v-else
@@ -43,7 +43,7 @@
                 :class="{'selected': isCurrentSelected(year, idx)}"
                 class="item deactive"
               >
-                {{ month }}
+                {{ monthLabel }}
               </div>
             </template>
           </div>
@@ -54,12 +54,13 @@
 </template>
 
 <script>
-import moment from 'moment'
+import moment from 'moment';
 
 export default {
   name: 'VueMonthlyPicker',
   props: {
     'value': {
+      type: String,
       default: null,
     },
     'disabled': {
@@ -67,6 +68,7 @@ export default {
       default: false,
     },
     'inputClass': {
+      type: String,
       default: 'input',
     },
     'placeHolder': {
@@ -78,7 +80,7 @@ export default {
       default: 'left',
       validator: function (value) {
         // The value must match one of these strings
-        return ['left', 'right', 'center'].indexOf(value) !== -1
+        return ['left', 'right', 'center'].indexOf(value) !== -1;
       },
     },
     'selectedBackgroundColor': {
@@ -88,13 +90,15 @@ export default {
     monthLabels: {
       type: Array,
       default: function () {
-        return ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
+        return ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
       },
     },
     min: {
+      type: Date,
       default: null,
     },
     max: {
+      type: Date,
       default: null,
     },
     dateFormat: {
@@ -106,148 +110,149 @@ export default {
       default: true,
     },
   },
+  emits: ['input', 'selected'],
   data () {
     return {
       showMenu: false,
       year: moment().format('YYYY'),
       month: moment().format('MM'),
-    }
+    };
   },
   computed: {
     menuClass () {
       return {
         visible: this.showMenu,
         hidden: !this.showMenu,
-      }
+      };
     },
     menuStyle () {
       return {
         display: this.showMenu ? 'block' : 'none',
         'left': this.alignment === 'right' ? '100%' : this.alignment === 'center' ? '50%' : '',
         'transform': this.alignment === 'right' ? 'translate(-100%,0)' : this.alignment === 'center' ? 'translate(-50%,0)' : '',
-      }
+      };
     },
     displayText () {
       if (this.value) {
-        let valueMoment = null
+        let valueMoment = null;
         if (typeof this.value === 'string') {
-          valueMoment = moment(this.value)
+          valueMoment = moment(this.value);
         } else {
-          valueMoment = this.value
+          valueMoment = this.value;
         }
         if (valueMoment && valueMoment.isValid()) {
-          return valueMoment.format(this.dateFormat)
+          return valueMoment.format(this.dateFormat);
         }
-        return null
+        return null;
       } else {
-        return this.placeHolder
+        return this.placeHolder;
       }
     },
     canBack () {
-      if (!this.min) return true
-      const currentVal = this.internalMomentValue.clone().startOf('year')
-      return this.min.isBefore(currentVal)
+      if (!this.min) return true;
+      const currentVal = this.internalMomentValue.clone().startOf('year');
+      return this.min.isBefore(currentVal);
     },
     canNext () {
-      if (!this.max) return true
-      const currentVal = this.internalMomentValue.clone().endOf('year')
-      return currentVal.isBefore(this.max)
+      if (!this.max) return true;
+      const currentVal = this.internalMomentValue.clone().endOf('year');
+      return currentVal.isBefore(this.max);
     },
     internalMomentValue () {
-      const yrMonth = this.year + '/' + this.month
-      return moment(yrMonth, 'YYYY/MM')
+      const yrMonth = this.year + '/' + this.month;
+      return moment(yrMonth, 'YYYY/MM');
     },
   },
   watch: {
     value: function (value) {
-      this.setValue(value)
+      this.setValue(value);
     },
   },
   mounted () {
-    this.init()
+    this.init();
   },
   methods: {
     init () {
       document.addEventListener('click', e => {
         if (this.$el && !this.$el.contains(e.target)) {
-          this.closeMenu()
+          this.closeMenu();
         }
-      }, false)
-      this.setValue(this.value)
+      }, false);
+      this.setValue(this.value);
     },
     openMenu () {
       if (!this.disabled) {
-        this.showMenu = true
+        this.showMenu = true;
       }
     },
     closeMenu () {
-      this.showMenu = false
+      this.showMenu = false;
     },
     prevYear () {
-      if (!this.canBack) return
-      let newYear = parseInt(this.year) - 1
-      this.year = newYear.toString()
+      if (!this.canBack) return;
+      let newYear = parseInt(this.year) - 1;
+      this.year = newYear.toString();
     },
     nextYear () {
-      if (!this.canNext) return
-      let newYear = parseInt(this.year) + 1
-      this.year = newYear.toString()
+      if (!this.canNext) return;
+      let newYear = parseInt(this.year) + 1;
+      this.year = newYear.toString();
     },
     selectMonth (idx) {
-      this.month = (parseInt(idx) + 1).toString()
-      this.selectPicker()
-      this.closeMenu()
+      this.month = (parseInt(idx) + 1).toString();
+      this.selectPicker();
+      this.closeMenu();
     },
     selectPicker () {
-      this.$emit('input', this.internalMomentValue.clone())
-      this.$emit('selected', this.internalMomentValue.clone())
+      this.$emit('input', this.internalMomentValue.clone());
+      this.$emit('selected', this.internalMomentValue.clone());
     },
     setValue (value) {
       if (typeof value === 'string') {
-        value = moment(value)
+        value = moment(value);
       }
       if (value && value.isValid()) {
-        this.month = value.format('MM')
-        this.year = value.format('YYYY')
+        this.month = value.format('MM');
+        this.year = value.format('YYYY');
       }
     },
     isActive (idx) {
-      let realMonth = idx + 1
-      const yrMonth = this.year + '/' + (realMonth < 10 ? '0' + realMonth : realMonth)
+      let realMonth = idx + 1;
+      const yrMonth = this.year + '/' + (realMonth < 10 ? '0' + realMonth : realMonth);
       if (this.min && moment(yrMonth, 'YYYY/MM').isBefore(this.min)) {
-        return false
+        return false;
       }
       if (this.max && moment(yrMonth, 'YYYY/MM').isAfter(this.max)) {
-        return false
+        return false;
       }
-      return true
+      return true;
     },
     isCurrentSelected (year, monthIdx) {
       if (!this.value) {
-        return false
+        return false;
       }
-      let checkValue = this.value
+      let checkValue = this.value;
       if (typeof this.value === 'string') {
-        checkValue = moment(this.value)
+        checkValue = moment(this.value);
       }
       if (checkValue && checkValue.isValid()) {
-        const currentMonth = checkValue.format('MM')
-        const currentYear = checkValue.format('YYYY')
-        return Number(currentMonth) === Number(monthIdx + 1) && Number(currentYear) === Number(year)
+        const currentMonth = checkValue.format('MM');
+        const currentYear = checkValue.format('YYYY');
+        return Number(currentMonth) === Number(monthIdx + 1) && Number(currentYear) === Number(year);
       }
-      return false
+      return false;
     },
     getBackgroundColor (year, monthIdx) {
       if (this.isCurrentSelected(year, monthIdx)) {
-        return this.selectedBackgroundColor
+        return this.selectedBackgroundColor;
       }
     },
     clearSelect () {
-      this.$emit('input', null)
-      this.$emit('selected', null)
+      this.$emit('input', null);
+      this.$emit('selected', null);
     },
   },
-}
+};
 </script>
 
 <style>

+ 4 - 4
packages/year-picker/index.js

@@ -1,8 +1,8 @@
 
-import YearPicker from './src/YearPicker.vue'
+import YearPicker from './src/YearPicker.vue';
 
 YearPicker.install = function(Vue) {
-  Vue.component(YearPicker.name, YearPicker)
-}
+  Vue.component(YearPicker.name, YearPicker);
+};
 
-export default YearPicker
+export default YearPicker;

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików