Merge branch 'master' of https://e.coding.net/ctcdevteam/cma_search
This commit is contained in:
commit
a8ba750585
|
@ -9,7 +9,21 @@
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
|
<el-select
|
||||||
|
v-model="listQuery.is_self"
|
||||||
|
placeholder="是否主动报送"
|
||||||
|
clearable
|
||||||
|
style="width: 140px"
|
||||||
|
class="filter-item"
|
||||||
|
@change="handleFilter"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in isOptions"
|
||||||
|
:key="item.key"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.key"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="listQuery.state"
|
v-model="listQuery.state"
|
||||||
placeholder="记录状态"
|
placeholder="记录状态"
|
||||||
|
@ -25,8 +39,8 @@
|
||||||
:value="item.key"
|
:value="item.key"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-select
|
<el-select v-if="checkPermission(['record_confirm'])"
|
||||||
v-model="listQuery.belong_dept"
|
v-model="listQuery.belong_dept"
|
||||||
placeholder="上报部门"
|
placeholder="上报部门"
|
||||||
clearable
|
clearable
|
||||||
|
@ -72,6 +86,29 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-card style="margin-top: 10px">
|
||||||
|
<el-row>
|
||||||
|
<el-button type="primary" @click="centerDialogVisible = true" plain
|
||||||
|
>主动上报</el-button
|
||||||
|
>
|
||||||
|
<el-dialog
|
||||||
|
title="提示"
|
||||||
|
:visible.sync="centerDialogVisible"
|
||||||
|
width="50%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<el-transfer
|
||||||
|
v-model="contents"
|
||||||
|
:data="contentOptions"
|
||||||
|
:titles="['材料清单', '选择的清单']"
|
||||||
|
:props="{ key: 'id', label: 'name' }"
|
||||||
|
/>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="contentup()">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
<el-card style="margin-top: 10px">
|
<el-card style="margin-top: 10px">
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
@ -85,15 +122,20 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="任务标题">
|
<el-table-column width="150px" label="任务标题">
|
||||||
<template slot-scope="scope" v-if="scope.row.task">{{
|
<template slot-scope="scope" >
|
||||||
|
<el-tag type="" effect="plain" hit="false" v-if="scope.row.task">{{
|
||||||
scope.row.task_.name
|
scope.row.task_.name
|
||||||
}}</template>
|
}}</el-tag>
|
||||||
|
<el-tag type="warning" effect="plain" v-else>
|
||||||
|
主动报送
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="材料名称">
|
<el-table-column label="材料名称">
|
||||||
<template slot-scope="scope">{{ scope.row.content_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.content_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column sortable label="上报时间">
|
<el-table-column label="上报时间">
|
||||||
<template slot-scope="scope">{{ scope.row.up_date }}</template>
|
<template slot-scope="scope">{{ scope.row.up_date }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上报人">
|
<el-table-column label="上报人">
|
||||||
|
@ -101,7 +143,7 @@
|
||||||
scope.row.up_user_.name
|
scope.row.up_user_.name
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column sortable label="截止时间">
|
<el-table-column label="截止时间">
|
||||||
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -225,8 +267,10 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getOrgList } from "@/api/org";
|
import { getOrgList } from "@/api/org";
|
||||||
import { getRecordList } from "@/api/record";
|
import { getRecordList,createself } from "@/api/record";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
|
|
||||||
|
import { getContentList } from "@/api/content";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
import recorddo from "@/views/supervision/recorddo";
|
import recorddo from "@/views/supervision/recorddo";
|
||||||
|
@ -241,7 +285,11 @@ export default {
|
||||||
recordList: {
|
recordList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
can_doself: true,
|
||||||
|
contentOptions: [],
|
||||||
|
contents: [],
|
||||||
|
centerDialogVisible: false,
|
||||||
orgData: [],
|
orgData: [],
|
||||||
drawer: false,
|
drawer: false,
|
||||||
stateOptions: [
|
stateOptions: [
|
||||||
|
@ -250,6 +298,9 @@ export default {
|
||||||
{ key: "已确认", name: "已确认" },
|
{ key: "已确认", name: "已确认" },
|
||||||
{ key: "待整改", name: "待整改" },
|
{ key: "待整改", name: "待整改" },
|
||||||
],
|
],
|
||||||
|
isOptions:[
|
||||||
|
{key:"true",name:"是"},
|
||||||
|
{key:"false",name:"否"}],
|
||||||
pickerOptions2: {
|
pickerOptions2: {
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
{
|
{
|
||||||
|
@ -298,9 +349,11 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getState();
|
this.getState();
|
||||||
this.getOrgList();
|
this.getOrgList();
|
||||||
|
this.getContentsList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
getState(){
|
getState(){
|
||||||
if(this.$route.params.state){
|
if(this.$route.params.state){
|
||||||
this.listQuery.state = this.$route.params.state
|
this.listQuery.state = this.$route.params.state
|
||||||
|
@ -343,6 +396,23 @@ export default {
|
||||||
this.drawer = false;
|
this.drawer = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
getContentsList() {
|
||||||
|
getContentList({ can_doself: this.can_doself }).then((res) => {
|
||||||
|
console.log(res.data)
|
||||||
|
this.contentOptions = res.data;
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
contentup() {
|
||||||
|
if (this.contents.length > 0) {
|
||||||
|
createself({ contents: this.contents }).then((res) => {
|
||||||
|
this.centerDialogVisible = false;
|
||||||
|
this. getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error("请选择清单!");
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,6 +8,7 @@ class RecordFilter(filters.FilterSet):
|
||||||
belong_dept=filters.NumberFilter(field_name='belong_dept')
|
belong_dept=filters.NumberFilter(field_name='belong_dept')
|
||||||
content_name = filters.CharFilter(field_name='content__name')
|
content_name = filters.CharFilter(field_name='content__name')
|
||||||
state = filters.CharFilter(field_name='state',lookup_expr='icontains')
|
state = filters.CharFilter(field_name='state',lookup_expr='icontains')
|
||||||
|
isself = filters.BooleanFilter(field_name='is_self', lookup_expr='isnull')
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Record
|
model = Record
|
||||||
fields = ['up_date','content__name','belong_dept','state', 'task', 'content']
|
fields = ['up_date','content__name','belong_dept','state','is_self','task', 'content']
|
||||||
|
|
Loading…
Reference in New Issue