diff --git a/src/style/fix.scss b/src/style/fix.scss
index e07678b..7933fca 100644
--- a/src/style/fix.scss
+++ b/src/style/fix.scss
@@ -52,6 +52,26 @@
--el-pagination-button-width-small:28px;
--el-pagination-button-height-small:28px;
}
+.el-tabs.role_tabs{
+ --el-tabs-header-height:60px;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ .el-tabs__header{
+ .el-tabs__nav{
+ padding: 0 20px;
+ }
+ }
+ .el-tabs__content{
+ flex: 1;
+ overflow: hidden;
+ padding-left: 10px;
+ padding-bottom: 10px;
+ .el-tab-pane{
+ height: 100%;
+ }
+ }
+}
.el-menu {border: none!important;}
.el-menu .el-menu-item.is-active{background: var(--el-menu-hover-bg-color);position: relative;}
@@ -70,6 +90,7 @@
.el-header .right-panel > * + * {margin-left:10px;}
.el-footer {background: #fff;border-top: 1px solid var(--el-border-color-light);padding:13px 15px;}
.el-main {padding:10px;width: 100%;height: 100%;box-sizing: border-box;background: var(--el-color-white);border-radius: 4px;}
+.el-main.treeMain{border-radius: 0;}
.el-main.nopadding {padding:0;background: #fff;display: flex;flex-direction: column;}
.el-main.nopadding .scTable{flex: 1;overflow: hidden;}
diff --git a/src/style/user.scss b/src/style/user.scss
index 2ab791d..7b5f328 100644
--- a/src/style/user.scss
+++ b/src/style/user.scss
@@ -107,3 +107,83 @@
}
}
}
+
+
+/** 角色设置 */
+.bodyView{
+ display: flex;
+ font-size: 12px;
+ .viewLeft{
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ .treeUser{
+ padding: 10px 15px 10px 0;
+ }
+ }
+ .iconRight{
+ flex-basis: 30px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ .icon{
+ width: 14px;
+ }
+ }
+ .viewRight{
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ .checkList{
+ display: flex;
+ justify-content: space-between;
+ margin:8px 15px 8px 15px;
+ .leftTitle{
+ flex: 1;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ color: var(--el-color-primary);
+ .avatar{
+ background: var(--el-color-primary);
+ color: var(--el-color-white);
+ border-radius: 50%;
+ display: inline-block;
+ height: 21px;
+ width: 21px;
+ text-align: center;
+ line-height: 21px;
+ }
+ .name{
+ margin-left: 10px;
+ }
+ }
+ .userBtn{
+ flex-basis: 12px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ }
+ .userBtn:hover{
+ color: var(--el-color-primary);
+ }
+ }
+ .checkList:first-child{
+ margin-top: 10px;
+ }
+ .checkList:last-child{
+ margin-bottom: 10px;
+ }
+ }
+ .viewTitle{
+ flex-basis: 35px;
+ }
+ .viewCom{
+ flex: 1;
+ border: 1px solid var(--el-border-color-light);
+ min-height: 200px;
+ max-height: 400px;
+ border-radius: 8px;
+ }
+}
diff --git a/src/utils/request.js b/src/utils/request.js
index b361d81..5cbf460 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -33,6 +33,8 @@ let MessageBox_401_show = false
// HTTP response 拦截器
axios.interceptors.response.use(
(response) => {
+ // const contentDisposition = response.headers['Content-Disposition'];
+ // console.log(response,677)
const token = response.headers.authorization;
if (token) {
let reToken = token.replace(/Bearer /g, "");
@@ -69,7 +71,10 @@ axios.interceptors.response.use(
message: response.data.msg || "Status:500,服务器发生错误!",
});
} else if (api_code === 0 || api_code !== 200) {
- ElMessage.warning(response.data.message);
+ const contentType = response.headers.get('Content-Type');
+ if(contentType.includes('application/json')){
+ ElMessage.warning(response.data.message);
+ }
}
return response;
diff --git a/src/utils/tool.js b/src/utils/tool.js
index c71c425..c585fac 100644
--- a/src/utils/tool.js
+++ b/src/utils/tool.js
@@ -306,4 +306,19 @@ tool.getParameterByName = function(name, url) {
return decodedValue;
}
+tool.isBinaryString = function (str){
+ return /[^\t\n\r\x20-\x7E]/.test(str);
+}
+
+tool.isBinaryFile = function (file) {
+ const reader = new FileReader();
+ return new Promise((resolve) => {
+ reader.onloadend = () => {
+ const binaryString = reader.result;
+ resolve(tool.isBinaryString(binaryString));
+ };
+ reader.readAsBinaryString(file.slice(0, 1024));
+ });
+}
+
export default tool
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index fec75df..23e31e6 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -156,7 +156,7 @@
.login_adv__mask {
background-size: cover;
- background-position: 0;
+ background-position: 20%;
background-repeat: no-repeat;
background-image: url(https://dm-auto.oss-cn-shanghai.aliyuncs.com/xw_cloud/image/login_back.png);
width: calc(100% - 460px);
diff --git a/src/views/setting/company/index.vue b/src/views/setting/company/index.vue
index 5a64353..587d31e 100644
--- a/src/views/setting/company/index.vue
+++ b/src/views/setting/company/index.vue
@@ -154,10 +154,16 @@ export default {
})
},
async importTemplate() {
- const res = await this.$API.system.company.template.get();
- if(res.code == 200){
- console.log(res.data)
- }
+ const res = await this.$API.system.company.template.post();
+ const blob = new Blob([res.data]);
+ const eLink = document.createElement('a');
+ eLink.download = "company_import_template_20240716093538_6695ce6a3ca1f.xlsx";
+ eLink.style.display = 'none';
+ eLink.href = URL.createObjectURL(blob);
+ document.body.appendChild(eLink);
+ eLink.click();
+ URL.revokeObjectURL(eLink.href); // 释放URL 对象
+ document.body.removeChild(eLink);
},
//编辑
diff --git a/src/views/setting/company/save.vue b/src/views/setting/company/save.vue
index 2ceb00f..9247fd2 100644
--- a/src/views/setting/company/save.vue
+++ b/src/views/setting/company/save.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/views/setting/role/dataTree.vue b/src/views/setting/role/dataTree.vue
index 07960d6..465cc8b 100644
--- a/src/views/setting/role/dataTree.vue
+++ b/src/views/setting/role/dataTree.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/views/setting/role/index.vue b/src/views/setting/role/index.vue
index 3eea8b8..c79b160 100644
--- a/src/views/setting/role/index.vue
+++ b/src/views/setting/role/index.vue
@@ -1,60 +1,116 @@
-
+
- 新建
-
- 权限设置
+ 新增角色
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 修改
- 删除
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存权限
+
+
+ 移除成员
+ 添加成员
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
已选成员 ({{userCheckList.length}})
+
+
+
+
+
{{ userAvatar(item) }}
+
{{item.name}}
+
+
+
+
+
+
+
+
+ 取 消
+ 保 存
+
+
-
-
-
diff --git a/src/views/setting/role/members.vue b/src/views/setting/role/members.vue
index 16981e7..6f0de75 100644
--- a/src/views/setting/role/members.vue
+++ b/src/views/setting/role/members.vue
@@ -1,13 +1,14 @@
-
+
@@ -16,8 +17,9 @@
{{index+1}}
{{item.name}}
-
{{item.department}}
{{item.mobile}}
+
{{item.email}}
+
{{item.department}}
@@ -83,6 +85,11 @@ export default {
diff --git a/src/views/setting/user/index.vue b/src/views/setting/user/index.vue
index f3ec7d6..38542ed 100644
--- a/src/views/setting/user/index.vue
+++ b/src/views/setting/user/index.vue
@@ -1,11 +1,11 @@
-
+
-
+