细节完善

This commit is contained in:
caoqianming 2021-03-19 14:51:27 +08:00
parent a8ba750585
commit e6f4e7ce30
3 changed files with 21 additions and 21 deletions

View File

@ -5,8 +5,7 @@
<el-input
v-model="listQuery.content_name"
placeholder="材料名称"
style="width: 200px"
class="filter-item"
style="width: 140px"
@keyup.enter.native="handleFilter"
/>
<el-select
@ -14,7 +13,6 @@
placeholder="是否主动报送"
clearable
style="width: 140px"
class="filter-item"
@change="handleFilter"
>
<el-option
@ -29,7 +27,6 @@
placeholder="记录状态"
clearable
style="width: 140px"
class="filter-item"
@change="handleFilter"
>
<el-option
@ -45,7 +42,6 @@
placeholder="上报部门"
clearable
style="width: 140px"
class="filter-item"
@change="handleFilter"
>
<el-option
@ -78,16 +74,13 @@
>搜索</el-button
>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button
>
</div>
</el-card>
<el-card style="margin-top: 10px">
<el-row>
<div style="margin-top: 10px">
<el-button type="primary" @click="centerDialogVisible = true" plain
>主动上报</el-button
>
@ -107,8 +100,8 @@
<el-button type="primary" @click="contentup()">确认</el-button>
</span>
</el-dialog>
</el-row>
</el-card>
</div>
</el-card>
<el-card style="margin-top: 10px">
<el-table
v-loading="listLoading"
@ -124,9 +117,9 @@
<el-table-column width="150px" label="任务标题">
<template slot-scope="scope" >
<el-tag type="" effect="plain" hit="false" v-if="scope.row.task">{{
<span v-if="scope.row.task">{{
scope.row.task_.name
}}</el-tag>
}}</span>
<el-tag type="warning" effect="plain" v-else>
主动报送
</el-tag>
@ -398,7 +391,6 @@ export default {
},
getContentsList() {
getContentList({ can_doself: this.can_doself }).then((res) => {
console.log(res.data)
this.contentOptions = res.data;
});
@ -407,6 +399,12 @@ export default {
if (this.contents.length > 0) {
createself({ contents: this.contents }).then((res) => {
this.centerDialogVisible = false;
this.listQuery = {
page:1,
page_size:20,
state:'待上报',
is_self:true
}
this. getList();
});
} else {

View File

@ -24,8 +24,8 @@
<span class="desc" v-if="task.create_by_">
{{ task.create_by_.name }}/</span
>
<span class="desc" v-if="task.belong_belong_dept_">{{
task.belong_belong_dept_.name
<span class="desc" v-if="task.belong_dept_">{{
task.belong_dept_.name
}}</span>
</div>
</el-col>
@ -33,13 +33,13 @@
<div style="margin-bottom: 6px">
<span class="term">任务状态</span>
<span class="desc">
<el-tag v-if="task.state == '创建中'" type="warning">{{
<el-tag effect="plain" v-if="task.state == '创建中'" type="warning">{{
task.state
}}</el-tag>
<el-tag v-else-if="task.state == '执行中'" type="primary">{{
<el-tag effect="plain" v-else-if="task.state == '执行中'" type="primary">{{
task.state
}}</el-tag>
<el-tag v-else type="success">{{ task.state }}</el-tag>
<el-tag effect="plain" v-else type="success">{{ task.state }}</el-tag>
</span>
</div>
</el-col>
@ -86,6 +86,7 @@
v-for="(item, index) in contents"
v-bind:key="item.id"
@click="chosecontent(item)"
style="margin-top:2px"
>
<el-link type="primary"
>{{ index + 1 }}-{{ item.name }}</el-link
@ -255,6 +256,7 @@
v-for="(item, index) in depts"
v-bind:key="item.id"
@click="chosedept(item)"
style="margin-top:2px"
>
<el-link type="primary"
>{{ index + 1 }}-{{ item.name }}</el-link
@ -310,7 +312,7 @@
</el-table-column>
<el-table-column label="上报情况">
<template slot-scope="scope" v-if="scope.row.up_user_"
>{{ scope.row.up_user }}/{{ scope.row.up_date }}</template
>{{ scope.row.up_user_.name }}/{{ scope.row.up_date }}</template
>
</el-table-column>
<el-table-column label="文件">

View File

@ -116,7 +116,7 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
queryset = Record.objects.all()
serializer_class = RecordSerializer
search_fields = ['content__name','task__name']
ordering = ['create_time']
ordering = ['-create_time']
filter_class = RecordFilter # 过滤类
@action(methods=['get'], detail=False, perms_map = {'get':'*'})