feat:新增资质变更功能
This commit is contained in:
parent
47662d9f2f
commit
e3f6d57875
|
@ -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
|
||||
})
|
||||
}
|
|
@ -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,
|
||||
|
|
|
@ -4,15 +4,25 @@
|
|||
<el-table :data="tableData.results" style="width: 100%" v-loading="listLoading"
|
||||
border fit stripe
|
||||
highlight-current-row>
|
||||
<el-table-column label="公司名称" prop="company_name"></el-table-column>
|
||||
<el-table-column label="修改时间" prop="change_time"></el-table-column>
|
||||
<el-table-column label="修改原因" prop="change_reason"></el-table-column>
|
||||
<el-table-column
|
||||
v-for="(column, index) in tableColumns.difference" :key="index"
|
||||
:label="column.name"
|
||||
:new="column.new"
|
||||
:old="column.old"
|
||||
></el-table-column>
|
||||
<el-table-column prop="company_name" label="公司名称" width="180"></el-table-column>
|
||||
<el-table-column label="操作" width="120" >
|
||||
<template slot-scope="scope">{{ curdOp[scope.row.action] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="change_time" label="修改时间" width="180"></el-table-column>
|
||||
<el-table-column prop="change_reason" label="变更原因" width="180"></el-table-column>
|
||||
<el-table-column label="资质名称" width="180">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.val_new.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更详情">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-for="(diff, index) in scope.row.difference" :key="index">
|
||||
{{ resultsMap[diff.name] }}: {{ diff.old }} -> {{ diff.new }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<pagination v-show="tableData.count > 0" :total="tableData.count" :page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size" @pagination="getTableList" />
|
||||
|
@ -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() {
|
||||
|
|
|
@ -31,9 +31,29 @@
|
|||
v-if="checkPermission(['infoCollect_QIN']) && checkPermission(['infoCollect_QIN'])"></el-divider>
|
||||
<el-link :disabled="!checkPermission(['infoCollect_QIN'])" type="danger" size="small"
|
||||
@click="handleDelete(scope)">删除</el-link>
|
||||
<el-link type="primary" @click="handleChange(scope)">变更记录</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog title="变更记录" :visible.sync="dialogTableVisible">
|
||||
<el-table :data="changeTableData" style="width: 100%">
|
||||
<el-table-column label="公司名称" prop="company_name"></el-table-column>
|
||||
<el-table-column label="变更时间" prop="change_time" ></el-table-column>
|
||||
<el-table-column prop="change_reason" label="变更原因"></el-table-column>
|
||||
<el-table-column label="资质名称" >
|
||||
<template v-slot="scope">
|
||||
<span>{{scope.row.val_new.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更详情" width="500">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-for="(diff, index) in scope.row.difference" :key="index">
|
||||
{{ resultsMap[diff.name] }}: {{ diff.old }} -> {{ diff.new }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<pagination v-show="tableData.count > 0" :total="tableData.count" :page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size" @pagination="getTableList" />
|
||||
</el-card>
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
Loading…
Reference in New Issue