Browse Source

收集库接口补充/档案利用高级搜索交互

master
xuhuajiao 1 year ago
parent
commit
b242d57476
  1. 8
      src/api/collect/collect.js
  2. 310
      src/views/archiveUtilize/archiveSearch/index.vue
  3. 15
      src/views/collectReorganizi/batchConnection/index.vue
  4. 96
      src/views/collectReorganizi/batchConnection/module/form.vue
  5. 77
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue

8
src/api/collect/collect.js

@ -206,6 +206,14 @@ export function FetchReturnReDocument(data) {
}) })
} }
// 电子文件-目录下载
export function FetchCatalogDownload(params) {
return request({
url: 'api/collect/catalogDownload' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
})
}
export default { export default {
collectAdd, collectAdd,
collectEdit, collectEdit,

310
src/views/archiveUtilize/archiveSearch/index.vue

@ -41,34 +41,53 @@
</div> </div>
</div> </div>
<div v-else class="advanced-search"> <div v-else class="advanced-search">
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="100px">
<el-form-item label="字段名" prop="filedName">
<el-select v-model="form.filedName" placeholder="请选择">
<el-option
v-for="item in filedOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="运算符" prop="symbol">
<el-select v-model="form.symbol" placeholder="请选择">
<el-option
v-for="item in symbolOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="检索值" prop="keyWord">
<el-input v-model="form.keyWord" />
</el-form-item>
</el-form>
<div>
<el-button size="mini"><i class="iconfont icon-xinzeng" />新增</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left">重置</el-button>
<div class="advanced-search-main">
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="70px">
<el-form-item label="字段名" prop="field">
<el-select v-model="form.field" value-key="id">
<el-option v-for="item in fieldOptions" :key="item.id" :label="item.label" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="运算符" prop="symbol">
<el-select v-model="form.symbol" value-key="value" placeholder="请选择">
<el-option
v-for="item in symbolOptions"
:key="item.value"
:label="item.label"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item label="检索值" prop="keyWord" :rules="getKeywordRules">
<el-input v-model="form.keyWord" />
</el-form-item>
</el-form>
<div class="advanced-btn">
<el-button size="mini" @click="addConditionData"><i class="iconfont icon-xinzeng" />新增</el-button>
<el-button class="filter-refresh" size="mini" icon="el-icon-refresh-left">重置</el-button>
</div>
<div class="search-condition">
<h4> 检索条件</h4>
<div class="condition-main">
<div class="condition-left">
<el-button size="mini" :disabled="currentIndex===null"><i class="iconfont icon-shanchu" />删除</el-button>
<el-button size="mini" icon="el-icon-top" :disabled="currentIndex === 0" @click="moveUp(currentIndex)">上移</el-button>
<el-button size="mini" icon="el-icon-bottom" :disabled="currentIndex === conditionData.length - 1" @click="moveDown(currentIndex)">下移</el-button>
</div>
<ul class="condition-content">
<li v-for="(item, index) in conditionData" :key="index" :class="currentIndex===index ? 'active': ''" @click="selectCurrent(index)">
{{ item }}
</li>
</ul>
<div class="condition-right">
<el-button v-for="(item,index) in connectorList" :key="index" type="primary" size="mini" @click="addConnector(item)">{{ item }}</el-button>
</div>
</div>
</div>
</div>
<div class="adv-bottom">
<el-button slot="append" @click="handleAdvancedSearch"><i class="iconfont icon-sousuo" />搜索</el-button>
<div class="advanced-search-btn" @click="isCommon=!isCommon">普通检索</div>
</div> </div>
</div> </div>
</div> </div>
@ -78,6 +97,7 @@
</template> </template>
<script > <script >
import { FetchFindGroupType } from '@/api/system/field'
export default { export default {
name: 'ArchiveSearch', name: 'ArchiveSearch',
data() { data() {
@ -85,34 +105,143 @@ export default {
isCommon: true, isCommon: true,
keywords: '', keywords: '',
form: { form: {
filedName: null,
field: null,
symbol: null, symbol: null,
keyWord: null keyWord: null
}, },
filedOptions: [],
symbolOptions: [],
fieldOptions: [],
symbolOptions: [
{
label: '包含',
value: 'like'
},
{
label: '不包含',
value: 'not like'
},
{
label: '等于',
value: '='
},
{
label: '不等于',
value: '!='
},
{
label: '为空',
value: 'is null'
},
{
label: '不为空',
value: 'is not null'
},
{
label: '大于',
value: '>'
},
{
label: '大于等于',
value: '>='
},
{
label: '小于',
value: '<'
},
{
label: '小于等于',
value: '<='
}
],
rules: { rules: {
filedName: [
field: [
{ required: true, message: '请选择字段名', trigger: 'change' } { required: true, message: '请选择字段名', trigger: 'change' }
], ],
symbol: [ symbol: [
{ required: true, message: '请选择运算符', trigger: 'change' } { required: true, message: '请选择运算符', trigger: 'change' }
],
keyWord: [
{ required: true, message: '检索值不可为空', trigger: 'blur' }
] ]
},
conditionData: [],
currentIndex: null,
connectorList: ['并且', '或者', '(', ')']
}
},
computed: {
getKeywordRules() {
console.log(this.form.symbol)
if ((this.form.symbol && this.form.symbol.label === '为空') || (this.form.symbol && this.form.symbol.label === '不为空')) {
console.log('2222')
return []
} else {
return [{ required: true, message: '请输入检索值', trigger: 'blur' }]
} }
} }
}, },
mounted() { mounted() {
this.getFieldCommon()
}, },
methods: { methods: {
dimSearch() {
addConditionData() {
this.$refs.form.validate((valid) => {
if (valid) {
let str = ''
if ((this.form.symbol && this.form.symbol.label === '包含') || (this.form.symbol && this.form.symbol.label === '不包含')) {
str = `<span style="color:blue">${this.form.field.label}</span> <span style="color:green">${this.form.symbol.label}</span> "%" + <span style="color:red">${this.form.keyWord}</span> + "%"`
// str = this.form.field.label + ' ' + this.form.symbol.label + " '%" + this.form.keyWord + "%'"
} else {
str = `<span style="color:blue">${this.form.field.label}</span> <span style="color:green">${this.form.symbol.label}</span> <span style="color:red">${this.form.keyWord}</span>`
// str = this.form.field.label + ' ' + this.form.symbol.label + ' ' + this.form.keyWord
}
this.conditionData.push(str)
}
})
},
moveUp(index) {
if (index > 0) {
// [this.conditionData[index], this.conditionData[index - 1]] = [this.conditionData[index - 1], this.conditionData[index]]
const temp = this.conditionData[index]
this.conditionData[index] = this.conditionData[index - 1]
this.conditionData[index - 1] = temp
this.currentIndex = index - 1
}
},
moveDown(index) {
if (index < this.conditionData.length - 1) {
// [this.conditionData[index], this.conditionData[index + 1]] = [this.conditionData[index + 1], this.conditionData[index]]
const temp = this.conditionData[index]
this.conditionData[index] = this.conditionData[index + 1]
this.conditionData[index + 1] = temp
this.currentIndex = index + 1
}
},
selectCurrent(index) {
if (this.currentIndex === index) {
this.currentIndex = null
} else {
this.currentIndex = index
}
},
addConnector(item) {
this.conditionData.push(item)
},
getFieldCommon() {
FetchFindGroupType({ isType: 2 }).then((res) => {
if (res.length !== 0) {
this.fieldOptions = res.map((item, index) => {
const json = {}
json.id = item.id
json.label = item.fieldCnName
json.value = item.fieldName
return json
})
}
})
},
handleAdvancedSearch() {
},
dimSearch() {
}, },
handleSearch() { handleSearch() {
} }
} }
} }
@ -273,14 +402,115 @@ export default {
} }
} }
.advanced-search{
.advanced-search-main{
position: relative; position: relative;
width: 1010px; width: 1010px;
height: 350px;
// height: 350px;
margin: 0 auto; margin: 0 auto;
padding: 30px 40px;
background-color: #fff; background-color: #fff;
border-radius: 3px; border-radius: 3px;
z-index: 9999; z-index: 9999;
::v-deep .el-form--inline .el-form-item{
margin-right: 40px !important;
}
.advanced-btn{
display: flex;
justify-content: center;
text-align: center;
.el-button{
margin-top: 0;
}
}
.search-condition{
padding: 18px 0 24px 0;
margin-top: 20px;
background: #F6F9FF;
border-radius: 3px;
opacity: 1;
border: 1px dashed #DCDFE6;
h4{
width: 480px;
margin: 0 auto 17px auto;
padding-left: 33px;
color: #0C0E1E;
background: url('~@/assets/images/archives/icon-js.png') no-repeat left center;
background-size: 33px 28px;
}
}
.condition-main{
display: flex;
justify-content: center;
flex-wrap: nowrap;
.condition-left{
display: flex;
flex-direction: column;
justify-content: center;
.el-button{
width: 76px;
margin: 5px 0;
::v-deep i.el-icon-top,
::v-deep i.el-icon-bottom{
font-size: 16px;
font-weight: bold;
}
}
}
.condition-content{
width: 480px;
height: 160px;
margin: 0 10px;
background: #E6E8ED;
overflow: hidden;
overflow-y: scroll;
li{
height: 32px;
line-height: 32px;
font-size: 14px;
text-align: center;
background-color: #fff;
border-bottom: 1px solid #E6E8ED;
cursor: default;
&:hover,
&:focus,
&.active{
background-color: #E8F2FF;
}
}
}
.condition-right{
display: flex;
flex-direction: column;
justify-content: center;
.el-button{
width: 64px;
margin: 5px 0;
background-color: #0348F3;
color: #fff;
}
}
}
}
}
.adv-bottom{
position: relative;
display: flex;
flex-direction: column;
align-items: center;
margin: 31px auto 0 auto;
width: 96px;
z-index: 999999;
.el-button{
font-size: 16px;
background-color: #0348F3;
color: #fff;
}
.advanced-search-btn{
padding-top: 7px;
font-size: 14px;
color: #0348F3;
cursor: default;
} }
} }
</style> </style>

