diff --git a/package.json b/package.json index 62dc388..2d240fe 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "vue-i18n": "^9.4.1", "vue-router": "^4.2.5", "vue-types": "^5.1.1", + "vue-video-player": "^5.0.1", "vuedraggable": "^4.1.0", "web-storage-cache": "^1.1.1", "xml-js": "^1.6.11" diff --git a/src/api/detection/records/index.ts b/src/api/detection/records/index.ts index 1d73937..fa0de3a 100644 --- a/src/api/detection/records/index.ts +++ b/src/api/detection/records/index.ts @@ -7,6 +7,11 @@ export interface RecordsVO { remark: string version: string saveStatus: string + projectName?:string + itemName?:string + itemType?:string + itemCode?:string + projectCode?:string } // 查询检测记录数据主列表 @@ -40,6 +45,11 @@ export const deleteRecords = async (id: number) => { return await request.delete({ url: `/detection/records/delete?id=` + id }) } +// 批量删除检测记录数据主 +export const batchDeleteRecords = async (ids: Array) => { + return await request.delete({ url: `/detection/records/batchDelete?ids=` + ids }) +} + // 导出检测记录数据主 Excel export const exportRecords = async (params) => { return await request.download({ url: `/detection/records/export-excel`, params }) diff --git a/src/api/detection/recordsDetails/index.ts b/src/api/detection/recordsDetails/index.ts new file mode 100644 index 0000000..68577c4 --- /dev/null +++ b/src/api/detection/recordsDetails/index.ts @@ -0,0 +1,63 @@ +import request from '@/config/axios' + +export interface RecordsDetailsVO { + id: number + templateItemId: number + templateId: number + detectValue: number + result: string + saveStatus: string + remark: string + version: string + contents?:string + methods?:string + upLimit?:string + downLimit?:string + +} + +// 查询检测记录详细列表 +export const getRecordsDetailsPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/detection/recordsdetails/senior', data }) + } else { + return await request.get({ url: `/detection/recordsdetails/page`, params }) + } +} + +// 查询检测记录详细详情 +export const getRecordsDetails = async (id: number) => { + return await request.get({ url: `/detection/recordsdetails/get?id=` + id }) +} + +// 新增检测记录详细 +export const createRecordsDetails = async (data: RecordsDetailsVO) => { + return await request.post({ url: `/detection/recordsdetails/create`, data }) +} + +// 修改检测记录详细 +export const updateRecordsDetails = async (data: RecordsDetailsVO) => { + return await request.put({ url: `/detection/recordsdetails/update`, data }) +} + +// 删除检测记录详细 +export const deleteRecordsDetails = async (id: number) => { + return await request.delete({ url: `/detection/recordsdetails/delete?id=` + id }) +} + +// 删除检测记录详细 +export const batchDeleteRecordDetails = async (ids: Array) => { + return await request.delete({ url: `/detection/recordsdetails/batchDelete?ids=` + ids}) +} + +// 导出检测记录详细 Excel +export const exportRecordsDetails = async (params) => { + return await request.download({ url: `/detection/recordsdetails/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/detection/recordsdetails/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/spc/itembasic/index.ts b/src/api/spc/itembasic/index.ts index b000c8c..eccdbb7 100644 --- a/src/api/spc/itembasic/index.ts +++ b/src/api/spc/itembasic/index.ts @@ -89,3 +89,8 @@ export const selectItems = async () => { export const selectItemsByProjectCode = async (code:String) => { return await request.get({ url: `/spc/itembasic/selectItemsByProjectCode?code=` + code}) } + +// 查询物品基本信息列表不分页用于下拉数据 +export const getList = async (params) => { + return await request.get({ url: `/spc/itembasic/getList`, params }) +} diff --git a/src/api/spc/project/index.ts b/src/api/spc/project/index.ts index 288afb6..6f64d9d 100644 --- a/src/api/spc/project/index.ts +++ b/src/api/spc/project/index.ts @@ -57,4 +57,9 @@ export const importTemplate = () => { export const selectAllPros = async () => {//查询所有的项目 return await request.get({ url: `/spc/project/selectAllPros`}) +} + +// 查询项目基本信息列表不分页用于下拉数据 +export const getList = async (params) => { + return await request.get({ url: `/spc/project/getList`, params }) } \ No newline at end of file diff --git a/src/api/spc/templateItemDetails/index.ts b/src/api/spc/templateItemDetails/index.ts index 7893036..ff1d75c 100644 --- a/src/api/spc/templateItemDetails/index.ts +++ b/src/api/spc/templateItemDetails/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { pa } from 'element-plus/es/locale' export interface TemplateItemDetailsVO { templateId: number @@ -20,7 +21,6 @@ export interface TemplateItemDetailsVO { concurrencyStamp: string siteId: string } - // 查询检测记录明细列表 export const getTemplateItemDetailsPage = async (params) => { if (params.isSearch) { @@ -64,4 +64,18 @@ export const importTemplate = () => { export const selectDetectionItems = async (itemCode: String , detectionType: String) => { return await request.get({ url: `/spc/template-item-details/selectDetectionItems?itemCode=` + itemCode + `&detectionType=` + detectionType }) +} +let templateId=0 + +// 查询检测项列表用于下拉选择 +export const getTemplateItemDetailsList = async (params) => { + params = {templateId:templateId}; + return await request.get({ url: `/spc/template-item-details/getList`,params}) +} + +export const acceptParam = async (params) => { + templateId =params.templateId + console.info("templateId",templateId) + return + //return await request.get({ url: `/spc/template-item-details/getList`,params}) } \ No newline at end of file diff --git a/src/components/Detail/src/RecordDetails.vue b/src/components/Detail/src/RecordDetails.vue new file mode 100644 index 0000000..17a798b --- /dev/null +++ b/src/components/Detail/src/RecordDetails.vue @@ -0,0 +1,305 @@ + + + + diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index ee76609..6034d1b 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -4,6 +4,18 @@ * @param {*} option * @returns */ +//批量删除 +export function defaultBatchDeletionBtn(option:any) { + return __defaultBtnOption(option,{ + label: '批量删除', + name: 'batch', + hide: false, + type: 'warning', + icon: 'ep:upload', + color: '', + hasPermi: '' + }) +} // 新增按钮 export function defaultAddBtn(option:any) { diff --git a/src/views/detection/records/index.vue b/src/views/detection/records/index.vue index 2736e51..c721d5b 100644 --- a/src/views/detection/records/index.vue +++ b/src/views/detection/records/index.vue @@ -1,8 +1,8 @@