mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-08-01 19:54:07 +08:00
Compare commits
34 Commits
feature-pr
...
fa8f650aa1
Author | SHA1 | Date | |
---|---|---|---|
fa8f650aa1 | |||
![]() |
1c23298d19 | ||
![]() |
8a97a33a29 | ||
![]() |
bf87c46d0f | ||
![]() |
9b290ae3ce | ||
63fee3b541 | |||
![]() |
458242a27b | ||
![]() |
cf200b2618 | ||
![]() |
c1924d566f | ||
![]() |
b4139676f3 | ||
![]() |
92f4160fe1 | ||
![]() |
c1a2228022 | ||
![]() |
71a2fddb1b | ||
![]() |
8bdf60c886 | ||
![]() |
38360eef12 | ||
![]() |
17225ef3df | ||
![]() |
57ab876886 | ||
![]() |
8a8ae557f7 | ||
![]() |
a401d8ede4 | ||
![]() |
3859a48825 | ||
![]() |
0a4a9e0e55 | ||
![]() |
a31bafbb4a | ||
![]() |
10e432243e | ||
583ce6d661 | |||
52a4cc210c | |||
![]() |
5ef5ee6e14 | ||
![]() |
2aefcd9070 | ||
![]() |
dad97e2f17 | ||
![]() |
22e425208c | ||
![]() |
77e8827f8b | ||
![]() |
c828517c55 | ||
![]() |
2ff9904f63 | ||
![]() |
fe21db3704 | ||
![]() |
abcecc92c5 |
@@ -26,8 +26,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.1.0",
|
||||
"@form-create/designer": "^3.1.3",
|
||||
"@form-create/element-ui": "^3.1.24",
|
||||
"@form-create/designer": "^3.2.6",
|
||||
"@form-create/element-ui": "^3.2.11",
|
||||
"@iconify/iconify": "^3.1.1",
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@videojs-player/vue": "^1.0.0",
|
||||
@@ -67,7 +67,7 @@
|
||||
"steady-xml": "^0.1.0",
|
||||
"url": "^0.11.3",
|
||||
"video.js": "^7.21.5",
|
||||
"vue": "3.4.21",
|
||||
"vue": "3.5.12",
|
||||
"vue-dompurify-html": "^4.1.4",
|
||||
"vue-i18n": "9.10.2",
|
||||
"vue-router": "^4.3.0",
|
||||
@@ -143,6 +143,7 @@
|
||||
"url": "https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues"
|
||||
},
|
||||
"homepage": "https://gitee.com/yudaocode/yudao-ui-admin-vue3",
|
||||
"web-types": "./web-types.json",
|
||||
"engines": {
|
||||
"node": ">= 16.0.0",
|
||||
"pnpm": ">=8.6.0"
|
||||
|
492
pnpm-lock.yaml
generated
492
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,7 @@
|
||||
<div v-else class="custom-hover" @click.stop="showTopSearch = !showTopSearch">
|
||||
<Icon icon="ep:search" />
|
||||
<el-select
|
||||
@click.stop
|
||||
filterable
|
||||
:reserve-keyword="false"
|
||||
remote
|
||||
|
@@ -5,7 +5,7 @@ $--color-danger: #ff4d4f;
|
||||
/* 改变 icon 字体路径变量,必需 */
|
||||
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
||||
|
||||
@import '~element-ui/packages/theme-chalk/src/index';
|
||||
@use '~element-ui/packages/theme-chalk/src/index';
|
||||
|
||||
.el-table td,
|
||||
.el-table th {
|
||||
|
@@ -1,2 +1,2 @@
|
||||
@import './process-designer.scss';
|
||||
@import './process-panel.scss';
|
||||
@use './process-designer.scss';
|
||||
@use './process-panel.scss';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
@import 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css';
|
||||
@import 'bpmn-js-token-simulation/assets/css/font-awesome.min.css';
|
||||
@import 'bpmn-js-token-simulation/assets/css/normalize.css';
|
||||
@use 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css';
|
||||
@use 'bpmn-js-token-simulation/assets/css/font-awesome.min.css';
|
||||
@use 'bpmn-js-token-simulation/assets/css/normalize.css';
|
||||
|
||||
// 边框被 token-simulation 样式覆盖了
|
||||
.djs-palette {
|
||||
|
@@ -8,7 +8,8 @@ export function hasPermi(app: App<Element>) {
|
||||
const { wsCache } = useCache()
|
||||
const { value } = binding
|
||||
const all_permission = '*:*:*'
|
||||
const permissions = wsCache.get(CACHE_KEY.USER).permissions
|
||||
const userInfo = wsCache.get(CACHE_KEY.USER)
|
||||
const permissions = userInfo?.permissions || []
|
||||
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const permissionFlag = value
|
||||
|
@@ -7,8 +7,9 @@ export function hasRole(app: App<Element>) {
|
||||
app.directive('hasRole', (el, binding) => {
|
||||
const { wsCache } = useCache()
|
||||
const { value } = binding
|
||||
const super_admin = 'admin'
|
||||
const roles = wsCache.get(CACHE_KEY.USER).roles
|
||||
const super_admin = 'super_admin'
|
||||
const userInfo = wsCache.get(CACHE_KEY.USER)
|
||||
const roles = userInfo?.roles || []
|
||||
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const roleFlag = value
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import * as NotifyMessageApi from '@/api/system/notify/message'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
|
||||
defineOptions({ name: 'Message' })
|
||||
|
||||
const { push } = useRouter()
|
||||
const userStore = useUserStoreWithOut()
|
||||
const activeName = ref('notice')
|
||||
const unreadCount = ref(0) // 未读消息数量
|
||||
const list = ref<any[]>([]) // 消息列表
|
||||
@@ -37,7 +39,11 @@ onMounted(() => {
|
||||
// 轮询刷新小红点
|
||||
setInterval(
|
||||
() => {
|
||||
getUnreadCount()
|
||||
if (userStore.getIsSetUser) {
|
||||
getUnreadCount()
|
||||
} else {
|
||||
unreadCount.value = 0
|
||||
}
|
||||
},
|
||||
1000 * 60 * 2
|
||||
)
|
||||
|
@@ -127,12 +127,8 @@ const toLastView = () => {
|
||||
const moveToCurrentTag = async () => {
|
||||
await nextTick()
|
||||
for (const v of unref(visitedViews)) {
|
||||
if (v.fullPath === unref(currentRoute).path) {
|
||||
if (v.fullPath === unref(currentRoute).fullPath) {
|
||||
moveToTarget(v)
|
||||
if (v.fullPath !== unref(currentRoute).fullPath) {
|
||||
tagsViewStore.updateVisitedView(unref(currentRoute))
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -207,7 +203,7 @@ const moveToTarget = (currentTag: RouteLocationNormalizedLoaded) => {
|
||||
|
||||
// 是否是当前tag
|
||||
const isActive = (route: RouteLocationNormalizedLoaded): boolean => {
|
||||
return route.path === unref(currentRoute).path
|
||||
return route.fullPath === unref(currentRoute).fullPath
|
||||
}
|
||||
|
||||
// 所有右键菜单组件的元素
|
||||
@@ -373,7 +369,10 @@ watch(
|
||||
:size="12"
|
||||
class="mr-5px"
|
||||
/>
|
||||
{{ t(item?.meta?.title as string) }}
|
||||
{{
|
||||
t(item?.meta?.title as string) +
|
||||
(item?.meta?.titleSuffix ? ` (${item?.meta?.titleSuffix})` : '')
|
||||
}}
|
||||
<Icon
|
||||
:class="`${prefixCls}__item--close`"
|
||||
:size="12"
|
||||
|
@@ -1,7 +1,37 @@
|
||||
import type { App } from 'vue'
|
||||
// 👇使用 form-create 需额外全局引入 element plus 组件
|
||||
import {
|
||||
// ElAutocomplete,
|
||||
// ElButton,
|
||||
// ElCascader,
|
||||
// ElCheckbox,
|
||||
// ElCheckboxButton,
|
||||
// ElCheckboxGroup,
|
||||
// ElCol,
|
||||
// ElColorPicker,
|
||||
// ElDatePicker,
|
||||
// ElDialog,
|
||||
// ElForm,
|
||||
// ElInput,
|
||||
// ElInputNumber,
|
||||
// ElPopover,
|
||||
// ElRadio,
|
||||
// ElRadioButton,
|
||||
// ElRadioGroup,
|
||||
// ElRate,
|
||||
// ElRow,
|
||||
// ElSelect,
|
||||
// ElSlider,
|
||||
// ElSwitch,
|
||||
// ElTimePicker,
|
||||
// ElTooltip,
|
||||
// ElTree,
|
||||
// ElUpload,
|
||||
// ElIcon,
|
||||
// ElProgress,
|
||||
// 以上会由 @form-create/element-ui/auto-import 自动引入
|
||||
ElAlert,
|
||||
ElTransfer,
|
||||
ElAside,
|
||||
ElContainer,
|
||||
ElDivider,
|
||||
@@ -12,7 +42,18 @@ import {
|
||||
ElTableColumn,
|
||||
ElTabPane,
|
||||
ElTabs,
|
||||
ElTransfer
|
||||
ElDropdown,
|
||||
ElDropdownMenu,
|
||||
ElDropdownItem,
|
||||
ElBadge,
|
||||
ElTag,
|
||||
ElText,
|
||||
ElMenu,
|
||||
ElMenuItem,
|
||||
ElFooter,
|
||||
ElMessage
|
||||
// ElFormItem,
|
||||
// ElOption
|
||||
} from 'element-plus'
|
||||
import FcDesigner from '@form-create/designer'
|
||||
import formCreate from '@form-create/element-ui'
|
||||
@@ -41,18 +82,30 @@ const ApiSelect = useApiSelect({
|
||||
})
|
||||
|
||||
const components = [
|
||||
ElAlert,
|
||||
ElTransfer,
|
||||
ElAside,
|
||||
ElPopconfirm,
|
||||
ElHeader,
|
||||
ElMain,
|
||||
ElContainer,
|
||||
ElDivider,
|
||||
ElTransfer,
|
||||
ElAlert,
|
||||
ElTabs,
|
||||
ElHeader,
|
||||
ElMain,
|
||||
ElPopconfirm,
|
||||
ElTable,
|
||||
ElTableColumn,
|
||||
ElTabPane,
|
||||
ElTabs,
|
||||
ElDropdown,
|
||||
ElDropdownMenu,
|
||||
ElDropdownItem,
|
||||
ElBadge,
|
||||
ElTag,
|
||||
ElText,
|
||||
ElMenu,
|
||||
ElMenuItem,
|
||||
ElFooter,
|
||||
ElMessage,
|
||||
// ElFormItem,
|
||||
// ElOption,
|
||||
UploadImg,
|
||||
UploadImgs,
|
||||
UploadFile,
|
||||
|
@@ -35,8 +35,9 @@ export const usePermissionStore = defineStore('permission', {
|
||||
return new Promise<void>(async (resolve) => {
|
||||
// 获得菜单列表,它在登录的时候,setUserInfoAction 方法中已经进行获取
|
||||
let res: AppCustomRouteRecordRaw[] = []
|
||||
if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) {
|
||||
res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
||||
const roleRouters = wsCache.get(CACHE_KEY.ROLE_ROUTERS)
|
||||
if (roleRouters) {
|
||||
res = roleRouters as AppCustomRouteRecordRaw[]
|
||||
}
|
||||
const routerMap: AppRouteRecordRaw[] = generateRoute(res)
|
||||
// 动态路由,404一定要放到最后面
|
||||
|
@@ -31,13 +31,27 @@ export const useTagsViewStore = defineStore('tagsView', {
|
||||
},
|
||||
// 新增tag
|
||||
addVisitedView(view: RouteLocationNormalizedLoaded) {
|
||||
if (this.visitedViews.some((v) => v.path === view.path)) return
|
||||
if (this.visitedViews.some((v) => v.fullPath === view.fullPath)) return
|
||||
if (view.meta?.noTagsView) return
|
||||
this.visitedViews.push(
|
||||
Object.assign({}, view, {
|
||||
title: view.meta?.title || 'no-name'
|
||||
const visitedView = Object.assign({}, view, { title: view.meta?.title || 'no-name' })
|
||||
|
||||
if (visitedView.meta) {
|
||||
const titleSuffixList: string[] = []
|
||||
this.visitedViews.forEach((v) => {
|
||||
if (v.path === visitedView.path && v.meta?.title === visitedView.meta?.title) {
|
||||
titleSuffixList.push(v.meta?.titleSuffix || '1')
|
||||
}
|
||||
})
|
||||
)
|
||||
if (titleSuffixList.length) {
|
||||
let titleSuffix = 1
|
||||
while (titleSuffixList.includes(`${titleSuffix}`)) {
|
||||
titleSuffix += 1
|
||||
}
|
||||
visitedView.meta.titleSuffix = titleSuffix === 1 ? undefined : `${titleSuffix}`
|
||||
}
|
||||
}
|
||||
|
||||
this.visitedViews.push(visitedView)
|
||||
},
|
||||
// 新增缓存
|
||||
addCachedView() {
|
||||
@@ -63,7 +77,7 @@ export const useTagsViewStore = defineStore('tagsView', {
|
||||
// 删除tag
|
||||
delVisitedView(view: RouteLocationNormalizedLoaded) {
|
||||
for (const [i, v] of this.visitedViews.entries()) {
|
||||
if (v.path === view.path) {
|
||||
if (v.fullPath === view.fullPath) {
|
||||
this.visitedViews.splice(i, 1)
|
||||
break
|
||||
}
|
||||
@@ -95,18 +109,18 @@ export const useTagsViewStore = defineStore('tagsView', {
|
||||
// 删除其他tag
|
||||
delOthersVisitedViews(view: RouteLocationNormalizedLoaded) {
|
||||
this.visitedViews = this.visitedViews.filter((v) => {
|
||||
return v?.meta?.affix || v.path === view.path
|
||||
return v?.meta?.affix || v.fullPath === view.fullPath
|
||||
})
|
||||
},
|
||||
// 删除左侧
|
||||
delLeftViews(view: RouteLocationNormalizedLoaded) {
|
||||
const index = findIndex<RouteLocationNormalizedLoaded>(
|
||||
this.visitedViews,
|
||||
(v) => v.path === view.path
|
||||
(v) => v.fullPath === view.fullPath
|
||||
)
|
||||
if (index > -1) {
|
||||
this.visitedViews = this.visitedViews.filter((v, i) => {
|
||||
return v?.meta?.affix || v.path === view.path || i > index
|
||||
return v?.meta?.affix || v.fullPath === view.fullPath || i > index
|
||||
})
|
||||
this.addCachedView()
|
||||
}
|
||||
@@ -115,18 +129,18 @@ export const useTagsViewStore = defineStore('tagsView', {
|
||||
delRightViews(view: RouteLocationNormalizedLoaded) {
|
||||
const index = findIndex<RouteLocationNormalizedLoaded>(
|
||||
this.visitedViews,
|
||||
(v) => v.path === view.path
|
||||
(v) => v.fullPath === view.fullPath
|
||||
)
|
||||
if (index > -1) {
|
||||
this.visitedViews = this.visitedViews.filter((v, i) => {
|
||||
return v?.meta?.affix || v.path === view.path || i < index
|
||||
return v?.meta?.affix || v.fullPath === view.fullPath || i < index
|
||||
})
|
||||
this.addCachedView()
|
||||
}
|
||||
},
|
||||
updateVisitedView(view: RouteLocationNormalizedLoaded) {
|
||||
for (let v of this.visitedViews) {
|
||||
if (v.path === view.path) {
|
||||
if (v.fullPath === view.fullPath) {
|
||||
v = Object.assign(v, view)
|
||||
break
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@import './variables.scss';
|
||||
@use './variables.scss' as *;
|
||||
// 导出变量
|
||||
:export {
|
||||
namespace: $namespace;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
@import './var.css';
|
||||
@import './FormCreate/index.scss';
|
||||
@import './theme.scss';
|
||||
@import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
@use './var.css';
|
||||
@use './FormCreate/index.scss';
|
||||
@use './theme.scss';
|
||||
@use 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
|
||||
.reset-margin [class*='el-icon'] + span {
|
||||
margin-left: 2px !important;
|
||||
|
@@ -10,7 +10,8 @@ const RefreshTokenKey = 'REFRESH_TOKEN'
|
||||
// 获取token
|
||||
export const getAccessToken = () => {
|
||||
// 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错
|
||||
return wsCache.get(AccessTokenKey) ? wsCache.get(AccessTokenKey) : wsCache.get('ACCESS_TOKEN')
|
||||
const accessToken = wsCache.get(AccessTokenKey)
|
||||
return accessToken ? accessToken : wsCache.get('ACCESS_TOKEN')
|
||||
}
|
||||
|
||||
// 刷新token
|
||||
|
@@ -98,8 +98,9 @@ export const isServer = typeof window === 'undefined'
|
||||
export const isClient = !isServer
|
||||
|
||||
export const isUrl = (path: string): boolean => {
|
||||
// fix:修复hash路由无法跳转的问题
|
||||
const reg =
|
||||
/(((^https?:(?:\/\/)?)(?:[-:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&%@.\w_]*)#?(?:[\w]*))?)$/
|
||||
/(((^https?:(?:\/\/)?)(?:[-:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%#\/.\w-_]*)?\??(?:[-\+=&%@.\w_]*)#?(?:[\w]*))?)$/
|
||||
return reg.test(path)
|
||||
}
|
||||
|
||||
|
@@ -12,8 +12,9 @@ export function checkPermi(value: string[]) {
|
||||
const { wsCache } = useCache()
|
||||
const permissionDatas = value
|
||||
const all_permission = '*:*:*'
|
||||
const permissions = wsCache.get(CACHE_KEY.USER).permissions
|
||||
const hasPermission = permissions.some((permission) => {
|
||||
const userInfo = wsCache.get(CACHE_KEY.USER)
|
||||
const permissions = userInfo?.permissions || []
|
||||
const hasPermission = permissions.some((permission: string) => {
|
||||
return all_permission === permission || permissionDatas.includes(permission)
|
||||
})
|
||||
return !!hasPermission
|
||||
@@ -32,9 +33,10 @@ export function checkRole(value: string[]) {
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const { wsCache } = useCache()
|
||||
const permissionRoles = value
|
||||
const super_admin = 'admin'
|
||||
const roles = wsCache.get(CACHE_KEY.USER).roles
|
||||
const hasRole = roles.some((role) => {
|
||||
const super_admin = 'super_admin'
|
||||
const userInfo = wsCache.get(CACHE_KEY.USER)
|
||||
const roles = userInfo?.roles || []
|
||||
const hasRole = roles.some((role: string) => {
|
||||
return super_admin === role || permissionRoles.includes(role)
|
||||
})
|
||||
return !!hasRole
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<div class="chat-empty">
|
||||
<!-- title -->
|
||||
<div class="center-container">
|
||||
<div class="title">芋道 AI</div>
|
||||
<div class="title">AI对话</div>
|
||||
<div class="role-list">
|
||||
<div
|
||||
class="role-item"
|
||||
|
@@ -1,14 +1,18 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<ContentWrap :body-style="{ padding: '0px' }" class="!mb-0">
|
||||
<!-- 表单设计器 -->
|
||||
<FcDesigner ref="designer" height="780px">
|
||||
<template #handle>
|
||||
<el-button round size="small" type="primary" @click="handleSave">
|
||||
<Icon class="mr-5px" icon="ep:plus" />
|
||||
保存
|
||||
</el-button>
|
||||
</template>
|
||||
</FcDesigner>
|
||||
<div
|
||||
class="h-[calc(100vh-var(--top-tool-height)-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-2px)]"
|
||||
>
|
||||
<fc-designer class="my-designer" ref="designer" :config="designerConfig">
|
||||
<template #handle>
|
||||
<el-button size="small" type="success" plain @click="handleSave">
|
||||
<Icon class="mr-5px" icon="ep:plus" />
|
||||
保存
|
||||
</el-button>
|
||||
</template>
|
||||
</fc-designer>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单保存的弹窗 -->
|
||||
@@ -55,6 +59,31 @@ const { push, currentRoute } = useRouter() // 路由
|
||||
const { query } = useRoute() // 路由信息
|
||||
const { delView } = useTagsViewStore() // 视图操作
|
||||
|
||||
// 表单设计器配置
|
||||
const designerConfig = ref({
|
||||
switchType: [], // 是否可以切换组件类型,或者可以相互切换的字段
|
||||
autoActive: true, // 是否自动选中拖入的组件
|
||||
useTemplate: false, // 是否生成vue2语法的模板组件
|
||||
formOptions: {}, // 定义表单配置默认值
|
||||
fieldReadonly: false, // 配置field是否可以编辑
|
||||
hiddenDragMenu: false, // 隐藏拖拽操作按钮
|
||||
hiddenDragBtn: false, // 隐藏拖拽按钮
|
||||
hiddenMenu: [], // 隐藏部分菜单
|
||||
hiddenItem: [], // 隐藏部分组件
|
||||
hiddenItemConfig: {}, // 隐藏组件的部分配置项
|
||||
disabledItemConfig: {}, // 禁用组件的部分配置项
|
||||
showSaveBtn: false, // 是否显示保存按钮
|
||||
showConfig: true, // 是否显示右侧的配置界面
|
||||
showBaseForm: true, // 是否显示组件的基础配置表单
|
||||
showControl: true, // 是否显示组件联动
|
||||
showPropsForm: true, // 是否显示组件的属性配置表单
|
||||
showEventForm: true, // 是否显示组件的事件配置表单
|
||||
showValidateForm: true, // 是否显示组件的验证配置表单
|
||||
showFormConfig: true, // 是否显示表单配置
|
||||
showInputData: true, // 是否显示录入按钮
|
||||
showDevice: true, // 是否显示多端适配选项
|
||||
appendConfigData: [] // 定义渲染规则所需的formData
|
||||
})
|
||||
const designer = ref() // 表单设计器
|
||||
useFormCreateDesigner(designer) // 表单设计器增强
|
||||
const dialogVisible = ref(false) // 弹窗是否展示
|
||||
@@ -119,3 +148,13 @@ onMounted(async () => {
|
||||
setConfAndFields(designer, data.conf, data.fields)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.my-designer {
|
||||
._fc-l,
|
||||
._fc-m,
|
||||
._fc-r {
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -250,10 +250,12 @@ const handleAudit = async (task, pass) => {
|
||||
if (!elForm) return
|
||||
let valid = await elForm.validate()
|
||||
if (!valid) return
|
||||
// 校验申请表单
|
||||
if (!fApi.value) return //fixme 有bug 永远为true
|
||||
valid = await fApi.value.validate()
|
||||
if (!valid) return
|
||||
// 校验申请表单(可编辑字段)
|
||||
// TODO @jason:之前这里是 if (!fApi.value) return;针对业务表单的情况下,会导致没办法审核,可能要看下。我这里改了点,看看是不是还有别的地方兼容性
|
||||
if (fApi.value) {
|
||||
valid = await fApi.value.validate()
|
||||
if (!valid) return
|
||||
}
|
||||
|
||||
// 2.1 提交审批
|
||||
const data = {
|
||||
@@ -269,7 +271,9 @@ const handleAudit = async (task, pass) => {
|
||||
data.variables = approveForms.value[index].value
|
||||
}
|
||||
// 获取表单可编辑字段的值
|
||||
data.variables = getWritableValueOfForm(task.fieldsPermission)
|
||||
if (fApi.value) {
|
||||
data.variables = getWritableValueOfForm(task.fieldsPermission)
|
||||
}
|
||||
|
||||
await TaskApi.approveTask(data)
|
||||
message.success('审批通过成功')
|
||||
|
@@ -79,6 +79,10 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
|
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<div class="float-right mb-2">
|
||||
<el-button size="small" type="primary" @click="showJson">生成 JSON</el-button>
|
||||
<el-button size="small" type="success" @click="showOption">生成 Options</el-button>
|
||||
<el-button size="small" type="danger" @click="showTemplate">生成组件</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<ContentWrap :body-style="{ padding: '0px' }" class="!mb-0">
|
||||
<!-- 表单设计器 -->
|
||||
<FcDesigner ref="designer" height="780px" />
|
||||
<div
|
||||
class="h-[calc(100vh-var(--top-tool-height)-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-2px)]"
|
||||
>
|
||||
<fc-designer class="my-designer" ref="designer" :config="designerConfig">
|
||||
<template #handle>
|
||||
<el-button size="small" type="primary" plain @click="showJson">生成JSON</el-button>
|
||||
<el-button size="small" type="success" plain @click="showOption">生成Options</el-button>
|
||||
<el-button size="small" type="danger" plain @click="showTemplate">生成组件</el-button>
|
||||
</template>
|
||||
</fc-designer>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 弹窗:表单预览 -->
|
||||
@@ -43,6 +44,31 @@ defineOptions({ name: 'InfraBuild' })
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息
|
||||
|
||||
// 表单设计器配置
|
||||
const designerConfig = ref({
|
||||
switchType: [], // 是否可以切换组件类型,或者可以相互切换的字段
|
||||
autoActive: true, // 是否自动选中拖入的组件
|
||||
useTemplate: false, // 是否生成vue2语法的模板组件
|
||||
formOptions: {}, // 定义表单配置默认值
|
||||
fieldReadonly: false, // 配置field是否可以编辑
|
||||
hiddenDragMenu: false, // 隐藏拖拽操作按钮
|
||||
hiddenDragBtn: false, // 隐藏拖拽按钮
|
||||
hiddenMenu: [], // 隐藏部分菜单
|
||||
hiddenItem: [], // 隐藏部分组件
|
||||
hiddenItemConfig: {}, // 隐藏组件的部分配置项
|
||||
disabledItemConfig: {}, // 禁用组件的部分配置项
|
||||
showSaveBtn: false, // 是否显示保存按钮
|
||||
showConfig: true, // 是否显示右侧的配置界面
|
||||
showBaseForm: true, // 是否显示组件的基础配置表单
|
||||
showControl: true, // 是否显示组件联动
|
||||
showPropsForm: true, // 是否显示组件的属性配置表单
|
||||
showEventForm: true, // 是否显示组件的事件配置表单
|
||||
showValidateForm: true, // 是否显示组件的验证配置表单
|
||||
showFormConfig: true, // 是否显示表单配置
|
||||
showInputData: true, // 是否显示录入按钮
|
||||
showDevice: true, // 是否显示多端适配选项
|
||||
appendConfigData: [] // 定义渲染规则所需的formData
|
||||
})
|
||||
const designer = ref() // 表单设计器
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
@@ -140,3 +166,13 @@ onMounted(async () => {
|
||||
hljs.registerLanguage('json', json)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.my-designer {
|
||||
._fc-l,
|
||||
._fc-m,
|
||||
._fc-r {
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -80,6 +80,7 @@
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
|
||||
<el-table-column align="center" label="ID" min-width="180" prop="id" />
|
||||
<el-table-column align="center" label="封面" min-width="80" prop="picUrl">
|
||||
<template #default="{ row }">
|
||||
<el-image :src="row.picUrl" class="h-30px w-30px" @click="imagePreview(row.picUrl)" />
|
||||
|
@@ -121,7 +121,7 @@
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
width="170"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column label="支付金额" align="center" prop="payPrice" width="100">
|
||||
@@ -157,7 +157,7 @@
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款状态" align="center" prop="status">
|
||||
<el-table-column label="退款状态" align="center" prop="status" width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.PAY_REFUND_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
|
3
types/router.d.ts
vendored
3
types/router.d.ts
vendored
@@ -15,6 +15,8 @@ import { defineComponent } from 'vue'
|
||||
|
||||
title: 'title' 设置该路由在侧边栏和面包屑中展示的名字
|
||||
|
||||
titleSuffix: '2' 当 path 和 title 重复时的后缀或备注
|
||||
|
||||
icon: 'svg-name' 设置该路由的图标
|
||||
|
||||
noCache: true 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
|
||||
@@ -37,6 +39,7 @@ declare module 'vue-router' {
|
||||
hidden?: boolean
|
||||
alwaysShow?: boolean
|
||||
title?: string
|
||||
titleSuffix?: string
|
||||
icon?: string
|
||||
noCache?: boolean
|
||||
breadcrumb?: boolean
|
||||
|
@@ -43,7 +43,7 @@ export default ({command, mode}: ConfigEnv): UserConfig => {
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: '@import "./src/styles/variables.scss";',
|
||||
additionalData: '@use "@/styles/variables.scss" as *;',
|
||||
javascriptEnabled: true
|
||||
}
|
||||
}
|
||||
|
19
web-types.json
Normal file
19
web-types.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/web-types",
|
||||
"framework": "vue",
|
||||
"name": "name written in package.json",
|
||||
"version": "version written in package.json",
|
||||
"contributions": {
|
||||
"html": {
|
||||
"types-syntax": "typescript",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "v-hasPermi"
|
||||
},
|
||||
{
|
||||
"name": "v-hasRole"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user