9 Commits

Author SHA1 Message Date
JEECG
38e6584e10 Merge pull request #859 from MrFeng1993/bugFix_role_page_title
角色授权界面的title更正
2023-12-29 12:02:35 +08:00
JEECG
318b834857 Merge pull request #867 from cmdyu/bugfix_typos
修复枚举文件中的注释错误
2023-12-29 12:02:21 +08:00
zhangdaiscott
81579acf0e 重复校验 每次都会触发,输入快了,前端就不会显示“该值不可用”(加防抖逻辑) 2023-12-17 11:31:14 +08:00
zhangdaiscott
26ab89b700 重复校验 每次都会触发,输入快了,前端就不会显示“该值不可用”(加防抖逻辑) 2023-12-17 11:10:47 +08:00
zhangdaiscott
55a09678cd 【issues/918】MarkdownViewer加上暗黑主题 2023-12-14 11:00:50 +08:00
zhangdaiscott
dcd923aae4 【issues/901】JPopup组件配置param参数后异常 2023-12-14 10:59:08 +08:00
cmdyu
ca2c6aa5da Fix comment typos in CompTypeEnum.ts 2023-11-21 16:54:01 +08:00
cmdyu
4856c436d9 Fix comment typos in httpEnum.ts 2023-11-21 16:53:20 +08:00
fenggn
9c77d526e4 角色授权界面的title更正 2023-11-16 18:00:03 +08:00
10 changed files with 163 additions and 16 deletions

View File

