feat:样品分析
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,43 @@
|
|||||||
import request from '@/nx/request'
|
import request from '@/nx/request'
|
||||||
const taskDetailPrefix = '/qms/bus/qmsBusAssayTaskDetail'
|
const taskDetailPrefix = '/qms/bus/qmsBusAssayTaskDetail'
|
||||||
const taskPrefix = '/qms/bus/qmsBusAssayTask'
|
const taskPrefix = '/qms/bus/qmsBusAssayTask'
|
||||||
|
|
||||||
|
// 获取任务
|
||||||
|
const getAssayTaskList = params => {
|
||||||
|
return request({
|
||||||
|
url: '/qms/business-assay-task/page',
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
pageSize: 999,
|
||||||
|
pageNo: 1,
|
||||||
|
...params
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取样品列表
|
||||||
|
const getAssayTaskDataList = params => {
|
||||||
|
return request({
|
||||||
|
url: `/qms/business-assay-task-data/list`,
|
||||||
|
params,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取样品分析配置数据
|
||||||
|
const getSampleAnalysisByTaskId = businessAssayTaskId => {
|
||||||
|
return request({
|
||||||
|
url: '/qms/bus/sample/analysis/batchSampleAnalysisByTaskId',
|
||||||
|
method: 'GET',
|
||||||
|
params: { businessAssayTaskId }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取指派单动态配置项
|
||||||
|
const getDynamicBaseFormSchema = params => {
|
||||||
|
return request({
|
||||||
|
url: '/qms/common/data/data-collection-field/queryEffectiveFields',
|
||||||
|
method: 'GET',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
// 获取任务明细
|
// 获取任务明细
|
||||||
const getAssayTaskDetailListByTaskNo = params => {
|
const getAssayTaskDetailListByTaskNo = params => {
|
||||||
return request({
|
return request({
|
||||||
@@ -114,11 +151,11 @@ const saveHeadValue = params => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 保存任务明细
|
// 保存任务明细
|
||||||
const saveDetailValue = params => {
|
const saveDetailValue = data => {
|
||||||
return request({
|
return request({
|
||||||
url: '/qms/bus/qmsBusAssayTask/saveTaskDetail',
|
url: '/qms/bus/sample/analysis/saveBatchSampleAnalysis',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: params,
|
data,
|
||||||
custom: {
|
custom: {
|
||||||
showSuccess: true
|
showSuccess: true
|
||||||
}
|
}
|
||||||
@@ -138,11 +175,9 @@ const submitTaskDetail = params => {
|
|||||||
|
|
||||||
const submitTask = params => {
|
const submitTask = params => {
|
||||||
return request({
|
return request({
|
||||||
url: '/qms/bus/qmsBusAssayTask/submitTaskByTaskNo',
|
url: '/qms/bus/sample/analysis/submitSampleAnalysisByTaskId',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params: {
|
params,
|
||||||
...params
|
|
||||||
},
|
|
||||||
custom: {
|
custom: {
|
||||||
showSuccess: true
|
showSuccess: true
|
||||||
}
|
}
|
||||||
@@ -218,6 +253,10 @@ const queryQmsDicSampleProcessCodeList = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
getAssayTaskList,
|
||||||
|
getAssayTaskDataList,
|
||||||
|
getSampleAnalysisByTaskId,
|
||||||
|
getDynamicBaseFormSchema,
|
||||||
getAssayTaskDetailListByTaskNo,
|
getAssayTaskDetailListByTaskNo,
|
||||||
getAssayTaskDetailById,
|
getAssayTaskDetailById,
|
||||||
queryFieldsByTaskDetail,
|
queryFieldsByTaskDetail,
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
import request from '@/nx/request'
|
import request from '@/nx/request'
|
||||||
const taskPrefix = '/qms/bus/qmsBusAssayTask'
|
const taskPrefix = '/qms/bus/qmsBusAssayTask'
|
||||||
// 获取任务
|
|
||||||
const getAssayTaskList = params => {
|
|
||||||
return request({
|
|
||||||
url: taskPrefix + '/listTaskForPAD',
|
|
||||||
method: 'GET',
|
|
||||||
params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getConAssayTaskWithReportTemplateContent = id => {
|
export const getConAssayTaskWithReportTemplateContent = id => {
|
||||||
return request({
|
return request({
|
||||||
@@ -27,7 +19,6 @@ export const queryTaskDetailListByAssayTaskId = params => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getAssayTaskList,
|
|
||||||
getConAssayTaskWithReportTemplateContent,
|
getConAssayTaskWithReportTemplateContent,
|
||||||
queryTaskDetailListByAssayTaskId
|
queryTaskDetailListByAssayTaskId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -713,6 +713,24 @@ const uuid = () => {
|
|||||||
return uuid
|
return uuid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 自定义 replacer,将函数转换为字符串。json序列化和反序列化时避免函数丢失
|
||||||
|
function replacer(key, value) {
|
||||||
|
if (typeof value === 'function') {
|
||||||
|
return value.toString()
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自定义 reviver,将字符串转换回函数.json序列化和反序列化时避免函数丢失
|
||||||
|
const functionKeys = ['change', 'dicFormatter']
|
||||||
|
function reviver(key, value) {
|
||||||
|
if (functionKeys.includes(key)) {
|
||||||
|
// 将字符串转换为函数
|
||||||
|
return new Function('return ' + value)()
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
range,
|
range,
|
||||||
getPx,
|
getPx,
|
||||||
@@ -745,5 +763,7 @@ export default {
|
|||||||
getRootUrl,
|
getRootUrl,
|
||||||
copyText,
|
copyText,
|
||||||
showToast,
|
showToast,
|
||||||
uuid
|
uuid,
|
||||||
|
replacer,
|
||||||
|
reviver
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,32 +87,43 @@ http.interceptors.request.use(
|
|||||||
|
|
||||||
const token = getAccessToken()
|
const token = getAccessToken()
|
||||||
|
|
||||||
if (token) config.header['Authorization'] = token
|
if (token) config.header['Authorization'] = 'Bearer ' + token
|
||||||
|
|
||||||
config.header['Accept'] = '*/*'
|
config.header['Accept'] = '*/*'
|
||||||
config.header['tenant-id'] = getTenantId()
|
config.header['tenant-id'] = getTenantId()
|
||||||
|
const method = config.method?.toUpperCase()
|
||||||
|
// 防止 GET 请求缓存
|
||||||
|
if (method === 'GET') {
|
||||||
|
config.header['Cache-Control'] = 'no-cache'
|
||||||
|
config.header['Pragma'] = 'no-cache'
|
||||||
|
}
|
||||||
|
|
||||||
let params = config.params || {}
|
let params = config.params || {}
|
||||||
let data = config.data || false
|
let data = config.data || false
|
||||||
if (process.env.NODE_ENV == 'development') console.log('development--params', params)
|
// if (process.env.NODE_ENV == 'development') console.log('development--params', params)
|
||||||
if (process.env.NODE_ENV == 'development') console.log('development--data', data)
|
// if (process.env.NODE_ENV == 'development') console.log('development--data', data)
|
||||||
|
|
||||||
const visitCompanyId = getVisitCompanyId()
|
// const visitCompanyId = getVisitCompanyId()
|
||||||
|
const visitCompanyId = '101'
|
||||||
if (visitCompanyId !== undefined && visitCompanyId !== null && visitCompanyId !== '') {
|
if (visitCompanyId !== undefined && visitCompanyId !== null && visitCompanyId !== '') {
|
||||||
config.header['visit-company-id'] = visitCompanyId
|
config.header['visit-company-id'] = visitCompanyId
|
||||||
const visitCompanyName = getVisitCompanyName()
|
// const visitCompanyName = getVisitCompanyName()
|
||||||
|
const visitCompanyName = '"深圳总公司'
|
||||||
if (visitCompanyName !== undefined && visitCompanyName !== null) {
|
if (visitCompanyName !== undefined && visitCompanyName !== null) {
|
||||||
config.header['visit-company-name'] = encodeURIComponent(visitCompanyName || '')
|
config.header['visit-company-name'] = encodeURIComponent(visitCompanyName || '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const visitDeptId = getVisitDeptId()
|
// const visitDeptId = getVisitDeptId()
|
||||||
|
const visitDeptId = '103'
|
||||||
if (visitDeptId !== undefined && visitDeptId !== null && visitDeptId !== '') {
|
if (visitDeptId !== undefined && visitDeptId !== null && visitDeptId !== '') {
|
||||||
config.header['visit-dept-id'] = visitDeptId
|
config.header['visit-dept-id'] = visitDeptId
|
||||||
const visitDeptName = getVisitDeptName()
|
// const visitDeptName = getVisitDeptName()
|
||||||
|
const visitDeptName = '研发部门'
|
||||||
if (visitDeptName !== undefined && visitDeptName !== null) {
|
if (visitDeptName !== undefined && visitDeptName !== null) {
|
||||||
config.header['visit-dept-name'] = encodeURIComponent(visitDeptName || '')
|
config.header['visit-dept-name'] = encodeURIComponent(visitDeptName || '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
config.header['__companyDeptRetried'] = '1'
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
@@ -133,7 +144,6 @@ http.interceptors.response.use(
|
|||||||
const userStore = $store('user')
|
const userStore = $store('user')
|
||||||
response.config.custom.showLoading && closeLoading()
|
response.config.custom.showLoading && closeLoading()
|
||||||
|
|
||||||
console.log('response', JSON.parse(JSON.stringify(response.data)))
|
|
||||||
if (!response.config.custom.isTransformResponse) {
|
if (!response.config.custom.isTransformResponse) {
|
||||||
return Promise.resolve(response.data)
|
return Promise.resolve(response.data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const popupShow = ref(false)
|
|||||||
const isAllowAgainPrint = ref(false)
|
const isAllowAgainPrint = ref(false)
|
||||||
|
|
||||||
const menuItemList = ref([
|
const menuItemList = ref([
|
||||||
{ url: '/pages/analysis/sample/sample-receive', otherConf: { icon: 'arrow-downward' }, name: '收样' },
|
// { url: '/pages/analysis/sample/sample-receive', otherConf: { icon: 'arrow-downward' }, name: '收样' },
|
||||||
{ url: '/pages/analysis/sample/sample-work-list', otherConf: { icon: 'edit-pen-fill' }, name: '样品分析' },
|
{ url: '/pages/analysis/sample/sample-work-list', otherConf: { icon: 'edit-pen-fill' }, name: '样品分析' },
|
||||||
{ url: '/pages/analysis/sample/sample-report', otherConf: { icon: 'arrow-upward' }, name: '数据上报' },
|
{ url: '/pages/analysis/sample/sample-report', otherConf: { icon: 'arrow-upward' }, name: '数据上报' },
|
||||||
{ url: '/pages/analysis/sample/sample-report-search', otherConf: { icon: 'search' }, name: '待审数据' },
|
{ url: '/pages/analysis/sample/sample-report-search', otherConf: { icon: 'search' }, name: '待审数据' },
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<view class="mt3 mb3">{{ task.taskName }}{{ task.assayOper }}</view>
|
<view class="mt3 mb3">{{ task.taskName }}{{ task.assayOper }}</view>
|
||||||
<view class="x-f">
|
<view class="x-f">
|
||||||
<u-icon name="clock"></u-icon>
|
<u-icon name="clock"></u-icon>
|
||||||
<text class="ml5">{{ task.taskOperTime }}</text>
|
<text class="ml5">{{ taskOperatorTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</u-col>
|
</u-col>
|
||||||
</u-row>
|
</u-row>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import nx from '@/nx'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
task: {
|
task: {
|
||||||
@@ -36,6 +36,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const taskOperatorTime = nx.$dayjs(props.task.taskOperatorTime).format('YYYY-MM-DD HH:mm:ss')
|
||||||
const emit = defineEmits(['click'])
|
const emit = defineEmits(['click'])
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ function getAssayTask() {
|
|||||||
finishStatus: 'submited,finished'
|
finishStatus: 'submited,finished'
|
||||||
}
|
}
|
||||||
|
|
||||||
nx.$api.auncel.getAssayTaskList(param).then(res => {
|
nx.$api.assayTask.getAssayTaskList(param).then(res => {
|
||||||
taskList.value = res || []
|
taskList.value = res || []
|
||||||
if (taskList.value.length > 0) {
|
if (taskList.value.length > 0) {
|
||||||
const first = taskList.value[0]
|
const first = taskList.value[0]
|
||||||
|
|||||||
@@ -98,20 +98,8 @@ import { getDataSourceTypeShow } from '../common'
|
|||||||
const currentNode = ref('F30')
|
const currentNode = ref('F30')
|
||||||
const scrollTop = ref(0)
|
const scrollTop = ref(0)
|
||||||
const current = ref(0)
|
const current = ref(0)
|
||||||
const taskList = ref([
|
const taskList = ref([])
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
const sampleList = ref([])
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
|
||||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' }
|
|
||||||
])
|
|
||||||
const sampleList = ref([
|
|
||||||
{ id: 1, sampleCode: 'SAMPLE-1', sampleName: '样品1', sort: 1, checked: false, sampleProcessNo: 'F30' }
|
|
||||||
])
|
|
||||||
const dicSampleProcessCodeList = ref([])
|
const dicSampleProcessCodeList = ref([])
|
||||||
|
|
||||||
// 计算属性
|
// 计算属性
|
||||||
@@ -188,7 +176,7 @@ const getAssayTask = () => {
|
|||||||
assayOper: userInfo.value.nickname
|
assayOper: userInfo.value.nickname
|
||||||
}
|
}
|
||||||
|
|
||||||
nx.$api.auncel
|
nx.$api.assayTask
|
||||||
.getAssayTaskList(param)
|
.getAssayTaskList(param)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
taskList.value = res || []
|
taskList.value = res || []
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ const getAssayTask = () => {
|
|||||||
wfStatus: 'running',
|
wfStatus: 'running',
|
||||||
assayOper: userInfo.value.realname
|
assayOper: userInfo.value.realname
|
||||||
}
|
}
|
||||||
nx.$api.auncel.getAssayTaskList(param).then(res => {
|
nx.$api.assayTask.getAssayTaskList(param).then(res => {
|
||||||
taskList.value = res
|
taskList.value = res
|
||||||
if (taskList.value.length > 0) {
|
if (taskList.value.length > 0) {
|
||||||
current.value = 0
|
current.value = 0
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user