drew 5 年 前
コミット
0b1178995d
51 ファイル変更557 行追加550 行削除
  1. 9 0
      src/main/vue/.editorconfig
  2. 5 5
      src/main/vue/.eslintrc.js
  3. 6 6
      src/main/vue/.prettierrc.js
  4. 1 1
      src/main/vue/babel.config.js
  5. 1 1
      src/main/vue/package.json
  6. 2 2
      src/main/vue/postcss.config.js
  7. 6 6
      src/main/vue/src/components/Bar.vue
  8. 6 6
      src/main/vue/src/components/Bubble.vue
  9. 20 20
      src/main/vue/src/components/CoordPick.vue
  10. 19 19
      src/main/vue/src/components/CoordinateSelect.vue
  11. 11 11
      src/main/vue/src/components/CropUpload.vue
  12. 15 15
      src/main/vue/src/components/DynamicForm.vue
  13. 10 10
      src/main/vue/src/components/FileUpload.vue
  14. 12 12
      src/main/vue/src/components/GenOptionsDialog.vue
  15. 16 16
      src/main/vue/src/components/JsonView.vue
  16. 6 6
      src/main/vue/src/components/Line.vue
  17. 6 6
      src/main/vue/src/components/LineBarChart.vue
  18. 15 15
      src/main/vue/src/components/MultiUpload.vue
  19. 6 6
      src/main/vue/src/components/Pie.vue
  20. 6 6
      src/main/vue/src/components/PolarArea.vue
  21. 6 6
      src/main/vue/src/components/Radar.vue
  22. 9 9
      src/main/vue/src/components/RichText.vue
  23. 9 9
      src/main/vue/src/components/SingleUpload.vue
  24. 5 5
      src/main/vue/src/components/SortableHeader.vue
  25. 5 5
      src/main/vue/src/components/SysMenu.vue
  26. 1 1
      src/main/vue/src/components/zh_CN.js
  27. 1 1
      src/main/vue/src/main.js
  28. 2 2
      src/main/vue/src/mixins/formatters.js
  29. 15 15
      src/main/vue/src/mixins/pageableTable.js
  30. 6 6
      src/main/vue/src/plugins/dataExport.js
  31. 25 25
      src/main/vue/src/router.js
  32. 3 3
      src/main/vue/src/store.js
  33. 4 4
      src/main/vue/src/views/404.vue
  34. 9 9
      src/main/vue/src/views/Admin.vue
  35. 22 22
      src/main/vue/src/views/Api.vue
  36. 5 5
      src/main/vue/src/views/Dashboard.vue
  37. 60 60
      src/main/vue/src/views/GenCodeEdit.vue
  38. 17 17
      src/main/vue/src/views/GenCodeList.vue
  39. 24 24
      src/main/vue/src/views/Login.vue
  40. 39 36
      src/main/vue/src/views/Menus.vue
  41. 3 3
      src/main/vue/src/views/RoleMenus.vue
  42. 24 24
      src/main/vue/src/views/SysConfigList.vue
  43. 25 25
      src/main/vue/src/views/UserEdit.vue
  44. 17 17
      src/main/vue/src/views/UserList.vue
  45. 15 15
      src/main/vue/src/widgets/BarChartWidget.vue
  46. 8 8
      src/main/vue/src/widgets/LineChartWidget.vue
  47. 8 8
      src/main/vue/src/widgets/PieChartWidget.vue
  48. 4 4
      src/main/vue/src/widgets/UserWidget.vue
  49. 3 3
      src/main/vue/src/widgets/WidgetCard.vue
  50. 4 4
      src/main/vue/vue.config.js
  51. 1 6
      src/main/vue/yarn.lock

+ 9 - 0
src/main/vue/.editorconfig

@@ -0,0 +1,9 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 4
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true

+ 5 - 5
src/main/vue/.eslintrc.js

@@ -1,7 +1,7 @@
 module.exports = {
     root: true,
     env: {
-        node: true,
+        node: true
     },
     extends: ['plugin:vue/essential', '@vue/prettier'],
     rules: {
@@ -9,14 +9,14 @@ module.exports = {
         'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
         'no-unused-vars': 'off',
         'no-empty': ['error', { allowEmptyCatch: true }],
-        'prettier/prettier': ['error'],
+        'prettier/prettier': ['error']
     },
     parserOptions: {
-        parser: 'babel-eslint',
+        parser: 'babel-eslint'
     },
     globals: {
         Chart: true,
         AMap: true,
-        FontAwesome: true,
-    },
+        FontAwesome: true
+    }
 };

+ 6 - 6
src/main/vue/.prettierrc.js

@@ -6,14 +6,14 @@ module.exports = {
         {
             files: '*.html',
             options: {
-                parser: 'html',
-            },
+                parser: 'html'
+            }
         },
         {
             files: '*.vue',
             options: {
-                parser: 'vue',
-            },
-        },
-    ],
+                parser: 'vue'
+            }
+        }
+    ]
 };

+ 1 - 1
src/main/vue/babel.config.js

@@ -1,3 +1,3 @@
 module.exports = {
-    presets: ['@vue/app'],
+    presets: ['@vue/cli-plugin-babel/preset']
 };

+ 1 - 1
src/main/vue/package.json

@@ -45,7 +45,7 @@
     "eslint-plugin-vue": "^6.2.2",
     "less": "^3.0.4",
     "less-loader": "^5.0.0",
-    "prettier": "^2.0.5",
+    "prettier": "1.19.1",
     "style-resources-loader": "^1.3.3",
     "vue-cli-plugin-style-resources-loader": "^0.1.4",
     "vue-template-compiler": "^2.6.10"

+ 2 - 2
src/main/vue/postcss.config.js

@@ -1,5 +1,5 @@
 module.exports = {
     plugins: {
-        autoprefixer: {},
-    },
+        autoprefixer: {}
+    }
 };

+ 6 - 6
src/main/vue/src/components/Bar.vue

@@ -17,14 +17,14 @@ export default {
                 this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                     type: 'bar',
                     data: this.chartData,
-                    options: this.options,
+                    options: this.options
                 });
             }
-        },
+        }
     },
     data() {
         return {
-            myChart: null,
+            myChart: null
         };
     },
     mounted() {
@@ -33,15 +33,15 @@ export default {
             this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                 type: 'bar',
                 data: this.chartData,
-                options: this.options,
+                options: this.options
             });
         }
     },
     methods: {
         updateChart() {
             this.myChart.update();
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 6 - 6
src/main/vue/src/components/Bubble.vue

@@ -17,14 +17,14 @@ export default {
                 this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                     type: 'bubble',
                     data: this.chartData,
-                    options: this.options,
+                    options: this.options
                 });
             }
-        },
+        }
     },
     data() {
         return {
-            myChart: null,
+            myChart: null
         };
     },
     mounted() {
@@ -32,15 +32,15 @@ export default {
             this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                 type: 'bubble',
                 data: this.chartData,
-                options: this.options,
+                options: this.options
             });
         }
     },
     methods: {
         updateChart() {
             this.myChart.update();
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 20 - 20
src/main/vue/src/components/CoordPick.vue

@@ -24,7 +24,7 @@
             <i
                 :class="{
                     'el-icon-loading': locating,
-                    'el-icon-location-outline': !locating,
+                    'el-icon-location-outline': !locating
                 }"
             ></i>
         </div>
@@ -44,20 +44,20 @@ export default {
             default() {
                 return {
                     city: '全国',
-                    citylimit: false,
+                    citylimit: false
                 };
-            },
+            }
         },
         center: {
-            type: Array,
+            type: Array
         },
         zoom: {
             type: Number,
-            default: 15,
+            default: 15
         },
         value: {
-            type: Array,
-        },
+            type: Array
+        }
     },
     data() {
         let self = this;
@@ -73,16 +73,16 @@ export default {
                     self.marker = [e.lnglat.O, e.lnglat.P];
                     self.mapCenter = [e.lnglat.O, e.lnglat.P];
                     self.getGeolocation();
-                },
+                }
             },
             markerEvents: {
                 dragend(e) {
                     self.marker = [e.lnglat.O, e.lnglat.P];
                     self.mapCenter = [e.lnglat.O, e.lnglat.P];
                     self.getGeolocation();
-                },
+                }
             },
-            mapCenter: [121.480342, 31.236339],
+            mapCenter: [121.480342, 31.236339]
         };
     },
     created() {
@@ -99,15 +99,15 @@ export default {
             this.locating = true;
             let geolocation = new AMap.Geolocation({
                 enableHighAccuracy: true,
-                timeout: 10000,
+                timeout: 10000
             });
             geolocation.getCurrentPosition();
-            AMap.event.addListener(geolocation, 'complete', (data) => {
+            AMap.event.addListener(geolocation, 'complete', data => {
                 this.locating = false;
                 this.mapCenter = [data.position.O, data.position.P];
                 this.myPosition = [data.position.O, data.position.P];
             });
-            AMap.event.addListener(geolocation, 'error', (err) => {
+            AMap.event.addListener(geolocation, 'error', err => {
                 this.locating = false;
                 console.log(err);
             });
@@ -116,14 +116,14 @@ export default {
             let latSum = 0;
             let lngSum = 0;
             if (pois.length > 0) {
-                pois.forEach((poi) => {
+                pois.forEach(poi => {
                     let { lng, lat } = poi;
                     lngSum += lng;
                     latSum += lat;
                 });
                 let center = {
                     lng: lngSum / pois.length,
-                    lat: latSum / pois.length,
+                    lat: latSum / pois.length
                 };
                 this.mapCenter = [center.lng, center.lat];
             }
@@ -140,21 +140,21 @@ export default {
                         this.$emit('selected', {
                             lnglat: {
                                 lng: lnglat[0],
-                                lat: lnglat[1],
+                                lat: lnglat[1]
                             },
-                            ...result.regeocode,
+                            ...result.regeocode
                         });
                     }
                 });
             });
-        },
+        }
     },
     watch: {
         value(val) {
             this.mapCenter = val;
             this.marker = val;
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped>

+ 19 - 19
src/main/vue/src/components/CoordinateSelect.vue

@@ -39,20 +39,20 @@ export default {
             default() {
                 return {
                     city: '全国',
-                    citylimit: false,
+                    citylimit: false
                 };
-            },
+            }
         },
         center: {
-            type: Array,
+            type: Array
         },
         zoom: {
             type: Number,
-            default: 15,
+            default: 15
         },
         value: {
-            type: Array,
-        },
+            type: Array
+        }
     },
     data() {
         let self = this;
@@ -68,16 +68,16 @@ export default {
                     self.marker = [e.lnglat.O, e.lnglat.P];
                     self.mapCenter = [e.lnglat.O, e.lnglat.P];
                     self.getGeolocation();
-                },
+                }
             },
             markerEvents: {
                 dragend(e) {
                     self.marker = [e.lnglat.O, e.lnglat.P];
                     self.mapCenter = [e.lnglat.O, e.lnglat.P];
                     self.getGeolocation();
-                },
+                }
             },
