diff --git a/client/src/api/qualificationInfo.js b/client/src/api/qualificationInfo.js index c9799b3..72506ec 100644 --- a/client/src/api/qualificationInfo.js +++ b/client/src/api/qualificationInfo.js @@ -11,7 +11,7 @@ export function getMyQi(query) { export function getQi(id) { return request({ - url: `/info/faq/${id}/`, + url: `/info/faqch/?instance_id=${id}`, method: 'get' }) } @@ -57,3 +57,12 @@ export function getChangeInfo(query) { params: query }) } + + +export function getMyOneQi(query) { + return request({ + url: `/info/faq/`, + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/client/src/router/index.js b/client/src/router/index.js index b724d6e..4a3a82d 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -407,64 +407,64 @@ export const asyncRoutes = [ ] }, //信息收集 - // { - // path: '/infoCollect', - // component: Layout, - // redirect: '/infoCollect/', - // name: 'informationCollect', - // meta: { title: '信息收集', icon: 'PT', perms: ['infoCollect'] }, - // alwaysShow: true, - // children: [ - // { - // path: 'qualificInfo', - // name: 'qualificInfo', - // component: () => import('@/views/informatiomCollect/qualificInfo.vue'), - // meta: { title: '资质情况', perms: ['infoCollect_QIN'] } - // }, - // { - // path: 'qualiChange', - // name: 'qualiChange', - // component: () => import('@/views/informatiomCollect/qualiChange.vue'), - // meta: { title: '资质变更情况', perms: ['infoCollect_QICH'] } - // }, - // { - // path: 'reviewStatus', - // name: 'reviewStatus', - // component: () => import('@/views/informatiomCollect/reviewStatus.vue'), - // meta: { title: '评审情况', perms: ['infoCollect_RS'] } - // }, - // { - // path: 'qualityCommend', - // name: 'qualityCommend', - // component: () => import('@/views/informatiomCollect/qualityCommend.vue'), - // meta: { title: '质量表彰', perms: ['infoCollect_QC'] } - // }, - // { - // path: 'qualityActive.', - // name: 'qualityActive.', - // component: () => import('@/views/informatiomCollect/qualityActive.vue'), - // meta: { title: '质量活动', perms: ['infoCollect_QA'] } - // }, - // { - // path: 'laboratoryContact', - // name: 'laboratoryContact', - // component: () => import('@/views/informatiomCollect/laboratoryContact.vue'), - // meta: { title: '实验室联系方式', perms: ['infoCollect_LC'] } - // }, - // { - // path: 'externalAuditor', - // name: 'externalAuditor', - // component: () => import('@/views/informatiomCollect/externalAuditor.vue'), - // meta: { title: '外审员情况', perms: ['infoCollect_EA'] } - // }, - // // { - // // path: 'inspectionStats', - // // name: 'inspectionStats', - // // component: () => import('@/views/informatiomCollect/inspectionStats.vue'), - // // meta: { title: '检验检测统计', perms: ['infoCollect_IS'] } - // // }, - // ] - // }, + { + path: '/infoCollect', + component: Layout, + redirect: '/infoCollect/', + name: 'informationCollect', + meta: { title: '信息收集', icon: 'PT', perms: ['infoCollect'] }, + alwaysShow: true, + children: [ + { + path: 'qualificInfo', + name: 'qualificInfo', + component: () => import('@/views/informatiomCollect/qualificInfo.vue'), + meta: { title: '资质情况', perms: ['infoCollect_QIN'] } + }, + { + path: 'qualiChange', + name: 'qualiChange', + component: () => import('@/views/informatiomCollect/qualiChange.vue'), + meta: { title: '资质变更情况', perms: ['infoCollect_QICH'] } + }, + { + path: 'reviewStatus', + name: 'reviewStatus', + component: () => import('@/views/informatiomCollect/reviewStatus.vue'), + meta: { title: '评审情况', perms: ['infoCollect_RS'] } + }, + { + path: 'qualityCommend', + name: 'qualityCommend', + component: () => import('@/views/informatiomCollect/qualityCommend.vue'), + meta: { title: '质量表彰', perms: ['infoCollect_QC'] } + }, + { + path: 'qualityActive.', + name: 'qualityActive.', + component: () => import('@/views/informatiomCollect/qualityActive.vue'), + meta: { title: '质量活动', perms: ['infoCollect_QA'] } + }, + { + path: 'laboratoryContact', + name: 'laboratoryContact', + component: () => import('@/views/informatiomCollect/laboratoryContact.vue'), + meta: { title: '实验室联系方式', perms: ['infoCollect_LC'] } + }, + { + path: 'externalAuditor', + name: 'externalAuditor', + component: () => import('@/views/informatiomCollect/externalAuditor.vue'), + meta: { title: '外审员情况', perms: ['infoCollect_EA'] } + }, + // { + // path: 'inspectionStats', + // name: 'inspectionStats', + // component: () => import('@/views/informatiomCollect/inspectionStats.vue'), + // meta: { title: '检验检测统计', perms: ['infoCollect_IS'] } + // }, + ] + }, { path: '/test', component: Layout, diff --git a/client/src/views/informatiomCollect/qualiChange.vue b/client/src/views/informatiomCollect/qualiChange.vue index bb8fcd9..fe89d46 100644 --- a/client/src/views/informatiomCollect/qualiChange.vue +++ b/client/src/views/informatiomCollect/qualiChange.vue @@ -4,15 +4,25 @@ - - - - + + + + + + + + + + + + + @@ -40,6 +50,18 @@ export default { tableData: { count: 0 }, + curdOp:{"update":"更新","create":"创建","delete":"删除"}, + resultsMap:{ + "company_name":"公司名称", + "name":"资质名称", + "quali_type":"资质类型", + "org":"发证单位", + "org_date":"发证日期", + "expiration_date":"截至日期", + "scope":"资质范围", + "number":"参数数量", + "cie_path":"证书路径", + } } }, mounted() { diff --git a/client/src/views/informatiomCollect/qualificInfo.vue b/client/src/views/informatiomCollect/qualificInfo.vue index fd68e03..0a5b50d 100644 --- a/client/src/views/informatiomCollect/qualificInfo.vue +++ b/client/src/views/informatiomCollect/qualificInfo.vue @@ -31,9 +31,29 @@ v-if="checkPermission(['infoCollect_QIN']) && checkPermission(['infoCollect_QIN'])"> 删除 + 变更记录 + + + + + + + + + + + + + @@ -189,6 +209,7 @@ export default { listLoading: false, dialogVisible: false, showExportDialog: false, + dialogTableVisible:false, exportForm: { startDate: '', // 开始日期 endDate: '', // 结束日期 @@ -200,6 +221,7 @@ export default { tableData: { count: 0 }, + changeTableData:[], dialogType: "new", rule: { name: [{ required: true, message: "请输入名称", trigger: "blur" }], @@ -210,7 +232,18 @@ export default { {key:'国家级',value:'国家级'}, {key:'省级',value:'省级'} ], - ac_options:{'国家级':'国家级', '省级':'省级'} + ac_options:{'国家级':'国家级', '省级':'省级'}, + resultsMap:{ + "company_name":"公司名称", + "name":"资质名称", + "quali_type":"资质类型", + "org":"发证单位", + "org_date":"发证日期", + "expiration_date":"截至日期", + "scope":"资质范围", + "number":"参数数量", + "cie_path":"证书路径", + } } }, mounted() { @@ -343,18 +376,33 @@ export default { type: "error", }) .then(async () => { - await delQi(scope.row.id).then(() => { + await delQi(scope.row.id); this.getList(); this.$message.success("成功"); - this.getTableList(); - }) - }) .catch((err) => { console.error(err); }); - }, + handleChange(scope) { + this.listLoading = true; + this.Content = Object.assign({}, scope.row); // copy obj + this.changeTableData =[]; + this.dialogTableVisible=true; + getQi(scope.row.id).then((response) => { + if (response.data.count>0) { + this.changeTableData = response.data.results; + console.log(this.changeTableData); + this.listLoading = false; + }else{ + alert('无变更记录') + this.dialogTableVisible=false; + this.listLoading = false; + return + } + }); + }, + async confirm(form) { this.$refs[form].validate((valid) => { if (valid) { diff --git a/server/apps/information/views.py b/server/apps/information/views.py index 3907c01..ac4097b 100644 --- a/server/apps/information/views.py +++ b/server/apps/information/views.py @@ -321,4 +321,5 @@ class QualificationViewSet(RbacFilterSet, CreateUpdateCustomMixin, ModelViewSet) class QualiChangeViewSet(RbacFilterSet, ModelViewSet): queryset = AuditLog.objects.select_related('instance').all() serializer_class = AuditLogSerializer + filterset_fields = ['instance_id']