From 27b72b85dc9199294320fb8a415fecc58e3cf0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Tue, 9 Jul 2024 20:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E5=88=A0=E9=99=A4=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/system.js | 2 +- src/api/model/user.js | 7 +++ src/style/home.scss | 32 ++++++++++++++ src/views/home/console/components/bar.vue | 10 ++--- src/views/home/console/index.vue | 10 ++--- src/views/setting/company/index.vue | 52 ++++++++++------------- src/views/setting/deptMag/index.vue | 21 +++++---- src/views/setting/role/index.vue | 16 ++++--- src/views/setting/user/rePwd.vue | 17 ++------ 9 files changed, 100 insertions(+), 67 deletions(-) diff --git a/src/api/model/system.js b/src/api/model/system.js index 651b4a6..85b9d69 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -309,7 +309,7 @@ export default { } }, userCompanyList:{ - url: `${config.API_URL}/company.user.list`, + url: `${config.API_URL}/organization.user.list`, name: "查看公司用户列表", get: async function (params) { return await http.post(this.url, params); diff --git a/src/api/model/user.js b/src/api/model/user.js index a21f5b9..e3256e2 100644 --- a/src/api/model/user.js +++ b/src/api/model/user.js @@ -51,6 +51,13 @@ export default { return await http.post(this.url, params); }, }, + resetPass:{ + url: `${config.API_URL}/user.reset.pwd`, + name: "重置个人密码", + post: async function (params) { + return await http.post(this.url, params); + }, + }, timeoutConfig:{ url: `${config.API_URL}/system.login.timeout.config`, name: "登录超时退出配置", diff --git a/src/style/home.scss b/src/style/home.scss index 9f30d2f..ce9f4d2 100644 --- a/src/style/home.scss +++ b/src/style/home.scss @@ -129,6 +129,7 @@ display: flex; align-items: center; justify-content: space-between; + flex-wrap: wrap; .comMain{ .num{ color: var(--el-color-dark); @@ -168,3 +169,34 @@ } +@media (max-width: 992px){ + .consoleView{ + .headerBox{ + + } + .middleBox{ + .briefing{ + .item{ + .comMain{ + margin-bottom: 10px; + .num{ + height: 80px; + } + } + } + } + } + .footerBox{ + + } + .progressView{ + height: 200px; + } + .chartView{ + height: 460px; + + } + } +} + + diff --git a/src/views/home/console/components/bar.vue b/src/views/home/console/components/bar.vue index 2350148..6874f59 100644 --- a/src/views/home/console/components/bar.vue +++ b/src/views/home/console/components/bar.vue @@ -18,7 +18,7 @@ export default { trigger: 'axis' }, grid: { - left: '1%', + left: "1%", right: '5%', bottom: '3%', top: "3%", @@ -72,8 +72,8 @@ export default { show:false, smooth:false, }, - lineStyle: { - width: 2, + itemStyle: { + color: '#1367C1', }, areaStyle: { opacity: 0.4, @@ -87,8 +87,8 @@ export default { symbol: 'none', labelLine:{ }, - lineStyle: { - width: 2, + itemStyle: { + color: '#2A91C4', }, areaStyle: { opacity: 0.4, diff --git a/src/views/home/console/index.vue b/src/views/home/console/index.vue index 51c3eea..f0566b8 100644 --- a/src/views/home/console/index.vue +++ b/src/views/home/console/index.vue @@ -43,7 +43,7 @@ -
+
不良率
@@ -74,7 +74,7 @@
-
+
占位
@@ -86,7 +86,7 @@
-
+
实时数据
@@ -94,7 +94,7 @@
-
+
占位
@@ -102,7 +102,7 @@
-
+
占位
diff --git a/src/views/setting/company/index.vue b/src/views/setting/company/index.vue index 205ae22..759e274 100644 --- a/src/views/setting/company/index.vue +++ b/src/views/setting/company/index.vue @@ -140,27 +140,18 @@ export default { }, //删除 async table_del(row){ - const reqData = {id: row.id}; - const res = await this.$API.system.company.delete.post(reqData); - if(res.code == 200){ - this.$refs.table.refresh() - this.$message.success("删除成功") - }else{ - await this.$alert(res.message, "提示", {type: 'error'}) - } - }, - //批量删除 - async batch_del(){ - this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', { + this.$confirm(`确定删除 ${row.name} 吗?`, '提示', { type: 'warning' - }).then(() => { - const loading = this.$loading(); - this.$refs.table.refresh() - loading.close(); - this.$message.success("操作成功") - }).catch(() => { - - }) + }).then(async () => { + const reqData = {id: row.id}; + const res = await this.$API.system.company.delete.post(reqData); + if(res.code == 200){ + this.$refs.table.refresh() + this.$message.success("删除成功") + }else{ + await this.$alert(res.message, "提示", {type: 'error'}) + } + }).catch(()=>{}) }, // 功能授权 table_empower(row){ @@ -174,14 +165,13 @@ export default { }, // 公司用户列表 table_user_ist(row){ - this.$message.warning(row.name+' 暂无接口') - // this.$router.push({ - // path: '/setting/user/company-user-list', - // query: { - // id: row.id, - // name:row.name - // } - // }) + this.$router.push({ + path: '/setting/user/company-user-list', + query: { + id: row.id, + name:row.name + } + }) }, //表格选择后回调事件 selectionChange(selection){ @@ -208,7 +198,11 @@ export default { }, reset(){ this.$refs.table.reload(); - } + }, + + handleSaveSuccess(){ + this.$refs.table.refresh(); + }, } } diff --git a/src/views/setting/deptMag/index.vue b/src/views/setting/deptMag/index.vue index 96a1b3b..478ce29 100644 --- a/src/views/setting/deptMag/index.vue +++ b/src/views/setting/deptMag/index.vue @@ -105,14 +105,19 @@ }, //删除 async table_del(row){ - const reqData = {id: row.id}; - const res = await this.$API.system.dept.delete.post(reqData); - if(res.code == 200){ - this.$refs.table.refresh() - this.$message.success("删除成功") - }else{ - await this.$alert(res.message, "提示", {type: 'error'}) - } + this.$confirm(`确定删除 ${row.name} 吗?`, '提示', { + type: 'warning' + }).then(async () => { + const reqData = {id: row.id}; + const res = await this.$API.system.dept.delete.post(reqData); + if(res.code == 200){ + this.$refs.table.refresh() + this.$message.success("删除成功") + }else{ + await this.$alert(res.message, "提示", {type: 'error'}) + } + }).catch(()=>{}) + }, //批量删除 async batch_del(){ diff --git a/src/views/setting/role/index.vue b/src/views/setting/role/index.vue index dc656f1..9361c68 100644 --- a/src/views/setting/role/index.vue +++ b/src/views/setting/role/index.vue @@ -96,12 +96,16 @@ }, //删除 async table_del(row){ - const params = {ids: [row.id]}; - const res = await this.$API.system.role.delete.post(params); - if(res.code == 200){ - this.$refs.table.refresh() - this.$message.success("删除成功") - } + this.$confirm(`确定删除 ${row.role_name} 吗?`, '提示', { + type: 'warning' + }).then(async () => { + const params = {ids: [row.id]}; + const res = await this.$API.system.role.delete.post(params); + if(res.code == 200){ + this.$refs.table.refresh() + this.$message.success("删除成功") + } + }).catch(()=>{}) }, //批量删除 async batch_del(){ diff --git a/src/views/setting/user/rePwd.vue b/src/views/setting/user/rePwd.vue index e96e72f..be9a3e7 100644 --- a/src/views/setting/user/rePwd.vue +++ b/src/views/setting/user/rePwd.vue @@ -1,11 +1,6 @@