Browse Source

批量成件

master
xuhuajiao 2 years ago
parent
commit
f7000569f7
  1. 7
      src/api/prearchiveLibrary/prearchiveLibrary.js
  2. 20
      src/api/system/fieldMate.js
  3. 5
      src/components/Crud/crud.js
  4. 674
      src/views/prearchiveLibrary/add.json
  5. 109
      src/views/prearchiveLibrary/index.vue
  6. 82
      src/views/prearchiveLibrary/module/batchFile.vue
  7. 91
      src/views/prearchiveLibrary/module/form.vue
  8. 2
      src/views/system/dept/index.vue
  9. 22
      src/views/system/fieldCorresManage/index.vue
  10. 4
      src/views/system/fieldCorresManage/module/detail.vue
  11. 8
      src/views/system/fieldCorresManage/module/form.vue

7
src/api/prearchiveLibrary/prearchiveLibrary.js

@ -32,12 +32,11 @@ export function prearchEdit(data) {
})
}
export function del(ids) {
const params = { id: ids[0] }
export function del(data) {
return request({
url: 'api/re-document/deleteDocument',
method: 'delete',
params
method: 'post',
data
})
}

20
src/api/system/fieldMate.js

@ -50,4 +50,22 @@ export function FetchInitFieldMate(params) {
})
}
export default { add, edit, del, FetchInitFieldMateList, FetchCheckRepeat, FetchInitFieldMate }
// 根据预归档库获取对应规则
export function FetchMateByDocumentId(params) {
return request({
url: 'api/fieldMate/getMateByDocumentId',
method: 'get',
params
})
}
// 根据预归档库和门类获取详情
export function FetchDetailsByDocumentIdAndCategoryId(params) {
return request({
url: 'api/fieldMate/getDetailsByDocumentIdAndCategoryId',
method: 'get',
params
})
}
export default { add, edit, del, FetchInitFieldMateList, FetchCheckRepeat, FetchInitFieldMate, FetchMateByDocumentId, FetchDetailsByDocumentIdAndCategoryId }

5
src/components/Crud/crud.js

@ -143,8 +143,13 @@ function CRUD(options) {
crud.page.total = data.totalElements !== null ? data.totalElements : data.length
crud.data = data.content ? data.content : data
} else {
if (data.list) {
crud.page.total = data.list.totalElements
crud.data = data.list.content
} else {
crud.page.total = data.totalElements !== null ? data.totalElements : data.length
crud.data = data.content ? data.content : data
}
}
crud.resetDataStatus()
// time 毫秒后显示表格

674
src/views/prearchiveLibrary/add.json