-            mapCenter: [121.480342, 31.236339],
+            mapCenter: [121.480342, 31.236339]
         };
     },
     created() {
@@ -94,15 +94,15 @@ export default {
             this.locating = true;
             let geolocation = new AMap.Geolocation({
                 enableHighAccuracy: true,
-                timeout: 10000,
+                timeout: 10000
             });
             geolocation.getCurrentPosition();
-            AMap.event.addListener(geolocation, 'complete', (data) => {
+            AMap.event.addListener(geolocation, 'complete', data => {
                 this.locating = false;
                 this.mapCenter = [data.position.O, data.position.P];
                 this.myPosition = [data.position.O, data.position.P];
             });
-            AMap.event.addListener(geolocation, 'error', (err) => {
+            AMap.event.addListener(geolocation, 'error', err => {
                 this.locating = false;
                 console.log(err);
             });
@@ -111,14 +111,14 @@ export default {
             let latSum = 0;
             let lngSum = 0;
             if (pois.length > 0) {
-                pois.forEach((poi) => {
+                pois.forEach(poi => {
                     let { lng, lat } = poi;
                     lngSum += lng;
                     latSum += lat;
                 });
                 let center = {
                     lng: lngSum / pois.length,
-                    lat: latSum / pois.length,
+                    lat: latSum / pois.length
                 };
                 this.mapCenter = [center.lng, center.lat];
             }
@@ -135,21 +135,21 @@ export default {
                         this.$emit('selected', {
                             lnglat: {
                                 lng: lnglat[0],
-                                lat: lnglat[1],
+                                lat: lnglat[1]
                             },
-                            ...result.regeocode,
+                            ...result.regeocode
                         });
                     }
                 });
             });
-        },
+        }
     },
     watch: {
         value(val) {
             this.mapCenter = val;
             this.marker = val;
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped>

+ 11 - 11
src/main/vue/src/components/CropUpload.vue

@@ -26,12 +26,12 @@ export default {
         value: {},
         width: {
             type: Number,
-            default: 350,
+            default: 350
         },
         height: {
             type: Number,
-            default: 350,
-        },
+            default: 350
+        }
     },
     created() {
         if (this.value) {
@@ -48,36 +48,36 @@ export default {
         return {
             src: '',
             cropperOptions: {
-                aspectRatio: 1,
+                aspectRatio: 1
             },
             loading: false,
             headers: {
-                Authorization: 'Bearer ' + localStorage.getItem('token'),
-            },
+                Authorization: 'Bearer ' + localStorage.getItem('token')
+            }
         };
     },
     computed: {
         outputOptions() {
             return { width: this.width, height: this.height };
-        },
+        }
     },
     watch: {
         value() {
             if (this.value) {
                 this.src = this.value;
             }
-        },
+        }
     },
     methods: {
         handleUploaded(res) {
             this.loading = false;
             this.src = res;
             this.$emit('input', res);
-        },
+        }
     },
     components: {
-        AvatarCropper,
-    },
+        AvatarCropper
+    }
 };
 </script>
 <style lang="less" scoped>

+ 15 - 15
src/main/vue/src/components/DynamicForm.vue

@@ -53,15 +53,15 @@ export default {
     props: {
         formProps: {
             type: Array,
-            required: true,
+            required: true
         },
         value: {
-            type: Object,
+            type: Object
         },
         size: {
             type: String,
-            default: 'small',
-        },
+            default: 'small'
+        }
     },
     created() {
         console.log('created', this.formProps);
@@ -70,21 +70,21 @@ export default {
     data() {
         return {
             formData: {},
-            formDef: [],
+            formDef: []
         };
     },
     computed: {
         rules() {
             let rules = {};
-            this.formDef.forEach((item) => {
+            this.formDef.forEach(item => {
                 rules[item.id] = [{ required: true, message: `请填写${item.name}`, trigger: 'blur' }];
             });
             return rules;
-        },
+        }
     },
     methods: {
         validate(fn) {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (fn instanceof Function) {
                     fn(valid);
                 }
@@ -95,12 +95,12 @@ export default {
         },
         getData(all) {
             let data = [];
-            this.formDef.forEach((i) => {
+            this.formDef.forEach(i => {
                 if (i.writable || all) {
                     if (this.formData[i.id]) {
                         data.push({
                             id: i.id,
-                            value: this.formData[i.id],
+                            value: this.formData[i.id]
                         });
                     }
                 }
@@ -111,18 +111,18 @@ export default {
             try {
                 this.$refs.form.clearValidate();
             } catch (error) {}
-            props.forEach((i) => {
+            props.forEach(i => {
                 this.formData[i.id] = i.value || null;
             });
             this.formDef = this.formProps;
         },
         valueChange(val, id) {
             let formData = {
-                ...this.formData,
+                ...this.formData
             };
             formData[id] = val;
             this.formData = formData;
-        },
+        }
     },
     watch: {
         formProps(val) {
@@ -138,8 +138,8 @@ export default {
         },
         formData(val) {
             this.$emit('input', val);
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped>

+ 10 - 10
src/main/vue/src/components/FileUpload.vue

@@ -20,22 +20,22 @@ export default {
             type: Boolean,
             default() {
                 return false;
-            },
+            }
         },
-        value: {},
+        value: {}
     },
     data() {
         return {
             fileList: [],
-            watchValue: true,
+            watchValue: true
         };
     },
     computed: {
         headers() {
             return {
-                Authorization: 'Bearer ' + localStorage.getItem('token'),
+                Authorization: 'Bearer ' + localStorage.getItem('token')
             };
-        },
+        }
     },
     created() {
         this.uploadUrl = resolveUrl(this.$baseUrl, 'upload/file');
@@ -56,12 +56,12 @@ export default {
                 if (!value) {
                     this.fileList = [];
                 } else {
-                    this.fileList = value.map((i) => {
+                    this.fileList = value.map(i => {
                         return { name: i.split('/').pop(), url: i };
                     });
                 }
             }
-        },
+        }
     },
     watch: {
         value(oldValue, value) {
@@ -76,14 +76,14 @@ export default {
             } else {
                 this.$emit(
                     'input',
-                    fileList.map((i) => i.url)
+                    fileList.map(i => i.url)
                 );
             }
             this.$nextTick(() => {
                 this.watchValue = true;
             });
-        },
-    },
+        }
+    }
 };
 </script>
 

+ 12 - 12
src/main/vue/src/components/GenOptionsDialog.vue

@@ -40,9 +40,9 @@ export default {
     props: {
         visible: {
             required: true,
-            type: Boolean,
+            type: Boolean
         },
-        value: {},
+        value: {}
     },
     created() {
         this.show = this.visible;
@@ -55,23 +55,23 @@ export default {
                 {
                     label: '',
                     value: '',
-                    type: 'string',
-                },
-            ],
+                    type: 'string'
+                }
+            ]
         };
     },
     methods: {
         update() {
             if (this.value) {
                 let arr = [];
-                JSON.parse(this.value).forEach((item) => {
+                JSON.parse(this.value).forEach(item => {
                     let value = item.value.toString(),
                         type = typeof item.value,
                         label = item.label;
                     arr.push({
                         label,
                         value,
-                        type,
+                        type
                     });
                 });
                 this.options = arr;
@@ -98,7 +98,7 @@ export default {
                 }
                 arr.push({
                     label: label,
-                    value: value,
+                    value: value
                 });
             }
             this.$emit('input', JSON.stringify(arr));
@@ -108,12 +108,12 @@ export default {
             this.options.push({
                 label: '',
                 value: '',
-                type: 'string',
+                type: 'string'
             });
         },
         del(index) {
             this.options.splice(index, 1);
-        },
+        }
     },
     watch: {
         visible(val) {
@@ -124,8 +124,8 @@ export default {
         },
         value() {
             this.update();
-        },
-    },
+        }
+    }
 };
 </script>
 

+ 16 - 16
src/main/vue/src/components/JsonView.vue

@@ -10,22 +10,22 @@ export default {
     props: {
         json: {
             type: [Object, Array],
-            required: true,
+            required: true
         },
         rootKey: {
             type: String,
-            default: 'root',
-        },
+            default: 'root'
+        }
     },
     data() {
         return {
-            treeData: [],
+            treeData: []
         };
     },
     methods: {
         parseTreeData() {
             let id = 0;
-            const parse = (obj) => {
+            const parse = obj => {
                 let root = [];
                 if (obj instanceof Object) {
                     for (let key in obj) {
@@ -33,18 +33,18 @@ export default {
                             root.push({
                                 id: ++id,
                                 label: key + ': Array[' + obj[key].length + ']',
-                                children: parse(obj[key]),
+                                children: parse(obj[key])
                             });
                         } else if (obj[key] instanceof Object) {
                             root.push({
                                 id: ++id,
                                 label: key + ': Object',
-                                children: parse(obj[key]),
+                                children: parse(obj[key])
                             });
                         } else {
                             root.push({
                                 id: ++id,
-                                label: key + ': ' + obj[key],
+                                label: key + ': ' + obj[key]
                             });
                         }
                     }
@@ -54,18 +54,18 @@ export default {
                             root.push({
                                 id: ++id,
                                 label: i + ': Array[' + obj[i].length + ']',
-                                children: parse(obj[i]),
+                                children: parse(obj[i])
                             });
                         } else if (obj[i] instanceof Object) {
                             root.push({
                                 id: ++id,
                                 label: i + ': Object',
-                                children: parse(obj[i]),
+                                children: parse(obj[i])
                             });
                         } else {
                             root.push({
                                 id: ++id,
-                                label: i + ': ' + obj[i],
+                                label: i + ': ' + obj[i]
                             });
                         }
                     }
@@ -78,21 +78,21 @@ export default {
             return h(
                 'span',
                 {
-                    class: 'json-view-content',
+                    class: 'json-view-content'
                 },
                 [
                     h('span', { class: 'json-view-content-key' }, [data.label.split(':')[0]]),
                     ':',
-                    data.label.split(':')[1],
+                    data.label.split(':')[1]
                 ]
             );
-        },
+        }
     },
     watch: {
         json() {
             this.parseTreeData();
-        },
-    },
+        }
+    }
 };
 </script>
 <style>

+ 6 - 6
src/main/vue/src/components/Line.vue

@@ -17,14 +17,14 @@ export default {
                 this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                     type: 'line',
                     data: this.chartData,
-                    options: this.options,
+                    options: this.options
                 });
             }
-        },
+        }
     },
     data() {
         return {
-            myChart: null,
+            myChart: null
         };
     },
     mounted() {
@@ -33,15 +33,15 @@ export default {
             this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                 type: 'line',
                 data: this.chartData,
-                options: this.options,
+                options: this.options
             });
         }
     },
     methods: {
         updateChart() {
             this.myChart.update();
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 6 - 6
src/main/vue/src/components/LineBarChart.vue

@@ -17,14 +17,14 @@ export default {
                 this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                     type: this.type,
                     data: this.chartData,
-                    options: this.options,
+                    options: this.options
                 });
             }
