<!--
|
* @Description: file content
|
* @Author: your name
|
* @version:
|
* @Date: 2024-03-24 11:16:46
|
* @LastEditors: your name
|
* @LastEditTime: 2024-06-12 14:51:42
|
-->
|
<!--
|
* @Author: Vben
|
* @Description: logo component
|
-->
|
<template>
|
<div class="anticon">
|
<a-row class="enter-x">
|
<a-col :md="24" :xs="24" :span="24">
|
<BasicForm @register="registerForm" />
|
</a-col>
|
</a-row>
|
</div>
|
</template>
|
<script lang="ts" setup>
|
import { onMounted } from 'vue';
|
import { Row, Col } from 'ant-design-vue';
|
import { BasicForm, useForm } from '/@/components/Form/index';
|
import { getTreeList, optionsListApi, prodListApi, getProdTreeList } from '/@/api/tigerapi/dept';
|
import { appFormDept } from './appFormDept.data';
|
import { useUserStore } from '/@/store/modules/user';
|
import { useGlobSetting } from '/@/hooks/setting';
|
|
const globSetting = useGlobSetting();
|
const ARow = Row;
|
const ACol = Col;
|
|
const [registerForm, { updateSchema, setFieldsValue }] = useForm({
|
// labelWidth: 200,
|
baseColProps: { span: 24 },
|
schemas: appFormDept,
|
showActionButtonGroup: false,
|
actionColOptions: {
|
span: 23,
|
},
|
});
|
onMounted(() => {
|
//globSetting.useOrg == 'Y' ? await getTreeList() : await getProdTreeList();
|
Promise.all([getProdTreeList(), prodListApi(useUserStore().getUserInfo.userId)]).then((res) => {
|
let treeData = res[0];
|
treeData = treeData.filter((x) => res[1].Data.Items.some((item) => item.PROD_CODE == x.deptCode));
|
|
updateSchema([
|
{
|
field: 'dept',
|
componentProps: { treeData },
|
},
|
]);
|
setFieldsValue({
|
dept: useUserStore().getUserInfo.prodCode,
|
// globSetting.useOrg == 'Y'
|
// ? useUserStore().getUserInfo.orgCode
|
// : useUserStore().getUserInfo.prodCode,
|
});
|
});
|
});
|
</script>
|
<style lang="less" scoped>
|
@prefix-cls: ~'@{namespace}-app-logo';
|
|
.@{prefix-cls} {
|
display: flex;
|
align-items: center;
|
padding-left: 7px;
|
transition: all 0.2s ease;
|
cursor: pointer;
|
|
&.light {
|
border-bottom: 1px solid @border-color-base;
|
}
|
|
&.collapsed-show-title {
|
padding-left: 20px;
|
}
|
|
&.light &__title {
|
color: @primary-color;
|
}
|
|
&.dark &__title {
|
color: @white;
|
font-size: 16px;
|
}
|
|
&__title {
|
transition: all 0.5s;
|
// font-size: 16px;
|
font-weight: 700;
|
line-height: normal;
|
}
|
}
|
</style>
|