重构国内外政策

This commit is contained in:
zyn
2023-09-19 17:16:53 +08:00
parent c394f1947b
commit 4110f15825
12 changed files with 3705 additions and 5 deletions
+5 -5
View File
@@ -229,11 +229,11 @@
path: '/nationalPolicy',
menuId: '6557e9c4ce672af71be5807052da126b'
},
// {
// title: '国内外政策',
// path: '/Policy',
// menuId: '6557e9c4ce672af71be5807052da126b'
// },
{
title: '国内外政策',
path: '/Policy',
menuId: '6557e9c4ce672af71be5807052da126b'
},
{
title: '标准跟踪清单',
path: '/standardTrackingList',
@@ -0,0 +1,185 @@
<template>
<!-- 新增体系 -->
<el-drawer
:wrapperClosable="false"
:title="productTitle"
:visible.sync="productModal"
size="800px"
:before-close="closeDrawer"
label-width="130px"
>
<div class="demo-drawer-content">
<el-form :model="productModelAdd"
ref="productModelAdd"
:rules="productRules"
class="label-input-form"
label-width="130px">
<el-row>
<el-col>
<el-form-item label="菜单名称" prop="menuName" class="add-form-item">
<el-input v-model.trim="productModelAdd.menuName" placeholder="请输入菜单名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="排序号" prop="displaySeq" class="add-form-item">
<el-input v-model.number="productModelAdd.displaySeq"
number
placeholder="请输入排序号"
:maxlength="4"
clearable></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item v-if="modalType === 2" label="上级菜单" prop="parentIdsName" class="add-form-item">
<el-input v-model="productModelAdd.parentIdsName" disabled
clearable></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="描述" prop="remarks" class="add-form-item">
<el-input v-model.trim="productModelAdd.remarks"
placeholder="请输入描述"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="saveProduct('productModelAdd')">提交</el-button>
<el-button
class="common-button-default"
icon="el-icon-close"
@click="closeDrawer">取消</el-button>
</div>
</el-drawer>
</template>
<script>
export default {
name: "addStructure",
data(){
return {
productTitle: '', // 模态框标题
productModal: false, // 模态框是否打开
modalType: '',
productModelAdd: {
id : "",
sorDivide : "FOREIGN_LAWS",
menuName : "",
parentId : null,
parentIds : null,
parentIdsName : "",
displaySeq : "",
creationTime : "",
modifyTime : "",
remarks : "",
children : [],
},
productRules: {
menuName: [
{required: true, message: '一级菜单不能为空', trigger: 'blur'},
{type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'}
],
displaySeq: [
{type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'},
{type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'}
],
remarks: [
{type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'}
],
},
}
},
methods: {
append(data) {
this.modalType = 1
this.selectChildMenu(data)
this.productModal = true
this.productTitle = '新增体系'
this.productModelAdd.dicTypeCode = ''
},
update(data) {
this.modalType = 2
this.selectChildMenu(data)
this.productModal = true
this.productTitle = '编辑体系'
},
// 查询二级菜单
selectChildMenu (row) {
this.$http.get('sarResource/ts-resource/getMenuById', {
menuId: row.id
}, {}, res => {
if (res.ok) {
if(this.modalType === 1){
let idsName = ""
if (row.parentIds !== null) {
if (row.parentIds.indexOf(res.data.id) != -1) {
this.productModelAdd.parentIds = row.parentIds
} else {
if(row.parentIds && row.parentIds.substr(-1,1) === ','){
this.productModelAdd.parentIds = row.parentIds + res.data.id+','
idsName = row.parentIdsName + ',' + res.data.menuName
}else {
this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id+','
idsName = row.parentIdsName + ',' + res.data.menuName
}
}
} else {
this.productModelAdd.parentIds = ','+res.data.id+','
idsName = res.data.menuName;
}
this.productModelAdd.parentId = res.data.id
this.productModelAdd.parentIdsName = idsName
this.$forceUpdate()
}else {
this.productModelAdd = res.data
}
}
})
},
// 提交新增/修改
saveProduct (name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.productModelAdd.sorDivide = 'FOREIGN_LAWS'
this.productModelAdd.validFlag = '0'
if (this.modalType === 1) {
this.$http.postData('sarResource/ts-resource/add', this.productModelAdd, {
_this: this
}, res => {
if (res.ok) {
this.$emit('selectMenuList')
this.closeDrawer()
} else {
this.productModal = true
}
}, e => {})
} else if (this.modalType === 2) {
this.$http.putData('sarResource/ts-resource', this.productModelAdd, {
_this: this
}, res => {
this.$emit('selectMenuList')
this.closeDrawer()
}, e => {
})
}
} else {
}
})
},
closeDrawer () {
this.$refs['productModelAdd'].resetFields()
this.productModal = false
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,355 @@
<template>
<el-drawer
title="高级搜索"
size="700px"
:wrapperClosable="false"
:visible.sync="isAdvancedSearch">
<div class="demo-drawer-content">
<el-form
:model="lawsStandInfoSearch"
:inline="true"
class="label-input-form table-lattice"
label-width="76px"
style="display: flex;flex-wrap: wrap">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="政策分类" title="政策分类" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.lawsType" filterable clearable>
<el-option
v-for="item in dict.lawsTypeOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="发文日期" class="add-form-item form-item-disabled">
<el-datePicker v-model="lawsStandInfoSearch.issueTime"
:editable="false"
placeholder="请选择发文日期"
value-format="yyyy-MM-dd"
clearable></el-datePicker>
</el-form-item>
<el-form-item label="适用区域" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.lawsSyqy" filterable clearable>
<el-option
v-for="item in dict.lawsSyqyOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="年度" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.lawsYear" filterable clearable>
<el-option
v-for="item in dict.lawsYearOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="信息简报" class="add-form-item form-item-disabled">
<el-input v-model="lawsStandInfoSearch.lawsBulletin" clearable
placeholder="请输入政策文号"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="政策文号" class="add-form-item form-item-disabled">
<el-input v-model="lawsStandInfoSearch.lawsNo" clearable
placeholder="请输入政策文号"></el-input>
</el-form-item>
<el-form-item label="发文单位" title="发文单位" class="add-form-item form-item-disabled">
<el-input v-model="lawsStandInfoSearch.issueCompany" placeholder="请输入发文单位" clearable></el-input>
</el-form-item>
<el-form-item label="适用车型" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.lawsSycx" filterable clearable>
<el-option
v-for="item in dict.lawsSycxOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否纳入认证清单" title="是否纳入认证清单" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.isRelateAccess">
<el-option value="1" label="是" key="1"></el-option>
<el-option value="2" label="否" key="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="福田转发通知文号" title="福田转发通知文号" class="add-form-item form-item-disabled">
<el-input v-model="lawsStandInfoSearch.lawsNotisyncNum" placeholder="请输入福田转发通知文号" clearable></el-input>
</el-form-item>
<el-form-item label="标签" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.lawsLabel" filterable clearable>
<el-option
v-for="item in dict.lawsLabelOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="征集意见周期" title="征集意见周期" class="add-form-item form-item-disabled">
<el-date-picker
v-model="commentCycleDate"
:picker-options="pickerOptions"
type="daterange"
range-separator=""
start-placeholder="起始时间"
end-placeholder="结束时间"
value-format="yyyy-MM-dd"
align="right">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</div>
<ProcessTitle>
<template slot="title">实施日期</template>
</ProcessTitle>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="实施日期" class="add-form-item form-item-disabled">
<el-datePicker v-model="lawsStandInfoSearch.SSRQLAWS"
:editable="false"
placeholder="请选择实施日期"
value-format="yyyy-MM-dd"
clearable></el-datePicker>
</el-form-item>
<el-form-item label="新车型实施日期" title="新车型实施日期" class="add-form-item form-item-disabled">
<el-datePicker v-model="lawsStandInfoSearch.XCXSSRQLAWS"
:editable="false"
placeholder="请选择实施日期"
value-format="yyyy-MM-dd"
clearable></el-datePicker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="在产车实施日期" title="在产车实施日期" class="add-form-item form-item-disabled">
<el-datePicker v-model="lawsStandInfoSearch.ZCXSSRQLAWS"
:editable="false"
placeholder="请选择实施日期"
value-format="yyyy-MM-dd"
clearable></el-datePicker>
</el-form-item>
</el-col>
</el-row>
</div>
<ProcessTitle>
<template slot="title">适用范围</template>
</ProcessTitle>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="发布机构" title="发布机构" class="add-form-item form-item-disabled">
<el-input v-model="lawsStandInfoSearch.FBJGLAWS" placeholder="请输入发布机构" clearable></el-input>
</el-form-item>
<el-form-item label="投稿人" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.TGRLAWS" filterable clearable>
<el-option
v-for="item in dict.TGRLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="能源类型" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.NYLXLAWS" filterable clearable>
<el-option
v-for="item in dict.NYLXLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="责任部门" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.ZRBMLAWS" filterable clearable>
<el-option
v-for="item in dict.ZRBMLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="我司参与深度" title="我司参与深度" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.CYSDLAWS" filterable clearable>
<el-option
v-for="item in dict.CYSDLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="投稿单位" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.TGDWLAWS" filterable clearable>
<el-option
v-for="item in dict.TGDWLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="适用认证" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.YYRZLAWS" filterable clearable>
<el-option
v-for="item in dict.YYRZLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="责任工程师" class="add-form-item form-item-disabled">
<el-select v-model="lawsStandInfoSearch.ZRGCSLAWS" filterable clearable>
<el-option
v-for="item in dict.ZRGCSLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
<ProcessTitle>
<template slot="title">关联信息</template>
</ProcessTitle>
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="代替文件号" title="代替文件号" class="add-form-item form-item-disabled">
<el-input v-model="lawsStandInfoSearch.DTWJHLAWS" placeholder="请输入代替文件号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被代替文件号" title="被代替文件号" class="add-form-item form-item-disabled">
<el-input v-model="lawsStandInfoSearch.BDTWJHLAWS" placeholder="请输入被代替文件号" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="getBussionStandTableBtn(lawsStandInfoSearch,'','sel')">搜索
</el-button>
<el-button
class="common-button-default"
icon="el-icon-close"
@click="clearAllSearch('lawsStandInfoSearch')">取消
</el-button>
</div>
</el-drawer>
</template>
<script>
import ProcessTitle from '@/pages/processCenter/pages/components/ProcessTitle'
export default {
name: "advancedSearch",
components: {
ProcessTitle
},
data () {
return{
isAdvancedSearch: false,
pickerOptions: {
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]);
}
}]
},
commentCycleDate: ''
}
},
props: {
lawsStandInfoSearch: {
type: Object,
default: () => ({})
},
dict: {
type: Object,
default: () => ({})
},
},
methods: {
open () {
this.isAdvancedSearch = true
},
close () {
this.isAdvancedSearch = false
},
// 搜索
getBussionStandTableBtn (item, advancedSearch, type) {
this.$emit('advancedSearch')
this.close()
},
// 清空搜索框
clearAllSearch (flag) {
this.$emit('clearSearch', {})
this.close()
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,317 @@
<template>
<!-- 配置标准 -->
<el-drawer
title="配置政策"
:wrapperClosable="false"
:visible.sync="configStandFlag"
size="1200px"
@close="cancelConfigStand"
>
<div class="demo-drawer-content">
<div class="search-area">
<div class="left">
<el-form :model="sarConfigStandSearch" :inline="true" class="label-input-form">
<!-- <el-formItem label="标准名称" prop="standName" class="search-item">-->
<!-- <el-input v-model="sarConfigStandSearch.standName" @keyup.enter.native="searchConfiguraStand"-->
<!-- placeholder="根据标准名称查找" clearable/>-->
<!-- </el-formItem>-->
<el-formItem label="政策编号" prop="lawsNumber" class="search-item">
<el-input v-model="sarConfigStandSearch.lawsNumber" @keyup.enter.native="searchConfiguraStand"
placeholder="根据政策编号查找" clearable/>
</el-formItem>
<!-- <el-formItem label="企标类别" prop="standSort" class="search-item">-->
<!-- <el-select v-model="sarConfigStandSearch.standSort" placeholder="根据企标类别查找"-->
<!-- @keyup.enter.native="searchConfiguraStand" clearable>-->
<!-- <el-option v-for="opt in standSortOptions" :value="opt.value === undefined ? '' :opt.value" :key="opt.value" :label="opt.label">{{ opt.label }}-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-formItem>-->
<el-formItem label="政策名称" prop="numberName" class="search-item">
<el-input v-model="sarConfigStandSearch.numberName" @keyup.enter.native="searchConfiguraStand" placeholder="根据政策名称查找" clearable :maxlength="100"/>
</el-formItem>
<el-form-item class="search-item btn-box">
<el-button
type="primary"
class="common-button-primary"
size="small"
:loading="searching"
@click="searchConfiguraStand">
查询
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
size="small"
@click="clearAllSearch(3)"
>清空
</el-button>
</el-form-item>
</el-form>
</div>
</div>
<div class="drawer-content">
<el-table
ref="selection"
:data="configStandList"
tooltip-effect="dark"
style="width: 100%; flex: auto;"
height="100%"
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@sort-change="sortChangeConfig"
@selection-change="selectConfigStandChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="lawsNumber"
label="政策编号"
width="150"
align="center"
>
</el-table-column>
<el-table-column
prop="lawsName"
label="政策名称"
align="center">
</el-table-column>
<el-table-column
prop="lawsEnName"
label="英文名称"
align="center">
</el-table-column>
<el-table-column
prop="issueTime"
label="发文日期"
width="120"
sortable
align="center">
</el-table-column>
<el-table-column
prop="XCXSSRQLAWS"
label="实施日期"
width="120"
sortable
align="center">
<template slot-scope="scope">
<span v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C">{{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C">{{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'">{{scope.row.XCXSSRQLAWS ? scope.row.XCXSSRQLAWS.slice(0, 10) : ''}}</span>
</template>
</el-table-column>
<el-table-column
prop="standStatusShow"
label="标准状态"
width="100"
align="center">
</el-table-column>
</el-table>
</div>
<pagination
style="position: relative;"
:page="configPage"
:pageSize="configRows"
:total="configTotal"
@pageChange="configuraPageChange"
@pageSizeChange="configuraPageSizeChange"></pagination>
<loading :loading="configLoading">加载中...</loading>
</div>
<div class="demo-drawer-footer">
<el-button
type="primary"
round class="common-button-primary"
icon="el-icon-check"
@click="saveConfigStand"
:loading="isSubmit"
>提交</el-button>
<el-button class="common-button-default" style="padding: 7px 12px;" icon="el-icon-close" type="primary"
round @click="cancelConfigStand">取消</el-button>
</div>
</el-drawer>
</template>
<script>
export default {
name: "configStandDrawer",
data () {
return {
configStandFlag: false, // 控制配置标准表格是否显示
configPage: 1,
configTotal: 0,
configRows: this.$store.getters.userInfo.configContent,
searching: false,
configStandList: [],
configLoading: false, // 配置表格加载中
isSubmit: false,
sarConfigStandSearch: {
page: this.configPage,
pageSize: this.$store.getters.userInfo.configContent,
standType: 'INLAND',
validFlag: '0',
// menuId: '',
// classifyCode: '',
// numberName: '',
// lawsNumber: '',
// quoteStand: '',
// standCode: '',
// standName: '',
// standGenera: '',
// standSubclass: '',
// issueTime: '',
// putTime: '',
// orgName: '',
// responsibleUnit: '',
// standSort: '',
// replaceStandNum: ''
}, // 分页查询过程中用到的对象
}
},
props: {
selectSarMenu: {
type: Object,
required: true
},
getBussionStandTable: {
type: Function,
required: true
}
},
methods: {
open () {
this.configStandFlag = true
this.sarConfigStandSearch.menuId = 'nomenu'
this.sarConfigStandSearch.page = 1
this.selectConfiguraStand()
},
searchConfiguraStand () {
this.configPage = 1
this.sarConfigStandSearch.page = 1
this.selectConfiguraStand()
},
clearAllSearch (flag) {
this.sarConfigStandSearch.lawsNumber=''
this.sarConfigStandSearch.numberName=''
this.configPage = 1
this.sarConfigStandSearch.page = 1
this.selectConfiguraStand()
},
// 取消配置标准
cancelConfigStand () {
this.configStandFlag = false
this.sarConfigStandSearch.lawsNumber=''
this.sarConfigStandSearch.numberName=''
this.configPage = 1
this.selectConfigStand = []
},
selectConfiguraStand () {
this.$http.get('lawss/sarLawsInfo/page', this.sarConfigStandSearch, {
_this: this,
loading: 'configLoading'
}, res => {
this.configStandList = res.data.list
this.configTotal = res.data.count
this.selectConfigStand = []
}, e => {
})
},
// 配置标准-表格排序
sortChangeConfig(sortObj) {
if (sortObj.column.order !== 'normal') {
switch (sortObj.prop) {
case 'issueTime' :
// 后台联调
if (sortObj.order === null) {
this.sarConfigStandSearch.nowOrderBy = ''
} else {
this.sarConfigStandSearch.nowOrderBy = '1'
}
break;
case 'XCXSSRQLAWS' :
// 后台联调
if (sortObj.order === null) {
this.sarConfigStandSearch.nowOrderBy = ''
} else {
this.sarConfigStandSearch.nowOrderBy = '2'
}
break;
}
switch (sortObj.order) {
case 'ascending' :
this.sarConfigStandSearch.nowOrder = '2'
break;
case 'descending' :
this.sarConfigStandSearch.nowOrder = '1'
break;
default:
this.sarConfigStandSearch.nowOrder = ''
break;
}
}
this.selectConfiguraStand()
},
selectConfigStandChange (alldata) {
this.selectConfigStand = []
for (let i = 0; i < alldata.length; i++) {
this.selectConfigStand.push(alldata[i].id)
}
},
// 分页点击后方法
configuraPageChange (page) {
this.configPage = page
this.sarConfigStandSearch.page = page
this.selectConfiguraStand()
},
// 分页每页显示数改变后方法
configuraPageSizeChange (pageSize) {
this.configRows = pageSize
this.sarConfigStandSearch.pageSize = pageSize
this.selectConfiguraStand()
this.getBussionStandTable()
},
// 提交配置搜索项
saveConfigStand () {
let search = {}
search.menuId = this.selectSarMenu.id
if (this.selectConfigStand.length === 0) {
this.$message({
showClose: true,
message: '请至少选择一条标准',
type: 'warning'
})
} else {
search.idlist = this.selectConfigStand
this.$http.postData('lawss/sarLawsInfo/saveStandardsMenu', search, {
_this: this,
loading: 'isSubmit'
}, res => {
if (res.ok) {
this.$message.success('配置成功')
this.configStandFlag = false
this.getBussionStandTable()
} else {
this.$message.warning(res.message)
}
}, e => {
})
}
},
}
}
</script>
<style scoped lang="less">
.el-drawer__wrapper{
.demo-drawer-content{
.drawer-content{
//height: calc(~'100% - 52px - 56px');
flex: auto;
display: flex;
flex-direction: column;
}
}
}
</style>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,78 @@
<template>
<!--导出文件改名字模态框-->
<el-dialog :visible.sync="exportModelFlag" title="导出文件" width="300px">
<el-form :inline="true" class="label-input-form search-area">
<el-form-item label="导出名称" class="search-item">
<el-input v-model="exportName" placeholder="请输入导出文件名称" :maxlength="30" clearable label="导出名称"/>
</el-form-item>
</el-form>
<span slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" icon="el-icon-close" @click="cancal">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="exportTestItem">提交</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name: "exportFileDialog",
data () {
return {
exportModelFlag: false,
exportName: '',
saveExportType: 'all',
}
},
props: {
selectedList: {
type: Array,
default: () => []
},
SarExportSearchEo: {
type: Object,
default: () => {}
}
},
methods: {
open () {
this.exportModelFlag = true
},
cancal () {
this.exportModelFlag = false
},
// 导出选中的标准 此处因为复选框没有设置好,所以先设置导出所有数据
exportStandard () {
// 区别是选择导出还是全部导出
if (this.selectedList.length > 0) {
this.saveExportType = 'apart'
} else {
this.saveExportType = 'all'
}
this.exportName = ''
this.exportModelFlag = true
},
exportTestItem () {
if (this.saveExportType === 'apart') {
window.open('/api/lawss/sarLawsInfo/exportStandardsInfoExcel?exportContent=' + this.selectedList.join(',') + '&exportType=' + this.saveExportType + '&exportName=' + this.exportName + '&userId=' + this.$store.getters.userInfo.userId)
this.$message({
message: '导出信息成功',
type: 'success'
})
} else if (this.saveExportType === 'all') {
let exportEOStr = JSON.stringify(this.SarExportSearchEo)
exportEOStr = exportEOStr.replace(/""/g, null)
window.open('/api/lawss/sarLawsInfo/exportStandardsInfoExcel?exportContent=' + exportEOStr + '&exportType=' + this.saveExportType + '&exportName=' + this.exportName + '&userId=' + this.$store.getters.userInfo.userId)
this.$message({
message: '导出信息成功',
type: 'success'
})
}
this.exportModelFlag = false
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,634 @@
<template>
<!--表格-->
<div class="content">
<el-table
ref="selection"
:data="standinfoList"
tooltip-effect="dark"
style="width:100%;"
:height="tableHeight"
border
class="drag-table"
:row-class-name="dragRowClassName"
@sort-change="sortChange"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="standSelectChange"
>
<!-- v-if="isPermission('fd83032ae5f41a0021b00e93c88edbbj,fd83032ae5f41a0021b00e93c88edbbe,fd83032ae5f41a0021b00e93c88edbbd')>0"-->
<el-table-column
type="selection"
min-width="5%"
align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- show-overflow-tooltip-->
<!-- prop="standSortShow"-->
<!-- label="企标类别"-->
<!-- width="110"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
show-overflow-tooltip
label="政策编号"
width="150"
>
<template slot-scope="scope">
<!-- <a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>-->
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsNumber }}</a>
<a v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsNumber }}</a>
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsNumber }}</a>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="lawsName"
label="中文名称"
min-width="300"
>
<template slot-scope="scope">
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsName }}</a>
<a v-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsName }}</a>
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsName }}</a>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="lawsEnName"
label="英文名称"
min-width="300"
>
<template slot-scope="scope">
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsEnName }}</a>
<a v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsEnName }}</a>
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsEnName }}</a>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
label="发文日期"
sortable
width="120"
>
<template slot-scope="scope">
<span v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C">{{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C">{{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}}</span>
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'">{{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}}</span>
</template>
</el-table-column>
<el-table-column
prop="XCXSSRQLAWS"
label="新车实施日期"
sortable
width="150"
>
<template slot-scope="scope">
<span v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" :title="arr(scope.row.XCXSSRQLAWS)">{{ arr(scope.row.XCXSSRQLAWS) || ''}}</span>
<span v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C" :title="arr(scope.row.XCXSSRQLAWS)">{{arr(scope.row.XCXSSRQLAWS) || ''}}</span>
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" :title="arr(scope.row.XCXSSRQLAWS)">{{arr(scope.row.XCXSSRQLAWS) || ''}}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
sortable
prop="standStatusShow"
label="文本状态"
width="110"
>
<template slot-scope="scope">
<span v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C">
{{scope.row.standStatusShow}}
</span>
<span v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C">
{{scope.row.standStatusShow}}
</span>
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'">
{{scope.row.standStatusShow}}
</span>
</template>
</el-table-column>
<el-table-column fixed="right"
v-if="isPermission('fd83032ae5f41a0021b00e93c88edbbo,fd83032ae5f41a0021b00e93c88edbbr,fd83032ae5f41a0021b00e93c88edbbk')>0"
label="操作" align="center" width="100">
<template slot-scope="scope">
<div v-if="isPermission('fd83032ae5f41a0021b00e93c88edbbo,fd83032ae5f41a0021b00e93c88edbbr,fd83032ae5f41a0021b00e93c88edbbk') == 1"
@command="handleCommand"
>
<el-button type="text" v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbo'"
v-if="scope.row.collectBtn"
@click="handleCommand([scope.row, '收藏'])"
>收藏
</el-button>
<el-button type="text" v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbo'"
v-else
@click="handleCommand([scope.row, '取消收藏'])"
>取消收藏
</el-button>
<el-button type="text" @click="handleCommand([scope.row, '编辑'])"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbr'">编辑
</el-button>
<el-button type="text" @click="handleCommand([scope.row, '删除']) "
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbk'">删除
</el-button>
</div>
<div v-else>
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-if="scope.row.collectBtn"
:command="[scope.row, '收藏']"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbo'"
>
收藏
</el-dropdown-item>
<el-dropdown-item
v-else
:command="[scope.row, '取消收藏']"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbo'"
>
取消收藏
</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbr'">
编辑
</el-dropdown-item>
<!-- <el-dropdown-item :command="[scope.row, '分享']" v-btn-permission="'413e676a155d6eb2dfbe08df8cbcf682'">分享</el-dropdown-item>-->
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbk'">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
</el-table-column>
</el-table>
<pagination :page="lawsStandInfoSearch.page" :total="total"
@pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<loading :loading="loading">数据获取中</loading>
<editDrawer
ref="editDrawerRef"
:formFieldListData="formFieldListData"
:selectSarMenu="selectSarMenu"
:getBussionStandTable="getBussionStandTable">
</editDrawer>
</div>
</template>
<script>
import editDrawer from "./editDrawer";
import store from "@/store";
export default {
name: "mainTable",
data () {
return {
standinfoList: [],
tableHeight: null,
tableFlag: '',
total: 0,
loading: false,
selectedList: [],
formFieldListData: []
}
},
components: {
editDrawer
},
props: {
// 搜索条件
lawsStandInfoSearch: {
type: Object,
default: () => {}
},
// 用来记录当前选中的二级菜单对象
selectSarMenu: {
type: Object,
required: true
},
},
watch: {
selectedList: {
handler: function(newValue, oldValue) {
this.$emit('selectedList', newValue)
},
deep: true
}
},
created() {
this.getBussionStandTable()
},
mounted() {
// 加载动态表单数据
this.getAddFormFieldList()
this.tableHeight = $('.content').height() - 44 - 20
window.onresize = () => {
this.tableHeight = $('.content').height() - 44 - 20
}
},
destroyed() {
window.onresize = null
this.tableHeight = ''
},
methods: {
addModal () {
this.$refs.editDrawerRef.addModal()
},
// 分页查询企业标准---表格
getBussionStandTable (item, nodeId,type) {
if (item !== '' && item !== null && item !== undefined) {
item.pageSize = this.$store.getters.userInfo.configContent
}
this.lawsStandInfoSearch.pageSize = this.$store.getters.userInfo.configContent
const data = item || this.lawsStandInfoSearch
const formData = {...data}
if (nodeId !== undefined) {
formData.menuId = nodeId
}
if ( (this.lawsStandInfoSearch.menuId == null || this.lawsStandInfoSearch.menuId === '') && this.selectSarMenu.id) {
formData.menuId = this.selectSarMenu.id
}
// 处理我的收藏和个性化标签传参
if (this.selectSarMenu.menuName === '我的收藏') {
formData.menuId = undefined
formData.labelMenuId = undefined
formData.collectMenuId = 'zcwdsc'
} else if (this.selectSarMenu.id === 'gxhbq' || this.selectSarMenu.pId === 'gxhbq') {
formData.menuId = undefined
formData.labelMenuId = this.selectSarMenu.id
formData.collectMenuId = undefined
} else {
formData.labelMenuId = undefined
formData.collectMenuId = undefined
}
formData.userId = this.$store.getters.userInfo.userId
if(type === 'sel'){
const advanceSearchVOList = [];
if(this.formFieldListData !== undefined && this.formFieldListData !== null){
const formFieldList = this.formFieldListData
formFieldList.forEach((item) => {
const value = this.lawsStandInfoSearch[item.attrField]
// 时间格式处理
if (value !== undefined && value !== null && value !== '') {
advanceSearchVOList.push({
connect: advanceSearchVOList.length > 0 ? "and" : "",
field: item.attrField || '',
type: 'like',
value: value
})
}
})
}
formData.advanceSearchVOStr = JSON.stringify(advanceSearchVOList);
if(this.commentCycleDate && this.commentCycleDate.length === 2){
formData.commentCycleStart = this.commentCycleDate[0]
formData.commentCycleEnd = this.commentCycleDate[1]
}
}
const attrSearchMap = {
applyArctic: formData.applyArctic
}
formData['attrSearchStr'] = JSON.stringify(attrSearchMap)
// 排序
formData.nowOrderBy = this.nowOrder ? this.orderBy : ''
formData.nowOrder = this.nowOrder
// this.SarExportSearchEo = formData
this.$emit('SarExportSearchEo', formData)
this.$http.get('lawss/sarLawsInfo/page', formData, {
_this: this, loading: 'loading'
}, res => {
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].checked = false
if (res.data.list[i].collectId != null && res.data.list[i].collectId !== '') {
res.data.list[i].collectBtn = false
res.data.list[i].cancelCollectBtn = true
} else {
res.data.list[i].collectBtn = true
res.data.list[i].cancelCollectBtn = false
}
res.data.list[i].isSubmit = false
}
this.standinfoList = res.data.list
this.total = res.data.count
if ((this.standinfoList.length === 0 || this.standinfoList === []) && this.lawsStandInfoSearch.page !== 1) {
this.pageChange(1)
}
}, e => {
})
},
// 获取拖拽行的id
dragRowClassName (row, index) {
return 'drag-row' + ' ' + 'id=' + row.row.id
},
// 表格排序
sortChange(sortObj) {
if (sortObj.column.order !== 'normal') {
this.nowOrder = ''
this.orderBy = ''
switch (sortObj.column.property) {
case 'issueTime' :
// 后台联调
this.orderBy = 1;
this.nowOrder = sortObj.column.order
if (this.nowOrder === 'ascending') {
this.nowOrder = 2
} else if (this.nowOrder === 'descending') {
this.nowOrder = 1
}
break
// case 'putTime' :
case 'XCXSSRQLAWS' :
// 后台联调
this.orderBy = 2;
this.nowOrder = sortObj.column.order
if (this.nowOrder === 'ascending') {
this.nowOrder = 2
} else if (this.nowOrder === 'descending') {
this.nowOrder = 1
}
break
case 'standStatusShow' :
this.orderBy = 3;
this.nowOrder = sortObj.column.order
if (this.nowOrder === 'ascending') {
this.nowOrder = 2
} else if (this.nowOrder === 'descending') {
this.nowOrder = 1
}
break
}
//搜索后排序,应该以被搜索后的数据排序
this.getBussionStandTable(this.lawsStandInfoSearch)
}
},
// 选择项勾选改变
standSelectChange (data) {
this.selectedList = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
}
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherLawsStandDetails',
params: {
id: item.id,
pageType: 'FOREIGN_LAWS'
}
})
window.open(routeUrl.href, '_blank')
},
isPermission (value) {
let hasCount = 0
let set =new Set( value.split(","))
let menuList = store.getters.getMenuList
if (menuList === '') {
return hasCount
} else {
menuList.map((menu) => {
if ( set.has(menu.id)|| value === undefined || value === '') {
hasCount++
}
})
}
return hasCount
},
// 分页点击后方法
pageChange (page) {
this.lawsStandInfoSearch.page = page
this.getBussionStandTable()
},
// 分页每页显示数改变后方法
pageSizeChange (pageSize) {
this.lawsStandInfoSearch.pageSize = pageSize
this.getBussionStandTable()
},
arr(data){
if(data){
if(data.indexOf(",") !== -1){
let arr = data.split(",");
let list = []
arr.forEach(item =>{
list.push(item.slice(0, 10));
})
return list.join(",");
}else {
return data.slice(0, 10)
}
}
return ""
},
// 更多
handleCommand (command) {
switch (command[1]) {
case '编辑':
this.$refs.editDrawerRef.selectStandardPro(command[0], 'edit')
break
case '收藏':
this.collectStandard(command[0])
break
// case '分享':
// this.visibleShare = true
// this.resPk = JSON.parse(JSON.stringify(command[0]))
// break
// case '移除政策':
// this.deleteEnterStandFromKind(1, command[0].id)
// break
case '删除':
this.deleteStand(1, command[0].id)
break
// case '流程':
// break
case '取消收藏':
this.cancelCollectStandard(command[0])
break
// case '授权':
// this.givePower(command[0])
// break
}
},
collectStandard (item) {
const query = {}
query.collectResId = item.id
query.collectTitle = ' ( 编号:' + item.lawsNumber + ')'
query.collectType = 'FOREIGN_LAWS'
query.userId = this.$store.getters.userInfo.userId
this.$http.postData('person/personCollect', query, {
_this: this
}, res => {
item.collectBtn = !item.collectBtn
item.collectId = res.data.id
}, e => {
})
},
// 取消收藏法规
cancelCollectStandard (item) {
this.$http.put('person/personCollect/updateByUserId', {
id: item.collectId
}, {
_this: this
}, res => {
this.$message.success('取消收藏成功')
item.collectBtn = !item.collectBtn
item.collectId = ''
this.getBussionStandTable()
}, e => {
})
},
// 删除标准
deleteStand (flag, itemid) {
if (flag === 1) {
this.$confirm('确认删除这些数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
this.$http.post('lawss/sarLawsInfo/deleteSarLawsStandInfo', {ids: itemid}, {
_this: this
}, res => {
this.getBussionStandTable()
this.selectedList = []
}, e => {
})
}).catch(() => {
})
} else {
if (this.selectedList.length === 0) {
this.$confirm('请选择一条数据进行删除', '提示', {
showCancelButton: false,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
})
} else {
this.$confirm('确认删除这些数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
this.$http.post('lawss/sarLawsInfo/deleteSarLawsStandInfo', {ids: this.selectedList.join(',')}, {
_this: this
}, res => {
this.getBussionStandTable()
this.selectedList = []
}, e => {
})
}).catch(() => {
})
}
}
},
getAddFormFieldList (isEdit) {
this.$http.get('lawss/sarStandAttrDetails/list', {}, {_this: this},
res => {
if (res.ok) {
const { data = {} } = res
this.formFieldListData = data['FOREIGN_LAWS']
// 追加高级查询动态下拉框数据s
// this.twoOptions = [
// // {
// // label: '企标类别',
// // value: 'stand_sort',
// // type: 'SEL_OPTION',
// // disabled: false
// // },
// {
// label: '标准状态',
// value: 'stand_status',
// type: 'SEL_OPTION',
// disabled: false
// },
// {
// label: '企标编号',
// value: 'stand_code',
// type: 'INPUT',
// disabled: false
// },
// {
// label: '中文名称',
// value: 'stand_name',
// type: 'INPUT',
// disabled: false
// },
// {
// label: '英文名称',
// value: 'stand_en_name',
// type: 'INPUT',
// disabled: false
// },
// {
// label: '发文日期',
// value: 'issue_time',
// type: 'DATE_PIC_OPTS',
// disabled: false
// },
// {
// label: '标准实施日期',
// value: 'put_time',
// type: 'DATE_PIC_OPTS',
// disabled: false
// },
// // {
// // label: '代替企标编号',
// // value: 'replace_stand_num',
// // type: 'INPUT',
// // disabled: false
// // },
// // {
// // label: '被代替企标编号',
// // value: 'replaced_stand_num',
// // type: 'INPUT',
// // disabled: false
// // }
// ]
// this.formFieldListData.map(item => {
// if (item.attrType !== 'FILE' && item.attrField !== 'FZRQ' && item.attrField !== 'ZYQCR'
// && item.attrField !== 'QTQCR' && item.attrField !== 'WFSPJS' && item.attrField !== 'XGLC' && item.attrField !== 'XGJH') {
// this.twoOptions.push({
// value: item.attrField,
// label: item.attrName,
// selVal: item.selVal,
// type: item.attrType,
// disabled: false,
// __wx__: item
// })
// }
// })
}
}, e => {})
},
}
}
</script>
<style scoped lang="less">
// 表格
.content{
//height: calc(~'100% - 43.5px - 56px');
display: flex;
flex-direction: column;
position: relative;
flex: auto;
.pagination {
position: static;
/deep/ .pagination-slot {
padding: 0;
}
}
}
</style>
@@ -0,0 +1,92 @@
<template>
<table-tools-bar
@search="getBussionStandTableBtn(lawsStandInfoSearch)"
@reset="clearAllSearch('lawsStandInfoSearch')"
>
<div slot="left">
<div class="search-area">
<div class="left">
<el-form :modal="lawsStandInfoSearch" :inline="true" class="label-input-form" @submit.native.prevent="getBussionStandTableBtn(lawsStandInfoSearch)">
<el-formItem label="政策编号" prop="lawsNumber" class="search-item">
<el-input v-model="lawsStandInfoSearch.lawsNumber" clearable placeholder="根据编号查找" :maxlength="100" @keyup.enter.native="getBussionStandTableBtn(lawsStandInfoSearch)"/>
</el-formItem>
<el-formItem label="政策名称" prop="numberName" class="search-item">
<el-input v-model="lawsStandInfoSearch.numberName" clearable placeholder="根据名称查找" :maxlength="100" @keyup.enter.native="getBussionStandTableBtn(lawsStandInfoSearch)"/>
</el-formItem>
<el-formItem label="文本状态" prop="lawsTextState" class="search-item">
<el-select v-model="lawsStandInfoSearch.lawsTextState" filterable clearable>
<el-option
v-for="item in lawsTextStateOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-formItem>
<el-form-item class="search-item btn-box">
<el-button
type="primary"
size="mini"
class="common-button-primary"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbl'"
@click="getBussionStandTableBtn(lawsStandInfoSearch)">
查询
</el-button>
<el-button
size="mini"
class="common-button-default"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbh'"
@click="clearAllSearch('lawsStandInfoSearch')">清空
</el-button>
<el-button size="mini" type="primary" class="common-button-primary"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbi'" @click="selectMoreBtn">高级检索
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
<div slot="right" class="right shaixuan-button">
<!-- <el-button icon="shaixuan" type="primary" class="common-button-primary" round @click="isAdvancedSearch = true">高级检索</el-button>-->
</div>
</table-tools-bar>
</template>
<script>
export default {
name: "policySearch",
data() {
return {
}
},
props: {
lawsStandInfoSearch: {
type: Object,
default: () => ({})
},
lawsTextStateOptions: {
type: Array,
default: () => []
}
},
methods:{
// 搜索
getBussionStandTableBtn (item, advancedSearch, type) {
this.$emit('getBussionStandTableBtn')
},
// 高级检索
selectMoreBtn () {
this.$emit('selectMoreBtn')
},
// 清空搜索框
clearAllSearch (flag) {
this.$emit('clearSearch')
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,302 @@
<template>
<!--右侧内容-->
<div id="right" class="tree-right v-class">
<!-- 普通搜索 -->
<policySearch ref="policySearchRef"
:lawsStandInfoSearch="lawsStandInfoSearch"
:lawsTextStateOptions="dict.lawsTextStateOptions"
@getBussionStandTableBtn="getBussionStandTableBtn"
@clearSearch="clearSearch"
@selectMoreBtn="selectMoreBtn"></policySearch>
<!--按钮区-->
<div class="action-bar">
<!--<el-button-->
<!-- type="primary"-->
<!-- class="common-button-primary add-button"-->
<!-- round-->
<!-- @click="addModal"-->
<!--&gt;<i class="el-icon-plus"></i>新增</el-button>-->
<!--<el-button-->
<!-- class="common-button-default in-button"-->
<!-- round-->
<!-- :loading="searching"-->
<!-- @click="addImportModal(1)"-->
<!-- v-btn-permission="'SKNTPDKZFF'"-->
<!-- ><i class="iconfont">&#xe6de;</i>导入-->
<!--</el-button>-->
<el-button
class="common-button-default export-button"
round
@click="exportStandard"
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbj'"
><i class="iconfont">&#xe6e9;</i>导出</el-button>
<!-- <el-button-->
<!-- class="common-button-default"-->
<!-- round-->
<!-- :loading="searching"-->
<!-- @click="uploadImportModal(1)"-->
<!-- v-btn-permission="'afX1p2gh3c'"-->
<!-- ><i class="iconfont">&#xe825;</i>模板下载</el-button>-->
<!-- <el-button
class="common-button-default delete-button"
round
@click="deleteStand(2)"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbe'"
><i class="iconfont">&#xe61b;</i>批量删除</el-button>-->
<el-button
class="common-button-default"
round
@click="configurationStandard"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbf'"
><i class="iconfont">&#xe669;</i>配置政策</el-button>
<el-button
class="common-button-default"
round
@click="deleteEnterStandFromKind(2)"
v-btn-permission="'fd83032ae5f41a0021b00e93c88edbbd'"
><i class="iconfont">&#xe611;</i>移除政策</el-button>
</div>
<!--table-->
<mainTable
ref="mainTableRef"
:lawsStandInfoSearch="lawsStandInfoSearch"
:selectSarMenu="selectSarMenu"
@selectedList="getSelectedList"
@SarExportSearchEo="getSarExportSearchEo"
/>
<!--高级搜索-->
<advancedSearch
ref="advancedSearchRef"
:lawsStandInfoSearch="lawsStandInfoSearch"
@clearSearch="clearSearch"
@advancedSearch="advancedSearch"
:dict="dict">
</advancedSearch>
<!--导出-->
<exportFileDialog ref="exportFileDialogRef" :selectedList="selectedList" :SarExportSearchEo="SarExportSearchEo" />
<!-- 配置政策 -->
<configStandDrawer
ref="configStandDrawerRef"
:selectSarMenu="selectSarMenu"
:getBussionStandTable="() => {this.$refs.mainTableRef.getBussionStandTable()}" />
</div>
</template>
<script>
import policySearch from './policySearch'
import advancedSearch from './advancedSearch'
import mainTable from "./mainTable";
import exportFileDialog from './exportFileDialog'
import configStandDrawer from "./configStandDrawer";
export default {
name: "policyTable",
components: {
policySearch,
advancedSearch,
mainTable,
exportFileDialog,
configStandDrawer
},
data () {
return {
lawsStandInfoSearch: {}, // 分页查询过程中用到的对象
commentCycleDate: '', // 征集意见周期
dict: {},
// 导出相关
selectedList: [],
SarExportSearchEo: {}, // 查询条件
}
},
props: {
// 用来记录当前选中的二级菜单对象
selectSarMenu: {
type: Object,
required: true
},
},
mounted() {
this.getDicTypeListCode() // 字典项
},
methods: {
// 打开高级搜索
selectMoreBtn () {
this.$set(this, 'lawsStandInfoSearch', {})
this.$refs.advancedSearchRef.open()
},
// 清除搜索条件
clearSearch () {
this.$set(this, 'lawsStandInfoSearch', {})
this.commentCycleDate = ''
this.$refs.advancedSearchRef.close()
this.$nextTick(() => {
this.getBussionStandTableBtn()
})
},
// 左侧树点击后 重新获取数据
treeClickGetBussionStandTable (menuId) {
this.$set(this.lawsStandInfoSearch, 'menuId', menuId)
this.$set(this.lawsStandInfoSearch, 'page', 1)
this.$refs.mainTableRef.getBussionStandTable(this.lawsStandInfoSearch, menuId)
},
// 普通搜索
getBussionStandTableBtn () {
this.$set(this.lawsStandInfoSearch, 'page', 1)
this.$refs.mainTableRef.getBussionStandTable()
},
// 高级搜索
advancedSearch () {
this.$set(this.lawsStandInfoSearch, 'page', 1)
this.$refs.mainTableRef.getBussionStandTable(this.lawsStandInfoSearch, '', 'sel')
},
// --------------新增----------------
// addModal () {
// this.getMenu().then(boolean => {
// if (boolean) {
// this.$refs.mainTableRef.addModal()
// }
// })
// },
// -------------导出相关---------------
// 选中项
getSelectedList (val) {
this.$set(this, 'selectedList', val)
},
exportStandard () {
this.$refs.exportFileDialogRef.exportStandard()
},
// 设置查询条件
getSarExportSearchEo (val) {
this.$set(this, 'SarExportSearchEo', val)
},
// -------------配置政策----------
// 点击配置标准弹出相应模态框
configurationStandard () {
this.getMenu().then(boolean => {
if (boolean) {
const winWidth = window.screen.width
if (winWidth > 1920) {
this.drawerWidth = 1400
} else {
this.drawerWidth = winWidth - 200
}
let menuId = this.selectSarMenu.id
if (menuId == null || menuId === '') {
this.$message.error('请选择要配置的目录')
} else {
if (this.selectSarMenu.parentId == null || this.selectSarMenu.parentId === '') {
this.$message.error('请选择二级及以下目录')
} else {
this.$refs.configStandDrawerRef.open()
}
}
}
})
},
// -------------移除政策-----------
// 判断当前左侧树节点是否是我的收藏和个性化标签
getMenu () {
return new Promise((resolve, reject) => {
let menu = this.selectSarMenu
if (menu.id === 'zcwdsc') {
this.$message.warning('请选择海外标准法规及以下节点')
} else {
resolve(true)
}
})
},
// 移除政策
deleteEnterStandFromKind (flag, item) {
this.getMenu().then(boolean => {
if (boolean) {
if (this.selectSarMenu.parentId == null || this.selectSarMenu.parentId === '') {
this.$message({
showClose: true,
message: '请选择二级及以下目录',
type: 'error'
})
} else {
let search = {}
// 取最外层目录id
search.menuId = this.selectSarMenu.id
// search.menuId = this.removeOneId
search.idlist = []
// search.menuId = this.removeOneId
if (this.selectedList.length === 0) {
this.$message.error('请先选择要移除的数据!')
} else {
this.$confirm('确认移除选中数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
for (let i = 0; i < this.selectedList.length; i++) {
search.idlist.push(this.selectedList[i])
}
this.$http.putData('lawss/sarLawsMenu/removeStandInfo', search, {
_this: this
}, res => {
this.$refs.mainTableRef.getBussionStandTable()
}, e => {
})
}).catch(() => {
})
}
}
}
})
},
getDicTypeListCode () {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.dict.lawsTextStateOptions = res.data.lawsTextState
this.dict.lawsTypeOptions = res.data.lawsType
this.dict.lawsSyqyOptions = res.data.lawsSyqy
this.dict.lawsYearOptions = res.data.lawsYear
this.dict.lawsLabelOptions = res.data.lawsLabel
this.dict.TGRLAWSOptions = res.data.TGRLAWS
this.dict.NYLXLAWSOptions = res.data.NYLXLAWS
this.dict.ZRBMLAWSOptions = res.data.ZRBMLAWS
this.dict.CYSDLAWSOptions = res.data.CYSDLAWS
this.dict.TGDWLAWSOptions = res.data.TGDWLAWS
this.dict.ZRGCSLAWSOptions = res.data.ZRGCSLAWS
}, e => {
})
},
}
}
</script>
<style scoped lang="less">
#right{
float:right;
width:70%;
height:100%;
}
.tree-right {
overflow-y: hidden;
padding:0 0;
position: relative;
width: 84%;
height: 100%;
display: flex;
flex-direction: column;
}
</style>
@@ -0,0 +1,261 @@
<template>
<div style="width: 100%" class="wrapper">
<el-input
placeholder="输入树状图体系"
v-model="filterText">
</el-input>
<div class="tree">
<el-card style="height: 100%;padding-right: 120px;overflow-y:auto">
<el-tree
ref="tree"
node-key="id"
class="tree-line"
icon-class="icon-tree"
:indent="0"
:props="props"
:data="treeList"
:default-expanded-keys="['64df1d5522bb49c09af6']"
highlight-current
@node-click="treeClick"
:filter-node-method="filterNode">
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'"></span>
<span style="font-size:12px"> {{ node.label }} </span>
<span>
<el-button
type="text"
size="mini"
v-show="data.show"
v-btn-permission="'a3109949cc30dae1ef523c037b2651b8'"
@click="() => append(data)">
新增
</el-button>
<el-button
type="text"
size="mini"
v-show="data.show"
v-btn-permission="'61a33c05ed689934f7d4a0de4220c9ce'"
@click="() => update(data)">
编辑
</el-button>
<el-button
type="text"
size="mini"
v-show="data.showDel"
v-btn-permission="'b123231eb8c42b2a61e3dc5f59654f79'"
@click="() => remove(node, data)">
删除
</el-button>
</span>
</span>
</el-tree>
</el-card>
</div>
<addStructure ref="addStructureRef" @selectMenuList="selectMenuList"></addStructure>
</div>
</template>
<script>
import addStructure from "./addStructure";
export default {
name: "policyTree",
components: {
addStructure
},
data(){
return {
treeList: [],
filterText: '', // 企业标准库过滤
props: {
label: 'menuName',
children: 'children'
},
}
},
created() {
this.selectMenuList()
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
methods: {
selectMenuList () {
this.$http.get('sarResource/ts-resource/getListStand', {
sorDivide: 'FOREIGN_LAWS',
userId: this.$store.getters.userInfo.userId
}, {}, res => {
if (res.ok) {
this.treeList = res.data
}
})
this.$emit('treeClick', {})
},
filterNode(value, data) {
if (!value) return true;
return data.menuName.indexOf(value) !== -1;
},
treeClick (treeNode) {
this.$emit('treeClick', treeNode)
},
append(data) {
this.$refs.addStructureRef.append(data)
},
update(data) {
this.$refs.addStructureRef.update(data)
},
remove(node, data) {
this.$confirm('是否删除菜单?', '提示', {
confirmButtonText: '确定',
confirmButtonClass: 'common-button-primary',
cancelButtonText: '取消',
roundButton: true,
type: 'warning'
}).then(() => {
this.$http.put("sarResource/ts-resource/delResourceById", {
resourceId: data.id
}, res => {
}, e => {
if(e.ok){
this.$message({
type: 'success',
message: "删除成功"
})
this.selectMenuList()
}else {
this.$message({
type: 'warning',
message: e.message
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 树节点鼠标移入移出
mouseenter(data){
this.$set(data, 'show', true)
if(data.parentId !== null && data.id !== 'zcwdsc'){
this.$set(data, 'showDel', true)
}
},
mouseleave(data){
this.$set(data, 'show', false)
this.$set(data, 'showDel', false)
},
}
}
</script>
<style scoped lang="less">
/deep/ .icon-tree {
margin:0 5px 0 10px;
position:relative;
background:url('~@/assets/images/shangqi/img/tree-add.png');
background-size:100% 100%;
}
/deep/ .expanded{
background:url('~@/assets/images/shangqi/img/tree-sub.png');
background-size:100% 100%;
}
/deep/ .is-leaf{
background-image:none;
background-size:100% 100%;
}
/deep/ .is-leaf-none{
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background: url('~@/assets/images/shangqi/img/none-file-new.png');
background-size:100% 100%;
}
/deep/ .is-show{
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background:url('~@/assets/images/shangqi/img/tree.png');
background-size:100% 100%;
}
/deep/.tree-line{
.el-tree-node {
position: relative;
padding-left: 0px; // 缩进量
line-height: 30px;
}
.el-tree-node__children {
padding-left: 16px; // 缩进量
}
// 竖线
.el-tree-node::before {
content: "";
height: 100%;
width: 1px;
position: absolute;
left: -3px;
top: -26px;
border-width: 1px;
border-left: 1px dashed #858990e0;
}
// 当前层最后一个节点的竖线高度固定
.el-tree-node:last-child::before {
height: 38px; // 可以自己调节到合适数值
}
// 横线
.el-tree-node::after {
content: "";
width: 11px;
height: 20px;
position: absolute;
left: -3px;
top: 12px;
border-width: 1px;
border-top: 1px dashed #858990e0;
}
// 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
& > .el-tree-node::after {
border-top: none;
}
& > .el-tree-node::before {
border-left: none;
}
// 展开关闭的icon
.el-tree-node__expand-icon{
font-size: 16px;
// 叶子节点(无子节点)
&.is-leaf{
color: transparent;
// display: none; // 也可以去掉
}
}
}
</style>
<style scoped lang="less">
.tree{
/deep/ .el-card__body {
padding: 0 !important;
}
.el-card {
width: 500px;
min-width: 2000px;
max-width: 100%;
/* min-width: min-content;*/
}
height: 95%;
width: 95%;
position: absolute;
left: 0;
}
</style>
+123
View File
@@ -0,0 +1,123 @@
<template>
<div class="nationalPolicy">
<div id="foreignRegulationsDatabase" :class="{ 'tree-close': sideClose }" class="v-class">
<!--左侧树-->
<div id="left" class="tree-content" :class="{ 'tree-closed': sideClose }" >
<!-- 政策树 -->
<policyTree ref="policyTreeRef" @treeClick="treeClick"></policyTree>
<div class="tree-collapse" @click="treeCollapse" :class="{ 'tree-close': sideClose }">
<!--切换折叠样式-->
<i class="el-icon-arrow-left" v-if="sideClose === false"></i>
<i class="el-icon-arrow-right" v-if="sideClose === true"></i>
</div>
</div>
<!-- 可拖拽 -->
<div id="resize"></div>
<policyTable ref="policyTableRef" :selectSarMenu="selectSarMenu"></policyTable>
</div>
</div>
</template>
<script>
import policyTree from "./components/policyTree";
import policyTable from "./components/policyTable";
export default {
name: 'NationalPolicy',
components: {
policyTree,
policyTable
},
data() {
return {
sideClose: false, // 边栏收展状态
selectSarMenu: {}// 用来记录当前选中的二级菜单对象
}
},
mounted() {
this.dragControllerLR()
},
methods: {
treeClick (treeNode) {
// 点击左侧树 重新获取数据
this.$set(this, 'selectSarMenu', treeNode)
this.$nextTick(() => {
this.$refs.policyTableRef.treeClickGetBussionStandTable(treeNode.id || '')
})
},
treeCollapse () {
this.sideClose = !this.sideClose
},
// 左右拖动事件
dragControllerLR: function() {
var resize = document.getElementById("resize");
var left = document.getElementById("left");
var right = document.getElementById("right");
var box = document.getElementById("foreignRegulationsDatabase");
resize.onmousedown = function(e){
var startX = e.clientX;
resize.left = resize.offsetLeft;
document.onmousemove = function(e){
var endX = e.clientX;
var moveLen = resize.left + (endX - startX);
var maxT = box.clientWidth - resize.offsetWidth;
if(moveLen<150) moveLen = 150;
if(moveLen>maxT-150) moveLen = maxT-150;
resize.style.left = moveLen;
left.style.width = moveLen + "px";
right.style.width = (box.clientWidth - moveLen - 5) + "px";
}
document.onmouseup = function(evt){
document.onmousemove = null;
document.onmouseup = null;
resize.releaseCapture && resize.releaseCapture();
}
resize.setCapture && resize.setCapture();
return false;
}
},
}
}
</script>
<style scoped lang="less">
#left{
width:calc(30% - 5px);
height:100%;
float:left;
}
#resize{
width:5px;
height:100%;
cursor: w-resize;
float:left;
}
</style>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
.nationalPolicy{
height: 100%;
}
#foreignRegulationsDatabase {
display: flex;
position: relative;
height: 100%;
//background: #fff;
.tree-content {
width: 20%;
position: relative;
/*height: 100%;*/
background: #fff;
.tree-collapse {
position: absolute;
right: 0;
}
}
}
</style>
+11
View File
@@ -3894,6 +3894,17 @@ const routes = [
menuId: '6557e9c4ce672af71be5807052da126b'
}
},
{
path: '/Policy',
name: 'Policy',
component: () =>
import('@/pages/policyRegulation/policy'),
meta: {
requireAuth: true,
title: '国内外政策',
menuId: '6557e9c4ce672af71be5807052da126b'
}
},
{
path: '/standardTrackingList',
name: 'StandardTrackingList',