-        },
+        }
     },
     data() {
         return {
-            myChart: null,
+            myChart: null
         };
     },
     mounted() {
@@ -33,15 +33,15 @@ export default {
             this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                 type: this.type,
                 data: this.chartData,
-                options: this.options,
+                options: this.options
             });
         }
     },
     methods: {
         updateChart() {
             this.myChart.update();
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 15 - 15
src/main/vue/src/components/MultiUpload.vue

@@ -38,11 +38,11 @@ export default {
         value: Array,
         usePrefix: {
             type: Boolean,
-            default: true,
+            default: true
         },
         url: {
-            type: String,
-        },
+            type: String
+        }
     },
     data() {
         return {
@@ -52,27 +52,27 @@ export default {
             uploadUrl: '',
             realFileList: [],
             previewUrl: '',
-            previewList: [],
+            previewList: []
         };
     },
     computed: {
         headers() {
             return {
-                Authorization: 'Bearer ' + localStorage.getItem('token'),
+                Authorization: 'Bearer ' + localStorage.getItem('token')
             };
-        },
+        }
     },
     methods: {
         handleRemove(file, fileList) {
             this.realFileList = fileList;
             this.$emit(
                 'input',
-                fileList.map((i) => i.value)
+                fileList.map(i => i.value)
             );
         },
         handlePictureCardPreview(file) {
             this.previewUrl = file.value;
-            this.previewList = this.fileList.map((i) => i.value);
+            this.previewList = this.fileList.map(i => i.value);
             console.log(this.$refs.preview.$el);
             this.$refs.preview.showViewer = true;
         },
@@ -85,7 +85,7 @@ export default {
             this.realFileList = fileList;
             this.$emit(
                 'input',
-                fileList.map((i) => i.value)
+                fileList.map(i => i.value)
             );
         },
         updateFileList(list) {
@@ -98,12 +98,12 @@ export default {
                 if (!this.fileList[i]) {
                     this.fileList[i] = {
                         value: list[i],
-                        url: list[i],
+                        url: list[i]
                     };
                 } else if (this.fileList[i].value !== list[i]) {
                     this.fileList[i] = {
                         value: list[i],
-                        url: list[i],
+                        url: list[i]
                     };
                 }
             }
@@ -114,16 +114,16 @@ export default {
             //         url: i,
             //     };
             // });
-        },
+        }
     },
     watch: {
         value(val, oldVal) {
-            if (JSON.stringify(val) == JSON.stringify(this.realFileList.map((i) => i.value))) {
+            if (JSON.stringify(val) == JSON.stringify(this.realFileList.map(i => i.value))) {
                 return;
             }
             this.updateFileList(val);
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 6 - 6
src/main/vue/src/components/Pie.vue

@@ -17,14 +17,14 @@ export default {
                 this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                     type: 'pie',
                     data: this.chartData,
-                    options: this.options,
+                    options: this.options
                 });
             }
-        },
+        }
     },
     data() {
         return {
-            myChart: null,
+            myChart: null
         };
     },
     mounted() {
@@ -32,15 +32,15 @@ export default {
             this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                 type: 'pie',
                 data: this.chartData,
-                options: this.options,
+                options: this.options
             });
         }
     },
     methods: {
         updateChart() {
             this.myChart.update();
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 6 - 6
src/main/vue/src/components/PolarArea.vue

@@ -17,14 +17,14 @@ export default {
                 this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                     type: 'polarArea',
                     data: this.chartData,
-                    options: this.options,
+                    options: this.options
                 });
             }
-        },
+        }
     },
     data() {
         return {
-            myChart: null,
+            myChart: null
         };
     },
     mounted() {
@@ -32,15 +32,15 @@ export default {
             this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                 type: 'polarArea',
                 data: this.chartData,
-                options: this.options,
+                options: this.options
             });
         }
     },
     methods: {
         updateChart() {
             this.myChart.update();
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 6 - 6
src/main/vue/src/components/Radar.vue

@@ -17,14 +17,14 @@ export default {
                 this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                     type: 'radar',
                     data: this.chartData,
-                    options: this.options,
+                    options: this.options
                 });
             }
-        },
+        }
     },
     data() {
         return {
-            myChart: null,
+            myChart: null
         };
     },
     mounted() {
@@ -32,15 +32,15 @@ export default {
             this.myChart = new Chart(this.$refs.chart.getContext('2d'), {
                 type: 'radar',
                 data: this.chartData,
-                options: this.options,
+                options: this.options
             });
         }
     },
     methods: {
         updateChart() {
             this.myChart.update();
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 9 - 9
src/main/vue/src/components/RichText.vue

@@ -47,7 +47,7 @@ export default {
                 plugins: [
                     'advlist autolink lists link image charmap print preview anchor textcolor',
                     'searchreplace visualblocks code fullscreen',
-                    'insertdatetime media table contextmenu paste code help imagetools',
+                    'insertdatetime media table contextmenu paste code help imagetools'
                 ],
                 images_upload_url: this.$baseUrl + '/upload/file',
                 images_upload_handler: (blobInfo, success, failure) => {
@@ -55,30 +55,30 @@ export default {
                     formData.append('file', blobInfo.blob(), blobInfo.filename());
                     this.$axios
                         .post('/upload/file', formData)
-                        .then((res) => {
+                        .then(res => {
                             success(res.data);
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             failure(e);
                         });
                 },
-                init_instance_callback: (editor) => {
+                init_instance_callback: editor => {
                     this.editor = editor;
-                },
+                }
             },
             editor: null,
-            content: '',
+            content: ''
         };
     },
     methods: {
         onInput(val) {
             this.$emit('input', val);
-        },
+        }
     },
     watch: {},
     components: {
-        'tinymce-editor': Editor, // <- Important part
-    },
+        'tinymce-editor': Editor // <- Important part
+    }
 };
 </script>
 <style lang="less" scoped>

+ 9 - 9
src/main/vue/src/components/SingleUpload.vue

@@ -31,25 +31,25 @@ export default {
         value: String,
         usePrefix: {
             type: Boolean,
-            default: true,
+            default: true
         },
         url: {
-            type: String,
-        },
+            type: String
+        }
     },
     data() {
         return {
             imageUrl: '',
             loading: false,
-            uploadUrl: '',
+            uploadUrl: ''
         };
     },
     computed: {
         headers() {
             return {
-                Authorization: 'Bearer ' + localStorage.getItem('token'),
+                Authorization: 'Bearer ' + localStorage.getItem('token')
             };
-        },
+        }
     },
     methods: {
         onSuccess(res, file) {
@@ -72,13 +72,13 @@ export default {
         },
         updateImageUrl(url) {
             this.imageUrl = url;
-        },
+        }
     },
     watch: {
         value(val) {
             this.updateImageUrl(val);
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped>

+ 5 - 5
src/main/vue/src/components/SortableHeader.vue

@@ -21,17 +21,17 @@ export default {
     props: {
         column: {
             type: Object,
-            required: true,
+            required: true
         },
         currentSort: {
             type: Object,
-            required: true,
-        },
+            required: true
+        }
     },
     methods: {
         changeSort(order) {
             this.$emit('changeSort', this.column.property, order);
-        },
-    },
+        }
+    }
 };
 </script>

+ 5 - 5
src/main/vue/src/components/SysMenu.vue

@@ -16,8 +16,8 @@ export default {
     props: {
         menu: {
             type: Object,
-            required: true,
-        },
+            required: true
+        }
     },
     data() {
         return {};
@@ -25,12 +25,12 @@ export default {
     methods: {
         click(e) {
             console.log(e);
-        },
+        }
     },
     computed: {
         isLeaf() {
             return !(this.menu.children instanceof Array && this.menu.children.length);
-        },
-    },
+        }
+    }
 };
 </script>

+ 1 - 1
src/main/vue/src/components/zh_CN.js

@@ -424,5 +424,5 @@ tinymce.addI18n('zh_CN', {
     'Whole words': '\u5168\u5b57\u5339\u914d',
     Spellcheck: '\u62fc\u5199\u68c0\u67e5',
     Caption: '\u6807\u9898',
-    'Insert template': '\u63d2\u5165\u6a21\u677f',
+    'Insert template': '\u63d2\u5165\u6a21\u677f'
 });

