diff --git a/src/api/oa_Initiate.ts b/src/api/oa_Initiate.ts new file mode 100644 index 0000000..302a35e --- /dev/null +++ b/src/api/oa_Initiate.ts @@ -0,0 +1,51 @@ +import request from "@/utils/request"; + +// // 审批流程表列表 +// export function apiOaFlowLists(params: any) { +// return request.get({ url: "/works.bgsp.oa_flow/lists", params }); +// } + +// // 添加审批流程表 +// export function apiOaFlowAdd(params: any) { +// return request.post({ url: "/works.bgsp.oa_flow/add", params }); +// } + +// // 编辑审批流程表 +// export function apiOaFlowEdit(params: any) { +// return request.post({ url: "/works.bgsp.oa_flow/edit", params }); +// } + +// // 删除审批流程表 +// export function apiOaFlowDelete(params: any) { +// return request.post({ url: "/works.bgsp.oa_flow/delete", params }); +// } + +// // 审批流程表详情 +// export function apiOaFlowDetail(params: any) { +// return request.get({ url: "/works.bgsp.oa_flow/detail", params }); +// } + +// 审批流程表列表 +export function apiOaFlowTypeLists(params: any) { + return request.get({ url: "/works.bgsp.oa_flow_type/all", params }); +} + +export function apiOaoaApproveLists(params: any) { + return request.get({ url: "/works.bgsp.oa_approve/lists", params }); +} + +export function apiOaoaApproveDetail(params: any) { + return request.get({ url: "/works.bgsp.oa_approve/detail", params }); +} + +export function apiOaoaApproveAdd(params: any) { + return request.post({ url: "/works.bgsp.oa_approve/add", params }); +} + +export function apiOaoaApproveCopy(params: any) { + return request.get({ url: "/works.bgsp.oa_approve/copy", params }); +} + +export function apiOaoaApprovelst(params: any) { + return request.get({ url: "/works.bgsp.oa_approve/lst", params }); +} diff --git a/src/components/generateForm/index.vue b/src/components/generateForm/index.vue index 1a82dc9..5c34024 100644 --- a/src/components/generateForm/index.vue +++ b/src/components/generateForm/index.vue @@ -2,28 +2,29 @@ - - + + - - + - - + + - - + - - + + - + @@ -45,6 +46,10 @@ const props = defineProps({ type: Array, required: true }, + formData: { + type: Object, + required: true + } }) const deptList = ref([]) @@ -53,39 +58,11 @@ const getDeptList = async () => { deptList.value = res.lists } getDeptList() -const formData = reactive({}) - // 表单验证 const formRules = reactive({ }); -const setRules = () => { - props.config.forEach(item => { - if (item.isRequired) { - formRules[item.value] = [ - { - required: true, - message: "请输入" + item.label, - trigger: ["blur"], - }, - ] - } - }) -} - -setRules() - - - - - - - - - - - const showPerDialog = ref(false) const personnel = ref(null) @@ -98,12 +75,19 @@ const userclick = async (val) => { personnel.value.open() } const submituser = (e) => { - formData[value + '_name'] = e.name - formData[value] = e.id + props.formData[value + '_name'] = e.name + props.formData[value] = e.id showPerDialog.value = false } - - - +const setKey = () => { + props.config.forEach(item => { + props.formData[item.value] = { + name: item.label, + value: "" + } + }) + console.log(props.formData, 'formData'); +} +setKey() \ No newline at end of file diff --git a/src/components/oaFlow/index.vue b/src/components/oaFlow/index.vue new file mode 100644 index 0000000..e1f6461 --- /dev/null +++ b/src/components/oaFlow/index.vue @@ -0,0 +1,68 @@ + + \ No newline at end of file diff --git a/src/views/oa_CopyMe/index.vue b/src/views/oa_CopyMe/index.vue new file mode 100644 index 0000000..94cfd6a --- /dev/null +++ b/src/views/oa_CopyMe/index.vue @@ -0,0 +1,124 @@ + + + + diff --git a/src/views/oa_Deal/detail.vue b/src/views/oa_Deal/detail.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/oa_Deal/index.vue b/src/views/oa_Deal/index.vue new file mode 100644 index 0000000..69baab3 --- /dev/null +++ b/src/views/oa_Deal/index.vue @@ -0,0 +1,118 @@ + + + + diff --git a/src/views/oa_Initiate/detail.vue b/src/views/oa_Initiate/detail.vue new file mode 100644 index 0000000..a44ff22 --- /dev/null +++ b/src/views/oa_Initiate/detail.vue @@ -0,0 +1,76 @@ + + + + diff --git a/src/views/oa_Initiate/edit.vue b/src/views/oa_Initiate/edit.vue new file mode 100644 index 0000000..0ee7509 --- /dev/null +++ b/src/views/oa_Initiate/edit.vue @@ -0,0 +1,87 @@ + + + \ No newline at end of file diff --git a/src/views/oa_Initiate/index.vue b/src/views/oa_Initiate/index.vue new file mode 100644 index 0000000..c1d653b --- /dev/null +++ b/src/views/oa_Initiate/index.vue @@ -0,0 +1,169 @@ + + + + + \ No newline at end of file diff --git a/src/views/oa_flow_type/edit.vue b/src/views/oa_flow_type/edit.vue index a315624..5971628 100644 --- a/src/views/oa_flow_type/edit.vue +++ b/src/views/oa_flow_type/edit.vue @@ -56,12 +56,12 @@ - - - - - - + + + + + + @@ -70,11 +70,11 @@ - + 删除 @@ -85,7 +85,7 @@ - + @@ -133,49 +133,14 @@ const formData = reactive({ department_ids: "", data: [ { - "type": 0, - "label": "请假类型", - "value": "DZFS", - isRequired: true, - }, - { - "type": 1, - "label": "开始时间", - "value": "SD", - isRequired: true, - - }, - { - "type": 1, - "label": "结束时间", - "value": "DSFSD", - isRequired: true, - - }, - { - "type": 0, - "label": "请假天数", - "value": "DSF", - isRequired: false, - - }, - { - "type": 4, - "label": "请假事由", - "value": "SDS", - isRequired: true, - - }, - { - "type": 5, - "label": "附件", - "value": "DZFS", - isRequired: false, - + "type": '0', + "label": "", + "value": "", }, ] }); +const previewObj = reactive({}) // 表单验证 const formRules = reactive({ @@ -238,12 +203,21 @@ const previewFn = () => { formData.data.forEach((item: any) => { item.value = Pinyin.getCamelChars(item.label) }); + console.log(formData.data) + showDialog.value = true; +} + +const handleDelete = (index: number) => { + formData.data.splice(index, 1); +} + +const handleEdit = (index: number) => { showDialog.value = true; } const handAdd = () => { formData.data.push({ - "type": 0, + "type": '', "label": "", "value": "", isRequired: false, diff --git a/src/views/oa_plan/detail.vue b/src/views/oa_plan/detail.vue index 2f7f69d..69a1555 100644 --- a/src/views/oa_plan/detail.vue +++ b/src/views/oa_plan/detail.vue @@ -56,8 +56,6 @@ const setFormData = async (data: Record) => { } - - // 提交按钮 const handleSubmit = async () => { popupRef.value?.close() diff --git a/src/views/oa_work/components/sendReport.vue b/src/views/oa_work/components/sendReport.vue index bf5f97a..5accf87 100644 --- a/src/views/oa_work/components/sendReport.vue +++ b/src/views/oa_work/components/sendReport.vue @@ -122,5 +122,24 @@ const handleDelete = async (id: number | any[]) => { getLists() } +[ + { + name: "假勤", + children: [ + { + name: "请假" + }, + { + name: "请假" + }, + { + name: "请假" + }, + ] + } + +] + + getLists() \ No newline at end of file diff --git a/src/views/oa_work/index.vue b/src/views/oa_work/index.vue index ac7a39d..641e730 100644 --- a/src/views/oa_work/index.vue +++ b/src/views/oa_work/index.vue @@ -8,7 +8,6 @@ - @@ -24,3 +23,4 @@ const activeName = ref('first') +