|
@ -50,6 +50,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<el-tree |
|
|
<el-tree |
|
|
ref="treeClassify" |
|
|
ref="treeClassify" |
|
|
|
|
|
v-loading="classifyLoading" |
|
|
:data="classifyOptions" |
|
|
:data="classifyOptions" |
|
|
show-checkbox |
|
|
show-checkbox |
|
|
default-expand-all |
|
|
default-expand-all |
|
@ -71,7 +72,7 @@ |
|
|
:data="levelOptions" |
|
|
:data="levelOptions" |
|
|
show-checkbox |
|
|
show-checkbox |
|
|
default-expand-all |
|
|
default-expand-all |
|
|
node-key="id" |
|
|
|
|
|
|
|
|
node-key="value" |
|
|
:props="{children: 'children', label: 'label'}" |
|
|
:props="{children: 'children', label: 'label'}" |
|
|
:filter-node-method="filterLevelNode" |
|
|
:filter-node-method="filterLevelNode" |
|
|
@check-change="getLevelCheckedKeys" |
|
|
@check-change="getLevelCheckedKeys" |
|
@ -97,17 +98,17 @@ |
|
|
</el-select> --> |
|
|
</el-select> --> |
|
|
<div class="search-input"> |
|
|
<div class="search-input"> |
|
|
<el-input v-model="keywords" placeholder="请输入检索关键字" class="input-with-select"> |
|
|
<el-input v-model="keywords" placeholder="请输入检索关键字" class="input-with-select"> |
|
|
<el-button slot="append" icon="el-icon-search" @click="handleSearch">搜索</el-button> |
|
|
|
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="handledResultSearch">搜索</el-button> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</div> |
|
|
</div> |
|
|
<span class="change-search" @click="returnAdvanced">高级检索</span> |
|
|
<span class="change-search" @click="returnAdvanced">高级检索</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="search-tip"> |
|
|
|
|
|
|
|
|
<div v-if="tipShow" class="search-tip"> |
|
|
<div v-if="isCommon">检索 “<span>{{ keywords }}</span>” 成功获得<i>{{ page.total }}</i>条结果</div> |
|
|
<div v-if="isCommon">检索 “<span>{{ keywords }}</span>” 成功获得<i>{{ page.total }}</i>条结果</div> |
|
|
<div v-else>检索成功获得<i>{{ page.total }}</i>条结果<p>高级检索 点击查看检索条件</p></div> |
|
|
<div v-else>检索成功获得<i>{{ page.total }}</i>条结果<p>高级检索 点击查看检索条件</p></div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="result-list"> |
|
|
|
|
|
|
|
|
<div v-if="resultData.length !== 0" v-loading="resultLoading" class="result-list"> |
|
|
<div v-for="(item,index) in resultData" :key="index" class="result-item" @dblclick="handleDetail"> |
|
|
<div v-for="(item,index) in resultData" :key="index" class="result-item" @dblclick="handleDetail"> |
|
|
<div class="result-item-title"><span>案卷</span><p>{{ item.maintitle }}</p></div> |
|
|
<div class="result-item-title"><span>案卷</span><p>{{ item.maintitle }}</p></div> |
|
|
<p class="result-item-content" v-html="highlightKeywords(item.matekey)" /> |
|
|
<p class="result-item-content" v-html="highlightKeywords(item.matekey)" /> |
|
@ -130,18 +131,19 @@ |
|
|
<i class="iconfont icon-jiarujieyueche" @click.stop="addLending" /> |
|
|
<i class="iconfont icon-jiarujieyueche" @click.stop="addLending" /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!--分页组件--> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
v-if="resultData.length !== 0" |
|
|
|
|
|
:current-page="page.page" |
|
|
|
|
|
:total="page.total" |
|
|
|
|
|
:page-size="page.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
layout="total, prev, pager, next, sizes" |
|
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
|
@current-change="handleCurrentPage" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<!--分页组件--> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
v-if="resultData.length !== 0" |
|
|
|
|
|
:current-page="page.page" |
|
|
|
|
|
:total="page.total" |
|
|
|
|
|
:page-size="page.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
layout="total, prev, pager, next, sizes" |
|
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
|
@current-change="handleCurrentPage" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-empty v-else description="暂无更多数据" /> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 档案详情 --> |
|
|
<!-- 档案详情 --> |
|
|
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" /> |
|
|
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" /> |
|
@ -149,9 +151,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script > |
|
|
<script > |
|
|
import { FetchFondsAll } from '@/api/system/fonds' |
|
|
|
|
|
import { FetchCategoryMenu } from '@/api/system/category/category' |
|
|
|
|
|
import { FetchResearch } from '@/api/archiveUtilize/archiveUtilize' |
|
|
|
|
|
|
|
|
import { FetchInitSearchFonds, FetchInitSearchCategory, FetchInitSearchArchiveCtgNo, FetchResearch } from '@/api/archiveUtilize/archiveUtilize' |
|
|
import ArchivesInfo from '@/views/components/archivesDetail/detail.vue' |
|
|
import ArchivesInfo from '@/views/components/archivesDetail/detail.vue' |
|
|
import { mapGetters } from 'vuex' |
|
|
import { mapGetters } from 'vuex' |
|
|
export default { |
|
|
export default { |
|
@ -231,7 +231,6 @@ export default { |
|
|
], |
|
|
], |
|
|
status: null, |
|
|
status: null, |
|
|
keywords: '', |
|
|
keywords: '', |
|
|
str: '《福建省电力零售市场购售电合同》(以下简称《合同文本》)适用于福建省电力市场零售用户与售电公司之间签订的零售市场购售电合同...在本合同履行期限届满之前,因一方原因导致合同不能继续履行,另一方可在履行期限届满前解除合同并要求其承担相应的违约责任...9.2 本合同部分条款的无效,不影响其他条款及本合同的效力。...七、争议的解决方式凡因执行本合同所发生的与本合同有关的一切争议...九、合同生效及其他9.1 本合同范本在福建省电力交易中心平台上公示...', |
|
|
|
|
|
selectedCategory: { |
|
|
selectedCategory: { |
|
|
id: 'DAAC5ED3F86D6481C3C1A5', |
|
|
id: 'DAAC5ED3F86D6481C3C1A5', |
|
|
arrangeType: 3 |
|
|
arrangeType: 3 |
|
@ -248,7 +247,10 @@ export default { |
|
|
categoryKeys: null, |
|
|
categoryKeys: null, |
|
|
classifysKeys: null, |
|
|
classifysKeys: null, |
|
|
levelsKeys: null, |
|
|
levelsKeys: null, |
|
|
resultData: [] |
|
|
|
|
|
|
|
|
resultData: [], |
|
|
|
|
|
classifyLoading: false, |
|
|
|
|
|
resultLoading: false, |
|
|
|
|
|
tipShow: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -273,6 +275,7 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.getFondsDatas() |
|
|
this.getFondsDatas() |
|
|
this.getCategoryDataTree() |
|
|
this.getCategoryDataTree() |
|
|
|
|
|
this.getArchiveCtgNo(null) |
|
|
console.log(localStorage.getItem('searchKeywords')) |
|
|
console.log(localStorage.getItem('searchKeywords')) |
|
|
if (localStorage.getItem('searchKeywords')) { |
|
|
if (localStorage.getItem('searchKeywords')) { |
|
|
this.keywords = localStorage.getItem('searchKeywords') |
|
|
this.keywords = localStorage.getItem('searchKeywords') |
|
@ -280,6 +283,9 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
highlightKeywords(text) { |
|
|
highlightKeywords(text) { |
|
|
|
|
|
if (!text) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
const cleanedText = text.replace(/,/g, ' ') // 将逗号替换为空格 |
|
|
const cleanedText = text.replace(/,/g, ' ') // 将逗号替换为空格 |
|
|
if (this.keywords.includes(' ')) { |
|
|
if (this.keywords.includes(' ')) { |
|
|
// 包含多个关键字时,使用正则表达式匹配并标红 |
|
|
// 包含多个关键字时,使用正则表达式匹配并标红 |
|
@ -295,61 +301,84 @@ export default { |
|
|
return highlightedText |
|
|
return highlightedText |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
handleSearch() { |
|
|
|
|
|
const params = { |
|
|
|
|
|
'keywords': this.keywords, |
|
|
|
|
|
'archiveCtgNos': this.classifysKeys, // 档案分类 |
|
|
|
|
|
'categoryIds': this.categoryKeys, // 档案门类 |
|
|
|
|
|
'categoryLevel': this.levelsKeys, // 档案层级 |
|
|
|
|
|
'fondsNos': this.fondsKeys, // 全宗 |
|
|
|
|
|
'searchFondsId': this.user.fonds.id, |
|
|
|
|
|
'page': this.page.page - 1, |
|
|
|
|
|
'size': this.page.size |
|
|
|
|
|
|
|
|
handledResultSearch() { |
|
|
|
|
|
if (this.keywords) { |
|
|
|
|
|
this.resultLoading = true |
|
|
|
|
|
this.tipShow = true |
|
|
|
|
|
const params = { |
|
|
|
|
|
'keywords': this.keywords, |
|
|
|
|
|
'archiveCtgNos': this.classifysKeys, // 档案分类 |
|
|
|
|
|
'categoryIds': this.categoryKeys, // 档案门类 |
|
|
|
|
|
'categoryLevel': this.levelsKeys, // 档案层级 |
|
|
|
|
|
'fondsNos': this.fondsKeys, // 全宗 |
|
|
|
|
|
'searchFondsId': this.user.fonds.id, |
|
|
|
|
|
'page': this.page.page - 1, |
|
|
|
|
|
'size': this.page.size |
|
|
|
|
|
} |
|
|
|
|
|
console.log(params) |
|
|
|
|
|
FetchResearch(params).then((res) => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
this.resultData = res.content |
|
|
|
|
|
this.page.total = res.totalElements |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.resultLoading = false |
|
|
|
|
|
}, 600) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.tipShow = false |
|
|
|
|
|
this.$message({ message: '请输入检索关键字段', type: 'error', offset: 8 }) |
|
|
} |
|
|
} |
|
|
console.log(params) |
|
|
|
|
|
FetchResearch(params).then((res) => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
this.resultData = res.content |
|
|
|
|
|
this.page.total = res.totalElements |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
getFondsDatas() { |
|
|
getFondsDatas() { |
|
|
FetchFondsAll().then(res => { |
|
|
|
|
|
|
|
|
FetchInitSearchFonds().then(res => { |
|
|
this.fondsOptions = res |
|
|
this.fondsOptions = res |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
filterData(data) { |
|
|
|
|
|
const result = [] |
|
|
|
|
|
for (const node of data) { |
|
|
|
|
|
if (node.isType === 2) { |
|
|
|
|
|
const filteredChildren = node.children.filter(child => child.isType !== 3) |
|
|
|
|
|
node.children = filteredChildren |
|
|
|
|
|
result.push(node) |
|
|
|
|
|
} else if (node.children && node.children.length > 0) { |
|
|
|
|
|
const filteredChildren = this.filterData(node.children) |
|
|
|
|
|
result.push(...filteredChildren) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return result |
|
|
|
|
|
|
|
|
// filterData(data) { |
|
|
|
|
|
// const result = [] |
|
|
|
|
|
// for (const node of data) { |
|
|
|
|
|
// if (node.isType === 2) { |
|
|
|
|
|
// const filteredChildren = node.children.filter(child => child.isType !== 3) |
|
|
|
|
|
// node.children = filteredChildren |
|
|
|
|
|
// result.push(node) |
|
|
|
|
|
// } else if (node.children && node.children.length > 0) { |
|
|
|
|
|
// const filteredChildren = this.filterData(node.children) |
|
|
|
|
|
// result.push(...filteredChildren) |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// return result |
|
|
|
|
|
// }, |
|
|
|
|
|
// filterArchivesClasses(data, result = []) { |
|
|
|
|
|
// if (data && data.length > 0) { |
|
|
|
|
|
// for (let i = 0; i < data.length; i++) { |
|
|
|
|
|
// const archivesClasses = data[i].archivesClasses |
|
|
|
|
|
// if (archivesClasses && archivesClasses.length > 0) { |
|
|
|
|
|
// result.push(...archivesClasses) |
|
|
|
|
|
// } |
|
|
|
|
|
// this.filterArchivesClasses(data[i].children, result) |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// return result |
|
|
|
|
|
// }, |
|
|
|
|
|
getCategoryDataTree() { |
|
|
|
|
|
FetchInitSearchCategory().then(res => { |
|
|
|
|
|
this.categoryOptions = res |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
filterArchivesClasses(data, result = []) { |
|
|
|
|
|
if (data && data.length > 0) { |
|
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
|
|
const archivesClasses = data[i].archivesClasses |
|
|
|
|
|
if (archivesClasses && archivesClasses.length > 0) { |
|
|
|
|
|
result.push(...archivesClasses) |
|
|
|
|
|
} |
|
|
|
|
|
this.filterArchivesClasses(data[i].children, result) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
getArchiveCtgNo(categoryIds) { |
|
|
|
|
|
this.classifyOptions = [] |
|
|
|
|
|
this.classifyLoading = true |
|
|
|
|
|
const params = { |
|
|
|
|
|
'categoryIds': categoryIds, |
|
|
|
|
|
'search': null |
|
|
} |
|
|
} |
|
|
return result |
|
|
|
|
|
}, |
|
|
|
|
|
getCategoryDataTree() { |
|
|
|
|
|
FetchCategoryMenu().then(res => { |
|
|
|
|
|
this.categoryOptions = this.filterData(res) |
|
|
|
|
|
this.classifyOptions = this.filterArchivesClasses(res) |
|
|
|
|
|
|
|
|
FetchInitSearchArchiveCtgNo(params).then(res => { |
|
|
|
|
|
this.classifyOptions = res |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.classifyLoading = false |
|
|
|
|
|
}, 600) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleChange(val) { |
|
|
handleChange(val) { |
|
@ -373,12 +402,21 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getFondsCheckedKeys() { |
|
|
getFondsCheckedKeys() { |
|
|
const checkedKeys = this.$refs.tree.getCheckedNodes() |
|
|
const checkedKeys = this.$refs.tree.getCheckedNodes() |
|
|
this.fondsKeys = checkedKeys.map(item => item.id) |
|
|
|
|
|
|
|
|
if (checkedKeys.length === 0) { |
|
|
|
|
|
this.fondsKeys = null |
|
|
|
|
|
} else { |
|
|
|
|
|
this.fondsKeys = checkedKeys.map(item => item.fondsId) |
|
|
|
|
|
} |
|
|
console.log('fondsKeys', this.fondsKeys) |
|
|
console.log('fondsKeys', this.fondsKeys) |
|
|
}, |
|
|
}, |
|
|
getCategoryCheckedKeys() { |
|
|
getCategoryCheckedKeys() { |
|
|
const checkedKeys = this.$refs.treeCategory.getCheckedNodes() |
|
|
const checkedKeys = this.$refs.treeCategory.getCheckedNodes() |
|
|
this.categoryKeys = checkedKeys.map(item => item.id) |
|
|
|
|
|
|
|
|
if (checkedKeys.length === 0) { |
|
|
|
|
|
this.categoryKeys = null |
|
|
|
|
|
} else { |
|
|
|
|
|
this.categoryKeys = checkedKeys.map(item => item.id) |
|
|
|
|
|
} |
|
|
|
|
|
this.getArchiveCtgNo(this.categoryKeys) |
|
|
console.log('categoryKeys', this.categoryKeys) |
|
|
console.log('categoryKeys', this.categoryKeys) |
|
|
}, |
|
|
}, |
|
|
checkAllChange() { |
|
|
checkAllChange() { |
|
@ -396,12 +434,20 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getClassifyCheckedKeys() { |
|
|
getClassifyCheckedKeys() { |
|
|
const checkedKeys = this.$refs.treeClassify.getCheckedNodes() |
|
|
const checkedKeys = this.$refs.treeClassify.getCheckedNodes() |
|
|
this.classifysKeys = checkedKeys.map(item => item.code) |
|
|
|
|
|
|
|
|
if (checkedKeys.length === 0) { |
|
|
|
|
|
this.classifysKeys = null |
|
|
|
|
|
} else { |
|
|
|
|
|
this.classifysKeys = checkedKeys.map(item => item.code) |
|
|
|
|
|
} |
|
|
console.log('classifysKeys', this.classifysKeys) |
|
|
console.log('classifysKeys', this.classifysKeys) |
|
|
}, |
|
|
}, |
|
|
getLevelCheckedKeys() { |
|
|
getLevelCheckedKeys() { |
|
|
const checkedKeys = this.$refs.treeLevel.getCheckedNodes() |
|
|
const checkedKeys = this.$refs.treeLevel.getCheckedNodes() |
|
|
this.levelsKeys = checkedKeys.map(item => item.value) |
|
|
|
|
|
|
|
|
if (checkedKeys.length === 0) { |
|
|
|
|
|
this.levelsKeys = null |
|
|
|
|
|
} else { |
|
|
|
|
|
this.levelsKeys = checkedKeys.map(item => item.value) |
|
|
|
|
|
} |
|
|
console.log('levelsKeys', this.levelsKeys) |
|
|
console.log('levelsKeys', this.levelsKeys) |
|
|
}, |
|
|
}, |
|
|
returnAdvanced() { |
|
|
returnAdvanced() { |
|
|