+ 1 - 1
src/main/vue/src/main.js

@@ -49,5 +49,5 @@ Vue.mixin(Formatters);
 new Vue({
     router,
     store,
-    render: (h) => h(App),
+    render: h => h(App)
 }).$mount('#app');

+ 2 - 2
src/main/vue/src/mixins/formatters.js

@@ -13,6 +13,6 @@ export default {
             if (cellValue) {
                 return format(new Date(cellValue), 'yyyy/MM/dd', { locale: zhCN });
             }
-        },
-    },
+        }
+    }
 };

+ 15 - 15
src/main/vue/src/mixins/pageableTable.js

@@ -8,7 +8,7 @@ export default {
             tableData: [],
             sort: {},
             sortStr: '',
-            tableHeight: 200,
+            tableHeight: 200
         };
     },
     created() {
@@ -38,7 +38,7 @@ export default {
                 page: this.page - 1,
                 size: this.pageSize,
                 sort: this.sortStr,
-                query: urlQuery,
+                query: urlQuery
             };
             if (this.beforeGetData) {
                 let mergeData = this.beforeGetData();
@@ -48,7 +48,7 @@ export default {
             }
             this.$http
                 .get(this.url, data)
-                .then((res) => {
+                .then(res => {
                     this.tableData = res.content;
                     this.totalPages = res.totalPages;
                     this.totalElements = res.totalElements;
@@ -56,7 +56,7 @@ export default {
                         this.afterGetData(res);
                     }
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.$message.error(e.error);
                 });
@@ -95,22 +95,22 @@ export default {
                 .replace({
                     query: {
                         ...this.$router.query,
-                        page: e,
-                    },
+                        page: e
+                    }
                 })
-                .catch((_) => {});
+                .catch(_ => {});
             this.page = e;
             this.getData();
         },
         adjustColumnWidth() {
             let canvas = document.createElement('canvas');
             let ctx = canvas.getContext('2d');
-            let measureTxt = (text) => {
+            let measureTxt = text => {
                 return parseInt(ctx.measureText(text).width);
             };
             let rowWidth = [];
             let headWidth = [];
-            document.querySelectorAll('.el-table__body-wrapper .table-row').forEach((row) => {
+            document.querySelectorAll('.el-table__body-wrapper .table-row').forEach(row => {
                 row.querySelectorAll('.table-cell').forEach((cell, index) => {
                     let children = cell.querySelector('.cell').children;
                     if (children && children.length) {
@@ -134,7 +134,7 @@ export default {
             });
             console.log(rowWidth);
             console.log(headWidth);
-        },
+        }
     },
     watch: {
         sort() {
@@ -149,12 +149,12 @@ export default {
                 .replace({
                     query: {
                         ...this.$route.query,
-                        sort: sortStr,
-                    },
+                        sort: sortStr
+                    }
                 })
-                .catch((_) => {});
+                .catch(_ => {});
             this.sortStr = sortStr;
             this.getData();
-        },
-    },
+        }
+    }
 };

+ 6 - 6
src/main/vue/src/plugins/dataExport.js

@@ -21,7 +21,7 @@ function getPropByPath(obj, path, strict) {
     return {
         o: tempObj,
         k: keyArr[i],
-        v: tempObj ? tempObj[keyArr[i]] : null,
+        v: tempObj ? tempObj[keyArr[i]] : null
     };
 }
 export default {
@@ -34,11 +34,11 @@ export default {
                 throw new Error('filename cannot be empty');
             }
             filename = filename.replace(/.xlsx$/i, '');
-            const columns = ref.columns.filter((column) => !!column.property);
+            const columns = ref.columns.filter(column => !!column.property);
             let workbook = XLSX.utils.book_new();
             let sheet = XLSX.utils.aoa_to_sheet([
-                columns.map((column) => column.label),
-                ...ref.tableData.map((row) => {
+                columns.map(column => column.label),
+                ...ref.tableData.map(row => {
                     return columns.map((column, index) => {
                         const value = getPropByPath(row, column.property).v;
                         if (column.formatter) {
@@ -46,10 +46,10 @@ export default {
                         }
                         return value;
                     });
-                }),
+                })
             ]);
             XLSX.utils.book_append_sheet(workbook, sheet, filename);
             XLSX.writeFile(workbook, filename + '.xlsx');
         };
-    },
+    }
 };

+ 25 - 25
src/main/vue/src/router.js

@@ -16,89 +16,89 @@ const router = new Router({
             children: [
                 {
                     path: '/',
-                    redirect: 'dashboard',
+                    redirect: 'dashboard'
                 },
                 {
                     path: '/404',
                     name: '404',
-                    component: () => import(/* webpackChunkName: "404" */ '@/views/404.vue'),
+                    component: () => import(/* webpackChunkName: "404" */ '@/views/404.vue')
                 },
                 {
                     path: '/dashboard',
                     name: 'dashboard',
                     component: () => import(/* webpackChunkName: "404" */ '@/views/Dashboard.vue'),
                     meta: {
-                        title: '首页',
-                    },
+                        title: '首页'
+                    }
                 },
                 {
                     path: '/api',
                     name: 'api',
                     component: () => import(/* webpackChunkName: "api" */ '@/views/Api.vue'),
                     meta: {
-                        title: '接口调试',
-                    },
+                        title: '接口调试'
+                    }
                 },
                 {
                     path: '/genCodeEdit',
                     name: 'genCodeEdit',
                     component: () => import(/* webpackChunkName: "genCodeEdit" */ '@/views/GenCodeEdit.vue'),
                     meta: {
-                        title: '代码生成编辑',
-                    },
+                        title: '代码生成编辑'
+                    }
                 },
                 {
                     path: '/genCodeList',
                     name: 'genCodeList',
                     component: () => import(/* webpackChunkName: "genCodeList" */ '@/views/GenCodeList.vue'),
                     meta: {
-                        title: '代码生成',
-                    },
+                        title: '代码生成'
+                    }
                 },
                 {
                     path: '/menus',
                     name: 'menus',
                     component: () => import(/* webpackChunkName: "menus" */ '@/views/Menus.vue'),
                     meta: {
-                        title: '菜单配置',
-                    },
+                        title: '菜单配置'
+                    }
                 },
                 {
                     path: '/userEdit',
                     name: 'userEdit',
                     component: () => import(/* webpackChunkName: "userEdit" */ '@/views/UserEdit.vue'),
                     meta: {
-                        title: '用户编辑',
-                    },
+                        title: '用户编辑'
+                    }
                 },
                 {
                     path: '/userList',
                     name: 'userList',
                     component: () => import(/* webpackChunkName: "userList" */ '@/views/UserList.vue'),
                     meta: {
-                        title: '用户管理',
-                    },
+                        title: '用户管理'
+                    }
                 },
                 {
                     path: '/sysConfigList',
                     name: 'sysConfigList',
                     component: () => import(/* webpackChunkName: "sysConfigList" */ '@/views/SysConfigList.vue'),
                     meta: {
-                        title: '参数配置',
-                    },
-                },
+                        title: '参数配置'
+                    }
+                }
                 /**INSERT_LOCATION**/
