|
|
|
@ -4,14 +4,14 @@
|
|
|
|
|
<header id="L-header">
|
|
|
|
|
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline" ref="queryFrom">
|
|
|
|
|
<el-col :span="22">
|
|
|
|
|
<el-form-item label="政策文件名称:" prop="policyName">
|
|
|
|
|
<el-input v-model.trim="formInline.policyName" placeholder="请输入内容"></el-input>
|
|
|
|
|
<el-form-item label="政策文件:" prop="name">
|
|
|
|
|
<el-input v-model.trim="formInline.name" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="发文单位:" prop="dispatchUnit">
|
|
|
|
|
<el-input v-model.trim="formInline.dispatchUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
<el-form-item label="发文单位:" prop="enterUnit">
|
|
|
|
|
<el-input v-model.trim="formInline.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="政策等级:" prop="level">
|
|
|
|
|
<el-select class="ignoreElement" v-model="formInline.level" placeholder="请选择">
|
|
|
|
|
<el-form-item label="政策等级:" prop="policyLevel">
|
|
|
|
|
<el-select class="ignoreElement" v-model="formInline.policyLevel" placeholder="请选择">
|
|
|
|
|
<!-- <el-option
|
|
|
|
|
v-for="dict in dict.type.jjh_project_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -28,7 +28,7 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="发文时间:" prop="projectYear">
|
|
|
|
|
<!-- <el-form-item label="发文时间:" prop="projectYear">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
class="ignoreElement"
|
|
|
|
|
v-model="formInline.projectYear"
|
|
|
|
@ -37,29 +37,37 @@
|
|
|
|
|
type="daterange"
|
|
|
|
|
placeholder="选择发文时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button size="mini" @click="resetQuery('queryFrom')">重置</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')">查询</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-shangchuan" size="mini" @click="importBtn">新增发文</el-button>
|
|
|
|
|
<!-- <el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-shangchuan" size="mini" @click="importBtn">新增发文</el-button> -->
|
|
|
|
|
<el-button type="primary" class="import-btn" icon="el-icon-plus" size="mini" @click="importBtn">新增发文</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-form>
|
|
|
|
|
</header>
|
|
|
|
|
<section>
|
|
|
|
|
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" :height="tabHeader" :max-height="tabHeader">
|
|
|
|
|
<el-table-column label="政策文件名称" width="450px" prop="projectClassify" />
|
|
|
|
|
<el-table-column label="关联项目" prop="projectName" />
|
|
|
|
|
<el-table-column label="发文单位" prop="declareUnit" />
|
|
|
|
|
<el-table-column label="政策等级" prop="projectYear" />
|
|
|
|
|
<el-table-column label="发文时间" prop="projectYear" />
|
|
|
|
|
<el-table-column label="上传用户" prop="projectYear" />
|
|
|
|
|
<el-table-column label="上传时间" prop="projectYear" />
|
|
|
|
|
<el-table-column label="操作" prop="userId" class-name="table-operation">
|
|
|
|
|
<el-table-column label="政策文件名称" width="500px" prop="name" />
|
|
|
|
|
<el-table-column label="关联项目" width="450px" prop="joinProject">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div class="project-name" @click="goToProject(scope.row.joinProject)">
|
|
|
|
|
<dict-tag :options="dict.type.jjh_project_type" :value="scope.row.joinProject"/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="发文单位" prop="enterUnit" />
|
|
|
|
|
<el-table-column label="政策等级" prop="policyLevel" />
|
|
|
|
|
<el-table-column label="发文时间" prop="enterTime" />
|
|
|
|
|
<el-table-column label="上传用户" prop="createBy" />
|
|
|
|
|
<el-table-column label="上传时间" prop="createTime" width="180px" />
|
|
|
|
|
<el-table-column label="操作" prop="userId" class-name="table-operation" width="180px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span class="look-info" @click="goInfo(scope.row)">查看详情</span>
|
|
|
|
|
<span class="edit-info" @click="editInfo(scope.row)">编辑</span>
|
|
|
|
|
<span class="del-info" @click="delInfo(scope.row)">删除</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -74,11 +82,12 @@
|
|
|
|
|
></my-pagination>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
<my-dialog title="title" @close="importClose" ref="importProject">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form :model="addFrom" size="small" ref="importFrom" label-width="100px" :rules="rules">
|
|
|
|
|
<el-form-item label="政策文件名称:" class="importFormItem" prop="projectClassify">
|
|
|
|
|
<my-dialog :title="title" @close="importClose" @confirm="confirm" ref="importProject" closeText="关闭" :myclass="true">
|
|
|
|
|
<el-form :model="addFrom" size="small" ref="importFrom" label-width="120px" :rules="rules" class="newArticle">
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="政策文件名称:" class="importFormItem" prop="name">
|
|
|
|
|
<el-input v-model.trim="addFrom.name" placeholder="请输入内容"></el-input>
|
|
|
|
|
<!-- <el-select class="ignoreElement" v-model="addFrom.projectClassify" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.jjh_project_type"
|
|
|
|
@ -88,17 +97,88 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="政策等级:" class="importFormItem" prop="policyLevel">
|
|
|
|
|
<el-input v-model.trim="addFrom.policyLevel" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="发文单位:" class="importFormItem" prop="enterUnit">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="发文时间:" class="importFormItem" prop="enterTime">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="addFrom.enterTime"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
type="date"
|
|
|
|
|
placeholder="选择发文时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="关联项目:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-select v-model="addFrom.joinProject" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.jjh_project_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="发文内容:" class="importFormItem" prop="enterContent">
|
|
|
|
|
<Editor :height="200" v-model="addFrom.enterContent"></Editor>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</my-dialog>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="查看详情"
|
|
|
|
|
:visible.sync="infoVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
@close="infoVisible = false"
|
|
|
|
|
custom-class="info-dialog"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<div class="info-content">
|
|
|
|
|
<div class="info-title">{{ addFrom.name }}</div>
|
|
|
|
|
<div class="info-content-top">
|
|
|
|
|
<div>发布人:{{ addFrom.createBy }}</div>
|
|
|
|
|
<div>发布时间:{{ addFrom.enterTime }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-html="addFrom.enterContent" class="info-content-content"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-form size="small">
|
|
|
|
|
<el-form-item class="dialog-from-item">
|
|
|
|
|
<el-button size="mini" @click="infoVisible = false">关闭</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import myPagination from "@/views/components/Pagination/index.vue"
|
|
|
|
|
import myDialog from "@/views/components/myDialog/index.vue"
|
|
|
|
|
import { getJPolicyFile, jPolicyFileNew, jPolicyFileChange, jPolicyFileId, jPolicyFileDel } from "@/api/jin_ji_hu/policyDocument"
|
|
|
|
|
export default {
|
|
|
|
|
components:{myPagination, myDialog},
|
|
|
|
|
dicts: ['jjh_project_type'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
total:0,
|
|
|
|
@ -108,24 +188,55 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
loading:false,
|
|
|
|
|
formInline: {
|
|
|
|
|
policyName: '',
|
|
|
|
|
dispatchUnit:"",
|
|
|
|
|
level:"",
|
|
|
|
|
projectYear:"",
|
|
|
|
|
status: ''
|
|
|
|
|
name: '',
|
|
|
|
|
enterUnit:"",
|
|
|
|
|
policyLevel:"",
|
|
|
|
|
},
|
|
|
|
|
tableData:[],
|
|
|
|
|
tableData:[
|
|
|
|
|
{
|
|
|
|
|
projectName:"苏财建[2021]101号 关于下达2021年江苏省级现代服务业发展 专项资金(现代服务业项目)的通知",
|
|
|
|
|
project:"全方位生物大分子药定制研发生产(CDMO)服务平台",
|
|
|
|
|
unit:"苏财政",
|
|
|
|
|
grade:"市级",
|
|
|
|
|
issueTime:"2023-03-19",
|
|
|
|
|
user:"张珊",
|
|
|
|
|
uploadingTime:"2023-05-11 14:00",
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
tabHeader: undefined,
|
|
|
|
|
addFrom: {
|
|
|
|
|
projectClassify:""
|
|
|
|
|
}
|
|
|
|
|
name:"",
|
|
|
|
|
joinProject:"",
|
|
|
|
|
enterUnit:"",
|
|
|
|
|
policyLevel:"",
|
|
|
|
|
enterTime:"",
|
|
|
|
|
},
|
|
|
|
|
rules:{
|
|
|
|
|
name:[
|
|
|
|
|
{ required: true, message: '请填写政策文件名称', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
joinProject:[
|
|
|
|
|
{ required: true, message: '请填写政策等级', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
enterUnit:[
|
|
|
|
|
{ required: true, message: '请填写发文单位', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
policyLevel:[
|
|
|
|
|
{ required: true, message: '请选择发文时间', trigger: 'change' }
|
|
|
|
|
],
|
|
|
|
|
enterTime:[
|
|
|
|
|
{ required: true, message: '请选择关联项目', trigger: 'change' }
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
title:"新增发文",
|
|
|
|
|
infoVisible:false,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
|
|
|
|
|
// this.getList();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
@ -134,7 +245,7 @@ export default {
|
|
|
|
|
// 列表获取
|
|
|
|
|
getList(){
|
|
|
|
|
this.loading = true;
|
|
|
|
|
jProject(this.pagination).then(res=>{
|
|
|
|
|
getJPolicyFile(this.pagination).then(res=>{
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
this.tableData = res.data.records;
|
|
|
|
@ -164,7 +275,7 @@ export default {
|
|
|
|
|
current: 1,
|
|
|
|
|
size: 10
|
|
|
|
|
}
|
|
|
|
|
// this.getList();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
// 修改table背景色
|
|
|
|
|
tableRowClassName({row, rowIndex}){
|
|
|
|
@ -175,22 +286,76 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 导入按钮
|
|
|
|
|
importBtn(){
|
|
|
|
|
this.title = "新增发文";
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
|
},
|
|
|
|
|
// 关闭事件触发
|
|
|
|
|
importClose(){
|
|
|
|
|
this.$refs.importProject.close();
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.$refs.importFrom.resetFields();
|
|
|
|
|
this.$refs.importProject.close();
|
|
|
|
|
this.addFrom = {
|
|
|
|
|
name:"",
|
|
|
|
|
joinProject:"",
|
|
|
|
|
enterUnit:"",
|
|
|
|
|
policyLevel:"",
|
|
|
|
|
enterTime:"",
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 查看详情
|
|
|
|
|
goInfo(rwo){
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: '/project/projectInfo',
|
|
|
|
|
query: { userId: rwo.id }
|
|
|
|
|
goInfo(row){
|
|
|
|
|
jPolicyFileId(row.id).then((res=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.addFrom = res.data;
|
|
|
|
|
this.infoVisible = true;
|
|
|
|
|
}
|
|
|
|
|
}))
|
|
|
|
|
},
|
|
|
|
|
// 编辑
|
|
|
|
|
editInfo(row){
|
|
|
|
|
jPolicyFileId(row.id).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.addFrom = res.data;
|
|
|
|
|
this.addFrom.joinProject = this.addFrom.joinProject + ''
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 新增发文
|
|
|
|
|
confirm(){
|
|
|
|
|
this.$refs.importFrom.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// console.log(this.addFrom);
|
|
|
|
|
let id = this.addFrom.id ? this.addFrom.id : null;
|
|
|
|
|
if(id) {
|
|
|
|
|
jPolicyFileChange(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "修改成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
jPolicyFileNew(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "新增成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 删除
|
|
|
|
|
delInfo(row){
|
|
|
|
|
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
|
@ -214,6 +379,13 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 去往项目库搜索
|
|
|
|
|
goToProject(id){
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
path: '/project/index',
|
|
|
|
|
query: { projectId: id }
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 屏幕尺寸变化
|
|
|
|
|
cancalDebounce(){
|
|
|
|
|
const element = document.getElementById('L-size-main'); // 通过元素的 ID 获取元素
|
|
|
|
@ -228,5 +400,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
|
|
::v-deep .info-dialog {
|
|
|
|
|
margin-top: 15vh !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|