细节调整
This commit is contained in:
parent
6bd5cf1365
commit
cc340095db
|
@ -19,11 +19,11 @@
|
|||
首页
|
||||
</el-dropdown-item>
|
||||
</router-link>
|
||||
<!-- <router-link to="/myinfo">
|
||||
<router-link to="/myinfo">
|
||||
<el-dropdown-item divided>
|
||||
个人中心
|
||||
</el-dropdown-item>
|
||||
</router-link> -->
|
||||
</router-link>
|
||||
<!-- <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/">
|
||||
<el-dropdown-item>Github</el-dropdown-item>
|
||||
</a>
|
||||
|
|
|
@ -48,9 +48,18 @@ export const constantRoutes = [
|
|||
}]
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/404'),
|
||||
hidden: true
|
||||
path: '/myinfo',
|
||||
component: Layout,
|
||||
redirect: '/myinfo',
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'ChangePassword',
|
||||
component: () => import('@/views/system/changepassword'),
|
||||
meta: { title: '修改密码', noCache: true, icon: '', perms: [] },
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
|
@ -81,7 +90,7 @@ export const asyncRoutes = [
|
|||
meta: { title: '检测能力(总部CMA+CNAS)', icon: 'table', perms: ['cma_view'] }
|
||||
}]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
path: '/cma2',
|
||||
component: Layout,
|
||||
|
@ -92,64 +101,64 @@ export const asyncRoutes = [
|
|||
component: () => import('@/views/ability/cma2'),
|
||||
meta: { title: '检测能力(分子公司CMA)', icon: 'table', perms: ['cma2_view'] }
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
,
|
||||
{
|
||||
path: '/inspection',
|
||||
component: Layout,
|
||||
redirect: '/inspection',
|
||||
children: [{
|
||||
path: '',
|
||||
name: 'inspection',
|
||||
component: () => import('@/views/ability/inspection'),
|
||||
meta: { title: '检验能力', icon: 'table', perms: ['inspection_view'] }
|
||||
}]
|
||||
},
|
||||
,
|
||||
{
|
||||
path: '/inspection',
|
||||
component: Layout,
|
||||
redirect: '/inspection',
|
||||
children: [{
|
||||
path: '',
|
||||
name: 'inspection',
|
||||
component: () => import('@/views/ability/inspection'),
|
||||
meta: { title: '检验能力', icon: 'table', perms: ['inspection_view'] }
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/supervision',
|
||||
component: Layout,
|
||||
redirect: '/supervision/task',
|
||||
name:'Supervision',
|
||||
meta: { title: '日常监督', icon: 'table', perms: ['supervision'] },
|
||||
children: [
|
||||
{
|
||||
path: 'content',
|
||||
name: 'Content',
|
||||
component: () => import('@/views/supervision/content.vue'),
|
||||
meta: { title: '材料清单', icon: 'documentation', perms: ['content'] }
|
||||
},
|
||||
{
|
||||
path: 'task',
|
||||
name: 'Task',
|
||||
component: () => import('@/views/supervision/task.vue'),
|
||||
meta: { title: '报送任务', icon: 'guide', perms: ['task_view'] }
|
||||
},
|
||||
{
|
||||
path: 'record',
|
||||
name: 'Record',
|
||||
component: () => import('@/views/supervision/record.vue'),
|
||||
meta: { title: '材料列表', icon: 'guide', perms: ['record_all'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'report',
|
||||
name: 'Report',
|
||||
component: () => import('@/views/supervision/report.vue'),
|
||||
meta: { title: '材料报送', icon: 'guide', perms: ['record_view'] }
|
||||
}
|
||||
{
|
||||
path: '/supervision',
|
||||
component: Layout,
|
||||
redirect: '/supervision/task',
|
||||
name: 'Supervision',
|
||||
meta: { title: '日常监督', icon: 'table', perms: ['supervision'] },
|
||||
children: [
|
||||
{
|
||||
path: 'content',
|
||||
name: 'Content',
|
||||
component: () => import('@/views/supervision/content.vue'),
|
||||
meta: { title: '材料清单', icon: 'documentation', perms: ['content'] }
|
||||
},
|
||||
{
|
||||
path: 'task',
|
||||
name: 'Task',
|
||||
component: () => import('@/views/supervision/task.vue'),
|
||||
meta: { title: '报送任务', icon: 'guide', perms: ['task_view'] }
|
||||
},
|
||||
{
|
||||
path: 'record',
|
||||
name: 'Record',
|
||||
component: () => import('@/views/supervision/record.vue'),
|
||||
meta: { title: '材料列表', icon: 'guide', perms: ['record_all'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'taskdo/:id',
|
||||
name: 'Taskdo',
|
||||
component: () => import('@/views/supervision/taskdo.vue'),
|
||||
meta: { title: '报送任务执行', perms: ['task_view'] },
|
||||
hidden: true
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: 'report',
|
||||
name: 'Report',
|
||||
component: () => import('@/views/supervision/report.vue'),
|
||||
meta: { title: '材料报送', icon: 'guide', perms: ['record_view'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'taskdo/:id',
|
||||
name: 'Taskdo',
|
||||
component: () => import('@/views/supervision/taskdo.vue'),
|
||||
meta: { title: '报送任务执行', perms: ['task_view'] },
|
||||
hidden: true
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
|
@ -246,24 +255,6 @@ export const asyncRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/myinfo',
|
||||
component: Layout,
|
||||
redirect: '/myinfo',
|
||||
name: 'myinfo',
|
||||
meta: { title: '个人中心', icon: 'tree' },
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'ChangePassword',
|
||||
component: () => import('@/views/system/changepassword'),
|
||||
meta: { title: '修改密码', noCache: true, icon: '', perms:[]},
|
||||
hidden: true
|
||||
},
|
||||
]
|
||||
},
|
||||
// 404 page must be placed at the end !!!
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
]
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
</el-row>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="recordList"
|
||||
:data="recordList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
|
@ -136,6 +136,13 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="recordList.count > 0"
|
||||
:total="recordList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getRecordList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<el-drawer title="记录" :visible.sync="drawer" :with-header="false">
|
||||
|
@ -170,7 +177,13 @@ export default {
|
|||
contents: [],
|
||||
depts: [],
|
||||
listLoading: false,
|
||||
recordList: [],
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
recordList: {
|
||||
count:0
|
||||
},
|
||||
now: {},
|
||||
drawer: false,
|
||||
};
|
||||
|
@ -185,12 +198,13 @@ export default {
|
|||
getTab() {
|
||||
if (this.$route.params.tab) {
|
||||
this.activeName = this.$route.params.tab;
|
||||
this.handleClick({name:this.activeName})
|
||||
}
|
||||
},
|
||||
getRecordList() {
|
||||
getRecordList({ state: this.state }).then((res) => {
|
||||
this.listLoading = false;
|
||||
this.recordList = res.data.results;
|
||||
this.recordList = res.data;
|
||||
});
|
||||
},
|
||||
getContentList() {
|
||||
|
|
|
@ -152,14 +152,17 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
|
|||
上报
|
||||
"""
|
||||
obj = self.get_object()
|
||||
if obj.state == '待上报' or obj.state == '待整改':
|
||||
if 'files' in request.data:
|
||||
obj.files.clear()
|
||||
obj.files.add(*request.data['files'])
|
||||
if request.data.get('noteb', None):
|
||||
obj.noteb = request.data['noteb']
|
||||
if request.data.get('is_yes', True):
|
||||
obj.is_yes = request.data.get('is_yes')
|
||||
if obj.state in ['待整改','待上报']:
|
||||
if 'files' in request.data and len(request.data['files'])==0:
|
||||
if request.data.get('noteb', None):
|
||||
if request.data.get('is_yes', True):
|
||||
return Response('请选择不适用', status=status.HTTP_400_BAD_REQUEST)
|
||||
else:
|
||||
return Response('请上传文件或填写备注', status=status.HTTP_400_BAD_REQUEST)
|
||||
obj.is_yes = request.data.get('is_yes')
|
||||
obj.files.clear()
|
||||
obj.files.add(*request.data['files'])
|
||||
obj.noteb = request.data['noteb']
|
||||
obj.state = '已上报'
|
||||
obj.up_user = request.user
|
||||
obj.up_date = timezone.now()
|
||||
|
|
Loading…
Reference in New Issue