|
@ -2,21 +2,67 @@ |
|
|
<div class="app-container"> |
|
|
<div class="app-container"> |
|
|
<!-- 头部搜索添加 --> |
|
|
<!-- 头部搜索添加 --> |
|
|
<div class="filter-container"> |
|
|
<div class="filter-container"> |
|
|
<el-select v-model="policyType" placeholder="政策类型" clearable style="width: 190px" class="filter-item"> |
|
|
<el-input |
|
|
<el-option v-for="(item,index) in typeList" :key="index" :value="index" /> |
|
|
placeholder="政策标题" |
|
|
|
|
|
style="width: 190px; margin-right: 10px" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
v-model="policyTitle" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="policyType" |
|
|
|
|
|
placeholder="政策类型" |
|
|
|
|
|
clearable |
|
|
|
|
|
style="width: 190px" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="(item, index) in typeList" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:value="index" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-select v-model="policyStatus" placeholder="审核状态" clearable class="filter-item" style="width: 190px;margin-left:10px" value="1"> |
|
|
<el-select |
|
|
<el-option v-for="(item,index) in status" :key="index" :value="index" /> |
|
|
v-model="policyStatus" |
|
|
|
|
|
placeholder="审核状态" |
|
|
|
|
|
clearable |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
style="width: 190px; margin-left: 10px" |
|
|
|
|
|
value="1" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="(item, index) in status" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:value="index" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-search" @click="Search"> |
|
|
<el-button |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
style="margin-left: 10px" |
|
|
|
|
|
type="primary" |
|
|
|
|
|
icon="el-icon-search" |
|
|
|
|
|
@click="Search" |
|
|
|
|
|
> |
|
|
搜索 |
|
|
搜索 |
|
|
</el-button> |
|
|
</el-button> |
|
|
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="policyAdd"> |
|
|
<el-button |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
style="margin-left: 10px" |
|
|
|
|
|
type="primary" |
|
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
|
@click="policyAdd" |
|
|
|
|
|
> |
|
|
添加 |
|
|
添加 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 政策信息列表 --> |
|
|
<!-- 政策信息列表 --> |
|
|
<el-table v-loading="listLoading" :data="polictList" border fit highlight-current-row style="width: 100%;"> |
|
|
<el-table |
|
|
|
|
|
v-loading="listLoading" |
|
|
|
|
|
:data="polictList" |
|
|
|
|
|
border |
|
|
|
|
|
fit |
|
|
|
|
|
highlight-current-row |
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
> |
|
|
<el-table-column label="ID" prop="id" align="center" width="80"> |
|
|
<el-table-column label="ID" prop="id" align="center" width="80"> |
|
|
<template slot-scope="{ row }"> |
|
|
<template slot-scope="{ row }"> |
|
|
<span>{{ row.id }}</span> |
|
|
<span>{{ row.id }}</span> |
|
@ -44,32 +90,64 @@ |
|
|
<!-- </span> --> |
|
|
<!-- </span> --> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="审核状态" prop="status" align="center" width="180"> |
|
|
<el-table-column |
|
|
|
|
|
label="审核状态" |
|
|
|
|
|
prop="status" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="180" |
|
|
|
|
|
> |
|
|
<template slot-scope="{ row }"> |
|
|
<template slot-scope="{ row }"> |
|
|
<!-- <span>{{ row.auditStatus }}</span> --> |
|
|
<!-- <span>{{ row.auditStatus }}</span> --> |
|
|
<el-tag v-if="row.auditStatus === 0" style="background:#FFBB77;" type="published"> |
|
|
<el-tag |
|
|
|
|
|
v-if="row.auditStatus === 0" |
|
|
|
|
|
style="background: #ffbb77" |
|
|
|
|
|
type="published" |
|
|
|
|
|
> |
|
|
刚入库 |
|
|
刚入库 |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
<el-tag v-if="row.auditStatus === 1" type="published"> |
|
|
<el-tag v-if="row.auditStatus === 1" type="published"> |
|
|
审核通过 |
|
|
审核通过 |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
<el-tag v-if="row.auditStatus === 2" style="background:#FF5151;color:white" type="draft"> |
|
|
<el-tag |
|
|
|
|
|
v-if="row.auditStatus === 2" |
|
|
|
|
|
style="background: #ff5151; color: white" |
|
|
|
|
|
type="draft" |
|
|
|
|
|
> |
|
|
审核不通过 |
|
|
审核不通过 |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width"> |
|
|
<el-table-column |
|
|
|
|
|
label="操作" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="230" |
|
|
|
|
|
class-name="small-padding fixed-width" |
|
|
|
|
|
> |
|
|
<template slot-scope="{ row }"> |
|
|
<template slot-scope="{ row }"> |
|
|
<el-button type="primary" size="mini" @click="handleUpdate(row)"> |
|
|
<el-button type="primary" size="mini" @click="handleUpdate(row)"> |
|
|
修改 |
|
|
修改 |
|
|
</el-button> |
|
|
</el-button> |
|
|
<el-button v-if="row.auditStatus === 2" size="mini" type="success" @click="handleModifyStatus(row,1)"> |
|
|
<el-button |
|
|
|
|
|
v-if="row.auditStatus === 2" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="success" |
|
|
|
|
|
@click="handleModifyStatus(row, 1)" |
|
|
|
|
|
> |
|
|
通过 |
|
|
通过 |
|
|
</el-button> |
|
|
</el-button> |
|
|
<el-button v-if="row.auditStatus === 1" size="mini" @click="handleModifyStatus(row,2)"> |
|
|
<el-button |
|
|
|
|
|
v-if="row.auditStatus === 1" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
@click="handleModifyStatus(row, 2)" |
|
|
|
|
|
> |
|
|
未通过 |
|
|
未通过 |
|
|
</el-button> |
|
|
</el-button> |
|
|
<el-button v-if="row.auditStatus === 0" size="mini" type="success" @click="handleModifyStatus(row,1)"> |
|
|
<el-button |
|
|
|
|
|
v-if="row.auditStatus === 0" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="success" |
|
|
|
|
|
@click="handleModifyStatus(row, 1)" |
|
|
|
|
|
> |
|
|
通过 |
|
|
通过 |
|
|
</el-button> |
|
|
</el-button> |
|
|
<el-button size="mini" type="danger" @click="handleDelete(row.id)"> |
|
|
<el-button size="mini" type="danger" @click="handleDelete(row.id)"> |
|
@ -79,11 +157,22 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<!-- 显示当前页数,且显示所有页数,可以跳转 --> |
|
|
<!-- 显示当前页数,且显示所有页数,可以跳转 --> |
|
|
<pagination v-show="total>0" :total="total" :page.sync="data.pageNum" :limit.sync="data.pageSize" @pagination="getList" /> |
|
|
<pagination |
|
|
|
|
|
v-show="total > 0" |
|
|
|
|
|
:total="total" |
|
|
|
|
|
:page.sync="data.pageNum" |
|
|
|
|
|
:limit.sync="data.pageSize" |
|
|
|
|
|
@pagination="getList" |
|
|
|
|
|
/> |
|
|
<!-- 修改政策界面 --> |
|
|
<!-- 修改政策界面 --> |
|
|
<el-dialog title="修改" :visible.sync="dialogFormVisible"> |
|
|
<el-dialog title="修改" :visible.sync="dialogFormVisible"> |
|
|
<el-form ref="dataForm" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;"> |
|
|
<el-form |
|
|
|
|
|
ref="dataForm" |
|
|
|
|
|
:model="temp" |
|
|
|
|
|
label-position="left" |
|
|
|
|
|
label-width="70px" |
|
|
|
|
|
style="width: 50%; margin-left: 50px" |
|
|
|
|
|
> |
|
|
<el-form-item label="政策标题" prop="title" style="width: 180%"> |
|
|
<el-form-item label="政策标题" prop="title" style="width: 180%"> |
|
|
<el-input v-model="temp.title" /> |
|
|
<el-input v-model="temp.title" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -99,7 +188,21 @@ |
|
|
<el-form-item label="原文内容" prop="content" style="width: 180%"> |
|
|
<el-form-item label="原文内容" prop="content" style="width: 180%"> |
|
|
<!-- <el-button @click="show111 = !show111">原文/编辑</el-button> --> |
|
|
<!-- <el-button @click="show111 = !show111">原文/编辑</el-button> --> |
|
|
<!-- <textarea v-if="show111 === false" style="width: 100%;height: 300px" v-text="temp.content" /> --> |
|
|
<!-- <textarea v-if="show111 === false" style="width: 100%;height: 300px" v-text="temp.content" /> --> |
|
|
<div v-if="show111 === false" contentEditable="true" style="border:1px solid #000;border-radius:10px 0 0 10px;padding: 20px;background: #F5F5F5;height: 260px;overflow-y: auto;" v-html="temp.content">'</div> |
|
|
<div |
|
|
|
|
|
v-if="show111 === false" |
|
|
|
|
|
contentEditable="true" |
|
|
|
|
|
style=" |
|
|
|
|
|
border: 1px solid #000; |
|
|
|
|
|
border-radius: 10px 0 0 10px; |
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
background: #f5f5f5; |
|
|
|
|
|
height: 260px; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
" |
|
|
|
|
|
v-html="temp.content" |
|
|
|
|
|
> |
|
|
|
|
|
' |
|
|
|
|
|
</div> |
|
|
<!-- <textarea id="content" name="content" /> --> |
|
|
<!-- <textarea id="content" name="content" /> --> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
@ -108,42 +211,74 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="政策标签" prop="intro" style="width: 180%"> |
|
|
<el-form-item label="政策标签" prop="intro" style="width: 180%"> |
|
|
<el-input /> |
|
|
<el-button @click="addLabel">添加标签</el-button> |
|
|
|
|
|
<el-input |
|
|
|
|
|
style="margin-top: 4px" |
|
|
|
|
|
v-for="(item, index) in temp.projectLabels" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
v-model="temp.projectLabels[index]" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="政策类型" prop="type"> |
|
|
<el-form-item label="政策类型" prop="type"> |
|
|
<el-select v-model="policyType1" placeholder="政策类型" clearable style="width: 190px" class="filter-item"> |
|
|
<el-select |
|
|
<el-option v-for="(item,index) in typeList" :key="index" :value="index" /> |
|
|
v-model="policyType1" |
|
|
|
|
|
placeholder="政策类型" |
|
|
|
|
|
clearable |
|
|
|
|
|
style="width: 190px" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="(item, index) in typeList" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:value="index" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="审核状态" prop="status"> |
|
|
<el-form-item label="审核状态" prop="status"> |
|
|
<el-select v-model="policyStatus1" placeholder="审核状态" clearable class="filter-item" style="width: 190px;" value="1"> |
|
|
<el-select |
|
|
<el-option v-for="(item,index) in status" :key="index" :value="index" /> |
|
|
v-model="policyStatus1" |
|
|
|
|
|
placeholder="审核状态" |
|
|
|
|
|
clearable |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
style="width: 190px" |
|
|
|
|
|
value="1" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="(item, index) in status" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:value="index" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogFormVisible = false"> |
|
|
<el-button @click="dialogFormVisible = false"> 取消 </el-button> |
|
|
取消 |
|
|
<el-button type="primary" @click="Commit"> 提交 </el-button> |
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="Commit"> |
|
|
|
|
|
提交 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<!-- 添加政策界面 --> |
|
|
<!-- 添加政策界面 --> |
|
|
<el-dialog title="修改" :visible.sync="dialogFormVisible1"> |
|
|
<el-dialog title="添加" :visible.sync="dialogFormVisible1"> |
|
|
<el-form ref="dataForm" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;"> |
|
|
<el-form |
|
|
|
|
|
ref="dataForm" |
|
|
|
|
|
:model="temp" |
|
|
|
|
|
label-position="left" |
|
|
|
|
|
label-width="70px" |
|
|
|
|
|
style="width: 50%; margin-left: 50px" |
|
|
|
|
|
> |
|
|
<el-form-item label="政策标题" prop="title" style="width: 180%"> |
|
|
<el-form-item label="政策标题" prop="title" style="width: 180%"> |
|
|
<el-input v-model="addPolicy.title" /> |
|
|
<el-input v-model="addPolicy.title" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="发布时间" prop="time" style="width: 180%"> |
|
|
<el-form-item label="发布时间" prop="time" style="width: 180%"> |
|
|
<!-- <el-input v-model="addPolicy.publishTime" placeholder="例如:2020/01/01" /> --> |
|
|
<!-- <el-input v-model="addPolicy.publishTime" placeholder="例如:2020/01/01" /> --> |
|
|
<el-date-picker id="Time" v-model="addPolicy.publishTime" type="date" placeholder="请选择时间" /> |
|
|
<el-date-picker |
|
|
|
|
|
id="Time" |
|
|
|
|
|
v-model="addPolicy.publishTime" |
|
|
|
|
|
type="date" |
|
|
|
|
|
placeholder="请选择时间" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="原文链接" prop="titleUrl" style="width: 180%"> |
|
|
<el-form-item label="原文链接" prop="titleUrl" style="width: 180%"> |
|
@ -157,22 +292,32 @@ |
|
|
<el-form-item label="原文内容" prop="content" style="width: 180%"> |
|
|
<el-form-item label="原文内容" prop="content" style="width: 180%"> |
|
|
<!-- <el-button @click="show111 = !show111">原文/编辑</el-button> --> |
|
|
<!-- <el-button @click="show111 = !show111">原文/编辑</el-button> --> |
|
|
<!-- <textarea v-if="show111 === false" style="width: 100%;height: 300px" v-text="temp.content" /> --> |
|
|
<!-- <textarea v-if="show111 === false" style="width: 100%;height: 300px" v-text="temp.content" /> --> |
|
|
<div v-if="show111 === false" id="Content" contentEditable="true" style="border:1px solid #000;border-radius:10px 0 0 10px;padding: 20px;background: #F5F5F5;height: 260px;overflow-y: auto;" v-html="addPolicy.content">'</div> |
|
|
<div |
|
|
|
|
|
v-if="show111 === false" |
|
|
|
|
|
id="Content" |
|
|
|
|
|
contentEditable="true" |
|
|
|
|
|
style=" |
|
|
|
|
|
border: 1px solid #000; |
|
|
|
|
|
border-radius: 10px 0 0 10px; |
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
background: #f5f5f5; |
|
|
|
|
|
height: 260px; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
" |
|
|
|
|
|
v-html="addPolicy.content" |
|
|
|
|
|
> |
|
|
|
|
|
' |
|
|
|
|
|
</div> |
|
|
<!-- <textarea id="content" name="content" /> --> |
|
|
<!-- <textarea id="content" name="content" /> --> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="政策简介" prop="intro" style="width: 180%"> |
|
|
<el-form-item label="政策简介" prop="intro" style="width: 180%"> |
|
|
<el-input v-model="addPolicy.intro" /> |
|
|
<el-input v-model="addPolicy.intro" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogFormVisible1 = false"> |
|
|
<el-button @click="dialogFormVisible1 = false"> 取消 </el-button> |
|
|
取消 |
|
|
<el-button type="primary" @click="CommitAdd"> 提交 </el-button> |
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="CommitAdd"> |
|
|
|
|
|
提交 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
@ -193,18 +338,20 @@ export default { |
|
|
total: 0, |
|
|
total: 0, |
|
|
listLoading: true, |
|
|
listLoading: true, |
|
|
data: { |
|
|
data: { |
|
|
|
|
|
title: '', |
|
|
auditStatus: '', |
|
|
auditStatus: '', |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
pageSize: 20, |
|
|
pageSize: 20, |
|
|
type: '' |
|
|
type: '' |
|
|
}, |
|
|
}, |
|
|
polictList: [], |
|
|
polictList: [], |
|
|
typeList: { '申报通知': 0, '公告公示': 1, '政策动态': 2, '申报指南': 3 }, |
|
|
typeList: { 申报通知: 0, 公告公示: 1, 政策动态: 2, 申报指南: 3 }, |
|
|
|
|
|
policyTitle: '', |
|
|
policyType: undefined, |
|
|
policyType: undefined, |
|
|
policyType1: undefined, |
|
|
policyType1: undefined, |
|
|
policyStatus: undefined, |
|
|
policyStatus: undefined, |
|
|
policyStatus1: undefined, |
|
|
policyStatus1: undefined, |
|
|
status: { '刚入库': 0, '审核通过': 1, '审核不通过': 2 }, |
|
|
status: { 刚入库: 0, 审核通过: 1, 审核不通过: 2 }, |
|
|
textMap: { |
|
|
textMap: { |
|
|
update: 'Edit', |
|
|
update: 'Edit', |
|
|
create: 'Create' |
|
|
create: 'Create' |
|
@ -224,9 +371,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapGetters([ |
|
|
...mapGetters(['name']) |
|
|
'name' |
|
|
|
|
|
]) |
|
|
|
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getList() |
|
|
this.getList() |
|
@ -235,10 +380,14 @@ export default { |
|
|
async Search() { |
|
|
async Search() { |
|
|
const that = this |
|
|
const that = this |
|
|
that.listLoading = true |
|
|
that.listLoading = true |
|
|
if (that.typeList[`${that.policyType}`] === undefined && that.status[`${that.policyStatus}`] === undefined) { |
|
|
that.data.title = that.policyTitle |
|
|
|
|
|
if ( |
|
|
|
|
|
that.typeList[`${that.policyType}`] === undefined && |
|
|
|
|
|
that.status[`${that.policyStatus}`] === undefined |
|
|
|
|
|
) { |
|
|
that.data.type = '' |
|
|
that.data.type = '' |
|
|
that.data.auditStatus = '' |
|
|
that.data.auditStatus = '' |
|
|
await api.PolicyDetail(this.data).then((res) => { |
|
|
await api.PolicyDetail(this.data).then(res => { |
|
|
that.polictList = res.list |
|
|
that.polictList = res.list |
|
|
that.total = res.total - 0 |
|
|
that.total = res.total - 0 |
|
|
that.listLoading = false |
|
|
that.listLoading = false |
|
@ -246,7 +395,7 @@ export default { |
|
|
} else if (that.typeList[`${that.policyType}`] === undefined) { |
|
|
} else if (that.typeList[`${that.policyType}`] === undefined) { |
|
|
that.data.type = '' |
|
|
that.data.type = '' |
|
|
that.data.auditStatus = that.status[`${that.policyStatus}`] |
|
|
that.data.auditStatus = that.status[`${that.policyStatus}`] |
|
|
await api.PolicyDetail(this.data).then((res) => { |
|
|
await api.PolicyDetail(this.data).then(res => { |
|
|
that.polictList = res.list |
|
|
that.polictList = res.list |
|
|
that.total = res.total - 0 |
|
|
that.total = res.total - 0 |
|
|
that.listLoading = false |
|
|
that.listLoading = false |
|
@ -254,7 +403,7 @@ export default { |
|
|
} else if (that.status[`${that.policyStatus}`] === undefined) { |
|
|
} else if (that.status[`${that.policyStatus}`] === undefined) { |
|
|
that.data.type = that.typeList[`${that.policyType}`] |
|
|
that.data.type = that.typeList[`${that.policyType}`] |
|
|
that.data.auditStatus = '' |
|
|
that.data.auditStatus = '' |
|
|
await api.PolicyDetail(this.data).then((res) => { |
|
|
await api.PolicyDetail(this.data).then(res => { |
|
|
that.polictList = res.list |
|
|
that.polictList = res.list |
|
|
that.total = res.total - 0 |
|
|
that.total = res.total - 0 |
|
|
that.listLoading = false |
|
|
that.listLoading = false |
|
@ -263,8 +412,7 @@ export default { |
|
|
that.data.pageNum = 1 |
|
|
that.data.pageNum = 1 |
|
|
that.data.type = that.typeList[`${that.policyType}`] |
|
|
that.data.type = that.typeList[`${that.policyType}`] |
|
|
that.data.auditStatus = that.status[`${that.policyStatus}`] |
|
|
that.data.auditStatus = that.status[`${that.policyStatus}`] |
|
|
|
|
|
await api.PolicyDetail(that.data).then(res => { |
|
|
await api.PolicyDetail(this.data).then((res) => { |
|
|
|
|
|
that.polictList = res.list |
|
|
that.polictList = res.list |
|
|
that.total = res.total - 0 |
|
|
that.total = res.total - 0 |
|
|
that.listLoading = false |
|
|
that.listLoading = false |
|
@ -274,7 +422,8 @@ export default { |
|
|
async getList() { |
|
|
async getList() { |
|
|
const that = this |
|
|
const that = this |
|
|
that.listLoading = true |
|
|
that.listLoading = true |
|
|
await api.PolicyDetail(that.data).then((res) => { |
|
|
await api.PolicyDetail(that.data).then(res => { |
|
|
|
|
|
console.log(that.data) |
|
|
that.polictList = res.list |
|
|
that.polictList = res.list |
|
|
that.total = res.total - 0 |
|
|
that.total = res.total - 0 |
|
|
|
|
|
|
|
@ -307,7 +456,13 @@ export default { |
|
|
const that = this |
|
|
const that = this |
|
|
that.temp.type = that.typeList[`${that.policyType1}`] |
|
|
that.temp.type = that.typeList[`${that.policyType1}`] |
|
|
that.temp.auditStatus = that.status[`${that.policyStatus1}`] |
|
|
that.temp.auditStatus = that.status[`${that.policyStatus1}`] |
|
|
await api.PolicyUpdate(that.temp).then((res) => { |
|
|
for (let i = 0; i < that.temp.projectLabels.length; i++) { |
|
|
|
|
|
if (that.temp.projectLabels[i] === '') { |
|
|
|
|
|
that.temp.projectLabels.splice(i, 1) |
|
|
|
|
|
i -= 1 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
await api.PolicyUpdate(that.temp).then(res => { |
|
|
this.getList() |
|
|
this.getList() |
|
|
that.dialogFormVisible = false |
|
|
that.dialogFormVisible = false |
|
|
}) |
|
|
}) |
|
@ -315,12 +470,12 @@ export default { |
|
|
async handleModifyStatus(detail, num) { |
|
|
async handleModifyStatus(detail, num) { |
|
|
this.listLoading = true |
|
|
this.listLoading = true |
|
|
detail.auditStatus = num |
|
|
detail.auditStatus = num |
|
|
await api.PolicyUpdate(detail).then((res) => { |
|
|
await api.PolicyUpdate(detail).then(res => { |
|
|
this.listLoading = false |
|
|
this.listLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
async handleDelete(id) { |
|
|
async handleDelete(id) { |
|
|
await api.PolicyDelete(id).then((res) => { |
|
|
await api.PolicyDelete(id).then(res => { |
|
|
this.getList() |
|
|
this.getList() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@ -345,9 +500,13 @@ export default { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
api.PolicyAdd(that.addPolicy).then((res) => { |
|
|
api.PolicyAdd(that.addPolicy).then(res => { |
|
|
that.dialogFormVisible1 = false |
|
|
that.dialogFormVisible1 = false |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
addLabel() { |
|
|
|
|
|
this.temp.projectLabels = this.temp.projectLabels.concat(['']) |
|
|
|
|
|
console.log(this.temp.projectLabels) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|