| | |
| | | VITE_PORT = 3100 |
| | | |
| | | # 网站标题 |
| | | VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台 |
| | | VITE_GLOB_APP_TITLE = 智能中草药干燥系统 |
| | | |
| | | # 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符 |
| | | VITE_GLOB_APP_SHORT_NAME = JeecgBootAdmin |
| | |
| | | VITE_PUBLIC_PATH = / |
| | | |
| | | # 跨域代理,您可以配置多个 ,请注意,没有换行符 |
| | | VITE_PROXY = [["/herb","http://192.168.21.70:9999"],["/upload","http://localhost:3300/upload"]] |
| | | VITE_PROXY = [["/herb","http://192.168.19.168:9999"],["/upload","http://localhost:3300/upload"]] |
| | | |
| | | # 控制台不输出 |
| | | VITE_DROP_CONSOLE = false |
| | |
| | | VITE_GLOB_API_URL=/herb |
| | | |
| | | #后台接口全路径地址(必填) |
| | | VITE_GLOB_DOMAIN_URL=http://192.168.21.70:9999 |
| | | VITE_GLOB_DOMAIN_URL=http://192.168.19.168:9999 |
| | | |
| | | # 接口前缀 |
| | | VITE_GLOB_API_URL_PREFIX= |
| | |
| | | VITE_GLOB_API_URL=/herb |
| | | |
| | | #后台接口全路径地址(必填) |
| | | VITE_GLOB_DOMAIN_URL=http://jeecg-boot-gateway:9999 |
| | | VITE_GLOB_DOMAIN_URL=https://dev.shlanbao.cn:8800/herb |
| | | |
| | | # 接口父路径前缀 |
| | | VITE_GLOB_API_URL_PREFIX= |
| | |
| | | } |
| | | |
| | | .aui-image { |
| | | padding: 180px 80px; |
| | | padding: 68px 45px; |
| | | flex-basis: 60%; |
| | | -webkit-flex-basis: 60%; |
| | | background-color: #0198cd; |
| | | background-image: url(../icon/jeecg_ad.png); |
| | | background-size: cover; |
| | | background-image: url(/src/assets/loginmini/icon/dryer.png); |
| | | background-size: 148%; |
| | | background-position-x: -166px; |
| | | background-position-y: 30px; |
| | | background-repeat: no-repeat; |
| | | color: white; |
| | | font-size: 26px; |
| | | } |
| | | |
| | | .aui-image-text { |
| | |
| | | --> |
| | | <template> |
| | | <div class="anticon" :class="getAppLogoClass" @click="goHome"> |
| | | <img src="../../../assets/images/logo.png" /> |
| | | <img src="../../../assets/images/lanpu.png" /> |
| | | <div class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle"> |
| | | {{ title }} |
| | | </div> |
| | |
| | | * @param url |
| | | */ |
| | | export function connectWebSocket(url: string) { |
| | | console.log("连接websocket::", url) |
| | | //update-begin-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278 |
| | | let token = (getToken() || '') as string; |
| | | result = useWebSocket(url, { |
| | |
| | | <script lang="ts"> |
| | | import { defineComponent, ref, unref } from 'vue'; |
| | | import { QrCode, QrCodeActionType } from '/@/components/Qrcode/index'; |
| | | import LogoImg from '/@/assets/images/logo.png'; |
| | | import LogoImg from '/@/assets/images/lanpu.png'; |
| | | import { CollapseContainer } from '/@/components/Container/index'; |
| | | import { PageWrapper } from '/@/components/Page'; |
| | | |
| | |
| | | align: 'center', |
| | | dataIndex: 'parts', |
| | | }, |
| | | { |
| | | title: '干燥方法', |
| | | align: 'center', |
| | | dataIndex: 'dryMethod', |
| | | }, |
| | | { |
| | | title: '干燥时间', |
| | | align: 'center', |
| | | dataIndex: 'dryTime', |
| | | }, |
| | | { |
| | | title: '干燥温度', |
| | | align: 'center', |
| | | dataIndex: 'dryTemp', |
| | | }, |
| | | { |
| | | title: '注意事项', |
| | | align: 'center', |
| | | dataIndex: 'notice', |
| | | }, |
| | | { |
| | | title: '特性标签', |
| | | align: 'center', |
| | | dataIndex: 'tag', |
| | | }, |
| | | |
| | | { |
| | | title: '初始含水率', |
| | | align: 'center', |
| | |
| | | title: '目标含水率', |
| | | align: 'center', |
| | | dataIndex: 'target', |
| | | }, |
| | | { |
| | | title: '投料量(筐)', |
| | | align: 'center', |
| | | dataIndex: 'feed', |
| | | }, |
| | | { |
| | | title: '预计干燥时间', |
| | | align: 'center', |
| | | dataIndex: 'et', |
| | | }, |
| | | { |
| | | title: '热风温度', |
| | | align: 'center', |
| | | dataIndex: 'windTemp', |
| | | }, |
| | | { |
| | | title: '环境温度', |
| | | align: 'center', |
| | | dataIndex: 'envTemp', |
| | | }, |
| | | { |
| | | title: '环境湿度', |
| | | align: 'center', |
| | | dataIndex: 'envHum', |
| | | }, |
| | | { |
| | | title: '荡料延时(ms)', |
| | | align: 'center', |
| | | dataIndex: 'delay', |
| | | }, |
| | | { |
| | | title: '翻料次数', |
| | | align: 'center', |
| | | dataIndex: 'turn', |
| | | }, |
| | | { |
| | | title: '干燥方法', |
| | | align: 'center', |
| | | dataIndex: 'dryMethod', |
| | | }, |
| | | |
| | | { |
| | | title: '注意事项', |
| | | align: 'center', |
| | | dataIndex: 'notice', |
| | | }, |
| | | { |
| | | title: '特性标签', |
| | | align: 'center', |
| | | dataIndex: 'tag', |
| | | }, |
| | | ] |
| | | //查询数据 |
| | |
| | | field: 'parts', |
| | | component: 'Input', |
| | | }, |
| | | { |
| | | label: '干燥方法', |
| | | field: 'dryMethod', |
| | | component: 'Input', |
| | | }, |
| | | { |
| | | label: '干燥时间', |
| | | field: 'dryTime', |
| | | component: 'InputNumber', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '干燥温度', |
| | | field: 'dryTemp', |
| | | component: 'Input', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '注意事项', |
| | | field: 'notice', |
| | | component: 'Input', |
| | | }, |
| | | { |
| | | label: '特性标签', |
| | | field: 'tag', |
| | | component: 'Input', |
| | | }, |
| | | |
| | | { |
| | | label: '初始含水率', |
| | | field: 'initial', |
| | |
| | | field: 'target', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '投料量', |
| | | field: 'feed', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '预计干燥时间', |
| | | field: 'et', |
| | | component: 'InputNumber', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '热风温度', |
| | | field: 'windTemp', |
| | | component: 'InputNumber', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '环境温度', |
| | | field: 'envTemp', |
| | | component: 'InputNumber', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '环境湿度', |
| | | field: 'envHum', |
| | | component: 'InputNumber', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '荡料延时', |
| | | field: 'delay', |
| | | component: 'InputNumber', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '翻料次数', |
| | | field: 'turn', |
| | | component: 'InputNumber', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: false }, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '干燥方法', |
| | | field: 'dryMethod', |
| | | component: 'Input', |
| | | }, |
| | | |
| | | { |
| | | label: '注意事项', |
| | | field: 'notice', |
| | | component: 'Input', |
| | | }, |
| | | { |
| | | label: '特性标签', |
| | | field: 'tag', |
| | | component: 'Input', |
| | | }, |
| | | // TODO 主键隐藏字段,目前写死为ID |
| | | { |
| | | label: '', |
| | |
| | | dataIndex: 'feed', |
| | | }, |
| | | { |
| | | title: '初始重量', |
| | | align: 'center', |
| | | dataIndex: 'originWeight', |
| | | }, |
| | | { |
| | | title: '预计干燥时间', |
| | | align: 'center', |
| | | dataIndex: 'et', |
| | |
| | | { |
| | | title: '干燥时间', |
| | | align: 'center', |
| | | dataIndex: 'drying', |
| | | dataIndex: 'dryTime', |
| | | }, |
| | | { |
| | | title: '热风温度', |
| | | align: 'center', |
| | | dataIndex: 'windTemp', |
| | | }, |
| | | { |
| | | title: '环境温度', |
| | | align: 'center', |
| | | dataIndex: 'envTemp', |
| | | }, |
| | | { |
| | | title: '环境湿度', |
| | | align: 'center', |
| | | dataIndex: 'envHum', |
| | | }, |
| | | { |
| | | title: '荡料延时(ms)', |
| | | align: 'center', |
| | | dataIndex: 'delay', |
| | | }, |
| | | { |
| | | title: '翻料次数', |
| | | align: 'center', |
| | | dataIndex: 'turn', |
| | | }, |
| | | { |
| | | title: '预计剩余时间', |
| | |
| | | label: '工单时间', |
| | | field: 'orderTime', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | showTime: true, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss' |
| | | }, |
| | | }, |
| | | { |
| | | label: '工单号', |
| | |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '原始重量', |
| | | field: 'originWeight', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '预计干燥时间', |
| | | field: 'et', |
| | | component: 'InputNumber', |
| | |
| | | }, |
| | | { |
| | | label: '干燥时间', |
| | | field: 'drying', |
| | | field: 'dryTime', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '热风温度', |
| | | field: 'windTemp', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '环境温度', |
| | | field: 'envTemp', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '环境湿度', |
| | | field: 'envHum', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '荡料延时(ms)', |
| | | field: 'delay', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | | label: '翻料次数', |
| | | field: 'turn', |
| | | component: 'InputNumber', |
| | | }, |
| | | { |
| | |
| | | <div class="app-loading-dots"> |
| | | <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span> |
| | | </div> |
| | | <div class="app-loading-title">JeecgBoot 企业级低代码平台</div> |
| | | <div class="app-loading-title">智能中草药干燥系统</div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <template> |
| | | <BasicDrawer |
| | | title="部门角色权限配置" |
| | | <BasicDrawer title="部门角色权限配置" |
| | | :width="650" |
| | | :loading="loading" |
| | | showFooter |
| | | okText="保存并关闭" |
| | | @ok="onSubmit(true)" |
| | | @close="onClose" |
| | | @register="registerDrawer" |
| | | > |
| | | @close="onClose" @register="registerDrawer"> |
| | | <div> |
| | | <a-spin :spinning="loading"> |
| | | <template v-if="treeData.length > 0"> |
| | | <BasicTree |
| | | title="所拥有的部门权限" |
| | | toolbar |
| | | checkable |
| | | :treeData="treeData" |
| | | :checkedKeys="checkedKeys" |
| | | :selectedKeys="selectedKeys" |
| | | :expandedKeys="expandedKeys" |
| | | :checkStrictly="checkStrictly" |
| | | :clickRowToExpand="false" |
| | | @check="onCheck" |
| | | @expand="onExpand" |
| | | @select="onSelect" |
| | | > |
| | | <BasicTree title="所拥有的部门权限" toolbar checkable :treeData="treeData" :checkedKeys="checkedKeys" |
| | | :selectedKeys="selectedKeys" :expandedKeys="expandedKeys" :checkStrictly="checkStrictly" |
| | | :clickRowToExpand="false" @check="onCheck" @expand="onExpand" @select="onSelect"> |
| | | <template #title="{ slotTitle, ruleFlag }"> |
| | | <span>{{ slotTitle }}</span> |
| | | <Icon v-if="ruleFlag" icon="ant-design:align-left-outlined" style="margin-left: 5px; color: red" /> |
| | |
| | | import { useUserStore } from '/@/store/modules/user'; |
| | | import { QrCode } from '/@/components/Qrcode/index'; |
| | | import ThirdModal from '/@/views/sys/login/ThirdModal.vue'; |
| | | import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png'; |
| | | import logoImg from '/@/assets/loginmini/icon/lanpu_logo.png'; |
| | | import adTextImg from '/@/assets/loginmini/icon/jeecg_ad_text.png'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { useDesign } from "/@/hooks/web/useDesign"; |
| | |
| | | import { SmsEnum, useFormRules, useFormValid, useLoginState } from '/@/views/sys/login/useLogin'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { getCaptcha, passwordChange, phoneVerify } from '/@/api/sys/user'; |
| | | import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png' |
| | | import logoImg from '/@/assets/loginmini/icon/lanpu_logo.png' |
| | | import adTextImg from '/@/assets/loginmini/icon/jeecg_ad_text.png' |
| | | import successImg from '/@/assets/loginmini/icon/icon-success.png' |
| | | |
| | |
| | | <div class="aui-container"> |
| | | <div class="aui-form"> |
| | | <div class="aui-image"> |
| | | <div class="aui-image-text"> |
| | | <img :src="adTextImg" /> |
| | | </div> |
| | | <div>Lanpu</div> |
| | | <div>兰浦智能中草药干燥系统</div> |
| | | <!-- <div class="aui-image-text">--> |
| | | <!-- <img :src="adTextImg" />--> |
| | | <!-- </div>--> |
| | | </div> |
| | | <div class="aui-formBox"> |
| | | <div class="aui-formWell"> |
| | |
| | | import MiniForgotpad from './MiniForgotpad.vue'; |
| | | import MiniRegister from './MiniRegister.vue'; |
| | | import MiniCodelogin from './MiniCodelogin.vue'; |
| | | import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png'; |
| | | import logoImg from '/@/assets/loginmini/icon/lanpu_logo.png'; |
| | | import adTextImg from '/@/assets/loginmini/icon/jeecg_ad_text.png'; |
| | | import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application'; |
| | | import { useLocaleStore } from '/@/store/modules/locale'; |
| | |
| | | //账号登录表单字段 |
| | | const formData = reactive<any>({ |
| | | inputCode: '', |
| | | username: 'admin', |
| | | password: '123456', |
| | | username: '', |
| | | password: '', |
| | | }); |
| | | //手机登录表单字段 |
| | | const phoneFormData = reactive<any>({ |
| | |
| | | import { getCaptcha, register } from '/@/api/sys/user'; |
| | | import { SmsEnum } from '/@/views/sys/login/useLogin'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png'; |
| | | import logoImg from '/@/assets/loginmini/icon/lanpu_logo.png'; |
| | | import jeecgAdTextImg from '/@/assets/loginmini/icon/jeecg_ad_text.png'; |
| | | import eyeKImg from '/@/assets/loginmini/icon/icon-eye-k.png'; |
| | | import eyeGImg from '/@/assets/loginmini/icon/icon-eye-g.png'; |
| | |
| | | <template> |
| | | <BasicDrawer v-bind="$attrs" @register="registerDrawer" width="650px" destroyOnClose showFooter> |
| | | <BasicDrawer v-bind="$attrs" |
| | | @register="registerDrawer" |
| | | width="650px" |
| | | destroyOnClose |
| | | showFooter> |
| | | <template #title> |
| | | 角色权限配置 |
| | | <a-dropdown> |
| | |
| | | </template> |
| | | </a-dropdown> |
| | | </template> |
| | | <BasicTree |
| | | ref="treeRef" |
| | | checkable |
| | | :treeData="treeData" |
| | | :checkedKeys="checkedKeys" |
| | | :expandedKeys="expandedKeys" |
| | | :selectedKeys="selectedKeys" |
| | | :checkStrictly="checkStrictly" |
| | | :clickRowToExpand="false" |
| | | title="所拥有的的权限" |
| | | @check="onCheck" |
| | | @select="onTreeNodeSelect" |
| | | > |
| | | <BasicTree ref="treeRef" checkable :treeData="treeData" :checkedKeys="checkedKeys" :expandedKeys="expandedKeys" |
| | | :selectedKeys="selectedKeys" :checkStrictly="checkStrictly" :clickRowToExpand="false" title="所拥有的的权限" |
| | | @check="onCheck" @select="onTreeNodeSelect"> |
| | | <template #title="{ slotTitle, ruleFlag }"> |
| | | {{ slotTitle }} |
| | | <Icon v-if="ruleFlag" icon="ant-design:align-left-outlined" style="margin-left: 5px; color: red"></Icon> |
| | |
| | | <!--右下角按钮--> |
| | | <template #footer> |
| | | <PopConfirmButton title="确定放弃编辑?" @confirm="closeDrawer" okText="确定" cancelText="取消">取消</PopConfirmButton> |
| | | <a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost style="margin-right: 0.8rem">仅保存</a-button> |
| | | <a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost |
| | | style="margin-right: 0.8rem">仅保存</a-button> |
| | | <a-button @click="handleSubmit(true)" type="primary" :loading="loading">保存并关闭</a-button> |
| | | </template> |
| | | <RoleDataRuleDrawer @register="registerDrawer1" /> |
| | | </BasicDrawer> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { ref, computed, unref, onMounted } from 'vue'; |
| | | import { BasicDrawer, useDrawer, useDrawerInner } from '/src/components/Drawer'; |
| | | import { BasicTree, TreeItem } from '/src/components/Tree'; |
| | | import { PopConfirmButton } from '/@/components/Button'; |
| | | import RoleDataRuleDrawer from './RoleDataRuleDrawer.vue'; |
| | | import { queryTreeListForRole, queryRolePermission, saveRolePermission } from '../role.api'; |
| | | const emit = defineEmits(['register']); |
| | | import { ref, computed, unref, onMounted } from 'vue' |
| | | import { BasicDrawer, useDrawer, useDrawerInner } from '/src/components/Drawer' |
| | | import { BasicTree, TreeItem } from '/src/components/Tree' |
| | | import { PopConfirmButton } from '/@/components/Button' |
| | | import RoleDataRuleDrawer from './RoleDataRuleDrawer.vue' |
| | | import { queryTreeListForRole, queryRolePermission, saveRolePermission } from '../role.api' |
| | | const emit = defineEmits(['register']) |
| | | //树的信息 |
| | | const treeData = ref<TreeItem[]>([]); |
| | | const treeData = ref<TreeItem[]>([]) |
| | | //树的全部节点信息 |
| | | const allTreeKeys = ref([]); |
| | | const allTreeKeys = ref([]) |
| | | //树的选择节点信息 |
| | | const checkedKeys = ref([]); |
| | | const defaultCheckedKeys = ref([]); |
| | | const checkedKeys = ref([]) |
| | | const defaultCheckedKeys = ref([]) |
| | | //树的选中的节点信息 |
| | | const selectedKeys = ref([]); |
| | | const roleId = ref(''); |
| | | const selectedKeys = ref([]) |
| | | const roleId = ref('') |
| | | //树的实例 |
| | | const treeRef = ref(null); |
| | | const loading = ref(false); |
| | | const treeRef = ref(null) |
| | | const loading = ref(false) |
| | | |
| | | //展开折叠的key |
| | | const expandedKeys = ref<any>([]); |
| | | const expandedKeys = ref<any>([]) |
| | | //父子节点选中状态是否关联 |
| | | const checkStrictly = ref<boolean>(true); |
| | | const [registerDrawer1, { openDrawer: openDataRuleDrawer }] = useDrawer(); |
| | | const checkStrictly = ref<boolean>(true) |
| | | const [registerDrawer1, { openDrawer: openDataRuleDrawer }] = useDrawer() |
| | | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { |
| | | await reset(); |
| | | setDrawerProps({ confirmLoading: false, loading: true }); |
| | | roleId.value = data.roleId; |
| | | await reset() |
| | | setDrawerProps({ confirmLoading: false, loading: true }) |
| | | roleId.value = data.roleId |
| | | //初始化数据 |
| | | const roleResult = await queryTreeListForRole(); |
| | | treeData.value = roleResult.treeList; |
| | | allTreeKeys.value = roleResult.ids; |
| | | expandedKeys.value = roleResult.ids; |
| | | const roleResult = await queryTreeListForRole() |
| | | treeData.value = roleResult.treeList |
| | | allTreeKeys.value = roleResult.ids |
| | | expandedKeys.value = roleResult.ids |
| | | //初始化角色菜单数据 |
| | | const permResult = await queryRolePermission({ roleId: unref(roleId) }); |
| | | checkedKeys.value = permResult; |
| | | defaultCheckedKeys.value = permResult; |
| | | setDrawerProps({ loading: false }); |
| | | }); |
| | | const permResult = await queryRolePermission({ roleId: unref(roleId) }) |
| | | checkedKeys.value = permResult |
| | | defaultCheckedKeys.value = permResult |
| | | setDrawerProps({ loading: false }) |
| | | }) |
| | | /** |
| | | * 点击选中 |
| | | */ |
| | | function onCheck(o) { |
| | | checkedKeys.value = o.checked ? o.checked : o; |
| | | checkedKeys.value = o.checked ? o.checked : o |
| | | } |
| | | /** |
| | | * 选中节点,打开数据权限抽屉 |
| | | */ |
| | | function onTreeNodeSelect(key) { |
| | | if (key && key.length > 0) { |
| | | selectedKeys.value = key; |
| | | selectedKeys.value = key |
| | | } |
| | | openDataRuleDrawer(true, { functionId: unref(selectedKeys)[0], roleId: unref(roleId) }); |
| | | openDataRuleDrawer(true, { functionId: unref(selectedKeys)[0], roleId: unref(roleId) }) |
| | | } |
| | | /** |
| | | * 数据重置 |
| | | */ |
| | | function reset() { |
| | | treeData.value = []; |
| | | allTreeKeys.value = []; |
| | | checkedKeys.value = []; |
| | | defaultCheckedKeys.value = []; |
| | | selectedKeys.value = []; |
| | | roleId.value = ''; |
| | | treeData.value = [] |
| | | allTreeKeys.value = [] |
| | | checkedKeys.value = [] |
| | | defaultCheckedKeys.value = [] |
| | | selectedKeys.value = [] |
| | | roleId.value = '' |
| | | } |
| | | /** |
| | | * 获取tree实例 |
| | | */ |
| | | function getTree() { |
| | | const tree = unref(treeRef); |
| | | const tree = unref(treeRef) |
| | | if (!tree) { |
| | | throw new Error('tree is null!'); |
| | | throw new Error('tree is null!') |
| | | } |
| | | return tree; |
| | | return tree |
| | | } |
| | | /** |
| | | * 提交 |
| | |
| | | roleId: unref(roleId), |
| | | permissionIds: unref(getTree().getCheckedKeys()).join(','), |
| | | lastpermissionIds: unref(defaultCheckedKeys).join(','), |
| | | }; |
| | | } |
| | | //update-begin-author:taoyan date:2023-2-11 for: issues/352 VUE角色授权重复保存 |
| | | if(loading.value===false){ |
| | | await doSave(params) |
| | | }else{ |
| | | console.log('请等待上次执行完毕!'); |
| | | console.log('请等待上次执行完毕!') |
| | | } |
| | | if(exit){ |
| | | // 如果关闭 |
| | | closeDrawer(); |
| | | closeDrawer() |
| | | }else{ |
| | | // 没有关闭需要重新获取选中数据 |
| | | const permResult = await queryRolePermission({ roleId: unref(roleId) }); |
| | | defaultCheckedKeys.value = permResult; |
| | | const permResult = await queryRolePermission({ roleId: unref(roleId) }) |
| | | defaultCheckedKeys.value = permResult |
| | | } |
| | | } |
| | | |
| | | // VUE角色授权重复保存 #352 |
| | | async function doSave(params) { |
| | | loading.value = true; |
| | | await saveRolePermission(params); |
| | | loading.value = true |
| | | await saveRolePermission(params) |
| | | setTimeout(()=>{ |
| | | loading.value = false; |
| | | loading.value = false |
| | | }, 500) |
| | | } |
| | | //update-end-author:taoyan date:2023-2-11 for: issues/352 VUE角色授权重复保存 |
| | |
| | | */ |
| | | function treeMenuClick({ key }) { |
| | | if (key === 'checkAll') { |
| | | checkedKeys.value = allTreeKeys.value; |
| | | checkedKeys.value = allTreeKeys.value |
| | | } else if (key === 'cancelCheck') { |
| | | checkedKeys.value = []; |
| | | checkedKeys.value = [] |
| | | } else if (key === 'openAll') { |
| | | expandedKeys.value = allTreeKeys.value; |
| | | expandedKeys.value = allTreeKeys.value |
| | | } else if (key === 'closeAll') { |
| | | expandedKeys.value = []; |
| | | expandedKeys.value = [] |
| | | } else if (key === 'relation') { |
| | | checkStrictly.value = false; |
| | | checkStrictly.value = false |
| | | } else { |
| | | checkStrictly.value = true; |
| | | checkStrictly.value = true |
| | | } |
| | | } |
| | | </script> |
| | |
| | | position: absolute; |
| | | width: 618px; |
| | | } |
| | | |
| | | //update-begin---author:wangshuai ---date:20230202 for:抽屉弹窗标题图标下拉样式------------ |
| | | .line { |
| | | height: 1px; |
| | | width: 100%; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | } |
| | | |
| | | .more-icon { |
| | | font-size: 20px !important; |
| | | color: black; |
| | |
| | | margin-right: 2px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | :deep(.jeecg-tree-header){ |
| | | border-bottom: none; |
| | | } |
| | | |
| | | //update-end---author:wangshuai ---date:20230202 for:抽屉弹窗标题图标下拉样式------------ |
| | | </style> |
| | |
| | | import { defineComponent, ref, computed, unref, useAttrs } from 'vue'; |
| | | import { BasicForm, useForm } from '/@/components/Form/index'; |
| | | import { formSchema } from './user.data'; |
| | | import { getTenantId, getToken } from "/@/utils/auth"; |
| | | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; |
| | | import { saveOrUpdateUser, getUserRoles, getUserDepartList } from './user.api'; |
| | | import { useDrawerAdaptiveWidth } from '/@/hooks/jeecg/useAdaptiveWidth'; |
| | |
| | | field: 'selectedroles', |
| | | show: !data?.departDisabled ?? false, |
| | | }, |
| | | { |
| | | field: 'relTenantIds', |
| | | show: Number(getTenantId())<=0, |
| | | }, |
| | | ]); |
| | | // 无论新增还是编辑,都可以设置表单值 |
| | | if (typeof data.record === 'object') { |