|
@ -1,28 +1,39 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="rrr"> |
|
|
|
|
|
|
|
|
<div> |
|
|
<!--工具栏--> |
|
|
<!--工具栏--> |
|
|
<div class="head-container"> |
|
|
<div class="head-container"> |
|
|
<div class="head-archives-top"> |
|
|
<div class="head-archives-top"> |
|
|
<div class="head-search"> |
|
|
<div class="head-search"> |
|
|
<!-- 搜索 --> |
|
|
<!-- 搜索 --> |
|
|
<el-input v-model="query.blurry" clearable size="small" placeholder="请输入关键词" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" /> |
|
|
|
|
|
<el-select v-model="query.enabled" clearable size="small" placeholder="状态" class="filter-item" style="width: 100px" @change="crud.toQuery"> |
|
|
|
|
|
|
|
|
<el-select v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" v-model="query.enabled" clearable size="small" placeholder="状态" class="filter-item" style="width: 100px" @change="crud.toQuery"> |
|
|
<i slot="prefix" class="iconfont icon-zhuangtai-fanbai" /> |
|
|
<i slot="prefix" class="iconfont icon-zhuangtai-fanbai" /> |
|
|
<el-option v-for="item in stateOptions" :key="item.key" :label="item.label" :value="item.key" /> |
|
|
<el-option v-for="item in stateOptions" :key="item.key" :label="item.label" :value="item.key" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
|
|
|
<el-input v-model="query[inputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @keyup.enter.native="crud.toQuery"> |
|
|
|
|
|
<el-select slot="prepend" v-model="inputSelect" style="width: 80px" @change="querySelect"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in queryOption" |
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-input> |
|
|
<rrOperation /> |
|
|
<rrOperation /> |
|
|
</div> |
|
|
</div> |
|
|
<el-checkbox v-model="fixedStatusBar">隐藏固定状态栏</el-checkbox> |
|
|
|
|
|
|
|
|
<el-checkbox v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" v-model="fixedStatusBar">隐藏固定状态栏</el-checkbox> |
|
|
</div> |
|
|
</div> |
|
|
<crudOperation :permission="permission"> |
|
|
<crudOperation :permission="permission"> |
|
|
<template v-slot:right> |
|
|
<template v-slot:right> |
|
|
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">删除</el-button> |
|
|
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">删除</el-button> |
|
|
<el-button v-permission="permission.download" :loading="crud.downloadLoading" :disabled="!crud.data.length" size="mini" icon="el-icon-download" @click="crud.doExport">导出</el-button> |
|
|
|
|
|
|
|
|
<el-button v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" v-permission="permission.download" :loading="crud.downloadLoading" :disabled="!crud.data.length" size="mini" icon="el-icon-download" @click="crud.doExport">导出</el-button> |
|
|
|
|
|
<el-button v-if="selectedCategory.isType === 4 || selectedCategory.isType === 5" :disabled="crud.selections.length !== 1" size="mini" icon="el-icon-download" @click="uploadFile">上传附件</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template v-slot:rightButtonGroup> |
|
|
<template v-slot:rightButtonGroup> |
|
|
<div class="archives-handler-btn"> |
|
|
|
|
|
|
|
|
<div v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" class="archives-handler-btn"> |
|
|
<el-button class="packing-btn iconfont icon-weibiaoti-2" type="primary">装盒</el-button> |
|
|
<el-button class="packing-btn iconfont icon-weibiaoti-2" type="primary">装盒</el-button> |
|
|
<el-button class="warehousing-btn iconfont icon-weibiaoti-2" type="primary">入库</el-button> |
|
|
|
|
|
|
|
|
<el-button v-if="selectedCategory.isType === 3" class="part-btn iconfont icon-weibiaoti-2" type="primary">分卷装盒</el-button> |
|
|
|
|
|
<!-- <el-button class="warehousing-btn iconfont icon-weibiaoti-2" type="primary">入库</el-button> --> |
|
|
<el-button class="lending-btn iconfont icon-weibiaoti-2" type="primary">借阅</el-button> |
|
|
<el-button class="lending-btn iconfont icon-weibiaoti-2" type="primary">借阅</el-button> |
|
|
<el-button class="binding-btn iconfont icon-weibiaoti-2" type="primary">绑定标签</el-button> |
|
|
<el-button class="binding-btn iconfont icon-weibiaoti-2" type="primary">绑定标签</el-button> |
|
|
</div> |
|
|
</div> |
|
@ -34,20 +45,26 @@ |
|
|
<span class="dialog-right-top" /> |
|
|
<span class="dialog-right-top" /> |
|
|
<span class="dialog-left-bottom" /> |
|
|
<span class="dialog-left-bottom" /> |
|
|
<div class="setting-dialog"> |
|
|
<div class="setting-dialog"> |
|
|
<!-- tab --> |
|
|
|
|
|
<ul class="archives-tab"> |
|
|
|
|
|
<li :class="{'active': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li> |
|
|
|
|
|
<li v-if="isEditOrAdd !== 'add'" :class="{'active': archivesTabIndex == 1}" @click="changeActiveTab(1)">上传附件</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
<!-- form --> |
|
|
<!-- form --> |
|
|
<PreviewForm v-if="formPreviewData.length && archivesTabIndex == 0" ref="previewForm" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :arc-id="arcId" /> |
|
|
<PreviewForm v-if="formPreviewData.length && archivesTabIndex == 0" ref="previewForm" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :arc-id="arcId" /> |
|
|
<!-- 上传附件 --> |
|
|
|
|
|
<UploadFile v-if="archivesTabIndex==1" /> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="handlerArchivesSubmit">保存</el-button> |
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="handlerArchivesSubmit">保存</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 上传附件 --> |
|
|
|
|
|
<el-dialog class="upload-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible.sync="uploadFileVisible" title="上传附件"> |
|
|
|
|
|
<span class="dialog-right-top" /> |
|
|
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
|
|
<div class="setting-dialog"> |
|
|
|
|
|
<UploadFile :is-upload-detail="true" /> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="uploadFileSave">保存</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 删除档案 --> |
|
|
<!-- 删除档案 --> |
|
|
<el-dialog title="删除档案" :visible.sync="deleteVisible" :before-close="handleClose"> |
|
|
<el-dialog title="删除档案" :visible.sync="deleteVisible" :before-close="handleClose"> |
|
|
<span class="dialog-right-top" /> |
|
|
<span class="dialog-right-top" /> |
|
@ -66,8 +83,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- table表格渲染 --> |
|
|
<!-- table表格渲染 --> |
|
|
<el-table ref="table" v-loading="crud.loading || getTableDisplayFieldsLoading" class="archives-table" :data="crud.data" highlight-current-row style="width: 100%; " height="calc(100vh - 370px)" @selection-change="crud.selectionChangeHandler" @row-click="clickRowHandler"> |
|
|
|
|
|
|
|
|
<el-table ref="table" v-loading="crud.loading || getTableDisplayFieldsLoading" class="archives-table" :data="crud.data" highlight-current-row style="width: 100%; " height="calc(100vh - 370px)" @selection-change="crud.selectionChangeHandler" @row-click="clickRowHandler" @cell-dblclick="tableDoubleClick"> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column type="selection" 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 v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> |
|
|
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> |
|
@ -75,26 +93,26 @@ |
|
|
{{ scope.row[field.fieldName] }} |
|
|
{{ scope.row[field.fieldName] }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="装盒" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
|
|
|
|
|
|
<el-table-column v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" label="装盒" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
<!-- state-active 已装/已入/已借/已绑 --> |
|
|
<!-- state-active 已装/已入/已借/已绑 --> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- 未装 / 已装 --> |
|
|
<!-- 未装 / 已装 --> |
|
|
<span class="row-state row-packing state-active">{{ scope.row.case_no ? '已装': '未装' }}</span> |
|
|
<span class="row-state row-packing state-active">{{ scope.row.case_no ? '已装': '未装' }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
|
|
|
|
|
|
<el-table-column v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
<template slot-scope=""> |
|
|
<template slot-scope=""> |
|
|
<!-- 未入 / 已入 --> |
|
|
<!-- 未入 / 已入 --> |
|
|
<span class="row-state row-warehousing">未入</span> |
|
|
<span class="row-state row-warehousing">未入</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="借阅" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
|
|
|
|
|
|
<el-table-column v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" label="借阅" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
<template slot-scope=""> |
|
|
<template slot-scope=""> |
|
|
<!-- 待借 / 不可借-用“—” 表示 / 已借 --> |
|
|
<!-- 待借 / 不可借-用“—” 表示 / 已借 --> |
|
|
<span class="row-state row-lending">—</span> |
|
|
<span class="row-state row-lending">—</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="标签" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
|
|
|
|
|
|
<el-table-column v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" label="标签" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- 未绑 / 已绑 --> |
|
|
<!-- 未绑 / 已绑 --> |
|
|
<span class="row-state row-binding">{{ scope.row.tid ? '已绑': '未绑' }}</span> |
|
|
<span class="row-state row-binding">{{ scope.row.tid ? '已绑': '未绑' }}</span> |
|
@ -103,21 +121,35 @@ |
|
|
</el-table> |
|
|
</el-table> |
|
|
<!--分页组件--> |
|
|
<!--分页组件--> |
|
|
<pagination /> |
|
|
<pagination /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 删除档案 --> |
|
|
|
|
|
<el-dialog class="upload-dialog" title="档案详情" :visible.sync="archivesInfoVisible" :before-close="handleClose"> |
|
|
|
|
|
<span class="dialog-right-top" /> |
|
|
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
|
|
<div class="setting-dialog"> |
|
|
|
|
|
<ArchivesInfo /> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { add, edit, del, getTableDisplayFields, getFormDisplayFields } from '@/api/archivesManage/archivesList' |
|
|
import { add, edit, del, getTableDisplayFields, getFormDisplayFields } from '@/api/archivesManage/archivesList' |
|
|
import CRUD, { presenter, header, form, crud } from '@crud/crud' |
|
|
|
|
|
|
|
|
import CRUD, { presenter, header, form } from '@crud/crud' |
|
|
import { initData } from '@/api/data' |
|
|
import { initData } from '@/api/data' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
|
import PreviewForm from '@/views/components/category/PreviewForm' |
|
|
import PreviewForm from '@/views/components/category/PreviewForm' |
|
|
import UploadFile from './module/uploadFile' |
|
|
import UploadFile from './module/uploadFile' |
|
|
|
|
|
import ArchivesInfo from './module/archivesInfo' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { crudOperation, rrOperation, pagination, PreviewForm, UploadFile }, |
|
|
|
|
|
|
|
|
components: { crudOperation, rrOperation, pagination, PreviewForm, UploadFile, ArchivesInfo }, |
|
|
mixins: [ |
|
|
mixins: [ |
|
|
presenter(), |
|
|
presenter(), |
|
|
header(), |
|
|
header(), |
|
@ -161,6 +193,12 @@ export default { |
|
|
{ key: '5', label: '待借' }, |
|
|
{ key: '5', label: '待借' }, |
|
|
{ key: '6', label: '已借' } |
|
|
{ key: '6', label: '已借' } |
|
|
], |
|
|
], |
|
|
|
|
|
queryOption: [ |
|
|
|
|
|
{ value: 'maintitle', label: '题名' }, |
|
|
|
|
|
{ value: 'archive_no', label: '档号' }, |
|
|
|
|
|
{ value: 'archive_year', label: '年度' } |
|
|
|
|
|
], |
|
|
|
|
|
inputSelect: '', |
|
|
permission: { |
|
|
permission: { |
|
|
add: ['admin', 'archivesList:add'], |
|
|
add: ['admin', 'archivesList:add'], |
|
|
edit: ['admin', 'archivesList:edit'], |
|
|
edit: ['admin', 'archivesList:edit'], |
|
@ -178,7 +216,9 @@ export default { |
|
|
archivesTabIndex: 0, // 新增 |
|
|
archivesTabIndex: 0, // 新增 |
|
|
tabDisabled: true, |
|
|
tabDisabled: true, |
|
|
arcId: null, // 档案ID |
|
|
arcId: null, // 档案ID |
|
|
arrySort: [] |
|
|
|
|
|
|
|
|
arrySort: [], |
|
|
|
|
|
uploadFileVisible: false, // 上传附件 |
|
|
|
|
|
archivesInfoVisible: false // 档案详情 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
@ -193,48 +233,50 @@ export default { |
|
|
this.doLayout() |
|
|
this.doLayout() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
created() { |
|
|
|
|
|
// 初始化带select的输入框的 - 搜索 |
|
|
|
|
|
this.inputSelect = this.queryOption[0].value |
|
|
|
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 获取数据前设置默认参数 |
|
|
|
|
|
// [CRUD.HOOK.beforeRefresh]() { |
|
|
|
|
|
// this.crud.query.id = this.dicPid |
|
|
|
|
|
// }, |
|
|
|
|
|
// [CRUD.HOOK.afterRefresh](crud) { |
|
|
|
|
|
// console.log(this.curd) |
|
|
|
|
|
// // if (this.needRefreshTree) { |
|
|
|
|
|
// // this.$emit('treeRefresh', crud.data) |
|
|
|
|
|
// // } |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
// 搜索-select |
|
|
|
|
|
querySelect(val) { |
|
|
|
|
|
this.inputSelect = val |
|
|
|
|
|
}, |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
this.getTableDisplayFieldsLoading = true |
|
|
this.getTableDisplayFieldsLoading = true |
|
|
// 档案列表获取显示列 |
|
|
// 档案列表获取显示列 |
|
|
getTableDisplayFields({ categoryId: this.selectedCategory.id }).then(data => { |
|
|
getTableDisplayFields({ categoryId: this.selectedCategory.id }).then(data => { |
|
|
this.tableDisplayFields = data |
|
|
this.tableDisplayFields = data |
|
|
this.getTableDisplayFieldsLoading = false |
|
|
this.getTableDisplayFieldsLoading = false |
|
|
|
|
|
|
|
|
this.tableDisplayFields.map(item => { |
|
|
this.tableDisplayFields.map(item => { |
|
|
if (item.displayOrder) { |
|
|
|
|
|
|
|
|
if (item.queue) { |
|
|
this.arrySort.push(item.fieldName + ', ' + (item.displayOrder === 1 ? 'asc' : 'desc')) |
|
|
this.arrySort.push(item.fieldName + ', ' + (item.displayOrder === 1 ? 'asc' : 'desc')) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
console.log(this.arrySort) |
|
|
|
|
|
this.crud.sort = this.arrySort |
|
|
this.crud.sort = this.arrySort |
|
|
new Promise((resolve, reject) => { |
|
|
new Promise((resolve, reject) => { |
|
|
crud.loading = true |
|
|
|
|
|
|
|
|
this.crud.loading = true |
|
|
// 请求数据 |
|
|
// 请求数据 |
|
|
initData(crud.url, crud.getQueryParams()).then(data => { |
|
|
|
|
|
const table = crud.getTable() |
|
|
|
|
|
|
|
|
initData(this.crud.url, this.crud.getQueryParams()).then(data => { |
|
|
|
|
|
const table = this.crud.getTable() |
|
|
if (table && table.lazy) { // 懒加载子节点数据,清掉已加载的数据 |
|
|
if (table && table.lazy) { // 懒加载子节点数据,清掉已加载的数据 |
|
|
table.store.states.treeData = {} |
|
|
table.store.states.treeData = {} |
|
|
table.store.states.lazyTreeNodeMap = {} |
|
|
table.store.states.lazyTreeNodeMap = {} |
|
|
} |
|
|
} |
|
|
crud.page.total = data.totalElements !== null ? data.totalElements : data.length |
|
|
|
|
|
crud.data = data.content ? data.content : data |
|
|
|
|
|
crud.resetDataStatus() |
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
|
if (data) { |
|
|
|
|
|
this.crud.page.total = data.totalElements !== null ? data.totalElements : data.length |
|
|
|
|
|
this.crud.data = data.content ? data.content : data |
|
|
|
|
|
this.crud.resetDataStatus() |
|
|
|
|
|
resolve(data) |
|
|
|
|
|
// time 毫秒后显示表格 |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.crud.loading = false |
|
|
|
|
|
}, this.crud.time) |
|
|
|
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
crud.loading = false |
|
|
|
|
|
|
|
|
this.crud.loading = false |
|
|
reject(err) |
|
|
reject(err) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
@ -255,23 +297,38 @@ export default { |
|
|
this.form.dictionaryConfigId = {} |
|
|
this.form.dictionaryConfigId = {} |
|
|
this.formPreviewData = [] |
|
|
this.formPreviewData = [] |
|
|
// 档案预编辑获取字段 |
|
|
// 档案预编辑获取字段 |
|
|
getFormDisplayFields({ categoryId: this.selectedCategory.id }).then(data => { |
|
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
categoryId: this.selectedCategory.id, |
|
|
|
|
|
archivesId: this.arcId |
|
|
|
|
|
} |
|
|
|
|
|
this.getFormInfo(params) |
|
|
|
|
|
}, |
|
|
|
|
|
// 著录界面-form/详情-api |
|
|
|
|
|
getFormInfo(params) { |
|
|
|
|
|
getFormDisplayFields(params).then(data => { |
|
|
// this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput }) |
|
|
// this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput }) |
|
|
this.formPreviewData = data.showFiled |
|
|
this.formPreviewData = data.showFiled |
|
|
this.form.categoryId = this.selectedCategory.id |
|
|
this.form.categoryId = this.selectedCategory.id |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
if (this.isEditOrAdd === 'edit') { |
|
|
if (this.isEditOrAdd === 'edit') { |
|
|
this.$refs.previewForm.addOrUpdateForm = this.selectedData[0] |
|
|
|
|
|
|
|
|
this.$refs.previewForm.addOrUpdateForm = data.echo |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
changeActiveTab(index) { |
|
|
|
|
|
this.archivesTabIndex = index |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// form - submit |
|
|
handlerArchivesSubmit() { |
|
|
handlerArchivesSubmit() { |
|
|
this.$refs.previewForm.submitForm('addOrUpdateForm') |
|
|
this.$refs.previewForm.submitForm('addOrUpdateForm') |
|
|
}, |
|
|
}, |
|
|
|
|
|
// table - 双击查看详情 |
|
|
|
|
|
tableDoubleClick(row) { |
|
|
|
|
|
this.archivesInfoVisible = true |
|
|
|
|
|
const params = { |
|
|
|
|
|
categoryId: this.selectedCategory.id, |
|
|
|
|
|
archivesId: row.id |
|
|
|
|
|
} |
|
|
|
|
|
this.getFormInfo(params) |
|
|
|
|
|
}, |
|
|
// table - 当前选中得row |
|
|
// table - 当前选中得row |
|
|
clickRowHandler(row) { |
|
|
clickRowHandler(row) { |
|
|
this.$refs.table.toggleRowSelection(row) |
|
|
this.$refs.table.toggleRowSelection(row) |
|
@ -315,6 +372,12 @@ export default { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs.table.doLayout() |
|
|
this.$refs.table.doLayout() |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
uploadFile() { |
|
|
|
|
|
this.uploadFileVisible = true |
|
|
|
|
|
}, |
|
|
|
|
|
uploadFileSave() { |
|
|
|
|
|
this.uploadFileVisible = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -324,14 +387,11 @@ export default { |
|
|
@import "~@/assets/styles/archives-manage.scss"; |
|
|
@import "~@/assets/styles/archives-manage.scss"; |
|
|
.preview-dialog { |
|
|
.preview-dialog { |
|
|
::v-deep .el-dialog { |
|
|
::v-deep .el-dialog { |
|
|
width: 940px !important; |
|
|
|
|
|
.el-dialog__body{ |
|
|
.el-dialog__body{ |
|
|
padding: 0; |
|
|
padding: 0; |
|
|
height: calc(100vh - 174px); |
|
|
|
|
|
} |
|
|
} |
|
|
.preview-content { |
|
|
.preview-content { |
|
|
width: auto !important; |
|
|
width: auto !important; |
|
|
padding: 20px 144px 0 150px!important; |
|
|
|
|
|
margin-right: 6px; |
|
|
margin-right: 6px; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
@ -340,12 +400,9 @@ export default { |
|
|
background-color: transparent; |
|
|
background-color: transparent; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.el-dialog__header { |
|
|
|
|
|
width: 420px; |
|
|
|
|
|
} |
|
|
|
|
|
.dialog-footer{ |
|
|
.dialog-footer{ |
|
|
margin: 0 auto; |
|
|
margin: 0 auto; |
|
|
padding: 15px 0 30px 0; |
|
|
|
|
|
|
|
|
padding: 15px 0 20px 0; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|