Browse Source

在线编研/bug修复

master
xuhuajiao 1 year ago
parent
commit
748c621bb4
  1. 9
      package.json
  2. 53
      src/assets/styles/archives-manage.scss
  3. 205
      src/assets/styles/quillEditor.css
  4. 180
      src/components/quillEditor/index.vue
  5. 25
      src/views/archiveKeeping/caseManage/caseList/index.vue
  6. 9
      src/views/archiveKeeping/caseManage/caseList/module/detailDialog.vue
  7. 8
      src/views/archiveUtilize/archiveEditing/index.vue
  8. 5
      src/views/archiveUtilize/archiveEditing/module/material.vue
  9. 77
      src/views/archiveUtilize/archiveEditing/module/onlineAdd.vue
  10. 285
      src/views/archiveUtilize/archiveEditing/module/onlineEditing.vue
  11. 14
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  12. 9
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  13. 2
      src/views/collectReorganizi/collectionLibrary/module/quickPaper/index.vue
  14. 21
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue
  15. 53
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue
  16. 7
      src/views/components/category/PreviewForm.vue

9
package.json

@ -51,8 +51,11 @@
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qs": "^6.10.1", "qs": "^6.10.1",
"quill": "^1.3.7",
"quill-image-resize-module": "^3.0.0",
"screenfull": "4.2.0", "screenfull": "4.2.0",
"sortablejs": "1.8.4", "sortablejs": "1.8.4",
"spark-md5": "^3.0.2",
"vkbeautify": "^0.99.3", "vkbeautify": "^0.99.3",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-count-to": "^1.0.13", "vue-count-to": "^1.0.13",
@ -60,16 +63,16 @@
"vue-echarts": "^5.0.0-beta.0", "vue-echarts": "^5.0.0-beta.0",
"vue-highlightjs": "^1.3.3", "vue-highlightjs": "^1.3.3",
"vue-image-crop-upload": "^2.5.0", "vue-image-crop-upload": "^2.5.0",
"vue-quill-editor": "^3.0.6",
"vue-resource": "^1.5.3", "vue-resource": "^1.5.3",
"vue-router": "3.0.2", "vue-router": "3.0.2",
"vue-simple-uploader": "^0.7.6",
"vue-splitpane": "1.0.4", "vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0", "vuedraggable": "2.20.0",
"vuex": "3.1.0", "vuex": "3.1.0",
"wangeditor": "^4.7.11", "wangeditor": "^4.7.11",
"x2js": "^3.4.3", "x2js": "^3.4.3",
"xlsx": "^0.17.4",
"spark-md5": "^3.0.2",
"vue-simple-uploader": "^0.7.6"
"xlsx": "^0.17.4"
}, },
"devDependencies": { "devDependencies": {
"@babel/parser": "^7.7.4", "@babel/parser": "^7.7.4",

53
src/assets/styles/archives-manage.scss

@ -927,3 +927,56 @@
font-size: 20px; font-size: 20px;
} }
} }
.upload-container{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 496px;
min-height: 178px;
padding: 12px;
border-radius: 3px;
background: #EDEFF3;
border: 1px dashed #BCC2C7;
.upload-icon{
font-size: 32px;
color: #1F55EB;
}
.el-upload__tip{
font-size: 12px;
color: #A6ADB6;
}
.file-list{
font-size: 12px;
line-height: 24px;
color: #545B65;
}
}
.upload-input{
position: relative;
margin-top: 16px;
width: 104px;
height: 32px;
& input{
position: absolute;
left: 0;
top: 0;
height: 32px;
opacity: 0;
}
}
.upload-zip{
width: 104px;
height: 32px;
line-height: 32px;
font-size: 14px;
color: #fff;
text-align: center;
border-radius: 3px;
background: #1F55EB;
& i{
font-size: 13px;
}
}

205
src/assets/styles/quillEditor.css

