Browse Source

公文来文单位需求更新

master
xuhuajiao 2 weeks ago
parent
commit
37480da09f
  1. 10
      src/assets/iconfonts/light/iconfont.css
  2. 2
      src/assets/iconfonts/light/iconfont.js
  3. 7
      src/assets/iconfonts/light/iconfont.json
  4. BIN
      src/assets/iconfonts/light/iconfont.ttf
  5. BIN
      src/assets/iconfonts/light/iconfont.woff
  6. BIN
      src/assets/iconfonts/light/iconfont.woff2
  7. 166
      src/views/archivesMIOD/miodLibrary/index.vue
  8. 4
      src/views/archivesMIOD/miodLibrary/treeList.vue
  9. 61
      src/views/components/category/PreviewForm.vue

10
src/assets/iconfonts/light/iconfont.css

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 3966148 */ font-family: "iconfont"; /* Project id 3966148 */
src: url('iconfont.woff2?t=1749454508658') format('woff2'),
url('iconfont.woff?t=1749454508658') format('woff'),
url('iconfont.ttf?t=1749454508658') format('truetype');
src: url('iconfont.woff2?t=1751619790998') format('woff2'),
url('iconfont.woff?t=1751619790998') format('woff'),
url('iconfont.ttf?t=1751619790998') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-jiantou-sanjiao-shang:before {
content: "\e697";
}
.icon-tuoguanhetong:before { .icon-tuoguanhetong:before {
content: "\e694"; content: "\e694";
} }

2
src/assets/iconfonts/light/iconfont.js
File diff suppressed because it is too large
View File

7
src/assets/iconfonts/light/iconfont.json

