Browse Source

远程挂接/四性检测

master
xuhuajiao 8 months ago
parent
commit
42e1be9650
  1. 21
      src/api/collect/collect.js
  2. 20
      src/api/system/remoteConnection.js
  3. 5
      src/router/routers.js
  4. 21
      src/utils/upload.js
  5. 5
      src/views/collectReorganizi/batchConnection/index.vue
  6. 172
      src/views/collectReorganizi/batchConnection/module/form.vue
  7. 8
      src/views/collectReorganizi/collectionLibrary/module/fourTestInfo/index.vue
  8. 100
      src/views/fourTestReport/index.vue

21
src/api/collect/collect.js

@ -232,15 +232,6 @@ export function FetchFourCheck(data) {
}) })
} }
// 归档确定
export function FetchBecomeDocumentConfirm(data) {
return request({
url: 'api/collect/becomeDocumentConfirm',
method: 'post',
data
})
}
// 彻底删除档案 // 彻底删除档案
export function FetchCompleteDelArchives(data) { export function FetchCompleteDelArchives(data) {
return request({ return request({
@ -259,6 +250,7 @@ export function FetchRestoreArchives(data) {
}) })
} }
// 获取业务流程标题
export function FetchBusinessFlowTitle(params) { export function FetchBusinessFlowTitle(params) {
return request({ return request({
url: 'api/collect/getBusinessFlowTitle', url: 'api/collect/getBusinessFlowTitle',
@ -267,6 +259,7 @@ export function FetchBusinessFlowTitle(params) {
}) })
} }
// 归档
export function FetchBecomeDocument(data) { export function FetchBecomeDocument(data) {
return request({ return request({
url: 'api/collect/becomeDocument', url: 'api/collect/becomeDocument',
@ -275,6 +268,16 @@ export function FetchBecomeDocument(data) {
}) })
} }
// 归档确定
export function FetchBecomeDocumentConfirm(data) {
return request({
url: 'api/collect/becomeDocumentConfirm',
method: 'post',
data
})
}
// 根据挂接id获取详情列表
export function FetchInitMountDetailsList(params) { export function FetchInitMountDetailsList(params) {
return request({ return request({
url: 'api/collect/initMountDetailsList', url: 'api/collect/initMountDetailsList',

20
src/api/system/remoteConnection.js

@ -44,4 +44,22 @@ export function FetchIsConnect(params) {
}) })
} }
export default { add, edit, del, FetchInitRemoteConnection, FetchIsConnect }
// 根据类别获取全部信息
export function FetchFindDetailsByProtocol(params) {
return request({
url: 'api/remoteConnection/findDetailsByProtocol',
method: 'get',
params
})
}
// 根据挂接地址获取文件
export function FetchFileByRemoteConnection(params) {
return request({
url: 'api/remoteConnection/getFileByRemoteConnection',
method: 'get',
params
})
}
export default { add, edit, del, FetchInitRemoteConnection, FetchIsConnect, FetchFindDetailsByProtocol, FetchFileByRemoteConnection }

5
src/router/routers.js

@ -73,6 +73,11 @@ export const constantRouterMap = [
path: '/preview', path: '/preview',
component: (resolve) => require(['@/views/preview/index'], resolve), component: (resolve) => require(['@/views/preview/index'], resolve),
hidden: true hidden: true
},
{
path: '/fourTestReport',
component: (resolve) => require(['@/views/fourTestReport/index'], resolve),
hidden: true
} }
] ]

21
src/utils/upload.js

@ -86,6 +86,27 @@ export function batchMountUpload(api, file, params) {
return axios.post(api, data, config) return axios.post(api, data, config)
} }
// 收集库 - 远程挂接
export function remoteConnectiontUpload(api, params) {
var data = new FormData()
data.append('account', params.account)
data.append('cAddress', params.cAddress)
data.append('cPassword', params.cPassword)
data.append('cPort', params.cPort)
data.append('categoryId', params.categoryId)
data.append('checkRepeatType', params.checkRepeatType)
data.append('matchingMode', params.matchingMode)
data.append('fields', params.fields)
data.append('protocol', params.protocol)
data.append('zipFilePath', params.zipFilePath)
const config = {
headers: {
'Authorization': getToken()
}
}
return axios.post(api, data, config)
}
// 在线编研附件 // 在线编研附件
export function onlineUpload(api, file, params) { export function onlineUpload(api, file, params) {
var data = new FormData() var data = new FormData()

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

@ -161,6 +161,11 @@ export default {
}, },
doLoalHitch(type) { doLoalHitch(type) {
this.$nextTick(() => { this.$nextTick(() => {
if (type === 0) {
this.$refs.localForm.connectionTitle = '本地挂接'
} else {
this.$refs.localForm.connectionTitle = '远程挂接'
}
this.$refs.localForm.connectionType = type this.$refs.localForm.connectionType = type
this.$refs.localForm.localHitchVisible = true this.$refs.localForm.localHitchVisible = true
}) })

172
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" :before-close="handleCancel" @opened="opened">
<!-- 本地挂接 / 远程挂接 -->
<el-dialog :title="connectionTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="localHitchVisible" :before-close="handleCancel" @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="checkRepeatType"> <el-form-item label="重复验证方式" prop="checkRepeatType">
<el-select v-model="form.checkRepeatType" placeholder="请选择" style="width: 400px;"> <el-select v-model="form.checkRepeatType" placeholder="请选择" style="width: 400px;">
@ -55,8 +55,8 @@
</div> </div>
<el-input v-show="false" v-model="form.file" /> <el-input v-show="false" v-model="form.file" />
</el-form-item> </el-form-item>
<el-form-item v-if="connectionType" label="挂接类型" prop="batchType">
<el-select v-model="form.batchType" placeholder="请选择" style="width: 400px;">
<el-form-item v-if="connectionType" label="挂接类型" prop="protocol">
<el-select v-model="form.protocol" placeholder="请选择" style="width: 400px;" @change="changeProtocol">
<el-option <el-option
v-for="item in batchTypeOptions" v-for="item in batchTypeOptions"
:key="item.value" :key="item.value"
@ -66,7 +66,32 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="connectionType" label="文件路径" prop="filePath"> <el-form-item v-if="connectionType" label="文件路径" prop="filePath">
<el-input v-model="form.filePath" style="width: 400px;" />
<el-select v-model="form.filePath" placeholder="请选择" value-key="id" style="width: 400px;" @change="changeFilePath">
<el-option
v-for="(item,index) in filePathOptions"
:key="index"
:label="item.name"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="connectionType"
label=""
prop="fileRemote"
class="file_remote-style"
:rules="form.filePath !== null ? rules.fileRemote : []"
:required="form.filePath !== null"
>
<el-button v-if="form.filePath && fileRemoteLoading" type="primary" :loading="fileRemoteLoading" style="border: none; display: block; padding: 0 0 4px 0;">文件列表加载中</el-button>
<el-radio-group v-model="form.fileRemote">
<el-radio
v-for="item in fileRemoteOptions"
:key="item.value"
:value="item.value"
:label="item.name"
>{{ item.name }}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -79,7 +104,8 @@
<script> <script>
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { batchMountUpload } from '@/utils/upload'
import { FetchFindDetailsByProtocol, FetchFileByRemoteConnection } from '@/api/system/remoteConnection'
import { batchMountUpload, remoteConnectiontUpload } from '@/utils/upload'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'LocalHitch', name: 'LocalHitch',
@ -95,6 +121,7 @@ export default {
}, },
data() { data() {
return { return {
connectionTitle: '本地挂接',
localHitchVisible: false, localHitchVisible: false,
hitchRemarkArray: [], hitchRemarkArray: [],
connectionType: 0, connectionType: 0,
@ -104,8 +131,9 @@ export default {
matchingMode: 1, matchingMode: 1,
fields: null, fields: null,
file: null, file: null,
batchType: null,
filePath: null
protocol: null,
filePath: null,
fileRemote: null
}, },
fileList: [], fileList: [],
typeOptions: [ typeOptions: [
@ -151,6 +179,9 @@ export default {
} }
], ],
fieldOptions: [], fieldOptions: [],
filePathOptions: [],
fileRemoteLoading: false,
fileRemoteOptions: [],
rules: { rules: {
checkRepeatType: [ checkRepeatType: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
@ -164,11 +195,14 @@ export default {
matchingMode: [ matchingMode: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
], ],
batchType: [
protocol: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
], ],
filePath: [ filePath: [
{ required: true, message: '请选择', trigger: 'blur' }
{ required: true, message: '请选择', trigger: 'change' }
],
fileRemote: [
{ required: true, message: '请选择指定文件', trigger: 'change' }
] ]
} }
} }
@ -204,9 +238,11 @@ export default {
} }
}, },
handleComfired() { handleComfired() {
if (this.fileList.length === 0) {
this.$message({ message: '请先选择相关文件!', offset: 8 })
return false
if (!this.connectionType) {
if (this.fileList.length === 0) {
this.$message({ message: '请先选择相关文件!', offset: 8 })
return false
}
} }
if (this.hitchRemarkArray.length === 1 && this.hitchRemarkArray[0] === '*') { if (this.hitchRemarkArray.length === 1 && this.hitchRemarkArray[0] === '*') {
@ -219,26 +255,54 @@ export default {
if (valid) { if (valid) {
let newhitchRemark = this.hitchRemarkArray.map(item => item.replace(/^\$|\$$|\*$/g, '')) let newhitchRemark = this.hitchRemarkArray.map(item => item.replace(/^\$|\$$|\*$/g, ''))
newhitchRemark = newhitchRemark.filter(item => item !== '') newhitchRemark = newhitchRemark.filter(item => item !== '')
const params = {
'categoryId': this.currentCategory.id,
'mountType': 1, // 1. 2. 3. 1
'checkRepeatType': this.form.checkRepeatType,
'matchingMode': this.form.matchingMode,
'fields': newhitchRemark
}
console.log(params)
batchMountUpload(this.baseApi + '/api/collect/batchMount',
this.fileList,
params
).then(res => {
if (res.data.code === 200) {
this.$message({ message: '操作成功', type: 'success', offset: 8 })
} else {
this.$message({ message: '上传附件失败', type: 'error', offset: 8 })
if (!this.connectionType) {
const params = {
'categoryId': this.currentCategory.id,
'mountType': 1, // 1. 2. 3. 1
'checkRepeatType': this.form.checkRepeatType,
'matchingMode': this.form.matchingMode,
'fields': newhitchRemark
} }
this.handleCancel()
this.crud.refresh()
})
console.log(params)
batchMountUpload(this.baseApi + '/api/collect/batchMount',
this.fileList,
params
).then(res => {
if (res.data.code === 200) {
this.$message({ message: '操作成功', type: 'success', offset: 8 })
} else {
this.$message({ message: '上传附件失败', type: 'error', offset: 8 })
}
this.handleCancel()
this.crud.refresh()
})
} else {
const params = {
'account': this.form.filePath.account,
'cAddress': this.form.filePath.caddress,
'cPassword': this.form.filePath.cpassword,
'cPort': this.form.filePath.cport,
'categoryId': this.currentCategory.id,
'checkRepeatType': this.form.checkRepeatType,
'matchingMode': this.form.matchingMode,
'fields': newhitchRemark,
'protocol': this.form.protocol,
'zipFilePath': this.form.filePath.rootDirectory + '/' + this.form.fileRemote // rootDirectory+
}
console.log(params)
remoteConnectiontUpload(this.baseApi + '/api/collect/remoteMount',
params
).then(res => {
if (res.data.code === 200) {
this.$message({ message: '操作成功', type: 'success', offset: 8 })
} else {
this.$message({ message: '操作失败', type: 'error', offset: 8 })
}
this.handleCancel()
this.crud.refresh()
})
}
} else { } else {
return false return false
} }
@ -296,6 +360,31 @@ export default {
this.hitchRemarkArray.unshift(symbol) this.hitchRemarkArray.unshift(symbol)
} }
}, },
changeProtocol(val) {
if (val) {
this.form.filePath = null
this.filePathOptions = []
this.fileRemoteOptions = []
FetchFindDetailsByProtocol({ 'protocol': val }).then(res => {
this.filePathOptions = res
})
}
},
changeFilePath(val) {
this.fileRemoteLoading = true
if (val) {
this.fileRemoteOptions = []
FetchFileByRemoteConnection({ 'id': val.id }).then(res => {
this.fileRemoteOptions = res.map(item => {
const json = {}
json.value = item
json.name = item
return json
})
this.fileRemoteLoading = false
})
}
},
removeTag(tag) { removeTag(tag) {
const index = this.hitchRemarkArray.indexOf(tag) const index = this.hitchRemarkArray.indexOf(tag)
if (index !== -1) { if (index !== -1) {
@ -306,6 +395,8 @@ export default {
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.hitchRemarkArray = [] this.hitchRemarkArray = []
this.fileList = [] this.fileList = []
this.filePathOptions = []
this.fileRemoteOptions = []
this.localHitchVisible = false this.localHitchVisible = false
} }
} }
@ -341,4 +432,21 @@ export default {
margin-right: 6px; margin-right: 6px;
} }
} }
.file_remote-style{
::v-deep .el-form-item__content{
width:400px !important;
.el-radio-group{
display: block;
max-height: 60px;
overflow: hidden;
overflow-y: scroll;
.el-radio{
display: block;
padding: 3px 0;
}
}
}
}
</style> </style>