@ -1,674 +0,0 @@
[
{
"id": "069B40B02A196E6FA374C9",
"categoryId": "2C120624FD6083F499653C",
"dictionaryConfigId": {
"id": "C45F3FF91CC7C1F79BFB5C",
"dicName": "全宗号",
"dicCode": "QZH",
"dicSequence": 16,
"dicType": true,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1656991927000,
"updateTime": 1656991927000
},
"fieldName": "fonds_no",
"fieldCnName": "全宗号",
"isDefaultValue": "",
"isInputClass": "select",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 100,
"isColumnType": 2,
"isSequence": 1,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": true,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 1,
"isDisplayformat": true,
"displayformatType": "center",
"editLength": 196,
"displayLength": 100,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306028000
},
{
"id": "C790AA6F7B8FE39922DA3D",
"categoryId": "2C120624FD6083F499653C",
"dictionaryConfigId": {
"id": "EAC68B9FE234EDE61B2200",
"dicName": "保管期限",
"dicCode": "Search_BGQX",
"dicSequence": 11,
"dicType": true,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1654571475000,
"updateTime": 1656991717000
},
"fieldName": "retention",
"fieldCnName": "保管期限",
"isDefaultValue": "",
"isInputClass": "select",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 10,
"isColumnType": 2,
"isSequence": 2,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": true,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 2,
"isDisplayformat": true,
"displayformatType": "center",
"editLength": 196,
"displayLength": 100,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306036000
},
{
"id": "044BFF833352350E25CC00",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "archive_year",
"fieldCnName": "归档年度",
"isDefaultValue": "",
"isInputClass": "number",
"isDataType": 2,
"isDataTypeDetails": "int",
"isColumnLength": 4,
"isColumnType": 2,
"isSequence": 3,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": true,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 3,
"isDisplayformat": true,
"displayformatType": "center",
"editLength": 196,
"displayLength": 100,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306043000
},
{
"id": "6E98E47113E63806DF8DAF",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "piece_no",
"fieldCnName": "件号",
"isDefaultValue": "",
"isInputClass": "number",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 2,
"isSequence": 4,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": true,
"isAutomatic": false,
"isFilling": true,
"fillingDigit": 3,
"isDisplay": true,
"displayOrder": 4,
"isDisplayformat": true,
"displayformatType": "center",
"editLength": 196,
"displayLength": 100,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306049000
},
{
"id": "2320B1DF39B7DC48E4EEB9",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "archive_no",
"fieldCnName": "档号",
"isDefaultValue": "",
"isInputClass": "text",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 200,
"isColumnType": 2,
"isSequence": 5,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": true,
"isAutomatic": true,
"isFilling": false,
"isRepeat": true,
"isDisplay": true,
"displayOrder": 5,
"displayOrderBy": "asc",
"displayformatType": "left",
"editLength": 196,
"displayLength": 170,
"queue": 1,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306055000
},
{
"id": "799775CE1AFD47A49E986D",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "maintitle",
"fieldCnName": "题名",
"isDefaultValue": "",
"isInputClass": "textarea",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 500,
"isColumnType": 2,
"isSequence": 6,
"isType": 2,
"isSystem": true,
"isLine": true,
"isInput": true,
"isRequired": true,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 6,
"displayformatType": "left",
"editLength": 510,
"displayLength": 400,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663305969000
},
{
"id": "90AF675F891F5565522968",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "doc_no",
"fieldCnName": "文号",
"isDefaultValue": "",
"isInputClass": "text",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 100,
"isColumnType": 2,
"isSequence": 7,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 7,
"displayformatType": "center",
"editLength": 196,
"displayLength": 170,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306077000
},
{
"id": "ABD998404F24B78EFC419A",
"categoryId": "2C120624FD6083F499653C",
"dictionaryConfigId": {
"id": "8A2C800B2036211C8970AB",
"dicName": "实体分类号(文书档案)",
"dicCode": "WS",
"dicExplain": "实体分类号(文书档案)1级分类",
"dicSequence": 1,
"dicType": true,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1656917215000,
"updateTime": 1656917215000
},
"fieldName": "archive_ctg_no",
"fieldCnName": "分类号",
"isDefaultValue": "",
"isInputClass": "popover",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 2,
"isSequence": 8,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 8,
"isDisplayformat": false,
"displayformatType": "center",
"editLength": 196,
"displayLength": 100,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306082000
},
{
"id": "0577754F80741962FE5832",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "created_date",
"fieldCnName": "成文日期",
"isDefaultValue": "",
"isInputClass": "date",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 20,
"isColumnType": 2,
"isSequence": 9,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 11,
"displayformatType": "center",
"editLength": 196,
"displayLength": 120,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307568000
},
{
"id": "17162B1C966B3FB6D13D04",
"categoryId": "2C120624FD6083F499653C",
"dictionaryConfigId": {
"id": "8984F55841E2D541C23318",
"dicName": "密级",
"dicCode": "Search_MJ",
"dicSequence": 10,
"dicType": true,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1656921207000,
"updateTime": 1656991705000
},
"fieldName": "security_class",
"fieldCnName": "密级",
"isDefaultValue": "",
"isInputClass": "select",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 10,
"isColumnType": 2,
"isSequence": 10,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"editLength": 196,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307573000
},
{
"id": "FD8529F7BA62866C50FB1A",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "responsibleby",
"fieldCnName": "责任者",
"isDefaultValue": "",
"isInputClass": "text",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 100,
"isColumnType": 2,
"isSequence": 11,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 12,
"displayformatType": "center",
"editLength": 196,
"displayLength": 100,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307578000
},
{
"id": "6D37FF04F5958C4826C003",
"categoryId": "2C120624FD6083F499653C",
"dictionaryConfigId": {
"id": "426AA3EF366C7A26A942C8",
"dicName": "机构(问题)",
"dicCode": "Search_JGWT",
"dicSequence": 12,
"dicType": true,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1656923873000,
"updateTime": 1656991722000
},
"fieldName": "organization_matter",
"fieldCnName": "机构(问题)",
"isInputClass": "popover",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 100,
"isColumnType": 2,
"isSequence": 12,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 9,
"displayformatType": "center",
"editLength": 196,
"displayLength": 120,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306163000
},
{
"id": "7AAE02A7BAA85E593882D4",
"categoryId": "2C120624FD6083F499653C",
"dictionaryConfigId": {
"id": "BA3910917510B181160A9A",
"dicName": "部门",
"dicCode": "Search_BM",
"dicSequence": 15,
"dicType": true,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1656991900000,
"updateTime": 1656991900000
},
"fieldName": "department",
"fieldCnName": "部门名称",
"isDefaultValue": "",
"isInputClass": "select",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 100,
"isColumnType": 2,
"isSequence": 13,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 10,
"displayformatType": "center",
"editLength": 196,
"displayLength": 120,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306169000
},
{
"id": "84CB2FBF76205ED3E89E6B",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "page_qty",
"fieldCnName": "页数",
"isDefaultValue": "",
"isInputClass": "number",
"isDataType": 2,
"isDataTypeDetails": "int",
"isColumnLength": 11,
"isColumnType": 2,
"isSequence": 14,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": true,
"displayOrder": 13,
"displayformatType": "center",
"editLength": 196,
"displayLength": 100,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306176000
},
{
"id": "EEF529433F74B3071B438A",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "filing_person",
"fieldCnName": "立卷人",
"isDefaultValue": "",
"isInputClass": "text",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 2,
"isSequence": 15,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"editLength": 196,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307536000
},
{
"id": "027393952F6712D97A7B49",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "filing_date",
"fieldCnName": "立卷日期",
"isDefaultValue": "",
"isInputClass": "date",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 20,
"isColumnType": 2,
"isSequence": 16,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"editLength": 196,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307536000
},
{
"id": "C359AFEDAEC1BF8CADF9DD",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "check_person",
"fieldCnName": "检查人",
"isDefaultValue": "",
"isInputClass": "text",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 2,
"isSequence": 17,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"editLength": 196,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307536000
},
{
"id": "E52EB8A9540FA1EC24F124",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "inspection_date",
"fieldCnName": "检查日期",
"isDefaultValue": "",
"isInputClass": "date",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 2,
"isSequence": 18,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"editLength": 196,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307536000
},
{
"id": "C33EB66C8B38F89AD1B6E0",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "archive_person",
"fieldCnName": "归档人",
"isDefaultValue": "",
"isInputClass": "text",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 2,
"isSequence": 19,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"editLength": 196,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663307536000
},
{
"id": "F269D0196AA2A81649324D",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "archive_date",
"fieldCnName": "归档日期",
"isDefaultValue": "",
"isInputClass": "date",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 2,
"isSequence": 20,
"isType": 2,
"isSystem": true,
"isLine": false,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"isDisplay": false,
"displayOrder": 15,
"editLength": 196,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663308894000
},
{
"id": "702855664B7BEA7252D402",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "remarks",
"fieldCnName": "备注",
"isDefaultValue": "",
"isInputClass": "textarea",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 500,
"isColumnType": 2,
"isSequence": 22,
"isType": 2,
"isSystem": true,
"isLine": true,
"isInput": true,
"isRequired": false,
"isAutomatic": false,
"isFilling": false,
"editLength": 510,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1663306219000
},
{
"id": "4C8BA41A04F1DBF815026B",
"categoryId": "2C120624FD6083F499653C",
"fieldName": "barcode",
"fieldCnName": "条码号",
"isDataType": 1,
"isDataTypeDetails": "varchar",
"isColumnLength": 50,
"isColumnType": 1,
"isSequence": 18,
"isType": 1,
"isSystem": true,
"isInput": true,
"createBy": "admin",
"updatedBy": "admin",
"createTime": 1660706815000,
"updateTime": 1660706815000
}
]

