编号
This commit is contained in:
parent
c8188e61ec
commit
710448adff
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 80%;">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 60%;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -103,14 +103,26 @@
|
|||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="创建表单路径" prop="mappingData1">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-input v-model="formData.mappingData1" placeholder="请输入创建表单路径" >
|
||||||
|
<template #suffix >
|
||||||
|
<el-button @click="openForm()" style="width: 50px" size="default" type="text">
|
||||||
|
<el-icon style="margin-left: 45px" :size="20">
|
||||||
|
<Edit />
|
||||||
|
</el-icon>
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="视图表单路径" prop="mappingData2">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-input v-model="formData.mappingData2" placeholder="请输入视图表单路径" />
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="注解" prop="annotation">
|
<el-form-item label="注解" prop="annotation">
|
||||||
<el-input v-model="formData.annotation" placeholder="请输入注解" />
|
<el-input type="textarea" autosize v-model="formData.annotation" placeholder="请输入注解" />
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="映射数据1" prop="mappingData1">
|
|
||||||
<el-input v-model="formData.mappingData1" placeholder="请输入映射数据1" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="映射数据2" prop="mappingData2">
|
|
||||||
<el-input v-model="formData.mappingData2" placeholder="请输入映射数据2" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -118,10 +130,14 @@
|
|||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
<!-- 选择弹窗 -->
|
||||||
|
<SelectMapping ref="formMapping" @success="upData" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
import { numbersApi, numbersVO } from '@/api/home/numbers'
|
import { numbersApi, numbersVO } from '@/api/home/numbers'
|
||||||
|
import SelectMapping from "@/views/bpm/formprocessmapping/SelectMapping/SelectMapping.vue";
|
||||||
|
import {Edit} from "@element-plus/icons-vue";
|
||||||
|
|
||||||
/** 收发文编号 表单 */
|
/** 收发文编号 表单 */
|
||||||
defineOptions({ name: 'numbersForm' })
|
defineOptions({ name: 'numbersForm' })
|
||||||
@ -159,6 +175,17 @@ const formRules = reactive({
|
|||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
|
const formMapping = ref() // 表单 Ref 绑定后可以使用子组件内部定义的方法
|
||||||
|
/*打开流程模型选择*/
|
||||||
|
const openForm = async ()=>{
|
||||||
|
await formMapping.value.open()
|
||||||
|
}
|
||||||
|
/*更新路径数据*/
|
||||||
|
const upData = (val:any)=> {
|
||||||
|
formData.value.mappingData1 = val.createPath
|
||||||
|
formData.value.mappingData2 = val.detailPath
|
||||||
|
}
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
181
src/views/bpm/formprocessmapping/SelectMapping/SelectMapping.vue
Normal file
181
src/views/bpm/formprocessmapping/SelectMapping/SelectMapping.vue
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog v-model="dialogVisible" :title="dialogTitle" style="width: 80%">
|
||||||
|
<ContentWrap>
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<el-form
|
||||||
|
class="-mb-15px"
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryFormRef"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="映射名" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入映射名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="流程信息" prop="processKey">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.processKey"
|
||||||
|
placeholder="请输入流程信息"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
placeholder="请选择状态"
|
||||||
|
clearable
|
||||||
|
class="!w-240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<ContentWrap>
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="list"
|
||||||
|
highlight-current-row
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
>
|
||||||
|
<el-table-column label="映射名" align="center" prop="name" />
|
||||||
|
<el-table-column label="流程信息" align="center" prop="processKey" />
|
||||||
|
<el-table-column label="表单的提交路径" align="center" prop="formCustomCreatePath" />
|
||||||
|
<el-table-column label="表单的查看路径" align="center" prop="formCustomViewPath" />
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
:formatter="dateFormatter"
|
||||||
|
width="180px"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<Pagination
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</ContentWrap>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" @click="submit()">确定</el-button>
|
||||||
|
<el-button @click="dialogVisible=false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
||||||
|
import {FormProcessMappingApi, FormProcessMappingVO} from "@/api/bpm/formprocessmapping";
|
||||||
|
import {dateFormatter} from "@/utils/formatTime";
|
||||||
|
|
||||||
|
|
||||||
|
defineOptions({ name: 'SelectMapping' })
|
||||||
|
/*定义事件*/
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
|
||||||
|
const loading = ref(true) // 列表的加载中
|
||||||
|
const list = ref<FormProcessMappingVO[]>([]) // 列表的数据
|
||||||
|
const total = ref(0) // 列表的总页数
|
||||||
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
processKey: undefined,
|
||||||
|
formCustomCreatePath: undefined,
|
||||||
|
formCustomViewPath: undefined,
|
||||||
|
status: undefined,
|
||||||
|
createTime: []
|
||||||
|
})
|
||||||
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value.resetFields()
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await FormProcessMappingApi.getFormProcessMappingPage(queryParams)
|
||||||
|
list.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
interface Da {
|
||||||
|
createPath: string,
|
||||||
|
detailPath: string,
|
||||||
|
}
|
||||||
|
const data = ref<Da>({
|
||||||
|
createPath:'',
|
||||||
|
detailPath:''
|
||||||
|
});
|
||||||
|
const handleCurrentChange = (val: any | undefined) => {
|
||||||
|
restForm()
|
||||||
|
data.value.createPath = val.formCustomCreatePath;
|
||||||
|
data.value.detailPath = val.formCustomViewPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
const submit = ()=>{
|
||||||
|
emit('success',data.value)
|
||||||
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
|
/** 打开弹窗 */
|
||||||
|
const open = async () => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = '映射数据选择'
|
||||||
|
restForm()
|
||||||
|
await getList()
|
||||||
|
}
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
|
||||||
|
//清空数据避免重复传递
|
||||||
|
const restForm = ()=>{
|
||||||
|
data.value = {
|
||||||
|
createPath:'',
|
||||||
|
detailPath:''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user