@ -0,0 +1,205 @@
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {
content: "黑体";
font-family: "SimHei";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {
content: "微软雅黑";
font-family: "Microsoft YaHei";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {
content: "楷体";
font-family: "KaiTi";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before {
content: "仿宋";
font-family: "FangSong";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {
content: "Arial";
font-family: "Arial";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {
content: "Times New Roman";
font-family: "Times New Roman";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before {
content: "sans-serif";
font-family: "sans-serif";
}
.ql-font-SimSun {
font-family: "SimSun";
}
.ql-font-SimHei {
font-family: "SimHei";
}
.ql-font-Microsoft-YaHei {
font-family: "Microsoft YaHei";
}
.ql-font-KaiTi {
font-family: "KaiTi";
}
.ql-font-FangSong {
font-family: "FangSong";
}
.ql-font-Arial {
font-family: "Arial";
}
.ql-font-Times-New-Roman {
font-family: "Times New Roman";
}
.ql-font-sans-serif {
font-family: "sans-serif";
}
/* 字号设置 */
/* 默认字号 */
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: "12px";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12px"]::before{
content: "12px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="14px"]::before{
content: "14px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16px"]::before{
content: "16px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18px"]::before{
content: "18px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20px"]::before{
content: "20px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="22px"]::before{
content: "22px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="26px"]::before{
content: "26px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="28px"]::before{
content: "28px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="30px"]::before{
content: "30px";
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12px"]::before {
content: "12px";
font-size: 12px;
}
.ql-size-12px {
font-size: 12px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14px"]::before {
content: "14px";
font-size: 14px;
}
.ql-size-14px {
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16px"]::before {
content: "16px";
font-size: 16px;
}
.ql-size-16px {
font-size: 16px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before {
content: "18px";
font-size: 18px;
}
.ql-size-18px {
font-size: 18px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20px"]::before {
content: "20px";
font-size: 20px;
}
.ql-size-20px {
font-size: 20px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="22px"]::before {
content: "22px";
font-size: 22px;
}
.ql-size-22px {
font-size: 22px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="26px"]::before {
content: "26px";
font-size: 26px;
}
.ql-size-26px {
font-size: 26px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="28px"]::before {
content: "28px";
font-size: 28px;
}
.ql-size-28px {
font-size: 28px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="30px"]::before {
content: "30px";
font-size: 30px;
}
.ql-size-30px {
font-size: 30px;
}

180
src/components/quillEditor/index.vue

@ -0,0 +1,180 @@
<template>
<quill-editor
:id="randomId(3)"
:ref="editorRef"
v-model="content"
:options="editorOption"
class="editor"
@focus="onEditorFocus($event)"
@blur="onEditorBlur($event)"
@change="onEditorChange($event)"
/>
</template>
<script>
// https://blog.51cto.com/cplvfx/5931866
// https://www.jianshu.com/p/ceb30ec66d20
// https://www.cnblogs.com/chenxdnote/p/17611756.html
import { Quill, quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme
//
import '@/assets/styles/quillEditor.css'
// import * as Quill from 'quill'
// quill
// 'Times-New-Roman',
var fonts = [
'SimSun',
'SimHei',
'Microsoft-YaHei',
'KaiTi',
'FangSong',
'Arial',
'sans-serif'
]
//
var sizes = [false, '14px', '16px', '18px', '20px', '22px', '26px', '28px', '30px']
var Size = Quill.import('formats/size')
Size.whitelist = sizes
var Font = Quill.import('formats/font')
Font.whitelist = fonts //
Quill.register(Font, true)
const toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // 线 线 -----['bold', 'italic', 'underline', 'strike']
['blockquote', 'code-block'], // -----['blockquote', 'code-block']
[{ list: 'ordered' }, { list: 'bullet' }], // -----[{ list: 'ordered' }, { list: 'bullet' }]
[{ script: 'sub' }, { script: 'super' }], // /-----[{ script: 'sub' }, { script: 'super' }]
[{ indent: '-1' }, { indent: '+1' }],
[{ size: sizes }], //
[{ header: [1, 2, 3, 4, 5, 6, false] }], // -----[{ header: [1, 2, 3, 4, 5, 6, false] }]
[{ color: [] }, { background: [] }], // -----[{ color: [] }, { background: [] }]
[{ font: fonts }], //
[{ align: [] }], // -----[{ align: [] }]
['clean'], // -----['clean']
['link', 'image'] // -----['link', 'image', 'video']
]
//
const titleConfig = [
{ Choice: '.ql-bold', title: '加粗' },
{ Choice: '.ql-italic', title: '斜体' },
{ Choice: '.ql-underline', title: '下划线' },
{ Choice: '.ql-header', title: '段落格式' },
{ Choice: '.ql-strike', title: '删除线' },
{ Choice: '.ql-blockquote', title: '块引用' },
{ Choice: '.ql-code', title: '插入代码' },
{ Choice: '.ql-code-block', title: '插入代码段' },
{ Choice: '.ql-font', title: '字体' },
{ Choice: '.ql-size', title: '字体大小' },
{ Choice: '.ql-list[value="ordered"]', title: '编号列表' },
{ Choice: '.ql-list[value="bullet"]', title: '项目列表' },
{ Choice: '.ql-direction', title: '文本方向' },
{ Choice: '.ql-header[value="1"]', title: 'h1' },
{ Choice: '.ql-header[value="2"]', title: 'h2' },
{ Choice: '.ql-align', title: '对齐方式' },
{ Choice: '.ql-color', title: '字体颜色' },
{ Choice: '.ql-background', title: '背景颜色' },
{ Choice: '.ql-image', title: '图像' },
{ Choice: '.ql-upload', title: '文件' },
{ Choice: '.ql-link', title: '添加链接' },
{ Choice: '.ql-formula', title: '插入公式' },
{ Choice: '.ql-clean', title: '清除字体格式' },
{ Choice: '.ql-script[value="sub"]', title: '下标' },
{ Choice: '.ql-script[value="super"]', title: '上标' },
{ Choice: '.ql-indent[value="-1"]', title: '向左缩进' },
{ Choice: '.ql-indent[value="+1"]', title: '向右缩进' },
{ Choice: '.ql-header .ql-picker-label', title: '标题大小' },
{ Choice: '.ql-header .ql-picker-item[data-value="1"]', title: '标题一' },
{ Choice: '.ql-header .ql-picker-item[data-value="2"]', title: '标题二' },
{ Choice: '.ql-header .ql-picker-item[data-value="3"]', title: '标题三' },
{ Choice: '.ql-header .ql-picker-item[data-value="4"]', title: '标题四' },
{ Choice: '.ql-header .ql-picker-item[data-value="5"]', title: '标题五' },
{ Choice: '.ql-header .ql-picker-item[data-value="6"]', title: '标题六' },
{ Choice: '.ql-header .ql-picker-item:last-child', title: '标准' },
{ Choice: '.ql-size .ql-picker-item[data-value="small"]', title: '小号' },
{ Choice: '.ql-size .ql-picker-item[data-value="large"]', title: '大号' },
{ Choice: '.ql-size .ql-picker-item[data-value="huge"]', title: '超大号' },
{ Choice: '.ql-size .ql-picker-item:nth-child(2)', title: '标准' },
{ Choice: '.ql-align .ql-picker-item:first-child', title: '居左对齐' },
{ Choice: '.ql-align .ql-picker-item[data-value="center"]', title: '居中对齐' },
{ Choice: '.ql-align .ql-picker-item[data-value="right"]', title: '居右对齐' },
{ Choice: '.ql-align .ql-picker-item[data-value="justify"]', title: '两端对齐' }
]
export default {
name: 'TestQuillEditor',
components: { quillEditor },
props: {
//
editorContent: {
type: String,
required: true
},
editorRef: {
type: String,
required: true
}
},
data() {
return {
content: this.editorContent,
editorOption: {
theme: 'snow',
modules: {
toolbar: toolbarOptions
}
},
titleConfig
}
},
computed: {
//
editor() {
return this.$refs.editorRef.quillEditor
}
},
watch: {
editorContent() {
this.content = this.editorContent
}
},
mounted() {
document.getElementsByClassName('ql-editor')[0].dataset.placeholder = ''
for (const item of this.titleConfig) {
const tip = document.querySelector('.quill-editor ' + item.Choice)
if (!tip) continue
tip.setAttribute('title', item.title)
}
},
methods: {
randomId(len) {
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
var tempLen = chars.length
var tempStr = ''
for (var i = 0; i < len; ++i) {
tempStr += chars.charAt(Math.floor(Math.random() * tempLen))
}
return tempStr
},
//
onEditorReady() {},
//
onEditorBlur() {},
//
onEditorFocus() {},
//
onEditorChange({ html }) {
//
// console.log('');
this.$emit('input', this.content)
}
}
}
</script>
<style>
.ql-editor{
height: 400px;
}
</style>

25
src/views/archiveKeeping/caseManage/caseList/index.vue

@ -107,19 +107,16 @@
<h3 style="text-align: center; margin:20px 0; font-size: 24px;">归档文件目录</h3> <h3 style="text-align: center; margin:20px 0; font-size: 24px;">归档文件目录</h3>
<el-table :data="printData" border> <el-table :data="printData" border>
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<!-- <el-table-column label="件号" prop="pieceNo" width="55" align="center" /> -->
<el-table-column label="档号" prop="archiveNo" align="center" width="180px" />
<el-table-column label="文号" prop="docNo" align="center" width="160" />
<el-table-column label="责任者" prop="responsibleby" align="center" />
<el-table-column label="题名" prop="maintitle" align="center" width="200px" />
<el-table-column label="日期" prop="create_time" align="center" width="100">
<template slot-scope="scope">
<div>{{ parseTime(scope.row.create_time, '{y}-{m}-{d}') }}</div>
</template>
</el-table-column>
<el-table-column label="密级" prop="securityClass" align="center" />
<el-table-column label="页数" prop="pageQty" align="center" width="60" />
<el-table-column label="备注" prop="remarks" align="center" width="100px" />
<el-table-column label="年度" prop="archive_year" align="center" />
<el-table-column label="件号" prop="item_no" align="center" />
<el-table-column label="档号" prop="archive_no" align="center" width="180px" />
<el-table-column label="发文字号" prop="doc_no" align="center" width="160" />
<el-table-column label="全宗号" prop="fonds_no" align="center" />
<el-table-column label="标题" prop="maintitle" align="center" width="200px" />
<el-table-column label="分类号" prop="archive_ctg_no" align="center" width="100" />
<el-table-column label="密级" prop="security_class" align="center" />
<el-table-column label="保密期限" prop="secrecy_period" align="center" width="60" />
<el-table-column label="保管期限" prop="retention" align="center" width="100px" />
</el-table> </el-table>
</div> </div>
@ -374,7 +371,7 @@ export default {
} }
this.crud.crudMethod.findInCase(params).then(res => { this.crud.crudMethod.findInCase(params).then(res => {
if (res) { if (res) {
this.printData = res.archives
this.printData = res.archives_o
} }
this.isHidden = true this.isHidden = true
this.$nextTick(() => { this.$nextTick(() => {

9
src/views/archiveKeeping/caseManage/caseList/module/detailDialog.vue

@ -141,15 +141,6 @@ export default {
methods: { methods: {
changeActiveTab(data) { changeActiveTab(data) {
this.caseTabIndex = data this.caseTabIndex = data
if (this.caseTabIndex === 1) {
// if (this.tableData.length !== 0) {
// this.$refs.archivesListModuleRef.caseCategoryId = this.tableData[0].categoryPid
// this.$refs.archivesListModuleRef.getViewTable()
// } else {
// this.$refs.archivesListModuleRef.caseCategoryId = null
// this.$refs.archivesListModuleRef.tableData = []
// }
}
} }
} }
} }

8
src/views/archiveUtilize/archiveEditing/index.vue

@ -17,11 +17,12 @@
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery()">重置</el-button> <el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery()">重置</el-button>
<el-checkbox v-model="myEditing" style="line-height: 32px; padding-left: 10px;">我参与得编研</el-checkbox> <el-checkbox v-model="myEditing" style="line-height: 32px; padding-left: 10px;">我参与得编研</el-checkbox>
</div> </div>
<crudOperation />
<crudOperation :permission="permission" />
</div> </div>
<el-table <el-table
ref="table" ref="table"
:data="crud.data" :data="crud.data"
row-key="id"
style="width: 100%;" style="width: 100%;"
height="calc(100vh - 330px)" height="calc(100vh - 330px)"
@row-click="clickRowHandler" @row-click="clickRowHandler"
@ -83,6 +84,11 @@ export default {
}, },
data() { data() {
return { return {
permission: {
add: ['admin', 'archiveEditing:add'],
edit: ['admin', 'archiveEditing:edit'],
del: ['admin', 'archiveEditing:del']
},
keyWord: null, keyWord: null,
options: [ options: [
{ value: 'username', label: '利用人' }, { value: 'username', label: '利用人' },

5
src/views/archiveUtilize/archiveEditing/module/material.vue

@ -67,6 +67,7 @@
</el-form> </el-form>
<el-table <el-table
ref="table" ref="table"
row-key="id"
:data="detailArcData" :data="detailArcData"
style="width: 100%;" style="width: 100%;"
height="calc(100vh - 560px)" height="calc(100vh - 560px)"
@ -159,7 +160,9 @@ export default {
remark: '利用事由' remark: '利用事由'
}, },
detailArcData: [], detailArcData: [],
checkList: ['电子查看', '实体借阅']
checkList: ['电子查看', '实体借阅'],
selectedCategory: null,
arcId: null
} }
}, },
watch: { watch: {

77
src/views/archiveUtilize/archiveEditing/module/onlineAdd.vue

@ -0,0 +1,77 @@
<template>
<div>
<el-dialog class="detail-dialog" :title="onlineTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="onlineAddVisible" :before-close="handleCloseDialog">
<div class="setting-dialog" style="margin-top: 20px;">
<el-form ref="form" :model="form" inline label-width="100px" style="margin-bottom: 10px;">
<el-form-item label="文档名称" prop="title" :rules="[{ required: true, message: '请输入文档名称', trigger: 'blur' }]">
<el-input v-model="form.title" style="width: 580px;" />
</el-form-item>
</el-form>
<editor
v-model="editorContent"
:editor-content="editorContent"
:editor-ref="editorRef"
/>
<!-- 回显富文本编辑器的内容 -->
<!-- <div v-html="editorContent" /> -->
<!-- 查看富文本编辑器的内容 -->
<!-- <div>{{ editorContent }}</div> -->
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click.native="handleCloseDialog">取消</el-button>
<el-button type="primary" @click="submit">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import editor from '@/components/quillEditor/index'
export default {
name: 'OnlineAdd',
components: { editor },
props: {
activeIndex: {
type: Number,
default: 0
}
},
data() {
return {
form: {
title: null
},
onlineTitle: '',
onlineAddVisible: false,
editorRef: 'test',
editorContent: ''
}
},
watch: {
},
mounted() {
},
methods: {
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
console.log('success')
} else {
return false
}
})
},
handleCloseDialog(done) {
this.onlineAddVisible = false
//
// done()
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .dialog-footer{
margin: 30px 0 10px 0 !important
}
</style>

285
src/views/archiveUtilize/archiveEditing/module/onlineEditing.vue

@ -1,22 +1,39 @@
<template> <template>
<div> <div>
<div class="head-container"> <div class="head-container">
<crudOperation />
<div>
<el-button size="mini" @click="toAdd">
<i class="iconfont icon-xinzeng" />
新增
</el-button>
<el-button size="mini" :disabled="crud.selections.length !== 1" @click="toEdit(crud.selections[0])">
<i class="iconfont icon-bianji" />
编辑
</el-button>
<el-button slot="reference" size="mini" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">
<i class="iconfont icon-shanchu" />
删除
</el-button>
<el-button :disabled="crud.selections.length === 0" size="mini" @click="doExport(crud.selections)">
<i class="iconfont icon-daochu" />
导出
</el-button>
</div>
<div class="online-right-handle"> <div class="online-right-handle">
<el-button size="mini"><i class="iconfont icon-shangchuan2" />附件上传</el-button>
<el-button size="mini"><i class="iconfont icon-fabu" />发布</el-button>
<el-button size="mini" @click="handleUpload"><i class="iconfont icon-shangchuan2" />附件上传</el-button>
<el-button size="mini" :disabled="crud.selections.length === 0" @click="toPublish(crud.selections)"><i class="iconfont icon-fabu" />发布</el-button>
<el-button size="mini"><i class="iconfont icon-huifu" />取消发布</el-button> <el-button size="mini"><i class="iconfont icon-huifu" />取消发布</el-button>
</div> </div>
</div> </div>
<el-table <el-table
ref="table" ref="table"
:data="crud.data" :data="crud.data"
row-key="id"
style="width: 100%;" style="width: 100%;"
height="calc(100vh - 485px)" height="calc(100vh - 485px)"
@cell-dblclick="tableDoubleClick" @cell-dblclick="tableDoubleClick"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> <el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="username" label="文档名称" align="center" /> <el-table-column prop="username" label="文档名称" align="center" />
@ -30,92 +47,85 @@
</el-table> </el-table>
<pagination v-if="crud.data.length !== 0" /> <pagination v-if="crud.data.length !== 0" />
<el-dialog title="利用详情" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="lendDetail" :before-close="handleCloseDialog">
<el-dialog class="fileUpload-dialog" title="附件上传" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uploadVisible">
<div class="setting-dialog">
<div class="upload-container">
<i v-if="fileList.length === 0" class="iconfont icon-tianjiawenjian upload-icon" />
<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 class="upload-input">
<input ref="fileInput" :key="key" type="file" :accept="'.zip'" @change="handleFileChange">
<div class="upload-zip"><i class="iconfont icon-shangchuan2" />点击上传</div>
</div>
<div class="el-upload__tip">上传限制文件类型zip</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="uploadVisible = false">取消</el-button>
<el-button type="primary" @click="handleUploadConfirm">保存</el-button>
</div>
</div>
</el-dialog>
<el-dialog class="detail-dialog" title="编研详情" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="onlineEditDetail" :before-close="handleCloseDialog">
<div class="setting-dialog"> <div class="setting-dialog">
<el-form ref="form" :model="form" inline label-width="100px">
<el-form-item label="利用人" prop="user">
<el-input v-model="form.user" style="width: 280px;" disabled />
</el-form-item>
<el-form-item label="利用流程" prop="process">
<el-input v-model="form.process" style="width: 280px;" disabled />
</el-form-item>
<el-form-item label="开始时间" prop="startDate">
<el-input v-model="form.startDate" style="width: 280px;" disabled />
</el-form-item>
<el-form-item label="结束时间" prop="endDate">
<el-input v-model="form.endDate" style="width: 280px;" disabled />
</el-form-item>
<el-row>
<el-form-item label="利用事由" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="4" style="width: 703px;" disabled />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="状态" prop="status">
<span class="row-state soon-state">即将到期</span>
<span class="row-state end-state">利用中</span>
<span class="row-state cancel-state">已过期</span>
</el-form-item>
</el-row>
</el-form>
<div class="detail-tab tab-content">
<!-- tab -->
<ul class="tab-nav">
<li :class="{'active-tab-nav': onlineTabIndex == 0}" @click="changeOnlineTab(0)">文档正文</li>
<li :class="{'active-tab-nav': onlineTabIndex == 1}" @click="changeOnlineTab(1)">文档附件</li>
</ul>
<div v-if="onlineTabIndex===0">文档正文</div>
<el-table <el-table
v-if="onlineTabIndex===1"
ref="table" ref="table"
:data="detailArcData" :data="detailArcData"
row-key="id"
style="width: 100%;" style="width: 100%;"
height="calc(100vh - 560px)" height="calc(100vh - 560px)"
> >
<el-table-column type="index" label="序号" align="center" width="55" /> <el-table-column type="index" label="序号" align="center" width="55" />
<el-table-column prop="title" label="档案文件">
<el-table-column prop="title" label="附件名称">
<template> <template>
<div class="title-style"><span>文件</span>档号题名</div> <div class="title-style"><span>文件</span>档号题名</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="description" label="利用方式" width="340">
<template>
<el-checkbox-group v-model="checkList" class="checkbox-style">
<el-checkbox label="电子查看" disabled />
<el-checkbox label="下载" disabled />
<el-checkbox label="打印" disabled />
<el-checkbox label="实体借阅" disabled />
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column prop="createTime" label="实体借阅状态" align="center" width="110">
<template>
<div>
<span class="row-state soon-state">即将到期</span>
<!-- <span class="row-state end-state">利用中</span>
<span class="row-state cancel-state">已过期</span> -->
</div>
</template>
</el-table-column>
<el-table-column prop="title" label="格式" />
<el-table-column prop="title" label="大小" />
<el-table-column prop="title" label="操作者" />
<el-table-column prop="title" label="加入时间" />
</el-table> </el-table>
</div> </div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleCloseDialog">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
<OnlineAdd ref="onlineAdd" />
</div> </div>
</template> </template>
<script> <script>
import CRUD, { presenter, crud } from '@crud/crud' import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import crudOperation from '@crud/CRUD.operation'
import OnlineAdd from './onlineAdd'
import { upload } from '@/utils/upload'
import { mapGetters } from 'vuex'
export default { export default {
name: 'OnlineEditing', name: 'OnlineEditing',
components: { pagination, crudOperation },
components: { pagination, OnlineAdd },
mixins: [presenter(), crud()], mixins: [presenter(), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
url: 'api/log/initLog', url: 'api/log/initLog',
title: '在线编研', title: '在线编研',
optShow: { optShow: {
add: true,
edit: true,
del: true,
download: true,
add: false,
edit: false,
del: false,
download: false,
reset: false, reset: false,
group: false group: false
} }
@ -147,9 +157,18 @@ export default {
remark: '利用事由' remark: '利用事由'
}, },
detailArcData: [], detailArcData: [],
checkList: ['电子查看', '实体借阅']
checkList: ['电子查看', '实体借阅'],
onlineEditDetail: false,
onlineTabIndex: 0,
uploadVisible: false,
fileList: []
} }
}, },
computed: {
...mapGetters([
'baseApi'
])
},
watch: { watch: {
activeIndex: function(newValue, oldValue) { activeIndex: function(newValue, oldValue) {
console.log('newValue', newValue) console.log('newValue', newValue)
@ -163,14 +182,152 @@ export default {
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
this.crud.query.isType = this.activeIndex this.crud.query.isType = this.activeIndex
}, },
resetQuery() {
changeOnlineTab(data) {
this.onlineTabIndex = data
},
toAdd() {
this.$refs.onlineAdd.onlineTitle = '新增在线编研'
this.$refs.onlineAdd.onlineAddVisible = true
},
toEdit() {
this.$refs.onlineAdd.onlineTitle = '编辑在线编研'
this.$refs.onlineAdd.onlineAddVisible = true
}, },
tableDoubleClick(row) {
this.lendDetail = true
tableDoubleClick() {
this.onlineEditDetail = true
},
toDelete(data) {
if (data.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.$confirm('此操作将删除当前所选编研主题' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
console.log(params)
}).catch(() => {
})
},
//
doExport(data) {
if (data.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
console.log(params)
// exportFile(this.baseApi + '/api/collect/exportDate?' + qs.stringify(params, { indices: false }))
}).catch(() => {
})
},
toPublish(data) {
if (data.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.$confirm('此操作将发布当前所选文档' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
console.log(params)
}).catch(() => {
})
},
handleUpload() {
if (this.crud.selections.length !== 1) {
this.$message('只可勾选唯一目标条目,请先确认!')
return false
}
this.uploadVisible = true
},
handleFileChange(e) {
const files = e.target.files
this.file = files[0]
this.key++
const maxMessage = '上传文件大小不能超过 10MB,可使用大文件上传!'
const maxSize = 10 * 1024 * 1024
if (this.file && this.file.size > maxSize) {
this.$message.warning(maxMessage)
this.fileList = []
e.target.value = ''
return false
}
if (this.fileList.length !== 0) {
const existingFile = this.fileList.some(file => file.name === this.file.name)
if (existingFile) {
this.$message.warning('文件已存在')
return false
}
}
for (let i = 0; i < files.length; i++) {
if (this.uploadType === 2) {
this.fileList = []
this.fileList.push(files[i])
} else {
this.fileList.push(files[i])
}
}
},
handleUploadConfirm() {
if (this.fileList.length === 0) {
this.$message.info('请先选择相关文件!')
return false
}
//
upload(this.baseApi + '/api/collect/catalogUpload',
this.fileList[0]
).then(res => {
if (res.data.code === 200) {
// 200
// this.$message.success('' + res.data.data + '')
this.$message.success('操作成功')
// this.$emit('close-dialog')
this.uploadVisible = false
} else {
this.$message.error('操作失败!')
}
})
}, },
handleCloseDialog(done) { handleCloseDialog(done) {
this.lendDetail = false this.lendDetail = false
this.onlineEditDetail = false
// //
// done() // done()
} }

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

@ -48,6 +48,8 @@ export const collectionLibraryCrud = {
'archive_year': null, 'archive_year': null,
'fonds_no': null 'fonds_no': null
} }
console.log('page', this.page)
console.log('page1', this.$parent)
// 2 项目 3 案卷 /文件 4 卷内 6 文件 // 2 项目 3 案卷 /文件 4 卷内 6 文件
if (this.isTitleType === 2) { if (this.isTitleType === 2) {
this.parentsId = null this.parentsId = null
@ -81,7 +83,6 @@ export const collectionLibraryCrud = {
} }
} }
} }
setTimeout(() => { setTimeout(() => {
this.getViewTable(categoryLevel, this.parentsId, 'search') this.getViewTable(categoryLevel, this.parentsId, 'search')
}, 200) }, 200)
@ -138,6 +139,8 @@ export const collectionLibraryCrud = {
} }
if (type === 'search') { if (type === 'search') {
projectObj.projectData = res.list.content projectObj.projectData = res.list.content
projectObj.page.page = 1
projectObj.page.size = 10
projectObj.page.total = res.list.totalElements projectObj.page.total = res.list.totalElements
projectObj.getTableDisplayFieldsLoading = false projectObj.getTableDisplayFieldsLoading = false
} }
@ -153,6 +156,8 @@ export const collectionLibraryCrud = {
// 搜索/新增/编辑 非 案卷是主页的时候 // 搜索/新增/编辑 非 案卷是主页的时候
if (type === 'search') { if (type === 'search') {
anjuanObj.anjuanData = res.list.content anjuanObj.anjuanData = res.list.content
anjuanObj.page.page = 1
anjuanObj.page.size = 10
anjuanObj.page.total = res.list.totalElements anjuanObj.page.total = res.list.totalElements
anjuanObj.getTableDisplayFieldsLoading = false anjuanObj.getTableDisplayFieldsLoading = false
} }
@ -168,6 +173,8 @@ export const collectionLibraryCrud = {
} }
if (type === 'search') { if (type === 'search') {
wjObj.anjuanData = res.list.content wjObj.anjuanData = res.list.content
wjObj.page.page = 1
wjObj.page.size = 10
wjObj.page.total = res.list.totalElements wjObj.page.total = res.list.totalElements
wjObj.getTableDisplayFieldsLoading = false wjObj.getTableDisplayFieldsLoading = false
} }
@ -177,6 +184,8 @@ export const collectionLibraryCrud = {
this.page.total = res.list.totalElements this.page.total = res.list.totalElements
if (type === 'search') { if (type === 'search') {
this.parentsData.$refs.juanneiEle.junneiData = res.list.content this.parentsData.$refs.juanneiEle.junneiData = res.list.content
this.parentsData.$refs.juanneiEle.page.page = 1
this.parentsData.$refs.juanneiEle.page.size = 10
this.parentsData.$refs.juanneiEle.page.total = res.list.totalElements this.parentsData.$refs.juanneiEle.page.total = res.list.totalElements
this.parentsData.$refs.juanneiEle.getTableDisplayFieldsLoading = false this.parentsData.$refs.juanneiEle.getTableDisplayFieldsLoading = false
} }
@ -187,6 +196,8 @@ export const collectionLibraryCrud = {
this.page.total = res.list.totalElements this.page.total = res.list.totalElements
if (type === 'search') { if (type === 'search') {
this.parentsData.$refs.fileEle.fileData = res.list.content this.parentsData.$refs.fileEle.fileData = res.list.content
this.parentsData.$refs.fileEle.page.page = 1
this.parentsData.$refs.fileEle.page.size = 10
this.parentsData.$refs.fileEle.page.total = res.list.totalElements this.parentsData.$refs.fileEle.page.total = res.list.totalElements
this.parentsData.$refs.fileEle.getTableDisplayFieldsLoading = false this.parentsData.$refs.fileEle.getTableDisplayFieldsLoading = false
} }
@ -194,6 +205,7 @@ export const collectionLibraryCrud = {
} }
this.getTableDisplayFieldsLoading = false this.getTableDisplayFieldsLoading = false
this.crud.selections = [] this.crud.selections = []
if (categoryLevel === 3) { if (categoryLevel === 3) {
// 按件 // 按件
if (this.isTitleType === 3) { if (this.isTitleType === 3) {

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

@ -132,7 +132,7 @@
:collect-level="collectLevel" :collect-level="collectLevel"
@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>
@ -302,11 +302,7 @@ export default {
return '文件' return '文件'
} else { } else {
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
if (this.quickPaper) {
return '案卷'
} else {
return '文件' return '文件'
}
} else { } else {
return '案卷' return '案卷'
} }
@ -566,6 +562,7 @@ export default {
// //
handleClose(done) { handleClose(done) {
this.formVisible = false this.formVisible = false
this.quickPaper = false
done() done()
}, },
// //
@ -1079,7 +1076,6 @@ export default {
} }
this.quickPaperArcId = this.selections.map(item => item.id) this.quickPaperArcId = this.selections.map(item => item.id)
this.handleForm('add', 1) this.handleForm('add', 1)
}, },
// //
@ -1166,6 +1162,7 @@ export default {
}, },
closeDialog(data) { closeDialog(data) {
this.formVisible = false this.formVisible = false
this.quickPaper = false
setTimeout(() => { setTimeout(() => {
this.handleSearch(this.collectLevel) this.handleSearch(this.collectLevel)
}) })

2
src/views/collectReorganizi/collectionLibrary/module/quickPaper/index.vue

@ -88,7 +88,7 @@ export default {
this.form.date = '' this.form.date = ''
this.searchNumber = 0 this.searchNumber = 0
this.$nextTick(() => { this.$nextTick(() => {
this.$parent.handleForm('add')
this.$parent.handleForm('add', 1)
}) })
} else { } else {
console.log('error submit!!') console.log('error submit!!')

21
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue

@ -118,7 +118,8 @@ export default {
cmd5: '计算文件MD5中...' cmd5: '计算文件MD5中...'
}, },
fileList: [], fileList: [],
nowDate: null
nowDate: null,
submitted: false
} }
}, },
computed: { computed: {
@ -130,19 +131,29 @@ export default {
fileSuccess(rootFile, file, response, chunk) { fileSuccess(rootFile, file, response, chunk) {
this.chunkOffset = [] this.chunkOffset = []
const result = JSON.parse(response) const result = JSON.parse(response)
console.log(result)
console.log('result', result)
// //
// if (result.data.needMerge && !this.skip) { // if (result.data.needMerge && !this.skip) {
// } else { // } else {
// console.log('') // console.log('')
// } // }
if (result.code === 200) {
this.submitted = false
} else {
this.submitted = true
}
if (this.skip) { if (this.skip) {
this.skip = false this.skip = false
} }
}, },
handleUploadConfirm() { handleUploadConfirm() {
if (this.submitted) {
return
}
this.submitted = true
this.nowDate = getCurrentTime() this.nowDate = getCurrentTime()
const filePromises = this.fileList.map(async(item, index) => { const filePromises = this.fileList.map(async(item, index) => {
console.log(item)
const json = {} const json = {}
const jsonArray = [] const jsonArray = []
const jsonString = {} const jsonString = {}
@ -174,9 +185,14 @@ export default {
json.totalChunks = item.chunks.length - 1 json.totalChunks = item.chunks.length - 1
json.totalSize = item.size json.totalSize = item.size
json.fileJsonString = JSON.stringify(jsonArray) json.fileJsonString = JSON.stringify(jsonArray)
if (item.completed) {
return axios.post(this.baseApi + '/api/collect/merge', json, { headers: { return axios.post(this.baseApi + '/api/collect/merge', json, { headers: {
'Authorization': getToken() 'Authorization': getToken()
}}) }})
} else {
this.$message.error('请耐心等待文件上传完成后再保存!')
}
}) })
axios.all(filePromises) axios.all(filePromises)
.then(axios.spread((...responses) => { .then(axios.spread((...responses) => {
@ -191,6 +207,7 @@ export default {
} else { } else {
this.$message.error('上传失败') this.$message.error('上传失败')
} }
this.submitted = false
} }
})) }))
.catch(error => { .catch(error => {

53
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue

@ -267,59 +267,6 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
.upload-container{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 496px;
min-height: 178px;
padding: 12px;
border-radius: 3px;
background: #EDEFF3;
border: 1px dashed #BCC2C7;
.upload-icon{
font-size: 32px;
color: #1F55EB;
}
.el-upload__tip{
font-size: 12px;
color: #A6ADB6;
}
.file-list{
font-size: 12px;
line-height: 24px;
color: #545B65;
}
}
.upload-input{
position: relative;
margin-top: 16px;
width: 104px;
height: 32px;
& input{
position: absolute;
left: 0;
top: 0;
height: 32px;
opacity: 0;
}
}
.upload-zip{
width: 104px;
height: 32px;
line-height: 32px;
font-size: 14px;
color: #fff;
text-align: center;
border-radius: 3px;
background: #1F55EB;
& i{
font-size: 13px;
}
}
.collectUpload-dialog{ .collectUpload-dialog{
::v-deep .el-dialog{ ::v-deep .el-dialog{
width: 970px; width: 970px;

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

@ -69,7 +69,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="isDesFormType !== 'prearchiveLibrary' && isDesFormType !== 'mergeFile'" class="preview-form-bottom">
<el-row v-if="isDesFormType !== 'prearchiveLibrary' && isDesFormType !== 'mergeFile'" class="preview-form-bottom prearch-bottom">
<el-col v-for="(item,index) in formPreviewData" :key="index"> <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-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-radio-group v-model="addOrUpdateForm[item.fieldName]">
@ -696,6 +696,11 @@ export default {
this.$set(this.addOrUpdateForm, item.fieldName, '') this.$set(this.addOrUpdateForm, item.fieldName, '')
} }
} }
if (item.fieldName === 'is_entity') {
this.$set(this.addOrUpdateForm, item.fieldName, 1)
}
this.$set(this.rules, item.fieldName, [ this.$set(this.rules, item.fieldName, [
{ {
required: !!item.isRequired, required: !!item.isRequired,

Loading…
Cancel
Save