Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
XieYongHong 2023-07-07 17:25:00 +08:00
commit 7c2f4c410c
12 changed files with 50 additions and 35 deletions

View File

@ -1,7 +1,7 @@
<!-- 第三方账户绑定 -->
<template>
<div class='page-container'>
<div class='content'>
<div class='content-bind'>
<div class='title'>第三方账户绑定</div>
<!-- 已登录-绑定三方账号 -->
<template v-if='!!token'>
@ -323,7 +323,7 @@ onMounted(() => {
align-items: center;
justify-content: center;
.content {
.content-bind {
box-sizing: border-box;
width: 928px;
min-height: 510px;

View File

@ -41,7 +41,7 @@
:value="
form.roleList.map((item) => item.name).join(',')
"
placeholder="请输入角色"
placeholder="请选择角色"
disabled
/>
</j-form-item>
@ -52,7 +52,7 @@
:value="
form.orgList.map((item) => item.name).join(',')
"
placeholder="请输入组织"
placeholder="请选择组织"
disabled
/>
</j-form-item>

View File

@ -49,7 +49,7 @@
<j-form-item
:name="['table', index, 'value']"
:rules="{
required: true,
required: record.required,
message: '该字段为必填字段',
}"
has-feedback
@ -172,9 +172,10 @@ const newFunctions = computed(() => {
? tableItem['json']?.['properties'][0]
: undefined,
value: undefined,
required: tableItem.expands?.required
});
}
result.push({
...func,
table: array,

View File

@ -22,7 +22,7 @@
<ValueRender
type="table"
:data="_props.data"
:value="{ formatValue: record.value }"
:value="{ ...record }"
/>
</template>
<template v-else-if="column.key === 'action'">

View File

@ -95,6 +95,7 @@ const columns = [
title: '名称',
dataIndex: 'name',
key: 'name',
ellipsis: true
},
{
title: '值',

View File

@ -13,6 +13,12 @@ export const USER_CENTER_MENU_DATA = {
sortIndex: 9999,
granted: true,
owner: 'iot',
permissions: [
{
permission: 'system_config',
actions: ['query'],
},
],
buttons: [
{
id: USER_CENTER_MENU_BUTTON_CODE,

View File

@ -15,26 +15,26 @@
:rules='IdRules'
>
<template #label>
<span>
插件ID
<j-tooltip
title='若不填写系统将自动生成唯一ID'
>
<AIcon
type='QuestionCircleOutlined'
style='margin-left: 2px'
/>
</j-tooltip>
</span>
<span>
插件ID
<j-tooltip
title='若不填写系统将自动生成唯一ID'
>
<AIcon
type='QuestionCircleOutlined'
style='margin-left: 2px'
/>
</j-tooltip>
</span>
</template>
<j-input v-model:value='modelRef.id' :disabled='!!data.id' />
<j-input placeholder="请输入插件ID" v-model:value='modelRef.id' :disabled='!!data.id' />
</j-form-item>
<j-form-item
label='插件名称'
name='name'
:rules="nameRules"
>
<j-input v-model:value='modelRef.name' />
<j-input placeholder="请输入插件名称" v-model:value='modelRef.name' />
</j-form-item>
<j-form-item
label='文件'
@ -135,6 +135,7 @@ const handleSave = async () => {
const data = await formRef.value.validate()
if (data) {
loading.value = true
modelRef.id = modelRef.id ? modelRef.id : null;
const resp = props.data.id ? await update(modelRef).catch(() => { success: false }) : await add(modelRef).catch(() => { success: false })
loading.value = false
if (resp.success) {

View File

@ -353,7 +353,7 @@ const form = reactive<formType>({
title: [
{
required: true,
message: '名称必填',
message: '请输入系统名称',
},
{
max: 64,

View File

@ -199,8 +199,8 @@
validator: checkName,
},
{
pattern: /^\w+$/,
message: '名称只能由数字、字母、下划线、中划线组成',
pattern: /^[a-zA-Z0-9_\u4e00-\u9fa5]+$/,
message: '名称只能由英文、汉字、下划线、数字组成',
trigger: 'change',
},
]"
@ -445,8 +445,8 @@ watch(
});
leftData.treeData = [
{
title: info.data.shareConfig.schema,
key: info.data.shareConfig.schema,
title: info.data.shareConfig?.schema,
key: info.data.shareConfig?.schema,
root: true,
children: list.map((item) => ({
title: item.name,
@ -461,8 +461,8 @@ watch(
} else {
leftData.treeData = [
{
title: info.data.shareConfig.schema,
key: info.data.shareConfig.schema,
title: info.data.shareConfig?.schema,
key: info.data.shareConfig?.schema,
root: true,
children: leftData.sourceTree.map((item) => ({
title: item.name,

View File

@ -181,7 +181,7 @@ const variableRef = ref();
const formRef = ref();
const _variableDefinitions = computed(() => {
const arr = ['user', 'org'];
const arr = ['user', 'org', 'tag'];
return variable.value.filter((item: any) => {
const _type = item.expands?.businessType || item.type || '';
return !arr.includes(_type);
@ -189,7 +189,7 @@ const _variableDefinitions = computed(() => {
});
const handleVariable = (obj: any) => {
const arr = ['user', 'org'];
const arr = ['user', 'org', 'tag'];
const _array = variable.value
.filter((item: any) => {
const _type = item.expands?.businessType || item.type || '';

View File

@ -6,6 +6,7 @@
@ok="confirm"
@cancel="emits('update:visible', false)"
:confirmLoading="loading"
destroyOnClose
class="edit-dialog-container"
>
<j-form ref="formRef" :model="form.data" layout="vertical">
@ -131,6 +132,7 @@ import {
editPermission_api,
addPermission_api,
} from '@/api/system/permission';
import { cloneDeep } from 'lodash-es';
const defaultAction = [
{ action: 'query', name: '查询', describe: '查询' },
@ -144,7 +146,7 @@ const props = defineProps<{
}>();
const loading = ref(false);
const dialogTitle = computed(() => (props.data.id ? '编辑' : '新增'));
const dialogTitle = computed(() => (props.data?.id ? '编辑' : '新增'));
const confirm = () => {
loading.value = true;
formRef.value
@ -165,7 +167,7 @@ const form = reactive({
data: {
name: '',
id: '',
...props.data,
...props?.data,
actionTableData: computed(() => {
const startIndex = (pager.current - 1) * pager.pageSize;
const endIndex = Math.min(
@ -183,7 +185,7 @@ const form = reactive({
if (!id) return Promise.reject('请输入标识(ID)');
else if (id.length > 64)
return Promise.reject('最多可输入64个字符');
else if (props.data.id && props.data.id === form.data.id)
else if (props.data?.id && props.data?.id === form.data?.id)
return Promise.resolve();
else {
const resp: any = await checkId_api({ id });
@ -197,7 +199,7 @@ const form = reactive({
...form.data,
actions: table.data.filter((item: any) => item.action && item.name),
};
const api = props.data.id ? editPermission_api : addPermission_api;
const api = props.data?.id ? editPermission_api : addPermission_api;
return api(params);
},
@ -236,7 +238,7 @@ const table = reactive({
key: 'act',
},
],
data: props.data.id ? [...(props.data.actions || [])] : [...defaultAction],
data: props.data?.id ? cloneDeep([...(props.data?.actions || [])]) : [...defaultAction],
clickRemove: (index: number) => {
pager.total -= 1;
table.data.splice(index, 1);

View File

@ -94,7 +94,11 @@
</j-row>
<j-row :gutter="24" v-if="form.IsShow('add', 'edit')">
<j-col :span="12">
<j-form-item name="roleIdList" label="角色" class="flex">
<j-form-item name="roleIdList" label="角色" class="flex"
:rules="[
{ required: true, message: '请选择角色' },
]"
>
<j-select
v-model:value="form.data.roleIdList"
mode="multiple"