Browse Source

需求优化1

master
xuhuajiao 4 weeks ago
parent
commit
73153c6d1c
  1. 4
      .env.development
  2. 2
      src/utils/request.js
  3. 85
      src/views/archivesManage/managementLibrary/anjuan/tableList.vue
  4. 3
      src/views/archivesManage/managementLibrary/mixins/index.js
  5. 19
      src/views/archivesManage/openInventory/index.vue
  6. 26
      src/views/archivesManage/openInventory/module/detail.vue
  7. 99
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  8. 23
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  9. 3
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  10. 21
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  11. 74
      src/views/components/category/PreviewForm.vue
  12. 33
      src/views/system/archivesCategory/listBrowsing/index.vue
  13. 15
      src/views/system/archivesCategory/listBrowsing/module/form.vue
  14. 4
      src/views/system/archivesCategory/processManage/index.vue
  15. 58
      src/views/system/archivesCategory/processManage/module/form.vue
  16. 2
      src/views/system/processManage/index.vue
  17. 98
      src/views/system/processManage/modelDesign/index.vue
  18. 10
      src/views/system/processManage/runningProcess/module/detail.vue
  19. 6
      src/views/system/user/processCenter/module/form.vue

4
.env.development

@ -3,7 +3,7 @@ ENV = 'development'
# 接口地址
# 许镇-本地服地址
VUE_APP_BASE_API = 'http://192.168.99.72:11200'
VUE_APP_BASE_API = 'http://192.168.99.63:11200'
# VUE_APP_BASE_API = 'http://192.168.99.72:11110'
# 107
@ -11,6 +11,6 @@ VUE_APP_BASE_API = 'http://192.168.99.72:11200'
# VUE_APP_BASE_API = 'http://192.168.99.107:11200'
VUE_APP_AIDEEPSEEK_API = 'http://192.168.99.86:12123'
# VUE_APP_PROCESSMODEL_API = 'http://192.168.99.72:11200'
VUE_APP_PROCESSMODEL_API = 'http://192.168.99.63:8080'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true

2
src/utils/request.js

@ -48,7 +48,7 @@ service.interceptors.response.use(
return response.data
} else {
Message.error({
message: errorMsg,
message: errorMsg || '数据请求失败',
duration: 5000
})
return Promise.reject(errorMsg)

85
src/views/archivesManage/managementLibrary/anjuan/tableList.vue

@ -10,6 +10,7 @@
highlight-current-row
style="width: 100%;"
height="calc(100vh - 364px)"
:default-sort="{ prop: '', order: '' }"
:row-class-name="tableRowClassName"
:row-key="rowKey"
@select-all="selectAll"
@ -19,6 +20,7 @@
@select="handleCurrentChange"
@mousedown.native="onMouseDown"
@mouseup.native="onMouseUp"
@sort-change="handleSortChange"
>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
@ -27,12 +29,12 @@
</template>
</el-table-column>
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
<el-table-column :label="selectedCategory.arrangeType === 1 ? '原文':'卷内'" prop="child" width="55" align="center">
<el-table-column :label="selectedCategory.arrangeType === 1 ? '原文':'卷内'" prop="child" width="80" align="center" sortable>
<template slot-scope="scope">
{{ scope.row.child === '' ? 0 : scope.row.child }}
</template>
</el-table-column>
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :sort-orders="['ascending', 'descending', null]" sortable :prop="field.fieldName" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header">
<el-tooltip
class="item"
@ -154,7 +156,9 @@ export default {
mousedownTime: 0,
mousedownX: 0,
mousedownY: 0,
currentPage: 1
currentPage: 1,
sortMap: {},
handOrder: ''
}
},
computed: {
@ -182,6 +186,8 @@ export default {
},
watch: {
selectedCategory: function(newValue, oldValue) {
this.sortMap = {}
this.handOrder = ''
this.selections = []
this.$refs.table.clearSelection()
if (newValue.arrangeType !== 1) {
@ -296,6 +302,63 @@ export default {
this.selections = this.crud.selections
}
},
//
handleSortChange({ column, prop }) {
const field = prop || column.property
if (!field) return
// smartQuery fonds_no
// 使 Vue.set
const smartQuery = this.parentsData.smartQuery
this.$set(smartQuery, 'retention', null)
this.$set(smartQuery, 'security_class', null)
this.$set(smartQuery, 'doc_type', null)
this.$set(smartQuery, 'medium_type', null)
this.$set(smartQuery, 'archive_year', null)
this.$set(smartQuery, 'organ_or_function', null)
//
const current = this.sortMap[field]
if (!current) {
this.sortMap[field] = 'asc'
} else if (current === 'asc') {
this.sortMap[field] = 'desc'
} else {
delete this.sortMap[field]
}
// handOrder
this.handOrder = Object.entries(this.sortMap)
.map(([k, v]) => `${k}:${v}`)
.join(',')
this.$nextTick(() => {
const table = this.$refs.table
table.columns.forEach(col => {
const order = this.sortMap[col.property]
if (order === 'asc') {
col.order = 'ascending'
} else if (order === 'desc') {
col.order = 'descending'
} else {
col.order = null
}
})
})
this.page.page = 0
this.currentPage = 1
this.loadTableData()
},
loadTableData() {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTableList(2, this.parentsData.parentsProjectId, '')
} else if (this.selectedCategory.arrangeType === 1) {
this.getViewTableList(3, null, '')
} else {
this.getViewTableList(2, null, '')
}
},
//
handleCurrentChange(selection, row) {
this.selections = selection
@ -305,25 +368,13 @@ export default {
this.page.size = size
this.page.page = 0
localStorage.setItem('currentPageSize', size)
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
} else if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(3, null)
} else {
this.getViewTable(2, null)
}
this.loadTableData()
},
handleCurrentPage(pageVal) {
this.currentPage = pageVal
this.page.page = pageVal - 1
localStorage.setItem('currentPage', JSON.stringify(this.page.page))
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
} else if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(3, null)
} else {
this.getViewTable(2, null)
}
this.loadTableData()
}
}
}