-            ],
+            ]
         },
         {
             path: '/login',
             name: 'login',
             component: () => import('@/views/Login'),
             meta: {
-                title: '登录',
-            },
-        },
-    ],
+                title: '登录'
+            }
+        }
+    ]
 });
 router.beforeEach((to, from, next) => {
     //console.log(to);
@@ -122,7 +122,7 @@ router.beforeEach((to, from, next) => {
     if (!store.state.userInfo && to.path !== '/login') {
         http.axios
             .get('/user/my')
-            .then((res) => {
+            .then(res => {
                 store.commit('updateUserInfo', res.data);
                 next();
                 return;

+ 3 - 3
src/main/vue/src/store.js

@@ -7,7 +7,7 @@ export default new Vuex.Store({
     state: {
         tableHeight: 0,
         fetchingData: false,
-        userInfo: null,
+        userInfo: null
     },
     mutations: {
         updateTableHeight(state, height) {
@@ -18,7 +18,7 @@ export default new Vuex.Store({
         },
         updateUserInfo(state, userInfo) {
             state.userInfo = userInfo;
-        },
+        }
     },
-    actions: {},
+    actions: {}
 });

+ 4 - 4
src/main/vue/src/views/404.vue

@@ -24,19 +24,19 @@ export default {
     data() {
         return {
             img_404,
-            img_404_cloud,
+            img_404_cloud
         };
     },
     computed: {
         message() {
             return '未找到该页面';
-        },
+        }
     },
     methods: {
         goBack() {
             this.$router.go(-1);
-        },
-    },
+        }
+    }
 };
 </script>
 

+ 9 - 9
src/main/vue/src/views/Admin.vue

@@ -82,11 +82,11 @@ export default {
             activeMenu: '',
             menuPath: [],
             collapse: localStorage.getItem('menu-collapse') == 'true',
-            isFullscreen: false,
+            isFullscreen: false
         };
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(['userInfo'])
     },
     methods: {
         findActiveMenu() {
@@ -94,11 +94,11 @@ export default {
             this.menuPath = [];
             let path = this.$route.path;
             const findActiveMenu = (parents, childMenus) => {
-                childMenus.forEach((i) => {
+                childMenus.forEach(i => {
                     let parents_copy = [...parents];
                     if (i.path === path) {
                         parents_copy.push(i);
-                        this.menuPath = parents_copy.map((i) => i.name);
+                        this.menuPath = parents_copy.map(i => i.name);
                         this.activeMenu = '' + i.id;
                     } else {
                         if (i.children) {
@@ -113,7 +113,7 @@ export default {
         getMenus() {
             this.$http
                 .get('/menu/userMenu', {
-                    name: '系统菜单',
+                    name: '系统菜单'
                 })
                 .then(([{ children: menus }]) => {
                     this.rawMenus = menus;
@@ -145,7 +145,7 @@ export default {
                 this.$store.commit('updateUserInfo', null);
                 this.$router.replace('/login');
             }
-        },
+        }
     },
     watch: {
         $route(val) {
@@ -161,11 +161,11 @@ export default {
         },
         collapse(val) {
             localStorage.setItem('menu-collapse', val);
-        },
+        }
     },
     components: {
-        SysMenu,
-    },
+        SysMenu
+    }
 };
 </script>
 <style lang="less">

+ 22 - 22
src/main/vue/src/views/Api.vue

@@ -101,9 +101,9 @@ import JsonView from '../components/JsonView';
 export default {
     created() {
         this.axios = axios.create({
-            baseURL: this.$baseUrl,
+            baseURL: this.$baseUrl
         });
-        this.$http.get('/dev/mappings').then((res) => {
+        this.$http.get('/dev/mappings').then(res => {
             this.urls = res.sort((a, b) => {
                 return a.className.localeCompare(b.className);
             });
@@ -114,16 +114,16 @@ export default {
             urls: [],
             formData: {
                 url: '',
-                method: 'get',
+                method: 'get'
             },
             params: [
                 {
                     key: '',
-                    value: '',
-                },
+                    value: ''
+                }
             ],
             rules: {
-                url: [{ required: true, message: '请填写URL' }],
+                url: [{ required: true, message: '请填写URL' }]
             },
             jsonResult: {},
             htmlResult: '',
@@ -132,22 +132,22 @@ export default {
             showResult: false,
             activeName: 'json',
             loading: false,
-            axios: {},
+            axios: {}
         };
     },
     methods: {
         querySearch(k, cb) {
             var arr = [];
-            this.urls.forEach((i) => {
+            this.urls.forEach(i => {
                 if (i.url.toLowerCase().indexOf(k.toLowerCase()) > -1) {
                     arr.push(i);
                 }
             });
             cb(
-                arr.map((i) => {
+                arr.map(i => {
                     return {
                         value: i.url,
-                        method: i.type,
+                        method: i.type
                     };
                 })
             );
@@ -159,7 +159,7 @@ export default {
             if (e && this.params.length - 1 === i) {
                 this.params.push({
                     key: '',
-                    value: '',
+                    value: ''
                 });
             }
         },
@@ -167,14 +167,14 @@ export default {
             if (i === 0) {
                 this.$set(this.params, 0, {
                     key: '',
-                    value: '',
+                    value: ''
                 });
             } else {
                 this.params.splice(i, 1);
             }
         },
         sendRequest() {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (valid) {
                     this.loading = true;
                     this.showResult = false;
@@ -184,19 +184,19 @@ export default {
                         method: this.formData.method,
                         url: this.formData.url,
                         headers: {
-                            Authorization: 'Bearer ' + localStorage.getItem('token'),
-                        },
+                            Authorization: 'Bearer ' + localStorage.getItem('token')
+                        }
                     };
                     if (this.formData.method === 'get') {
                         req.params = {};
-                        this.params.forEach((i) => {
+                        this.params.forEach(i => {
                             if (i.key) {
                                 req.params[i.key] = i.value;
                             }
                         });
                     } else {
                         let data = new FormData();
-                        this.params.forEach((i) => {
+                        this.params.forEach(i => {
                             if (i.key) {
                                 data.append(i.key, i.value);
                             }
@@ -204,7 +204,7 @@ export default {
                         req.data = data;
                     }
                     this.axios(req)
-                        .then((res) => {
+                        .then(res => {
                             this.loading = false;
                             this.showResult = true;
                             this.statusCode = res.status + ' ' + res.statusText;
@@ -226,7 +226,7 @@ export default {
                                 this.activeName = 'html';
                             }
                         })
-                        .catch((error) => {
+                        .catch(error => {
                             console.log(error.response);
                             this.loading = false;
                             this.showResult = true;
@@ -249,11 +249,11 @@ export default {
                         });
                 }
             });
-        },
+        }
     },
     components: {
-        JsonView,
-    },
+        JsonView
+    }
 };
 </script>
 

+ 5 - 5
src/main/vue/src/views/Dashboard.vue

@@ -46,16 +46,16 @@ export default {
                 { x: 6, y: 0, w: 6, h: 4, i: '1', name: 'UserWidget' },
                 { x: 0, y: 4, w: 6, h: 6, i: '2', name: 'BarChartWidget' },
                 { x: 0, y: 10, w: 6, h: 6, i: '3', name: 'LineChartWidget' },
-                { x: 6, y: 4, w: 6, h: 12, i: '4', name: 'PieChartWidget' },
+                { x: 6, y: 4, w: 6, h: 12, i: '4', name: 'PieChartWidget' }
             ],
-            editable: false,
+            editable: false
         };
     },
     methods: {
         save() {
             console.log(JSON.stringify(this.layout));
             this.editable = false;
-        },
+        }
     },
     components: {
         GridLayout,
@@ -63,8 +63,8 @@ export default {
         UserWidget,
         LineChartWidget,
         BarChartWidget,
-        PieChartWidget,
-    },
+        PieChartWidget
+    }
 };
 </script>
 

+ 60 - 60
src/main/vue/src/views/GenCodeEdit.vue

@@ -128,7 +128,7 @@
                                         autosize
                                         v-if="
                                             row.apiFlag === '1' &&
-                                            (row.formType === 'select' || row.formType === 'multiSelect')
+                                                (row.formType === 'select' || row.formType === 'multiSelect')
                                         "
                                     >
                                         <el-button slot="append" type="text" @click="editOptions(row)">编辑 </el-button>
@@ -139,7 +139,7 @@
                                         disabled
                                         v-if="
                                             (row.apiFlag === '2' || row.apiFlag === '3') &&
-                                            (row.formType === 'select' || row.formType === 'multiSelect')
+                                                (row.formType === 'select' || row.formType === 'multiSelect')
                                         "
                                     >
                                         <el-button slot="append" type="text" @click="editSelectField(row)"
@@ -297,28 +297,28 @@ export default {
             this.loading = true;
             this.$http
                 .get('/genCode/getOne', {
-                    className: this.$route.query.className,
+                    className: this.$route.query.className
                 })
-                .then((res) => {
+                .then(res => {
                     console.log(res);
                     this.loading = false;
 
                     this.$http
                         .get('/genCode/tableFields', {
-                            className: res.tablePackage,
+                            className: res.tablePackage
                         })
-                        .then((fields) => {
+                        .then(fields => {
                             this.formData = {
                                 ...this.formData,
                                 ...res,
                                 className: res.className,
                                 tableName: res.tableName,
-                                genRouter: false,
+                                genRouter: false
                             };
                             let finalFields = [];
 
-                            fields.forEach((field) => {
-                                let f = this.formData.fields.find((i) => {
+                            fields.forEach(field => {
+                                let f = this.formData.fields.find(i => {
                                     return (i.modelName = field.modalName);
                                 });
                                 if (f) {
@@ -330,11 +330,11 @@ export default {
                             this.fields = finalFields;
                             this.subtables = this.formData.subtables;
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                         });
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.loading = false;
                 });
@@ -344,31 +344,31 @@ export default {
                 if (this.$route.query.className) {
                     this.loading = true;
                     return this.$http.get('/genCode/getOne', {
-                        className: this.$route.query.className,
+                        className: this.$route.query.className
                     });
                 } else {
                     return Promise.resolve();
                 }
             })
-            .then((res) => {
+            .then(res => {
                 this.loading = false;
                 if (res) {
                     this.$http
                         .get('/genCode/tableFields', {
-                            className: res.tablePackage,
+                            className: res.tablePackage
                         })
-                        .then((fields) => {
+                        .then(fields => {
                             this.formData = {
                                 ...this.formData,
                                 ...res,
                                 className: res.className,
                                 tableName: res.tableName,
-                                genRouter: false,
+                                genRouter: false
                             };
                             let finalFields = [];
 
-                            fields.forEach((field) => {
-                                let f = res.fields.find((item) => {
+                            fields.forEach(field => {
+                                let f = res.fields.find(item => {
                                     return item.modelName === field.modelName;
                                 });
                                 if (f) {
@@ -380,19 +380,19 @@ export default {
                             this.fields = finalFields;
                             this.subtables = this.formData.subtables;
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                         });
                 }
                 return this.$http.get('/genCode/getSrcPath');
             })
-            .then((res) => {
+            .then(res => {
                 this.formData.javaPath = res.javaPath;
                 this.formData.viewPath = res.viewPath;
                 this.formData.routerPath = res.routerPath;
                 this.formData.resourcesPath = res.resourcesPath;
             })
-            .catch((e) => {
+            .catch(e => {
                 console.log(e);
                 this.$message.error(e.error);
                 this.loading = false;
@@ -400,26 +400,26 @@ export default {
 
         this.$http
             .get('/genCode/all')
-            .then((res) => {
+            .then(res => {
                 this.subCodes = res;
             })
-            .catch((e) => {
+            .catch(e => {
                 console.log(e);
             });
 
         this.$http
             .get('/dev/selectMappings')
-            .then((res) => {
+            .then(res => {
                 let temp = {};
                 if (res.length > 0) {
-                    res.forEach((item) => {
+                    res.forEach(item => {
                         temp[item.url] = item;
                     });
                 }
                 this.selectMappingsJson = temp;
                 this.selectMappings = res;
             })
-            .catch((e) => {
+            .catch(e => {
                 console.log(e);
             });
 
@@ -446,7 +446,7 @@ export default {
                 { label: '树形选择', value: 'tree' },
                 { label: '开关', value: 'switch' },
                 { label: '多行文本', value: 'textarea' },
-                { label: '富文本', value: 'richText' },
+                { label: '富文本', value: 'richText' }
             ],
             validatorTypes: [
                 { label: '英文', value: 'english' },
@@ -454,7 +454,7 @@ export default {
                 { label: '手机', value: 'phone' },
                 { label: '网址', value: 'url' },
                 { label: '电子邮件', value: 'email' },
-                { label: '身份证', value: 'id' },
+                { label: '身份证', value: 'id' }
             ],
             rules: {
                 className: [
@@ -469,8 +469,8 @@ export default {
                                 }
                             }
                         },
-                        trigger: 'blur',
-                    },
+                        trigger: 'blur'
+                    }
                 ],
                 tableName: [
                     { required: true, message: '请填写表名', trigger: 'blur' },
@@ -484,31 +484,31 @@ export default {
                                 }
                             }
                         },
-                        trigger: 'blur',
-                    },
+                        trigger: 'blur'
+                    }
                 ],
                 remark: [{ required: true, message: '请填写描述', trigger: 'blur' }],
                 dataBaseType: [
                     {
                         required: true,
                         message: '请选择数据库类型',
-                        trigger: 'blur',
-                    },
+                        trigger: 'blur'
+                    }
                 ],
                 dataSourceCode: [
                     {
                         required: true,
                         message: '请填选择数据库',
-                        trigger: 'blur',
-                    },
+                        trigger: 'blur'
+                    }
                 ],
                 typeFlag: [
                     {
                         required: true,
                         message: '请填填写分类',
-                        trigger: 'blur',
-                    },
-                ],
+                        trigger: 'blur'
+                    }
+                ]
             },
             formData: {
                 tableName: '',
@@ -525,7 +525,7 @@ export default {
                 dataSourceCode: 'dataSource',
                 className: '',
                 subtables: [],
-                fields: [],
+                fields: []
             },
             fields: [],
             tableList: [],
@@ -539,19 +539,19 @@ export default {
             optionsTableList: [],
             optionsFields: [],
             showGenOptionsDialog: false,
-            tempRow: {},
+            tempRow: {}
         };
     },
     computed: {
         editableFields() {
-            return this.fields.filter((i) => {
+            return this.fields.filter(i => {
                 return i.name;
             });
-        },
+        }
     },
     methods: {
         onSave() {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (valid) {
                     this.submit();
                 } else {
@@ -568,7 +568,7 @@ export default {
                 .then(() => {
                     this.loading = true;
                     return this.$http.post('/genCode/save', this.formData, {
-                        body: 'json',
+                        body: 'json'
                     });
                 })
                 .then(() => {
@@ -576,7 +576,7 @@ export default {
                     this.$message.success('代码生成成功');
                     this.$router.go(-1);
                 })
-                .catch((e) => {
+                .catch(e => {
                     this.loading = false;
                     if ('cancel' === e) {
                         this.$message.info('生成取消');
@@ -596,7 +596,7 @@ export default {
                 showInList: true,
                 showInForm: true,
                 formType: 'singleLineText',
-                sortable: true,
+                sortable: true
             });
         },
         removeField(i) {
@@ -608,16 +608,16 @@ export default {
             this.tableList = [];
             this.$http
                 .get('/dev/entities')
-                .then((res) => {
+                .then(res => {
                     this.tableList = res;
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                 });
         },
         getPackageByTableName(tableName) {
             var packageName = '';
-            this.tableList.forEach((item) => {
+            this.tableList.forEach(item => {
                 if (item.name == tableName) {
                     packageName = item.package;
                 }
@@ -637,27 +637,27 @@ export default {
         },
         getTableFields(tableName) {
             var data = {
-                className: this.getPackageByTableName(tableName),
+                className: this.getPackageByTableName(tableName)
             };
             this.$http
                 .get('/genCode/tableFields', data)
-                .then((res) => {
+                .then(res => {
                     this.fields = res;
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                 });
         },
         getOptionsTableFields(tableName) {
             var data = {
-                className: this.getPackageByTableName(tableName),
+                className: this.getPackageByTableName(tableName)
             };
             this.$http
                 .get('/genCode/tableFields', data)
-                .then((res) => {
+                .then(res => {
                     this.optionsFields = res;
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                 });
         },
@@ -666,7 +666,7 @@ export default {
                 name: '',
                 column: '',
                 subColumn: '',
-                subCode: '',
+                subCode: ''
             });
         },
         removeSubtable(i) {
@@ -721,11 +721,11 @@ export default {
         editOptions(row) {
             this.tempRow = row;
             this.showGenOptionsDialog = true;
-        },
+        }
     },
     components: {
-        GenOptionDialog,
-    },
+        GenOptionDialog
+    }
 };
 </script>
 

+ 17 - 17
src/main/vue/src/views/GenCodeList.vue

@@ -52,39 +52,39 @@ export default {
                 {
                     label: '表名',
                     value: 'tableName',
-                    show: true,
+                    show: true
                 },
                 {
                     label: '类名',
                     value: 'className',
-                    show: true,
+                    show: true
                 },
                 {
                     label: '分类',
                     value: 'typeFlag',
-                    show: true,
+                    show: true
                 },
                 {
                     label: '备注',
                     value: 'remark',
-                    show: true,
-                },
-            ],
+                    show: true
+                }
+            ]
         };
     },
     computed: {},
     methods: {
         getData() {
             let data = {
-                searchKey: this.search,
+                searchKey: this.search
             };
 
             this.$http
                 .get(this.url, data)
-                .then((res) => {
+                .then(res => {
                     this.tableData = res;
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.$message.error(e.error);
                 });
@@ -94,33 +94,33 @@ export default {
             this.$router.push({
                 path: '/genCodeEdit',
                 query: {
-                    ...this.$route.query,
-                },
+                    ...this.$route.query
+                }
             });
         },
         editRow(row) {
             this.$router.push({
                 path: '/genCodeEdit',
                 query: {
-                    className: row.className,
-                },
+                    className: row.className
+                }
             });
         },
 
         isColumnShow(column) {
-            var row = this.tableColumns.find((i) => i.value === column);
+            var row = this.tableColumns.find(i => i.value === column);
             return row ? row.show : false;
         },
         operation1() {
             this.$notify({
                 title: '提示',
-                message: this.selection,
+                message: this.selection
             });
         },
         operation2() {
             this.$message('操作2');
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 24 - 24
src/main/vue/src/views/Login.vue

@@ -110,41 +110,41 @@ export default {
                 username: '',
                 password: '',
                 phone: '',
-                code: '',
+                code: ''
             },
             register: false,
             registerInfo: {
                 username: '',
-                password: '',
+                password: ''
             },
             activeName: 'first',
             time: 0,
-            sending: false,
+            sending: false
         };
     },
     methods: {
         login() {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (valid) {
                     this.loading = true;
                     this.$http
                         .post('/auth/login', {
                             username: this.userInfo.username,
                             password: this.userInfo.password,
-                            remember: this.rememberMe,
+                            remember: this.rememberMe
                         })
-                        .then((res) => {
+                        .then(res => {
                             localStorage.setItem('token', res);
                             return this.$http.get('/user/my');
                         })
-                        .then((res) => {
+                        .then(res => {
                             this.loading = false;
                             this.$store.commit('updateUserInfo', res);
                             this.$router.replace({
-                                name: this.$route.params.name || 'dashboard',
+                                name: this.$route.params.name || 'dashboard'
                             });
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                             this.loading = false;
                             this.$message.error(e.error);
@@ -153,25 +153,25 @@ export default {
             });
         },
         phonelogin() {
-            this.$refs.form2.validate((valid) => {
+            this.$refs.form2.validate(valid => {
                 if (valid) {
                     this.loading = true;
                     this.$http
                         .post('/auth/phoneLogin', {
-                            phone: this.userInfo.phone,
+                            phone: this.userInfo.phone
                         })
-                        .then((res) => {
+                        .then(res => {
                             localStorage.setItem('token', res);
                             return this.$http.get('/user/my');
                         })
-                        .then((res) => {
+                        .then(res => {
                             this.loading = false;
                             this.$store.commit('updateUserInfo', res);
                             this.$router.replace({
-                                name: this.$route.params.name || 'dashboard',
+                                name: this.$route.params.name || 'dashboard'
                             });
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                             this.loading = false;
                             this.$message.error(e.error);
@@ -180,20 +180,20 @@ export default {
             });
         },
         doRegister() {
-            this.$refs.registerForm.validate((valid) => {
+            this.$refs.registerForm.validate(valid => {
                 if (valid) {
                     this.loading = true;
                     this.$http
                         .post('/user/register', {
                             username: this.registerInfo.username,
-                            password: this.registerInfo.password,
+                            password: this.registerInfo.password
                         })
-                        .then((res) => {
+                        .then(res => {
                             this.loading = false;
                             this.$message.success('注册成功');
                             this.register = false;
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                             this.loading = false;
                             this.$message.error(e.error);
@@ -209,13 +209,13 @@ export default {
             this.sending = true;
             this.$http
                 .get('/sms/sendVerify', {
-                    phone: this.userInfo.phone,
+                    phone: this.userInfo.phone
                 })
-                .then((res) => {
+                .then(res => {
                     this.sending = false;
                     this.checkTime();
                 })
-                .catch((e) => {
+                .catch(e => {
                     this.sending = false;
                     console.log(e);
                     this.$message.error(e.error);
@@ -229,8 +229,8 @@ export default {
                     clearInterval(i);
                 }
             }, 1000);
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped>

+ 39 - 36
src/main/vue/src/views/Menus.vue

@@ -63,12 +63,12 @@ export default {
                 path: '',
                 icon: '',
                 root: false,
-                active: true,
+                active: true
             },
             parent: null,
             currentRef: null,
             edit: false,
-            icon: '',
+            icon: ''
         };
     },
     methods: {
@@ -78,7 +78,7 @@ export default {
                 path: '',
                 active: true,
                 root: true,
-                icon: 'bars',
+                icon: 'bars'
             };
             this.parent = null;
             this.icon = 'bars';
@@ -96,7 +96,7 @@ export default {
                 path: '',
                 active: true,
                 root: false,
-                icon: null,
+                icon: null
             };
             this.icon = '';
             this.dialogVisible = true;
@@ -107,16 +107,19 @@ export default {
         showEditDialog(node, data) {
             this.edit = true;
             this.currentRef = node.data;
-            const getIconName = (icon) => {
+            const getIconName = icon => {
                 let iconName = '';
                 if (icon) {
-                    iconName = icon.replace('fas ', '').replace('fab ', '').replace('fa-', '');
+                    iconName = icon
+                        .replace('fas ', '')
+                        .replace('fab ', '')
+                        .replace('fa-', '');
                 }
                 return iconName || null;
             };
             let iconName = getIconName(data.icon);
             this.menu = {
-                ...data,
+                ...data
             };
             this.icon = iconName;
             this.dialogVisible = true;
@@ -125,14 +128,14 @@ export default {
             }, 100);
         },
         addMenu() {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (valid) {
                     this.loading = true;
                     let menu = { ...this.menu };
                     delete menu.children;
                     this.$http
                         .post('/menu/save', menu)
-                        .then((res) => {
+                        .then(res => {
                             this.loading = false;
                             this.$message.success('添加成功');
                             this.dialogVisible = false;
@@ -148,7 +151,7 @@ export default {
                                 this.menus.push(res);
                             }
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                             this.loading = false;
                             this.$message.error(e.error);
@@ -161,25 +164,25 @@ export default {
             this.$confirm('确定删除菜单?', '提示', {
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
-                type: 'error',
+                type: 'error'
             })
                 .then(() => {
                     this.$http
                         .post('/menu/save', {
                             ...data,
                             active: false,
-                            children: null,
+                            children: null
                         })
-                        .then((res) => {
+                        .then(res => {
                             this.$message.success('删除成功');
-                            let index = node.parent.data.children.findIndex((i) => {
+                            let index = node.parent.data.children.findIndex(i => {
                                 return i.id === data.id;
                             });
                             if (index > -1) {
                                 node.parent.data.children.splice(index, 1);
                             }
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                             this.loading = false;
                             this.$message.error(e.error);
@@ -196,24 +199,24 @@ export default {
                     this.$http.post('/menu/save', {
                         ...node.data,
                         children: null,
-                        sort: sort0,
+                        sort: sort0
                     }),
                     this.$http.post('/menu/save', {
                         ...node.previousSibling.data,
                         children: null,
-                        sort: sort1,
-                    }),
+                        sort: sort1
+                    })
                 ])
-                    .then((_) => {
+                    .then(_ => {
                         this.loading = false;
                         let tmp = { ...node.previousSibling.data, sort: sort1 };
                         node.previousSibling.data = {
                             ...node.data,
-                            sort: sort0,
+                            sort: sort0
                         };
                         node.data = tmp;
                     })
-                    .catch((e) => {
+                    .catch(e => {
                         console.log(e);
                         this.loading = false;
                         this.$message.error(e.error);
@@ -229,21 +232,21 @@ export default {
                     this.$http.post('/menu/save', {
                         ...node.data,
                         children: null,
-                        sort: sort1,
+                        sort: sort1
                     }),
                     this.$http.post('/menu/save', {
                         ...node.nextSibling.data,
                         children: null,
-                        sort: sort0,
-                    }),
+                        sort: sort0
+                    })
                 ])
-                    .then((_) => {
+                    .then(_ => {
                         this.loading = false;
                         let tmp = { ...node.nextSibling.data, sort: sort0 };
                         node.nextSibling.data = { ...node.data, sort: sort1 };
                         node.data = tmp;
                     })
-                    .catch((e) => {
+                    .catch(e => {
                         console.log(e);
                         this.loading = false;
                         this.$message.error(e.error);
@@ -253,10 +256,10 @@ export default {
         getData() {
             this.$http
                 .get('/menu/all')
-                .then((res) => {
+                .then(res => {
                     this.menus = res;
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.$message.error(e.error);
                 });
@@ -269,7 +272,7 @@ export default {
                     <span class="opt">
                         <el-button
                             type="text"
-                            on-click={(e) => {
+                            on-click={e => {
                                 this.moveUp(node, data), e.stopPropagation();
                             }}
                             class="up"
@@ -279,7 +282,7 @@ export default {
                         </el-button>
                         <el-button
                             type="text"
-                            on-click={(e) => {
+                            on-click={e => {
                                 this.moveDown(node, data), e.stopPropagation();
                             }}
                             icon="el-icon-bottom"
@@ -288,7 +291,7 @@ export default {
                         </el-button>
                         <el-button
                             type="text"
-                            on-click={(e) => {
+                            on-click={e => {
                                 this.showEditDialog(node, data), e.stopPropagation();
                             }}
                             icon="el-icon-edit"
@@ -297,7 +300,7 @@ export default {
                         </el-button>
                         <el-button
                             type="text"
-                            on-click={(e) => {
+                            on-click={e => {
                                 this.showAddDialog(node, data), e.stopPropagation();
                             }}
                             icon="el-icon-plus"
@@ -306,7 +309,7 @@ export default {
                         </el-button>
                         <el-button
                             type="text"
-                            on-click={(e) => {
+                            on-click={e => {
                                 this.remove(node, data), e.stopPropagation();
                             }}
                             icon="el-icon-delete"
@@ -341,13 +344,13 @@ export default {
                 FontAwesome.dom.i2svg();
                 this.menu.icon = '';
             }
-        },
+        }
     },
     watch: {
         icon(val) {
             this.showIcon(val);
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less">

+ 3 - 3
src/main/vue/src/views/RoleMenus.vue

@@ -5,14 +5,14 @@
 export default {
     data() {
         return {
-            menus: [],
+            menus: []
         };
     },
     created() {
-        this.$http.get('/menu/groupByCategory').then((res) => {
+        this.$http.get('/menu/groupByCategory').then(res => {
             this.menus = res;
         });
-    },
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 24 - 24
src/main/vue/src/views/SysConfigList.vue

@@ -122,13 +122,13 @@ export default {
                 name: '',
                 desc: '',
                 value: '',
-                type: 'STRING',
+                type: 'STRING'
             },
             rules: {
                 name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
                 desc: [{ required: true, message: '请输入描述', trigger: 'blur' }],
                 type: [{ required: true, message: '请选择类型', trigger: 'blur' }],
-                value: [{ required: true, message: '请输入值', trigger: 'blur' }],
+                value: [{ required: true, message: '请输入值', trigger: 'blur' }]
             },
             showDialog: false,
             saving: false,
@@ -137,35 +137,35 @@ export default {
             valueTypes: [
                 {
                     label: '字符串',
-                    value: 'STRING',
+                    value: 'STRING'
                 },
                 {
                     label: '日期时间',
-                    value: 'DATETIME',
+                    value: 'DATETIME'
                 },
                 {
                     label: '日期',
-                    value: 'DATE',
+                    value: 'DATE'
                 },
                 {
                     label: '时间',
-                    value: 'TIME',
+                    value: 'TIME'
                 },
                 {
                     label: '开关',
-                    value: 'BOOLEAN',
+                    value: 'BOOLEAN'
                 },
                 {
                     label: '数字',
-                    value: 'NUMBER',
-                },
-            ],
+                    value: 'NUMBER'
+                }
+            ]
         };
     },
     computed: {
         selection() {
-            return this.$refs.table.selection.map((i) => i.id);
-        },
+            return this.$refs.table.selection.map(i => i.id);
+        }
     },
     methods: {
         beforeGetData() {
@@ -181,8 +181,8 @@ export default {
             this.$router.push({
                 path: '/sysConfigEdit',
                 query: {
-                    ...this.$route.query,
-                },
+                    ...this.$route.query
+                }
             });
         },
         editRow(row, edit) {
@@ -192,7 +192,7 @@ export default {
                     name: '',
                     desc: '',
                     value: '',
-                    type: null,
+                    type: null
                 };
             }
             this.formData = { ...row };
@@ -203,9 +203,9 @@ export default {
             this.$axios
                 .get('/sysConfig/excel', {
                     responseType: 'blob',
-                    params: { size: 10000 },
+                    params: { size: 10000 }
                 })
-                .then((res) => {
+                .then(res => {
                     console.log(res);
                     this.downloading = false;
                     const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
@@ -216,26 +216,26 @@ export default {
                     link.click();
                     link.remove();
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.downloading = false;
                     this.$message.error(e.error);
                 });
         },
         save() {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (valid) {
                     let data = { ...this.formData };
                     this.saving = true;
                     this.$http
                         .post('/sysConfig/save', data, { body: 'json' })
-                        .then((res) => {
+                        .then(res => {
                             this.saving = false;
                             this.$message.success('成功');
                             this.showDialog = false;
                             this.getData();
                         })
-                        .catch((e) => {
+                        .catch(e => {
                             console.log(e);
                             this.saving = false;
                             this.showDialog = false;
@@ -247,10 +247,10 @@ export default {
             });
         },
         typeFormatter(row, cell, cellValue) {
-            let item = this.valueTypes.find((i) => i.value === cellValue);
+            let item = this.valueTypes.find(i => i.value === cellValue);
             return item ? item.label : '';
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 25 - 25
src/main/vue/src/views/UserEdit.vue

@@ -48,20 +48,20 @@ export default {
         if (this.$route.query.id) {
             this.$http
                 .get(`/user/get/${this.$route.query.id}`)
-                .then((res) => {
+                .then(res => {
                     this.formData = res;
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.$message.error(e.error);
                 });
         }
         this.$http
             .get('/authority/all')
-            .then((res) => {
+            .then(res => {
                 this.authorities = res;
             })
-            .catch((e) => {
+            .catch(e => {
                 console.log(e);
             });
     },
@@ -69,7 +69,7 @@ export default {
         return {
             saving: false,
             formData: {
-                avatar: 'https://zhumj.oss-cn-hangzhou.aliyuncs.com/image/user.jpg',
+                avatar: 'https://zhumj.oss-cn-hangzhou.aliyuncs.com/image/user.jpg'
             },
             rules: {
                 avatar: [
@@ -77,8 +77,8 @@ export default {
                         required: true,
                         regexp: /^[_.@A-Za-z0-9-]*$/,
                         message: '请上传头像',
-                        trigger: 'blur',
-                    },
+                        trigger: 'blur'
+                    }
                 ],
                 username: [{ required: true, message: '请输入昵称', trigger: 'blur' }],
                 nickname: [{ required: true, message: '请输入昵称', trigger: 'blur' }],
@@ -87,17 +87,17 @@ export default {
                     {
                         regexp: /^1[3-9]\d{9}$/,
                         message: '请输入正确的手机号',
-                        trigger: 'blur',
-                    },
+                        trigger: 'blur'
+                    }
                 ],
-                authorities: [{ required: true, message: '请选择角色', trigger: 'blur' }],
+                authorities: [{ required: true, message: '请选择角色', trigger: 'blur' }]
             },
-            authorities: [],
+            authorities: []
         };
     },
     methods: {
         onSave() {
-            this.$refs.form.validate((valid) => {
+            this.$refs.form.validate(valid => {
                 if (valid) {
                     this.submit();
                 } else {
@@ -108,16 +108,16 @@ export default {
         submit() {
             this.$http
                 .post('/user/save', this.formData, { body: 'json' })
-                .then((res) => {
+                .then(res => {
                     this.$message.success('成功');
                     this.formData = res;
                     this.$router.replace({
                         query: {
-                            id: res.id,
-                        },
+                            id: res.id
+                        }
                     });
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.$message.error(e.error);
                 });
@@ -129,10 +129,10 @@ export default {
                         .post({
                             url: '/userInfo/del',
                             data: {
-                                id: this.formData.id,
-                            },
+                                id: this.formData.id
+                            }
                         })
-                        .then((res) => {
+                        .then(res => {
                             if (res.success) {
                                 this.$message.success('成功');
                                 this.$router.go(-1);
@@ -145,19 +145,19 @@ export default {
         },
         resetPassword() {
             this.$prompt('请输入新密码', '重置密码', { inputType: 'password' })
-                .then((res) => {
+                .then(res => {
                     console.log(res);
                     if (res.value) {
                         this.$alert('确定重置密码?', '提示', {
-                            showCancelButton: true,
+                            showCancelButton: true
                         })
                             .then(() => {
                                 return this.$http.post('/user/setPasswordAdmin', {
                                     userId: this.formData.id,
-                                    password: res.value,
+                                    password: res.value
                                 });
                             })
-                            .then((res) => {
+                            .then(res => {
                                 this.$message.success('密码重置成功');
                             })
                             .catch(() => {
@@ -166,8 +166,8 @@ export default {
                     }
                 })
                 .catch(() => {});
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 17 - 17
src/main/vue/src/views/UserList.vue

@@ -78,14 +78,14 @@ export default {
             multipleMode: false,
             search: '',
             url: '/user/all',
-            downloading: false,
+            downloading: false
         };
     },
     computed: {
         ...mapState([]),
         selection() {
-            return this.$refs.table.selection.map((i) => i.id);
-        },
+            return this.$refs.table.selection.map(i => i.id);
+        }
     },
     methods: {
         beforeGetData() {
@@ -103,23 +103,23 @@ export default {
             this.$router.push({
                 path: '/userEdit',
                 query: {
-                    ...this.$route.query,
-                },
+                    ...this.$route.query
+                }
             });
         },
         editRow(row) {
             this.$router.push({
                 path: '/userEdit',
                 query: {
-                    id: row.id,
-                },
+                    id: row.id
+                }
             });
         },
         download() {
             this.downloading = true;
             this.$axios
                 .get('/user/excel', { responseType: 'blob' })
-                .then((res) => {
+                .then(res => {
                     console.log(res);
                     this.downloading = false;
                     const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
@@ -130,7 +130,7 @@ export default {
                     link.click();
                     link.remove();
                 })
-                .catch((e) => {
+                .catch(e => {
                     console.log(e);
                     this.downloading = false;
                     this.$message.error(e.error);
@@ -139,7 +139,7 @@ export default {
         operation1() {
             this.$notify({
                 title: '提示',
-                message: this.selection,
+                message: this.selection
             });
         },
         operation2() {
@@ -154,29 +154,29 @@ export default {
             if (clickData.i) {
                 clearInterval(clickData.i);
             }
-            clickData.i = setTimeout((_) => {
+            clickData.i = setTimeout(_ => {
                 clickData.c = 0;
             }, 200);
             if (clickData.c === 5) {
                 this.$http
                     .get(`/user/getToken/${row.id}`)
-                    .then((res) => {
+                    .then(res => {
                         let el = document.createElement('div');
                         new ClipboardJS(el, {
-                            text: function (trigger) {
+                            text: function(trigger) {
                                 return res;
-                            },
+                            }
                         });
                         el.click();
                         this.$message.success('已复制Token');
                         clickData.c = 0;
                     })
-                    .catch((e) => {
+                    .catch(e => {
                         this.$message.error(e.error);
                     });
             }
-        },
-    },
+        }
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 15 - 15
src/main/vue/src/widgets/BarChartWidget.vue

@@ -13,8 +13,8 @@ export default {
             myChart: null,
             bodyStyle: {
                 display: 'flex',
-                alignItems: 'center',
-            },
+                alignItems: 'center'
+            }
         };
     },
     mounted() {
@@ -34,7 +34,7 @@ export default {
                             'rgba(255, 206, 86, 0.2)',
                             'rgba(75, 192, 192, 0.2)',
                             'rgba(153, 102, 255, 0.2)',
-                            'rgba(255, 159, 64, 0.2)',
+                            'rgba(255, 159, 64, 0.2)'
                         ],
                         borderColor: [
                             'rgba(255,99,132,1)',
@@ -42,11 +42,11 @@ export default {
                             'rgba(255, 206, 86, 1)',
                             'rgba(75, 192, 192, 1)',
                             'rgba(153, 102, 255, 1)',
-                            'rgba(255, 159, 64, 1)',
+                            'rgba(255, 159, 64, 1)'
                         ],
-                        borderWidth: 1,
-                    },
-                ],
+                        borderWidth: 1
+                    }
+                ]
             },
             options: {
                 maintainAspectRatio: false,
@@ -54,17 +54,17 @@ export default {
                     yAxes: [
                         {
                             ticks: {
-                                beginAtZero: false,
-                            },
-                        },
-                    ],
-                },
-            },
+                                beginAtZero: false
+                            }
+                        }
+                    ]
+                }
+            }
         });
     },
     components: {
-        WidgetCard,
-    },
+        WidgetCard
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 8 - 8
src/main/vue/src/widgets/LineChartWidget.vue

@@ -13,8 +13,8 @@ export default {
             myChart: null,
             bodyStyle: {
                 display: 'flex',
-                alignItems: 'center',
-            },
+                alignItems: 'center'
+            }
         };
     },
     mounted() {
@@ -34,16 +34,16 @@ export default {
                         backgroundColor: gradient,
                         borderColor: '#20a0ff',
                         borderWidth: '1px',
-                        data: [40, 39, 10, 40, 39, 80, 40],
-                    },
-                ],
+                        data: [40, 39, 10, 40, 39, 80, 40]
+                    }
+                ]
             },
-            options: { responsive: true, maintainAspectRatio: false },
+            options: { responsive: true, maintainAspectRatio: false }
         });
     },
     components: {
-        WidgetCard,
-    },
+        WidgetCard
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 8 - 8
src/main/vue/src/widgets/PieChartWidget.vue

@@ -13,8 +13,8 @@ export default {
             myChart: null,
             bodyStyle: {
                 display: 'flex',
-                alignItems: 'center',
-            },
+                alignItems: 'center'
+            }
         };
     },
     mounted() {
@@ -27,16 +27,16 @@ export default {
                 datasets: [
                     {
                         backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16'],
-                        data: [40, 20, 80, 10],
-                    },
-                ],
+                        data: [40, 20, 80, 10]
+                    }
+                ]
             },
-            options: { responsive: true, maintainAspectRatio: false },
+            options: { responsive: true, maintainAspectRatio: false }
         });
     },
     components: {
-        WidgetCard,
-    },
+        WidgetCard
+    }
 };
 </script>
 <style lang="less" scoped></style>

+ 4 - 4
src/main/vue/src/widgets/UserWidget.vue

@@ -15,13 +15,13 @@ export default {
         return {
             bodyStyle: {
                 display: 'flex',
-                alignItems: 'center',
-            },
+                alignItems: 'center'
+            }
         };
     },
     components: {
-        WidgetCard,
-    },
+        WidgetCard
+    }
 };
 </script>
 <style lang="less" scoped>

+ 3 - 3
src/main/vue/src/widgets/WidgetCard.vue

@@ -14,10 +14,10 @@ export default {
     data() {
         return {
             mBodyStyle: {
-                flexGrow: 1,
-            },
+                flexGrow: 1
+            }
         };
-    },
+    }
 };
 </script>
 <style lang="less" scoped>

+ 4 - 4
src/main/vue/vue.config.js

@@ -2,12 +2,12 @@ const path = require('path');
 module.exports = {
     publicPath: process.env.NODE_ENV === 'production' ? '/admin/' : '/',
     devServer: {
-        port: 8081,
+        port: 8081
     },
     pluginOptions: {
         'style-resources-loader': {
             preProcessor: 'less',
-            patterns: [path.resolve(__dirname, './src/styles/common/*.less')],
-        },
-    },
+            patterns: [path.resolve(__dirname, './src/styles/common/*.less')]
+        }
+    }
 };

+ 1 - 6
src/main/vue/yarn.lock

@@ -6559,16 +6559,11 @@ prettier-linter-helpers@^1.0.0:
   dependencies:
     fast-diff "^1.1.2"
 
-prettier@^1.18.2:
+prettier@1.19.1, prettier@^1.18.2:
   version "1.19.1"
   resolved "https://registry.npm.taobao.org/prettier/download/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
   integrity sha1-99f1/4qc2HKnvkyhQglZVqYHl8s=
 
-prettier@^2.0.5:
-  version "2.0.5"
-  resolved "https://registry.npm.taobao.org/prettier/download/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
-  integrity sha1-1tVigkVSQ/L5LMFxZpLAiqMVItQ=
-
 pretty-error@^2.0.2:
   version "2.1.1"
   resolved "https://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"