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