Browse Source

bug修复

master
xuhuajiao 4 months ago
parent
commit
fa25a244a9
  1. 2
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  2. 272
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  3. 5
      src/views/components/archivesDetail/detail.vue
  4. 59
      src/views/components/archivesDetail/uploadFile/index.vue
  5. 104
      src/views/components/category/PreviewForm.vue
  6. 20
      src/views/components/echarts/graph.vue
  7. 8
      src/views/system/archivesCategory/processManage/index.vue
  8. 37
      src/views/system/archivesCategory/processManage/module/form.vue
  9. 5
      src/views/system/processManage/modelDesign/index.vue
  10. 42
      src/views/system/processManage/runningProcess/module/businessDetails/index.vue
  11. 9
      src/views/system/processManage/runningProcess/module/detail.vue
  12. 18
      src/views/system/user/processCenter/module/form.vue

2
src/views/archivesManage/managementLibrary/module/collectHeader.vue

@ -168,7 +168,7 @@
:category-menu="categoryMenu" :category-menu="categoryMenu"
@close-dialog="closeDialog" @close-dialog="closeDialog"
/> />
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer" style="margin-top: 85px !important;">
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button> <el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
</div> </div>
</div> </div>

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

@ -138,26 +138,46 @@
</div> </div>
<!--新增 / 编辑 表单组件--> <!--新增 / 编辑 表单组件-->
<el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body :before-close="handleClose" :visible="formVisible" :title="formTitle">
<el-dialog :class="isAiAutoCategory ? 'preview-dialog ai-preview-dialog' :'preview-dialog'" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body :before-close="handleClose" :visible="formVisible" :title="formTitle">
<span class="dialog-right-top" /> <span class="dialog-right-top" />
<span class="dialog-left-bottom" /> <span class="dialog-left-bottom" />
<div class="setting-dialog"> <div class="setting-dialog">
<!-- form @emitTableList="getTableList" --> <!-- form @emitTableList="getTableList" -->
<PreviewForm
v-if="formPreviewData.length"
ref="previewForm"
:is-has-code="true"
:is-disabled="false"
:form-preview-data.sync="formPreviewData"
:selected-category="selectedCategory"
:arc-id="arcId"
:is-des-form-type="isDesFormType"
:is-title-type="isTitleType"
:collect-level="collectLevel"
:category-menu="categoryMenu"
@close-dialog="closeDialog"
/>
<div style="display: flex; justify-content: flex-start;">
<PreviewForm
v-if="formPreviewData.length"
ref="previewForm"
:is-has-code="true"
:is-disabled="false"
:form-preview-data.sync="formPreviewData"
:selected-category="selectedCategory"
:arc-id="arcId"
:is-des-form-type="isDesFormType"
:is-title-type="isTitleType"
:collect-level="collectLevel"
:category-menu="categoryMenu"
@close-dialog="closeDialog"
/>
<div v-if="isAiAutoCategory" style="flex: 1; margin-left: 10px; ">
<!-- AI辅助著录内容 -->
<div style="display: flex; justify-content: flex-start;">
<div class="upload-btn">
<input id="upFile" type="file" name="upFile" multiple @change="changeAiFile($event)">
<el-button :loading="aiLoading" size="small" type="primary"><i :class="['iconfont', aiLoading ? 'icon-huoqu' : 'icon-shangchuan']" />{{ aiLoading ? 'AI辅助著录识别中' : '选择文件' }}</el-button>
</div>
<div style="flex: 1; margin-left: 10px; line-height: 34px; height: 106px; overflow: hidden; overflow-y: scroll;">
<div v-for="item in fileList" :key="item.name" class="file-list">
<i class="iconfont icon-xiaowenjian" />
{{ item.name }}
<i class="el-icon-close" @click="deleteFile(item)" />
</div>
</div>
</div>
<pre v-if="aiJsonData" ref="typingContainer" v-highlightjs="displayedText">{{ displayedText }}</pre>
</div>
</div>
<div slot="footer" class="dialog-footer" style="margin-top: 85px !important;"> <div slot="footer" class="dialog-footer" style="margin-top: 85px !important;">
<el-button type="primary" style="width: 84px;" @click="handleAiCategory">AI辅助著录</el-button>
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button> <el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
</div> </div>
</div> </div>
@ -244,6 +264,7 @@ import QuickPaper from './quickPaper/index'
import PackingBox from './packingBox/index' import PackingBox from './packingBox/index'
import ArchivesFilling from './archivesFilling/index' import ArchivesFilling from './archivesFilling/index'
import qs from 'qs' import qs from 'qs'
// getCurrentTime
import { downloadFile, exportFile } from '@/utils/index' import { downloadFile, exportFile } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -299,7 +320,14 @@ export default {
quickPaper: false, quickPaper: false,
quickPaperArcId: [], quickPaperArcId: [],
totalSumAll: 0, totalSumAll: 0,
categoryMenu: []
categoryMenu: [],
isAiAutoCategory: false,
aiLoading: false,
fileList: [],
aiJsonData: null,
displayedText: '',
typingInterval: null,
typingFinished: false
} }
}, },
computed: { computed: {
@ -1232,6 +1260,197 @@ export default {
setTimeout(() => { setTimeout(() => {
this.handleSearch(this.collectLevel) this.handleSearch(this.collectLevel)
}) })
},
handleAiCategory() {
this.isAiAutoCategory = !this.isAiAutoCategory
if (!this.isAiAutoCategory) {
this.fileList = []
}
},
async changeAiFile(e) {
// aiJsonData
this.aiJsonData = null
this.displayedText = ''
this.typingFinished = false
if (this.typingInterval) {
clearInterval(this.typingInterval)
}
const selectedFiles = Array.from(e.target.files)
const imageFiles = selectedFiles.filter(file => file.type.startsWith('image/'))
const nonImageFiles = selectedFiles.filter(file => !file.type.startsWith('image/'))
//
if (imageFiles.length > 0 && nonImageFiles.length > 0) {
this.$message.error('不能同时选择图片和其他类型文件,请重新选择')
return
}
const existingImageFiles = this.fileList.filter(item => item.formatType === 'image')
const existingNonImageFiles = this.fileList.filter(item => item.formatType !== 'image')
if (imageFiles.length > 0) {
if (existingImageFiles.length > 0) {
if (existingImageFiles.length + imageFiles.length > 3) {
// 3
this.fileList = this.fileList.filter(item => item.formatType !== 'image')
}
} else if (existingNonImageFiles.length > 0) {
//
this.fileList = this.fileList.filter(item => item.formatType === 'image')
}
//
if (imageFiles.length > 3) {
this.$message.error('图片文件最多只能选择 3 个,请重新选择')
return
}
for (const file of imageFiles) {
//
if (this.fileList.some(item => item.name === file.name)) {
this.$message.warning(`文件 ${file.name} 已存在,请勿重复上传`)
continue
}
const fileInfo = {
file: file,
size: file.size,
formatType: file.type.substring(0, file.type.indexOf('/')),
name: file.name,
postfix: file.name.substring(
file.name.lastIndexOf('.') + 1,
file.name.length
),
px: ''
}
const fileBase64 = await this.getBase64(file)
const res = await this.getImgPx(fileBase64)
fileInfo.px = res.width + 'px*' + res.height + 'px'
this.fileList.push(fileInfo)
this.uploadSave()
}
} else if (nonImageFiles.length > 0) {
if (existingNonImageFiles.length > 0) {
//
this.fileList = this.fileList.filter(item => item.formatType === 'image')
} else if (existingImageFiles.length > 0) {
//
this.fileList = this.fileList.filter(item => item.formatType !== 'image')
}
//
if (nonImageFiles.length > 1) {
this.$message.error('非图片文件最多只能选择 1 个,请重新选择')
return
}
for (const file of nonImageFiles) {
//
if (this.fileList.some(item => item.name === file.name)) {
this.$message.warning(`文件 ${file.name} 已存在,请勿重复上传`)
continue
}
const fileInfo = {
file: file,
size: file.size,
formatType: file.type.substring(0, file.type.indexOf('/')),
name: file.name,
postfix: file.name.substring(
file.name.lastIndexOf('.') + 1,
file.name.length
),
px: ''
}
this.fileList.push(fileInfo)
this.uploadSave()
}
}
},
uploadSave() {
this.aiLoading = true
this.aiJsonData = null
// this.$refs.previewForm.addOrUpdateForm = {}
setTimeout(() => {
const json = `{
"fonds_no": "A001",
"archival_category_code": "WSWJ",
"archive_ctg_no": "SCGL",
"archive_year": "2024",
"retention": "永久",
"item_no": "0005",
"archive_no": "A001-WSWJ·SCGL-2024-Y-0005",
"maintitle": "Windows下如何创建FTP文件夹",
"keyword": "",
"doc_no": "武汉飞天[2024]0005",
"is_entity": 1,
"id": "6C91AAD1F6D9940469F8B0"
}`
this.aiJsonData = json
this.startTypingEffect()
}, 3000)
},
startTypingEffect() {
const lines = this.aiJsonData.split('\n')
let currentLineIndex = 0
this.displayedText = ''
this.typingFinished = false
this.typingInterval = setInterval(() => {
if (currentLineIndex < lines.length) {
this.displayedText += lines[currentLineIndex] + '\n'
currentLineIndex++
} else {
clearInterval(this.typingInterval)
setTimeout(() => {
this.typingFinished = true
this.$refs.previewForm.archivesType = 'add'
this.$refs.previewForm.addOrUpdateForm = JSON.parse(this.aiJsonData)
}, 1000)
}
//
const container = this.$refs.typingContainer
if (container) {
container.scrollTop = container.scrollHeight
}
this.aiLoading = false
}, 200)
},
deleteFile(item) {
const index = this.fileList.indexOf(item)
if (index !== -1) {
this.fileList.splice(index, 1)
}
},
// base64
getBase64(file) {
const reader = new FileReader()
reader.readAsDataURL(file)
return new Promise((resolve) => {
reader.onload = () => {
resolve(reader.result)
}
})
},
//
getImgPx(img) {
const image = new Image()
image.src = img
return new Promise((resolve) => {
image.onload = () => {
const width = image.width
const height = image.height
resolve({ width, height })
}
})
} }
} }
} }
@ -1268,4 +1487,25 @@ export default {
::v-deep.vue-treeselect--has-value .vue-treeselect__single-value{ ::v-deep.vue-treeselect--has-value .vue-treeselect__single-value{
font-size: 14px; font-size: 14px;
} }
.ai-preview-dialog{
::v-deep .el-dialog{
width: 1300px !important;
.preview-content{
width: 728px !important;
}
}
}
pre {
background-color: #f4f4f4;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
white-space: pre-wrap;
word-wrap: break-word;
height: calc(100vh - 430px);
overflow: hidden;
overflow-y: auto;
}
</style> </style>

5
src/views/components/archivesDetail/detail.vue

@ -29,7 +29,7 @@
</el-row> </el-row>
</div> </div>
<!-- 附件 --> <!-- 附件 -->
<UploadFile v-if="archivesTabIndex===1" ref="uploadFile" class="item-content" :is-upload-detail="false" :selected-category="selectedCategory" :arc-id="arcId" :category-id="categoryId" />
<UploadFile v-if="archivesTabIndex===1" ref="uploadFile" class="item-content" :is-upload-detail="false" :selected-category="selectedCategory" :arc-id="arcId" :category-id="categoryId" :is-show-utilize-handle-btn="isShowUtilizeHandleBtn" :archives-details-data="archivesDetailsData" />
<!-- 元数据 --> <!-- 元数据 -->
<div v-if="archivesTabIndex===2" class="metadata-cont item-content"> <div v-if="archivesTabIndex===2" class="metadata-cont item-content">
<pre v-highlightjs="xml_show"> <pre v-highlightjs="xml_show">
@ -88,7 +88,8 @@ export default {
archivesTabIndex: 0, archivesTabIndex: 0,
archivesDetailsData: [], archivesDetailsData: [],
archivesDetailsMetadata: [], archivesDetailsMetadata: [],
xml_show: null
xml_show: null,
isShowUtilizeHandleBtn: false
} }
}, },
computed: { computed: {

59
src/views/components/archivesDetail/uploadFile/index.vue

@ -63,16 +63,15 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="130" align="center" /> <el-table-column prop="create_time" label="创建时间" min-width="130" align="center" />
<!-- && !recycleMain.isRecycle -->
<!-- <el-table-column label="操作" min-width="80" align="center">
<template>
<el-table-column v-if="isShowUtilizeHandleBtn" label="操作" min-width="80" align="center">
<template slot-scope="scope">
<div class="handle-btn"> <div class="handle-btn">
<el-button class="iconfont icon-sulan" @click="toPreview" />
<el-button class="iconfont icon-xiazai" />
<el-button class="iconfont icon-dayin" />
<el-button v-if="authUtilize.look" class="iconfont icon-sulan" @click="toPreview(scope.row)" />
<el-button v-if="authUtilize.download" class="iconfont icon-xiazai" @click="downloadFile(scope.row)" />
<el-button v-if="authUtilize.print" class="iconfont icon-dayin" />
</div> </div>
</template> </template>
</el-table-column> -->
</el-table-column>
</el-table> </el-table>
<!-- 点击缩略图看大图 --> <!-- 点击缩略图看大图 -->
@ -122,6 +121,7 @@ import { FetchInitFileCategoryView } from '@/api/collect/collect'
import { archivesUpload } from '@/utils/upload' import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index' import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { FetchIsAuthByLookType } from '@/api/archivesManage/library'
// import Sortable from 'sortablejs' // import Sortable from 'sortablejs'
export default { export default {
name: 'UploadFile', name: 'UploadFile',
@ -149,6 +149,16 @@ export default {
default: function() { default: function() {
return '' return ''
} }
},
isShowUtilizeHandleBtn: {
type: Boolean,
default: false
},
archivesDetailsData: {
type: Array,
default: function() {
return []
}
} }
}, },
data() { data() {
@ -169,7 +179,14 @@ export default {
filePath: '', // - path filePath: '', // - path
px: '', // - px: '', // -
nowDate: '', // nowDate: '', //
previewSrc: '' // src
previewSrc: '', // src
authUtilize: {
'look': false,
'download': false,
'print': false,
'endTime': null,
'startTime': null
}
} }
}, },
computed: { computed: {
@ -181,10 +198,32 @@ export default {
arcId: function(newValue, oldValue) { arcId: function(newValue, oldValue) {
} }
}, },
mounted() {
this.getIsAuthByLookType()
console.log('archivesDetailsData', this.archivesDetailsData)
},
methods: { methods: {
toPreview() {
const routeData = this.$router.resolve({ path: '/preview' })
getIsAuthByLookType() {
const params = {
'archivesId': this.arcId
}
FetchIsAuthByLookType(params).then(res => {
this.authUtilize = res
})
},
toPreview(row) {
const routeData = this.$router.resolve({
path: '/preview',
query: {
'archiveNo': this.archivesDetailsData.find(item => item.fieldName === 'archive_no').context
}})
window.open(routeData.href, '_blank') window.open(routeData.href, '_blank')
if (localStorage.getItem('documentId')) {
localStorage.removeItem('documentId')
}
// localStorage.setItem('fileParentInfo', JSON.stringify(this.archivesDetailsData))
localStorage.setItem('fileTables', JSON.stringify(this.tableData))
localStorage.setItem('fileCurrent', JSON.stringify(row))
}, },
getFileSize(fileSize) { getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB' const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'

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

@ -1,4 +1,5 @@
<template> <template>
<!-- :style="`padding: ${isDesFormType === 'arcives' ? '20px 0 100px 0 !important' : ''};` -->
<div class="preview-content right-preview"> <div class="preview-content right-preview">
<el-form ref="addOrUpdateForm" :model="addOrUpdateForm" :rules="rules" :validate-on-rule-change="false" label-width="125px"> <el-form ref="addOrUpdateForm" :model="addOrUpdateForm" :rules="rules" :validate-on-rule-change="false" label-width="125px">
<el-row :gutter="4" style="padding:0 20px"> <el-row :gutter="4" style="padding:0 20px">
@ -73,14 +74,27 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="isDesFormType !== 'prearchiveLibrary' && isDesFormType !== 'mergeFile' && isDesFormType !== 'category' && !isAiCategory" class="preview-form-bottom prearch-bottom"> <el-row v-if="isDesFormType !== 'prearchiveLibrary' && isDesFormType !== 'mergeFile' && isDesFormType !== 'category' && !isAiCategory" class="preview-form-bottom prearch-bottom">
<el-col v-for="(item,index) in formPreviewData" :key="index">
<el-form-item v-if="item.fieldName === 'is_entity'" label="有无实体" :prop="item.fieldName" :rules="[{ required: true, message: '请选择',trigger: 'change' }]" class="pbysical-style">
<el-radio-group v-model="addOrUpdateForm[item.fieldName]">
<el-col>
<el-form-item v-if="formPreviewData[entityIndex] && formPreviewData[entityIndex].fieldName === 'is_entity'" label="有无实体" :prop="formPreviewData[entityIndex].fieldName" :rules="[{ required: true, message: '请选择',trigger: 'change' }]" class="pbysical-style">
<el-radio-group v-model="addOrUpdateForm[formPreviewData[entityIndex].fieldName]">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col v-if="isDesFormType === 'arcives'">
<el-form-item label="AI辅助著录" class="pbysical-style">
<div class="upload-btn">
<input id="upFile" type="file" name="upFile" multiple @change="changeAiFile($event)">
<el-button size="small" type="primary"><i class="iconfont icon-shangchuan" />上传</el-button>
</div>
<div v-for="item in fileList" :key="item.name" class="file-list">
<i class="iconfont icon-xiaowenjian" />
{{ item.name }}
<i class="el-icon-close" @click="deleteFile(item)" />
</div>
</el-form-item>
</el-col> -->
</el-row> </el-row>
</el-form> </el-form>
@ -233,7 +247,9 @@ export default {
mergeFileArcIds: null, mergeFileArcIds: null,
mergeFileCategory: null, mergeFileCategory: null,
archivesType: null, archivesType: null,
activeIndex: null
activeIndex: null,
entityIndex: null,
fileList: []
} }
}, },
computed: { computed: {
@ -691,6 +707,7 @@ export default {
// //
editFormRow() { editFormRow() {
this.rules = {} this.rules = {}
this.entityIndex = this.formPreviewData.findIndex(item => item.fieldName === 'is_entity')
// if (this.isDesFormType === 'prearchiveLibrary' && this.archivesType === 'add') { // if (this.isDesFormType === 'prearchiveLibrary' && this.archivesType === 'add') {
// this.$set(this.addOrUpdateForm, 'fileOriginal', null) // this.$set(this.addOrUpdateForm, 'fileOriginal', null)
// } // }
@ -928,6 +945,85 @@ export default {
} }
}) })
}, },
async changeAiFile(e) {
const selectedFiles = Array.from(e.target.files)
const imageFiles = selectedFiles.filter(file => file.type.startsWith('image/'))
const nonImageFiles = selectedFiles.filter(file => !file.type.startsWith('image/'))
//
const existingImageFiles = this.fileList.filter(item => item.formatType === 'image')
const existingNonImageFiles = this.fileList.filter(item => item.formatType !== 'image')
//
if (existingImageFiles.length > 0 && nonImageFiles.length > 0) {
this.$message.error('已有图片文件,此次只能上传图片文件')
return
}
if (existingNonImageFiles.length > 0 && imageFiles.length > 0) {
this.$message.error('已有非图片文件,此次只能上传非图片文件')
return
}
//
const remainingImageSlots = 3 - existingImageFiles.length
const remainingNonImageSlots = 1 - existingNonImageFiles.length
//
if (imageFiles.length > remainingImageSlots) {
this.$message.error(`图片文件最多还能选择 ${remainingImageSlots}`)
return
}
//
if (nonImageFiles.length > remainingNonImageSlots) {
this.$message.error(`非图片文件最多还能选择 ${remainingNonImageSlots}`)
return
}
const validFiles = imageFiles.length > 0 ? imageFiles : nonImageFiles
for (const file of validFiles) {
//
if (this.fileList.some(item => item.name === file.name)) {
this.$message.warning(`文件 ${file.name} 已存在,请勿重复上传`)
continue
}
const fileInfo = {
file: file,
size: file.size,
formatType: file.type.substring(0, file.type.indexOf('/')),
name: file.name,
postfix: file.name.substring(
file.name.lastIndexOf('.') + 1,
file.name.length
),
px: ''
}
if (fileInfo.formatType === 'image') {
const fileBase64 = await this.getBase64(file)
const res = await this.getImgPx(fileBase64)
fileInfo.px = res.width + 'px*' + res.height + 'px'
}
this.fileList.push(fileInfo)
//
// reDocumentUpload(this.baseApi + '/api/re-document/uploadFile', file, this.selectedDocument.id).then(res => {
// if (res.data.code === 200) {
// this.filePath = res.data.data;
// this.uploadSave();
// }
// });
}
},
deleteFile(item) {
const index = this.fileList.indexOf(item)
if (index !== -1) {
this.fileList.splice(index, 1)
}
},
// - // -
uploadSave() { uploadSave() {
this.nowDate = getCurrentTime() this.nowDate = getCurrentTime()

20
src/views/components/echarts/graph.vue

@ -11,15 +11,12 @@
> >
<template #node="{node}"> <template #node="{node}">
<div @mouseover="showNodeTips(node, $event)" @mouseout="hideNodeTips(node, $event)"> <div @mouseover="showNodeTips(node, $event)" @mouseout="hideNodeTips(node, $event)">
<div :class="node.id === 1 ? 'c-my-rg-node c-big-style': 'c-my-rg-node '" :style="{'height': node.width + 'px', 'line-height': node.width + 'px'}">
{{ node.size }}
<div :class="node.id === '1' ? 'c-my-rg-node c-big-style': 'c-my-rg-node '" :style="{'height': node.width + 'px', 'line-height': node.width + 'px'}">
{{ node.text }}
</div> </div>
</div> </div>
</template> </template>
<template #graph-plug> <template #graph-plug>
<!-- <div
style="position:absolute;z-index:700;left:20px;top:20px;height:70px;padding: 20px;border: #efefef solid 1px;color: #555555;border-radius: 10px;background-color: rgba(255,255,255,0.79);font-size: 12px;"
/> -->
<div v-if="isShowNodeTipsPanel" :style="{left: nodeMenuPanelPosition.x + 'px', top: nodeMenuPanelPosition.y + 'px' }" style="z-index: 999;padding:10px;background-color: #ffffff;border:#eeeeee solid 1px;box-shadow: 0px 0px 8px #cccccc;position: absolute;"> <div v-if="isShowNodeTipsPanel" :style="{left: nodeMenuPanelPosition.x + 'px', top: nodeMenuPanelPosition.y + 'px' }" style="z-index: 999;padding:10px;background-color: #ffffff;border:#eeeeee solid 1px;box-shadow: 0px 0px 8px #cccccc;position: absolute;">
<div style="line-height: 25px;padding-left: 10px;color: #888888;font-size: 12px;">节点名称{{ currentNode.text }}</div> <div style="line-height: 25px;padding-left: 10px;color: #888888;font-size: 12px;">节点名称{{ currentNode.text }}</div>
<div class="c-node-menu-item">id:{{ currentNode.id }}</div> <div class="c-node-menu-item">id:{{ currentNode.id }}</div>
@ -33,7 +30,7 @@
<script> <script>
import RelationGraph from 'relation-graph' import RelationGraph from 'relation-graph'
const __graph_json_data_small = {
const graph_json_data = {
'rootId': '1', 'rootId': '1',
'nodes': [ 'nodes': [
{ id: '1', text: '文书档案', force_weight: 10000, color: '#ec6941', borderColor: '#ff875e', width: 150, height: 150 }, { id: '1', text: '文书档案', force_weight: 10000, color: '#ec6941', borderColor: '#ff875e', width: 150, height: 150 },
@ -88,7 +85,7 @@ export default {
components: { RelationGraph }, components: { RelationGraph },
data() { data() {
return { return {
allData: __graph_json_data_small,
allData: graph_json_data,
isShowCodePanel: false, isShowCodePanel: false,
isShowNodeTipsPanel: false, isShowNodeTipsPanel: false,
nodeMenuPanelPosition: { x: 0, y: 0 }, nodeMenuPanelPosition: { x: 0, y: 0 },
@ -123,15 +120,10 @@ export default {
}, },
methods: { methods: {
async showGraph() { async showGraph() {
// const data = __graph_json_data_small
const graphInstance = this.$refs.graphRef.getInstance() const graphInstance = this.$refs.graphRef.getInstance()
await this.stopForceIfNeed() await this.stopForceIfNeed()
await graphInstance.setJsonData(this.allData) await graphInstance.setJsonData(this.allData)
// if (this.useBigData) {
// await graphInstance.setZoom(30)
// } else {
// await graphInstance.setZoom(80)
// }
await graphInstance.setZoom(80)
}, },
async stopForceIfNeed() { async stopForceIfNeed() {
const graphInstance = this.$refs.graphRef.getInstance() const graphInstance = this.$refs.graphRef.getInstance()
@ -184,7 +176,6 @@ export default {
console.log('onCanvasClick:') console.log('onCanvasClick:')
const graphInstance = this.$refs.graphRef.getInstance() const graphInstance = this.$refs.graphRef.getInstance()
for (const node of graphInstance.getNodes()) { for (const node of graphInstance.getNodes()) {
console.log('node', node)
node.opacity = 1 node.opacity = 1
this.allData.nodes.forEach((item, index) => { this.allData.nodes.forEach((item, index) => {
if (item.id === node.id) { if (item.id === node.id) {
@ -231,6 +222,7 @@ export default {
// } // }
.c-my-rg-node { .c-my-rg-node {
font-size: 16px;
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
height: 80px; height: 80px;

8
src/views/system/archivesCategory/processManage/index.vue

@ -93,11 +93,15 @@ export default {
this.editInfoFlow = null this.editInfoFlow = null
this.$message({ message: '数据请求失败', type: 'error', offset: 8 }) this.$message({ message: '数据请求失败', type: 'error', offset: 8 })
} }
this.$nextTick(() => {
this.$refs.cuform.cuDialogVisible = true
this.$refs.cuform.setPocessCurrent = item
this.$refs.cuform.handleEditInfoFlow(this.editInfoFlow)
})
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
this.$refs.cuform.cuDialogVisible = true
this.$refs.cuform.setPocessCurrent = item
}, },
changeCategoryState(item) { changeCategoryState(item) {
const filterItem = this.flowSetting.find(v => item.id === v.flowManageId) const filterItem = this.flowSetting.find(v => item.id === v.flowManageId)

37
src/views/system/archivesCategory/processManage/module/form.vue

@ -113,25 +113,23 @@ export default {
} }
}, },
watch: { watch: {
editInfoFlow: function(n, oldValue) {
if (n) {
const findItem = this.findIdByModelId(n.flowId)
this.form.model = findItem
this.selectModel(findItem)
n.categoryFlowDetails.forEach((item, index) => {
this.$set(this.form, `task${index + 1}`, item.postId)
this.$nextTick(() => {
this.selectJob(item.postId, index)
})
})
}
}
// editInfoFlow: {
// handler(newVal, oldVal) {
// // this.handleEditInfoFlow(newVal)
// },
// deep: true
// }
}, },
mounted() { mounted() {
this.getAllFlowable() this.getAllFlowable()
this.getAllJob() this.getAllJob()
}, },
methods: { methods: {
handleEditInfoFlow(newVal) {
const findItem = this.findIdByModelId(newVal.flowId)
this.form.model = findItem
this.selectModel(findItem, newVal)
},
findIdByModelId(modelId) { findIdByModelId(modelId) {
const item = this.modelOptions.find(data => data.modelId === modelId) const item = this.modelOptions.find(data => data.modelId === modelId)
if (item) { if (item) {
@ -147,7 +145,7 @@ export default {
console.log(err) console.log(err)
}) })
}, },
selectModel(val) {
selectModel(val, parentProcessVal) {
this.selectFlowVal = val this.selectFlowVal = val
this.loadingImg = true this.loadingImg = true
FetchFindFolwImgByModelId({ 'processDefinitionId': val.procdefId }).then((res) => { FetchFindFolwImgByModelId({ 'processDefinitionId': val.procdefId }).then((res) => {
@ -157,7 +155,8 @@ export default {
console.log(err) console.log(err)
}) })
FetchUserTaskAllByDeployId({ 'deployId': val.deployId }).then((res) => { FetchUserTaskAllByDeployId({ 'deployId': val.deployId }).then((res) => {
this.taskList = res.map(item => {
this.taskList = res.map((item, index) => {
this.$set(this.form, `task${index + 1}`, null)
return { return {
...item, ...item,
isExpend: false, isExpend: false,
@ -165,6 +164,12 @@ export default {
postId: null postId: null
} }
}) })
if (parentProcessVal) {
parentProcessVal.categoryFlowDetails.forEach((item, index) => {
this.$set(this.form, `task${index + 1}`, item.postId)
this.selectJob(item.postId, index)
})
}
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
@ -226,8 +231,10 @@ export default {
this.loading = false this.loading = false
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
this.loading = false
}) })
} else { } else {
this.loading = false
return false return false
} }
}) })

5
src/views/system/processManage/modelDesign/index.vue

@ -31,10 +31,11 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
const linkSrc = process.env.NODE_ENV === 'production' ? window.g.ApiUrl : process.env.VUE_APP_BASE_API
if (this.currentModelId) { if (this.currentModelId) {
this.url = 'http://192.168.99.67:11110/flowable-ui/modeler/#/processes/' + this.currentModelId
this.url = linkSrc + '/flowable-ui/modeler/#/processes/' + this.currentModelId
} else { } else {
this.url = 'http://192.168.99.67:11110/flowable-ui/modeler'
this.url = linkSrc + '/flowable-ui/modeler'
} }
const iframe = this.$refs.myIframe const iframe = this.$refs.myIframe
iframe.addEventListener('load', () => { iframe.addEventListener('load', () => {

42
src/views/system/processManage/runningProcess/module/businessDetails/index.vue

@ -52,6 +52,7 @@
<script> <script>
import ArchivesInfo from '@/views/components/archivesDetail/detail' import ArchivesInfo from '@/views/components/archivesDetail/detail'
import { parseTime } from '@/utils/index'
export default { export default {
name: 'BusinessDetails', name: 'BusinessDetails',
@ -78,6 +79,12 @@ export default {
page: 0 page: 0
} }
} }
},
baseInfo: {
type: Object,
default: function() {
return { }
}
} }
}, },
data() { data() {
@ -113,19 +120,54 @@ export default {
label: '不允许借阅' label: '不允许借阅'
} }
] ]
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
formatDate(date) {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
},
handleChange(id, value) { handleChange(id, value) {
this.$emit('select-change', { id, value }) this.$emit('select-change', { id, value })
}, },
// table - // table -
tableDoubleClick(row) { tableDoubleClick(row) {
// true
// console.log('666baseInfo', this.baseInfo)
// console.log('baseInfo.status === 3 ???', this.baseInfo.status)
// console.log('giveStartTime ???', parseTime(this.baseInfo.giveStartTime))
// console.log('giveEndTime ???', parseTime(this.baseInfo.giveEndTime))
// console.log('isUtilize', this.isUtilize)
// console.log('row', row)
this.categoryId = row.categoryPid this.categoryId = row.categoryPid
this.arcId = row.archivesId this.arcId = row.archivesId
this.$nextTick(() => { this.$nextTick(() => {
const currentDate = new Date()
const formattedDate = this.formatDate(currentDate)
console.log('currentDate', currentDate)
console.log(parseTime(this.baseInfo.giveStartTime))
const isStartTimeValid = parseTime(this.baseInfo.giveStartTime) <= formattedDate
const isEndTimeValid = parseTime(this.baseInfo.giveEndTime) >= formattedDate
console.log(isStartTimeValid)
console.log(isEndTimeValid)
// isShowUtilizeHandleBtn
if (this.isUtilize && this.baseInfo.status === 3 && isStartTimeValid && isEndTimeValid) {
console.log('222222222')
this.$refs.archivesInfo.isShowUtilizeHandleBtn = true
} else {
console.log('ffffffff')
this.$refs.archivesInfo.isShowUtilizeHandleBtn = false
}
this.$refs.archivesInfo.archivesInfoVisible = true this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0 this.$refs.archivesInfo.archivesTabIndex = 0
this.$refs.archivesInfo.isFourTest = true this.$refs.archivesInfo.isFourTest = true

9
src/views/system/processManage/runningProcess/module/detail.vue

@ -63,7 +63,7 @@
<li :class="{'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">流程图</li> <li :class="{'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">流程图</li>
</ul> </ul>
<div v-if="activeIndex == 0" class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看详情</span></div> <div v-if="activeIndex == 0" class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看详情</span></div>
<component :is="comName" class="component-cont" :table-data="tableData" :src-img="srcImg" :task-table-list="taskTableList" :is-utilize="isUtilize" :set-page="setPage" @page-change="pageChangeHandler" @size-change="sizeChangeHandler" />
<component :is="comName" class="component-cont" :base-info="baseInfo" :table-data="tableData" :src-img="srcImg" :task-table-list="taskTableList" :is-utilize="isUtilize" :set-page="setPage" @page-change="pageChangeHandler" @size-change="sizeChangeHandler" />
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="detailVisible=false">确定</el-button> <el-button type="primary" @click="detailVisible=false">确定</el-button>
@ -100,7 +100,7 @@ export default {
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
baseInfo: null,
baseInfo: {},
isExpend: false, isExpend: false,
activeIndex: 0, activeIndex: 0,
selectRow: {}, selectRow: {},
@ -146,13 +146,16 @@ export default {
}, },
getBusinessFlowDetails() { getBusinessFlowDetails() {
const params = { const params = {
'businessId': this.isMessage ? this.selectCenterRow.businessId : this.selectRow.businessId,
'businessId': this.isMessage ? this.selectCenterRow.businessId : this.selectRow.id,
'page': this.setPage.page, 'page': this.setPage.page,
'size': this.setPage.size 'size': this.setPage.size
} }
FetchBusinessFlowDetails(params).then((res) => { FetchBusinessFlowDetails(params).then((res) => {
if (res.code !== 500) { if (res.code !== 500) {
this.baseInfo = res.businessFlow this.baseInfo = res.businessFlow
console.log('this.baseInfo ', this.baseInfo)
if (res.businessFlow.businessType === 5) { if (res.businessFlow.businessType === 5) {
this.isUtilize = true this.isUtilize = true
res.details.content.forEach(item => { res.details.content.forEach(item => {

18
src/views/system/user/processCenter/module/form.vue

@ -48,8 +48,8 @@
<img :src="'data:image/jpeg;base64,'+ srcImg" alt="" :onerror="defaultImg"> <img :src="'data:image/jpeg;base64,'+ srcImg" alt="" :onerror="defaultImg">
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="submitOpinion(false)">驳回</el-button>
<el-button type="primary" @click="submitOpinion(true)">审批</el-button>
<el-button :loading="submitLoading" @click="submitOpinion(false)">驳回</el-button>
<el-button :loading="submitLoading2" type="primary" @click="submitOpinion(true)">审批</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -86,7 +86,9 @@ export default {
size: 10, size: 10,
page: 0 page: 0
}, },
isMessage: false
isMessage: false,
submitLoading: false,
submitLoading2: false
} }
}, },
computed: { computed: {
@ -188,6 +190,11 @@ export default {
this.getBusinessFlowDetails() this.getBusinessFlowDetails()
}, },
submitOpinion(type) { submitOpinion(type) {
if (type) {
this.submitLoading2 = true
} else {
this.submitLoading = true
}
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.selectRow.businessType === 5) { if (this.selectRow.businessType === 5) {
@ -296,6 +303,8 @@ export default {
}) })
} }
} else { } else {
this.submitLoading = false
this.submitLoading2 = false
return false return false
} }
}) })
@ -303,7 +312,8 @@ export default {
closedDialog() { closedDialog() {
this.formVisible = false this.formVisible = false
this.form.opinion = null this.form.opinion = null
this.submitLoading = false
this.submitLoading2 = false
this.$emit('refresh') this.$emit('refresh')
} }
} }

Loading…
Cancel
Save