From 8b060b8bf1238598f467d8628f69077146e05a0c Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 4 Aug 2022 15:42:36 +0800 Subject: [PATCH] =?UTF-8?q?add=20prettierrc=20&=20=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 11 + .../ren-dept-tree/src/ren-dept-tree.vue | 2 +- .../ren-region-tree/src/ren-region-tree.vue | 2 +- src/views/main-navbar.vue | 2 +- src/views/main.vue | 214 ++++---- .../code/equipmenplcconnect-add-or-update.vue | 329 ++++++------ .../code/equipmenstatuslog-add-or-update.vue | 393 +++++++-------- src/views/modules/code/equipment.vue | 472 ++++++------------ .../modules/job/schedule-add-or-update.vue | 2 +- src/views/modules/job/schedule-log.vue | 2 +- src/views/modules/oss/oss-config.vue | 414 ++++++++------- src/views/modules/sys/dept-add-or-update.vue | 292 +++++------ .../modules/sys/dict-data-add-or-update.vue | 189 +++---- .../modules/sys/dict-type-add-or-update.vue | 2 +- src/views/modules/sys/menu-add-or-update.vue | 419 ++++++++-------- .../modules/sys/params-add-or-update.vue | 2 +- src/views/modules/sys/role-add-or-update.vue | 6 +- src/views/modules/sys/user-add-or-update.vue | 4 +- 18 files changed, 1274 insertions(+), 1483 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..fb44611 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "singleQuote": true, + "tabWidth": 2, + "bracketSameLine": true, + "embeddedLanguageFormatting": "auto", + "printWidth": 180, + "quoteProps": "consistent", + "trailingComma": "none", + "semi": false, + "useTabs": true +} \ No newline at end of file diff --git a/src/components/ren-dept-tree/src/ren-dept-tree.vue b/src/components/ren-dept-tree/src/ren-dept-tree.vue index 461aed1..7c1c7e3 100644 --- a/src/components/ren-dept-tree/src/ren-dept-tree.vue +++ b/src/components/ren-dept-tree/src/ren-dept-tree.vue @@ -76,7 +76,7 @@ export default { return data.name.indexOf(value) !== -1 }, getDeptList (id) { - return this.$http.get('/sys/dept/list').then(({ data: res }) => { + return this.$http.get(this.$http.adornUrl('/sys/dept/list')).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/components/ren-region-tree/src/ren-region-tree.vue b/src/components/ren-region-tree/src/ren-region-tree.vue index 9036a24..c99003a 100644 --- a/src/components/ren-region-tree/src/ren-region-tree.vue +++ b/src/components/ren-region-tree/src/ren-region-tree.vue @@ -90,7 +90,7 @@ export default { return data.name.indexOf(value) !== -1 }, getDataList (id) { - return this.$http.get('/sys/region/tree').then(({ data: res }) => { + return this.$http.get(this.$http.adornUrl('/sys/region/tree')).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/main-navbar.vue b/src/views/main-navbar.vue index 741b933..1d1013c 100644 --- a/src/views/main-navbar.vue +++ b/src/views/main-navbar.vue @@ -94,7 +94,7 @@ export default { return this.$message.error(res.msg) } clearLoginInfo() - this.$router.push({ name: 'login' }) + this.$router.push({ name: "Login" }) }).catch(() => {}) }).catch(() => {}) } diff --git a/src/views/main.vue b/src/views/main.vue index eeb443e..2a223d3 100644 --- a/src/views/main.vue +++ b/src/views/main.vue @@ -1,118 +1,108 @@ diff --git a/src/views/modules/code/equipmenplcconnect-add-or-update.vue b/src/views/modules/code/equipmenplcconnect-add-or-update.vue index 72766d2..c7edf67 100644 --- a/src/views/modules/code/equipmenplcconnect-add-or-update.vue +++ b/src/views/modules/code/equipmenplcconnect-add-or-update.vue @@ -1,183 +1,156 @@ diff --git a/src/views/modules/code/equipmenstatuslog-add-or-update.vue b/src/views/modules/code/equipmenstatuslog-add-or-update.vue index c68898b..739ccc6 100644 --- a/src/views/modules/code/equipmenstatuslog-add-or-update.vue +++ b/src/views/modules/code/equipmenstatuslog-add-or-update.vue @@ -1,219 +1,184 @@ diff --git a/src/views/modules/code/equipment.vue b/src/views/modules/code/equipment.vue index 7068b13..7bad911 100644 --- a/src/views/modules/code/equipment.vue +++ b/src/views/modules/code/equipment.vue @@ -1,314 +1,168 @@ diff --git a/src/views/modules/job/schedule-add-or-update.vue b/src/views/modules/job/schedule-add-or-update.vue index 5808308..d036ef3 100644 --- a/src/views/modules/job/schedule-add-or-update.vue +++ b/src/views/modules/job/schedule-add-or-update.vue @@ -72,7 +72,7 @@ export default { }, // 获取信息 getInfo () { - this.$http.get(`/sys/schedule/${this.dataForm.id}`).then(({ data: res }) => { + this.$http.get(this.$http.adornUrl(`/sys/schedule/${this.dataForm.id}`)).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/job/schedule-log.vue b/src/views/modules/job/schedule-log.vue index 11a7f30..bf6b2c2 100644 --- a/src/views/modules/job/schedule-log.vue +++ b/src/views/modules/job/schedule-log.vue @@ -62,7 +62,7 @@ export default { }, // 失败信息 showErrorInfo (id) { - this.$http.get(`/sys/scheduleLog/${id}`).then(({ data: res }) => { + this.$http.get(this.$http.adornUrl(`/sys/scheduleLog/${id}`)).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/oss/oss-config.vue b/src/views/modules/oss/oss-config.vue index bc53d5a..cfdf0bf 100644 --- a/src/views/modules/oss/oss-config.vue +++ b/src/views/modules/oss/oss-config.vue @@ -1,225 +1,205 @@ diff --git a/src/views/modules/sys/dept-add-or-update.vue b/src/views/modules/sys/dept-add-or-update.vue index 33c0de8..09c78ea 100644 --- a/src/views/modules/sys/dept-add-or-update.vue +++ b/src/views/modules/sys/dept-add-or-update.vue @@ -1,154 +1,164 @@ diff --git a/src/views/modules/sys/dict-data-add-or-update.vue b/src/views/modules/sys/dict-data-add-or-update.vue index 96a3f34..a5ff947 100644 --- a/src/views/modules/sys/dict-data-add-or-update.vue +++ b/src/views/modules/sys/dict-data-add-or-update.vue @@ -1,101 +1,104 @@ diff --git a/src/views/modules/sys/dict-type-add-or-update.vue b/src/views/modules/sys/dict-type-add-or-update.vue index 8ef034b..98a16a4 100644 --- a/src/views/modules/sys/dict-type-add-or-update.vue +++ b/src/views/modules/sys/dict-type-add-or-update.vue @@ -63,7 +63,7 @@ export default { }, // 获取信息 getInfo () { - this.$http.get(`/sys/dict/type/${this.dataForm.id}`).then(({ data: res }) => { + this.$http.get(this.$http.adornUrl(`/sys/dict/type/${this.dataForm.id}`)).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/sys/menu-add-or-update.vue b/src/views/modules/sys/menu-add-or-update.vue index 104b3b8..1cb2bbd 100644 --- a/src/views/modules/sys/menu-add-or-update.vue +++ b/src/views/modules/sys/menu-add-or-update.vue @@ -1,221 +1,226 @@ diff --git a/src/views/modules/sys/params-add-or-update.vue b/src/views/modules/sys/params-add-or-update.vue index df61ea8..52517ff 100644 --- a/src/views/modules/sys/params-add-or-update.vue +++ b/src/views/modules/sys/params-add-or-update.vue @@ -56,7 +56,7 @@ export default { }, // 获取信息 getInfo () { - this.$http.get(`/sys/params/${this.dataForm.id}`).then(({ data: res }) => { + this.$http.get(this.$http.adornUrl(`/sys/params/${this.dataForm.id}`)).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index 9e25109..3ee4646 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -86,7 +86,7 @@ export default { }, // 获取菜单列表 getMenuList () { - return this.$http.get('/sys/menu/select').then(({ data: res }) => { + return this.$http.get(this.$http.adornUrl('/sys/menu/select')).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -95,7 +95,7 @@ export default { }, // 获取部门列表 getDeptList () { - return this.$http.get('/sys/dept/list').then(({ data: res }) => { + return this.$http.get(this.$http.adornUrl('/sys/dept/list')).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -104,7 +104,7 @@ export default { }, // 获取信息 getInfo () { - this.$http.get(`/sys/role/${this.dataForm.id}`).then(({ data: res }) => { + this.$http.get(this.$http.adornUrl(`/sys/role/${this.dataForm.id}`)).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue index b76c369..884e119 100644 --- a/src/views/modules/sys/user-add-or-update.vue +++ b/src/views/modules/sys/user-add-or-update.vue @@ -141,7 +141,7 @@ export default { }, // 获取角色列表 getRoleList () { - return this.$http.get('/sys/role/list').then(({ data: res }) => { + return this.$http.get(this.$http.adornUrl('/sys/role/list')).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -150,7 +150,7 @@ export default { }, // 获取信息 getInfo () { - this.$http.get(`/sys/user/${this.dataForm.id}`).then(({ data: res }) => { + this.$http.get(this.$http.adornUrl(`/sys/user/${this.dataForm.id}`)).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) }