Merge commit '2976d41fdfcd6d956567e40d22164e7e391c8a3d' into dev_test
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<van-popup v-model="popupShow"
|
||||
position="right"
|
||||
:style="{ height: '100%', width: '90%' }"
|
||||
round
|
||||
:close-on-click-overlay="false"
|
||||
@click-overlay="handleCancel">
|
||||
<h3 class="popup-title">
|
||||
<span>体系结构</span>
|
||||
<van-icon name="cross" size="22px" @click="handleCancel" />
|
||||
</h3>
|
||||
<div class="popup-main">
|
||||
<folderTree ref="folderTreeRef" @checked="getChecked"></folderTree>
|
||||
</div>
|
||||
<div class="popup-footer">
|
||||
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="handleOk">确定</el-button>
|
||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="handleCancel">取消</el-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import folderTree from "./folderTree";
|
||||
export default {
|
||||
name: "folderPopup",
|
||||
components: {
|
||||
folderTree,
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
popupShow: false,
|
||||
currentData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (id) {
|
||||
this.popupShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.folderTreeRef.setCurrentKey(id)
|
||||
})
|
||||
},
|
||||
hide () {
|
||||
this.popupShow = false
|
||||
},
|
||||
getChecked (obj) {
|
||||
this.currentData = obj
|
||||
},
|
||||
handleOk () {
|
||||
this.$emit('checked', this.currentData)
|
||||
this.hide()
|
||||
},
|
||||
handleCancel () {
|
||||
this.hide()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.popup-title{
|
||||
line-height: 1rem;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
padding: 0 0.3rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.popup-main{
|
||||
height: calc(100vh - 1rem - 50px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.popup-footer{
|
||||
border-top: 1px solid #e8e8e8;
|
||||
text-align: right;
|
||||
padding-right: 0.2rem;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
position: fixed;
|
||||
bottom: 1px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<div class="tree">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
node-key="id"
|
||||
class="tree-line"
|
||||
icon-class="icon-tree"
|
||||
:indent="0"
|
||||
:props="props"
|
||||
:data="treeList"
|
||||
:default-expanded-keys="['1']"
|
||||
highlight-current
|
||||
:current-node-key="currentKey"
|
||||
:filter-node-method="filterNode"
|
||||
@node-click="handleNodeClick">
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'"></span>
|
||||
<span style="font-size:18px"> {{ node.label }} </span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "folderTree",
|
||||
data () {
|
||||
return {
|
||||
treeList: [],
|
||||
props: {
|
||||
label: 'name',
|
||||
children: 'children'
|
||||
},
|
||||
currentKey: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getTreeData()
|
||||
},
|
||||
methods: {
|
||||
getTreeData () {
|
||||
this.$http._getData('fileMaterialCenter/zlTree').then(res => {
|
||||
if (res.ok && res.data) {
|
||||
this.treeList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
filterNode (value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
handleNodeClick (data, node, element) {
|
||||
this.$emit('checked', data)
|
||||
},
|
||||
setCurrentKey (id) {
|
||||
this.currentKey = id
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.tree.setCurrentKey(this.currentKey)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.tree-line {
|
||||
|
||||
/deep/ .el-tree-node {
|
||||
position: relative;
|
||||
padding-left: 0px; // 缩进量
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
/deep/ .el-tree-node__children {
|
||||
padding-left: 16px; // 缩进量
|
||||
overflow: inherit; // 横向滚动条默认hidden
|
||||
}
|
||||
.el-tree-node__content{
|
||||
//display: block!important;
|
||||
}
|
||||
|
||||
// 竖线
|
||||
/deep/ .el-tree-node::before {
|
||||
content: "";
|
||||
height: 100%;
|
||||
width: 1px;
|
||||
position: absolute;
|
||||
//left: -3px;
|
||||
//top: -26px;
|
||||
left: -1px;
|
||||
top: -5px;
|
||||
border-width: 1px;
|
||||
border-left: 1px dashed #858990e0;
|
||||
}
|
||||
|
||||
// 当前层最后一个节点的竖线高度固定
|
||||
/deep/ .el-tree-node:last-child::before {
|
||||
//height: 38px; // 可以自己调节到合适数值
|
||||
height: 17px; // 可以自己调节到合适数值
|
||||
}
|
||||
|
||||
// 横线
|
||||
/deep/ .el-tree-node::after {
|
||||
content: "";
|
||||
width: 11px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
//left: -3px;
|
||||
left: -1px;
|
||||
top: 12px;
|
||||
border-width: 1px;
|
||||
border-top: 1px dashed #858990e0;
|
||||
}
|
||||
|
||||
// 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
|
||||
/deep/ & > .el-tree-node::after {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
/deep/ & > .el-tree-node::before {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
// 展开关闭的icon
|
||||
/deep/ .el-tree-node__expand-icon {
|
||||
font-size: 20px;
|
||||
// 叶子节点(无子节点)
|
||||
&.is-leaf {
|
||||
color: transparent;
|
||||
//display: none; // 也可以去掉
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .icon-tree {
|
||||
margin: 0 5px 0 10px;
|
||||
position: relative;
|
||||
background: url('~@/assets/images/shangqi/img/tree-add.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
/deep/ .is-leaf {
|
||||
background-image: none;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
/deep/ .expanded {
|
||||
background: url('~@/assets/images/shangqi/img/tree-sub.png');
|
||||
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%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<van-popup v-model="popupShow"
|
||||
position="right"
|
||||
:style="{ height: '100%', width: '90%' }"
|
||||
round
|
||||
:close-on-click-overlay="false"
|
||||
@click-overlay="handleCancel">
|
||||
<h3 class="popup-title">
|
||||
<span>标准体系</span>
|
||||
<van-icon name="cross" size="22px" @click="handleCancel" />
|
||||
</h3>
|
||||
<div class="popup-main">
|
||||
<standardSystemTree ref="standardSystemTreeRef" @checkedKey="getCheckedKey"></standardSystemTree>
|
||||
</div>
|
||||
<div class="popup-footer">
|
||||
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="handleOk">确定</el-button>
|
||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="handleCancel">取消</el-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import standardSystemTree from "./standardSystemTree";
|
||||
export default {
|
||||
name: "standardSystemPopup",
|
||||
components: {
|
||||
standardSystemTree,
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
popupShow: true,
|
||||
checkedKeys: [], // 选择的标准体系
|
||||
}
|
||||
},
|
||||
props: {
|
||||
// 以前的选中项
|
||||
initKeys: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.$refs.standardSystemTreeRef.setCheckedKeys(this.initKeys)
|
||||
this.popupShow = true
|
||||
},
|
||||
hide () {
|
||||
this.popupShow = false
|
||||
},
|
||||
getCheckedKey (val) {
|
||||
this.checkedKeys = val
|
||||
},
|
||||
handleOk () {
|
||||
// if (this.checkedKeys.length > 0) {
|
||||
this.popupShow = false
|
||||
this.$emit('standSystemKeys', this.checkedKeys)
|
||||
// } else {
|
||||
// // this.$toast('请至少选择一项');
|
||||
// this.$message.error('请至少选择一项')
|
||||
// this.popupShow = true
|
||||
// }
|
||||
},
|
||||
handleCancel () {
|
||||
// if (this.initKeys.length > 0) {
|
||||
this.hide()
|
||||
// } else {
|
||||
// this.$message.error('请至少选择一项')
|
||||
// this.open()
|
||||
// }
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.popup-title{
|
||||
line-height: 1rem;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
padding: 0 0.3rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.popup-main{
|
||||
height: calc(100vh - 1rem - 50px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.popup-footer{
|
||||
border-top: 1px solid #e8e8e8;
|
||||
text-align: right;
|
||||
padding-right: 0.2rem;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
position: fixed;
|
||||
bottom: 1px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<el-tree class="popup-tree" ref="tree" :data="data" :props="defaultProps"
|
||||
:lazy="false"
|
||||
:show-checkbox="true"
|
||||
node-key="id"
|
||||
:check-strictly="true"
|
||||
:expand-on-click-node="false"
|
||||
:check-on-click-node="true"
|
||||
:default-checked-keys="defaultCheckedKeys"
|
||||
:highlight-current="true"
|
||||
@node-click="handleNodeClick"
|
||||
@check-change="handleCheckChange">
|
||||
</el-tree>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "standardSystemTree",
|
||||
data () {
|
||||
return {
|
||||
data: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'menuName'
|
||||
},
|
||||
defaultCheckedKeys: [],
|
||||
checkedKeys: []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getStandardSystem()
|
||||
},
|
||||
methods: {
|
||||
getStandardSystem () {
|
||||
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
|
||||
if (res.ok && res.data) {
|
||||
this.data = res.data.TXLBBUSS // 标准体系
|
||||
}
|
||||
})
|
||||
},
|
||||
handleNodeClick (data, node, element) {
|
||||
// console.log(data, node, element)
|
||||
},
|
||||
handleCheckChange (data, isChecked, childIsChecked) {
|
||||
const id = data.id
|
||||
if (isChecked) {
|
||||
if (!this.checkedKeys.some(key => key === id)) {
|
||||
this.checkedKeys = [...this.checkedKeys, id]
|
||||
}
|
||||
} else {
|
||||
if (this.checkedKeys.some(key => key === id)) {
|
||||
this.checkedKeys = this.checkedKeys.filter(key => key !== id)
|
||||
}
|
||||
}
|
||||
this.$emit('checkedKey', this.checkedKeys)
|
||||
},
|
||||
// 通过 keys 设置目前勾选的节点
|
||||
setCheckedKeys (keys) {
|
||||
this.$refs.tree.setCheckedKeys(keys)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.popup-tree{
|
||||
/deep/ .el-tree-node__expand-icon{
|
||||
font-size: 20px;
|
||||
}
|
||||
/deep/ .el-tree-node__label{
|
||||
font-size: 18px;
|
||||
}
|
||||
/deep/ .el-tree-node__children {
|
||||
overflow: inherit; // 横向滚动条
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,16 +6,22 @@
|
||||
<span class="left-title" @click="back"> < </span>
|
||||
<span class="right-title">{{titleName}}</span>
|
||||
</div>
|
||||
<van-search
|
||||
v-model="searchKey"
|
||||
show-action
|
||||
placeholder="请输入搜索关键词"
|
||||
@search="onSearch"
|
||||
>
|
||||
<template #action>
|
||||
<div @click="onSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<div style="display: flex;align-items: center">
|
||||
<van-search
|
||||
style="flex: 1;padding-right: 0"
|
||||
v-model="searchKey"
|
||||
show-action
|
||||
placeholder="请输入搜索关键词"
|
||||
@search="onSearch"
|
||||
>
|
||||
<template #action>
|
||||
<div @click="onSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<div @click="onChoose" style="color: #fff;padding: 10px 12px 0 0">
|
||||
<van-icon name="filter-o" color="#fff" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-box" ref="cardBox" @scroll="scrool">
|
||||
<div v-if="loading">
|
||||
@@ -96,12 +102,17 @@
|
||||
<div v-else-if="!listFlag && moreFlag" @click="moreList" >点击加载更多</div>
|
||||
<van-loading v-else size="24px" color="#3170A8">加载中...</van-loading>
|
||||
</div>
|
||||
<standardSystemPopup :init-keys="standSystemKeys" @standSystemKeys="setStandSystemKeys" ref="standardSystemPopupRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import standardSystemPopup from "./components/standardSystemPopup";
|
||||
export default {
|
||||
name: "domesticStand",
|
||||
components: {
|
||||
standardSystemPopup,
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
scrolled: '',
|
||||
@@ -120,6 +131,7 @@ export default {
|
||||
textStatusMap: {},// 文本状态id与name对应
|
||||
natureMap:{},
|
||||
lawsMap:{},
|
||||
standSystemKeys: []
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
@@ -177,6 +189,7 @@ export default {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'stand',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
standType: 'INLAND',
|
||||
page: this.page,
|
||||
@@ -213,6 +226,7 @@ export default {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'stand',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
standType: 'FOREIGN',
|
||||
page: this.page,
|
||||
@@ -230,6 +244,26 @@ export default {
|
||||
console.log(e)
|
||||
})
|
||||
|
||||
} else if (this.titleType === 'bussstand') {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'bussstand',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
standType: 'bussstand',
|
||||
page: this.page,
|
||||
pageSize: 20
|
||||
},{
|
||||
_this: this,
|
||||
}, res => {
|
||||
if (res.ok){
|
||||
this.standList = res.data.list
|
||||
this.loading = false
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}else if(this.titleType === 'POLICY'){
|
||||
// this.$http.get('lawss/sarLawsInfo/page',{
|
||||
// page: 1,
|
||||
@@ -250,6 +284,7 @@ export default {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'laws',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
type: 'laws',
|
||||
page: this.page,
|
||||
@@ -271,6 +306,7 @@ export default {
|
||||
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
|
||||
messageType: 'ZYBZFG',
|
||||
standard: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
page: 1,
|
||||
paeSize: 10
|
||||
}, {
|
||||
@@ -318,6 +354,7 @@ export default {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'stand',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
standType: 'INLAND',
|
||||
page: this.page,
|
||||
@@ -372,6 +409,7 @@ export default {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'stand',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
standType: 'FOREIGN',
|
||||
page: this.page,
|
||||
@@ -397,6 +435,36 @@ export default {
|
||||
}, e => {
|
||||
console.log(e)
|
||||
})
|
||||
} else if (this.titleType === 'bussstand') {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'bussstand',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
standType: 'bussstand',
|
||||
page: this.page,
|
||||
pageSize: 20
|
||||
},{
|
||||
_this: this,
|
||||
}, res => {
|
||||
if(res.ok){
|
||||
if(res.data.list.length){
|
||||
if(this.standList.length){
|
||||
this.standList = this.standList.concat(res.data.list)
|
||||
}else{
|
||||
this.standList = res.data.list
|
||||
}
|
||||
this.loading = false
|
||||
}else{
|
||||
this.loading = false
|
||||
this.listFlag = true
|
||||
}
|
||||
}else{
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
console.log(e)
|
||||
})
|
||||
}else if(this.titleType === 'POLICY'){
|
||||
// this.$http.get('lawss/sarLawsInfo/page',{
|
||||
// lawsNumber: this.searchKey,
|
||||
@@ -425,6 +493,7 @@ export default {
|
||||
this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
selectIndex: 'laws',
|
||||
selectValue: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
selectType: 'titleSearch',
|
||||
type: 'laws',
|
||||
page: this.page,
|
||||
@@ -454,6 +523,7 @@ export default {
|
||||
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
|
||||
messageType: 'ZYBZFG',
|
||||
standard: this.searchKey,
|
||||
standSystem: this.standSystemKeys,
|
||||
page: 1,
|
||||
paeSize: 10
|
||||
}, {
|
||||
@@ -499,10 +569,17 @@ export default {
|
||||
this.$set(this.lawsMap, item.value, item.label);
|
||||
});
|
||||
},
|
||||
onChoose () {
|
||||
this.$refs.standardSystemPopupRef.open()
|
||||
},
|
||||
setStandSystemKeys (standSystemKeys) {
|
||||
this.standSystemKeys = standSystemKeys
|
||||
this.onSearch()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.titleType = this.$route.query.standType
|
||||
this.titleName = this.titleType === 'INLAND' ? '国内标准法规库' : (this.titleType === 'FOREIGN' ? '海外标准法规库' : this.titleType === 'POLICY' ? '国内外政策库' : '标准化动态库' )
|
||||
this.titleName = this.titleType === 'INLAND' ? '国内标准法规库' : (this.titleType === 'FOREIGN' ? '海外标准法规库' : this.titleType === 'bussstand' ? '企业标准' : this.titleType === 'POLICY' ? '国内外政策库' : '标准化动态库' )
|
||||
this.standSearch()
|
||||
this.$refs.cardBox.addEventListener('scroll', this.scrool);
|
||||
//从数据库中查询下拉框数据
|
||||
@@ -533,7 +610,7 @@ export default {
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
z-index: 1000;
|
||||
background: #3170A8;
|
||||
}
|
||||
.head-title{
|
||||
@@ -632,5 +709,4 @@ export default {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -27,9 +27,13 @@
|
||||
<div class="content-box content-box2"></div>
|
||||
<span class="content-span">海外标准法规</span>
|
||||
</div>
|
||||
<div class="content-top" @click="standChange('POLICY')">
|
||||
<div class="content-box content-box3"></div>
|
||||
<span class="content-span">国内外政策</span>
|
||||
<!--<div class="content-top" @click="standChange('POLICY')">-->
|
||||
<!-- <div class="content-box content-box3"></div>-->
|
||||
<!-- <span class="content-span">国内外政策</span>-->
|
||||
<!--</div>-->
|
||||
<div class="content-top" @click="standChange('bussstand')">
|
||||
<div class="content-box content-box3" style="margin-left: 0.2em"></div>
|
||||
<span class="content-span">企业标准</span>
|
||||
</div>
|
||||
<div class="content-top" @click="standChange('DYNAMIC')">
|
||||
<div class="content-box content-box4"></div>
|
||||
|
||||
@@ -72,7 +72,12 @@
|
||||
</div>
|
||||
</van-tab>
|
||||
<van-tab name="ZLZX" title="资料中心">
|
||||
<div class="card-box" ref="cardBoxTwo" @scroll="scroolThree">
|
||||
<van-search v-model="currentSearch.name" show-action clearable placeholder="请输入搜索关键词" @focus="onFocus" >
|
||||
<template #action>
|
||||
<div @click="onCancel">取消</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<div class="card-box-three" ref="cardBoxThree" @scroll="scroolThree">
|
||||
<div v-if="loading">
|
||||
<van-loading size="24px" color="#3170A8">加载中...</van-loading>
|
||||
</div>
|
||||
@@ -108,13 +113,18 @@
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
<folderPopup ref="folderPopupRef" @checked="setChecked" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import folderPopup from "./components/folderPopup";
|
||||
export default {
|
||||
name: "standDynamics",
|
||||
components: {
|
||||
folderPopup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: "",
|
||||
@@ -127,7 +137,8 @@ export default {
|
||||
loading: true,
|
||||
scrolled: "",
|
||||
moreFlag: false,
|
||||
listFlag: false
|
||||
listFlag: false,
|
||||
currentSearch: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -162,12 +173,11 @@ export default {
|
||||
}
|
||||
},
|
||||
scroolThree() {
|
||||
this.scrolled = this.$refs.cardBoxTwo.scrollTop;
|
||||
console.log(this.$refs.cardBoxTwo.scrollTop);
|
||||
this.scrolled = this.$refs.cardBoxThree.scrollTop;
|
||||
//获得可视区的高度
|
||||
const windowHeight = this.$refs.cardBoxTwo.clientHeight;
|
||||
const windowHeight = this.$refs.cardBoxThree.clientHeight;
|
||||
//获取滚动条的总高度
|
||||
const scrollHeight = this.$refs.cardBoxTwo.scrollHeight;
|
||||
const scrollHeight = this.$refs.cardBoxThree.scrollHeight;
|
||||
let windowScrolled = this.scrolled + windowHeight;
|
||||
if (scrollHeight - windowScrolled < 100 && this.scrolled !== 0) {
|
||||
//把距离顶部的距离加上可视区域的高度
|
||||
@@ -222,36 +232,37 @@ export default {
|
||||
this.standList = [];
|
||||
this.standardReleaseList = [];
|
||||
if (this.messageType == "ZLZX") {
|
||||
this.getAdvice();
|
||||
this.getAdvice(true);
|
||||
} else {
|
||||
this.onDynamics();
|
||||
}
|
||||
},
|
||||
//获取数据
|
||||
getAdvice() {
|
||||
this.$http.get("fileMaterialCenter/file-material/getFileMaterialIndex", {
|
||||
page: this.page,
|
||||
pageSize: 10
|
||||
getAdvice(first = false) {
|
||||
this.listFlag = false;
|
||||
this.$http.get("fileMaterialCenter/file-material", {
|
||||
page: first ? 1 : this.page,
|
||||
pageSize: 10,
|
||||
treeId: this.currentSearch.id || ''
|
||||
}, {
|
||||
_this: this, loading: "loading"
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
let mList = res.data;
|
||||
let mList = res.data.records || [];
|
||||
if (mList.length) {
|
||||
if (this.standardReleaseList.length) {
|
||||
if (!first && this.standardReleaseList.length) {
|
||||
this.standardReleaseList = this.standardReleaseList.concat(mList);
|
||||
} else {
|
||||
this.standardReleaseList = mList;
|
||||
}
|
||||
this.loading = false;
|
||||
} else {
|
||||
this.loading = false;
|
||||
this.standardReleaseList = [];
|
||||
this.listFlag = true;
|
||||
}
|
||||
} else {
|
||||
this.standardReleaseList = [];
|
||||
this.loading = false;
|
||||
}
|
||||
this.loading = false;
|
||||
}, e => {
|
||||
this.standardReleaseList = [];
|
||||
this.total = 0;
|
||||
@@ -292,6 +303,17 @@ export default {
|
||||
data.forEach(item => {
|
||||
this.$set(this.textStatusMap, item.value, item.label);
|
||||
});
|
||||
},
|
||||
onFocus () {
|
||||
this.$refs.folderPopupRef.open(this.currentSearch.id || null)
|
||||
},
|
||||
onCancel () {
|
||||
this.$set(this, 'currentSearch', {})
|
||||
this.getAdvice(true)
|
||||
},
|
||||
setChecked (currentData) {
|
||||
this.currentSearch = currentData
|
||||
this.getAdvice(true)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -375,6 +397,14 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
.card-box-three {
|
||||
height: calc(85% - 54px);
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
width: 95%;
|
||||
height: auto;
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
title="标准体系"
|
||||
:visible.sync="isShow"
|
||||
direction="rtl"
|
||||
:size="600"
|
||||
:before-close="handleCancel">
|
||||
<div class="popup-main">
|
||||
<standSystemTree ref="standardSystemTreeRef" @checkedKey="getCheckedKey"></standSystemTree>
|
||||
</div>
|
||||
<div class="popup-footer">
|
||||
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="handleOk">确定</el-button>
|
||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="handleCancel">取消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<!--<van-popup v-model="isShow"-->
|
||||
<!-- position="right"-->
|
||||
<!-- :style="{ height: '100%', width: '600px' }"-->
|
||||
<!-- :close-on-click-overlay="false"-->
|
||||
<!-- @click-overlay="handleCancel">-->
|
||||
<!-- <h3 class="popup-title">-->
|
||||
<!-- <span>标准体系</span>-->
|
||||
<!-- <van-icon name="cross" size="22px" @click="handleCancel" />-->
|
||||
<!-- </h3>-->
|
||||
<!-- <div class="popup-main">-->
|
||||
<!-- <standSystemTree ref="standardSystemTreeRef" @checkedKey="getCheckedKey"></standSystemTree>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="popup-footer">-->
|
||||
<!-- <el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="handleOk">确定</el-button>-->
|
||||
<!-- <el-button class="common-button-default" size="mini" icon="el-icon-close" @click="handleCancel">取消</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!--</van-popup>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import standSystemTree from "./standSystemTree";
|
||||
export default {
|
||||
name: "standSystemModel",
|
||||
components: {
|
||||
standSystemTree,
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isShow: false,
|
||||
checkedKeys: [], // 选择的标准体系
|
||||
}
|
||||
},
|
||||
props: {
|
||||
// 以前的选中项
|
||||
initKeys: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.isShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.standardSystemTreeRef.setCheckedKeys(this.initKeys)
|
||||
})
|
||||
},
|
||||
hide () {
|
||||
this.isShow = false
|
||||
},
|
||||
getCheckedKey (val) {
|
||||
this.checkedKeys = val
|
||||
},
|
||||
handleOk () {
|
||||
this.hide()
|
||||
this.$emit('standSystemKeys', this.checkedKeys)
|
||||
},
|
||||
handleCancel () {
|
||||
this.hide()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/*.popup-title{*/
|
||||
/* line-height: 1rem;*/
|
||||
/* border-bottom: 1px solid #e5e5e5;*/
|
||||
/* padding: 0 0.3rem;*/
|
||||
/* display: flex;*/
|
||||
/* justify-content: space-between;*/
|
||||
/* align-items: center;*/
|
||||
/*}*/
|
||||
.popup-main{
|
||||
height: calc(100vh - 1rem - 50px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.popup-footer{
|
||||
border-top: 1px solid #e8e8e8;
|
||||
text-align: right;
|
||||
padding-right: 0.2rem;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
/*position: fixed;*/
|
||||
/*bottom: 1px;*/
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<el-tree class="popup-tree" ref="tree" :data="data" :props="defaultProps"
|
||||
:lazy="false"
|
||||
:show-checkbox="true"
|
||||
node-key="id"
|
||||
:check-strictly="true"
|
||||
:expand-on-click-node="false"
|
||||
:check-on-click-node="true"
|
||||
:default-checked-keys="defaultCheckedKeys"
|
||||
:highlight-current="true"
|
||||
@node-click="handleNodeClick"
|
||||
@check-change="handleCheckChange">
|
||||
</el-tree>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "standSystemTree",
|
||||
data () {
|
||||
return {
|
||||
data: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'menuName'
|
||||
},
|
||||
defaultCheckedKeys: [],
|
||||
checkedKeys: []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getStandardSystem()
|
||||
},
|
||||
methods: {
|
||||
getStandardSystem () {
|
||||
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
|
||||
if (res.ok && res.data) {
|
||||
this.data = res.data.TXLBBUSS // 标准体系
|
||||
}
|
||||
})
|
||||
},
|
||||
handleNodeClick (data, node, element) {
|
||||
// console.log(data, node, element)
|
||||
},
|
||||
handleCheckChange (data, isChecked, childIsChecked) {
|
||||
const id = data.id
|
||||
if (isChecked) {
|
||||
if (!this.checkedKeys.some(key => key === id)) {
|
||||
this.checkedKeys = [...this.checkedKeys, id]
|
||||
}
|
||||
} else {
|
||||
if (this.checkedKeys.some(key => key === id)) {
|
||||
this.checkedKeys = this.checkedKeys.filter(key => key !== id)
|
||||
}
|
||||
}
|
||||
this.$emit('checkedKey', this.checkedKeys)
|
||||
},
|
||||
setCheckedKeys (keys) {
|
||||
this.$refs.tree.setCheckedKeys(keys)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.popup-tree{
|
||||
/deep/ .el-tree-node__expand-icon{
|
||||
font-size: 20px;
|
||||
}
|
||||
/deep/ .el-tree-node__label{
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -89,6 +89,13 @@
|
||||
<!-- <el-button type="primary" size="small" @click="exportSearchResult" class="common-button-default export-button"-->
|
||||
<!-- round><i class="iconfont"></i>导出</el-button>-->
|
||||
</div>
|
||||
<div class="operate-area" style="padding: 0 10px 10px 10px">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="openStandSystemModel">选择标准体系
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="selection"
|
||||
:data="resultData"
|
||||
@@ -338,6 +345,7 @@
|
||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<standSystemModel ref="standSystemModelRef" :init-keys="standSystemKeys" @standSystemKeys="setStandSystemKeys" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -349,6 +357,7 @@
|
||||
import '../../../assets/zTree/js/jquery.ztree.exedit.js'
|
||||
// import deptTree from '../../processCenter/pages/components/deptTree'
|
||||
import {dateFormat} from '@/common/date'
|
||||
import standSystemModel from "./components/standSystemModel";
|
||||
export default {
|
||||
name: 'StandardSearch',
|
||||
filters: {
|
||||
@@ -362,6 +371,7 @@
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
standSystemKeys: [],
|
||||
selectType: '',
|
||||
externalStatus:'',
|
||||
itermsConditionsTitle1: '',
|
||||
@@ -502,7 +512,18 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openStandSystemModel () {
|
||||
this.$refs.standSystemModelRef.open()
|
||||
},
|
||||
setStandSystemKeys(standSystemKeys){
|
||||
this.standSystemKeys = standSystemKeys
|
||||
this.searchSarBykey()
|
||||
},
|
||||
resetStandSystemKeys () {
|
||||
this.standSystemKeys = []
|
||||
},
|
||||
searchClick(type) {
|
||||
this.resetStandSystemKeys()
|
||||
this.selectType = type
|
||||
this.searchSarByInputKey()
|
||||
},
|
||||
@@ -809,6 +830,7 @@
|
||||
* @date: 2018/12/19 11:38:21
|
||||
*/
|
||||
optChecked (key, value) {
|
||||
this.resetStandSystemKeys()
|
||||
console.log(value)
|
||||
console.log(this.selectIndex)
|
||||
if (value === 'All') {
|
||||
@@ -1508,6 +1530,7 @@
|
||||
condition.selectValue = ''
|
||||
}
|
||||
condition.selectType = this.selectType
|
||||
condition.standSystem = this.standSystemKeys // 标准体系id
|
||||
this.$http.post('search/searchCenter/searchSarBykey', condition, {
|
||||
_this: this,
|
||||
loading: 'resultLoading'
|
||||
@@ -2661,6 +2684,7 @@
|
||||
}
|
||||
},
|
||||
components: {
|
||||
standSystemModel,
|
||||
// deptTree,
|
||||
PersonalCenter
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user