微调
This commit is contained in:
@@ -63,17 +63,17 @@ export const getPlanListByPattern = (params: Plan.ReqPlan) => {
|
||||
}
|
||||
|
||||
// 导出检测计划
|
||||
export const exportCNPlan = (params: Device.ReqPqDevParams) => {
|
||||
return http.download(`/adPlan/exportCNPlan`, params)
|
||||
export const exportPlan = (params: Device.ReqPqDevParams) => {
|
||||
return http.download(`/adPlan/export`, params)
|
||||
}
|
||||
|
||||
// 下载模板
|
||||
export const downloadCNPlanTemplate = () => {
|
||||
return http.download(`/adPlan/downloadCNPlanTemplate`)
|
||||
export const downloadTemplate = () => {
|
||||
return http.download(`/adPlan/downloadTemplate`)
|
||||
}
|
||||
// 导入检测计划
|
||||
export const importCNPlan = (params: Device.ReqPqDevParams) => {
|
||||
return http.uploadExcel(`/adPlan/importCNPlan`, params)
|
||||
export const importPlan = (params: Device.ReqPqDevParams) => {
|
||||
return http.uploadExcel(`/adPlan/import`, params)
|
||||
}
|
||||
|
||||
// 装置检测报告生成
|
||||
|
||||
@@ -85,7 +85,7 @@ const handelOpen = async (item: any) => {
|
||||
modeStore.setCurrentMode(item.code); // 将模式code存入 store
|
||||
const {data:scene} = await getCurrentScene(); // 获取当前场景
|
||||
// AppSceneStore.setCurrentMode(scene+'');//0:省级平台,1:设备出厂,2:研发自测
|
||||
AppSceneStore.setCurrentMode('0');//0:省级平台,1:设备出厂,2:研发自测
|
||||
AppSceneStore.setCurrentMode(scene+'');//0:省级平台,1:设备出厂,2:研发自测
|
||||
await authStore.setShowMenu();
|
||||
return;
|
||||
// if (isActive) {
|
||||
|
||||
@@ -446,14 +446,15 @@ function pqToArray() {
|
||||
}
|
||||
|
||||
const dataSourceType = computed(() => {
|
||||
switch (mode.value) {
|
||||
case '模拟式':
|
||||
return 'Datasource_Simulate'
|
||||
case '数字式':
|
||||
return 'Datasource_Digital'
|
||||
default:
|
||||
return 'Datasource_Contrast'
|
||||
}
|
||||
// switch (mode.value) {
|
||||
// case '模拟式':
|
||||
// return 'Datasource_Simulate'
|
||||
// case '数字式':
|
||||
// return 'Datasource_Digital'
|
||||
// default:
|
||||
// return 'Datasource_Contrast'
|
||||
// }
|
||||
return 'Datasource'
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
import ProTable from '@/components/ProTable/index.vue'
|
||||
import type { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
||||
import { ScaleToOriginal, CirclePlus, Delete, EditPen, View, Upload, Download, List, Tools } from '@element-plus/icons-vue'
|
||||
import {getPlanList,deletePlan,exportCNPlan,downloadCNPlanTemplate,importCNPlan } from '@/api/plan/plan.ts'
|
||||
import {getPlanList,deletePlan,exportPlan,downloadTemplate,importPlan } from '@/api/plan/plan.ts'
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import type { Plan } from '@/api/plan/interface'
|
||||
import PlanPopup from '@/views/plan/planList/components/planPopup.vue' // 导入子组件
|
||||
@@ -106,14 +106,15 @@ const getTableList = async(params: any) => {
|
||||
|
||||
|
||||
const dataSourceType = computed(() => {
|
||||
switch (modeStore.currentMode) {
|
||||
case '模拟式':
|
||||
return 'Datasource_Simulate'
|
||||
case '数字式':
|
||||
return 'Datasource_Digital'
|
||||
default:
|
||||
return 'Datasource_Contrast'
|
||||
}
|
||||
// switch (modeStore.currentMode) {
|
||||
// case '模拟式':
|
||||
// return 'Datasource_Simulate'
|
||||
// case '数字式':
|
||||
// return 'Datasource_Digital'
|
||||
// default:
|
||||
// return 'Datasource_Contrast'
|
||||
// }
|
||||
return 'Datasource'
|
||||
})
|
||||
|
||||
|
||||
@@ -344,8 +345,8 @@ const importClick = () => {
|
||||
title: '检测计划',
|
||||
showCover: false,
|
||||
patternId: dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id ?? '',
|
||||
tempApi: downloadCNPlanTemplate,
|
||||
importApi: importCNPlan,
|
||||
tempApi: downloadTemplate,
|
||||
importApi: importPlan,
|
||||
getTableList: proTable.value?.getTableList,
|
||||
}
|
||||
planImportExcel.value?.acceptParams(params)
|
||||
@@ -355,7 +356,7 @@ const exportClick = () => {
|
||||
|
||||
ElMessageBox.confirm('确认导出检测计划?', '温馨提示', { type: 'warning' }).then(() =>{
|
||||
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
|
||||
useDownload(exportCNPlan,'检测计划导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
|
||||
useDownload(exportPlan,'检测计划导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user