diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index 92ad9b6..420e7b6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -122,6 +122,14 @@ data, }) } +// 我的检测-检测完成 +export function myExecutiveDone(data: object) { + return request({ + url: '/business/labExecutive/myExecutive/complete', + method: 'post', + data, + }) +} // 部门检测-列表 export function getDeptMeasureList(data: ILabQuery) { @@ -131,3 +139,4 @@ data, }) } + diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index 92ad9b6..420e7b6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -122,6 +122,14 @@ data, }) } +// 我的检测-检测完成 +export function myExecutiveDone(data: object) { + return request({ + url: '/business/labExecutive/myExecutive/complete', + method: 'post', + data, + }) +} // 部门检测-列表 export function getDeptMeasureList(data: ILabQuery) { @@ -131,3 +139,4 @@ data, }) } + diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 127d571..72e3a88 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -19,6 +19,11 @@ type: String, default: '', }, + // 过滤组织 + deptName: { + type: String, + default: '', + }, // 是否显示部门选择下拉菜单 showDeptSelect: { type: Boolean, @@ -53,7 +58,7 @@ administrationJob: '', // 行政职务 major: '', // 专业 staffNo: '', // 人员编号 - limit: 10, + limit: 5, offset: 1, }) // 默认给deptId赋值 @@ -109,8 +114,15 @@ listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { - list.value = res.data.records - total.value = res.data.total + list.value = res.data.records.filter((item: any) => { + if (props.deptName) { + return item.deptId === props.deptName + } + else { + return item + } + }) + total.value = parseInt(res.data.total) loading.value = false }) } @@ -140,6 +152,8 @@ // 获取列表数据 fetchData(true) }) + +defineExpose({ fetchData }) diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index 92ad9b6..420e7b6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -122,6 +122,14 @@ data, }) } +// 我的检测-检测完成 +export function myExecutiveDone(data: object) { + return request({ + url: '/business/labExecutive/myExecutive/complete', + method: 'post', + data, + }) +} // 部门检测-列表 export function getDeptMeasureList(data: ILabQuery) { @@ -131,3 +139,4 @@ data, }) } + diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 127d571..72e3a88 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -19,6 +19,11 @@ type: String, default: '', }, + // 过滤组织 + deptName: { + type: String, + default: '', + }, // 是否显示部门选择下拉菜单 showDeptSelect: { type: Boolean, @@ -53,7 +58,7 @@ administrationJob: '', // 行政职务 major: '', // 专业 staffNo: '', // 人员编号 - limit: 10, + limit: 5, offset: 1, }) // 默认给deptId赋值 @@ -109,8 +114,15 @@ listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { - list.value = res.data.records - total.value = res.data.total + list.value = res.data.records.filter((item: any) => { + if (props.deptName) { + return item.deptId === props.deptName + } + else { + return item + } + }) + total.value = parseInt(res.data.total) loading.value = false }) } @@ -140,6 +152,8 @@ // 获取列表数据 fetchData(true) }) + +defineExpose({ fetchData }) - + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 4f361f3..a383ed9 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -91,6 +91,7 @@ listQuery.value.offset = 1 } getDeptMeasureList(listQuery.value).then((res) => { + // list.value = [{}] list.value = res.data.rows.map((item: ITaskList) => { item.isUrgentName = item.isUrgent == 1 ? '是' : '否' return item diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index 92ad9b6..420e7b6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -122,6 +122,14 @@ data, }) } +// 我的检测-检测完成 +export function myExecutiveDone(data: object) { + return request({ + url: '/business/labExecutive/myExecutive/complete', + method: 'post', + data, + }) +} // 部门检测-列表 export function getDeptMeasureList(data: ILabQuery) { @@ -131,3 +139,4 @@ data, }) } + diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 127d571..72e3a88 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -19,6 +19,11 @@ type: String, default: '', }, + // 过滤组织 + deptName: { + type: String, + default: '', + }, // 是否显示部门选择下拉菜单 showDeptSelect: { type: Boolean, @@ -53,7 +58,7 @@ administrationJob: '', // 行政职务 major: '', // 专业 staffNo: '', // 人员编号 - limit: 10, + limit: 5, offset: 1, }) // 默认给deptId赋值 @@ -109,8 +114,15 @@ listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { - list.value = res.data.records - total.value = res.data.total + list.value = res.data.records.filter((item: any) => { + if (props.deptName) { + return item.deptId === props.deptName + } + else { + return item + } + }) + total.value = parseInt(res.data.total) loading.value = false }) } @@ -140,6 +152,8 @@ // 获取列表数据 fetchData(true) }) + +defineExpose({ fetchData }) - + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 4f361f3..a383ed9 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -91,6 +91,7 @@ listQuery.value.offset = 1 } getDeptMeasureList(listQuery.value).then((res) => { + // list.value = [{}] list.value = res.data.rows.map((item: ITaskList) => { item.isUrgentName = item.isUrgent == 1 ? '是' : '否' return item diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index d998c13..06550a8 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -10,7 +10,7 @@ import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' -import { getMyMeasureList, myExecutiveReceive } from '@/api/business/schedule/task' +import { getMyMeasureList, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task' import type { dictType } from '@/global' import type { IMenu } from '@/components/buttonBox/buttonBox' @@ -244,7 +244,11 @@ '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }, ).then(() => { - // TODO: 完成检测 + myExecutiveDone([{ orderId: row.orderId, sampleId: row.sampleId }]).then((res) => { + if (res.code == 200) { + ElMessage.success('检测成功') + } + }) }) } @@ -378,7 +382,7 @@ 退回 - + 检测完成 diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index 92ad9b6..420e7b6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -122,6 +122,14 @@ data, }) } +// 我的检测-检测完成 +export function myExecutiveDone(data: object) { + return request({ + url: '/business/labExecutive/myExecutive/complete', + method: 'post', + data, + }) +} // 部门检测-列表 export function getDeptMeasureList(data: ILabQuery) { @@ -131,3 +139,4 @@ data, }) } + diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 127d571..72e3a88 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -19,6 +19,11 @@ type: String, default: '', }, + // 过滤组织 + deptName: { + type: String, + default: '', + }, // 是否显示部门选择下拉菜单 showDeptSelect: { type: Boolean, @@ -53,7 +58,7 @@ administrationJob: '', // 行政职务 major: '', // 专业 staffNo: '', // 人员编号 - limit: 10, + limit: 5, offset: 1, }) // 默认给deptId赋值 @@ -109,8 +114,15 @@ listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { - list.value = res.data.records - total.value = res.data.total + list.value = res.data.records.filter((item: any) => { + if (props.deptName) { + return item.deptId === props.deptName + } + else { + return item + } + }) + total.value = parseInt(res.data.total) loading.value = false }) } @@ -140,6 +152,8 @@ // 获取列表数据 fetchData(true) }) + +defineExpose({ fetchData }) - + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 4f361f3..a383ed9 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -91,6 +91,7 @@ listQuery.value.offset = 1 } getDeptMeasureList(listQuery.value).then((res) => { + // list.value = [{}] list.value = res.data.rows.map((item: ITaskList) => { item.isUrgentName = item.isUrgent == 1 ? '是' : '否' return item diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index d998c13..06550a8 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -10,7 +10,7 @@ import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' -import { getMyMeasureList, myExecutiveReceive } from '@/api/business/schedule/task' +import { getMyMeasureList, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task' import type { dictType } from '@/global' import type { IMenu } from '@/components/buttonBox/buttonBox' @@ -244,7 +244,11 @@ '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }, ).then(() => { - // TODO: 完成检测 + myExecutiveDone([{ orderId: row.orderId, sampleId: row.sampleId }]).then((res) => { + if (res.code == 200) { + ElMessage.success('检测成功') + } + }) }) } @@ -378,7 +382,7 @@ 退回 - + 检测完成 diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue index 31dfae4..d76d41d 100644 --- a/src/views/business/schedule/task/components/processNode.vue +++ b/src/views/business/schedule/task/components/processNode.vue @@ -2,9 +2,9 @@ import { Aim, Rank, Remove, } from '@element-plus/icons-vue' +import { computed, onMounted, reactive, ref, watch } from 'vue' import chooseLab from './chooseLab.vue' import type { ILabList } from './lab-interface' - // 逻辑代码 const props = defineProps({ // 默认数据 @@ -37,6 +37,7 @@ }, }) const emit = defineEmits(['update:modelValue', 'delete']) + // ------------定义props参数---------- const processNodeData = computed({ get() { @@ -67,18 +68,6 @@ return editStates.includes(processNodeData.value.measureStatus) }) -// 选择实验室 -const chooseLabDialog = ref() -const clickChoose = () => { - chooseLabDialog.value.initDialog(false) -} -// 实验室选择完毕 -const chooseOver = (lab: ILabList) => { - console.log(lab) - processNodeData.value.measureSegmentId = lab.deptId - processNodeData.value.measureSegment = lab.organizeName -} - // 选择人员 const choosePersonShow = ref(false) const choosePerson = () => { @@ -91,6 +80,24 @@ choosePersonShow.value = false } +// 选择实验室 +const chooseLabDialog = ref() +const clickChoose = () => { + chooseLabDialog.value.initDialog(false) +} +const _selectStaffDialog = ref() +// 实验室选择完毕 +const chooseOver = (lab: ILabList) => { + console.log(lab) + processNodeData.value.measureSegmentId = lab.deptId + processNodeData.value.measureSegment = lab.organizeName + // 定义一个对象关联上子组件的 ref 值(注意:这里的属性名必须跟子组件定义的 ref 值一模一样,否者会关联失效) + // 延迟使用,因为还没挂载 + nextTick(() => { + _selectStaffDialog.value.fetchData() + }) +} + // 移除该节点 const deleteNode = () => { emit('delete') @@ -125,7 +132,7 @@ 检定人员 @@ -142,7 +149,7 @@ - + diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index 92ad9b6..420e7b6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -122,6 +122,14 @@ data, }) } +// 我的检测-检测完成 +export function myExecutiveDone(data: object) { + return request({ + url: '/business/labExecutive/myExecutive/complete', + method: 'post', + data, + }) +} // 部门检测-列表 export function getDeptMeasureList(data: ILabQuery) { @@ -131,3 +139,4 @@ data, }) } + diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 127d571..72e3a88 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -19,6 +19,11 @@ type: String, default: '', }, + // 过滤组织 + deptName: { + type: String, + default: '', + }, // 是否显示部门选择下拉菜单 showDeptSelect: { type: Boolean, @@ -53,7 +58,7 @@ administrationJob: '', // 行政职务 major: '', // 专业 staffNo: '', // 人员编号 - limit: 10, + limit: 5, offset: 1, }) // 默认给deptId赋值 @@ -109,8 +114,15 @@ listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { - list.value = res.data.records - total.value = res.data.total + list.value = res.data.records.filter((item: any) => { + if (props.deptName) { + return item.deptId === props.deptName + } + else { + return item + } + }) + total.value = parseInt(res.data.total) loading.value = false }) } @@ -140,6 +152,8 @@ // 获取列表数据 fetchData(true) }) + +defineExpose({ fetchData }) - + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 4f361f3..a383ed9 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -91,6 +91,7 @@ listQuery.value.offset = 1 } getDeptMeasureList(listQuery.value).then((res) => { + // list.value = [{}] list.value = res.data.rows.map((item: ITaskList) => { item.isUrgentName = item.isUrgent == 1 ? '是' : '否' return item diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index d998c13..06550a8 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -10,7 +10,7 @@ import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' -import { getMyMeasureList, myExecutiveReceive } from '@/api/business/schedule/task' +import { getMyMeasureList, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task' import type { dictType } from '@/global' import type { IMenu } from '@/components/buttonBox/buttonBox' @@ -244,7 +244,11 @@ '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }, ).then(() => { - // TODO: 完成检测 + myExecutiveDone([{ orderId: row.orderId, sampleId: row.sampleId }]).then((res) => { + if (res.code == 200) { + ElMessage.success('检测成功') + } + }) }) } @@ -378,7 +382,7 @@ 退回 - + 检测完成 diff --git a/src/views/business/schedule/task/components/processNode.vue b/src/views/business/schedule/task/components/processNode.vue index 31dfae4..d76d41d 100644 --- a/src/views/business/schedule/task/components/processNode.vue +++ b/src/views/business/schedule/task/components/processNode.vue @@ -2,9 +2,9 @@ import { Aim, Rank, Remove, } from '@element-plus/icons-vue' +import { computed, onMounted, reactive, ref, watch } from 'vue' import chooseLab from './chooseLab.vue' import type { ILabList } from './lab-interface' - // 逻辑代码 const props = defineProps({ // 默认数据 @@ -37,6 +37,7 @@ }, }) const emit = defineEmits(['update:modelValue', 'delete']) + // ------------定义props参数---------- const processNodeData = computed({ get() { @@ -67,18 +68,6 @@ return editStates.includes(processNodeData.value.measureStatus) }) -// 选择实验室 -const chooseLabDialog = ref() -const clickChoose = () => { - chooseLabDialog.value.initDialog(false) -} -// 实验室选择完毕 -const chooseOver = (lab: ILabList) => { - console.log(lab) - processNodeData.value.measureSegmentId = lab.deptId - processNodeData.value.measureSegment = lab.organizeName -} - // 选择人员 const choosePersonShow = ref(false) const choosePerson = () => { @@ -91,6 +80,24 @@ choosePersonShow.value = false } +// 选择实验室 +const chooseLabDialog = ref() +const clickChoose = () => { + chooseLabDialog.value.initDialog(false) +} +const _selectStaffDialog = ref() +// 实验室选择完毕 +const chooseOver = (lab: ILabList) => { + console.log(lab) + processNodeData.value.measureSegmentId = lab.deptId + processNodeData.value.measureSegment = lab.organizeName + // 定义一个对象关联上子组件的 ref 值(注意:这里的属性名必须跟子组件定义的 ref 值一模一样,否者会关联失效) + // 延迟使用,因为还没挂载 + nextTick(() => { + _selectStaffDialog.value.fetchData() + }) +} + // 移除该节点 const deleteNode = () => { emit('delete') @@ -125,7 +132,7 @@ 检定人员 @@ -142,7 +149,7 @@ - + diff --git a/src/views/business/schedule/task/taskList.vue b/src/views/business/schedule/task/taskList.vue index 068de3a..513271e 100644 --- a/src/views/business/schedule/task/taskList.vue +++ b/src/views/business/schedule/task/taskList.vue @@ -63,7 +63,7 @@ active.value = window.sessionStorage.getItem('taskActive') as string } else { - active.value = menu.value.find(item => item.name === '待分发')!.id // 待分发 + active.value = menu.value.find(item => item.name === '待分发')!.id as string // 待分发 } }) }