修改搜索中心的问题
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
:tree-data="gData"
|
||||
@select="onSelect"
|
||||
@check="onCheck"
|
||||
@expand="onExpand"
|
||||
:defaultExpandedKeys="defaultExpandedKeys"
|
||||
>
|
||||
</a-tree>
|
||||
</div>
|
||||
@@ -49,6 +51,9 @@
|
||||
expandedKeys:[],
|
||||
visible: false,
|
||||
confirmLoading:false,
|
||||
departId:'',
|
||||
selectedKey: [],
|
||||
userIds:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -56,13 +61,16 @@
|
||||
},
|
||||
methods:{
|
||||
standardClick() {
|
||||
this.departId = ''
|
||||
this.userIds = []
|
||||
this.visible = true
|
||||
},
|
||||
onSelect(selectedKeys, info) {
|
||||
console.log('selected', selectedKeys, info);
|
||||
this.selectedKey = selectedKeys
|
||||
},
|
||||
|
||||
onCheck(checkedKeys, info) {
|
||||
console.log('onCheck', checkedKeys, info);
|
||||
this.userIds = checkedKeys
|
||||
},
|
||||
handleCancel(){
|
||||
this.visible = false
|
||||
@@ -75,6 +83,15 @@
|
||||
},
|
||||
onChange(){
|
||||
|
||||
},
|
||||
onExpand(selectedKeys, val) {
|
||||
if (val.expanded) {
|
||||
if (this.departId == val.node.value) {
|
||||
} else {
|
||||
this.departId = val.node.value
|
||||
this.queryDepartUserTreeList()
|
||||
}
|
||||
}
|
||||
},
|
||||
queryDepartUserTreeList() {
|
||||
this.confirmLoading = true
|
||||
|
||||
@@ -297,7 +297,9 @@
|
||||
selectModel: '',
|
||||
fileList: [],
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
queryParamSeach: ''
|
||||
queryParamSeach: '',
|
||||
mapOne: {},
|
||||
mapTwo: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -428,9 +430,20 @@
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.queryParamSeach = ''
|
||||
this.getInfoList()
|
||||
this.getInfoList(1)
|
||||
},
|
||||
searchQuery() {
|
||||
this.ParamSeach()
|
||||
this.pageNo = 1
|
||||
this.getInfoList(1)
|
||||
},
|
||||
treeChange(value, text) {
|
||||
this.queryParam[this.db_field_name + '_name'] = text
|
||||
},
|
||||
treeClick(db_field_name) {
|
||||
this.db_field_name = db_field_name
|
||||
},
|
||||
ParamSeach() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
this.queryParamSeach = ''
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
@@ -442,28 +455,25 @@
|
||||
}
|
||||
})
|
||||
this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1)
|
||||
this.pageNo = 1
|
||||
this.getInfoList()
|
||||
},
|
||||
treeChange(value, text) {
|
||||
this.queryParam[this.db_field_name + '_name'] = text
|
||||
},
|
||||
treeClick(db_field_name) {
|
||||
this.db_field_name = db_field_name
|
||||
},
|
||||
searchData(data, selectModel) {
|
||||
this.queryParam = { ...this.queryParam, ...data }
|
||||
this.selectModel = selectModel
|
||||
this.getInfoList()
|
||||
this.ParamSeach()
|
||||
this.pageNo = 1
|
||||
this.getInfoList(1)
|
||||
},
|
||||
searchDataTwo(value) {
|
||||
this.queryParam.selectValueTwo = value
|
||||
this.getInfoList()
|
||||
searchDataTwo(data, selectModel) {
|
||||
this.queryParam = { ...this.queryParam, ...data }
|
||||
this.selectModel = selectModel
|
||||
this.ParamSeach()
|
||||
this.pageNo = 1
|
||||
this.getInfoList(2)
|
||||
},
|
||||
changeQuery(val, name) {
|
||||
this.queryParam[name + '_name'] = val
|
||||
},
|
||||
getInfoList() {
|
||||
getInfoList(num) {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
if (queryParam[val] instanceof Array) {
|
||||
@@ -473,13 +483,21 @@
|
||||
delete queryParam[val]
|
||||
}
|
||||
})
|
||||
if (num == 1) {
|
||||
this.mapOne = queryParam
|
||||
} else if (num == 2) {
|
||||
this.mapTwo = queryParam
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
this.mapTwo.ids = selectedRowKeys.join(',')
|
||||
}
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...queryParam
|
||||
mapOne: this.mapOne,
|
||||
mapTwo: this.mapTwo
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.getInfoList, query).then((res) => {
|
||||
postAction(this.url.getInfoList, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records
|
||||
this.dataSource.forEach((val) => {
|
||||
@@ -521,7 +539,11 @@
|
||||
titleClick(item) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/docManage/library/detail',
|
||||
query: item
|
||||
query: {
|
||||
id: item.id,
|
||||
title: item.title,
|
||||
serial_number: item.serial_number
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
|
||||
@@ -128,7 +128,6 @@
|
||||
}
|
||||
})
|
||||
this.loading = true
|
||||
console.log(this.checkboxText)
|
||||
let checkboxText = JSON.parse(JSON.stringify(this.checkboxText))
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
@@ -149,7 +148,11 @@
|
||||
titleClick(item) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/docManage/library/detail',
|
||||
query: item
|
||||
query: {
|
||||
id:item.id,
|
||||
title:item.title,
|
||||
serial_number:item.serial_number
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<a-input-search
|
||||
allowClear
|
||||
v-model="selectValueTwo"
|
||||
style="width: calc(100% - 88px)"
|
||||
style="width: calc(100% - 128px)"
|
||||
placeholder="请输入搜索内容"
|
||||
@search="onSearch"
|
||||
></a-input-search>
|
||||
@@ -97,7 +97,8 @@
|
||||
if (this.$refs.wholeRef) {
|
||||
this.$refs.wholeRef.searchDataTwo(event)
|
||||
} else if (this.$refs.DocumentLibraryRef) {
|
||||
this.$refs.DocumentLibraryRef.searchDataTwo(event)
|
||||
this.queryParam[this.selectModel] = event
|
||||
this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam,this.selectModel)
|
||||
}
|
||||
},
|
||||
getCondition() {
|
||||
@@ -183,7 +184,7 @@
|
||||
}
|
||||
|
||||
.input-group .ant-select-selection {
|
||||
width: 88px;
|
||||
width: 128px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 0 0 6px;
|
||||
|
||||
Reference in New Issue
Block a user