Merge remote-tracking branch 'yudao/dev' into dev
This commit is contained in:
commit
6662b04d12
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yudao-ui-admin-vue3",
|
"name": "yudao-ui-admin-vue3",
|
||||||
"version": "1.7.1-snapshot.1961",
|
"version": "1.7.2-snapshot",
|
||||||
"description": "基于vue3、vite4、element-plus、typesScript",
|
"description": "基于vue3、vite4、element-plus、typesScript",
|
||||||
"author": "xingyu",
|
"author": "xingyu",
|
||||||
"private": false,
|
"private": false,
|
||||||
|
@ -272,7 +272,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: '/manager/task-assign-rule',
|
path: '/manager/task-assign-rule',
|
||||||
component: () => import('@/views/bpm/taskAssignRule/index.vue'),
|
component: () => import('@/views/bpm/taskAssignRule/index.vue'),
|
||||||
name: 'BpmTaskAssignRule',
|
name: 'BpmTaskAssignRuleList',
|
||||||
meta: {
|
meta: {
|
||||||
noCache: true,
|
noCache: true,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
@ -1,10 +1,22 @@
|
|||||||
|
import type { RouteLocationNormalized, Router, RouteRecordNormalized } from 'vue-router'
|
||||||
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
||||||
import type { Router, RouteLocationNormalized, RouteRecordNormalized } from 'vue-router'
|
|
||||||
import { isUrl } from '@/utils/is'
|
import { isUrl } from '@/utils/is'
|
||||||
import { omit, cloneDeep } from 'lodash-es'
|
import { cloneDeep, omit } from 'lodash-es'
|
||||||
|
|
||||||
const modules = import.meta.glob('../views/**/*.{vue,tsx}')
|
const modules = import.meta.glob('../views/**/*.{vue,tsx}')
|
||||||
|
/**
|
||||||
|
* 注册一个异步组件
|
||||||
|
* @param componentPath 例:/bpm/oa/leave/detail
|
||||||
|
*/
|
||||||
|
export const registerComponent = (componentPath: string) => {
|
||||||
|
for (const item in modules) {
|
||||||
|
if (item.includes(componentPath)) {
|
||||||
|
// 使用异步组件的方式来动态加载组件
|
||||||
|
// @ts-ignore
|
||||||
|
return defineAsyncComponent(modules[item])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/* Layout */
|
/* Layout */
|
||||||
export const Layout = () => import('@/layout/Layout.vue')
|
export const Layout = () => import('@/layout/Layout.vue')
|
||||||
|
|
||||||
|
@ -44,10 +44,13 @@ import { CommonStatusEnum } from '@/utils/constants'
|
|||||||
import * as FormApi from '@/api/bpm/form'
|
import * as FormApi from '@/api/bpm/form'
|
||||||
import FcDesigner from '@form-create/designer'
|
import FcDesigner from '@form-create/designer'
|
||||||
import { encodeConf, encodeFields, setConfAndFields } from '@/utils/formCreate'
|
import { encodeConf, encodeFields, setConfAndFields } from '@/utils/formCreate'
|
||||||
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息
|
const message = useMessage() // 消息
|
||||||
const { query } = useRoute() // 路由
|
const { push, currentRoute } = useRouter() // 路由
|
||||||
|
const { query } = useRoute() // 路由信息
|
||||||
|
const { delView } = useTagsViewStore() // 视图操作
|
||||||
|
|
||||||
const designer = ref() // 表单设计器
|
const designer = ref() // 表单设计器
|
||||||
const dialogVisible = ref(false) // 弹窗是否展示
|
const dialogVisible = ref(false) // 弹窗是否展示
|
||||||
@ -88,10 +91,16 @@ const submitForm = async () => {
|
|||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
close()
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/** 关闭按钮 */
|
||||||
|
const close = () => {
|
||||||
|
delView(unref(currentRoute))
|
||||||
|
push('/bpm/manager/form')
|
||||||
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
@ -2,26 +2,33 @@
|
|||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
|
||||||
:model="queryParams"
|
|
||||||
ref="queryFormRef"
|
ref="queryFormRef"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
class="-mb-15px"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="表单名" prop="name">
|
<el-form-item label="表单名" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入表单名"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入表单名"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
<el-button @click="handleQuery">
|
||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<Icon class="mr-5px" icon="ep:search" />
|
||||||
<el-button type="primary" plain @click="openForm" v-hasPermi="['bpm:form:create']">
|
搜索
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
</el-button>
|
||||||
|
<el-button @click="resetQuery">
|
||||||
|
<Icon class="mr-5px" icon="ep:refresh" />
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
<el-button v-hasPermi="['bpm:form:create']" plain type="primary" @click="openForm">
|
||||||
|
<Icon class="mr-5px" icon="ep:plus" />
|
||||||
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -30,38 +37,38 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="编号" align="center" prop="id" />
|
<el-table-column align="center" label="编号" prop="id" />
|
||||||
<el-table-column label="表单名" align="center" prop="name" />
|
<el-table-column align="center" label="表单名" prop="name" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column align="center" label="状态" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column align="center" label="备注" prop="remark" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
|
align="center"
|
||||||
|
label="创建时间"
|
||||||
|
prop="createTime"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column align="center" label="操作">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['bpm:form:update']"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openForm(scope.row.id)"
|
@click="openForm(scope.row.id)"
|
||||||
v-hasPermi="['bpm:form:update']"
|
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link @click="openDetail(scope.row.id)" v-hasPermi="['bpm:form:query']">
|
<el-button v-hasPermi="['bpm:form:query']" link @click="openDetail(scope.row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['bpm:form:delete']"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete(scope.row.id)"
|
@click="handleDelete(scope.row.id)"
|
||||||
v-hasPermi="['bpm:form:delete']"
|
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -70,27 +77,28 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<Pagination
|
<Pagination
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNo"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单详情的弹窗 -->
|
<!-- 表单详情的弹窗 -->
|
||||||
<Dialog title="表单详情" v-model="detailVisible" width="800">
|
<Dialog v-model="detailVisible" title="表单详情" width="800">
|
||||||
<form-create :rule="detailData.rule" :option="detailData.option" />
|
<form-create :option="detailData.option" :rule="detailData.rule" />
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="BpmForm">
|
<script lang="ts" name="BpmForm" setup>
|
||||||
import { DICT_TYPE } from '@/utils/dict'
|
import { DICT_TYPE } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as FormApi from '@/api/bpm/form'
|
import * as FormApi from '@/api/bpm/form'
|
||||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const { push } = useRouter() // 路由
|
const { currentRoute, push } = useRouter() // 路由
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
@ -128,12 +136,16 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const openForm = (id?: number) => {
|
const openForm = (id?: number) => {
|
||||||
push({
|
const toRouter: { name: string; query?: { id: number } } = {
|
||||||
name: 'BpmFormEditor',
|
name: 'BpmFormEditor'
|
||||||
query: {
|
}
|
||||||
|
// 表单新建的时候id传的是event需要排除
|
||||||
|
if (typeof id === 'number') {
|
||||||
|
toRouter.query = {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
push(toRouter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
@ -162,7 +174,16 @@ const openDetail = async (rowId: number) => {
|
|||||||
// 弹窗打开
|
// 弹窗打开
|
||||||
detailVisible.value = true
|
detailVisible.value = true
|
||||||
}
|
}
|
||||||
|
/**表单保存返回后重新加载列表 */
|
||||||
|
watch(
|
||||||
|
() => currentRoute.value,
|
||||||
|
() => {
|
||||||
|
getList()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
)
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<el-input v-model="formData.name" placeholder="请输入组名" />
|
<el-input v-model="formData.name" placeholder="请输入组名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述">
|
<el-form-item label="描述">
|
||||||
<el-input v-model="formData.name" placeholder="请输入描述" type="textarea" />
|
<el-input v-model="formData.description" placeholder="请输入描述" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="成员" prop="memberUserIds">
|
<el-form-item label="成员" prop="memberUserIds">
|
||||||
<el-select v-model="formData.memberUserIds" multiple placeholder="请选择成员">
|
<el-select v-model="formData.memberUserIds" multiple placeholder="请选择成员">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-descriptions border :column="1">
|
<el-descriptions :column="1" border>
|
||||||
<el-descriptions-item label="请假类型">
|
<el-descriptions-item label="请假类型">
|
||||||
<dict-tag :type="DICT_TYPE.BPM_OA_LEAVE_TYPE" :value="detailData.type" />
|
<dict-tag :type="DICT_TYPE.BPM_OA_LEAVE_TYPE" :value="detailData.type" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@ -21,6 +21,7 @@ import { DICT_TYPE } from '@/utils/dict'
|
|||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
import * as LeaveApi from '@/api/bpm/leave'
|
import * as LeaveApi from '@/api/bpm/leave'
|
||||||
|
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -34,7 +35,7 @@ const queryId = query.id as unknown as number // 从 URL 传递过来的 id 编
|
|||||||
const getInfo = async () => {
|
const getInfo = async () => {
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
try {
|
try {
|
||||||
detailData.value = await LeaveApi.getLeave(queryId || props.id)
|
detailData.value = await LeaveApi.getLeave(props.id || queryId)
|
||||||
} finally {
|
} finally {
|
||||||
detailLoading.value = false
|
detailLoading.value = false
|
||||||
}
|
}
|
||||||
|
@ -2,81 +2,78 @@
|
|||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<!-- 审批信息 -->
|
<!-- 审批信息 -->
|
||||||
<el-card
|
<el-card
|
||||||
class="box-card"
|
|
||||||
v-loading="processInstanceLoading"
|
|
||||||
v-for="(item, index) in runningTasks"
|
v-for="(item, index) in runningTasks"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
v-loading="processInstanceLoading"
|
||||||
|
class="box-card"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<span class="el-icon-picture-outline">审批任务【{{ item.name }}】</span>
|
<span class="el-icon-picture-outline">审批任务【{{ item.name }}】</span>
|
||||||
</template>
|
</template>
|
||||||
<el-col :span="16" :offset="6">
|
<el-col :offset="6" :span="16">
|
||||||
<el-form
|
<el-form
|
||||||
:ref="'form' + index"
|
:ref="'form' + index"
|
||||||
:model="auditForms[index]"
|
:model="auditForms[index]"
|
||||||
:rules="auditRule"
|
:rules="auditRule"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
<el-form-item label="流程名" v-if="processInstance && processInstance.name">
|
<el-form-item v-if="processInstance && processInstance.name" label="流程名">
|
||||||
{{ processInstance.name }}
|
{{ processInstance.name }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程发起人" v-if="processInstance && processInstance.startUser">
|
<el-form-item v-if="processInstance && processInstance.startUser" label="流程发起人">
|
||||||
{{ processInstance.startUser.nickname }}
|
{{ processInstance.startUser.nickname }}
|
||||||
<el-tag type="info" size="small">{{ processInstance.startUser.deptName }}</el-tag>
|
<el-tag size="small" type="info">{{ processInstance.startUser.deptName }}</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审批建议" prop="reason">
|
<el-form-item label="审批建议" prop="reason">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
|
||||||
v-model="auditForms[index].reason"
|
v-model="auditForms[index].reason"
|
||||||
placeholder="请输入审批建议"
|
placeholder="请输入审批建议"
|
||||||
|
type="textarea"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
|
<div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
|
||||||
<el-button type="success" @click="handleAudit(item, true)">
|
<el-button type="success" @click="handleAudit(item, true)">
|
||||||
<Icon icon="ep:select" /> 通过
|
<Icon icon="ep:select" />
|
||||||
|
通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" @click="handleAudit(item, false)">
|
<el-button type="danger" @click="handleAudit(item, false)">
|
||||||
<Icon icon="ep:close" /> 不通过
|
<Icon icon="ep:close" />
|
||||||
|
不通过
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="openTaskUpdateAssigneeForm(item.id)">
|
<el-button type="primary" @click="openTaskUpdateAssigneeForm(item.id)">
|
||||||
<Icon icon="ep:edit" /> 转办
|
<Icon icon="ep:edit" />
|
||||||
|
转办
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="handleDelegate(item)">
|
<el-button type="primary" @click="handleDelegate(item)">
|
||||||
<Icon icon="ep:position" /> 委派
|
<Icon icon="ep:position" />
|
||||||
|
委派
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="warning" @click="handleBack(item)">
|
<el-button type="warning" @click="handleBack(item)">
|
||||||
<Icon icon="ep:back" /> 回退
|
<Icon icon="ep:back" />
|
||||||
|
回退
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 申请信息 -->
|
<!-- 申请信息 -->
|
||||||
<el-card class="box-card" v-loading="processInstanceLoading">
|
<el-card v-loading="processInstanceLoading" class="box-card">
|
||||||
<template #header>
|
<template #header>
|
||||||
<span class="el-icon-document">申请信息【{{ processInstance.name }}】</span>
|
<span class="el-icon-document">申请信息【{{ processInstance.name }}】</span>
|
||||||
</template>
|
</template>
|
||||||
<!-- 情况一:流程表单 -->
|
<!-- 情况一:流程表单 -->
|
||||||
<el-col v-if="processInstance?.processDefinition?.formType === 10" :span="16" :offset="6">
|
<el-col v-if="processInstance?.processDefinition?.formType === 10" :offset="6" :span="16">
|
||||||
<form-create
|
<form-create
|
||||||
ref="fApi"
|
ref="fApi"
|
||||||
:rule="detailForm.rule"
|
|
||||||
:option="detailForm.option"
|
|
||||||
v-model="detailForm.value"
|
v-model="detailForm.value"
|
||||||
|
:option="detailForm.option"
|
||||||
|
:rule="detailForm.rule"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 情况二:流程表单 -->
|
<!-- 情况二:业务表单 -->
|
||||||
<div v-if="processInstance?.processDefinition?.formType === 20">
|
<div v-if="processInstance?.processDefinition?.formType === 20">
|
||||||
<router-link
|
<BusinessFormComponent :id="processInstance.businessKey" />
|
||||||
:to="
|
|
||||||
processInstance.processDefinition.formCustomViewPath +
|
|
||||||
'?id=' +
|
|
||||||
processInstance.businessKey
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-button type="primary"><Icon icon="ep:view" /> 点击查看</el-button>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@ -85,18 +82,18 @@
|
|||||||
|
|
||||||
<!-- 高亮流程图 -->
|
<!-- 高亮流程图 -->
|
||||||
<ProcessInstanceBpmnViewer
|
<ProcessInstanceBpmnViewer
|
||||||
:id="id"
|
:id="`${id}`"
|
||||||
:process-instance="processInstance"
|
|
||||||
:loading="processInstanceLoading"
|
|
||||||
:tasks="tasks"
|
|
||||||
:bpmn-xml="bpmnXML"
|
:bpmn-xml="bpmnXML"
|
||||||
|
:loading="processInstanceLoading"
|
||||||
|
:process-instance="processInstance"
|
||||||
|
:tasks="tasks"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 弹窗:转派审批人 -->
|
<!-- 弹窗:转派审批人 -->
|
||||||
<TaskUpdateAssigneeForm ref="taskUpdateAssigneeFormRef" @success="getDetail" />
|
<TaskUpdateAssigneeForm ref="taskUpdateAssigneeFormRef" @success="getDetail" />
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="BpmProcessInstanceDetail">
|
<script lang="ts" name="BpmProcessInstanceDetail" setup>
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||||
import type { ApiAttrs } from '@form-create/element-ui/types/config'
|
import type { ApiAttrs } from '@form-create/element-ui/types/config'
|
||||||
@ -106,6 +103,8 @@ import * as TaskApi from '@/api/bpm/task'
|
|||||||
import TaskUpdateAssigneeForm from './TaskUpdateAssigneeForm.vue'
|
import TaskUpdateAssigneeForm from './TaskUpdateAssigneeForm.vue'
|
||||||
import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue'
|
import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue'
|
||||||
import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue'
|
import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue'
|
||||||
|
import { registerComponent } from '@/utils/routerHelper'
|
||||||
|
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { proxy } = getCurrentInstance() as any
|
const { proxy } = getCurrentInstance() as any
|
||||||
@ -186,6 +185,7 @@ const getDetail = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 加载流程实例 */
|
/** 加载流程实例 */
|
||||||
|
const BusinessFormComponent = ref(null) // 异步组件
|
||||||
const getProcessInstance = async () => {
|
const getProcessInstance = async () => {
|
||||||
try {
|
try {
|
||||||
processInstanceLoading.value = true
|
processInstanceLoading.value = true
|
||||||
@ -210,10 +210,12 @@ const getProcessInstance = async () => {
|
|||||||
fApi.value?.fapi?.resetBtn.show(false)
|
fApi.value?.fapi?.resetBtn.show(false)
|
||||||
fApi.value?.fapi?.disabled(true)
|
fApi.value?.fapi?.disabled(true)
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载流程图
|
// 加载流程图
|
||||||
bpmnXML.value = await DefinitionApi.getProcessDefinitionBpmnXML(processDefinition.id)
|
bpmnXML.value = await DefinitionApi.getProcessDefinitionBpmnXML(processDefinition.id as number)
|
||||||
} finally {
|
} finally {
|
||||||
processInstanceLoading.value = false
|
processInstanceLoading.value = false
|
||||||
}
|
}
|
||||||
|
@ -5,46 +5,53 @@
|
|||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
|
||||||
:model="queryParams"
|
|
||||||
ref="queryFormRef"
|
ref="queryFormRef"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
|
:model="queryParams"
|
||||||
|
class="-mb-15px"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="表名称" prop="tableName">
|
<el-form-item label="表名称" prop="tableName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.tableName"
|
v-model="queryParams.tableName"
|
||||||
placeholder="请输入表名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入表名称"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="表描述" prop="tableComment">
|
<el-form-item label="表描述" prop="tableComment">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.tableComment"
|
v-model="queryParams.tableComment"
|
||||||
placeholder="请输入表描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入表描述"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间" prop="createTime">
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.createTime"
|
v-model="queryParams.createTime"
|
||||||
value-format="YYYY-MM-dd HH:mm:ss"
|
|
||||||
type="daterange"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
type="daterange"
|
||||||
|
value-format="YYYY-MM-dd HH:mm:ss"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" />搜索</el-button>
|
<el-button @click="handleQuery">
|
||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" />重置</el-button>
|
<Icon class="mr-5px" icon="ep:search" />
|
||||||
<el-button type="primary" v-hasPermi="['infra:codegen:create']" @click="openImportTable()">
|
搜索
|
||||||
<Icon icon="ep:zoom-in" class="mr-5px" /> 导入
|
</el-button>
|
||||||
|
<el-button @click="resetQuery">
|
||||||
|
<Icon class="mr-5px" icon="ep:refresh" />
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
<el-button v-hasPermi="['infra:codegen:create']" type="primary" @click="openImportTable()">
|
||||||
|
<Icon class="mr-5px" icon="ep:zoom-in" />
|
||||||
|
导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -53,75 +60,75 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="数据源" align="center">
|
<el-table-column align="center" label="数据源">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{
|
{{
|
||||||
dataSourceConfigList.find((config) => config.id === scope.row.dataSourceConfigId)?.name
|
dataSourceConfigList.find((config) => config.id === scope.row.dataSourceConfigId)?.name
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="表名称" align="center" prop="tableName" width="200" />
|
<el-table-column align="center" label="表名称" prop="tableName" width="200" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="表描述"
|
|
||||||
align="center"
|
|
||||||
prop="tableComment"
|
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
|
align="center"
|
||||||
|
label="表描述"
|
||||||
|
prop="tableComment"
|
||||||
width="200"
|
width="200"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="实体" align="center" prop="className" width="200" />
|
<el-table-column align="center" label="实体" prop="className" width="200" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
:formatter="dateFormatter"
|
||||||
|
align="center"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
width="180"
|
width="180"
|
||||||
:formatter="dateFormatter"
|
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="更新时间"
|
:formatter="dateFormatter"
|
||||||
align="center"
|
align="center"
|
||||||
|
label="更新时间"
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
width="180"
|
width="180"
|
||||||
:formatter="dateFormatter"
|
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
<el-table-column align="center" fixed="right" label="操作" width="300px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['infra:codegen:preview']"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handlePreview(scope.row)"
|
@click="handlePreview(scope.row)"
|
||||||
v-hasPermi="['infra:codegen:preview']"
|
|
||||||
>
|
>
|
||||||
预览
|
预览
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['infra:codegen:update']"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleUpdate(scope.row.id)"
|
@click="handleUpdate(scope.row.id)"
|
||||||
v-hasPermi="['infra:codegen:update']"
|
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['infra:codegen:delete']"
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete(scope.row.id)"
|
@click="handleDelete(scope.row.id)"
|
||||||
v-hasPermi="['infra:codegen:delete']"
|
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['infra:codegen:update']"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleSyncDB(scope.row)"
|
@click="handleSyncDB(scope.row)"
|
||||||
v-hasPermi="['infra:codegen:update']"
|
|
||||||
>
|
>
|
||||||
同步
|
同步
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['infra:codegen:download']"
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleGenTable(scope.row)"
|
@click="handleGenTable(scope.row)"
|
||||||
v-hasPermi="['infra:codegen:download']"
|
|
||||||
>
|
>
|
||||||
生成代码
|
生成代码
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -130,25 +137,26 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<Pagination
|
<Pagination
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNo"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 弹窗:导入表 -->
|
<!-- 弹窗:导入表 -->
|
||||||
<ImportTable ref="importRef" success="getList" />
|
<ImportTable ref="importRef" @success="getList" />
|
||||||
<!-- 弹窗:预览代码 -->
|
<!-- 弹窗:预览代码 -->
|
||||||
<PreviewCode ref="previewRef" />
|
<PreviewCode ref="previewRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="InfraCodegen">
|
<script lang="ts" name="InfraCodegen" setup>
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import * as CodegenApi from '@/api/infra/codegen'
|
import * as CodegenApi from '@/api/infra/codegen'
|
||||||
import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
|
import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
|
||||||
import ImportTable from './ImportTable.vue'
|
import ImportTable from './ImportTable.vue'
|
||||||
import PreviewCode from './PreviewCode.vue'
|
import PreviewCode from './PreviewCode.vue'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const { push } = useRouter() // 路由跳转
|
const { push } = useRouter() // 路由跳转
|
||||||
|
@ -171,6 +171,7 @@ const loadEchartOptions = (stats) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
// TODO @hiiwbs 微信,优化使用 Echart 组件
|
||||||
readRedisInfo()
|
readRedisInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -93,7 +93,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue'
|
import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue'
|
||||||
import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'
|
import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'
|
||||||
@ -114,5 +113,3 @@ const emit = defineEmits<{
|
|||||||
(e: 'on-delete', v: number)
|
(e: 'on-delete', v: number)
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// 消息类型(Follow: 关注时回复;Message: 消息回复;Keyword: 关键词回复)
|
// 消息类型(Follow: 关注时回复;Message: 消息回复;Keyword: 关键词回复)
|
||||||
// 作为tab.name,enum的数字不能随意修改,与api参数相关
|
// 作为 tab.name,enum 的数字不能随意修改,与 api 参数相关
|
||||||
export enum MsgType {
|
export enum MsgType {
|
||||||
Follow = 1,
|
Follow = 1,
|
||||||
Message = 2,
|
Message = 2,
|
||||||
@ -31,6 +31,7 @@ export interface ReplyForm {
|
|||||||
responseHqMusicUrl?: string
|
responseHqMusicUrl?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @Dhb52:ObjData 这个类名可以在看看,ObjData 有点通用
|
||||||
export interface ObjData {
|
export interface ObjData {
|
||||||
type: ReplyType
|
type: ReplyType
|
||||||
accountId?: number
|
accountId?: number
|
||||||
|
@ -49,11 +49,12 @@
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
:list="list"
|
:list="list"
|
||||||
:msg-type="msgType"
|
:msg-type="msgType"
|
||||||
@on-update="(id) => onUpdate(id)"
|
@on-update="onUpdate"
|
||||||
@on-delete="(id) => onDelete(id)"
|
@on-delete="onDelete"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改自动回复的对话框 -->
|
<!-- 添加或修改自动回复的对话框 -->
|
||||||
|
<!-- TODO @Dhb52 -->
|
||||||
<el-dialog :title="dialogTitle" v-model="showFormDialog" width="800px" destroy-on-close>
|
<el-dialog :title="dialogTitle" v-model="showFormDialog" width="800px" destroy-on-close>
|
||||||
<el-form ref="formRef" :model="replyForm" :rules="rules" label-width="80px">
|
<el-form ref="formRef" :model="replyForm" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="消息类型" prop="requestMessageType" v-if="msgType === MsgType.Message">
|
<el-form-item label="消息类型" prop="requestMessageType" v-if="msgType === MsgType.Message">
|
||||||
@ -70,7 +71,7 @@
|
|||||||
<el-form-item label="匹配类型" prop="requestMatch" v-if="msgType === MsgType.Keyword">
|
<el-form-item label="匹配类型" prop="requestMatch" v-if="msgType === MsgType.Keyword">
|
||||||
<el-select v-model="replyForm.requestMatch" placeholder="请选择匹配类型" clearable>
|
<el-select v-model="replyForm.requestMatch" placeholder="请选择匹配类型" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.MP_AUTO_REPLY_REQUEST_MATCH)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.MP_AUTO_REPLY_REQUEST_MATCH)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
@ -95,26 +96,19 @@
|
|||||||
import WxReplySelect from '@/views/mp/components/wx-reply/main.vue'
|
import WxReplySelect from '@/views/mp/components/wx-reply/main.vue'
|
||||||
import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue'
|
import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue'
|
||||||
import * as MpAutoReplyApi from '@/api/mp/autoReply'
|
import * as MpAutoReplyApi from '@/api/mp/autoReply'
|
||||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getDictOptions, getIntDictOptions } from '@/utils/dict'
|
||||||
import { ContentWrap } from '@/components/ContentWrap'
|
import { ContentWrap } from '@/components/ContentWrap'
|
||||||
import type { TabPaneName } from 'element-plus'
|
import type { TabPaneName } from 'element-plus'
|
||||||
import ReplyTable from './components/ReplyTable.vue'
|
import ReplyTable from './components/ReplyTable.vue'
|
||||||
import { MsgType, ReplyForm, ObjData } from './components/types'
|
import { MsgType, ReplyForm, ObjData } from './components/types'
|
||||||
|
const message = useMessage() // 消息
|
||||||
|
|
||||||
const message = useMessage()
|
const msgType = ref<MsgType>(MsgType.Keyword) // 消息类型
|
||||||
|
const RequestMessageTypes = ['text', 'image', 'voice', 'video', 'shortvideo', 'location', 'link'] // 允许选择的请求消息类型
|
||||||
const formRef = ref()
|
const loading = ref(true) // 遮罩层
|
||||||
|
const total = ref(0) // 总条数
|
||||||
const msgType = ref<MsgType>(MsgType.Keyword)
|
const list = ref<any[]>([]) // 自动回复列表
|
||||||
// 允许选择的请求消息类型
|
const formRef = ref() // 表单 ref
|
||||||
const RequestMessageTypes = ['text', 'image', 'voice', 'video', 'shortvideo', 'location', 'link']
|
|
||||||
// 遮罩层
|
|
||||||
const loading = ref(true)
|
|
||||||
// 总条数
|
|
||||||
const total = ref(0)
|
|
||||||
// 自动回复列表
|
|
||||||
const list = ref<any[]>([])
|
|
||||||
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
interface QueryParams {
|
interface QueryParams {
|
||||||
pageNo: number
|
pageNo: number
|
||||||
@ -127,13 +121,9 @@ const queryParams: QueryParams = reactive({
|
|||||||
accountId: undefined
|
accountId: undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
// 弹出层标题
|
const dialogTitle = ref('') // 弹出层标题
|
||||||
const dialogTitle = ref('')
|
const showFormDialog = ref(false) // 是否显示弹出层
|
||||||
// 是否显示弹出层
|
const replyForm = ref<ReplyForm>({}) // 表单参数
|
||||||
const showFormDialog = ref(false)
|
|
||||||
// 表单参数
|
|
||||||
|
|
||||||
const replyForm = ref<ReplyForm>({})
|
|
||||||
// 回复消息
|
// 回复消息
|
||||||
const objData = ref<ObjData>({
|
const objData = ref<ObjData>({
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
【微信消息 - 定位】
|
【微信消息 - 定位】TODO @Dhb52 目前未启用
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
@ -60,7 +60,6 @@ import { MaterialType, useBeforeUpload } from '@/views/mp/hooks/useUpload'
|
|||||||
import type { UploadRawFile } from 'element-plus'
|
import type { UploadRawFile } from 'element-plus'
|
||||||
import { getAccessToken } from '@/utils/auth'
|
import { getAccessToken } from '@/utils/auth'
|
||||||
import { ObjData } from './types'
|
import { ObjData } from './types'
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
|
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
|
||||||
|
@ -117,5 +117,3 @@ const selectMaterial = (item: any) => {
|
|||||||
objData.value.thumbMediaUrl = item.url
|
objData.value.thumbMediaUrl = item.url
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-button type="success" @click="showDialog = true">
|
<el-button type="success" @click="showDialog = true">
|
||||||
{{ newsType === NewsType.Published ? '选择已发布图文' : '选择草稿箱图文' }}
|
{{ newsType === NewsType.Published ? '选择已发布图文' : '选择草稿箱图文' }}
|
||||||
<icon icon="ep:circle-check" />
|
<Icon icon="ep:circle-check" />
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -25,5 +25,3 @@ const content = computed<string | null>({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
|
import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
|
||||||
import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'
|
import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'
|
||||||
@ -59,7 +58,6 @@ import { MaterialType, useBeforeUpload } from '@/views/mp/hooks/useUpload'
|
|||||||
import type { UploadRawFile } from 'element-plus'
|
import type { UploadRawFile } from 'element-plus'
|
||||||
import { getAccessToken } from '@/utils/auth'
|
import { getAccessToken } from '@/utils/auth'
|
||||||
import { ObjData } from './types'
|
import { ObjData } from './types'
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
|
const UPLOAD_URL = import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
|
||||||
|
@ -42,6 +42,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const objData = reactive(props.objData)
|
const objData = reactive(props.objData)
|
||||||
|
// TODO @Dhb52:Tab 切换的时候,应该表单还保留着;清除只有两个时机:1)发送成功后;2)关闭窗口后;我捉摸,是不是每个 TabXXX 组件,是个独立的 Form,然后有自己的对象,不粘在 objData 一起。这样最终就是 MusicMessageForm、ImageMessageForm
|
||||||
// const tempObj = new Map().set(objData.type, Object.assign({}, objData))
|
// const tempObj = new Map().set(objData.type, Object.assign({}, objData))
|
||||||
|
|
||||||
/** 切换消息类型的 tab */
|
/** 切换消息类型的 tab */
|
||||||
|
@ -65,10 +65,10 @@ import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
|
|||||||
import { getAccessToken } from '@/utils/auth'
|
import { getAccessToken } from '@/utils/auth'
|
||||||
import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus'
|
import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus'
|
||||||
import { NewsItem } from './types'
|
import { NewsItem } from './types'
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
const UPLOAD_URL = 'http://localhost:8000/upload/' //import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传永久素材的地址
|
// const UPLOAD_URL = 'http://localhost:8000/upload/' // 上传永久素材的地址
|
||||||
|
const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传永久素材的地址
|
||||||
const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部
|
const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 设置上传的请求头部
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@ -109,7 +109,6 @@ const onMaterialSelected = (item: any) => {
|
|||||||
newsItem.value.thumbUrl = item.url
|
newsItem.value.thumbUrl = item.url
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======================== 文件上传 ========================
|
|
||||||
const onBeforeUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => {
|
const onBeforeUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => {
|
||||||
const isType = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/jpg'].includes(
|
const isType = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/jpg'].includes(
|
||||||
rawFile.type
|
rawFile.type
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 添加或修改草稿对话框 -->
|
<!-- 添加或修改草稿对话框 -->
|
||||||
|
<!-- TODO @Dhb52:是不是整个做成一个组件 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="isCreating ? '新建图文' : '修改图文'"
|
:title="isCreating ? '新建图文' : '修改图文'"
|
||||||
width="80%"
|
width="80%"
|
||||||
|
@ -130,6 +130,7 @@ const emit = defineEmits<{
|
|||||||
(e: 'update:modelValue', v: any)
|
(e: 'update:modelValue', v: any)
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
// TODO @Dhb52 输入的 table 切换时,表单应该保留
|
||||||
const menu = computed({
|
const menu = computed({
|
||||||
get() {
|
get() {
|
||||||
return props.modelValue
|
return props.modelValue
|
||||||
|
@ -212,7 +212,7 @@ const handleDelete = async (id: number) => {
|
|||||||
// 删除的二次确认
|
// 删除的二次确认
|
||||||
await message.delConfirm()
|
await message.delConfirm()
|
||||||
// 发起删除
|
// 发起删除
|
||||||
await NotifyTemplateApi.deleteNotifyTemplateApi(id)
|
await NotifyTemplateApi.deleteNotifyTemplate(id)
|
||||||
message.success('删除成功')
|
message.success('删除成功')
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
|
@ -91,6 +91,7 @@ const open = async (row: RoleApi.RoleVO) => {
|
|||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
// 校验表单
|
// 校验表单
|
||||||
if (!formRef) return
|
if (!formRef) return
|
||||||
@ -109,6 +110,8 @@ const submitForm = async () => {
|
|||||||
await PermissionApi.assignRoleMenu(data)
|
await PermissionApi.assignRoleMenu(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,7 @@ const open = async (row: RoleApi.RoleVO) => {
|
|||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
@ -121,6 +122,8 @@ const submitForm = async () => {
|
|||||||
await PermissionApi.assignRoleDataScope(data)
|
await PermissionApi.assignRoleDataScope(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
@ -156,9 +156,9 @@
|
|||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<RoleForm ref="formRef" @success="getList" />
|
<RoleForm ref="formRef" @success="getList" />
|
||||||
<!-- 表单弹窗:菜单权限 -->
|
<!-- 表单弹窗:菜单权限 -->
|
||||||
<RoleAssignMenuForm ref="assignMenuFormRef" />
|
<RoleAssignMenuForm ref="assignMenuFormRef" @success="getList" />
|
||||||
<!-- 表单弹窗:数据权限 -->
|
<!-- 表单弹窗:数据权限 -->
|
||||||
<RoleDataPermissionForm ref="dataPermissionFormRef" />
|
<RoleDataPermissionForm ref="dataPermissionFormRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" name="SystemRole" setup>
|
<script lang="ts" name="SystemRole" setup>
|
||||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
|
@ -230,7 +230,7 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await UserApi.getUserPage(queryParams.value)
|
const data = await UserApi.getUserPage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
Reference in New Issue
Block a user