fix: type warn

This commit is contained in:
xingyu 2023-04-23 19:35:14 +08:00
parent 6b7d092c29
commit fc366f18c8
12 changed files with 28 additions and 22 deletions

View File

@ -87,7 +87,7 @@
<MyProcessViewer <MyProcessViewer
key="designer" key="designer"
v-model="bpmnXML" v-model="bpmnXML"
:value="bpmnXML" :value="bpmnXML as any"
v-bind="bpmnControlForm" v-bind="bpmnControlForm"
:prefix="bpmnControlForm.prefix" :prefix="bpmnControlForm.prefix"
/> />

View File

@ -68,7 +68,7 @@ const formRules = reactive({
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }] status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const userList = ref([]) // const userList = ref<any[]>([]) //
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, id?: number) => { const open = async (type: string, id?: number) => {

View File

@ -117,6 +117,7 @@ import { dateFormatter } from '@/utils/formatTime'
import * as UserGroupApi from '@/api/bpm/userGroup' import * as UserGroupApi from '@/api/bpm/userGroup'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import UserGroupForm from './UserGroupForm.vue' import UserGroupForm from './UserGroupForm.vue'
import { UserVO } from '@/api/system/user'
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -131,7 +132,7 @@ const queryParams = reactive({
createTime: [] createTime: []
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const userList = ref([]) // const userList = ref<UserVO[]>([]) //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {

View File

@ -16,7 +16,7 @@
<!-- 流程属性器负责编辑每个流程节点的属性 --> <!-- 流程属性器负责编辑每个流程节点的属性 -->
<MyProcessPenal <MyProcessPenal
key="penal" key="penal"
:bpmnModeler="modeler" :bpmnModeler="modeler as any"
:prefix="controlForm.prefix" :prefix="controlForm.prefix"
class="process-panel" class="process-panel"
:model="model" :model="model"

View File

@ -219,7 +219,7 @@
<MyProcessViewer <MyProcessViewer
key="designer" key="designer"
v-model="bpmnXML" v-model="bpmnXML"
:value="bpmnXML" :value="bpmnXML as any"
v-bind="bpmnControlForm" v-bind="bpmnControlForm"
:prefix="bpmnControlForm.prefix" :prefix="bpmnControlForm.prefix"
/> />

View File

@ -28,7 +28,7 @@ const props = defineProps({
id: propTypes.number.def(undefined) id: propTypes.number.def(undefined)
}) })
const detailLoading = ref(false) // const detailLoading = ref(false) //
const detailData = ref({}) // const detailData = ref<any>({}) //
const queryId = query.id as unknown as number // URL id const queryId = query.id as unknown as number // URL id
/** 获得数据 */ /** 获得数据 */

View File

@ -43,7 +43,7 @@
</el-col> </el-col>
</el-card> </el-card>
<!-- 流程图预览 --> <!-- 流程图预览 -->
<ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML" /> <ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML as any" />
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts" name="BpmProcessInstanceCreate"> <script setup lang="ts" name="BpmProcessInstanceCreate">

View File

@ -33,6 +33,12 @@
import FcDesigner from '@form-create/designer' import FcDesigner from '@form-create/designer'
import { useClipboard } from '@vueuse/core' import { useClipboard } from '@vueuse/core'
import { isString } from '@/utils/is' import { isString } from '@/utils/is'
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import xml from 'highlight.js/lib/languages/java'
import json from 'highlight.js/lib/languages/json'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -112,10 +118,6 @@ const copy = async (text: string) => {
/** /**
* 代码高亮 * 代码高亮
*/ */
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import xml from 'highlight.js/lib/languages/java'
import json from 'highlight.js/lib/languages/json'
const highlightedCode = (code) => { const highlightedCode = (code) => {
// //
let language = 'json' let language = 'json'

View File

@ -59,6 +59,14 @@ import { useClipboard } from '@vueuse/core'
import { handleTree2 } from '@/utils/tree' import { handleTree2 } from '@/utils/tree'
import * as CodegenApi from '@/api/infra/codegen' import * as CodegenApi from '@/api/infra/codegen'
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import java from 'highlight.js/lib/languages/java'
import xml from 'highlight.js/lib/languages/java'
import javascript from 'highlight.js/lib/languages/javascript'
import sql from 'highlight.js/lib/languages/sql'
import typescript from 'highlight.js/lib/languages/typescript'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -184,13 +192,6 @@ const copy = async (text: string) => {
/** /**
* 代码高亮 * 代码高亮
*/ */
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import java from 'highlight.js/lib/languages/java'
import xml from 'highlight.js/lib/languages/java'
import javascript from 'highlight.js/lib/languages/javascript'
import sql from 'highlight.js/lib/languages/sql'
import typescript from 'highlight.js/lib/languages/typescript'
const highlightedCode = (item) => { const highlightedCode = (item) => {
const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1) const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1)
const result = hljs.highlight(language, item.code || '', true) const result = hljs.highlight(language, item.code || '', true)

View File

@ -122,7 +122,9 @@ const open = async (type: string, id?: number, dictType?: string) => {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
resetForm() resetForm()
formData.value.dictType = dictType if (dictType) {
formData.value.dictType = dictType
}
// //
if (id) { if (id) {
formLoading.value = true formLoading.value = true

View File

@ -102,7 +102,7 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as SmsTemplateApi.SendSmsReqVO const data = formData.value as unknown as SmsTemplateApi.SendSmsReqVO
const logId = await SmsTemplateApi.sendSms(data) const logId = await SmsTemplateApi.sendSms(data)
if (logId) { if (logId) {
message.success('提交发送成功!发送结果,见发送日志编号:' + logId) message.success('提交发送成功!发送结果,见发送日志编号:' + logId)
@ -121,7 +121,7 @@ const resetForm = () => {
mobile: '', mobile: '',
templateCode: '', templateCode: '',
templateParams: new Map() templateParams: new Map()
} } as any
formRef.value?.resetFields() formRef.value?.resetFields()
} }
</script> </script>

View File

@ -117,7 +117,7 @@ const resetForm = () => {
sort: undefined, sort: undefined,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: '' remark: ''
} } as any
formRef.value?.resetFields() formRef.value?.resetFields()
} }
</script> </script>