按要求修改
This commit is contained in:
parent
1c6ed2bfb9
commit
0351b6a7a4
|
@ -34,6 +34,14 @@ export function updateRecord(id, data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function updateRecords(data) {
|
||||||
|
return request({
|
||||||
|
url: '/supervision/record/updates/',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function createself(data) {
|
export function createself(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/supervision/record/createself/`,
|
url: `/supervision/record/createself/`,
|
||||||
|
|
|
@ -69,3 +69,17 @@ export function starttask(id) {
|
||||||
method: 'put'
|
method: 'put'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function closetask(id) {
|
||||||
|
return request({
|
||||||
|
url: `/supervision/task/${id}/close/`,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function gettaskdeptall(id) {
|
||||||
|
return request({
|
||||||
|
url: `/supervision/task/${id}/deptall/`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
|
@ -5,55 +5,63 @@
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card
|
<el-card style="margin-top: 10px">
|
||||||
style="margin-top: 10px"
|
<el-table
|
||||||
>
|
v-loading="listLoading"
|
||||||
<el-table
|
:data="contentList"
|
||||||
v-loading="listLoading"
|
border
|
||||||
:data="contentList"
|
fit
|
||||||
border
|
stripe
|
||||||
fit
|
highlight-current-row
|
||||||
stripe
|
max-height="600"
|
||||||
highlight-current-row
|
>
|
||||||
max-height="600"
|
<el-table-column type="index" width="50" />
|
||||||
>
|
<el-table-column label="名称">
|
||||||
<el-table-column type="index" width="50" />
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
<el-table-column label="名称">
|
</el-table-column>
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
<el-table-column label="详情">
|
||||||
</el-table-column>
|
<template slot-scope="scope">{{ scope.row.desc }}</template>
|
||||||
<el-table-column label="详情">
|
</el-table-column>
|
||||||
<template slot-scope="scope">{{ scope.row.desc }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="材料类型">
|
<el-table-column label="材料类型">
|
||||||
<template slot-scope="scope">{{ scope.row.type_ }}</template>
|
<template slot-scope="scope">{{ scope.row.type_ }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="是否可主动报送">
|
|
||||||
<template slot-scope="scope">
|
<el-table-column label="排序号">
|
||||||
<el-tag type="success" v-if="scope.row.can_doself">是</el-tag>
|
<template slot-scope="scope">{{ scope.row.sortnum }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column align="center" label="是否可主动报送">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.can_doself">是</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" label="操作" width="200px" fixed="right">
|
<el-table-column
|
||||||
<template slot-scope="scope">
|
align="center"
|
||||||
<el-button
|
label="操作"
|
||||||
:disabled="!checkPermission(['content'])"
|
width="200px"
|
||||||
type="primary"
|
fixed="right"
|
||||||
size="small"
|
>
|
||||||
icon="el-icon-edit"
|
<template slot-scope="scope">
|
||||||
@click="handleEdit(scope)"
|
<el-button
|
||||||
/>
|
:disabled="!checkPermission(['content'])"
|
||||||
<el-button
|
type="primary"
|
||||||
:disabled="!checkPermission(['content'])"
|
size="small"
|
||||||
type="danger"
|
icon="el-icon-edit"
|
||||||
size="small"
|
@click="handleEdit(scope)"
|
||||||
icon="el-icon-delete"
|
/>
|
||||||
@click="handleDelete(scope)"
|
<el-button
|
||||||
/>
|
:disabled="!checkPermission(['content'])"
|
||||||
</template>
|
type="danger"
|
||||||
</el-table-column>
|
size="small"
|
||||||
</el-table>
|
icon="el-icon-delete"
|
||||||
</el-card>
|
@click="handleDelete(scope)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:title="dialogType === 'edit' ? '编辑资料' : '新增资料'"
|
:title="dialogType === 'edit' ? '编辑资料' : '新增资料'"
|
||||||
|
@ -68,13 +76,13 @@
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="Content.name" placeholder="名称" />
|
<el-input v-model="Content.name" placeholder="名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="材料类型" prop="type" >
|
<el-form-item label="材料类型" prop="type">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model = "Content.type"
|
v-model="Content.type"
|
||||||
:options="typeOptions"
|
:options="typeOptions"
|
||||||
:props="{ emitPath : false , }"
|
:props="{ emitPath: false }"
|
||||||
clearable
|
clearable
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -86,9 +94,19 @@
|
||||||
placeholder="详情"
|
placeholder="详情"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-form-item label="是否可主动报送" prop="can_doself" label-width="120px">
|
<el-input-number
|
||||||
<el-switch v-model="Content.can_doself" ></el-switch>
|
v-model="Content.sortnum"
|
||||||
|
:min="1"
|
||||||
|
:max="999"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="是否可主动报送"
|
||||||
|
prop="can_doself"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-switch v-model="Content.can_doself"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.content_name"
|
v-model="listQuery.search"
|
||||||
placeholder="材料名称"
|
placeholder="搜索"
|
||||||
style="width: 140px"
|
style="width: 140px"
|
||||||
@keyup.enter.native="handleFilter"
|
@keyup.enter.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
|
@ -81,7 +81,8 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<el-button type="primary" @click="centerDialogVisible = true" >主动上报</el-button
|
<el-checkbox v-model="listQuery.only" @change="showOnly">只显示本司</el-checkbox>
|
||||||
|
<el-button type="primary" @click="centerDialogVisible = true" style="margin-left:4px">主动上报</el-button
|
||||||
>
|
>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="主动报送"
|
title="主动报送"
|
||||||
|
@ -110,7 +111,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
max-height="600"
|
max-height="600"
|
||||||
:default-sort="{ prop: 'date', order: 'descending' }"
|
@sort-change="changeTableSort"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
|
@ -128,10 +129,10 @@
|
||||||
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="材料名称">
|
<el-table-column label="材料名称" sortable='custom' prop="content__sortnum">
|
||||||
<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 label="报送要求">
|
<el-table-column label="报送要求/备注">
|
||||||
<template slot-scope="scope">{{ scope.row.note }}</template>
|
<template slot-scope="scope">{{ scope.row.note }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上报情况">
|
<el-table-column label="上报情况">
|
||||||
|
@ -142,7 +143,7 @@
|
||||||
<el-table-column label="上报说明">
|
<el-table-column label="上报说明">
|
||||||
<template slot-scope="scope">{{ scope.row.noteb }}</template>
|
<template slot-scope="scope">{{ scope.row.noteb }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上报单位">
|
<el-table-column label="上报单位" sortable='custom' prop="belong_dept__sort">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
scope.row.belong_dept_.name
|
scope.row.belong_dept_.name
|
||||||
}}</template>
|
}}</template>
|
||||||
|
@ -182,7 +183,6 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="220px"
|
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -344,6 +344,7 @@ export default {
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
|
only: true
|
||||||
},
|
},
|
||||||
listLoading: false,
|
listLoading: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
@ -392,7 +393,7 @@ export default {
|
||||||
resetFilter() {
|
resetFilter() {
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20
|
||||||
};
|
};
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
@ -411,6 +412,17 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
showOnly(val) {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
changeTableSort (val) {
|
||||||
|
if(val.order == 'ascending'){
|
||||||
|
this.listQuery.ordering = val.prop
|
||||||
|
}else{
|
||||||
|
this.listQuery.ordering = '-' + val.prop
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
contentup() {
|
contentup() {
|
||||||
if (this.contents.length > 0) {
|
if (this.contents.length > 0) {
|
||||||
createself({ contents: this.contents }).then((res) => {
|
createself({ contents: this.contents }).then((res) => {
|
||||||
|
|
|
@ -2,8 +2,12 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="ma">上报记录</div>
|
<div class="ma">上报记录</div>
|
||||||
<div class="ma">
|
<div class="ma">
|
||||||
<span class="term">清单内容</span>
|
<span class="term">材料内容</span>
|
||||||
<span class="desc">{{ record.content_.name }}</span>
|
<span class="desc">{{ record.content_name }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="ma" v-if="record.content_desc">
|
||||||
|
<span class="term">材料详情</span>
|
||||||
|
<span class="desc">{{ record.content_desc }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="ma">
|
<div class="ma">
|
||||||
<span class="term">上报状态</span>
|
<span class="term">上报状态</span>
|
||||||
|
@ -19,7 +23,7 @@
|
||||||
<span class="desc">{{ record.task_.end_date }}</span>
|
<span class="desc">{{ record.task_.end_date }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="ma" v-if="record.task_">
|
<div class="ma" v-if="record.task_">
|
||||||
<span class="term">报送要求</span>
|
<span class="term">报送要求/备注</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="record.note"
|
v-model="record.note"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
|
@ -73,7 +77,7 @@
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
<div class="el-upload__tip">
|
<div class="el-upload__tip">
|
||||||
可上传pdf,word,ppt,excel,图片文件,大小不超过20M
|
可上传pdf,word,ppt,excel,图片文件,大小不超过50M
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -172,9 +176,9 @@ export default {
|
||||||
fileList.splice(index, 1);
|
fileList.splice(index, 1);
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
const isLt2M = file.size / 1024 / 1024 < 20;
|
const isLt2M = file.size / 1024 / 1024 < 50;
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
this.$message.error("单文件不能超过20MB!");
|
this.$message.error("单文件不能超过50MB!");
|
||||||
}
|
}
|
||||||
return isLt2M;
|
return isLt2M;
|
||||||
},
|
},
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
}}</template>
|
}}</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 label="状态">
|
<el-table-column label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
|
@ -54,9 +54,9 @@
|
||||||
<el-table-column 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>
|
||||||
<el-table-column label="上报率/确认率">
|
<!-- <el-table-column label="上报率/确认率">
|
||||||
<template slot-scope="scope">{{ scope.row.up_rate }}%/{{scope.row.confirm_rate}}%</template>
|
<template slot-scope="scope">{{ scope.row.up_rate }}%/{{scope.row.confirm_rate}}%</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
|
|
||||||
<el-table-column label="任务备注">
|
<el-table-column label="任务备注">
|
||||||
<template slot-scope="scope">{{ scope.row.note }}</template>
|
<template slot-scope="scope">{{ scope.row.note }}</template>
|
||||||
|
@ -68,23 +68,24 @@
|
||||||
width="220px"
|
width="220px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="!checkPermission(['task_view'])"
|
v-if="checkPermission(['task_view'])"
|
||||||
size="small"
|
|
||||||
@click="handleDo(scope)"
|
@click="handleDo(scope)"
|
||||||
>执行</el-button>
|
>执行</el-link>
|
||||||
<el-button
|
<el-link
|
||||||
:disabled="!checkPermission(['task_update'])"
|
v-if="checkPermission(['task_update'])"
|
||||||
size="small"
|
|
||||||
@click="handleEdit(scope)"
|
@click="handleEdit(scope)"
|
||||||
>编辑</el-button>
|
>编辑</el-link>
|
||||||
<el-button
|
<el-link
|
||||||
:disabled="!checkPermission(['task_delete'])"
|
v-if="checkPermission(['task_close']) && scope.row.state!='已关闭'"
|
||||||
|
@click="handleClose(scope)"
|
||||||
|
>关闭</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['task_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
|
||||||
@click="handleDelete(scope)"
|
@click="handleDelete(scope)"
|
||||||
>删除</el-button>
|
>删除</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -138,7 +139,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { gettasklist, createtask, deletetask, updatetask } from "@/api/task";
|
import { gettasklist, createtask, deletetask, updatetaskm, closetask } from "@/api/task";
|
||||||
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
|
||||||
const defaulttask = {
|
const defaulttask = {
|
||||||
|
@ -232,6 +233,21 @@ export default {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleClose(scope) {
|
||||||
|
this.$confirm("确认关闭该任务吗?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await closetask(scope.row.id);
|
||||||
|
this.getList();
|
||||||
|
this.$message.success("成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
|
@ -33,24 +33,32 @@
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">任务状态</span>
|
<span class="term">任务状态</span>
|
||||||
<span class="desc">
|
<span class="desc">
|
||||||
<el-tag effect="plain" v-if="task.state == '创建中'" type="warning">{{
|
<el-tag
|
||||||
|
effect="plain"
|
||||||
|
v-if="task.state == '创建中'"
|
||||||
|
type="warning"
|
||||||
|
>{{ task.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
effect="plain"
|
||||||
|
v-else-if="task.state == '执行中'"
|
||||||
|
type="primary"
|
||||||
|
>{{ task.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag effect="plain" v-else type="success">{{
|
||||||
task.state
|
task.state
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
<el-tag effect="plain" v-else-if="task.state == '执行中'" type="primary">{{
|
|
||||||
task.state
|
|
||||||
}}</el-tag>
|
|
||||||
<el-tag effect="plain" v-else type="success">{{ task.state }}</el-tag>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">上报/确认率</span>
|
<span class="term">上报/确认率</span>
|
||||||
<span class="desc">
|
<span class="desc">
|
||||||
{{ task.up_rate }}% -- {{ task.confirm_rate }}%</span
|
{{ task.up_rate }}% -- {{ task.confirm_rate }}%</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">备注</span>
|
<span class="term">备注</span>
|
||||||
|
@ -73,380 +81,172 @@
|
||||||
size="small"
|
size="small"
|
||||||
>发布任务</el-button
|
>发布任务</el-button
|
||||||
>
|
>
|
||||||
|
<el-button type="primary" @click="handleUp1" size="small" v-if="checkPermission(['task_update'])">按材料批量修改备注</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>执行部门</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="taskdeptall"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="300px"
|
||||||
|
@row-click="clickRow"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" align="center" width="55" />
|
||||||
|
<el-table-column label="公司名称">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.dept_">{{
|
||||||
|
scope.row.dept_.name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上报率">
|
||||||
|
<template slot-scope="scope"> {{ scope.row.up_rate }}% </template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="确认率">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.confirm_rate }}%
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>执行详情</span>
|
<span>执行详情</span>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName">
|
<div>
|
||||||
<el-tab-pane label="按清单" name="contenttab" lazy>
|
<el-button type="primary" @click="handleUp2" size="small" v-if="checkPermission(['task_update'])">批量修改备注</el-button>
|
||||||
<el-row :gutter="10">
|
</div>
|
||||||
<el-col :span="4">
|
<el-table
|
||||||
<el-card
|
v-loading="listLoading2"
|
||||||
shadow="never"
|
:data="recordList"
|
||||||
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
border
|
||||||
>
|
fit
|
||||||
<div
|
stripe
|
||||||
v-for="(item, index) in contents"
|
highlight-current-row
|
||||||
v-bind:key="item.id"
|
max-height="400px"
|
||||||
@click="chosecontent(item)"
|
style="margin-top:2px"
|
||||||
style="margin-top:2px"
|
@selection-change="handleSelectRecords"
|
||||||
>
|
>
|
||||||
<el-link type="primary"
|
<el-table-column type="selection" align="center" width="55" />
|
||||||
>{{ index + 1 }}-{{ item.name }}</el-link
|
<el-table-column label="序号" type="index" align="center" width="55" />
|
||||||
>
|
<el-table-column label="材料">
|
||||||
</div>
|
<template slot-scope="scope">{{ scope.row.content_name }}</template>
|
||||||
</el-card>
|
</el-table-column>
|
||||||
</el-col>
|
<el-table-column label="状态">
|
||||||
<el-col :span="20">
|
<template slot-scope="scope">
|
||||||
<el-card
|
<el-tag type="danger" v-if="scope.row.state == '待上报'">{{
|
||||||
shadow="never"
|
scope.row.state
|
||||||
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
}}</el-tag>
|
||||||
>
|
<el-tag
|
||||||
<div style="margin-bottom: 6px">
|
type="warning"
|
||||||
当前选择
|
v-else-if="
|
||||||
<span style="color: red">{{ nowcontent.name }}</span>
|
scope.row.state == '待整改' || scope.row.state == '待发布'
|
||||||
</div>
|
"
|
||||||
<el-table
|
>{{ scope.row.state }}</el-tag
|
||||||
v-loading="listLoading"
|
>
|
||||||
:data="recordList1"
|
<el-tag type="success" v-else-if="scope.row.state == '已确认'">{{
|
||||||
border
|
scope.row.state
|
||||||
fit
|
}}</el-tag>
|
||||||
stripe
|
<el-tag v-else-if="scope.row.state == '已上报'">{{
|
||||||
highlight-current-row
|
scope.row.state
|
||||||
max-height="600px"
|
}}</el-tag>
|
||||||
>
|
</template>
|
||||||
<el-table-column label="序号" type="index" align="center" />
|
</el-table-column>
|
||||||
<el-table-column label="单位">
|
<el-table-column label="报送要求/备注">
|
||||||
<template slot-scope="scope">{{
|
|
||||||
scope.row.belong_dept_.name
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态">
|
|
||||||
<template slot-scope="scope"
|
|
||||||
><el-tag
|
|
||||||
type="danger"
|
|
||||||
v-if="scope.row.state == '待上报'"
|
|
||||||
>{{ scope.row.state }}</el-tag
|
|
||||||
>
|
|
||||||
<el-tag
|
|
||||||
type="warning"
|
|
||||||
v-else-if="scope.row.state == '待整改' || scope.row.state == '待发布'"
|
|
||||||
>{{ scope.row.state }}</el-tag
|
|
||||||
>
|
|
||||||
<el-tag
|
|
||||||
type="success"
|
|
||||||
v-else-if="scope.row.state == '已确认'"
|
|
||||||
>{{ scope.row.state }}</el-tag
|
|
||||||
>
|
|
||||||
<el-tag v-else-if="scope.row.state == '已上报'">{{
|
|
||||||
scope.row.state
|
|
||||||
}}</el-tag></template
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="上报情况">
|
|
||||||
<template slot-scope="scope" v-if="scope.row.up_user_"
|
|
||||||
>{{ scope.row.up_user_.name }}/{{
|
|
||||||
scope.row.up_date
|
|
||||||
}}</template
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="报送要求">
|
|
||||||
<template slot-scope="scope">{{ scope.row.note }}</template>
|
<template slot-scope="scope">{{ scope.row.note }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="文件">
|
<el-table-column label="上报情况">
|
||||||
<template slot-scope="scope" v-if="scope.row.files">
|
<template slot-scope="scope" v-if="scope.row.up_user_"
|
||||||
<el-link
|
>{{ scope.row.up_user_.name }}/{{ scope.row.up_date }}</template
|
||||||
v-if="scope.row.files.length > 1"
|
>
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'view', record: scope.row })
|
|
||||||
"
|
|
||||||
>有
|
|
||||||
<span style="color: red">{{
|
|
||||||
scope.row.files.length
|
|
||||||
}}</span>
|
|
||||||
个文件</el-link
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
v-else
|
|
||||||
v-for="item in scope.row.files_"
|
|
||||||
v-bind:key="item.id"
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
:href="item.path"
|
|
||||||
target="_blank"
|
|
||||||
type="primary"
|
|
||||||
>{{ item.name }}</el-link
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
label="操作"
|
|
||||||
width="240px"
|
|
||||||
fixed="right"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-link
|
|
||||||
v-if="
|
|
||||||
(scope.row.state == '待上报'||scope.row.state=='待发布' )&&
|
|
||||||
checkPermission(['record_update'])
|
|
||||||
"
|
|
||||||
type="warning"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'update', record: scope.row })
|
|
||||||
"
|
|
||||||
>编辑</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="
|
|
||||||
(scope.row.state == '待上报' ||
|
|
||||||
scope.row.state == '待整改') &&
|
|
||||||
checkPermission(['record_up'])
|
|
||||||
"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'up', record: scope.row })
|
|
||||||
"
|
|
||||||
>上报</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="
|
|
||||||
scope.row.state == '已上报' &&
|
|
||||||
checkPermission(['record_confirm'])
|
|
||||||
"
|
|
||||||
type="success"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'confirm', record: scope.row })
|
|
||||||
"
|
|
||||||
>确认</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="
|
|
||||||
scope.row.state == '已上报' &&
|
|
||||||
checkPermission(['record_reject'])
|
|
||||||
"
|
|
||||||
type="danger"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'reject', record: scope.row })
|
|
||||||
"
|
|
||||||
>驳回</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['record_view'])"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'view', record: scope.row })
|
|
||||||
"
|
|
||||||
>查看</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['record_delete'])"
|
|
||||||
type="danger"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'delete', record: scope.row })
|
|
||||||
"
|
|
||||||
>删除</el-link
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="按单位" name="depttab" lazy>
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-card
|
|
||||||
shadow="never"
|
|
||||||
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
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
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="20">
|
|
||||||
<el-card
|
|
||||||
shadow="never"
|
|
||||||
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
|
||||||
>
|
|
||||||
<div style="margin-bottom: 6px">
|
|
||||||
当前选择
|
|
||||||
<span style="color: red">{{ nowdept.name }}</span>
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
v-loading="listLoading"
|
|
||||||
:data="recordList2"
|
|
||||||
border
|
|
||||||
fit
|
|
||||||
stripe
|
|
||||||
highlight-current-row
|
|
||||||
max-height="600px"
|
|
||||||
>
|
|
||||||
<el-table-column label="序号" type="index" align="center" />
|
|
||||||
<el-table-column label="材料">
|
|
||||||
<template slot-scope="scope">{{
|
|
||||||
scope.row.content_.name
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag
|
|
||||||
type="danger"
|
|
||||||
v-if="scope.row.state == '待上报'"
|
|
||||||
>{{ scope.row.state }}</el-tag
|
|
||||||
>
|
|
||||||
<el-tag
|
|
||||||
type="warning"
|
|
||||||
v-else-if="scope.row.state == '待整改' || scope.row.state == '待发布'"
|
|
||||||
>{{ scope.row.state }}</el-tag
|
|
||||||
>
|
|
||||||
<el-tag
|
|
||||||
type="success"
|
|
||||||
v-else-if="scope.row.state == '已确认'"
|
|
||||||
>{{ scope.row.state }}</el-tag
|
|
||||||
>
|
|
||||||
<el-tag v-else-if="scope.row.state == '已上报'">{{
|
|
||||||
scope.row.state
|
|
||||||
}}</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="上报情况">
|
|
||||||
<template slot-scope="scope" v-if="scope.row.up_user_"
|
|
||||||
>{{ scope.row.up_user_.name }}/{{ scope.row.up_date }}</template
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="报送要求">
|
|
||||||
<template slot-scope="scope">{{ scope.row.note }}</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="文件">
|
<el-table-column label="文件">
|
||||||
<template slot-scope="scope" v-if="scope.row.files">
|
<template slot-scope="scope" v-if="scope.row.files">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="scope.row.files.length > 1"
|
v-if="scope.row.files.length > 1"
|
||||||
@click="
|
@click="handleRecord({ action: 'view', record: scope.row })"
|
||||||
handleRecord({ action: 'view', record: scope.row })
|
>有
|
||||||
"
|
<span style="color: red">{{ scope.row.files.length }}</span>
|
||||||
>有
|
个文件</el-link
|
||||||
<span style="color: red">{{
|
>
|
||||||
scope.row.files.length
|
<div v-else v-for="item in scope.row.files_" v-bind:key="item.id">
|
||||||
}}</span>
|
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||||
个文件</el-link
|
item.name
|
||||||
>
|
}}</el-link>
|
||||||
<div
|
</div>
|
||||||
v-else
|
</template>
|
||||||
v-for="item in scope.row.files_"
|
</el-table-column>
|
||||||
v-bind:key="item.id"
|
<el-table-column
|
||||||
>
|
align="center"
|
||||||
<el-link
|
label="操作"
|
||||||
:href="item.path"
|
width="240px"
|
||||||
target="_blank"
|
fixed="right"
|
||||||
type="primary"
|
>
|
||||||
>{{ item.name }}</el-link
|
<template slot-scope="scope">
|
||||||
>
|
<el-link
|
||||||
</div>
|
v-if="
|
||||||
</template>
|
(scope.row.state == '待上报' || scope.row.state == '待发布') &&
|
||||||
</el-table-column>
|
checkPermission(['record_update'])
|
||||||
<el-table-column
|
"
|
||||||
align="center"
|
type="warning"
|
||||||
label="操作"
|
size="small"
|
||||||
width="240px"
|
@click="handleRecord({ action: 'update', record: scope.row })"
|
||||||
fixed="right"
|
>编辑</el-link
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<el-link
|
||||||
<el-link
|
v-if="
|
||||||
v-if="
|
(scope.row.state == '待上报' || scope.row.state == '待整改') &&
|
||||||
(scope.row.state == '待上报'||scope.row.state=='待发布' )&&
|
checkPermission(['record_up'])
|
||||||
checkPermission(['record_update'])
|
"
|
||||||
"
|
type="primary"
|
||||||
type="warning"
|
size="small"
|
||||||
size="small"
|
@click="handleRecord({ action: 'up', record: scope.row })"
|
||||||
@click="
|
>上报</el-link
|
||||||
handleRecord({ action: 'update', record: scope.row })
|
>
|
||||||
"
|
<el-link
|
||||||
>编辑</el-link
|
v-if="
|
||||||
>
|
scope.row.state == '已上报' &&
|
||||||
<el-link
|
checkPermission(['record_confirm'])
|
||||||
v-if="
|
"
|
||||||
(scope.row.state == '待上报' ||
|
type="success"
|
||||||
scope.row.state == '待整改') &&
|
size="small"
|
||||||
checkPermission(['record_up'])
|
@click="handleRecord({ action: 'confirm', record: scope.row })"
|
||||||
"
|
>确认</el-link
|
||||||
type="primary"
|
>
|
||||||
size="small"
|
<el-link
|
||||||
@click="
|
v-if="
|
||||||
handleRecord({ action: 'up', record: scope.row })
|
scope.row.state == '已上报' &&
|
||||||
"
|
checkPermission(['record_reject'])
|
||||||
>上报</el-link
|
"
|
||||||
>
|
type="danger"
|
||||||
<el-link
|
size="small"
|
||||||
v-if="
|
@click="handleRecord({ action: 'reject', record: scope.row })"
|
||||||
scope.row.state == '已上报' &&
|
>驳回</el-link
|
||||||
checkPermission(['record_confirm'])
|
>
|
||||||
"
|
<el-link
|
||||||
type="success"
|
v-if="checkPermission(['record_view'])"
|
||||||
size="small"
|
size="small"
|
||||||
@click="
|
@click="handleRecord({ action: 'view', record: scope.row })"
|
||||||
handleRecord({ action: 'confirm', record: scope.row })
|
>查看</el-link
|
||||||
"
|
>
|
||||||
>确认</el-link
|
<el-link
|
||||||
>
|
v-if="checkPermission(['record_delete'])"
|
||||||
<el-link
|
type="danger"
|
||||||
v-if="
|
size="small"
|
||||||
scope.row.state == '已上报' &&
|
@click="handleRecord({ action: 'delete', record: scope.row })"
|
||||||
checkPermission(['record_reject'])
|
>删除</el-link
|
||||||
"
|
>
|
||||||
type="danger"
|
</template>
|
||||||
size="small"
|
</el-table-column>
|
||||||
@click="
|
</el-table>
|
||||||
handleRecord({ action: 'reject', record: scope.row })
|
|
||||||
"
|
|
||||||
>驳回</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['record_view'])"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'view', record: scope.row })
|
|
||||||
"
|
|
||||||
>查看</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['record_delete'])"
|
|
||||||
type="danger"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
handleRecord({ action: 'delete', record: scope.row })
|
|
||||||
"
|
|
||||||
>删除</el-link
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
title="初始化任务"
|
title="初始化任务"
|
||||||
|
@ -487,11 +287,10 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { gettask, inittask, gettaskcontents, gettaskdepts, starttask } from "@/api/task";
|
import { gettask, inittask, gettaskdeptall, starttask } from "@/api/task";
|
||||||
import { getRecordList } from "@/api/record";
|
import { getRecordList, updateRecords } from "@/api/record";
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
import taskinit from "@/views/supervision/taskinit";
|
import taskinit from "@/views/supervision/taskinit";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
@ -506,19 +305,21 @@ export default {
|
||||||
contents: [],
|
contents: [],
|
||||||
depts: [],
|
depts: [],
|
||||||
listLoading: false,
|
listLoading: false,
|
||||||
recordList1: [],
|
listLoading2: false,
|
||||||
recordList2: [],
|
recordList: [],
|
||||||
nowcontent: {},
|
nowcontent: {},
|
||||||
nowdept: {},
|
nowdept: {},
|
||||||
drawer: false,
|
drawer: false,
|
||||||
data: {},
|
data: {},
|
||||||
|
taskdeptall: [],
|
||||||
|
listQuery:{},
|
||||||
|
selectRecords:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.task.id = this.$route.params.id;
|
this.task.id = this.$route.params.id;
|
||||||
this.gettask();
|
this.gettask();
|
||||||
this.gettaskcontents();
|
this.gettaskdeptall();
|
||||||
this.gettaskdepts();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
@ -530,6 +331,17 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
gettaskdeptall() {
|
||||||
|
this.listLoading = true;
|
||||||
|
gettaskdeptall(this.task.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.listLoading = false;
|
||||||
|
this.taskdeptall = res.data;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
init() {
|
init() {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
|
@ -542,70 +354,17 @@ export default {
|
||||||
this.$router.go(0);
|
this.$router.go(0);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
gettaskcontents() {
|
starttask() {
|
||||||
gettaskcontents(this.task.id).then((res) => {
|
|
||||||
this.contents = res.data;
|
|
||||||
if(this.contents[0]){
|
|
||||||
this.listLoading = true;
|
|
||||||
this.nowcontent = {
|
|
||||||
id: this.contents[0].id,
|
|
||||||
name: this.contents[0].name,
|
|
||||||
};
|
|
||||||
getRecordList({
|
|
||||||
pageoff: true,
|
|
||||||
content: this.contents[0].id,
|
|
||||||
task: this.task.id,
|
|
||||||
}).then((res) => {
|
|
||||||
this.listLoading = false;
|
|
||||||
this.recordList1 = res.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
starttask(){
|
|
||||||
this.$confirm("确认发布任务吗?", "提示")
|
this.$confirm("确认发布任务吗?", "提示")
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await starttask(this.task.id);
|
await starttask(this.task.id);
|
||||||
this.$message.success("成功");
|
|
||||||
location.reload();
|
location.reload();
|
||||||
|
this.$message.success("成功");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
gettaskdepts() {
|
|
||||||
gettaskdepts(this.task.id).then((res) => {
|
|
||||||
this.depts = res.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
chosecontent(item) {
|
|
||||||
this.nowcontent = item;
|
|
||||||
var data = {
|
|
||||||
pageoff: true,
|
|
||||||
task: this.task.id,
|
|
||||||
content: item.id,
|
|
||||||
};
|
|
||||||
this.listLoading = true;
|
|
||||||
getRecordList(data).then((res) => {
|
|
||||||
this.listLoading = false;
|
|
||||||
this.recordList1 = res.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
chosedept(item) {
|
|
||||||
this.nowdept = item;
|
|
||||||
var data = {
|
|
||||||
pageoff: true,
|
|
||||||
task: this.task.id,
|
|
||||||
belong_dept: item.id,
|
|
||||||
};
|
|
||||||
this.listLoading = true;
|
|
||||||
getRecordList(data).then((res) => {
|
|
||||||
this.listLoading = false;
|
|
||||||
this.recordList2 = res.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleRecord(data) {
|
handleRecord(data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.drawer = true;
|
this.drawer = true;
|
||||||
|
@ -613,12 +372,47 @@ export default {
|
||||||
handleDo(data) {
|
handleDo(data) {
|
||||||
this.drawer = false;
|
this.drawer = false;
|
||||||
this.gettask();
|
this.gettask();
|
||||||
if (this.activeName == "contenttab") {
|
this.gettaskdeptall();
|
||||||
this.chosecontent(this.nowcontent);
|
this.getRecordList();
|
||||||
} else if (this.activeName == "depttab") {
|
|
||||||
this.chosedept(this.nowdept);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
getRecordList() {
|
||||||
|
getRecordList(this.listQuery)
|
||||||
|
.then((res) => {
|
||||||
|
this.listLoading2 = false;
|
||||||
|
this.recordList = res.data;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.listLoading2 = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clickRow(row, col, e) {
|
||||||
|
this.listLoading2 = true;
|
||||||
|
this.listQuery = { pageoff: true, task: row.task, belong_dept: row.dept }
|
||||||
|
this.getRecordList();
|
||||||
|
},
|
||||||
|
handleSelectRecords(val){
|
||||||
|
let selects = [];
|
||||||
|
for (var i = 0; i < val.length; i++) {
|
||||||
|
selects.push(val[i].id);
|
||||||
|
}
|
||||||
|
this.selectRecords = selects;
|
||||||
|
},
|
||||||
|
handleUp2(){
|
||||||
|
if (this.selectRecords.length) {
|
||||||
|
this.$prompt('请输入备注内容', '提示').then(({ value }) => {
|
||||||
|
updateRecords({note:value, ids:this.selectRecords}).then(res=>{
|
||||||
|
this.$message.success('成功')
|
||||||
|
this.getRecordList();
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: "请先选择",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
|
@ -0,0 +1,624 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>任务详情</span>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 10px; margin-right: 10px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
<span class="term">任务名称</span>
|
||||||
|
<span class="desc"> {{ task.name }}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
<span class="term">截止日期</span>
|
||||||
|
<span class="desc"> {{ task.end_date }}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
<span class="term">创建人</span>
|
||||||
|
<span class="desc" v-if="task.create_by_">
|
||||||
|
{{ task.create_by_.name }}/</span
|
||||||
|
>
|
||||||
|
<span class="desc" v-if="task.belong_dept_">{{
|
||||||
|
task.belong_dept_.name
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
<span class="term">任务状态</span>
|
||||||
|
<span class="desc">
|
||||||
|
<el-tag effect="plain" v-if="task.state == '创建中'" type="warning">{{
|
||||||
|
task.state
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag effect="plain" v-else-if="task.state == '执行中'" type="primary">{{
|
||||||
|
task.state
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag effect="plain" v-else type="success">{{ task.state }}</el-tag>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
<span class="term">上报/确认率</span>
|
||||||
|
<span class="desc">
|
||||||
|
{{ task.up_rate }}% -- {{ task.confirm_rate }}%</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
<span class="term">备注</span>
|
||||||
|
<span class="desc"> {{ task.note }}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div style="margin-top: 4px">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="init()"
|
||||||
|
v-if="task.state == '创建中'"
|
||||||
|
size="small"
|
||||||
|
>初始化任务</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="starttask()"
|
||||||
|
v-if="task.state == '待发布'"
|
||||||
|
size="small"
|
||||||
|
>发布任务</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>执行详情</span>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-model="activeName">
|
||||||
|
<el-tab-pane label="按清单" name="contenttab" lazy>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-card
|
||||||
|
shadow="never"
|
||||||
|
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
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
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-card
|
||||||
|
shadow="never"
|
||||||
|
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
||||||
|
>
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
当前选择
|
||||||
|
<span style="color: red">{{ nowcontent.name }}</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="recordList1"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600px"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" align="center" />
|
||||||
|
<el-table-column label="单位">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.belong_dept_.name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态">
|
||||||
|
<template slot-scope="scope"
|
||||||
|
><el-tag
|
||||||
|
type="danger"
|
||||||
|
v-if="scope.row.state == '待上报'"
|
||||||
|
>{{ scope.row.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
type="warning"
|
||||||
|
v-else-if="scope.row.state == '待整改' || scope.row.state == '待发布'"
|
||||||
|
>{{ scope.row.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
type="success"
|
||||||
|
v-else-if="scope.row.state == '已确认'"
|
||||||
|
>{{ scope.row.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag v-else-if="scope.row.state == '已上报'">{{
|
||||||
|
scope.row.state
|
||||||
|
}}</el-tag></template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上报情况">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.up_user_"
|
||||||
|
>{{ scope.row.up_user_.name }}/{{
|
||||||
|
scope.row.up_date
|
||||||
|
}}</template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="报送要求/备注">
|
||||||
|
<template slot-scope="scope">{{ scope.row.note }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="文件">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.files">
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.files.length > 1"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'view', record: scope.row })
|
||||||
|
"
|
||||||
|
>有
|
||||||
|
<span style="color: red">{{
|
||||||
|
scope.row.files.length
|
||||||
|
}}</span>
|
||||||
|
个文件</el-link
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
|
v-for="item in scope.row.files_"
|
||||||
|
v-bind:key="item.id"
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
:href="item.path"
|
||||||
|
target="_blank"
|
||||||
|
type="primary"
|
||||||
|
>{{ item.name }}</el-link
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
width="240px"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
(scope.row.state == '待上报'||scope.row.state=='待发布' )&&
|
||||||
|
checkPermission(['record_update'])
|
||||||
|
"
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'update', record: scope.row })
|
||||||
|
"
|
||||||
|
>编辑</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
(scope.row.state == '待上报' ||
|
||||||
|
scope.row.state == '待整改') &&
|
||||||
|
checkPermission(['record_up'])
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'up', record: scope.row })
|
||||||
|
"
|
||||||
|
>上报</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
scope.row.state == '已上报' &&
|
||||||
|
checkPermission(['record_confirm'])
|
||||||
|
"
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'confirm', record: scope.row })
|
||||||
|
"
|
||||||
|
>确认</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
scope.row.state == '已上报' &&
|
||||||
|
checkPermission(['record_reject'])
|
||||||
|
"
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'reject', record: scope.row })
|
||||||
|
"
|
||||||
|
>驳回</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['record_view'])"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'view', record: scope.row })
|
||||||
|
"
|
||||||
|
>查看</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['record_delete'])"
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'delete', record: scope.row })
|
||||||
|
"
|
||||||
|
>删除</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="按单位" name="depttab" lazy>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-card
|
||||||
|
shadow="never"
|
||||||
|
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
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
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-card
|
||||||
|
shadow="never"
|
||||||
|
style="height: 600px; overflow-y: auto; overflow-x: auto"
|
||||||
|
>
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
当前选择
|
||||||
|
<span style="color: red">{{ nowdept.name }}</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="recordList2"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600px"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" align="center" />
|
||||||
|
<el-table-column label="材料">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.content_name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag
|
||||||
|
type="danger"
|
||||||
|
v-if="scope.row.state == '待上报'"
|
||||||
|
>{{ scope.row.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
type="warning"
|
||||||
|
v-else-if="scope.row.state == '待整改' || scope.row.state == '待发布'"
|
||||||
|
>{{ scope.row.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
type="success"
|
||||||
|
v-else-if="scope.row.state == '已确认'"
|
||||||
|
>{{ scope.row.state }}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag v-else-if="scope.row.state == '已上报'">{{
|
||||||
|
scope.row.state
|
||||||
|
}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上报情况">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.up_user_"
|
||||||
|
>{{ scope.row.up_user_.name }}/{{ scope.row.up_date }}</template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="报送要求/备注">
|
||||||
|
<template slot-scope="scope">{{ scope.row.note }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="文件">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.files">
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.files.length > 1"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'view', record: scope.row })
|
||||||
|
"
|
||||||
|
>有
|
||||||
|
<span style="color: red">{{
|
||||||
|
scope.row.files.length
|
||||||
|
}}</span>
|
||||||
|
个文件</el-link
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
|
v-for="item in scope.row.files_"
|
||||||
|
v-bind:key="item.id"
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
:href="item.path"
|
||||||
|
target="_blank"
|
||||||
|
type="primary"
|
||||||
|
>{{ item.name }}</el-link
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
width="240px"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
(scope.row.state == '待上报'||scope.row.state=='待发布' )&&
|
||||||
|
checkPermission(['record_update'])
|
||||||
|
"
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'update', record: scope.row })
|
||||||
|
"
|
||||||
|
>编辑</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
(scope.row.state == '待上报' ||
|
||||||
|
scope.row.state == '待整改') &&
|
||||||
|
checkPermission(['record_up'])
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'up', record: scope.row })
|
||||||
|
"
|
||||||
|
>上报</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
scope.row.state == '已上报' &&
|
||||||
|
checkPermission(['record_confirm'])
|
||||||
|
"
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'confirm', record: scope.row })
|
||||||
|
"
|
||||||
|
>确认</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="
|
||||||
|
scope.row.state == '已上报' &&
|
||||||
|
checkPermission(['record_reject'])
|
||||||
|
"
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'reject', record: scope.row })
|
||||||
|
"
|
||||||
|
>驳回</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['record_view'])"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'view', record: scope.row })
|
||||||
|
"
|
||||||
|
>查看</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['record_delete'])"
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
handleRecord({ action: 'delete', record: scope.row })
|
||||||
|
"
|
||||||
|
>删除</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
title="初始化任务"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="70%"
|
||||||
|
>
|
||||||
|
<taskinit ref="taskinit" @handleChose="chooseComplete"></taskinit>
|
||||||
|
</el-dialog>
|
||||||
|
<el-drawer
|
||||||
|
title="记录"
|
||||||
|
:visible.sync="drawer"
|
||||||
|
:with-header="false"
|
||||||
|
size="40%"
|
||||||
|
>
|
||||||
|
<recorddo
|
||||||
|
ref="recorddo"
|
||||||
|
:data="data"
|
||||||
|
@handleDo="handleDo"
|
||||||
|
v-if="drawer"
|
||||||
|
></recorddo>
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style >
|
||||||
|
.term {
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.desc {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.litem {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
margin-left: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
import { gettask, inittask, gettaskcontents, gettaskdepts, starttask } from "@/api/task";
|
||||||
|
import { getRecordList } from "@/api/record";
|
||||||
|
import Pagination from "@/components/Pagination";
|
||||||
|
import taskinit from "@/views/supervision/taskinit";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import recorddo from "@/views/supervision/recorddo";
|
||||||
|
export default {
|
||||||
|
components: { Pagination, taskinit, recorddo },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
task: { id: 0 },
|
||||||
|
dialogVisible: false,
|
||||||
|
activeName: "contenttab",
|
||||||
|
contents: [],
|
||||||
|
depts: [],
|
||||||
|
listLoading: false,
|
||||||
|
recordList1: [],
|
||||||
|
recordList2: [],
|
||||||
|
nowcontent: {},
|
||||||
|
nowdept: {},
|
||||||
|
drawer: false,
|
||||||
|
data: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.task.id = this.$route.params.id;
|
||||||
|
this.gettask();
|
||||||
|
this.gettaskcontents();
|
||||||
|
this.gettaskdepts();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
gettask() {
|
||||||
|
gettask(this.task.id).then((res) => {
|
||||||
|
this.task = res.data;
|
||||||
|
if (this.task.state == "创建中") {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
init() {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
chooseComplete(data) {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
const rLoading = this.openLoading("正在初始化任务,请稍等...");
|
||||||
|
inittask(this.task.id, data).then((res) => {
|
||||||
|
rLoading.close();
|
||||||
|
this.$message.success("成功");
|
||||||
|
this.$router.go(0);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
gettaskcontents() {
|
||||||
|
gettaskcontents(this.task.id).then((res) => {
|
||||||
|
this.contents = res.data;
|
||||||
|
if(this.contents[0]){
|
||||||
|
this.listLoading = true;
|
||||||
|
this.nowcontent = {
|
||||||
|
id: this.contents[0].id,
|
||||||
|
name: this.contents[0].name,
|
||||||
|
};
|
||||||
|
getRecordList({
|
||||||
|
pageoff: true,
|
||||||
|
content: this.contents[0].id,
|
||||||
|
task: this.task.id,
|
||||||
|
}).then((res) => {
|
||||||
|
this.listLoading = false;
|
||||||
|
this.recordList1 = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
starttask(){
|
||||||
|
this.$confirm("确认发布任务吗?", "提示")
|
||||||
|
.then(async () => {
|
||||||
|
await starttask(this.task.id);
|
||||||
|
this.$message.success("成功");
|
||||||
|
location.reload();
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
gettaskdepts() {
|
||||||
|
gettaskdepts(this.task.id).then((res) => {
|
||||||
|
this.depts = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
chosecontent(item) {
|
||||||
|
this.nowcontent = item;
|
||||||
|
var data = {
|
||||||
|
pageoff: true,
|
||||||
|
task: this.task.id,
|
||||||
|
content: item.id,
|
||||||
|
};
|
||||||
|
this.listLoading = true;
|
||||||
|
getRecordList(data).then((res) => {
|
||||||
|
this.listLoading = false;
|
||||||
|
this.recordList1 = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
chosedept(item) {
|
||||||
|
this.nowdept = item;
|
||||||
|
var data = {
|
||||||
|
pageoff: true,
|
||||||
|
task: this.task.id,
|
||||||
|
belong_dept: item.id,
|
||||||
|
};
|
||||||
|
this.listLoading = true;
|
||||||
|
getRecordList(data).then((res) => {
|
||||||
|
this.listLoading = false;
|
||||||
|
this.recordList2 = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleRecord(data) {
|
||||||
|
this.data = data;
|
||||||
|
this.drawer = true;
|
||||||
|
},
|
||||||
|
handleDo(data) {
|
||||||
|
this.drawer = false;
|
||||||
|
this.gettask();
|
||||||
|
if (this.activeName == "contenttab") {
|
||||||
|
this.chosecontent(this.nowcontent);
|
||||||
|
} else if (this.activeName == "depttab") {
|
||||||
|
this.chosedept(this.nowdept);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -52,7 +52,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getOrgList() {
|
getOrgList() {
|
||||||
getOrgList({ pid: 1 }).then((res) => {
|
getOrgList({can_supervision:true}).then((res) => {
|
||||||
this.deptOptions = res.data;
|
this.deptOptions = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,19 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div style="margin-top:10px">
|
<div style="margin-top: 10px">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search"
|
v-model="search"
|
||||||
placeholder="输入部门名称进行搜索"
|
placeholder="输入部门名称进行搜索"
|
||||||
style="width: 200px;"
|
style="width: 200px"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.native="handleFilter"
|
@keyup.native="handleFilter"
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="tableData.filter(data => !search || data.name.toLowerCase().includes(search.toLowerCase()))"
|
:data="
|
||||||
style="width: 100%;margin-top:10px;"
|
tableData.filter(
|
||||||
|
(data) =>
|
||||||
|
!search || data.name.toLowerCase().includes(search.toLowerCase())
|
||||||
|
)
|
||||||
|
"
|
||||||
|
style="width: 100%; margin-top: 10px"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
|
@ -21,21 +28,29 @@
|
||||||
max-height="600"
|
max-height="600"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="组织名称">
|
<el-table-column label="组织名称">
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建日期">
|
<el-table-column label="组织类型">
|
||||||
|
<template slot-scope="scope">{{ scope.row.type }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="配置">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.create_time }}</span>
|
<el-tag v-if="scope.row.can_supervision">可监督</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="排序">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.sort }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作">
|
<el-table-column align="center" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.type==='部门'"
|
v-if="scope.row.name != '国检集团'"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
@ -43,7 +58,7 @@
|
||||||
@click="handleEdit(scope)"
|
@click="handleEdit(scope)"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.type==='部门'"
|
v-if="scope.row.name != '国检集团'"
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
|
@ -54,20 +69,51 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogVisible" :title="dialogType==='edit'?'编辑部门':'新增部门'">
|
<el-dialog
|
||||||
<el-form ref="Form" :model="org" label-width="80px" label-position="right" :rules="rule1">
|
:visible.sync="dialogVisible"
|
||||||
|
:title="dialogType === 'edit' ? '编辑部门' : '新增部门'"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="org"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
:rules="rule1"
|
||||||
|
>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="org.name" placeholder="名称" />
|
<el-input v-model="org.name" placeholder="名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上级部门" prop="pid">
|
<el-form-item label="上级组织" prop="pid">
|
||||||
<treeselect v-model="org.pid" :multiple="false" :options="tableData" placeholder="父级"/>
|
<treeselect
|
||||||
|
v-model="org.pid"
|
||||||
|
:multiple="false"
|
||||||
|
:options="tableData"
|
||||||
|
placeholder="父级"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="组织类型" prop="type">
|
||||||
|
<el-select v-model="org.type" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in DeptTypeoptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="配置" prop="can_supervision">
|
||||||
|
<el-checkbox v-model="org.can_supervision">可监督</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number v-model="org.sort" :min="1" :max="10" ></el-input-number>
|
<el-input-number
|
||||||
|
v-model="org.sort"
|
||||||
|
:min="1"
|
||||||
|
:max="10"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align:right;">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible=false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="confirmOrg('Form')">确认</el-button>
|
<el-button type="primary" @click="confirmOrg('Form')">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -75,120 +121,130 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getOrgAll, createOrg, deleteOrg, updateOrg } from '@/api/org'
|
import { getOrgAll, createOrg, deleteOrg, updateOrg } from "@/api/org";
|
||||||
import { genTree } from '@/utils'
|
import { genTree } from "@/utils";
|
||||||
import checkPermission from '@/utils/permission'
|
import checkPermission from "@/utils/permission";
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
const defaultOrg = {
|
const defaultOrg = {
|
||||||
id: null,
|
id: null,
|
||||||
name: '',
|
name: "",
|
||||||
pid: null,
|
pid: null,
|
||||||
sort:1
|
sort: 1,
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
org: {
|
org: {
|
||||||
id: '',
|
id: "",
|
||||||
name: '',
|
name: "",
|
||||||
pid: ''
|
pid: "",
|
||||||
},
|
},
|
||||||
search: '',
|
search: "",
|
||||||
tableData: [],
|
tableData: [],
|
||||||
orgList: [],
|
orgList: [],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: 'new',
|
dialogType: "new",
|
||||||
rule1: {
|
rule1: {
|
||||||
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||||
pid: [{ required: true, message: '请选择上级', trigger: 'change' }]
|
pid: [{ required: true, message: "请选择上级", trigger: "change" }],
|
||||||
}
|
},
|
||||||
}
|
DeptTypeoptions: [
|
||||||
|
{
|
||||||
|
value: "公司",
|
||||||
|
label: "公司",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "部门",
|
||||||
|
label: "部门",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true
|
this.listLoading = true;
|
||||||
getOrgAll().then(response => {
|
getOrgAll().then((response) => {
|
||||||
this.orgList = response.data
|
this.orgList = response.data;
|
||||||
const data = genTree(response.data)
|
const data = genTree(response.data);
|
||||||
this.tableData = data
|
this.tableData = data;
|
||||||
this.listLoading = false
|
this.listLoading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
resetFilter() {
|
resetFilter() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
const newData = this.orgList.filter(
|
const newData = this.orgList.filter(
|
||||||
data =>
|
(data) =>
|
||||||
!this.search ||
|
!this.search ||
|
||||||
data.name.toLowerCase().includes(this.search.toLowerCase())
|
data.name.toLowerCase().includes(this.search.toLowerCase())
|
||||||
)
|
);
|
||||||
this.tableData = genTree(newData)
|
this.tableData = genTree(newData);
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.org = Object.assign({}, defaultOrg)
|
this.org = Object.assign({}, defaultOrg);
|
||||||
this.dialogType = 'new'
|
this.dialogType = "new";
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['Form'].clearValidate()
|
this.$refs["Form"].clearValidate();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
this.org = Object.assign({}, scope.row) // copy obj
|
this.org = Object.assign({}, scope.row); // copy obj
|
||||||
this.dialogType = 'edit'
|
this.dialogType = "edit";
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['Form'].clearValidate()
|
this.$refs["Form"].clearValidate();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleDelete(scope) {
|
handleDelete(scope) {
|
||||||
this.$confirm('确认删除?', '警告', {
|
this.$confirm("确认删除?", "警告", {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: "确认",
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: "取消",
|
||||||
type: 'error'
|
type: "error",
|
||||||
})
|
})
|
||||||
.then(async() => {
|
.then(async () => {
|
||||||
await deleteOrg(scope.row.id)
|
await deleteOrg(scope.row.id);
|
||||||
this.getList()
|
this.getList();
|
||||||
this.$message.success('成功')
|
this.$message.success("成功");
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.error(err)
|
|
||||||
})
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async confirmOrg(form) {
|
async confirmOrg(form) {
|
||||||
this.$refs[form].validate(valid => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const isEdit = this.dialogType === 'edit'
|
const isEdit = this.dialogType === "edit";
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
updateOrg(this.org.id, this.org).then(() => {
|
updateOrg(this.org.id, this.org).then(() => {
|
||||||
this.getList()
|
this.getList();
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
this.$message.success('成功')
|
this.$message.success("成功");
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
createOrg(this.org).then(res => {
|
createOrg(this.org).then((res) => {
|
||||||
// this.org = res.data
|
// this.org = res.data
|
||||||
// this.tableData.unshift(this.org)
|
// this.tableData.unshift(this.org)
|
||||||
this.getList()
|
this.getList();
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
this.$message.success('成功')
|
this.$message.success("成功");
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Generated by Django 3.0.5 on 2021-03-30 02:20
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('supervision', '0010_auto_20210323_1425'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='record',
|
||||||
|
name='content_desc',
|
||||||
|
field=models.TextField(blank=True, null=True, verbose_name='材料详情'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='record',
|
||||||
|
name='content_name',
|
||||||
|
field=models.CharField(default='', max_length=100, verbose_name='材料名称'),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='record',
|
||||||
|
name='content',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='record_content', to='supervision.Content', verbose_name='材料内容ID'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='record',
|
||||||
|
name='note',
|
||||||
|
field=models.TextField(blank=True, null=True, verbose_name='上报要求'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Generated by Django 3.0.5 on 2021-03-30 03:46
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('system', '0008_auto_20210311_0919'),
|
||||||
|
('supervision', '0011_auto_20210330_1020'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='TaskDept',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('up_rate', models.IntegerField(default=0, verbose_name='上报率')),
|
||||||
|
('confirm_rate', models.IntegerField(default=0, verbose_name='确认率')),
|
||||||
|
('dept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='taskdept_dept', to='system.Organization', verbose_name='关联公司')),
|
||||||
|
('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='taskdept_task', to='supervision.Task', verbose_name='关联任务')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': '任务部门视图',
|
||||||
|
'verbose_name_plural': '任务部门视图',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Generated by Django 3.0.5 on 2021-03-30 04:00
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.utils.timezone
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('supervision', '0012_taskdept'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='taskdept',
|
||||||
|
name='create_time',
|
||||||
|
field=models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='taskdept',
|
||||||
|
name='is_deleted',
|
||||||
|
field=models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='taskdept',
|
||||||
|
name='update_time',
|
||||||
|
field=models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 3.0.5 on 2021-03-30 07:57
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('supervision', '0013_auto_20210330_1200'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='content',
|
||||||
|
name='sortnum',
|
||||||
|
field=models.IntegerField(default=1, verbose_name='排序号'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='task',
|
||||||
|
name='state',
|
||||||
|
field=models.CharField(choices=[('创建中', '创建中'), ('待发布', '待发布'), ('执行中', '执行中'), ('已关闭', '已关闭')], default='创建中', max_length=50, verbose_name='任务状态'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -11,6 +11,7 @@ class Content(CommonAModel):
|
||||||
desc = models.TextField('详情', null=True, blank=True)
|
desc = models.TextField('详情', null=True, blank=True)
|
||||||
type = models.ForeignKey(Dict, verbose_name='材料类型', on_delete= models.DO_NOTHING)
|
type = models.ForeignKey(Dict, verbose_name='材料类型', on_delete= models.DO_NOTHING)
|
||||||
can_doself = models.BooleanField('可随时主动报送', default=False)
|
can_doself = models.BooleanField('可随时主动报送', default=False)
|
||||||
|
sortnum = models.IntegerField('排序号', default=1)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = '报送清单'
|
verbose_name = '报送清单'
|
||||||
|
@ -25,7 +26,7 @@ class Task(CommonBModel):
|
||||||
('创建中', '创建中'),
|
('创建中', '创建中'),
|
||||||
('待发布', '待发布'),
|
('待发布', '待发布'),
|
||||||
('执行中', '执行中'),
|
('执行中', '执行中'),
|
||||||
('已完成', '已完成'),
|
('已关闭', '已关闭'),
|
||||||
)
|
)
|
||||||
name = models.CharField('名称', max_length=100)
|
name = models.CharField('名称', max_length=100)
|
||||||
end_date = models.DateField('截止时间', null=True, blank=True)
|
end_date = models.DateField('截止时间', null=True, blank=True)
|
||||||
|
@ -40,6 +41,16 @@ class Task(CommonBModel):
|
||||||
verbose_name_plural = verbose_name
|
verbose_name_plural = verbose_name
|
||||||
|
|
||||||
|
|
||||||
|
class TaskDept(BaseModel):
|
||||||
|
task = models.ForeignKey(Task, verbose_name='关联任务', on_delete=models.CASCADE, related_name='taskdept_task')
|
||||||
|
dept = models.ForeignKey(Organization, verbose_name='关联公司', on_delete=models.CASCADE, related_name='taskdept_dept')
|
||||||
|
up_rate = models.IntegerField('上报率', default=0)
|
||||||
|
confirm_rate = models.IntegerField('确认率', default=0)
|
||||||
|
class Meta:
|
||||||
|
verbose_name = '任务部门视图'
|
||||||
|
verbose_name_plural = verbose_name
|
||||||
|
|
||||||
|
|
||||||
class Record(CommonBModel):
|
class Record(CommonBModel):
|
||||||
"""
|
"""
|
||||||
上报记录
|
上报记录
|
||||||
|
@ -51,7 +62,9 @@ class Record(CommonBModel):
|
||||||
('已确认', '已确认'),
|
('已确认', '已确认'),
|
||||||
('待整改', '待整改')
|
('待整改', '待整改')
|
||||||
)
|
)
|
||||||
content = models.ForeignKey(Content, verbose_name='材料内容', on_delete=models.DO_NOTHING, related_name='record_content')
|
content = models.ForeignKey(Content, verbose_name='材料内容ID', on_delete=models.DO_NOTHING, related_name='record_content')
|
||||||
|
content_name = models.CharField('材料名称', max_length=100)
|
||||||
|
content_desc = models.TextField('材料详情', null=True, blank=True)
|
||||||
task = models.ForeignKey(Task, verbose_name='关联任务', null=True, blank=True, on_delete=models.SET_NULL, related_name='record_task')
|
task = models.ForeignKey(Task, verbose_name='关联任务', null=True, blank=True, on_delete=models.SET_NULL, related_name='record_task')
|
||||||
is_self = models.BooleanField('是否主动报送', default=False)
|
is_self = models.BooleanField('是否主动报送', default=False)
|
||||||
up_date = models.DateField('上报时间', null=True, blank=True)
|
up_date = models.DateField('上报时间', null=True, blank=True)
|
||||||
|
@ -59,7 +72,7 @@ class Record(CommonBModel):
|
||||||
end_date = models.DateField('截止时间', null=True, blank=True)
|
end_date = models.DateField('截止时间', null=True, blank=True)
|
||||||
state = models.CharField('记录状态', max_length=50, choices=state_choices, default='待上报')
|
state = models.CharField('记录状态', max_length=50, choices=state_choices, default='待上报')
|
||||||
is_yes = models.BooleanField('是否适用', default=True)
|
is_yes = models.BooleanField('是否适用', default=True)
|
||||||
note = models.TextField('上报备注', null=True, blank=True)
|
note = models.TextField('上报要求', null=True, blank=True)
|
||||||
noteb = models.TextField('上报说明', null=True, blank=True)
|
noteb = models.TextField('上报说明', null=True, blank=True)
|
||||||
files = models.ManyToManyField(File, verbose_name="关联文件")
|
files = models.ManyToManyField(File, verbose_name="关联文件")
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
|
@ -39,7 +39,6 @@ class TaskListSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class RecordSerializer(serializers.ModelSerializer):
|
class RecordSerializer(serializers.ModelSerializer):
|
||||||
task_ = TaskListSerializer(source='task')
|
task_ = TaskListSerializer(source='task')
|
||||||
content_=ContentListSerializer(source='content')
|
|
||||||
belong_dept_ = OrganizationSimpleSerializer(source='belong_dept', read_only=True)
|
belong_dept_ = OrganizationSimpleSerializer(source='belong_dept', read_only=True)
|
||||||
files_ = FileSimpleSerializer(source='files', many=True, read_only=True)
|
files_ = FileSimpleSerializer(source='files', many=True, read_only=True)
|
||||||
up_user_ = UserSimpleSerializer(source='up_user', read_only = True)
|
up_user_ = UserSimpleSerializer(source='up_user', read_only = True)
|
||||||
|
@ -63,3 +62,10 @@ class TaksDetailSerializer(serializers.ModelSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Task
|
model = Task
|
||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
|
|
||||||
|
class TaskDeptSerializer(serializers.ModelSerializer):
|
||||||
|
dept_ = OrganizationSimpleSerializer(source='dept', read_only=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = TaskDept
|
||||||
|
fields = '__all__'
|
|
@ -1,23 +1,25 @@
|
||||||
|
from django.conf import settings
|
||||||
|
from django.core.cache import cache
|
||||||
|
from django.db.models import Count, Q
|
||||||
|
from django.db.models.query import QuerySet
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
from django.utils import timezone
|
||||||
|
from rest_framework import status
|
||||||
|
from rest_framework.decorators import action
|
||||||
from rest_framework.mixins import ListModelMixin
|
from rest_framework.mixins import ListModelMixin
|
||||||
|
from rest_framework.response import Response
|
||||||
from rest_framework.viewsets import GenericViewSet, ModelViewSet
|
from rest_framework.viewsets import GenericViewSet, ModelViewSet
|
||||||
|
from utils.pagination import PageOrNot
|
||||||
|
|
||||||
|
from apps.system.mixins import CreateUpdateCustomMixin
|
||||||
|
from apps.system.models import Organization
|
||||||
|
from apps.system.permission import get_permission_list, has_permission
|
||||||
|
from apps.system.permission_data import RbacFilterSet
|
||||||
|
|
||||||
|
from .filters import RecordFilter
|
||||||
from .models import *
|
from .models import *
|
||||||
from .serializers import *
|
from .serializers import *
|
||||||
from rest_framework.decorators import action
|
|
||||||
from django.conf import settings
|
|
||||||
from rest_framework import status
|
|
||||||
from rest_framework.response import Response
|
|
||||||
from apps.system.models import Organization
|
|
||||||
from django.db.models import Count
|
|
||||||
from utils.pagination import PageOrNot
|
|
||||||
from apps.system.mixins import CreateUpdateCustomMixin
|
|
||||||
from apps.system.permission_data import RbacFilterSet
|
|
||||||
from django.utils import timezone
|
|
||||||
from .filters import RecordFilter
|
|
||||||
from django.db.models.query import QuerySet
|
|
||||||
from django.core.cache import cache
|
|
||||||
from apps.system.permission import get_permission_list, has_permission
|
|
||||||
from django.db.models import Q
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
class ContentViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
class ContentViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
||||||
|
@ -50,6 +52,7 @@ class TaskViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
||||||
def destroy(self, request, *args, **kwargs):
|
def destroy(self, request, *args, **kwargs):
|
||||||
instance = self.get_object()
|
instance = self.get_object()
|
||||||
instance.delete()
|
instance.delete()
|
||||||
|
TaskDept.objects.filter(task=instance).delete()
|
||||||
Record.objects.filter(task=instance).delete()
|
Record.objects.filter(task=instance).delete()
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
||||||
|
@ -63,16 +66,25 @@ class TaskViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
||||||
contents = request.data['contents']
|
contents = request.data['contents']
|
||||||
if depts and contents:
|
if depts and contents:
|
||||||
record_list = []
|
record_list = []
|
||||||
|
taskdept_list = []
|
||||||
for m in depts:
|
for m in depts:
|
||||||
|
xdata = {}
|
||||||
|
xdata['task'] = obj
|
||||||
|
xdata['dept'] = Organization.objects.get(pk=m)
|
||||||
|
taskdept_list.append(TaskDept(**xdata))
|
||||||
for n in contents:
|
for n in contents:
|
||||||
data={}
|
data={}
|
||||||
data['content'] = Content.objects.get(pk=n)
|
content = Content.objects.get(pk=n)
|
||||||
|
data['content'] = content
|
||||||
|
data['content_name'] = content.name
|
||||||
|
data['content_desc'] = content.desc
|
||||||
data['belong_dept'] = Organization.objects.get(pk=m)
|
data['belong_dept'] = Organization.objects.get(pk=m)
|
||||||
data['task'] = obj
|
data['task'] = obj
|
||||||
data['end_date'] = obj.end_date
|
data['end_date'] = obj.end_date
|
||||||
data['create_by'] = request.user
|
data['create_by'] = request.user
|
||||||
data['state'] = '待发布'
|
data['state'] = '待发布'
|
||||||
record_list.append(Record(**data))
|
record_list.append(Record(**data))
|
||||||
|
TaskDept.objects.bulk_create(taskdept_list)
|
||||||
Record.objects.bulk_create(record_list)
|
Record.objects.bulk_create(record_list)
|
||||||
obj.state = '待发布'
|
obj.state = '待发布'
|
||||||
obj.save()
|
obj.save()
|
||||||
|
@ -110,20 +122,49 @@ class TaskViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_200_OK)
|
||||||
return Response('任务状态错误', status=status.HTTP_400_BAD_REQUEST)
|
return Response('任务状态错误', status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
def cal_task_rate(task):
|
@action(methods=['get'], detail=True, perms_map = {'get':'*'})
|
||||||
|
def deptall(self, request, *args, **kwargs):
|
||||||
|
obj = self.get_object()
|
||||||
|
serializer = TaskDeptSerializer(TaskDept.objects.filter(task=obj).order_by('dept__sort'), many=True)
|
||||||
|
return Response(serializer.data)
|
||||||
|
|
||||||
|
@action(methods=['put'], detail=True, perms_map = {'put':'task_close'})
|
||||||
|
def close(self, request, *args, **kwargs):
|
||||||
|
"""
|
||||||
|
关闭任务
|
||||||
|
"""
|
||||||
|
obj = self.get_object()
|
||||||
|
if obj.state == '执行中':
|
||||||
|
obj.state = '已关闭'
|
||||||
|
obj.save()
|
||||||
|
return Response(status=status.HTTP_200_OK)
|
||||||
|
return Response('任务状态错误', status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
|
def cal_task_rate(task, dept):
|
||||||
"""
|
"""
|
||||||
计算任务上报率, 确认率
|
计算任务上报率, 确认率
|
||||||
|
传入任务及公司
|
||||||
"""
|
"""
|
||||||
objs = Record.objects.filter(task=task)
|
objs = Record.objects.filter(task=task)
|
||||||
if objs.exists():
|
# if objs.exists():
|
||||||
count = objs.count()
|
# count = objs.count()
|
||||||
up_rate = objs.filter(state__in=['已确认','已上报']).count()/count
|
# up_rate = objs.filter(state__in=['已确认','已上报']).count()/count
|
||||||
confirm_rate = objs.filter(state='已确认').count()/count
|
# confirm_rate = objs.filter(state='已确认').count()/count
|
||||||
task.up_rate = int(up_rate*100)
|
# task.up_rate = int(up_rate*100)
|
||||||
task.confirm_rate = int(confirm_rate*100)
|
# task.confirm_rate = int(confirm_rate*100)
|
||||||
if task.confirm_rate == 100:
|
# if task.confirm_rate == 100:
|
||||||
task.state ='已完成'
|
# task.state ='已完成'
|
||||||
task.save()
|
# task.save()
|
||||||
|
objs = Record.objects.filter(task=task).filter(belong_dept=dept)
|
||||||
|
count = objs.count()
|
||||||
|
up_rate = objs.filter(state__in=['已确认','已上报']).count()/count
|
||||||
|
confirm_rate = objs.filter(state='已确认').count()/count
|
||||||
|
instance = TaskDept.objects.get(task=task,dept=dept)
|
||||||
|
instance.up_rate = int(up_rate*100)
|
||||||
|
instance.confirm_rate = int(confirm_rate*100)
|
||||||
|
instance.save()
|
||||||
|
from utils.queryset import get_child_queryset2
|
||||||
|
|
||||||
|
|
||||||
class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelViewSet):
|
class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelViewSet):
|
||||||
perms_map = {'get': '*', 'post': 'record_create',
|
perms_map = {'get': '*', 'post': 'record_create',
|
||||||
|
@ -131,9 +172,33 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
|
||||||
queryset = Record.objects.all()
|
queryset = Record.objects.all()
|
||||||
serializer_class = RecordSerializer
|
serializer_class = RecordSerializer
|
||||||
search_fields = ['content__name','task__name']
|
search_fields = ['content__name','task__name']
|
||||||
ordering = ['-create_time']
|
ordering_fields = ['content__sortnum', 'belong_dept__sort']
|
||||||
|
ordering = ['content__sortnum', '-create_time']
|
||||||
filter_class = RecordFilter # 过滤类
|
filter_class = RecordFilter # 过滤类
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
queryset = self.queryset
|
||||||
|
if hasattr(self.get_serializer_class(), 'setup_eager_loading'):
|
||||||
|
queryset = self.get_serializer_class().setup_eager_loading(queryset)
|
||||||
|
if self.request.user.is_superuser:
|
||||||
|
pass
|
||||||
|
if hasattr(queryset.model, 'belong_dept'):
|
||||||
|
user = self.request.user
|
||||||
|
roles = user.roles
|
||||||
|
data_range = roles.values_list('datas', flat=True)
|
||||||
|
if '全部' in data_range:
|
||||||
|
pass
|
||||||
|
elif '本级及以下' in data_range:
|
||||||
|
belong_depts = get_child_queryset2(user.dept)
|
||||||
|
queryset = queryset.filter(belong_dept__in = belong_depts)
|
||||||
|
elif '本级' in data_range:
|
||||||
|
queryset = queryset.filter(belong_dept = user.dept)
|
||||||
|
if not self.request.query_params.get('pageoff', None):
|
||||||
|
queryset = queryset.exclude(state='待发布')
|
||||||
|
if self.request.query_params.get('only', None) == 'true':
|
||||||
|
queryset = queryset.filter(belong_dept = user.dept)
|
||||||
|
return queryset
|
||||||
|
|
||||||
@action(methods=['get'], detail=False, perms_map = {'get':'*'})
|
@action(methods=['get'], detail=False, perms_map = {'get':'*'})
|
||||||
def todos(self, request, *args, **kwargs):
|
def todos(self, request, *args, **kwargs):
|
||||||
ret={}
|
ret={}
|
||||||
|
@ -151,6 +216,13 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
|
||||||
instance.save()
|
instance.save()
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_200_OK)
|
||||||
|
|
||||||
|
@action(methods=['put'], detail=False, perms_map = {'post':'record_update'})
|
||||||
|
def updates(self, request, *args, **kwargs):
|
||||||
|
ids = request.data.get('ids')
|
||||||
|
note = request.data.get('note', None)
|
||||||
|
Record.objects.filter(pk__in=ids).update(note=note)
|
||||||
|
return Response(status=status.HTTP_200_OK)
|
||||||
|
|
||||||
@action(methods=['post'], detail=False, perms_map = {'post':'record_createself'})
|
@action(methods=['post'], detail=False, perms_map = {'post':'record_createself'})
|
||||||
def createself(self, request, *args, **kwargs):
|
def createself(self, request, *args, **kwargs):
|
||||||
contents = request.data['contents']
|
contents = request.data['contents']
|
||||||
|
@ -167,9 +239,11 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
|
||||||
上报
|
上报
|
||||||
"""
|
"""
|
||||||
obj = self.get_object()
|
obj = self.get_object()
|
||||||
|
if obj.task and obj.task.state == '已关闭':
|
||||||
|
return Response('该任务已关闭,无法上报', status=status.HTTP_400_BAD_REQUEST)
|
||||||
if obj.state in ['待整改','待上报']:
|
if obj.state in ['待整改','待上报']:
|
||||||
if 'files' in request.data and len(request.data['files'])==0:
|
if 'files' in request.data and (not request.data['files']):
|
||||||
if request.data.get('noteb', None) and request.data.get('is_yes', True):
|
if request.data.get('noteb', None) and (not request.data.get('is_yes', True)):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
return Response('请上传文件或选择不适用并填写上报说明', status=status.HTTP_400_BAD_REQUEST)
|
return Response('请上传文件或选择不适用并填写上报说明', status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
@ -182,7 +256,7 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
|
||||||
obj.up_date = timezone.now()
|
obj.up_date = timezone.now()
|
||||||
obj.save()
|
obj.save()
|
||||||
if obj.task:
|
if obj.task:
|
||||||
cal_task_rate(obj.task)
|
cal_task_rate(obj.task, obj.belong_dept)
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_200_OK)
|
||||||
return Response('记录状态错误', status=status.HTTP_400_BAD_REQUEST)
|
return Response('记录状态错误', status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
|
@ -198,7 +272,7 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
|
||||||
obj.state = '待整改'
|
obj.state = '待整改'
|
||||||
obj.save()
|
obj.save()
|
||||||
if obj.task:
|
if obj.task:
|
||||||
cal_task_rate(obj.task)
|
cal_task_rate(obj.task, obj.belong_dept)
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_200_OK)
|
||||||
else:
|
else:
|
||||||
return Response('请填写备注', status=status.HTTP_400_BAD_REQUEST)
|
return Response('请填写备注', status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
@ -214,7 +288,7 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
|
||||||
obj.state = '已确认'
|
obj.state = '已确认'
|
||||||
obj.save()
|
obj.save()
|
||||||
if obj.task:
|
if obj.task:
|
||||||
cal_task_rate(obj.task)
|
cal_task_rate(obj.task, obj.belong_dept)
|
||||||
return Response(status=status.HTTP_200_OK)
|
return Response(status=status.HTTP_200_OK)
|
||||||
return Response('记录状态错误', status=status.HTTP_400_BAD_REQUEST)
|
return Response('记录状态错误', status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.0.5 on 2021-03-30 08:34
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('system', '0008_auto_20210311_0919'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='organization',
|
||||||
|
name='can_supervision',
|
||||||
|
field=models.BooleanField(default=False, verbose_name='是否可监督'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -65,6 +65,7 @@ class Organization(SoftModel):
|
||||||
pid = models.ForeignKey('self', null=True, blank=True,
|
pid = models.ForeignKey('self', null=True, blank=True,
|
||||||
on_delete=models.SET_NULL, verbose_name='父')
|
on_delete=models.SET_NULL, verbose_name='父')
|
||||||
sort = models.IntegerField('排序', default=1)
|
sort = models.IntegerField('排序', default=1)
|
||||||
|
can_supervision = models.BooleanField('是否可监督', default=False)
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = '组织架构'
|
verbose_name = '组织架构'
|
||||||
verbose_name_plural = verbose_name
|
verbose_name_plural = verbose_name
|
||||||
|
|
|
@ -70,8 +70,7 @@ class OrganizationSerializer(serializers.ModelSerializer):
|
||||||
"""
|
"""
|
||||||
组织架构序列化
|
组织架构序列化
|
||||||
"""
|
"""
|
||||||
type = serializers.ChoiceField(
|
type = serializers.ChoiceField(choices=Organization.organization_type_choices, default='部门')
|
||||||
choices=Organization.organization_type_choices, default='部门')
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Organization
|
model = Organization
|
||||||
|
|
|
@ -198,7 +198,7 @@ class OrganizationViewSet(PageOrNot,ModelViewSet):
|
||||||
serializer_class = OrganizationSerializer
|
serializer_class = OrganizationSerializer
|
||||||
pagination_class = None
|
pagination_class = None
|
||||||
search_fields = ['name']
|
search_fields = ['name']
|
||||||
filterset_fields = ['pid','name']
|
filterset_fields = ['pid','name', 'type','can_supervision']
|
||||||
ordering_fields = ['sort']
|
ordering_fields = ['sort']
|
||||||
ordering = ['sort', 'pk']
|
ordering = ['sort', 'pk']
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue