mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
fix: some warn
This commit is contained in:
parent
5df6addb78
commit
6e12fa4d78
@ -22,6 +22,7 @@ export type ModelVO = {
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
bpmnXml: string
|
||||
}
|
||||
|
||||
export const getModelPageApi = async (params) => {
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
</VxeGrid>
|
||||
</template>
|
||||
<script lang="ts" setup name="XTable">
|
||||
<script setup lang="ts" name="XTable">
|
||||
import { PropType } from 'vue'
|
||||
import { SizeType, VxeGridInstance } from 'vxe-table'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
|
@ -287,7 +287,7 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup name="UserTaskListeners">
|
||||
<script setup lang="ts" name="UserTaskListeners">
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { createListenerObject, updateElementExtensions } from '../../utils'
|
||||
import { initListenerForm, initListenerType, eventType, listenerType, fieldType } from './utilSelf'
|
||||
|
@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<Error type="403" @error-click="errorClick()" />
|
||||
<Error type="403" @error-click="push('/')" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const { push } = useRouter()
|
||||
|
||||
const errorClick = () => {
|
||||
push('/')
|
||||
}
|
||||
</script>
|
||||
|
@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<Error @error-click="errorClick()" />
|
||||
<Error @error-click="push('/')" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const { push } = useRouter()
|
||||
|
||||
const errorClick = () => {
|
||||
push('/')
|
||||
}
|
||||
</script>
|
||||
|
@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<Error type="500" @error-click="errorClick()" />
|
||||
<Error type="500" @error-click="push('/')" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const { push } = useRouter()
|
||||
|
||||
const errorClick = () => {
|
||||
push('/')
|
||||
}
|
||||
</script>
|
||||
|
@ -1,7 +1,4 @@
|
||||
import { reactive } from 'vue'
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
// CrudSchema
|
||||
const crudSchemas = reactive<VxeCrudSchema>({
|
||||
|
@ -46,20 +46,16 @@
|
||||
</ContentWrap>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
// 全局相关的 import
|
||||
import { ref } from 'vue'
|
||||
|
||||
// 业务相关的 import
|
||||
import * as DefinitionApi from '@/api/bpm/definition'
|
||||
// import * as ModelApi from '@/api/bpm/model'
|
||||
import { allSchemas } from './definition.data'
|
||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const router = useRouter() // 路由
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||
|
||||
// ========== 列表相关 ==========
|
||||
const queryParams = reactive({
|
||||
key: query.key
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
|
@ -1,52 +1,49 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 列表 -->
|
||||
<div>
|
||||
<XTable @register="registerTable">
|
||||
<!-- 操作:新增 -->
|
||||
<template #toolbar_buttons>
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:zoom-in"
|
||||
:title="t('action.add')"
|
||||
v-hasPermi="['system:post:create']"
|
||||
@click="handleCreate()"
|
||||
/>
|
||||
</template>
|
||||
<template #actionbtns_default="{ row }">
|
||||
<!-- 操作:修改 -->
|
||||
<XTextButton
|
||||
preIcon="ep:edit"
|
||||
:title="t('action.edit')"
|
||||
v-hasPermi="['bpm:form:update']"
|
||||
@click="handleUpdate(row.id)"
|
||||
/>
|
||||
<!-- 操作:详情 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
:title="t('action.detail')"
|
||||
v-hasPermi="['bpm:form:query']"
|
||||
@click="handleDetail(row.id)"
|
||||
/>
|
||||
<!-- 操作:删除 -->
|
||||
<XTextButton
|
||||
preIcon="ep:delete"
|
||||
:title="t('action.del')"
|
||||
v-hasPermi="['bpm:form:delete']"
|
||||
@click="deleteData(row.id)"
|
||||
/>
|
||||
</template>
|
||||
</XTable>
|
||||
<!-- 表单详情的弹窗 -->
|
||||
<XModal v-model="detailOpen" width="800" title="表单详情">
|
||||
<form-create :rule="detailPreview.rule" :option="detailPreview.option" v-if="detailOpen" />
|
||||
</XModal>
|
||||
</div>
|
||||
<XTable @register="registerTable">
|
||||
<!-- 操作:新增 -->
|
||||
<template #toolbar_buttons>
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:zoom-in"
|
||||
:title="t('action.add')"
|
||||
v-hasPermi="['system:post:create']"
|
||||
@click="handleCreate()"
|
||||
/>
|
||||
</template>
|
||||
<template #actionbtns_default="{ row }">
|
||||
<!-- 操作:修改 -->
|
||||
<XTextButton
|
||||
preIcon="ep:edit"
|
||||
:title="t('action.edit')"
|
||||
v-hasPermi="['bpm:form:update']"
|
||||
@click="handleUpdate(row.id)"
|
||||
/>
|
||||
<!-- 操作:详情 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
:title="t('action.detail')"
|
||||
v-hasPermi="['bpm:form:query']"
|
||||
@click="handleDetail(row.id)"
|
||||
/>
|
||||
<!-- 操作:删除 -->
|
||||
<XTextButton
|
||||
preIcon="ep:delete"
|
||||
:title="t('action.del')"
|
||||
v-hasPermi="['bpm:form:delete']"
|
||||
@click="deleteData(row.id)"
|
||||
/>
|
||||
</template>
|
||||
</XTable>
|
||||
<!-- 表单详情的弹窗 -->
|
||||
<XModal v-model="detailOpen" width="800" title="表单详情">
|
||||
<form-create :rule="detailPreview.rule" :option="detailPreview.option" v-if="detailOpen" />
|
||||
</XModal>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="BpmForm">
|
||||
// 全局相关的 import
|
||||
// 业务相关的 import
|
||||
import * as FormApi from '@/api/bpm/form'
|
||||
import { allSchemas } from './form.data'
|
||||
@ -54,7 +51,7 @@ import { allSchemas } from './form.data'
|
||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const router = useRouter() // 路由
|
||||
const { push } = useRouter() // 路由
|
||||
|
||||
// 列表相关的变量
|
||||
const [registerTable, { deleteData }] = useXTable({
|
||||
@ -65,14 +62,14 @@ const [registerTable, { deleteData }] = useXTable({
|
||||
|
||||
// 新增操作
|
||||
const handleCreate = () => {
|
||||
router.push({
|
||||
push({
|
||||
name: 'bpmFormEditor'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改操作
|
||||
const handleUpdate = async (rowId: number) => {
|
||||
await router.push({
|
||||
await push({
|
||||
name: 'bpmFormEditor',
|
||||
query: {
|
||||
id: rowId
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
import { reactive } from 'vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { required } from '@/utils/formRules'
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// 表单校验
|
||||
|
@ -27,7 +27,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
// import { translations } from '@/components/bpmnProcessDesigner/src/translations'
|
||||
// 自定义元素选中时的弹出菜单(修改 默认任务 为 用户任务)
|
||||
import CustomContentPadProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/content-pad'
|
||||
@ -36,11 +35,10 @@ import CustomPaletteProvider from '@/components/bpmnProcessDesigner/package/desi
|
||||
// import xmlObj2json from "./utils/xml2json";
|
||||
// import myProcessDesigner from '@/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue'
|
||||
// import MyProcessPalette from '@/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue'
|
||||
import { createModelApi, getModelApi, updateModelApi } from '@/api/bpm/model'
|
||||
import { createModelApi, getModelApi, updateModelApi, ModelVO } from '@/api/bpm/model'
|
||||
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const router = useRouter()
|
||||
const message = useMessage()
|
||||
|
||||
// 自定义侧边栏
|
||||
// import MyProcessPanel from "../package/process-panel/ProcessPanel";
|
||||
@ -63,14 +61,14 @@ const controlForm = ref({
|
||||
// CustomPaletteProvider
|
||||
// })
|
||||
// 流程模型的信息
|
||||
const model = ref({})
|
||||
const model = ref<ModelVO>()
|
||||
onMounted(() => {
|
||||
// 如果 modelId 非空,说明是修改流程模型
|
||||
const modelId = router.currentRoute.value.query && router.currentRoute.value.query.modelId
|
||||
console.log(modelId, 'modelId')
|
||||
if (modelId) {
|
||||
// let data = '4b4909d8-97e7-11ec-8e20-862bc1a4a054'
|
||||
getModelApi(modelId).then((data) => {
|
||||
getModelApi(modelId as unknown as number).then((data) => {
|
||||
console.log(data, 'response')
|
||||
xmlString.value = data.bpmnXml
|
||||
model.value = {
|
||||
@ -109,9 +107,9 @@ const initModeler = (item) => {
|
||||
}
|
||||
|
||||
const save = (bpmnXml) => {
|
||||
const data = {
|
||||
const data: ModelVO = {
|
||||
...model.value,
|
||||
bpmnXml: bpmnXml // this.bpmnXml 只是初始化流程图,后续修改无法通过它获得
|
||||
bpmnXml: bpmnXml // bpmnXml 只是初始化流程图,后续修改无法通过它获得
|
||||
}
|
||||
console.log(data, 'data')
|
||||
|
||||
@ -119,9 +117,7 @@ const save = (bpmnXml) => {
|
||||
if (data.id) {
|
||||
updateModelApi(data).then((response) => {
|
||||
console.log(response, 'response')
|
||||
// this.$modal.msgSuccess("修改成功")
|
||||
ElMessage.success('修改成功')
|
||||
|
||||
message.success('修改成功')
|
||||
// 跳转回去
|
||||
close()
|
||||
})
|
||||
@ -130,15 +126,13 @@ const save = (bpmnXml) => {
|
||||
// 添加的提交
|
||||
createModelApi(data).then((response) => {
|
||||
console.log(response, 'response1')
|
||||
// this.$modal.msgSuccess("保存成功")
|
||||
ElMessage.success('保存成功')
|
||||
message.success('保存成功')
|
||||
// 跳转回去
|
||||
close()
|
||||
})
|
||||
}
|
||||
/** 关闭按钮 */
|
||||
const close = () => {
|
||||
// this.$tab.closeOpenPage({ path: "/bpm/manager/model" })
|
||||
router.push({ path: '/bpm/manager/model' })
|
||||
}
|
||||
</script>
|
||||
|
@ -21,7 +21,7 @@ import { rules, allSchemas } from './leave.data'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const router = useRouter() // 路由
|
||||
const { push } = useRouter() // 路由
|
||||
|
||||
// 表单参数
|
||||
const actionLoading = ref(false) // 按钮 Loading
|
||||
@ -41,15 +41,13 @@ const submitForm = async () => {
|
||||
const data = unref(formRef)?.formModel as LeaveApi.LeaveVO
|
||||
// data.startTime = XEUtils.toDateString(data.startTime, 'yyyy-MM-dd HH:mm:ss')
|
||||
// data.endTime = XEUtils.toDateString(data.endTime, 'yyyy-MM-dd HH:mm:ss')
|
||||
data.startTime = Date.parse(new Date(data.startTime).toString())
|
||||
data.endTime = Date.parse(new Date(data.endTime).toString())
|
||||
data.startTime = Date.parse(new Date(data.startTime).toString()).toString()
|
||||
data.endTime = Date.parse(new Date(data.endTime).toString()).toString()
|
||||
// 添加的提交
|
||||
await LeaveApi.createLeaveApi(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
// 关闭窗口
|
||||
router.push({
|
||||
path: '/bpm/oa/leave'
|
||||
})
|
||||
push('/bpm/oa/leave')
|
||||
} finally {
|
||||
actionLoading.value = false
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
// 业务相关的 import
|
||||
import * as LeaveApi from '@/api/bpm/leave'
|
||||
import { allSchemas } from '@/views/bpm/oa/leave/leave.data'
|
||||
|
@ -33,7 +33,7 @@ import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const router = useRouter() // 路由
|
||||
const { push } = useRouter() // 路由
|
||||
|
||||
const [registerTable, { reload }] = useXTable({
|
||||
allSchemas: allSchemas,
|
||||
@ -42,7 +42,7 @@ const [registerTable, { reload }] = useXTable({
|
||||
|
||||
// 发起请假
|
||||
const handleCreate = () => {
|
||||
router.push({
|
||||
push({
|
||||
name: 'OALeaveCreate'
|
||||
})
|
||||
}
|
||||
@ -63,7 +63,7 @@ const cancelLeave = (row) => {
|
||||
|
||||
// 详情
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
push({
|
||||
name: 'OALeaveDetail',
|
||||
query: {
|
||||
id: row.id
|
||||
@ -73,7 +73,7 @@ const handleDetail = (row) => {
|
||||
|
||||
// 审批进度
|
||||
const handleProcessDetail = (row) => {
|
||||
router.push({
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: row.processInstanceId
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
// crudSchemas
|
||||
const crudSchemas = reactive<VxeCrudSchema>({
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { reactive } from 'vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// CrudSchema
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
|
@ -12,13 +12,12 @@
|
||||
</XTable>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// 业务相关的 import
|
||||
import { allSchemas } from './done.data'
|
||||
import * as TaskApi from '@/api/bpm/task'
|
||||
|
||||
const router = useRouter() // 路由
|
||||
const { push } = useRouter() // 路由
|
||||
|
||||
const [registerTable] = useXTable({
|
||||
allSchemas: allSchemas,
|
||||
@ -27,7 +26,7 @@ const [registerTable] = useXTable({
|
||||
|
||||
// 处理审批按钮
|
||||
const handleAudit = (row) => {
|
||||
router.push({
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: row.processInstance.id
|
||||
|
@ -18,7 +18,7 @@
|
||||
import { allSchemas } from './todo.data'
|
||||
import * as TaskApi from '@/api/bpm/task'
|
||||
|
||||
const router = useRouter() // 路由
|
||||
const { push } = useRouter() // 路由
|
||||
|
||||
const [registerTable] = useXTable({
|
||||
allSchemas: allSchemas,
|
||||
@ -27,7 +27,7 @@ const [registerTable] = useXTable({
|
||||
|
||||
// 处理审批按钮
|
||||
const handleAudit = (row) => {
|
||||
router.push({
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: row.processInstance.id
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
// 表单校验
|
||||
export const rules = reactive({
|
||||
|
Loading…
Reference in New Issue
Block a user