fix: some warn

This commit is contained in:
xingyuv 2023-02-09 15:29:29 +08:00
parent 5df6addb78
commit 6e12fa4d78
24 changed files with 81 additions and 117 deletions

View File

@ -22,6 +22,7 @@ export type ModelVO = {
status: number
remark: string
createTime: string
bpmnXml: string
}
export const getModelPageApi = async (params) => {

View File

@ -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'

View File

@ -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'

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>({

View File

@ -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

View File

@ -1,4 +1,4 @@
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化

View File

@ -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

View File

@ -1,4 +1,4 @@
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化

View File

@ -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() // 国际化
// 表单校验

View File

@ -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>

View File

@ -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
}

View File

@ -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'

View File

@ -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

View File

@ -1,4 +1,4 @@
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化

View File

@ -1,4 +1,4 @@
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// crudSchemas
const crudSchemas = reactive<VxeCrudSchema>({

View File

@ -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

View File

@ -1,4 +1,4 @@
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化

View File

@ -1,4 +1,4 @@
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// 表单校验
export const rules = reactive({