|
@ -5,16 +5,16 @@ |
|
|
<div class="elect-cont-left"> |
|
|
<div class="elect-cont-left"> |
|
|
<TreeList ref="treeList" @nodeClick="handleNodeClick" /> |
|
|
<TreeList ref="treeList" @nodeClick="handleNodeClick" /> |
|
|
</div> |
|
|
</div> |
|
|
<div class="elect-cont-right"> |
|
|
|
|
|
|
|
|
<div v-if="selectedDocument.isType!==1" class="elect-cont-right"> |
|
|
<!--工具栏--> |
|
|
<!--工具栏--> |
|
|
<div class="head-container"> |
|
|
|
|
|
<div class="head-search"> |
|
|
|
|
|
|
|
|
<div class="head-container" :style="isRecycle?'display:flex;justify-content: space-between; align-items: center;':'' "> |
|
|
|
|
|
<div class="head-search" :style="isRecycle?'margin: 0;':''"> |
|
|
<!-- 搜索 --> |
|
|
<!-- 搜索 --> |
|
|
<el-input v-model="query.search" clearable size="small" placeholder="输入题名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" /> |
|
|
<el-input v-model="query.search" clearable size="small" placeholder="输入题名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" /> |
|
|
<rrOperation /> |
|
|
<rrOperation /> |
|
|
<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> |
|
|
</div> |
|
|
</div> |
|
|
<crudOperation :permission="permission"> |
|
|
|
|
|
|
|
|
<crudOperation v-if="!isRecycle" :permission="permission"> |
|
|
<template v-slot:left> |
|
|
<template v-slot:left> |
|
|
<!-- 新增 --> |
|
|
<!-- 新增 --> |
|
|
<el-button size="mini" @click="handleForm('add')"><i class="iconfont icon-xinzeng" />新增</el-button> |
|
|
<el-button size="mini" @click="handleForm('add')"><i class="iconfont icon-xinzeng" />新增</el-button> |
|
@ -33,6 +33,10 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</crudOperation> |
|
|
</crudOperation> |
|
|
|
|
|
<div v-if="isRecycle"> |
|
|
|
|
|
<el-button size="mini" type="success" @click="toRecover"><i class="iconfont icon-huifu" />恢复</el-button> |
|
|
|
|
|
<el-button size="mini" type="success" @click="toCompletelyDelete"><i class="iconfont icon-shanchu" />彻底删除</el-button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!--表格渲染--> |
|
|
<!--表格渲染--> |
|
|
<div class="container-right"> |
|
|
<div class="container-right"> |
|
@ -63,14 +67,20 @@ |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
</template> |
|
|
</template> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row[field.fieldName] }} |
|
|
|
|
|
|
|
|
<!-- 仅针对read_type字段添加特殊处理 --> |
|
|
|
|
|
<span |
|
|
|
|
|
v-if="field.fieldName === 'read_type'" |
|
|
|
|
|
:class="{ |
|
|
|
|
|
'row-state row-packing': scope.row.read_type === '未传阅', |
|
|
|
|
|
'row-state row-warehousing state-active': scope.row.read_type === '传阅中', |
|
|
|
|
|
'row-state row-binding state-active': scope.row.read_type === '已完成', |
|
|
|
|
|
}" |
|
|
|
|
|
> |
|
|
|
|
|
{{ scope.row[field.fieldName] }} |
|
|
|
|
|
</span> |
|
|
|
|
|
<span v-else>{{ scope.row[field.fieldName] }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<!-- <el-table-column label="传阅状态" width="88" align="center" fixed="right"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :class="['row-state', 'row-packing', scope.row.read_type !== '未传阅' ? 'state-active' : '' ]">{{ scope.row.read_type }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
</el-table> |
|
|
</el-table> |
|
|
<!--分页组件--> |
|
|
<!--分页组件--> |
|
|
<pagination v-if="crud.data.length !== 0" /> |
|
|
<pagination v-if="crud.data.length !== 0" /> |
|
@ -129,7 +139,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 from '@/api/system/documentArchives' |
|
|
|
|
|
|
|
|
import crudDocumentArchives, { FetchDelArchives } from '@/api/system/documentArchives' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
@ -166,6 +176,16 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mixins: [presenter(), header(), miodLibraryCrud], |
|
|
mixins: [presenter(), header(), miodLibraryCrud], |
|
|
|
|
|
props: { |
|
|
|
|
|
isRecycle: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: false |
|
|
|
|
|
}, |
|
|
|
|
|
isdel: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: false |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
archivesBtnLoading: false, |
|
|
archivesBtnLoading: false, |
|
@ -198,6 +218,12 @@ export default { |
|
|
'baseApi' |
|
|
'baseApi' |
|
|
]) |
|
|
]) |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
isdel: function(newValue, oldValue) { |
|
|
|
|
|
}, |
|
|
|
|
|
isRecycle: function(newValue, oldValue) { |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -226,7 +252,8 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.crud.query.documentId = this.selectedDocument.documentId |
|
|
this.crud.query.documentId = this.selectedDocument.documentId |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.crud.query.isdel = this.isdel |
|
|
|
|
|
// this.crud.query.ignore = false |
|
|
this.crud.query.fondsAffiliation = this.selectedDocument.fondsId |
|
|
this.crud.query.fondsAffiliation = this.selectedDocument.fondsId |
|
|
this.crud.query.sort = this.arrySort |
|
|
this.crud.query.sort = this.arrySort |
|
|
}, |
|
|
}, |
|
@ -256,7 +283,6 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.crud.query.isdel = false |
|
|
|
|
|
if (this.selectedDocument.isType === 3) { |
|
|
if (this.selectedDocument.isType === 3) { |
|
|
this.crud.query.docDepartment = this.selectedDocument.label |
|
|
this.crud.query.docDepartment = this.selectedDocument.label |
|
|
this.crud.query.archiveYear = null |
|
|
this.crud.query.archiveYear = null |
|
@ -273,33 +299,6 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 著录界面-form/详情-api |
|
|
|
|
|
// handleForm(type) { |
|
|
|
|
|
// this.selectedCategory = this.selectedDocument |
|
|
|
|
|
// this.isDesFormType = 'miodLibrary' |
|
|
|
|
|
// let documentId |
|
|
|
|
|
// if (this.selectedDocument.isType === 2) { |
|
|
|
|
|
// documentId = this.selectedDocument.id |
|
|
|
|
|
// } else { |
|
|
|
|
|
// documentId = this.selectedDocument.documentId |
|
|
|
|
|
// } |
|
|
|
|
|
// let params |
|
|
|
|
|
// if (type === 'add') { |
|
|
|
|
|
// this.formTitle = '新增文件' |
|
|
|
|
|
// params = { |
|
|
|
|
|
// documentId: documentId, |
|
|
|
|
|
// archivesId: null |
|
|
|
|
|
// } |
|
|
|
|
|
// } else if (type === 'edit') { |
|
|
|
|
|
// this.formTitle = '编辑文件' |
|
|
|
|
|
// this.arcId = this.crud.selections[0].id |
|
|
|
|
|
// params = { |
|
|
|
|
|
// documentId: documentId, |
|
|
|
|
|
// archivesId: this.crud.selections[0].id |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// this.getFormInfo(params, type) |
|
|
|
|
|
// }, |
|
|
|
|
|
handleForm(type) { |
|
|
handleForm(type) { |
|
|
const { selectedDocument, crud } = this |
|
|
const { selectedDocument, crud } = this |
|
|
|
|
|
|
|
@ -324,12 +323,6 @@ export default { |
|
|
this.formTitle = '新增文件' |
|
|
this.formTitle = '新增文件' |
|
|
params.archivesId = null |
|
|
params.archivesId = null |
|
|
} else if (type === 'edit') { |
|
|
} else if (type === 'edit') { |
|
|
// 防御 selections 不存在或为空数组 |
|
|
|
|
|
if (!crud || !Array.isArray(crud.selections) || crud.selections.length === 0) { |
|
|
|
|
|
console.warn('当前无选中项,无法执行编辑') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.formTitle = '编辑文件' |
|
|
this.formTitle = '编辑文件' |
|
|
const { id: archivesId } = crud.selections[0] |
|
|
const { id: archivesId } = crud.selections[0] |
|
|
this.arcId = archivesId |
|
|
this.arcId = archivesId |
|
@ -355,7 +348,6 @@ export default { |
|
|
if (data.fileecho) { |
|
|
if (data.fileecho) { |
|
|
const fileecho = [] |
|
|
const fileecho = [] |
|
|
fileecho.push(data.fileecho) |
|
|
fileecho.push(data.fileecho) |
|
|
// this.$refs.previewForm.addOrUpdateForm.fileOriginal = fileecho[0].file_name |
|
|
|
|
|
this.$refs.previewForm.fileOriginal = fileecho[0].file_name |
|
|
this.$refs.previewForm.fileOriginal = fileecho[0].file_name |
|
|
this.$refs.previewForm.fileJsonString = JSON.stringify(fileecho) |
|
|
this.$refs.previewForm.fileJsonString = JSON.stringify(fileecho) |
|
|
} else { |
|
|
} else { |
|
@ -403,14 +395,27 @@ export default { |
|
|
datas.forEach(val => { |
|
|
datas.forEach(val => { |
|
|
ids.push(val.id) |
|
|
ids.push(val.id) |
|
|
}) |
|
|
}) |
|
|
|
|
|
let documentId |
|
|
|
|
|
if (this.selectedDocument.isType === 2) { |
|
|
|
|
|
documentId = this.selectedDocument.id |
|
|
|
|
|
} else { |
|
|
|
|
|
documentId = this.selectedDocument.documentId |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const params = { |
|
|
const params = { |
|
|
'documentId': this.selectedDocument.id, |
|
|
|
|
|
'ids': ids |
|
|
|
|
|
|
|
|
'documentId': documentId, |
|
|
|
|
|
'archivesIds': ids |
|
|
} |
|
|
} |
|
|
crudDocumentArchives.del(params).then(() => { |
|
|
|
|
|
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FetchDelArchives(params).then((res) => { |
|
|
|
|
|
console.log('res', res) |
|
|
|
|
|
if (res.code !== 500) { |
|
|
|
|
|
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
|
|
this.crud.refresh() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.crud.notify('删除失败', CRUD.NOTIFICATION_TYPE.ERROR) |
|
|
|
|
|
} |
|
|
this.crud.delAllLoading = false |
|
|
this.crud.delAllLoading = false |
|
|
this.crud.refresh() |
|
|
|
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
this.crud.delAllLoading = false |
|
|
this.crud.delAllLoading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
@ -453,7 +458,6 @@ export default { |
|
|
this.$refs.previewForm.$refs['addOrUpdateForm'].clearValidate() |
|
|
this.$refs.previewForm.$refs['addOrUpdateForm'].clearValidate() |
|
|
this.$refs.previewForm.$refs['addOrUpdateForm'].resetFields() |
|
|
this.$refs.previewForm.$refs['addOrUpdateForm'].resetFields() |
|
|
} |
|
|
} |
|
|
this.refreshData() |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|