3
src/views/archivesManage/managementLibrary/mixins/index.js

@ -165,7 +165,8 @@ export const manageLibraryCrud = {
'size': this.page.size,
'sort': this.arrySort,
'canOpen': this.parentsData.checklist && this.parentsData.checklist.length === 0 ? null : (this.parentsData.checklist && this.parentsData.checklist.includes(1) ? true : null),
'canDestroy': this.parentsData.checklist && this.parentsData.checklist.length === 0 ? null : (this.parentsData.checklist && this.parentsData.checklist.includes(2) ? true : null)
'canDestroy': this.parentsData.checklist && this.parentsData.checklist.length === 0 ? null : (this.parentsData.checklist && this.parentsData.checklist.includes(2) ? true : null),
'handOrder': this.handOrder
}
FetchInitContorlView(params).then((res) => {
if (res.code !== 500) {

19
src/views/archivesManage/openInventory/index.vue

@ -8,7 +8,7 @@
v-model="status"
style="margin-right: 10px; width: 110px;"
placeholder="请选择"
@change="getBusinessFlowHistory"
@change="handleStatusChange"
>
<el-option
v-for="item in stateOptions"
@ -22,6 +22,7 @@
v-model="status"
style="margin-right: 10px; width: 100px;"
placeholder="请选择"
@change="handleStatusChange"
>
<el-option
v-for="item in exportOptions"
@ -156,7 +157,7 @@ export default {
exportOptions: [
{
label: '全部',
value: 0
value: null
},
{
label: '导出中',
@ -164,11 +165,11 @@ export default {
},
{
label: '导出成功',
value: 2
value: 3
},
{
label: '导出失败',
value: 3
value: 4
}
],
businessType: this.inventType,
@ -196,9 +197,19 @@ export default {
resetQuery() {
this.search = ''
this.status = null
this.page.page = 1
this.page.size = 10
this.getBusinessFlowHistory()
},
handleStatusChange() {
this.page.page = 1 // 1
this.getBusinessFlowHistory()
},
// resetPage = true
getBusinessFlowHistory() {
// if (resetPage) {
// this.page.page = 1
// }
const params = {
'status': this.status,
'search': this.search,

26
src/views/archivesManage/openInventory/module/detail.vue

@ -54,6 +54,7 @@
import { FetchBusinessFlowDetails } from '@/api/archivesManage/library'
import { downloadFile } from '@/utils/index'
import { mapGetters } from 'vuex'
import { getToken } from '@/utils/auth'
export default {
name: 'Detail',
components: { },
@ -112,13 +113,34 @@ export default {
console.log(err)
})
},
// downloadFile() {
// if (this.rowCurrent.zip_path) {
// const url = this.baseApi + '/downloadFile' + this.rowCurrent.zip_path
// fetch(url).then(res => res.blob()).then(blob => {
// downloadFile(blob, this.rowCurrent.title, 'zip')
// }).catch(() => {
// this.$message({ message: '', type: 'error', offset: 8 })
// })
// } else {
// this.$message({ message: '', type: 'error', offset: 8 })
// }
// }
downloadFile() {
// bucketType = 3 线
if (this.rowCurrent.zip_path) {
const url = this.baseApi + '/downloadFile' + this.rowCurrent.zip_path
fetch(url).then(res => res.blob()).then(blob => {
const url = this.baseApi + '/api/minioUpload/getFile?filePath=' + this.rowCurrent.zip_path + '&bucketType=3'
const fetchOptions = {
method: 'GET',
headers: {
'Authorization': getToken()
}
}
fetch(url, fetchOptions).then(res => res.blob()).then(blob => {
downloadFile(blob, this.rowCurrent.title, 'zip')
this.downloading = false
}).catch(() => {
this.$message({ message: '下载文件失败', type: 'error', offset: 8 })
this.downloading = false
})
} else {
this.$message({ message: '下载文件路径获取失败', type: 'error', offset: 8 })

99
src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue

@ -10,6 +10,7 @@
highlight-current-row
style="width: 100%;"
height="calc(100vh - 418px)"
:default-sort="{ prop: '', order: '' }"
:row-class-name="tableRowClassName"
:row-key="rowKey"
@select-all="selectAll"
@ -19,6 +20,7 @@
@select="handleCurrentChange"
@mousedown.native="onMouseDown"
@mouseup.native="onMouseUp"
@sort-change="handleSortChange"
>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
@ -27,12 +29,12 @@
</template>
</el-table-column>
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
<el-table-column :label="selectedCategory.arrangeType === 1 || (selectedCategory.arrangeType !==1 && activeIndex===1) ? '原文':'卷内'" prop="child" width="55" align="center">
<el-table-column :label="selectedCategory.arrangeType === 1 || (selectedCategory.arrangeType !==1 && activeIndex===1) ? '原文':'卷内'" prop="child" width="80" align="center" sortable>
<template slot-scope="scope">
{{ scope.row.child === '' ? 0 : scope.row.child }}
</template>
</el-table-column>
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :sort-orders="['ascending', 'descending', null]" sortable :label="field.fieldCnName" :align="field.displayformatType" :prop="field.fieldName" :width="field.displayLength" show-overflow-tooltip>
<template slot="header">
<el-tooltip
class="item"
@ -130,11 +132,15 @@ export default {
currentPage: 1,
mousedownTime: 0,
mousedownX: 0,
mousedownY: 0
mousedownY: 0,
sortMap: {},
handOrder: ''
}
},
watch: {
selectedCategory: function(newValue, oldValue) {
this.sortMap = {}
this.handOrder = ''
this.selections = []
this.$refs.table.clearSelection()
if (newValue.arrangeType !== 1) {
@ -158,6 +164,8 @@ export default {
this.getCommonData(2, null)
}
}
this.sortMap = {}
this.handOrder = ''
this.selections = []
this.$refs.table.clearSelection()
}
@ -272,6 +280,67 @@ export default {
}, 300)
}
},
//
handleSortChange({ column, prop }) {
const field = prop || column.property
if (!field) return
// smartQuery fonds_no
// 使 Vue.set
const smartQuery = this.parentsData.smartQuery
this.$set(smartQuery, 'retention', null)
this.$set(smartQuery, 'security_class', null)
this.$set(smartQuery, 'doc_type', null)
this.$set(smartQuery, 'medium_type', null)
this.$set(smartQuery, 'archive_year', null)
this.$set(smartQuery, 'organ_or_function', null)
//
const current = this.sortMap[field]
if (!current) {
this.sortMap[field] = 'asc'
} else if (current === 'asc') {
this.sortMap[field] = 'desc'
} else {
delete this.sortMap[field]
}
// handOrder
this.handOrder = Object.entries(this.sortMap)
.map(([k, v]) => `${k}:${v}`)
.join(',')
this.$nextTick(() => {
const table = this.$refs.table
table.columns.forEach(col => {
const order = this.sortMap[col.property]
if (order === 'asc') {
col.order = 'ascending'
} else if (order === 'desc') {
col.order = 'descending'
} else {
col.order = null
}
})
})
this.page.page = 0
this.currentPage = 1
this.loadTableData()
},
loadTableData() {
if (this.activeIndex === 1) {
this.getViewTableList(3, null, '')
} else {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTableList(2, this.parentsData.parentsProjectId, '')
} else if (this.selectedCategory.arrangeType === 1) {
this.getViewTableList(3, null, '')
} else {
this.getViewTableList(2, null, '')
}
}
},
//
handleCurrentChange(selection, row) {
this.selections = selection
@ -281,33 +350,13 @@ export default {
this.page.size = size
this.page.page = 0
localStorage.setItem('currentPageSize', size)
if (this.activeIndex === 1) {
this.getViewTable(3, null)
} else {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
} else if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(3, null)
} else {
this.getViewTable(2, null)
}
}
this.loadTableData()
},
handleCurrentPage(pageVal) {
this.currentPage = pageVal
this.page.page = pageVal - 1
localStorage.setItem('currentPage', JSON.stringify(this.page.page))
if (this.activeIndex === 1) {
this.getViewTable(3, null)
} else {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
} else if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(3, null)
} else {
this.getViewTable(2, null)
}
}
this.loadTableData()
}
}
}

23
src/views/collectReorganizi/collectionLibrary/file/index.vue

@ -101,6 +101,7 @@ import { header, form } from '@crud/crud'
import CollectHeader from '../module/collectHeader'
import { mapGetters } from 'vuex'
import { downloadFile } from '@/utils/index'
import { getToken } from '@/utils/auth'
export default {
name: 'File',
components: { CollectHeader },
@ -323,12 +324,28 @@ export default {
localStorage.setItem('fileCurrent', JSON.stringify(row))
},
//
// downloadFile(row) {
// const url = this.baseApi + '/downloadFile' + row.file_path
// fetch(url).then(res => res.blob()).then(blob => {
// downloadFile(blob, row.file_name.split('.')[0], row.file_type)
// }).catch(() => {
// this.$message({ message: '!', type: 'error', offset: 8 })
// })
// }
downloadFile(row) {
const url = this.baseApi + '/downloadFile' + row.file_path
fetch(url).then(res => res.blob()).then(blob => {
const url = this.baseApi + '/api/minioUpload/getFile?filePath=' + row.file_path + '&bucketType=2'
const fetchOptions = {
method: 'GET',
headers: {
'Authorization': getToken()
}
}
fetch(url, fetchOptions).then(res => res.blob()).then(blob => {
downloadFile(blob, row.file_name.split('.')[0], row.file_type)
this.downloading = false
}).catch(() => {
this.$message({ message: '下载文件失败!', type: 'error', offset: 8 })
this.$message({ message: '下载文件失败', type: 'error', offset: 8 })
this.downloading = false
})
}
}

3
src/views/collectReorganizi/collectionLibrary/mixins/index.js

@ -146,7 +146,8 @@ export const collectionLibraryCrud = {
'archive_ctg_no': this.query.archive_ctg_no,
'page': this.page.page,
'size': this.page.size,
'sort': this.arrySort
'sort': this.arrySort,
'handOrder': this.handOrder
}
FetchInitCategoryView(params).then((res) => {
if (res.code !== 500) {

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

@ -396,6 +396,7 @@ import qs from 'qs'
import { downloadFile, exportFile } from '@/utils/index'
import { mapGetters } from 'vuex'
import elDragDialog from '@/utils/dialog'
import { getToken } from '@/utils/auth'
export default {
name: 'CollectHeader',
@ -1541,11 +1542,25 @@ export default {
this.$message({ message: '下载操作只可勾选唯一目标条目,请先确认!', offset: 8 })
return false
}
const url = this.baseApi + '/downloadFile' + this.selections[0].file_path
fetch(url).then(res => res.blob()).then(blob => {
// const url = this.baseApi + '/downloadFile' + this.selections[0].file_path
// fetch(url).then(res => res.blob()).then(blob => {
// downloadFile(blob, this.selections[0].file_name.split('.')[0], this.selections[0].file_type)
// }).catch(() => {
// this.$message({ message: '', type: 'error', offset: 8 })
// })
const url = this.baseApi + '/api/minioUpload/getFile?filePath=' + this.selections[0].file_path + '&bucketType=2'
const fetchOptions = {
method: 'GET',
headers: {
'Authorization': getToken()
}
}
fetch(url, fetchOptions).then(res => res.blob()).then(blob => {
downloadFile(blob, this.selections[0].file_name.split('.')[0], this.selections[0].file_type)
this.downloading = false
}).catch(() => {
this.$message({ message: '下载文件失败!', type: 'error', offset: 8 })
this.$message({ message: '下载文件失败', type: 'error', offset: 8 })
this.downloading = false
})
},
// -

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

@ -43,6 +43,8 @@
</treeselect>
<!-- text / number / textarea / popover -->
<!-- :validate-event="isDisabled" -->
<!-- :disabled="isDisabled || (item.fieldName === 'archival_category_code') || (item.fieldName === 'fonds_no' && isDesFormType !== 'category') || (item.fieldName === 'fonds_name' && isDesFormType !== 'category') "-->
<!-- @blur="isRepeatHandle(item)" -->
<el-input
v-if="item.isInputClass !== 'select' && item.isInputClass !== 'date' && item.fieldName !== 'barcode' "
v-model="addOrUpdateForm[item.fieldName]"
@ -50,13 +52,24 @@
:rows="item.isInputClass === 'textarea' ? 3 : ''"
:class="{'input-popover':(item.isInputClass === 'popover')}"
:style="{ width: item.editLength+'px'}"
:disabled="isDisabled || (item.fieldName === 'archival_category_code') || (item.fieldName === 'fonds_no' && isDesFormType !== 'category') || (item.fieldName === 'fonds_name' && isDesFormType !== 'category') "
:disabled="
isDisabled ||
(item.fieldName === 'archival_category_code') ||
(item.fieldName === 'fonds_no' && isDesFormType !== 'category') ||
(item.fieldName === 'fonds_name' && isDesFormType !== 'category') ||
//
(addOrUpdateForm.is_entity === 0 && (item.fieldName === 'doc_qty' || item.fieldName === 'doc_qty_now'))
"
:max="addOrUpdateForm.is_entity === 0 && (item.fieldName === 'doc_qty' || item.fieldName === 'doc_qty_now') ? 0 : null"
:min="0"
:validate-event="!isDisabled"
@mousewheel.native.prevent
@DOMMouseScroll.native.prevent
@keyup.enter.native="isRepeatHandle(item)"
@input="autoAddZero(item.isFilling, item.fieldName, addOrUpdateForm[item.fieldName], item.fillingDigit)"
@blur="isRepeatHandle(item)"
@blur="isRepeatHandle(item); syncEntityByQty(item)"
>
<i v-if="item.isInputClass === 'popover'" slot="suffix" class="el-input__icon iconfont icon-gengduo1" @click="handleCurrentFieldName(item)" />
</el-input>
@ -135,7 +148,7 @@
<el-row v-if="isDesFormType !== 'prearchiveLibrary' && isDesFormType !== 'category' && !isAiCategory" class="preview-form-bottom prearch-bottom">
<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-group v-model="addOrUpdateForm[formPreviewData[entityIndex].fieldName]" @change="handleEntityChange">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
@ -380,6 +393,48 @@ export default {
this.archivesType = null
this.activeIndex = null
},
//
syncEntityByQty(item) {
//
if (item.fieldName !== 'doc_qty' && item.fieldName !== 'doc_qty_now') return
const val = Number(this.addOrUpdateForm[item.fieldName]) || 0
if (val === 0) {
// 0
this.$set(this.addOrUpdateForm, 'is_entity', 0)
} else if (val > 0) {
// >0
this.$set(this.addOrUpdateForm, 'is_entity', 1)
}
//
this.handleEntityChange(this.addOrUpdateForm.is_entity)
},
//
handleEntityChange(val) {
//
// const qtyField = this.formPreviewData.find(item => item.fieldName === 'doc_qty')
// const qtyNowField = this.formPreviewData.find(item => item.fieldName === 'doc_qty_now')
if (val === 1) {
// 1
this.$set(this.addOrUpdateForm, 'doc_qty', 1)
this.$set(this.addOrUpdateForm, 'doc_qty_now', 1)
} else {
// 0
this.$set(this.addOrUpdateForm, 'doc_qty', 0)
this.$set(this.addOrUpdateForm, 'doc_qty_now', 0)
}
//
this.$nextTick(() => {
if (this.$refs.addOrUpdateForm) {
this.$refs.addOrUpdateForm.validateField('doc_qty')
this.$refs.addOrUpdateForm.validateField('doc_qty_now')
}
})
},
shouldShowIcon(item) {
if (item.isInputClass !== 'number') return false
const ruleKey = `${this.isTitleType}-${this.selectedCategory.arrangeType}`
@ -1317,6 +1372,19 @@ export default {
}
}
if (item.fieldName === 'doc_qty' || item.fieldName === 'doc_qty_now') {
rule.validator = (rule, value, callback) => {
// > 0
if (this.addOrUpdateForm.is_entity === 0) {
if (value > 0) {
callback(new Error('无实体时数量不能大于 0'))
return
}
}
callback()
}
}
//
const fieldValue = this.addOrUpdateForm[item.fieldName]
if (item.isDataType && fieldValue) {

33
src/views/system/archivesCategory/listBrowsing/index.vue

@ -61,10 +61,10 @@
</el-dialog>
</div>
<!-- @selection-change="selectionChangeHandler" -->
<el-table ref="table" :key="tableKey" v-loading="table.bottom.loading" :data="table.bottom.data" style="min-width: 100%;" height="300" class="nowrap-tab">
<el-table ref="table" :key="tableKey" v-loading="table.bottom.loading" border :data="table.bottom.data" style="min-width: 100%;" height="300" class="nowrap-tab" @header-dragend="handleHeaderDragend">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
<el-table-column v-for="field in table.right.data" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<el-table-column v-for="field in table.right.data" :key="field.id" sortable :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
@ -130,6 +130,31 @@ export default {
this.initData()
},
methods: {
handleHeaderDragend(newWidth) {
const tableColumns = this.$refs.table.columns
if (!tableColumns) return
let targetIndex = -1
tableColumns.forEach((col, index) => {
if (col.realWidth === newWidth && col.width === newWidth) {
targetIndex = index
}
})
const fieldIndex = targetIndex - 1
if (fieldIndex < 0 || fieldIndex >= this.table.right.data.length) return
const field = this.table.right.data[fieldIndex]
field.displayLength = newWidth
console.log('✅ 拖动列成功:')
console.log('字段对象:', field)
console.log('字段中文名:', field?.fieldCnName)
console.log('字段英文名:', field?.fieldName)
console.log('拖动后新宽度:', newWidth)
console.log('列索引:', targetIndex - 1)
this.$refs.cuform.saveDragWidth([field])
},
initData() {
this.getDisplayFieldData()
this.getBottomTableData()
@ -221,4 +246,8 @@ export default {
// text-overflow: unset !important;
// white-space: nowrap !important;
// }
::v-deep .el-table--group,
::v-deep .el-table--border{
border: none !important;
}
</style>

15
src/views/system/archivesCategory/listBrowsing/module/form.vue

@ -87,6 +87,21 @@ export default {
this.$message({ message: '保存成功', type: 'success', offset: 8 })
this.$emit('refresh')
})
},
//
saveDragWidth(fields) {
this.loading = true
edit(fields).then((res) => {
this.$message({
message: '列宽保存成功',
type: 'success',
offset: 8
})
this.loading = false
this.$emit('refresh')
}).catch(() => {
this.loading = false
})
}
}
}

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

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

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

@ -126,19 +126,45 @@ export default {
this.getAllJob()
},
methods: {
// handleEditInfoFlow(newVal) {
// console.log('getEditInfoFlow', this.getEditInfoFlow)
// const findItem = this.findIdByModelId(newVal.flowId)
// this.form.model = findItem
// this.selectModel(findItem, newVal)
// },
// findIdByModelId(modelId) {
// const item = this.modelOptions.find(data => data.modelId === modelId)
// if (item) {
// return item
// } else {
// return null
// }
// },
handleEditInfoFlow(newVal) {
console.log('getEditInfoFlow', this.getEditInfoFlow)
console.log('编辑回显数据:', newVal)
// form model
if (!this.form.model) {
this.form.model = null
}
//
if (!newVal || !newVal.flowId) {
this.form.model = null
return
}
const findItem = this.findIdByModelId(newVal.flowId)
this.form.model = findItem
this.selectModel(findItem, newVal)
this.$nextTick(() => {
if (findItem) {
this.selectModel(findItem, newVal)
}
})
},
findIdByModelId(modelId) {
const item = this.modelOptions.find(data => data.modelId === modelId)
if (item) {
return item
} else {
return null
}
return this.modelOptions.find(data => data.modelId === modelId) || null
},
getAllFlowable() {
FetchInitFlowAll().then((res) => {
@ -246,13 +272,21 @@ export default {
}
})
},
handleCloseDialog(done) {
//
this.$refs.form.resetFields()
handleCloseDialog() {
//
this.form = {
model: null
}
this.srcImg = ''
this.taskList = []
this.form = {}
this.selectFlowVal = null
this.getEditInfoFlow = {}
this.cuDialogVisible = false
//
if (this.$refs.form) {
this.$refs.form.clearValidate()
}
}
}
}

2
src/views/system/processManage/index.vue

@ -8,7 +8,7 @@
<li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">运行中流程<i /></li>
<li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">历史流程<i /></li>
<li :class="{ 'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">流程部署<i /></li>
<!-- <li :class="{ 'active-tab-nav': activeIndex == 3 }" @click="changeActiveTab(3)">模型设计<i /></li> -->
<li :class="{ 'active-tab-nav': activeIndex == 3 }" @click="changeActiveTab(3)">模型设计<i /></li>
<!-- 最右侧装饰img -->
<span class="tab-right-img" />
</ul>

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

@ -4,18 +4,21 @@
<!-- http://192.168.99.84:8080/flowable-ui/modeler/#/processes -->
<!-- :src="baseApi+'/flowable-ui/modeler'" -->
<!-- src="http://192.168.99.67:11110/flowable-ui/modeler/" -->
<!-- <div v-if="!isMaintenance" class="maintenance-message">
<div v-if="!isMaintenance && !loading" class="maintenance-message">
<img style="display: block; width: 500px;" src="~@/assets/images/4011.png">
<p>页面正在维护中...</p>
</div> -->
</div>
<!-- iframe仅在可访问时显示 -->
<iframe
v-if="isMaintenance && !loading"
ref="myIframe"
class="iframe"
frameborder="0"
scrolling="no"
scrolling="auto"
:src="url"
sandbox="allow-scripts allow-same-origin allow-downloads"
sandbox="allow-scripts allow-same-origin allow-downloads allow-forms allow-popups allow-top-navigation"
@load="iframeLoadSuccess"
@error="iframeLoadError"
/>
</div>
</template>
@ -32,56 +35,56 @@ export default {
return {
loading: true,
url: '',
isMaintenance: false
isMaintenance: false // false
}
},
created() {
},
mounted() {
this.getIframeState()
},
methods: {
getIframeState() {
// http://192.168.99.72:11200/flowable-ui/modeler/
const linkSrc = process.env.NODE_ENV === 'production' ? window.g.ProcessModelUrl : process.env.VUE_APP_PROCESSMODEL_API
// Flowable/flowable-ui/modeler
const linkSrc = process.env.NODE_ENV === 'production'
? window.g.ProcessModelUrl
: process.env.VUE_APP_PROCESSMODEL_API
// linkSrc/
const baseUrl = linkSrc.replace(/\/$/, '')
if (this.currentModelId) {
this.url = linkSrc + '/flowable-ui/modeler/#/processes/' + this.currentModelId
this.url = `${baseUrl}/flowable-ui/modeler/#/processes/${this.currentModelId}`
} else {
this.url = linkSrc + '/flowable-ui/modeler'
this.url = `${baseUrl}/flowable-ui/modeler/#/processes` // 302
}
console.log('最终访问地址:', this.url)
// fetch(this.url)
// .then(response => {
// console.log('response', response)
// if (response.ok) {
// this.isMaintenance = true
// console.log('')
// this.$nextTick(() => {
// const iframe = this.$refs.myIframe
// iframe.addEventListener('load', () => {
// if (iframe.contentWindow) {
// // iframe
// console.log('iframe')
// this.loading = false
// } else {
// // iframe
// console.log('iframe')
// this.loading = false
// }
// })
// })
// } else {
// this.isMaintenance = false
// console.log('', response.status)
// }
// this.loading = false
// console.log('this.isMaintenance', this.isMaintenance)
// })
// .catch(error => {
// console.log('', error)
// this.isMaintenance = false
// this.loading = false
// })
// 访
fetch(this.url, {
method: 'HEAD', //
mode: 'no-cors' // fetch
})
.then(response => {
// no-corsresponse.okundefinedcatch
this.isMaintenance = true
console.log('Flowable服务可连通')
})
.catch(error => {
this.isMaintenance = false
console.error('Flowable服务无法连通:', error)
})
.finally(() => {
this.loading = false
})
},
// iframe
iframeLoadSuccess() {
console.log('Flowable Modeler iframe加载完成')
this.loading = false
},
// iframe
iframeLoadError() {
console.error('Flowable Modeler iframe加载失败')
this.isMaintenance = false
this.loading = false
}
}
}
@ -92,15 +95,16 @@ export default {
width: 100%;
height: calc(100vh - 215px);
}
.maintenance-message{
.maintenance-message {
display: flex;
flex-direction: column; //
justify-content: center;
align-items: center;
height: calc(100vh - 215px);
p{
p {
font-size: 26px;
font-weight: bold;
margin-left: 20px;
margin-top: 20px;
color: #000;
}
}

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

@ -179,9 +179,17 @@ export default {
})
},
getProcessImg() {
console.log('this.isMessage2', this.isMessage)
console.log('this.selectCenterRow2', this.selectCenterRow)
console.log('this.selectRow2', this.selectRow)
console.log('this.baseInfo', this.baseInfo)
this.srcImg = ''
FetchGenProcessDiagram({ 'processId': this.isMessage ? this.baseInfo.procInstId : this.selectRow.procInstId }).then((res) => {
this.srcImg = res
if (res.code !== 500) {
this.srcImg = res
} else {
this.srcImg = ''
}
}).catch(err => {
console.log(err)
})

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

@ -128,7 +128,11 @@ export default {
getProcessImg() {
this.srcImg = ''
FetchGenProcessDiagram({ 'processId': this.isMessage ? (this.baseInfo && this.baseInfo.procInstId) : this.selectRow.procInstId }).then((res) => {
this.srcImg = res
if (res.code !== 500) {
this.srcImg = res
} else {
this.srcImg = ''
}
}).catch(err => {
console.log(err)
})

Loading…
Cancel
Save