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