diff --git a/.env.front b/.env.front new file mode 100644 index 00000000..2641417d --- /dev/null +++ b/.env.front @@ -0,0 +1,19 @@ +# 本地开发环境 +NODE_ENV=development + +VITE_DEV=true + +# 请求路径 +VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn' + +# 上传路径 +VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH=/dev-api + +# 接口地址 +VITE_API_URL=/admin-api + +# 打包路径 +VITE_BASE_PATH=/ diff --git a/.env.static b/.env.static new file mode 100644 index 00000000..034a7f4d --- /dev/null +++ b/.env.static @@ -0,0 +1,31 @@ +# 开发环境 +NODE_ENV=production + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://localhost:48080' + +# 上传路径 +VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/admin-ui-vue3/ + +# 输出路径 +VITE_OUT_DIR=dist-dev diff --git a/package.json b/package.json index b98dbfc6..ab8683a5 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,12 @@ "scripts": { "i": "pnpm install", "dev": "vite --mode base", + "front": "vite --mode front", "ts:check": "vue-tsc --noEmit", "build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", "build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", "build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", + "build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", "serve:pro": "vite preview --mode pro", "serve:dev": "vite preview --mode dev", "serve:test": "vite preview --mode test", diff --git a/src/components/XTable/src/XTable.vue b/src/components/XTable/src/XTable.vue index 3b88266f..1f9ba4f2 100644 --- a/src/components/XTable/src/XTable.vue +++ b/src/components/XTable/src/XTable.vue @@ -13,7 +13,6 @@ import { useDesign } from '@/hooks/web/useDesign' import { XTableProps } from './type' import { isBoolean, isFunction } from '@/utils/is' import styleCss from './style/dark.scss' - import download from '@/utils/download' const { t } = useI18n() @@ -26,14 +25,13 @@ const prefixCls = getPrefixCls('x-vxe-table') const attrs = useAttrs() const emit = defineEmits(['register']) - const removeStyles = () => { - var filename = 'cssTheme' + const filename = 'cssTheme' //移除引入的文件名 - var targetelement = 'style' - var targetattr = 'id' - var allsuspects = document.getElementsByTagName(targetelement) - for (var i = allsuspects.length; i >= 0; i--) { + const targetelement = 'style' + const targetattr = 'id' + let allsuspects = document.getElementsByTagName(targetelement) + for (let i = allsuspects.length; i >= 0; i--) { if ( allsuspects[i] && allsuspects[i].getAttribute(targetattr) != null && @@ -45,13 +43,12 @@ const removeStyles = () => { } } const reImport = () => { - var head = document.getElementsByTagName('head')[0] - var style = document.createElement('style') + let head = document.getElementsByTagName('head')[0] + let style = document.createElement('style') style.innerText = styleCss style.id = 'cssTheme' head.appendChild(style) } - watch( () => appStore.getIsDark, () => { diff --git a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue index 5b804801..2429bc91 100644 --- a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue +++ b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue @@ -80,7 +80,8 @@ const resetFlowCondition = () => { if ( bpmnElementSourceRef.value && bpmnElementSourceRef.value.default && - bpmnElementSourceRef.value.default.id === bpmnElement.value.id + bpmnElementSourceRef.value.default.id === bpmnElement.value.id && + flowConditionForm.value.type == 'default' ) { // 默认 flowConditionForm.value = { type: 'default' } @@ -176,11 +177,13 @@ onBeforeUnmount(() => { watch( () => props.businessObject, (val) => { - if (val) { - nextTick(() => { - resetFlowCondition() - }) - } + console.log(val, 'val') + nextTick(() => { + resetFlowCondition() + }) + }, + { + immediate: true } ) diff --git a/src/views/bpm/form/formEditor.vue b/src/views/bpm/form/formEditor.vue index 52b3709d..1070739e 100644 --- a/src/views/bpm/form/formEditor.vue +++ b/src/views/bpm/form/formEditor.vue @@ -3,9 +3,21 @@ + +
+ + +
+            {{ formValue }}
+          
+
+
+
@@ -48,13 +60,18 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { CommonStatusEnum } from '@/utils/constants' import * as FormApi from '@/api/bpm/form' import { encodeConf, encodeFields, setConfAndFields } from '@/utils/formCreate' +import { useClipboard } from '@vueuse/core' + const { t } = useI18n() // 国际化 const message = useMessage() // 消息 const { query } = useRoute() // 路由 const designer = ref() // 表单设计器 - +const type = ref(-1) +const formValue = ref('') +const dialogTitle = ref('') const dialogVisible = ref(false) // 弹窗是否展示 +const dialogVisible1 = ref(false) // 弹窗是否展示 const dialogLoading = ref(false) // 弹窗的加载中 const formRef = ref() const formRules = reactive({ @@ -98,7 +115,32 @@ const submitForm = async () => { dialogLoading.value = false } } - +const showJson = () => { + openModel('生成JSON') + type.value = 0 + formValue.value = designer.value.getRule() +} +const showOption = () => { + openModel('生成Options') + type.value = 1 + formValue.value = designer.value.getOption() +} +const openModel = (title: string) => { + dialogVisible1.value = true + dialogTitle.value = title +} +/** 复制 **/ +const copy = async (text: string) => { + const { copy, copied, isSupported } = useClipboard({ source: text }) + if (!isSupported) { + message.error(t('common.copyError')) + } else { + await copy() + if (unref(copied)) { + message.success(t('common.copySuccess')) + } + } +} // ========== 初始化 ========== onMounted(() => { // 场景一:新增表单 diff --git a/src/views/bpm/group/group.data.ts b/src/views/bpm/group/group.data.ts index 9d30f3b2..613a7290 100644 --- a/src/views/bpm/group/group.data.ts +++ b/src/views/bpm/group/group.data.ts @@ -16,6 +16,7 @@ const crudSchemas = reactive({ primaryType: 'id', primaryTitle: '编号', action: true, + searchSpan: 8, columns: [ { title: '组名', diff --git a/src/views/bpm/oa/leave/detail.vue b/src/views/bpm/oa/leave/detail.vue index bb30d075..25ac9981 100644 --- a/src/views/bpm/oa/leave/detail.vue +++ b/src/views/bpm/oa/leave/detail.vue @@ -2,6 +2,7 @@ + 返回 @@ -9,7 +10,8 @@ // 业务相关的 import import * as LeaveApi from '@/api/bpm/leave' import { allSchemas } from '@/views/bpm/oa/leave/leave.data' - +import { useRouter } from 'vue-router' +const router = useRouter() const { query } = useRoute() // 查询参数 const message = useMessage() // 消息弹窗 @@ -22,6 +24,10 @@ const formData = ref({ reason: undefined }) +const routerReturn = () => { + router.back() +} + onMounted(() => { id.value = query.id if (!id.value) { diff --git a/src/views/bpm/oa/leave/leave.data.ts b/src/views/bpm/oa/leave/leave.data.ts index da113baf..5b6f2c52 100644 --- a/src/views/bpm/oa/leave/leave.data.ts +++ b/src/views/bpm/oa/leave/leave.data.ts @@ -16,6 +16,7 @@ const crudSchemas = reactive({ primaryTitle: '申请编号', action: true, actionWidth: '260', + searchSpan: 8, columns: [ { title: t('common.status'), diff --git a/src/views/bpm/processInstance/create.vue b/src/views/bpm/processInstance/create.vue index c0542b22..084c085c 100644 --- a/src/views/bpm/processInstance/create.vue +++ b/src/views/bpm/processInstance/create.vue @@ -3,6 +3,10 @@
+ + @@ -56,6 +60,7 @@ import * as DefinitionApi from '@/api/bpm/definition' import * as ProcessInstanceApi from '@/api/bpm/processInstance' import { setConfAndFields2 } from '@/utils/formCreate' import { ApiAttrs } from '@form-create/element-ui/types/config' +import { DICT_TYPE } from '@/utils/dict' const router = useRouter() // 路由 const message = useMessage() // 消息 diff --git a/src/views/bpm/processInstance/process.create.ts b/src/views/bpm/processInstance/process.create.ts index b2282406..7516c0b4 100644 --- a/src/views/bpm/processInstance/process.create.ts +++ b/src/views/bpm/processInstance/process.create.ts @@ -14,7 +14,12 @@ const crudSchemas = reactive({ title: '流程分类', field: 'category', dictType: DICT_TYPE.BPM_MODEL_CATEGORY, - dictClass: 'number' + dictClass: 'number', + table: { + slots: { + default: 'category_default' + } + } }, { title: '流程版本', diff --git a/src/views/bpm/task/todo/todo.data.ts b/src/views/bpm/task/todo/todo.data.ts index 85c58ce9..419a80fe 100644 --- a/src/views/bpm/task/todo/todo.data.ts +++ b/src/views/bpm/task/todo/todo.data.ts @@ -7,6 +7,7 @@ const crudSchemas = reactive({ primaryKey: 'id', primaryType: null, action: true, + searchSpan: 8, columns: [ { title: '任务编号', diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue index e6e4b88f..012e6f68 100644 --- a/src/views/bpm/taskAssignRule/index.vue +++ b/src/views/bpm/taskAssignRule/index.vue @@ -1,7 +1,7 @@