109
src/views/prearchiveLibrary/index.vue

@ -21,6 +21,10 @@
<el-button size="mini" :disabled="crud.selections.length !== 1" @click="handleForm('edit')"><i class="iconfont icon-bianji" />编辑</el-button>
<!-- 删除btn 多选 -->
<el-button size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)"><i class="iconfont icon-shanchu" />删除</el-button>
<el-button :loading="crud.downloadLoading" size="mini" :disabled="crud.selections.length === 0" @click="doExport(crud.selections)">
<i class="iconfont icon-daochu" />
导出
</el-button>
</template>
<template v-slot:rightButtonGroup>
<div>
@ -64,21 +68,8 @@
<!--分页组件-->
<pagination v-if="crud.data.length !== 0" />
</div>
<!--删除对话框组件-->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible">
<div class="setting-dialog">
<div class="tip-content">
<p class="tipMsg">此操作将删除当前所选预归档数据</p>
<span>你是否还要继续?</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="deleteVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleDelConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 批量成件 -->
<batchFile ref="batchForm" />
<batchFile ref="batchForm" :selected-document="selectedDocument" />
<!-- 移动 -->
<moveFile ref="moveForm" />
<!-- 合并成件 -->
@ -135,14 +126,16 @@ import pagination from '@crud/Pagination'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import TreeList from './treeList'
import eForm from './module/form'
import PreviewForm from '@/views/components/category/PreviewForm'
import batchFile from './module/batchFile'
import moveFile from './module/moveFile'
import { exportFile } from '@/utils/index'
import qs from 'qs'
import { mapGetters } from 'vuex'
export default {
name: 'PrearchiveLibrary',
components: { TreeList, eForm, PreviewForm, batchFile, moveFile, Treeselect, rrOperation, crudOperation, pagination },
components: { TreeList, PreviewForm, batchFile, moveFile, Treeselect, rrOperation, crudOperation, pagination },
cruds() {
return [
CRUD({
@ -152,7 +145,7 @@ export default {
add: false,
edit: false,
del: false,
download: true,
download: false,
group: false,
reset: true
},
@ -172,8 +165,6 @@ export default {
tableDisplayFields: [], // table-list-title
arrySort: [],
selectedDocument: {},
deleteVisible: false,
mergeVisible: false,
categoryTree: [],
form: {},
@ -195,6 +186,9 @@ export default {
}
},
computed: {
...mapGetters([
'baseApi'
])
},
created() {
},
@ -220,9 +214,7 @@ export default {
}
})
this.$nextTick(() => {
if (this.tableDisplayFields.length !== 0) {
this.crud.toQuery()
}
})
}
})
@ -234,7 +226,6 @@ export default {
let params
if (type === 'add') {
this.formTitle = '新增文件'
params = {
documentId: this.selectedDocument.id,
archivesId: null
@ -249,30 +240,6 @@ export default {
}
this.getFormInfo(params, type)
},
//
toDelete(data) {
this.deleteVisible = true
},
//
handleDelConfirm(data) {
this.deleteVisible = false
// const params = data.map(item => {
// return item.id
// })
// del(params).then(res => {
// if (res.doDel.length === 0) {
// this.$message.error('')
// } else {
// if (res.doDel.length === data.length) {
// this.$message.success('')
// } else {
// this.$message.success('')
// }
// }
// this.deleteVisible = false
// this.crud.refresh()
// })
},
getFormInfo(params, type) {
PrearchiveCrud.FetchDoeditDocument(params).then(data => {
const showFiledAll = data.showFiled.filter(item => item.displayOrder).sort((a, b) => a.displayOrder - b.displayOrder)
@ -296,6 +263,56 @@ export default {
handlerArchivesSubmit() {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedDocument.id)
},
//
toDelete(datas) {
this.$confirm('此操作将删除当前所选预归档数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
this.crud.delAllLoading = true
const ids = []
datas.forEach(val => {
ids.push(val.id)
})
const params = {
'documentId': this.selectedDocument.id,
'ids': ids
}
PrearchiveCrud.del(params).then(() => {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.delAllLoading = false
this.crud.refresh()
}).catch(err => {
this.crud.delAllLoading = false
console.log(err)
})
}).catch(() => {
})
},
//
doExport(datas) {
this.crud.downloadLoading = true
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const ids = []
datas.forEach(val => {
ids.push(val.id)
})
const params = {
'documentId': this.selectedDocument.id,
'ids': ids
}
exportFile(this.baseApi + '/api/re-document/download?' + qs.stringify(params, { indices: false }))
}).catch(() => {
})
},
handleBatch() {
this.$refs.batchForm.batchVisible = true
},

82
src/views/prearchiveLibrary/module/batchFile.vue

@ -31,6 +31,7 @@
flat
:multiple="false"
:normalizer="normalizer"
:default-expand-level="6"
placeholder="请选择目标门类(整理库/管理库门类)"
@select="handleSelectCategory"
/>
@ -73,7 +74,6 @@
<p v-if="!item.mode" @click="textMode(index)">
{{ item.value }}
</p>
<div v-if="!item.mode" class="field-state"><span :class="item.isDisplay ? 'is-select' : 'is-hide'">{{ item.isDisplay ? '显示': '隐藏' }}</span></div>
</div>
</div>
</div>
@ -83,13 +83,13 @@
<span>{{ selectedCategoryName }}</span>
</div>
<div class="field-list">
<div v-for="(item,index) in targetData" :key="index" class="field-item">
<p>{{ item.fieldCnName }}</p>
<div class="field-state"><span :class=" item.isDisplay ? 'is-select' : 'is-hide'">{{ item.isDisplay ? '显示': '隐藏' }}</span></div>
<div v-for="(item,index) in allData" :key="index" class="field-item">
<p>{{ item.categoryFieldId.fieldCnName }}</p>
<div class="field-state"><span :class=" item.categoryFieldId.isInput ? 'is-select' : 'is-hide'">{{ item.categoryFieldId.isInput ? '显示': '隐藏' }}</span></div>
</div>
</div>
</div>
<div v-if="selectStatus.length === 0" class="empty-data" />
<div v-if="allData.length === 0" class="empty-data" />
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="batchVisible = false">取消</el-button>
@ -103,18 +103,26 @@
<script>
import { preLibraryCrud } from '../mixins/index'
import { FetchInitFieldMateList, FetchInitFieldMate } from '@/api/system/fieldMate'
// FetchInitFieldMateList
import { FetchInitFieldMate, FetchMateByDocumentId, FetchDetailsByDocumentIdAndCategoryId } from '@/api/system/fieldMate'
import { FetchDocumentMenu } from '@/api/system/fileLibrary/fileLibrary'
import { FetchCategoryMenu } from '@/api/system/category/category'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import fieldData from './data.json'
import ScopeModule from './scope'
export default {
name: 'BatchFile',
components: { Treeselect, ScopeModule },
mixins: [preLibraryCrud],
props: {
selectedDocument: {
type: Object,
default: function() {
return {}
}
}
},
data() {
return {
batchVisible: false,
@ -135,30 +143,46 @@ export default {
{ required: true, message: '请选择档案门类', trigger: 'change' }
]
},
fiedOption: [],
fiedOption: [{
'label': '默认值',
'value': 1
}, {
'label': '字段值',
'value': 2
}],
fiedType: null,
selectStatus: [],
selectOptions: [],
options: [],
allData: [],
targetData: [],
leftLoading: false,
rightLoading: false
}
},
created() {
this.getInitFieldMateList()
watch: {
selectedDocument: function(newValue, oldValue) {
this.form.documentName = newValue.cnName
this.getMateByDocumentId()
this.getCategoryDataTree()
this.getDocumentDataTree()
}
},
created() {
// this.getInitFieldMateList()
// this.getDocumentDataTree()
},
mounted() {
},
methods: {
//
getInitFieldMateList() {
FetchInitFieldMateList().then(res => {
this.rulesOptions = res.content.map(item => {
//
getMateByDocumentId() {
const params = {
'documentId': this.selectedDocument.id
}
FetchMateByDocumentId(params).then(res => {
this.rulesOptions = res.map(item => {
const json = {}
json.label = item.rule_name
json.label = item.ruleName
json.value = item.id
return json
})
@ -166,10 +190,9 @@ export default {
},
getInitDetail(id) {
FetchInitFieldMate({ 'id': id }).then((res) => {
console.log(res)
this.form.documentName = res.documentName
this.selectedCategoryName = res.categoryName
this.form.categoryId = res.fieldMateDetails[0].pid.categoryId.pid
this.getDetailsByDocumentIdAndCategoryId()
}).catch(err => {
console.log(err)
})
@ -177,7 +200,7 @@ export default {
selectRules(val) {
this.getInitDetail(val)
this.selectStatus = []
this.targetData = fieldData
// this.targetData = fieldData
// this.targetData.forEach((item, index) => {
// this.selectStatus.push({ mode: true, value: '' })
// })
@ -193,6 +216,21 @@ export default {
this.documentTree = this.filterData(res)
})
},
//
getDetailsByDocumentIdAndCategoryId() {
const params = {
'categoryId': this.form.categoryId,
'documentId': this.selectedDocument.id
}
FetchDetailsByDocumentIdAndCategoryId(params).then(res => {
console.log(res)
this.allData = res
res.forEach((item, index) => {
this.selectStatus.push({ mode: false, fiedType: item.documentFieldId.isDefaultValue === '' ? 2 : 1, value: item.documentFieldId.fieldCnName, field: item.documentFieldId, isInput: item.documentFieldId.isInput })
})
console.log(this.selectStatus)
})
},
handleSelectCategory(val) {
this.selectedCategoryName = val.cnName
},
@ -209,12 +247,12 @@ export default {
selectChange(index) {
this.options.forEach((item) => {
if (item.fieldCnName === this.selectStatus[index].value) {
this.selectStatus.splice(index, 1, { mode: false, value: this.selectStatus[index].value, field: item, isDisplay: item.isDisplay })
this.selectStatus.splice(index, 1, { mode: false, value: this.selectStatus[index].value, field: item, isInput: item.isInput })
}
})
},
textMode(index) {
this.selectStatus.splice(index, 1, { mode: true, value: this.selectStatus[index].value, field: null, isDisplay: this.selectStatus[index].isDisplay })
this.selectStatus.splice(index, 1, { mode: true, value: this.selectStatus[index].value, field: null, isInput: this.selectStatus[index].isInput })
},
handleClose(done) {
this.batchVisible = false

91
src/views/prearchiveLibrary/module/form.vue

@ -1,91 +0,0 @@
<template>
<!--新增 / 编辑 表单组件-->
<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">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<!-- form -->
<!-- @emitTableList="getTableList" -->
<PreviewForm ref="previewForm" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" :is-des-form-type="isDesFormType" :is-disabled="isDisabled" :is-has-code="isHasCode" />
<div slot="footer" class="dialog-footer">
<!-- :loading="crud.status.cu === 2" -->
<el-button type="text" @click="formVisible = false">取消</el-button>
<el-button type="primary" @click="handlerArchivesSubmit">确定</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import PreviewForm from '@/views/components/category/PreviewForm'
// import { add, edit } from '@/api/prearchiveLibrary/prearchiveLibrary'
// import addJson from '../add.json'
export default {
components: { PreviewForm },
data() {
return {
formVisible: false,
formTitle: '新增文件',
loading: false,
formPreviewData: null,
selectedCategory: null,
parentsId: null,
arcId: null,
isDesFormType: 'prearchiveLibrary',
isDisabled: false,
isHasCode: false
}
},
created() {
// this.formPreviewData = addJson
},
methods: {
handleClose(done) {
done()
this.formVisible = false
},
handlerArchivesSubmit() {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id)
this.selections = []
}
// save() {
// this.loading = true
// if (this.title === '') {
// const addData = this.formData.fields.map((item) => {
// return {
// dictionaryId: item.id,
// fieldName: item.fieldName,
// fieldCnName: item.fieldCnName,
// connector: item.connector,
// categoryId: item.categoryId
// }
// })
// add(addData).then((res) => {
// this.$message({
// message: '',
// type: 'success',
// duration: 2500
// })
// this.cuDialogVisible = false
// this.loading = false
// this.$emit('refresh')
// })
// } else {
// edit(this.formData.fields).then((res) => {
// this.$message({
// message: '',
// type: 'success',
// duration: 2500
// })
// this.cuDialogVisible = false
// this.loading = false
// this.$emit('refresh')
// })
// }
// }
}
}
</script>
<style lang="scss" scoped>
</style>

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

@ -533,7 +533,7 @@ export default {
},
doExport(data) {
console.log(data)
crud.downloadLoading = true
this.crud.downloadLoading = true
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',

22
src/views/system/fieldCorresManage/index.vue

@ -243,8 +243,8 @@ export default {
//
FetchInitDocumentFieldByPid({ documentId: documentId, isType: 2 }).then((res) => {
this.$refs.corresForm.options = res.sort((a, b) => {
if (a.isDisplay !== b.isDisplay) {
return a.isDisplay ? -1 : 1
if (a.isInput !== b.isInput) {
return a.isInput ? -1 : 1
} else {
return a.isSequence - b.isSequence
}
@ -254,14 +254,14 @@ export default {
//
FetchInitCategoryFieldByPid({ categoryId: categoryId, isType: 2 }).then((res) => {
this.$refs.corresForm.targetData = res.sort((a, b) => {
if (a.isDisplay !== b.isDisplay) {
return a.isDisplay ? -1 : 1
if (a.isInput !== b.isInput) {
return a.isInput ? -1 : 1
} else {
return a.isSequence - b.isSequence
}
})
res.forEach((item, index) => {
this.$refs.corresForm.selectStatus.push({ mode: true, value: '', field: item, isDisplay: item.isDisplay })
this.$refs.corresForm.selectStatus.push({ mode: true, value: '', field: item, isInput: item.isInput })
})
this.$refs.corresForm.rightLoading = false
})
@ -284,8 +284,8 @@ export default {
this.$refs.corresForm.selectStatus = []
FetchInitDocumentField({ documentId: row.document_id, isType: 2 }).then((res) => {
this.$refs.corresForm.options = res.sort((a, b) => {
if (a.isDisplay !== b.isDisplay) {
return a.isDisplay ? -1 : 1
if (a.isInput !== b.isInput) {
return a.isInput ? -1 : 1
} else {
return a.isSequence - b.isSequence
}
@ -295,14 +295,14 @@ export default {
//
FetchInitCategoryField({ categoryId: row.category_id, isType: 2 }).then((res) => {
this.$refs.corresForm.targetData = res.sort((a, b) => {
if (a.isDisplay !== b.isDisplay) {
return a.isDisplay ? -1 : 1
if (a.isInput !== b.isInput) {
return a.isInput ? -1 : 1
} else {
return a.isSequence - b.isSequence
}
})
res.forEach((item, index) => {
this.$refs.corresForm.selectStatus.push({ mode: true, value: '', field: item, isDisplay: item.isDisplay })
this.$refs.corresForm.selectStatus.push({ mode: true, value: '', field: item, isInput: item.isInput })
})
this.$refs.corresForm.rightLoading = false
})
@ -325,7 +325,7 @@ export default {
}
res.fieldMateDetails.map(item => {
const index = getIndexByCategory(item.categoryFieldId.fieldCnName)
this.$refs.corresForm.selectStatus.splice(index, 1, { mode: false, value: item.documentFieldId.fieldCnName, field: item.documentFieldId, isDisplay: item.documentFieldId.isDisplay })
this.$refs.corresForm.selectStatus.splice(index, 1, { mode: false, value: item.documentFieldId.fieldCnName, field: item.documentFieldId, isInput: item.documentFieldId.isInput })
})
}).catch(err => {
console.log(err)

4
src/views/system/fieldCorresManage/module/detail.vue

@ -24,7 +24,7 @@
<p>
{{ item.documentFieldId.fieldCnName }}
</p>
<div class="field-state"><span :class=" item.documentFieldId.isDisplay ? 'is-select' : 'is-hide'">{{ item.documentFieldId.isDisplay ? '显示': '隐藏' }}</span></div>
<div class="field-state"><span :class=" item.documentFieldId.isInput ? 'is-select' : 'is-hide'">{{ item.documentFieldId.isInput ? '显示': '隐藏' }}</span></div>
</div>
</div>
</div>
@ -36,7 +36,7 @@
<div class="field-list">
<div v-for="(item,index) in detailData.fieldMateDetails" :key="index" class="field-item">
<p>{{ item.categoryFieldId.fieldCnName }}</p>
<div class="field-state"><span :class=" item.categoryFieldId.isDisplay ? 'is-select' : 'is-hide'">{{ item.categoryFieldId.isDisplay ? '显示': '隐藏' }}</span></div>
<div class="field-state"><span :class=" item.categoryFieldId.isInput ? 'is-select' : 'is-hide'">{{ item.categoryFieldId.isInput ? '显示': '隐藏' }}</span></div>
</div>
</div>
</div>

8
src/views/system/fieldCorresManage/module/form.vue

@ -34,7 +34,7 @@
<p v-if="!item.mode" @click="textMode(index)">
{{ item.value }}
</p>
<div v-if="!item.mode" class="field-state"><span :class="item.isDisplay ? 'is-select' : 'is-hide'">{{ item.isDisplay ? '显示': '隐藏' }}</span></div>
<div v-if="!item.mode" class="field-state"><span :class="item.isInput ? 'is-select' : 'is-hide'">{{ item.isInput ? '显示': '隐藏' }}</span></div>
</div>
</div>
</div>
@ -46,7 +46,7 @@
<div class="field-list">
<div v-for="(item,index) in targetData" :key="index" class="field-item">
<p>{{ item.fieldCnName }}</p>
<div class="field-state"><span :class=" item.isDisplay ? 'is-select' : 'is-hide'">{{ item.isDisplay ? '显示': '隐藏' }}</span></div>
<div class="field-state"><span :class=" item.isInput ? 'is-select' : 'is-hide'">{{ item.isInput ? '显示': '隐藏' }}</span></div>
</div>
</div>
</div>
@ -97,12 +97,12 @@ export default {
selectChange(index) {
this.options.forEach((item) => {
if (item.fieldCnName === this.selectStatus[index].value) {
this.selectStatus.splice(index, 1, { mode: false, value: this.selectStatus[index].value, field: item, isDisplay: item.isDisplay })
this.selectStatus.splice(index, 1, { mode: false, value: this.selectStatus[index].value, field: item, isInput: item.isInput })
}
})
},
textMode(index) {
this.selectStatus.splice(index, 1, { mode: true, value: this.selectStatus[index].value, field: null, isDisplay: this.selectStatus[index].isDisplay })
this.selectStatus.splice(index, 1, { mode: true, value: this.selectStatus[index].value, field: null, isInput: this.selectStatus[index].isInput })
},
doSubmit() {
this.$refs['cuForm'].validate((valid) => {

Loading…
Cancel
Save