pc端-搜索中心-添加标准体系
This commit is contained in:
@@ -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"-->
|
<!-- <el-button type="primary" size="small" @click="exportSearchResult" class="common-button-default export-button"-->
|
||||||
<!-- round><i class="iconfont"></i>导出</el-button>-->
|
<!-- round><i class="iconfont"></i>导出</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
|
<div class="operate-area" style="padding: 0 10px 10px 10px">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
@click="openStandSystemModel">选择标准体系
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="selection"
|
ref="selection"
|
||||||
:data="resultData"
|
:data="resultData"
|
||||||
@@ -338,6 +345,7 @@
|
|||||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
|
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<standSystemModel ref="standSystemModelRef" :init-keys="standSystemKeys" @standSystemKeys="setStandSystemKeys" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -349,6 +357,7 @@
|
|||||||
import '../../../assets/zTree/js/jquery.ztree.exedit.js'
|
import '../../../assets/zTree/js/jquery.ztree.exedit.js'
|
||||||
// import deptTree from '../../processCenter/pages/components/deptTree'
|
// import deptTree from '../../processCenter/pages/components/deptTree'
|
||||||
import {dateFormat} from '@/common/date'
|
import {dateFormat} from '@/common/date'
|
||||||
|
import standSystemModel from "./components/standSystemModel";
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardSearch',
|
name: 'StandardSearch',
|
||||||
filters: {
|
filters: {
|
||||||
@@ -362,6 +371,7 @@
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
standSystemKeys: [],
|
||||||
selectType: '',
|
selectType: '',
|
||||||
externalStatus:'',
|
externalStatus:'',
|
||||||
itermsConditionsTitle1: '',
|
itermsConditionsTitle1: '',
|
||||||
@@ -502,7 +512,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
openStandSystemModel () {
|
||||||
|
this.$refs.standSystemModelRef.open()
|
||||||
|
},
|
||||||
|
setStandSystemKeys(standSystemKeys){
|
||||||
|
this.standSystemKeys = standSystemKeys
|
||||||
|
this.searchSarBykey()
|
||||||
|
},
|
||||||
|
resetStandSystemKeys () {
|
||||||
|
this.standSystemKeys = []
|
||||||
|
},
|
||||||
searchClick(type) {
|
searchClick(type) {
|
||||||
|
this.resetStandSystemKeys()
|
||||||
this.selectType = type
|
this.selectType = type
|
||||||
this.searchSarByInputKey()
|
this.searchSarByInputKey()
|
||||||
},
|
},
|
||||||
@@ -809,6 +830,7 @@
|
|||||||
* @date: 2018/12/19 11:38:21
|
* @date: 2018/12/19 11:38:21
|
||||||
*/
|
*/
|
||||||
optChecked (key, value) {
|
optChecked (key, value) {
|
||||||
|
this.resetStandSystemKeys()
|
||||||
console.log(value)
|
console.log(value)
|
||||||
console.log(this.selectIndex)
|
console.log(this.selectIndex)
|
||||||
if (value === 'All') {
|
if (value === 'All') {
|
||||||
@@ -1508,6 +1530,7 @@
|
|||||||
condition.selectValue = ''
|
condition.selectValue = ''
|
||||||
}
|
}
|
||||||
condition.selectType = this.selectType
|
condition.selectType = this.selectType
|
||||||
|
condition.standSystem = this.standSystemKeys // 标准体系id
|
||||||
this.$http.post('search/searchCenter/searchSarBykey', condition, {
|
this.$http.post('search/searchCenter/searchSarBykey', condition, {
|
||||||
_this: this,
|
_this: this,
|
||||||
loading: 'resultLoading'
|
loading: 'resultLoading'
|
||||||
@@ -2661,6 +2684,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
standSystemModel,
|
||||||
// deptTree,
|
// deptTree,
|
||||||
PersonalCenter
|
PersonalCenter
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user