8
src/views/collectReorganizi/collectionLibrary/module/fourTestInfo/index.vue

@ -1,7 +1,7 @@
<template> <template>
<!--四性检测-档案详情内--> <!--四性检测-档案详情内-->
<div class="fourTest-container"> <div class="fourTest-container">
<el-table :data="tableData" style="min-width: 100%" height="calc(100vh - 440px)">
<el-table :data="tableData" style="min-width: 100%" height="calc(100vh - 440px)" @cell-dblclick="tableDoubleClick">
<el-table-column prop="admin" label="检测人" min-width="60" /> <el-table-column prop="admin" label="检测人" min-width="60" />
<el-table-column prop="createTime" label="检测时间" min-width="180"> <el-table-column prop="createTime" label="检测时间" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -109,6 +109,12 @@ export default {
}, },
handleCurrentPage(val) { handleCurrentPage(val) {
this.page.page = val this.page.page = val
},
tableDoubleClick(row) {
const routeData = this.$router.resolve({
path: '/fourTestReport',
query: {}})
window.open(routeData.href, '_blank')
} }
} }
} }

100
src/views/fourTestReport/index.vue

@ -0,0 +1,100 @@
<template>
<div class="preview-wrapper">
<div class="collect-header" style="justify-content: flex-start; border-top: none; ">
<h4 class="is-file" style="flex:none;">四性检测报告</h4>
<span style="font-size: 12px; flex: 1; line-height: 42px;">所属文件{{ parentArchiveNo }}</span>
</div>
<div class="main-content">
<div class="content-list">
<h4 class="arc-title">原文列表</h4>
<ul v-if="allFileTables.length!==0" class="file-list">
<li v-for="(item,index) in allFileTables" :key="index" :class="{'active-file': item.id == fileCurrent.id}" @click="selectFile(item)">
<span>{{ item.file_name }}</span>
<i class="iconfont icon-attachment" />
</li>
</ul>
<el-empty v-else :image-size="100" />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'FourTestReport',
components: {
},
data() {
return {
parentArchiveNo: null,
allFileTables: [],
fileCurrent: null
}
},
created() {
},
mounted() {
if (this.$route.query.archiveNo) {
this.parentArchiveNo = this.$route.query.archiveNo
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.preview-wrapper{
background-color: #f6f8fc;
.collect-header{
background-color: #fff;
border-bottom: 1px solid #edeff3;
}
}
.main-content{
display: flex;
justify-content: space-between;
width: calc(100%);
height: calc(100vh - 75px);
background-color: #fff;
.content-list{
width: 300px;
.arc-title{
height: 48px;
line-height: 48px;
text-align: center;
font-size: 16px;
color: #0c0e1e;
background-color: #f3f5f8;
}
.file-list{
height: calc(100% - 48px);
padding: 10px 0;
font-size: 12px;
overflow: hidden;
overflow-y: scroll;
li{
display: flex;
justify-content: space-between;
padding: 0 10px 0 20px;
line-height: 26px;
margin-bottom: 4px;
cursor:default;
&.active-file{
background-color: #e8f2ff;
color: #0c0e1e;
}
& span{
display: block;
margin-right: 4px;
}
&:hover{
background-color: #e8f2ff;
color: #0c0e1e;
}
}
}
}
}
</style>
Loading…
Cancel
Save