15
src/views/collectReorganizi/batchConnection/index.vue

@ -2,7 +2,7 @@
<div class="app-container archives-container"> <div class="app-container archives-container">
<div class="container-main" style="justify-content: flex-start;"> <div class="container-main" style="justify-content: flex-start;">
<CategoryTree ref="categoryTree" @nodeClick="handleNodeClick" /> <CategoryTree ref="categoryTree" @nodeClick="handleNodeClick" />
<div class="elect-cont-right">
<div v-if="currentCategory && currentCategory.isType !== 1" class="elect-cont-right">
<div class="connection-header collect-header"> <div class="connection-header collect-header">
<h4 class="is-anjuan">{{ currentCategory && currentCategory.cnName }} </h4> <h4 class="is-anjuan">{{ currentCategory && currentCategory.cnName }} </h4>
<div class="head-search"> <div class="head-search">
@ -11,7 +11,7 @@
</div> </div>
<crudOperation> <crudOperation>
<template v-slot:right> <template v-slot:right>
<el-button size="mini" :disabled="crud.selections.length === 0" @click="doLoalHitch(crud.selections)">
<el-button size="mini" @click="doLoalHitch">
<i class="iconfont icon-bendiguajie" /> <i class="iconfont icon-bendiguajie" />
本地挂接 本地挂接
</el-button> </el-button>
@ -43,7 +43,7 @@
<pagination v-if="crud.data.length !== 0" /> <pagination v-if="crud.data.length !== 0" />
</div> </div>
</div> </div>
<LocalForm ref="localForm" />
<LocalForm ref="localForm" :current-category="currentCategory" />
<HitchDetail ref="mDetail" /> <HitchDetail ref="mDetail" />
</div> </div>
</template> </template>
@ -90,7 +90,8 @@ export default {
data() { data() {
return { return {
currentCategory: null, currentCategory: null,
blurryTime: null
blurryTime: null,
formVisible: false
} }
}, },
computed: { computed: {
@ -115,8 +116,10 @@ export default {
handleNodeClick(data) { handleNodeClick(data) {
this.currentCategory = data this.currentCategory = data
}, },
doLoalHitch(data) {
this.$refs.localForm.localHitchVisible = true
doLoalHitch() {
this.$nextTick(() => {
this.$refs.localForm.localHitchVisible = true
})
}, },
handleDetail() { handleDetail() {
this.$refs.mDetail.hitchDetialVisible = true this.$refs.mDetail.hitchDetialVisible = true

96
src/views/collectReorganizi/batchConnection/module/form.vue

@ -1,6 +1,6 @@
<template> <template>
<!-- 本地挂接 --> <!-- 本地挂接 -->
<el-dialog title="本地挂接" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="localHitchVisible">
<el-dialog title="本地挂接" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="localHitchVisible" @opened="opened">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="重复验证方式" prop="hitchType"> <el-form-item label="重复验证方式" prop="hitchType">
<el-select v-model="form.hitchType" placeholder="请选择" style="width: 400px;"> <el-select v-model="form.hitchType" placeholder="请选择" style="width: 400px;">
@ -13,9 +13,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="挂接字段" prop="hitchFiled"> <el-form-item label="挂接字段" prop="hitchFiled">
<el-select v-model="form.hitchFiled" placeholder="请选择" style="width: 400px;">
<el-select v-model="form.hitchFiled" placeholder="请选择" style="width: 400px;" @change="selectFiled">
<el-option <el-option
v-for="item in options"
v-for="item in fieldOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@ -25,9 +25,19 @@
<el-form-item label="挂接详情" prop="hitchRemark"> <el-form-item label="挂接详情" prop="hitchRemark">
<el-input v-model="form.hitchRemark" style="width: 400px;" /> <el-input v-model="form.hitchRemark" style="width: 400px;" />
</el-form-item> </el-form-item>
<el-form-item label="匹配模式" prop="matchedPattern">
<el-select v-model="form.matchedPattern" placeholder="请选择" style="width: 400px;">
<el-option
v-for="item in matchedOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="上传附件" prop="file"> <el-form-item label="上传附件" prop="file">
<div class="upload-bgColor"> <div class="upload-bgColor">
<input class="upload-input" type="file" @change="handleFile">
<input class="upload-input" type="file" style="width: 110px; height: 32px;" @change="handleFile">
<el-button size="small" type="primary"><i class="iconfont icon-shangchuan" />点击上传</el-button> <el-button size="small" type="primary"><i class="iconfont icon-shangchuan" />点击上传</el-button>
</div> </div>
<div v-for="item in fileList" :key="item.name" class="file-list"> <div v-for="item in fileList" :key="item.name" class="file-list">
@ -45,16 +55,26 @@
</template> </template>
<script> <script>
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
export default { export default {
name: 'LocalHitch', name: 'LocalHitch',
components: { }, components: { },
mixins: [], mixins: [],
props: {
currentCategory: {
type: Object,
default: function() {
return {}
}
}
},
data() { data() {
return { return {
localHitchVisible: false, localHitchVisible: false,
form: { form: {
hitchType: null, hitchType: null,
hitchFiled: null, hitchFiled: null,
matchedPattern: '1',
hitchRemark: null, hitchRemark: null,
file: null file: null
}, },
@ -73,12 +93,21 @@ export default {
label: '追加' label: '追加'
} }
], ],
options: [
matchedOptions: [
{
value: '1',
label: '全量匹配'
},
{
value: '2',
label: '前缀模糊匹配'
},
{ {
value: 'archival',
label: '档号'
value: '3',
label: '后缀模糊匹配'
} }
], ],
fieldOptions: [],
rules: { rules: {
hitchType: [ hitchType: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
@ -89,17 +118,36 @@ export default {
hitchRemark: [ hitchRemark: [
{ required: true, message: '请输入', trigger: 'blur' } { required: true, message: '请输入', trigger: 'blur' }
], ],
matchedPattern: [
{ required: true, message: '请选择', trigger: 'change' }
],
file: [ file: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
] ]
} }
} }
}, },
computed: {
collectLevel() {
if (this.currentCategory.arrangeType === 1) {
return 3
} else if (this.currentCategory.arrangeType === 2) {
return 2
} else if (this.currentCategory.arrangeType === 3) {
return 1
}
return null
}
},
created() { created() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
opened() {
this.getFieldCommon()
},
handleFile(event) { handleFile(event) {
const files = event.target.files const files = event.target.files
// const file = files[0] // // const file = files[0] //
@ -130,6 +178,35 @@ export default {
return false return false
} }
}) })
},
getFieldCommon() {
const params = {
'categoryId': this.currentCategory.id,
'categoryLevel': this.collectLevel
}
FetchInitCategoryInputFieldByPid(params).then(data => {
this.fieldOptions = data.map((item, index) => {
const json = {}
json.id = item.id
json.label = item.fieldCnName
json.value = item.fieldName
return json
})
})
},
selectFiled(val) {
console.log('val', val)
if (val) {
if (this.form.hitchRemark && this.form.hitchRemark.includes(val)) {
this.$message.warning('请注意当前选择的挂接字段,在挂接详情内已存在!')
} else {
if (!this.form.hitchRemark) {
this.form.hitchRemark = '$' + val + '$'
} else {
this.form.hitchRemark += ' $' + val + '$'
}
}
}
} }
} }
} }
@ -137,7 +214,10 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
::v-deep .el-dialog{ ::v-deep .el-dialog{
width: 585px;
width: 585px !important;
.el-dialog__body{
padding: 30px 0 !important;
}
} }
.dialog-footer{ .dialog-footer{
margin-top: 0; margin-top: 0;

77
src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue

@ -205,20 +205,6 @@
<!-- 四性检测 --> <!-- 四性检测 -->
<FourTest ref="fourTestRef" /> <FourTest ref="fourTestRef" />
<!-- 目录下载 -->
<el-dialog class="tip-dialog" title="目录下载" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="downloadVisible">
<div class="setting-dialog">
<div class="tip-content">
<p class="tipMsg">此操作将下载所选条目目录</p>
<span>你是否还要继续?</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="downloadVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleCatDownloadConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 快速组卷 --> <!-- 快速组卷 -->
<QuickPaper ref="quickPaperRef" /> <QuickPaper ref="quickPaperRef" />
@ -276,8 +262,8 @@ import CollectMoveFile from './collectMoveFile/index'
import Print from './print/index' import Print from './print/index'
import FourTest from './fourTest/index' import FourTest from './fourTest/index'
import QuickPaper from './quickPaper/index' import QuickPaper from './quickPaper/index'
// import { exportFile } from '@/utils/index'
import { downloadFile } from '@/utils/index'
import qs from 'qs'
import { downloadFile, exportFile } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
@ -327,7 +313,6 @@ export default {
deleteVisible: false, deleteVisible: false,
moveVisible: false, moveVisible: false,
filingVisible: false, filingVisible: false,
downloadVisible: false,
recoverVisible: false, recoverVisible: false,
completelyDeleteVisible: false, completelyDeleteVisible: false,
isDesFormType: 'arcives', // isDesFormType: 'arcives', //
@ -925,26 +910,17 @@ export default {
type: 'warning', type: 'warning',
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}).then(() => { }).then(() => {
// const archivesIds = []
// this.selections.forEach(val => {
// archivesIds.push(val.id)
// })
// const params = {
// 'categoryId': this.selectedCategory.id,
// 'categoryLevel': this.collectLevel,
// 'archivesIds': archivesIds
// }
// console.log(params)
// FetchUpdateArchivesNo(params).then((res) => {
// if (res.code !== 500) {
// this.crud.notify('', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.handleSearch(this.collectLevel)
// } else {
// this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
// }
// }).catch(err => {
// console.log(err)
// })
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
console.log(params)
exportFile(this.baseApi + '/api/collect/exportDate?' + qs.stringify(params, { indices: false }))
}).catch(() => { }).catch(() => {
}) })
}, },
@ -987,14 +963,25 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!') this.$message('您还未勾选需要操作的条目,请先确认!')
return false return false
} }
this.downloadVisible = true
},
handleCatDownloadConfirm() {
// const params = {
// 'orderNo': id
// }
// exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false }))
this.downloadVisible = false
this.$confirm('此操作将下载所选条目目录' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
console.log(params)
exportFile(this.baseApi + '/api/collect/catalogDownload?' + qs.stringify(params, { indices: false }))
}).catch(() => {
})
}, },
// //
handleQuickPaper() { handleQuickPaper() {

Loading…
Cancel
Save