fix: warn

This commit is contained in:
xingyu 2023-01-28 09:25:49 +08:00
parent e7a8d45a67
commit e439a72210
9 changed files with 18 additions and 26 deletions

View File

@ -41,7 +41,7 @@ export const setConfAndFields2 = (
detailPreview: object, detailPreview: object,
conf: string, conf: string,
fields: string, fields: string,
value: object value?: object
) => { ) => {
// @ts-ignore // @ts-ignore
detailPreview.value.option = JSON.parse(conf) detailPreview.value.option = JSON.parse(conf)

View File

@ -43,7 +43,6 @@
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts" name="BpmFormEditor"> <script setup lang="ts" name="BpmFormEditor">
import { reactive } from 'vue'
import { FormInstance } from 'element-plus' import { FormInstance } from 'element-plus'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants' import { CommonStatusEnum } from '@/utils/constants'

View File

@ -50,13 +50,12 @@
// import // import
import * as FormApi from '@/api/bpm/form' import * as FormApi from '@/api/bpm/form'
import { allSchemas } from './form.data' import { allSchemas } from './form.data'
// import
import { setConfAndFields2 } from '@/utils/formCreate'
const { t } = useI18n() // const { t } = useI18n() //
const router = useRouter() // const router = useRouter() //
// import
import { setConfAndFields2 } from '@/utils/formCreate'
// //
const [registerTable, { deleteData }] = useXTable({ const [registerTable, { deleteData }] = useXTable({
allSchemas: allSchemas, allSchemas: allSchemas,

View File

@ -86,7 +86,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref } from 'vue'
// import // import
import * as UserGroupApi from '@/api/bpm/userGroup' import * as UserGroupApi from '@/api/bpm/userGroup'
import { getListSimpleUsersApi, UserVO } from '@/api/system/user' import { getListSimpleUsersApi, UserVO } from '@/api/system/user'

View File

@ -303,7 +303,6 @@
<script setup lang="ts"> <script setup lang="ts">
// import // import
import { onMounted, ref, unref } from 'vue'
import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { FormInstance, UploadInstance } from 'element-plus' import { FormInstance, UploadInstance } from 'element-plus'
@ -312,13 +311,12 @@ import { getAccessToken, getTenantId } from '@/utils/auth'
import * as FormApi from '@/api/bpm/form' import * as FormApi from '@/api/bpm/form'
import * as ModelApi from '@/api/bpm/model' import * as ModelApi from '@/api/bpm/model'
import { allSchemas, rules } from './model.data' import { allSchemas, rules } from './model.data'
import { setConfAndFields2 } from '@/utils/formCreate'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
const router = useRouter() // const router = useRouter() //
import { setConfAndFields2 } from '@/utils/formCreate'
// ========== ========== // ========== ==========
const [registerTable, { reload }] = useXTable({ const [registerTable, { reload }] = useXTable({
allSchemas: allSchemas, allSchemas: allSchemas,
@ -388,7 +386,7 @@ const handleAssignRule = (row) => {
const dialogVisible = ref(false) const dialogVisible = ref(false)
const dialogTitle = ref('新建模型') const dialogTitle = ref('新建模型')
const dialogLoading = ref(false) const dialogLoading = ref(false)
const saveForm = ref({}) const saveForm = ref()
const saveFormRef = ref<FormInstance>() const saveFormRef = ref<FormInstance>()
// //

View File

@ -12,7 +12,6 @@
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'
import { FormExpose } from '@/components/Form' import { FormExpose } from '@/components/Form'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'

View File

@ -6,7 +6,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref } from 'vue'
// import // import
import * as LeaveApi from '@/api/bpm/leave' import * as LeaveApi from '@/api/bpm/leave'
import { allSchemas } from '@/views/bpm/oa/leave/leave.data' import { allSchemas } from '@/views/bpm/oa/leave/leave.data'

View File

@ -48,6 +48,8 @@
import { allSchemas } from './process.create' import { allSchemas } from './process.create'
import * as DefinitionApi from '@/api/bpm/definition' import * as DefinitionApi from '@/api/bpm/definition'
import * as ProcessInstanceApi from '@/api/bpm/processInstance' import * as ProcessInstanceApi from '@/api/bpm/processInstance'
import { setConfAndFields2 } from '@/utils/formCreate'
import { ApiAttrs } from '@form-create/element-ui/types/config'
const router = useRouter() // const router = useRouter() //
const message = useMessage() // const message = useMessage() //
@ -65,8 +67,6 @@ const [registerTable] = useXTable({
// ========== ========== // ========== ==========
import { setConfAndFields2 } from '@/utils/formCreate'
import { ApiAttrs } from '@form-create/element-ui/types/config'
const fApi = ref<ApiAttrs>() const fApi = ref<ApiAttrs>()
// //
@ -76,7 +76,7 @@ const detailForm = ref({
}) })
// //
const selectProcessInstance = ref(undefined) // const selectProcessInstance = ref() //
/** 处理选择流程的按钮操作 **/ /** 处理选择流程的按钮操作 **/
const handleSelect = async (row) => { const handleSelect = async (row) => {
// //

View File

@ -190,7 +190,6 @@
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getCurrentInstance } from 'vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import * as ProcessInstanceApi from '@/api/bpm/processInstance' import * as ProcessInstanceApi from '@/api/bpm/processInstance'
@ -198,6 +197,9 @@ import * as DefinitionApi from '@/api/bpm/definition'
import * as TaskApi from '@/api/bpm/task' import * as TaskApi from '@/api/bpm/task'
import * as ActivityApi from '@/api/bpm/activity' import * as ActivityApi from '@/api/bpm/activity'
import { formatPast2 } from '@/utils/formatTime' import { formatPast2 } from '@/utils/formatTime'
import { setConfAndFields2 } from '@/utils/formCreate'
import { ApiAttrs } from '@form-create/element-ui/types/config'
import { useUserStore } from '@/store/modules/user'
const { query } = useRoute() // const { query } = useRoute() //
const message = useMessage() // const message = useMessage() //
@ -207,9 +209,9 @@ const { proxy } = getCurrentInstance()
// ========== ========== // ========== ==========
const id = query.id as unknown as number const id = query.id as unknown as number
const processInstanceLoading = ref(false) // const processInstanceLoading = ref(false) //
const processInstance = ref({}) // const processInstance = ref() //
const runningTasks = ref([]) // const runningTasks = ref() //
const auditForms = ref([]) // const auditForms = ref() //
const auditRule = reactive({ const auditRule = reactive({
reason: [{ required: true, message: '审批建议不能为空', trigger: 'blur' }] reason: [{ required: true, message: '审批建议不能为空', trigger: 'blur' }]
}) })
@ -244,9 +246,6 @@ const handleAudit = async (task, pass) => {
} }
// ========== ========== // ========== ==========
import { setConfAndFields2 } from '@/utils/formCreate'
import { ApiAttrs } from '@form-create/element-ui/types/config'
import { useUserStore } from '@/store/modules/user'
const fApi = ref<ApiAttrs>() const fApi = ref<ApiAttrs>()
const userId = useUserStore().getUser.id // const userId = useUserStore().getUser.id //
// //
@ -258,7 +257,7 @@ const detailForm = ref({
// ========== ========== // ========== ==========
const tasksLoad = ref(true) const tasksLoad = ref(true)
const tasks = ref([]) const tasks = ref()
const getTimelineItemIcon = (item) => { const getTimelineItemIcon = (item) => {
if (item.result === 1) { if (item.result === 1) {
@ -302,7 +301,7 @@ const updateAssigneeRules = ref({
assigneeUserId: [{ required: true, message: '新审批人不能为空', trigger: 'change' }] assigneeUserId: [{ required: true, message: '新审批人不能为空', trigger: 'change' }]
}) })
const updateAssigneeFormRef = ref() const updateAssigneeFormRef = ref()
const userOptions = ref([]) const userOptions = ref()
// //
const handleUpdateAssignee = (task) => { const handleUpdateAssignee = (task) => {
@ -402,8 +401,8 @@ const getDetail = () => {
data.formVariables data.formVariables
) )
nextTick().then(() => { nextTick().then(() => {
fApi.value.btn.show(false) fApi.value?.btn.show(false)
fApi.value.resetBtn.show(false) fApi.value?.resetBtn.show(false)
}) })
} }