@ -5,6 +5,13 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "10943054",
"name": "箭头-三角-上",
"font_class": "jiantou-sanjiao-shang",
"unicode": "e697",
"unicode_decimal": 59031
},
{ {
"icon_id": "13091314", "icon_id": "13091314",
"name": "托管合同", "name": "托管合同",

BIN
src/assets/iconfonts/light/iconfont.ttf

BIN
src/assets/iconfonts/light/iconfont.woff

BIN
src/assets/iconfonts/light/iconfont.woff2

166
src/views/archivesMIOD/miodLibrary/index.vue

@ -27,7 +27,7 @@
<i class="iconfont icon-daochu" /> <i class="iconfont icon-daochu" />
导出 导出
</el-button> </el-button>
<el-button v-if="selectedDocument.isType===4" :loading="allDownloadLoading" size="mini" :disabled="crud.selections.length !== 0" @click="doExport('1')">
<el-button v-if="selectedDocument.isType===3 || selectedDocument.isType===4" :loading="allDownloadLoading" size="mini" :disabled="crud.selections.length !== 0" @click="doExport('1')">
<i class="iconfont icon-daochu" /> <i class="iconfont icon-daochu" />
批量导出 批量导出
</el-button> </el-button>
@ -53,6 +53,7 @@
class="archives-table" class="archives-table"
:data="crud.data" :data="crud.data"
style="width: 100%;" style="width: 100%;"
height="calc(100vh - 374px)"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@select="crud.selectChange" @select="crud.selectChange"
@select-all="crud.selectAllChange" @select-all="crud.selectAllChange"
@ -108,15 +109,17 @@
:selected-document="selectedDocument" :selected-document="selectedDocument"
:is-has-code="isHasCode" :is-has-code="isHasCode"
:archives-type="archivesType" :archives-type="archivesType"
:is-miod-save-bind="isMiodSaveBind"
@close-dialog="closeDialog" @close-dialog="closeDialog"
@formLoadingShow="formLoadingShow" @formLoadingShow="formLoadingShow"
@refreshTree="refreshTreeList" @refreshTree="refreshTreeList"
@resetQuery="resetQuery" @resetQuery="resetQuery"
@getInitDocumentBind="getInitDocumentBind"
/> />
<div slot="footer" class="dialog-footer" style="margin-top: 20px !important;"> <div slot="footer" class="dialog-footer" style="margin-top: 20px !important;">
<el-button type="text" @click="closeDialog">取消</el-button> <el-button type="text" @click="closeDialog">取消</el-button>
<el-button :loading="archivesBtnLoading" type="primary" @click="handlerArchivesSubmit">保存</el-button>
<!-- <el-button :loading="bindSaveLoading" type="primary">保存并绑定标签</el-button> -->
<el-button :loading="archivesBtnLoading" type="primary" @click="handlerArchivesSubmit(false)">保存</el-button>
<el-button v-if="archivesType === 'edit'" :loading="bindSaveLoading" type="primary" @click="handlerArchivesSubmit(true)">保存并绑定标签</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -146,7 +149,7 @@
<script> <script>
import CRUD, { presenter, header } from '@crud/crud' import CRUD, { presenter, header } from '@crud/crud'
import { miodLibraryCrud } from './mixins/index' import { miodLibraryCrud } from './mixins/index'
import crudDocumentArchives, { FetchDelArchives, FetchCompleteDelArchives, FetchRestoreArchives, FetchInitDistributorAllByDocumentId, FetchBorrowerdsByIds } from '@/api/system/documentArchives'
import crudDocumentArchives, { FetchDelArchives, FetchCompleteDelArchives, FetchRestoreArchives, FetchInitDistributorAllByDocumentId, FetchBorrowerdsByIds, FetchInitDocumentDetailsList, FetchReadGW, FetchBingdingLabel } from '@/api/system/documentArchives'
import crudOperation from '@crud/CRUD.operation' import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import TreeList from './treeList' import TreeList from './treeList'
@ -225,7 +228,8 @@ export default {
search: '', search: '',
parentInfo: null, parentInfo: null,
pageType: null, pageType: null,
allDownloadLoading: false
allDownloadLoading: false,
isMiodSaveBind: null
} }
}, },
computed: { computed: {
@ -386,8 +390,10 @@ export default {
// //
FetchInitDistributorAllByDocumentId(params).then(res => { FetchInitDistributorAllByDocumentId(params).then(res => {
if (res && res.length !== 0) { if (res && res.length !== 0) {
console.log('res', res)
this.$refs.previewForm.miodDeptsTags = res this.$refs.previewForm.miodDeptsTags = res
const ids = res.map(item => item.id)
const ids = res.map(item => item.id).join(',')
console.log('ids', ids)
this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', ids) this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', ids)
} else { } else {
this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', null) this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', null)
@ -400,8 +406,9 @@ export default {
} }
FetchBorrowerdsByIds(hostParams).then(res => { FetchBorrowerdsByIds(hostParams).then(res => {
if (res && res.length !== 0) { if (res && res.length !== 0) {
console.log('res-hostDepartmentTags', res)
this.$refs.previewForm.hostDepartmentTags = res this.$refs.previewForm.hostDepartmentTags = res
const ids = res.map(item => item.id)
const ids = res.map(item => item.id).join(',')
this.$set(this.$refs.previewForm.addOrUpdateForm, 'host_department', ids) this.$set(this.$refs.previewForm.addOrUpdateForm, 'host_department', ids)
} else { } else {
this.$set(this.$refs.previewForm.addOrUpdateForm, 'host_department', null) this.$set(this.$refs.previewForm.addOrUpdateForm, 'host_department', null)
@ -417,14 +424,148 @@ export default {
}) })
}) })
}, },
handlerArchivesSubmit() {
handlerArchivesSubmit(type) {
this.isMiodSaveBind = type
this.$nextTick(() => {
let documentId
if (this.selectedDocument.isType === 2) {
documentId = this.selectedDocument.id
} else {
documentId = this.selectedDocument.documentId
}
this.$refs.previewForm.submitForm('addOrUpdateForm', documentId)
})
},
getInitDocumentBind() {
this.bindSaveLoading = true
let documentId let documentId
if (this.selectedDocument.isType === 2) { if (this.selectedDocument.isType === 2) {
documentId = this.selectedDocument.id documentId = this.selectedDocument.id
} else { } else {
documentId = this.selectedDocument.documentId documentId = this.selectedDocument.documentId
} }
this.$refs.previewForm.submitForm('addOrUpdateForm', documentId)
const params = {
documentId,
archivesId: this.arcId
}
FetchInitDocumentDetailsList(params).then(data => {
// id,parents_id,reg_no,details_type,pass_location,read_type,tid,is_destroy,create_by,create_time,update_by,update_time
// idid1. 2.tid
const jsonData = this.convertData(data)
const fileOriginal = jsonData.filter(item => item.details_type === 1)
console.log('jsonData', jsonData)
console.log('fileOriginal', fileOriginal)
this.bindingTag(fileOriginal[0])
}).catch(error => {
console.error('获取文档详情列表失败:', error)
})
},
convertData(data) {
return data.map(item => {
const fieldNames = [
'id', 'parents_id', 'reg_no', 'details_type', 'pass_location',
'read_type', 'tid', 'is_destroy', 'create_by', 'create_time',
'update_by', 'update_time'
]
const obj = {}
fieldNames.forEach((field, index) => {
obj[field] = item[index]
})
return obj
})
},
//
bindingTag(row) {
console.log('bindingTag', row)
if (row.tid && (row.tid !== '' || row.tid !== null)) {
this.$confirm('该原件已绑定' + '<span>是否重新绑定?</span>', '提示', {
confirmButtonText: '重新绑定',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
this.handlBind(row, 'hasLabel')
}).catch(() => {
this.closeDialog()
this.crud.refresh()
this.refreshTreeList()
this.bindSaveLoading = false
})
} else {
this.handlBind(row)
}
},
handlBind(row, type) {
console.log('row', row)
const sDevID = process.env.NODE_ENV === 'production' ? window.g.sDevID : process.env.VUE_APP_SDEVID
const param = {
'sDevID': sDevID
}
FetchReadGW(param).then((res) => {
if (!res) {
this.$message({ message: '绑定失败', type: 'error', offset: 8 })
this.bindSaveLoading = false
} else {
const result = JSON.parse(res)
console.log('result', result)
if (result.code === '0') {
console.log('读取成功')
// let coverLabel
// if (type === 'hasLabel' && row.tid === result.data[0].uid) {
// coverLabel = true
// } else {
// coverLabel = false
// }
const documentId = this.selectedDocument.isType === 2
? this.selectedDocument.id
: this.selectedDocument.documentId
const data = {
coverLabel: !!type,
documentId: documentId, // id
parentsId: row.id, // id
detailsType: row.details_type,
labelType: 1, // 1
tid: result.data[0].uid, // id
eas: '1' //
}
console.log('data', data)
FetchBingdingLabel(data).then((res) => {
console.log('FetchBingdingLabel', res)
if (res === '当前标签已被绑定') {
this.$message({ message: '当前标签已被绑定', type: 'error', offset: 8 })
} else {
this.$message({ message: '绑定成功', type: 'success', offset: 8 })
}
this.closeDialog()
this.bindSaveLoading = false
setTimeout(() => {
const selectedItem = this.crud.selections[0]
this.tableDoubleClick(selectedItem)
this.refreshTreeList()
this.crud.refresh()
}, 500)
}).catch(error => {
console.error(error)
this.bindSaveLoading = false
})
} else if (result.code === '-1') {
this.$message({ message: result.message, type: 'error', offset: 8 })
this.bindSaveLoading = false
} else if (result.code === '-1000') {
//
this.$message({ message: result.message, type: 'error', offset: 8 })
this.bindSaveLoading = false
}
}
}).catch(error => {
console.error(error)
this.bindSaveLoading = false
})
}, },
clickRowHandler(row) { clickRowHandler(row) {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
@ -508,12 +649,15 @@ export default {
} else { } else {
documentId = this.selectedDocument.documentId documentId = this.selectedDocument.documentId
} }
console.log('this.selectedDocument', this.selectedDocument)
const params = { const params = {
'documentId': documentId, 'documentId': documentId,
'ids': ids, 'ids': ids,
'docDepartment': type === '1' ? this.selectedDocument.dictionaryName : null,
'archivesYear': type === '1' ? this.selectedDocument.label : null
'docDepartment': type === '1' ? (this.selectedDocument.isType === 4 ? this.selectedDocument.dictionaryName : this.selectedDocument.label) : null,
'archivesYear': type === '1' ? (this.selectedDocument.isType === 4 ? this.selectedDocument.label : null) : null,
'search': type === '1' ? this.search : null
} }
console.log('exportFile', params)
exportFile(this.baseApi + '/api/documentArchives/downloadDocumentArchives?' + qs.stringify(params, { indices: false, allowDots: true, skipNulls: false })) exportFile(this.baseApi + '/api/documentArchives/downloadDocumentArchives?' + qs.stringify(params, { indices: false, allowDots: true, skipNulls: false }))
if (type === '0') { if (type === '0') {
this.crud.downloadLoading = false this.crud.downloadLoading = false

4
src/views/archivesMIOD/miodLibrary/treeList.vue

@ -132,7 +132,6 @@ export default {
let targetNode = null let targetNode = null
// //
console.log('this.nodeToSelect', this.nodeToSelect)
if (this.nodeToSelect) { if (this.nodeToSelect) {
switch (this.nodeToSelect.isType) { switch (this.nodeToSelect.isType) {
case 4: // case 4: //
@ -168,14 +167,11 @@ export default {
// //
if (!targetNode) { if (!targetNode) {
console.log('2222')
targetNode = this.findFirstIsType2Node(this.crud.data) targetNode = this.findFirstIsType2Node(this.crud.data)
} }
// //
if (targetNode) { if (targetNode) {
console.log('111')
console.log(targetNode.id)
this.$refs.tree.setCurrentKey(targetNode.id) this.$refs.tree.setCurrentKey(targetNode.id)
this.handleNodeClick(targetNode, 'targetNode') this.handleNodeClick(targetNode, 'targetNode')
} }

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

@ -24,7 +24,7 @@
<el-form-item :label="item.fieldCnName" :prop="item.fieldName"> <el-form-item :label="item.fieldCnName" :prop="item.fieldName">
<!-- select :load-options="loadOptions"--> <!-- select :load-options="loadOptions"-->
<treeselect <treeselect
v-if="item.isInputClass === 'select'"
v-if="item.isInputClass === 'select' && item.fieldName !== 'signature_department'"
v-model="addOrUpdateForm[item.fieldName]" v-model="addOrUpdateForm[item.fieldName]"
:options="item.options" :options="item.options"
:normalizer=" isTableType === 1 ? normalizerFonds : (isTableType === 2 ? normalizerClassify : normalizer)" :normalizer=" isTableType === 1 ? normalizerFonds : (isTableType === 2 ? normalizerClassify : normalizer)"
@ -42,6 +42,22 @@
> >
<div slot="value-label" slot-scope="{ node }">{{ getAutoNameUnknown(node.label) }}</div> <div slot="value-label" slot-scope="{ node }">{{ getAutoNameUnknown(node.label) }}</div>
</treeselect> </treeselect>
<el-select
v-if="item.fieldName === 'signature_department'"
v-model="addOrUpdateForm[item.fieldName]"
filterable
allow-create
placeholder=""
:style="{ width: item.editLength+'px'}"
@visible-change="(visible) => handleVisibleChange(visible, item)"
>
<el-option
v-for="i in item.options"
:key="i.dictionaryId"
:label="i.dictionaryName"
:value="i.dictionaryName"
/>
</el-select>
<!-- :type="item.isInputClass === 'popover' && item.isLine ? 'textarea' : (item.isInputClass === 'popover' ? 'text' : item.isInputClass)" --> <!-- :type="item.isInputClass === 'popover' && item.isLine ? 'textarea' : (item.isInputClass === 'popover' ? 'text' : item.isInputClass)" -->
<!-- :type="item.isInputClass === 'popover'? 'text' : item.isInputClass" --> <!-- :type="item.isInputClass === 'popover'? 'text' : item.isInputClass" -->
<el-input <el-input
@ -305,6 +321,10 @@ export default {
archivesType: { archivesType: {
type: String, type: String,
default: '' default: ''
},
isMiodSaveBind: {
type: Boolean,
default: false
} }
}, },
@ -1146,6 +1166,11 @@ export default {
} }
}) })
}, },
handleVisibleChange(visible, item) {
if (visible) {
this.openTree(item)
}
},
// tree - open // tree - open
openTree(item) { openTree(item) {
this.treeCurrentFiled = item this.treeCurrentFiled = item
@ -1538,8 +1563,12 @@ export default {
if (valid && isValid) { if (valid && isValid) {
delete this.addOrUpdateForm.id delete this.addOrUpdateForm.id
delete this.addOrUpdateForm.miodDepts delete this.addOrUpdateForm.miodDepts
this.$emit('formLoadingShow', true)
console.log('submitForm-isMiodSaveBind', this.isMiodSaveBind)
if (!this.isMiodSaveBind) {
this.$emit('formLoadingShow', true)
}
// //
if (this.isDesFormType === 'miodLibrary') { if (this.isDesFormType === 'miodLibrary') {
const params = { const params = {
@ -1556,17 +1585,22 @@ export default {
console.log('params', params) console.log('params', params)
miodEditDocument(params).then(res => { miodEditDocument(params).then(res => {
if (res) { if (res) {
this.$message({ message: res.message, type: 'success', offset: 8 })
this.$emit('close-dialog')
if (this.archivesType === 'edit') {
this.crud.refresh()
if (!this.isMiodSaveBind) {
this.$message({ message: res.message, type: 'success', offset: 8 })
if (this.archivesType === 'edit') {
this.crud.refresh()
} else {
this.resetQuery()
this.crud.toQuery()
}
this.$emit('close-dialog')
this.refreshTreeList()
} else { } else {
this.resetQuery()
this.crud.toQuery()
//
this.$emit('getInitDocumentBind')
} }
// this.fileOriginal = null // this.fileOriginal = null
this.refreshTreeList()
} }
this.$emit('formLoadingShow', false) this.$emit('formLoadingShow', false)
}) })
@ -2112,5 +2146,12 @@ export default {
::v-deep .vue-treeselect__value-remove{ ::v-deep .vue-treeselect__value-remove{
display: none; display: none;
} }
::v-deep .el-icon-arrow-up:before{
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\e697" !important;
font-size: 12px;
}
</style> </style>
Loading…
Cancel
Save