nengli
This commit is contained in:
parent
7c5b7ba323
commit
ca09ec39a9
|
@ -0,0 +1,113 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
|
||||
|
||||
|
||||
export function getContentList(query) {
|
||||
return request({
|
||||
url: '/ability/content/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getContent(id) {
|
||||
return request({
|
||||
url: `/ability/content/${id}/`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function createContent(data) {
|
||||
return request({
|
||||
url: '/ability/content/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateContent(id, data) {
|
||||
return request({
|
||||
url: `/ability/content/${id}/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteContent(id, data) {
|
||||
return request({
|
||||
url: `/ability/content/${id}/`,
|
||||
method: 'delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getRecordList(query) {
|
||||
return request({
|
||||
url: '/ability/record/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getRecord(id) {
|
||||
return request({
|
||||
url: `/ability/record/${id}/`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmRecord(id, data) {
|
||||
return request({
|
||||
url: `/ability/record/${id}/confirm/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateRecord(id, data) {
|
||||
return request({
|
||||
url: `/ability/record/${id}/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateRecords(data) {
|
||||
return request({
|
||||
url: '/ability/record/updates/',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function upRecord(id, data) {
|
||||
return request({
|
||||
url: `/ability/record/${id}/up/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function rejectRecord(id, data) {
|
||||
return request({
|
||||
url: `/ability/record/${id}/reject/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function deleteRecord(id) {
|
||||
return request({
|
||||
url: `/ability/record/${id}/`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
export function createRecord(data) {
|
||||
return request({
|
||||
url: `/ability/record/`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
|
@ -113,13 +113,26 @@ export const asyncRoutes = [
|
|||
name: 'correct',
|
||||
component: () => import('@/views/ability/correct'),
|
||||
meta: { title: '校准/检定能力', perms: ['correct_view'] }
|
||||
}
|
||||
,
|
||||
} ,
|
||||
{
|
||||
path: 'content',
|
||||
name: 'Content',
|
||||
component: () => import('@/views/ability/content.vue'),
|
||||
meta: { title: '资质能力报送清单', perms: ['content'] }
|
||||
},
|
||||
|
||||
{
|
||||
path: 'records',
|
||||
name: 'Records',
|
||||
component: () => import('@/views/ability/records.vue'),
|
||||
meta: { title: '资质能力报送任务', perms: ['record_view'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'recordselect',
|
||||
name: 'Recordselect',
|
||||
component: () => import('@/views/ability/recordselect.vue'),
|
||||
meta: { title: '资质能力报送查询', perms: ['record_view'] }
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
@ -0,0 +1,297 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAddContent"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 10px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="contentList"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详情">
|
||||
<template slot-scope="scope">{{ scope.row.desc }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="材料类型">
|
||||
<template slot-scope="scope">{{ scope.row.type_ }}</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>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="模板">
|
||||
<template slot-scope="scope" v-if="scope.row.template">
|
||||
<el-link :href="scope.row.template" type="primary">下载</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序号">
|
||||
<template slot-scope="scope">{{ scope.row.sortnum }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="200px"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="!checkPermission(['content'])"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope)"
|
||||
/>
|
||||
<el-button
|
||||
:disabled="!checkPermission(['content'])"
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogType === 'edit' ? '编辑资料' : '新增资料'"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="Content"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="Content.name" placeholder="名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料类型" prop="type">
|
||||
<el-cascader
|
||||
v-model="Content.type"
|
||||
:options="typeOptions"
|
||||
:props="{ emitPath: false }"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="详情" prop="desc">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
v-model="Content.desc"
|
||||
placeholder="详情"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板" prop="template" v-if="dialogVisible">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:action="upUrl"
|
||||
:on-preview="handlePreview"
|
||||
:on-success="handleUpSuccess"
|
||||
:on-remove="handleRemove"
|
||||
:headers="upHeaders"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
||||
>
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number
|
||||
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>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getContentList,
|
||||
createContent,
|
||||
deleteContent,
|
||||
updateContent,
|
||||
} from "@/api/ability";
|
||||
import { genTree } from "@/utils";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { getDictList, getDictTypeList } from "@/api/dict";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
const defaultContent = {
|
||||
name: "",
|
||||
desc: "",
|
||||
sortnum:1,
|
||||
type: null,
|
||||
can_doself: false,
|
||||
template: null
|
||||
};
|
||||
export default {
|
||||
components: { Pagination, Treeselect },
|
||||
data() {
|
||||
return {
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList:[],
|
||||
Content: defaultContent,
|
||||
contentList: [],
|
||||
typeOptions: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||
},
|
||||
filterOrgText: "",
|
||||
treeLoding: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
filterOrgText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getTypeAll();
|
||||
},
|
||||
methods: {
|
||||
handlePreview(file) {
|
||||
if ("url" in file) {
|
||||
window.open(file.url);
|
||||
} else {
|
||||
window.open(file.response.data.path);
|
||||
}
|
||||
},
|
||||
handleUpSuccess(res, file, filelist) {
|
||||
this.Content.template = res.data.path;
|
||||
},
|
||||
handleRemove(file, filelist){
|
||||
this.Content.template = null;
|
||||
},
|
||||
checkPermission,
|
||||
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
getContentList().then((response) => {
|
||||
if (response.data) {
|
||||
this.contentList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
getTypeAll() {
|
||||
getDictList({ type__code: "data_type" }).then((res) => {
|
||||
this.typeOptions = genTree(res.data);
|
||||
});
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleAddContent() {
|
||||
this.Content = Object.assign({}, defaultContent);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.fileList=[]
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleEdit(scope) {
|
||||
this.Content = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "edit";
|
||||
this.dialogVisible = true;
|
||||
if (this.Content.template) {
|
||||
this.fileList = [
|
||||
{
|
||||
name:'清单模板',
|
||||
url: this.Content.template,
|
||||
},
|
||||
];
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteContent(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateContent(this.Content.id, this.Content).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createContent(this.Content).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="6">
|
||||
<el-col :span="8">
|
||||
<el-col :span="11">
|
||||
<el-card>
|
||||
|
||||
|
||||
|
@ -36,24 +36,29 @@
|
|||
<el-link :href="scope.row.template" type="primary">下载</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleAddrecordTable(scope)">上报</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="13">
|
||||
<el-card >
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAddrecordTable"
|
||||
>新增</el-button
|
||||
>
|
||||
|
||||
|
||||
<el-table
|
||||
style="margin-top:4px"
|
||||
:data="TableList.results"
|
||||
border
|
||||
fit
|
||||
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
max-height="700"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column align="center" label="上报说明">
|
||||
|
@ -108,7 +113,17 @@
|
|||
@click="handleRecord(scope)"
|
||||
>确认</el-link
|
||||
>
|
||||
|
||||
<el-link
|
||||
v-if="
|
||||
scope.row.state == '已报送' &&
|
||||
checkPermission(['record_reject']) &&
|
||||
scope.row.belong_dept != $store.state.user.dept
|
||||
"
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleRecord1(scope)"
|
||||
>驳回</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="checkPermission(['record_delete'])"
|
||||
type="danger"
|
||||
|
@ -189,6 +204,58 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisibles"
|
||||
|
||||
>
|
||||
<el-form
|
||||
ref="Forms"
|
||||
:model="recordTable"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
|
||||
>
|
||||
|
||||
<el-form-item label="上报说明" prop="noteb">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
v-model="recordTable.noteb"
|
||||
placeholder="详情"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改意见" prop="opinion">
|
||||
|
||||
<el-input
|
||||
v-model="recordTable.opinion"
|
||||
placeholder=""
|
||||
type="textarea"
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<div
|
||||
v-for="(item, index) in fileList"
|
||||
v-bind:key="item.id"
|
||||
style="margin-top: 2px;"
|
||||
>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
@click="deleteFile(index)"
|
||||
style="color: red;display:none"
|
||||
></i>
|
||||
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||
item.name
|
||||
}}</el-link>
|
||||
</div>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisibles = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmbh('Forms')">驳回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -197,8 +264,8 @@ import { getRecordList, createRecord, updateRecord,
|
|||
upRecord,
|
||||
rejectRecord,
|
||||
confirmRecord,
|
||||
deleteRecord, } from "@/api/record";
|
||||
import { getContentList } from "@/api/content";
|
||||
deleteRecord, } from "@/api/ability";
|
||||
import { getContentList } from "@/api/ability";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
|
@ -214,11 +281,12 @@ export default {
|
|||
contentOptions: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogVisibles:false,
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList: [],
|
||||
recordTable:defaultContent,
|
||||
TableList: [],
|
||||
TableList:{count: 0},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
|
@ -264,7 +332,7 @@ export default {
|
|||
recorclickRow(row) {
|
||||
this.listQuery.is_self= true;
|
||||
this.listQuery.content= row.id;
|
||||
this.content = row.id;
|
||||
|
||||
|
||||
getRecordList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
|
@ -326,13 +394,9 @@ export default {
|
|||
|
||||
|
||||
|
||||
handleAddrecordTable() {
|
||||
if(this.content==null)
|
||||
{
|
||||
alert("请选择清单!");
|
||||
handleAddrecordTable(scope) {
|
||||
this.content = scope.row.id;
|
||||
|
||||
}
|
||||
else{
|
||||
this.recordTable = Object.assign({}, defaultContent);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
|
@ -341,7 +405,7 @@ export default {
|
|||
});
|
||||
this.initList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
handleEdit(scope) {
|
||||
|
@ -375,7 +439,24 @@ export default {
|
|||
})
|
||||
}
|
||||
,
|
||||
//驳回
|
||||
handleRecord1(scope){
|
||||
this.recordTable = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogVisibles = true;
|
||||
this.initList();
|
||||
|
||||
}
|
||||
,
|
||||
//驳回提交
|
||||
confirmbh(forms){
|
||||
this.recordTable.content=this.content;
|
||||
rejectRecord(this.recordTable.id, this.recordTable).then((res) => {
|
||||
this.$message.success("成功");
|
||||
this.$emit("handleDo",true);
|
||||
});
|
||||
this.dialogVisibles = false;
|
||||
this.getrecordlist()
|
||||
},
|
||||
handleRecord2(scope){
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
type: "error",
|
||||
|
|
|
@ -0,0 +1,268 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-input
|
||||
v-model="listQuery.search"
|
||||
placeholder="任务名/材料名"
|
||||
style="width: 140px"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
|
||||
<el-select
|
||||
v-model="listQuery.state"
|
||||
placeholder="记录状态"
|
||||
clearable
|
||||
style="width: 140px"
|
||||
@change="handleFilter"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stateOptions"
|
||||
:key="item.key"
|
||||
:label="item.name"
|
||||
:value="item.key"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
v-model="listQuery.belong_dept"
|
||||
placeholder="报送部门"
|
||||
clearable
|
||||
@change="handleFilter"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orgData"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleFilter"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="resetFilter"
|
||||
>重置</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-card style="margin-top: 10px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="recordList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
@sort-change="changeTableSort"
|
||||
:span-method="objectSpanMethod"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
||||
<el-table-column
|
||||
label="材料名称"
|
||||
sortable="custom"
|
||||
prop="content__sortnum"
|
||||
>
|
||||
<template slot-scope="scope" v-if="scope.row.content_name">{{ scope.row.content_name }}</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" v-if="scope.row.noteb">{{ scope.row.noteb }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="报送单位"
|
||||
sortable="custom"
|
||||
prop="belong_dept__sort"
|
||||
>
|
||||
<template slot-scope="scope" v-if="scope.row.belong_dept_">{{
|
||||
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.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>
|
||||
<pagination
|
||||
v-show="recordList.count > 0"
|
||||
:total="recordList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
.el-transfer-panel {
|
||||
width: 470px;
|
||||
}
|
||||
.el-transfer__buttons {
|
||||
padding: 0 2px;
|
||||
.el-button {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { getOrgList, getSubOrgList } from "@/api/org";
|
||||
import { getRecordList } from "@/api/ability";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultrecord = {
|
||||
name: "",
|
||||
};
|
||||
export default {
|
||||
components: { Pagination},
|
||||
data() {
|
||||
return {
|
||||
record: defaultrecord,
|
||||
recordList: {
|
||||
count: 0,
|
||||
},
|
||||
|
||||
can_doself: true,
|
||||
stateOptions: [
|
||||
|
||||
{ key: "已报送", name: "已报送" },
|
||||
{ key: "已确认", name: "已确认" },
|
||||
{ key: "待整改", name: "待整改" },
|
||||
],
|
||||
|
||||
pickerOptions2: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
belong_dept: this.$store.state.user.dept
|
||||
},
|
||||
listLoading: false,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getState();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getState() {
|
||||
if(this.checkPermission(["record_confirm"])){
|
||||
this.listQuery = {
|
||||
page:1,
|
||||
page_size:20
|
||||
}
|
||||
}
|
||||
if (this.$route.params.state) {
|
||||
this.listQuery.state = this.$route.params.state;
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
|
||||
getRecordList(this.listQuery).then((response) => {
|
||||
this.recordList = response.data;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
belong_dept: this.$store.state.user.dept
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -279,6 +279,7 @@ export default {
|
|||
}
|
||||
},
|
||||
getList() {
|
||||
|
||||
getRecordList(this.listQuery).then((response) => {
|
||||
this.recordList = response.data;
|
||||
});
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
>重置</el-button
|
||||
>
|
||||
</div>
|
||||
<!--- <div style="margin-top: 10px">
|
||||
<div style="margin-top: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="centerDialogVisible = true"
|
||||
|
@ -88,7 +88,7 @@
|
|||
<el-button type="primary" @click="contentup()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>--->
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 10px">
|
||||
<el-table
|
||||
|
@ -116,7 +116,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务截止时间">
|
||||
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.end_date">{{ scope.row.end_date }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
|
@ -124,10 +124,10 @@
|
|||
sortable="custom"
|
||||
prop="content__sortnum"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.content_name }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.content_name">{{ scope.row.content_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报送要求/备注">
|
||||
<template slot-scope="scope">{{ scope.row.note }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.note">{{ scope.row.note }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否适用">
|
||||
<template slot-scope="scope">
|
||||
|
@ -141,14 +141,14 @@
|
|||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="报送说明">
|
||||
<template slot-scope="scope">{{ scope.row.noteb }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.noteb">{{ scope.row.noteb }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="报送单位"
|
||||
sortable="custom"
|
||||
prop="belong_dept__sort"
|
||||
>
|
||||
<template slot-scope="scope">{{
|
||||
<template slot-scope="scope" v-if="scope.row.belong_dept_">{{
|
||||
scope.row.belong_dept_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
@ -395,7 +395,7 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.listQuery.is_self=false;
|
||||
|
||||
getRecordList(this.listQuery).then((response) => {
|
||||
this.recordList = response.data;
|
||||
});
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<el-input v-model="record.note" placeholder="" type="textarea" v-else>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="执行组织">
|
||||
<el-form-item label="执行组织" v-if="record.belong_dept_">
|
||||
{{ record.belong_dept_.name }}
|
||||
</el-form-item>
|
||||
<el-form-item label="报送人" v-if="record.up_user_">
|
||||
|
|
Loading…
Reference in New Issue