mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
fix: warn
This commit is contained in:
parent
e7a8d45a67
commit
e439a72210
@ -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)
|
||||||
|
@ -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'
|
||||||
|
@ -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,
|
||||||
|
@ -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'
|
||||||
|
@ -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>()
|
||||||
|
|
||||||
// 设置标题
|
// 设置标题
|
||||||
|
@ -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'
|
||||||
|
|
||||||
|
@ -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'
|
||||||
|
@ -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) => {
|
||||||
// 设置选择的流程
|
// 设置选择的流程
|
||||||
|
@ -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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user