Browse Source

预归档库

master
xuhuajiao 2 months ago
parent
commit
9426fb1562
  1. 10
      src/api/prearchiveLibrary/prearchiveLibrary.js
  2. 134
      src/views/components/category/PreviewForm.vue
  3. 238
      src/views/components/category/preUpload4.vue
  4. 4
      src/views/components/categoryTree.vue
  5. 48
      src/views/prearchiveLibrary/treeList.vue
  6. 11
      src/views/preview/index.vue
  7. 14
      src/views/system/authorizeManage/index.vue

10
src/api/prearchiveLibrary/prearchiveLibrary.js

@ -117,4 +117,12 @@ export function FetchReDocumentBase64ByFileId(params) {
})
}
export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove, FetchArchivesDetails, FetchFileListByDocumentId, FetchArchivesMetadata, FetchReDocumentBase64ByFileId }
export function FetchMinioReDocumentBase64ByFileId(params) {
return request({
url: 'api/minioUpload/getBase64',
method: 'get',
params
})
}
export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove, FetchArchivesDetails, FetchFileListByDocumentId, FetchArchivesMetadata, FetchReDocumentBase64ByFileId, FetchMinioReDocumentBase64ByFileId }

134
src/views/components/category/PreviewForm.vue

@ -290,7 +290,10 @@ export default {
fileList: [],
archivesSummaryResponse: {},
pickerDateMap: {},
minioPreResult: {},
// Vuedata/Reactstate/
minioPreResult: [], // minio
jsonArrayStore: [], // jsonArrayToSendminioPreResult
fileNameStore: [], // fileNameminioPreResult
iconShowRule: {
'3-1': 'item_no',
'3-2': 'record_no',
@ -373,53 +376,100 @@ export default {
},
preUplpadClose() {
this.$refs.preUploadRefs.handleClearData()
this.$refs.preUploadRefs.handleCloseDialog()
},
handleSuccessResource(filePath, fileName, jsonArrayToSend) {
this.minioPreResult = filePath
console.log('handleSuccessResource', filePath)
console.log('handleSuccessResource', fileName)
console.log('handleSuccessResource', jsonArrayToSend)
console.log('handleSuccessResource', jsonArrayToSend[0].fileJsonString)
// this.fileOriginal = fileName.join(',')
this.fileOriginal = fileName
// handleSuccessResource(data, fileName, jsonArrayToSend) {
// this.minioPreResult = data
// // console.log('handleSuccessResource', filePath)
// // console.log('handleSuccessResource', fileName)
// // console.log('handleSuccessResource', jsonArrayToSend)
// // console.log('handleSuccessResource', jsonArrayToSend[0].fileJsonString)
// this.fileOriginal = fileName.join(',')
// // this.fileOriginal = fileName
const fileJson = JSON.parse(jsonArrayToSend[0].fileJsonString)
fileJson[0].file_path = '/' + filePath.filePath
fileJson[0].is_quote = null
fileJson[0].last_modified = jsonArrayToSend[0].last_modified
fileJson[0].ca_id = this.minioPreResult.caId
fileJson[0].encryption_time = this.minioPreResult.timestamp
fileJson[0].signature = this.minioPreResult.signature
this.fileJsonString = JSON.stringify(fileJson)
},
// handleSuccessResource(filePath, fileName, jsonArrayToSend) {
// console.log('handleSuccessResource', filePath)
// console.log('handleSuccessResource', fileName)
// console.log('handleSuccessResource', jsonArrayToSend)
// const fileJson = JSON.parse(jsonArrayToSend[0].fileJsonString)
// fileJson[0].file_path = '/' + data.filePath
// fileJson[0].is_quote = null
// fileJson[0].last_modified = jsonArrayToSend[0].last_modified
// fileJson[0].ca_id = this.minioPreResult.caId
// fileJson[0].encryption_time = this.minioPreResult.timestamp
// fileJson[0].signature = this.minioPreResult.signature
// this.fileJsonString = JSON.stringify(fileJson)
// },
handleSuccessResource(data, fileName, jsonArrayToSend) {
// 1.
if (!Array.isArray(this.minioPreResult)) this.minioPreResult = []
if (!Array.isArray(this.jsonArrayStore)) this.jsonArrayStore = []
if (!Array.isArray(this.fileNameStore)) this.fileNameStore = []
// this.fileOriginal = fileName.join(',')
// 2.
const newMinioData = Array.isArray(data) ? data : [data] // minio
const newFileNames = Array.isArray(fileName) ? fileName : [fileName] //
const newJsonData = Array.isArray(jsonArrayToSend) ? jsonArrayToSend : [jsonArrayToSend] // json
// // jsonArrayToSenditem
// const fileJsonList = jsonArrayToSend.flatMap(item => {
// // itemfileJsonString
// const parsed = JSON.parse(item.fileJsonString)
// 3.
newMinioData.forEach((minioItem, index) => {
//
const currentFileName = newFileNames[index]?.trim() || `未知文件_${index}`
// json
const currentJsonItem = newJsonData[index] || {}
// //
// const fileItems = Array.isArray(parsed) ? parsed : [parsed]
// 3.1 fileNameStore
const isDuplicate = this.fileNameStore.some(
storedName => storedName.trim() === currentFileName
)
// //
// return fileItems.map(fileItem => ({
// ...fileItem, //
// file_path: '/' + filePath,
// is_quote: null,
// last_modified: item.last_modified
// }))
// })
// console.log('fileJsonList', fileJsonList)
// // fileJsonList{}
// this.fileJsonString = JSON.stringify(fileJsonList)
// },
if (isDuplicate) {
console.log(`文件名【${currentFileName}】已存在,跳过合并该条数据`)
return
}
// 3.2
this.minioPreResult.push(minioItem)
this.jsonArrayStore.push(currentJsonItem)
this.fileNameStore.push(currentFileName)
console.log(`文件名【${currentFileName}】合并成功`)
})
// 4.
this.fileOriginal = this.fileNameStore.join(',')
// 5. fileJsonList
let fileJsonList = []
this.minioPreResult.forEach((minioItem, index) => {
const jsonItem = this.jsonArrayStore[index]
// jsonfileJsonString
if (!jsonItem || !jsonItem.fileJsonString) {
console.warn(`${index}个文件【${this.fileNameStore[index]}】无有效JSON数据,跳过`)
return
}
try {
// JSON
const parsed = JSON.parse(jsonItem.fileJsonString)
const fileItems = Array.isArray(parsed) ? parsed : [parsed]
console.log('minioItem', minioItem)
// minio
const mappedItems = fileItems.map(fileItem => ({
...fileItem,
file_path: '/' + (minioItem.filePath || ''),
is_quote: null,
last_modified: minioItem.lastModified,
ca_id: minioItem.caId || '',
encryption_time: minioItem.timestamp || '',
signature: minioItem.signature || ''
}))
fileJsonList = fileJsonList.concat(mappedItems)
} catch (error) {
console.error(`${index}个文件【${this.fileNameStore[index]}】JSON解析失败:`, error)
}
})
// 6. fileJsonString
console.log('按文件名去重后的fileJsonList:', fileJsonList)
this.fileJsonString = JSON.stringify(fileJsonList)
},
handleErrorResource(res) {
console.log('handleErrorResource', res)
},

238
src/views/components/category/preUpload4.vue

@ -1,5 +1,13 @@
<template>
<div class="upload-minio">
<!-- 文件选择按钮与隐藏的input -->
<el-button
type="primary"
:disabled="!isCaValid || isCheckingCa"
icon="el-icon-upload"
>
选择文件
</el-button>
<input
type="file"
multiple
@ -7,25 +15,52 @@
class="file-input"
@change="handleFileSelect"
>
<el-button>上传文件</el-button>
<!-- 遍历展示每个文件的上传状态移除验签相关渲染 -->
<div v-for="(fileItem, index) in fileList" :key="index" class="file-item">
<div class="file-name">{{ fileItem.file.name }}</div>
<!-- 上传进度条 -->
<div v-if="fileItem.uploading" class="progress-wrapper">
<div class="progress-bar" :style="{ width: fileItem.progress + '%' }" />
<span class="progress-text">上传进度: {{ fileItem.progress }}%</span>
<!-- 文件上传弹框选择文件后自动打开 -->
<el-dialog
title="文件上传列表"
class="minio-file"
:close-on-click-modal="false"
:modal-append-to-body="false"
append-to-body
:visible.sync="uploadMinioVisible"
:before-close="handleCloseDialog"
width="600px"
>
<el-button
type="success"
style="margin-bottom: 20px"
:disabled="fileList.some(item => item.uploading || item.merging) || fileList.length === 0"
@click="handleUploadConfirm"
>
开始上传
</el-button>
<!-- 文件列表 -->
<div v-if="fileList.length === 0" class="empty-tip">
暂无选择的文件
</div>
<!-- 合并中状态 -->
<div v-if="fileItem.merging" class="merge-loading">
<span>合并中...</span>
<div
v-for="(fileItem, index) in fileList"
:key="index"
class="file-item"
>
<div class="file-name">{{ fileItem.file.name }} <span class="file-size">{{ formatFileSize(fileItem.file.size) }}</span></div>
<!-- 上传进度条 -->
<div v-if="fileItem.uploading" class="progress-wrapper">
<span class="progress-text">上传进度: {{ fileItem.progress }}%</span>
<div class="progress-bar" :style="{ width: fileItem.progress + '%' }" />
</div>
<!-- 合并中状态 -->
<div v-if="fileItem.merging" class="merge-loading ">
<span>合并中...</span>
</div>
<!-- 上传错误信息 -->
<p v-if="fileItem.errorMsg" class="error">{{ fileItem.errorMsg }}</p>
<!-- 上传成功 -->
<p v-if="fileItem.successMsg" class="success">{{ fileItem.successMsg }}</p>
</div>
<!-- 上传错误信息 -->
<p v-if="fileItem.errorMsg" class="error">{{ fileItem.errorMsg }}</p>
<!-- 上传成功移除验签结果展示 -->
<p v-if="fileItem.successMsg" class="success">{{ fileItem.successMsg }}</p>
</div>
</el-dialog>
</div>
</template>
@ -59,7 +94,8 @@ export default {
data() {
return {
fileList: [], //
uploadMinioVisible: false, //
fileList: [], //
CHUNK_SIZE: 5 * 1024 * 1024, // (5MB)
totalMergeStartTime: null, //
totalMergeEndTime: null, //
@ -74,6 +110,11 @@ export default {
},
methods: {
formatFileSize(bytes) {
if (bytes === 0) return '0.00MB'
const mb = bytes / (1024 * 1024) // 1MB = 1024KB = 1024*1024B
return mb.toFixed(2) + 'MB'
},
/**
* 工具方法格式化时间戳为易读的本地时间带毫秒
* @param {number} timestamp - 时间戳
@ -136,7 +177,7 @@ export default {
},
/**
* 工具方法显示提示信息可替换为项目的Message组件
* 工具方法显示提示信息
* @param {string} msg - 提示内容
* @param {string} type - 类型success/error
*/
@ -158,10 +199,8 @@ export default {
try {
this.isCheckingCa = true
const res = await FetchCheckCaValidity()
this.isCaValid = !!res // true/false
if (this.isCaValid) {
// this.showMessage('CA', 'success')
} else {
this.isCaValid = !!res //
if (!this.isCaValid) {
this.showMessage('CA证书不在有效期内,无法进行分片上传', 'error')
}
} catch (err) {
@ -181,26 +220,27 @@ export default {
},
/**
* 多文件选择处理函数
* 多文件选择处理函数选择后打开弹框仅初始化文件列表不上传
* @param {Event} e - 选择文件的事件对象
*/
async handleFileSelect(e) {
// 1. CA
// 1. CA
if (this.isCheckingCa) {
this.showMessage('正在校验CA证书,请稍候...', 'error')
this.showMessage('正在校验CA证书,请稍候...', 'warning')
e.target.value = ''
return
}
if (!this.isCaValid) {
this.showMessage('CA证书不在有效期内,无法上传文件', 'error')
e.target.value = '' //
e.target.value = ''
return
}
// 2.
// 2.
const selectedFiles = Array.from(e.target.files)
if (selectedFiles.length === 0) return
//
//
const newFileList = selectedFiles.map(file => ({
file,
uploading: false,
@ -218,14 +258,11 @@ export default {
}))
this.fileList = [...this.fileList, ...newFileList]
//
for (const fileItem of newFileList) {
await this.uploadFileChunks(fileItem)
}
// 3.
this.uploadMinioVisible = true
//
this.allChunksUploaded = true
this.handleUploadConfirm()
// inputchange
e.target.value = ''
},
/**
@ -386,11 +423,34 @@ export default {
},
/**
* 所有文件分片上传完成后自动执行批量合并
* 批量上传并合并弹框内点击按钮触发核心修改点新增串行上传逻辑
*/
async handleUploadConfirm() {
if (this.fileList.length === 0 || !this.allChunksUploaded) {
this.showMessage('没有可处理的文件或分片上传未完成!', 'error')
if (this.fileList.length === 0) {
this.showMessage('请先选择要上传的文件!', 'warning')
return
}
// /
const pendingFiles = this.fileList.filter(item => !item.successMsg && !item.errorMsg)
if (pendingFiles.length === 0) {
this.showMessage('暂无待上传的文件!', 'warning')
return
}
// 1.
this.allChunksUploaded = true
for (const fileItem of pendingFiles) {
await this.uploadFileChunks(fileItem)
//
if (fileItem.errorMsg) {
this.allChunksUploaded = false
}
}
// 2.
if (!this.allChunksUploaded) {
this.showMessage('部分文件分片上传失败,无法执行合并', 'error')
return
}
@ -428,7 +488,7 @@ export default {
jsonString.file_name = file.name
jsonString.file_size = file.size
jsonString.file_type = file.name.split('.').pop() || ''
json.last_modified = file.lastModified
jsonString.last_modified = file.lastModified
jsonString.file_path = ''
jsonString.sequence = null
jsonString.archive_id = this.arcId
@ -437,6 +497,8 @@ export default {
jsonString.file_thumbnail = ''
jsonArray.push(jsonString)
console.log('file.lastModified', file.lastModified)
if (this.isBatchMount === 'true') {
json.categoryId = this.selectedCategory.id
} else {
@ -460,8 +522,8 @@ export default {
})
const jsonArray = await Promise.all(processFiles)
// jsonArray
const response = await axios.post('/api/minioUpload/merge', jsonArray[0], {
//
const response = await axios.post('/api/minioUpload/merge', jsonArray, {
headers: {
'Authorization': getToken(),
'Content-Type': 'application/json'
@ -472,26 +534,27 @@ export default {
const totalMergeDuration = this.getTimeDiff(this.totalMergeStartTime, this.totalMergeEndTime)
if (response.data.code === 200) {
this.showMessage('所有文件合并成功', 'success')
validFiles.forEach((fileItem, index) => {
this.showMessage('所有文件上传并合并成功', 'success')
validFiles.forEach((fileItem) => {
fileItem.mergeEndTime = new Date().getTime()
const mergeDuration = this.getTimeDiff(fileItem.mergeStartTime, fileItem.mergeEndTime)
console.log(`【文件${fileItem.file.name}】合并结束时间:${this.formatTime(fileItem.mergeEndTime)},合并耗时:${mergeDuration}`)
// const mergeResult = response.data.data || {}
// fileItem.successMsg = '! : ' + (mergeResult.filePath || '')
fileItem.successMsg = '上传成功!'
fileItem.merging = false
})
console.log(`【整体合并】所有文件合并完成,合并结束时间:${this.formatTime(this.totalMergeEndTime)}整体合并耗时:${totalMergeDuration}`)
console.log(`【整体合并】所有文件合并完成,整体合并耗时:${totalMergeDuration}`)
this.$emit('onUploadSuccess', response.data.data, validFiles.map(f => f.file.name), jsonArray)
this.uploadMinioVisible = false
this.fileList = [] //
} else {
throw new Error(response.data.msg || '合并失败')
}
} catch (err) {
this.totalMergeEndTime = new Date().getTime()
const totalMergeDuration = this.getTimeDiff(this.totalMergeStartTime, this.totalMergeEndTime)
console.log(`【整体合并】合并失败,失败时间:${this.formatTime(this.totalMergeEndTime)},合并耗时:${totalMergeDuration},异常信息:`, err)
this.showMessage(`合并失败: ${err.message}`, 'error')
console.log(`【整体合并】合并失败,耗时:${totalMergeDuration},异常信息:`, err)
this.showMessage(`文件合并失败: ${err.message}`, 'error')
validFiles.forEach(fileItem => {
fileItem.merging = false
fileItem.errorMsg = fileItem.errorMsg || `合并失败: ${err.message}`
@ -501,8 +564,14 @@ export default {
this.resetUploadState()
}
},
handleClearData() {
/**
* 关闭弹框时清空文件列表
*/
handleCloseDialog() {
this.uploadMinioVisible = false
this.fileList = []
this.resetUploadState()
}
}
}
@ -511,58 +580,41 @@ export default {
<style scoped>
.upload-minio {
position: relative;
/* max-width: 800px; */
margin-top: 20px;
/* background-color: red; */
.el-button{
cursor: pointer;
}
margin-top: 10px;
}
/* 隐藏的文件选择input,覆盖在按钮上 */
.file-input {
position: absolute;
left: 0;
top: 0;
width: 100px;
height: 36px;
padding: 5px;
opacity: 0;
cursor: pointer;
z-index: 10;
}
.ca-checking {
color: #1890ff;
font-size: 14px;
margin: 5px 0;
}
.ca-invalid {
color: #ff4444;
font-size: 14px;
margin: 5px 0;
}
.recheck-btn {
margin: 5px 0 20px;
padding: 5px 10px;
cursor: pointer;
background: #42b983;
color: #fff;
border: none;
border-radius: 4px;
}
.recheck-btn:disabled {
background: #ccc;
cursor: not-allowed;
/* 弹框内空提示 */
.empty-tip {
text-align: center;
color: #999;
padding: 20px 0;
}
.file-item {
padding: 15px;
width: 100%;
border: 1px dashed #409eff;
padding: 10px;
border-radius: 4px;
margin-bottom: 10px;
}
.file-name {
font-weight: 500;
margin-bottom: 10px;
color: #333;
margin-bottom: 8px;
}
.progress-wrapper {
@ -572,7 +624,6 @@ export default {
}
.progress-bar {
width: 100%;
height: 10px;
background-color: #42b983;
transition: width 0.3s ease;
@ -585,20 +636,33 @@ export default {
}
.merge-loading {
margin: 10px 0;
color: #1890ff;
font-size: 14px;
}
.success {
color: #00C851;
margin: 10px 0 0 0;
font-size: 14px;
margin: 5px 0 0 0;
}
.error {
color: #ff4444;
margin: 10px 0 0 0;
font-size: 14px;
margin: 5px 0 0 0;
}
.minio-file{
.el-dialog{
.el-dialog__body{
padding: 15px 0 30px 0 !important;
}
}
}
.file-size {
color: #666;
font-weight: normal;
font-size: 12px;
margin-left: 8px;
}
</style>

4
src/views/components/categoryTree.vue

@ -6,7 +6,7 @@
<div class="arc-left-tree">
<h3 class="arc-title arc-title-top">档案门类</h3>
<div class="tree-scroll">
<el-tree ref="categroyTree" v-loading="loading" class="arc-tree" :data="categroyTree" :props="defaultProps" node-key="id" :expand-on-click-node="false" default-expand-all highlight-current @node-click="handleNodeClick">
<el-tree ref="categroyTree" v-loading="loading" class="arc-tree" :data="categroyTree" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<el-tooltip :content="node.label" placement="left" :enterable="false" effect="dark">
<span v-if="data.isType === 0">
@ -106,7 +106,6 @@ export default {
localStorage.removeItem('currentArchivesKey')
}
this.topLevelNode = this.findTopLevelNode(this.categroyTree, currentKey.fondsId)
//
if (this.topLevelNode) {
if (currentKey) {
//
@ -137,6 +136,7 @@ export default {
})
},
handleNodeClick(val) {
localStorage.setItem('currentArchivesKey', JSON.stringify(val))
this.selectedCategory = val
this.$emit('nodeClick', val)
},

48
src/views/prearchiveLibrary/treeList.vue

@ -5,7 +5,7 @@
<span class="left-bottom-line" />
<!--门类树状结构-->
<div class="tree-scroll">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="keyId" :expand-on-click-node="false" highlight-current default-expand-all @node-click="handleNodeClick">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="keyId" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<span slot-scope="{node,data}" class="custom-tree-node">
<div v-if="data.isType === 1">
<span v-if="data.label.length <= 10 " class="iconFolder tree-text"> {{ data.label }}</span>
@ -115,13 +115,46 @@ export default {
}
return newItem
})
console.log('this.crud.data', this.crud.data)
this.$nextTick(() => {
if (this.crud.data.length > 0 && this.crud.data[0].children && this.crud.data[0].children.length > 0) {
const targetNode = this.crud.data[0].children[0]
const node = this.$refs.tree.getNode(targetNode.keyId)
if (node) {
this.$refs.tree.setCurrentKey(targetNode.keyId)
this.handleNodeClick(node.data)
const cachedKey = localStorage.getItem('currentDocumentKey')
let targetNode = null
if (cachedKey) {
try {
const { fondsId, id } = JSON.parse(cachedKey)
// 1. fondsId
const parentNode = this.crud.data.find(parent => parent.fonds_id === fondsId)
if (parentNode) {
const treeParentNode = this.$refs.tree.getNode(parentNode.keyId)
if (treeParentNode) {
treeParentNode.expanded = true
// 3. id
targetNode = parentNode.children.find(child => child.id === id)
}
}
} catch (e) {
console.error('解析缓存节点失败', e)
localStorage.removeItem('currentDocumentKey')
}
}
if (targetNode) {
this.$refs.tree.setCurrentKey(targetNode.keyId)
this.handleNodeClick(targetNode)
} else {
//
if (this.crud.data.length > 0 && this.crud.data[0].children && this.crud.data[0].children.length > 0) {
const defaultChild = this.crud.data[0].children[0]
const treeDefaultNode = this.$refs.tree.getNode(defaultChild.keyId)
if (treeDefaultNode) {
//
const defaultParentNode = this.$refs.tree.getNode(this.crud.data[0].keyId)
defaultParentNode.expanded = true
//
this.$refs.tree.setCurrentKey(defaultChild.keyId)
this.handleNodeClick(defaultChild)
}
}
}
})
@ -129,6 +162,7 @@ export default {
//
handleNodeClick(val) {
console.log('val', val)
localStorage.setItem('currentDocumentKey', JSON.stringify(val))
if (val) {
this.$emit('nodeClick', val)
}

11
src/views/preview/index.vue

@ -54,7 +54,7 @@
</template>
<script>
import { FetchReDocumentBase64ByFileId } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { FetchMinioReDocumentBase64ByFileId } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { FetchBase64ByFileId } from '@/api/archivesManage/library'
import { getExtend, readBuffer, render } from '@/components/util'
import { parse } from 'qs'
@ -196,10 +196,10 @@ export default {
this.loading = true
if (this.documentId) {
const params = {
'fileId': this.fileCurrent.id,
'documentId': this.documentId
'filePath': this.fileCurrent.file_path,
'bucketType': 1
}
FetchReDocumentBase64ByFileId(params).then(res => {
FetchMinioReDocumentBase64ByFileId(params).then(res => {
var base64String = res
var fileName = this.fileCurrent && this.fileCurrent.file_name
var mimeType = this.fileCurrent && this.fileCurrent.file_type
@ -210,7 +210,8 @@ export default {
})
} else {
const params = {
'fileId': this.fileCurrent ? this.fileCurrent.id : this.allFileTables[0].id
'fileId': this.fileCurrent ? this.fileCurrent.id : this.allFileTables[0].id,
'bucketType': 2
}
FetchBase64ByFileId(params).then(res => {
console.log('res', res)

14
src/views/system/authorizeManage/index.vue

@ -72,7 +72,7 @@
<el-option v-for="item in timeOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="所属全宗" prop="fondsId">
<!-- <el-form-item label="所属全宗" prop="fondsId">
<el-select v-model="form.fondsId" placeholder="请选择" style="width: 580px;" @change="changeFondsValue($event)">
<el-option
v-for="(item,index) in fondsOptions"
@ -81,7 +81,7 @@
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入" style="width: 580px;" type="textarea" :rows="3" />
</el-form-item>
@ -137,8 +137,8 @@ import crudOperation from '@crud/CRUD.operation'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import { mapGetters } from 'vuex'
const defaultForm = { appKey: null, appSecret: null, name: null, tokenDuration: 2, fondsId: null, remarks: null }
// fondsId: null,
const defaultForm = { appKey: null, appSecret: null, name: null, tokenDuration: 2, remarks: null }
export default {
name: 'AuthorizeManage',
@ -170,10 +170,10 @@ export default {
],
tokenDuration: [
{ required: true, message: '请选择', trigger: 'change' }
],
fondsId: [
{ required: true, message: '请选择', trigger: 'change' }
]
// fondsId: [
// { required: true, message: '', trigger: 'change' }
// ]
},
verifyDialogVisible: false,
verfiyForm: {

Loading…
Cancel
Save