feat: 细节调整

This commit is contained in:
xuziqiang
2024-06-11 13:37:10 +08:00
parent cbfa942ff6
commit d58f066b39
8 changed files with 116 additions and 78 deletions

View File

@@ -5,7 +5,11 @@ import { http } from '/nerv-lib/saas';
import { ref } from 'vue';
import { permission } from '/@/api/origanizemanage';
const value = ref('1');
// const { linkList } = sessionStorage.getItem('userInfo')
// ? JSON.parse(sessionStorage.getItem('userInfo')!)
// : [{}];
// const value = ref(linkList[0]?.orgId);
const transform = (data, map) => {
return Object.keys(map).reduce((pre, cur) => {
pre[cur] = data[map[cur]];
@@ -49,18 +53,20 @@ export const appConfig = {
// },
headerSlotConfig: {
component: 'NsSelect',
component: 'NsSelectApi',
componentProps: {
style: { width: '200px' },
api: '/carbon-smart/user/login/logInInfo',
placeholder: '请选择',
value,
autoSelectFirst: true,
onChange: (cur) => {
value.value = cur;
// value.value = cur;
},
options: [
{ label: '济阳', value: '1' },
{ label: '临沂', value: '2' },
],
resultField: 'data.linkList',
labelField: 'orgName',
valueField: 'orgId',
immediate: true,
dropdownReload: true,
},
},
timeout: 60 * 1000,
@@ -78,7 +84,10 @@ export const appConfig = {
orgId: 'orgId',
orgName: 'orgName',
projectId: 'projectId',
linkList: 'linkList',
permissionInfoList: 'permissionInfoList',
});
return { data: { ...trD } };
});
},

View File

@@ -439,16 +439,14 @@
// disabled.value = !disabled.value;
// console.log(formData.value.name, 'formData');
console.log(opMap.type, 'ApartmentSure');
const opArr = ['addDept', 'editDpet'];
const opArr = ['addDept', 'editDpet', 'addson'];
if (opArr.includes(opMap.type)) {
console.log(formRef.value, formData);
opMap.fuc &&
opMap.fuc(formData.value).then(() => {
getTree();
});
} else if (selectRef.value && opMap.type === 'addson')
opMap.fuc && opMap.fuc(formData.value);
else if (opMap.type === 'deptDelete') {
} else if (opMap.type === 'deptDelete') {
opMap.fuc && opMap.fuc({ ...formData.value, selectRef: selectRef.value });
}
};

View File

@@ -5,7 +5,7 @@
<div class="left">
<div class="top">
<div class="ns-table-title">关联企业</div>
<div style="height: 100%; overflow-y: auto">
<div>
<a-input-search
v-model:value="searchValue"
style="margin-bottom: 8px"
@@ -22,7 +22,7 @@
</a-tree>
</div>
</div>
<div>
<div class="top">
<div class="ns-table-title">关联部门</div>
<a-input-search
@@ -371,6 +371,17 @@
defaultParams: { userStatus: 1 },
dynamicParams: 'userId',
isReload: true,
ifShow: ({ userStatus }) => userStatus === 0,
api: origanizemanage.frozen,
},
{
label: '解冻',
name: 'userUnFrozen',
confirm: true,
defaultParams: { userStatus: 0 },
dynamicParams: 'userId',
ifShow: ({ userStatus }) => userStatus === 1,
isReload: true,
api: origanizemanage.frozen,
},
{
@@ -565,8 +576,13 @@
}
.left {
width: 350px;
border-right: 5px solid rgb(229, 235, 240);
max-height: calc(100vh - 96px);
overflow: hidden;
border-right: 16px solid rgb(229, 235, 240);
min-width: fit-content;
.top:first-child {
border-bottom: 16px solid #e5ebf0;
}
}
.right {
flex: 1;
@@ -574,7 +590,8 @@
}
.top {
height: 50%;
border-bottom: 5px solid rgb(229, 235, 240);
// border-bottom: 5px solid rgb(229, 235, 240);
overflow-y: auto;
}
.ns-table-title {
text-align: left;