@@ -151,10 +151,12 @@
watch( watch(
() => props.param, () => props.param,
() => { () => {
if (visible) { // update-begin--author:liaozhiyang---date:20231213---for【issues/901】JPopup组件配置param参数后异常
if (visible.value) {
dynamicParamHandler(); dynamicParamHandler();
loadData(); loadData();
} }
// update-end--author:liaozhiyang---date:20231213---for【issues/901】JPopup组件配置param参数后异常
} }
); );
/** /**

View File

@@ -1,25 +1,130 @@
<template> <template>
<!-- <div v-html="getHtmlData" :class="$props.class" class="markdown-viewer markdown-body"></div> --> <!-- <div v-html="getHtmlData" :class="$props.class" class="markdown-viewer markdown-body"></div> -->
<!-- update-begin--author:liaozhiyang---date:20231201---forissues/872MarkdownViewer组件无样式 --> <!-- update-begin--author:liaozhiyang---date:20231201---forissues/872MarkdownViewer组件无样式 -->
<div class="preview" :class="[{ preview_dark: isDarkTheme }]">
<div v-html="getHtmlData" :class="$props.class" class="markdown-viewer vditor-reset"></div> <div v-html="getHtmlData" :class="$props.class" class="markdown-viewer vditor-reset"></div>
</div>
<!-- update-begin--author:liaozhiyang---date:20231201---forissues/872MarkdownViewer组件无样式 --> <!-- update-begin--author:liaozhiyang---date:20231201---forissues/872MarkdownViewer组件无样式 -->
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue'; import { computed, watch, ref } from 'vue';
import showdown from 'showdown'; import showdown from 'showdown';
import 'vditor/dist/index.css'; import 'vditor/dist/index.css';
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
import { ThemeEnum } from '/@/enums/appEnum';
const converter = new showdown.Converter(); const converter = new showdown.Converter();
converter.setOption('tables', true); converter.setOption('tables', true);
converter.setOption('emoji', true);
const props = defineProps({ const props = defineProps({
value: { type: String }, value: { type: String },
class: { type: String }, class: { type: String },
}); });
const getHtmlData = computed(() => converter.makeHtml(props.value || '')); const getHtmlData = computed(() => converter.makeHtml(props.value || ''));
// update-begin--author:liaozhiyang---date:20231213---for【issues/918】MarkdownViewer加上暗黑主题
const isDarkTheme = ref(false);
const { getDarkMode } = useRootSetting();
watch(
() => getDarkMode.value,
(value) => {
isDarkTheme.value = value === ThemeEnum.DARK;
},
{ immediate: true }
);
// update-end--author:liaozhiyang---date:20231213---for【issues/918】MarkdownViewer加上暗黑主题
</script> </script>
<style scoped> <style lang="less" scoped>
.markdown-viewer { .markdown-viewer {
width: 100%; width: 100%;
} }
.preview {
width: 100%;
}
.preview_dark {
.vditor-reset {
color: #d1d5da;
}
.vditor-reset a,
.vditor-ir__link {
color: #4285f4;
}
.vditor-reset h1,
.vditor-reset h2 {
padding-bottom: 0.3em;
border-bottom: 1px solid #d1d5da;
}
.vditor-reset hr {
background-color: #d1d5da;
}
.vditor-reset blockquote {
padding: 0 1em;
color: #b9b9b9;
border-left: 0.25em solid #d1d5da;
}
.vditor-reset iframe {
border: 1px solid #141414;
}
.vditor-reset table tr {
background-color: #2f363d;
}
.vditor-reset table td,
.vditor-reset table th {
border: 1px solid #dfe2e5;
}
.vditor-reset table tbody tr:nth-child(2n) {
background-color: #24292e;
}
.vditor-reset code:not(.hljs):not(.highlight-chroma) {
background-color: rgba(66, 133, 244, 0.36);
}
.vditor-reset .language-abc svg,
.vditor-reset .language-abc path {
fill: currentColor;
color: #d1d5da;
}
.language-graphviz polygon {
fill: rgba(66, 133, 244, 0.36);
}
.vditor-reset kbd {
color: #d1d5da;
background-color: #2f363d;
border: 1px solid #141414;
box-shadow: inset 0 -1px 0 #141414;
}
.vditor-copy svg {
color: #b9b9b9;
}
.vditor-speech {
background-color: #1d2125;
border: 1px solid #141414;
color: #b9b9b9;
}
.vditor-speech--current,
.vditor-speech:hover {
color: #fff;
}
.vditor-linkcard a {
background-color: #1d2125;
}
.vditor-linkcard a:visited .vditor-linkcard__abstract {
color: hsla(0, 0%, 72.5%, 0.36);
}
.vditor-linkcard__title {
color: #d1d5da;
}
.vditor-linkcard__abstract {
color: #b9b9b9;
}
.vditor-linkcard__site {
color: #fff;
}
.vditor-linkcard__image {
background-color: hsla(0, 0%, 72.5%, 0.36);
}
}
</style> </style>

View File

@@ -18,7 +18,7 @@ export enum CompTypeEnum {
CatTree = 'cat_tree', CatTree = 'cat_tree',
//下拉搜索 //下拉搜索
SelSearch = 'search', SelSearch = 'search',
//用户现在 //用户选择
SelUser = 'sel_user', SelUser = 'sel_user',
//复选框 //复选框
Checkbox = 'checkbox', Checkbox = 'checkbox',

View File

@@ -9,7 +9,7 @@ export enum ResultEnum {
} }
/** /**
* @description: request method * @description: Request method
*/ */
export enum RequestEnum { export enum RequestEnum {
GET = 'GET', GET = 'GET',
@@ -19,7 +19,7 @@ export enum RequestEnum {
} }
/** /**
* @description: contentTyp * @description: Content type
*/ */
export enum ContentTypeEnum { export enum ContentTypeEnum {
// json // json
@@ -32,7 +32,7 @@ export enum ContentTypeEnum {
/** /**
* 请求header * 请求header
* @description: contentTyp * @description: Request header
*/ */
export enum ConfigEnum { export enum ConfigEnum {
// TOKEN // TOKEN

View File

@@ -1,6 +1,6 @@
import { BasicColumn, FormSchema } from '/@/components/Table'; import { BasicColumn, FormSchema } from '/@/components/Table';
import { render } from '/@/utils/common/renderUtils'; import { render } from '/@/utils/common/renderUtils';
import { duplicateCheck } from '/@/views/system/user/user.api'; import { duplicateCheckDelay } from '/@/views/system/user/user.api';
import { validateCheckRule } from '/@/views/system/checkRule/check.rule.api'; import { validateCheckRule } from '/@/views/system/checkRule/check.rule.api';
import { array } from 'vue-types'; import { array } from 'vue-types';
@@ -80,7 +80,7 @@ export const formSchema: FormSchema[] = [
fieldVal: value, fieldVal: value,
dataId: model.id, dataId: model.id,
}; };
duplicateCheck(params) duplicateCheckDelay(params)
.then((res) => { .then((res) => {
res.success ? resolve() : reject('规则编码已存在!'); res.success ? resolve() : reject('规则编码已存在!');
}) })

View File

@@ -1,5 +1,5 @@
import { Ref } from 'vue'; import { Ref } from 'vue';
import { duplicateCheck } from '/@/views/system/user/user.api'; import { duplicateCheckDelay } from '/@/views/system/user/user.api';
import { BasicColumn, FormSchema } from '/@/components/Table'; import { BasicColumn, FormSchema } from '/@/components/Table';
import { DescItem } from '/@/components/Description'; import { DescItem } from '/@/components/Description';
import { findTree } from '/@/utils/common/compUtils'; import { findTree } from '/@/utils/common/compUtils';
@@ -115,7 +115,7 @@ export const departRoleModalFormSchema: FormSchema[] = [
fieldVal: value, fieldVal: value,
dataId: model.id, dataId: model.id,
}; };
duplicateCheck(params) duplicateCheckDelay(params)
.then((res) => { .then((res) => {
res.success ? resolve() : reject(res.message || '校验失败'); res.success ? resolve() : reject(res.message || '校验失败');
}) })

View File

@@ -1,5 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table'; import { BasicColumn, FormSchema } from '/@/components/Table';
import { duplicateCheck } from '/@/views/system/user/user.api'; import { duplicateCheckDelay } from '/@/views/system/user/user.api';
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
@@ -80,7 +80,7 @@ export const formSchema: FormSchema[] = [
fieldVal: value, fieldVal: value,
dataId: model.id, dataId: model.id,
}; };
duplicateCheck(params) duplicateCheckDelay(params)
.then((res) => { .then((res) => {
res.success ? resolve() : reject('规则编码已存在!'); res.success ? resolve() : reject('规则编码已存在!');
}) })

View File

@@ -27,7 +27,7 @@
:selectedKeys="selectedKeys" :selectedKeys="selectedKeys"
:checkStrictly="checkStrictly" :checkStrictly="checkStrictly"
:clickRowToExpand="false" :clickRowToExpand="false"
title="所拥有的权限" title="所拥有的权限"
@check="onCheck" @check="onCheck"
@select="onTreeNodeSelect" @select="onTreeNodeSelect"
> >

View File

@@ -82,7 +82,24 @@ export const saveOrUpdateRole = (params, isUpdate) => {
* 编码校验 * 编码校验
* @param params * @param params
*/ */
export const isRoleExist = (params) => defHttp.get({ url: Api.isRoleExist, params }, { isTransformResponse: false }); // update-begin--author:liaozhiyang---date:20231215---for【QQYUN-7415】表单调用接口进行校验的添加防抖
let timer;
export const isRoleExist = (params) => {
return new Promise((resolve, rejected) => {
clearTimeout(timer);
timer = setTimeout(() => {
defHttp
.get({ url: Api.isRoleExist, params }, { isTransformResponse: false })
.then((res) => {
resolve(res);
})
.catch((error) => {
rejected(error);
});
}, 500);
});
};
// update-end--author:liaozhiyang---date:20231215---for【QQYUN-7415】表单调用接口进行校验的添加防抖
/** /**
* 根据角色查询树信息 * 根据角色查询树信息
*/ */

View File

@@ -96,6 +96,29 @@ export const saveOrUpdateUser = (params, isUpdate) => {
* @param params * @param params
*/ */
export const duplicateCheck = (params) => defHttp.get({ url: Api.duplicateCheck, params }, { isTransformResponse: false }); export const duplicateCheck = (params) => defHttp.get({ url: Api.duplicateCheck, params }, { isTransformResponse: false });
/**
* 20231215
* liaozhiyang
* 唯一校验( 延迟【防抖】)
* @param params
*/
let timer;
export const duplicateCheckDelay = (params) => {
return new Promise((resove, rejected) => {
clearTimeout(timer);
timer = setTimeout(() => {
defHttp
.get({ url: Api.duplicateCheck, params }, { isTransformResponse: false })
.then((res: any) => {
resove(res as any);
})
.catch((error) => {
rejected(error);
});
}, 500);
});
};
/** /**
* 获取全部角色(租户隔离) * 获取全部角色(租户隔离)
* @param params * @param params