|
@ -5,32 +5,10 @@ |
|
|
<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: 126px" |
|
|
|
|
|
@change="crud.toQuery" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<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: 126px" @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> |
|
|
<rrOperation /> |
|
|
<rrOperation /> |
|
|
</div> |
|
|
</div> |
|
@ -52,7 +30,7 @@ |
|
|
<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"> |
|
|
<PreviewForm :is-disabled="false" /> |
|
|
|
|
|
|
|
|
<PreviewForm :is-disabled="false" :this-fields="form" /> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|
@ -83,17 +61,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<!--表格渲染--> |
|
|
<!--表格渲染--> |
|
|
<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"> |
|
|
<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> |
|
@ -133,7 +101,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { add, edit, getTableDisplayFields, getFormDisplayFields } from '@/api/archivesManage/archivesList' |
|
|
|
|
|
|
|
|
import { add, edit, del, getTableDisplayFields, getFormDisplayFields } from '@/api/archivesManage/archivesList' |
|
|
import CRUD, { presenter, header, form } from '@crud/crud' |
|
|
import CRUD, { presenter, header, form } from '@crud/crud' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
@ -151,13 +119,7 @@ export default { |
|
|
selectedCategory: { |
|
|
selectedCategory: { |
|
|
type: Object, |
|
|
type: Object, |
|
|
default: function() { |
|
|
default: function() { |
|
|
return { |
|
|
|
|
|
cnName: '', |
|
|
|
|
|
isType: '', |
|
|
|
|
|
parentName: '', |
|
|
|
|
|
isColumnLength: '', |
|
|
|
|
|
remark: '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return {} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -166,8 +128,8 @@ export default { |
|
|
CRUD({ |
|
|
CRUD({ |
|
|
title: '档案', |
|
|
title: '档案', |
|
|
url: 'api/archives/initArchivesView', |
|
|
url: 'api/archives/initArchivesView', |
|
|
query: { categoryId: 'FFAFBB1647D459C82080A', isdel: false }, |
|
|
|
|
|
crudMethod: { add, edit }, |
|
|
|
|
|
|
|
|
query: { isdel: false }, |
|
|
|
|
|
crudMethod: { add, edit, del }, |
|
|
optShow: { |
|
|
optShow: { |
|
|
add: true, |
|
|
add: true, |
|
|
edit: true, |
|
|
edit: true, |
|
@ -176,7 +138,7 @@ export default { |
|
|
download: true, |
|
|
download: true, |
|
|
group: false |
|
|
group: false |
|
|
}, |
|
|
}, |
|
|
// queryOnPresenterCreated: false, |
|
|
|
|
|
|
|
|
queryOnPresenterCreated: false, |
|
|
sort: ['department,asc'] |
|
|
sort: ['department,asc'] |
|
|
}) |
|
|
}) |
|
|
] |
|
|
] |
|
@ -221,18 +183,28 @@ export default { |
|
|
defaultForm: {} |
|
|
defaultForm: {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
selectedCategory: function(newValue, oldValue) { |
|
|
|
|
|
// 案卷 卷内 文件 |
|
|
|
|
|
if (newValue.isType === 3 || newValue.isType === 4 || newValue.isType === 5) { |
|
|
|
|
|
this.crud.query.categoryId = newValue.id |
|
|
|
|
|
this.crud.refresh() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
this.getTableDisplayFieldsLoading = true |
|
|
this.getTableDisplayFieldsLoading = true |
|
|
// 请求数据 |
|
|
// 请求数据 |
|
|
getTableDisplayFields({ categoryId: 'FFAFBB1647D459C82080A' }).then(data => { |
|
|
|
|
|
this.tableDisplayFields = data.filter((fields) => { return fields.isDisplay }) |
|
|
|
|
|
|
|
|
getTableDisplayFields({ categoryId: this.selectedCategory.id }).then(data => { |
|
|
|
|
|
this.tableDisplayFields = data |
|
|
this.getTableDisplayFieldsLoading = false |
|
|
this.getTableDisplayFieldsLoading = false |
|
|
return true |
|
|
return true |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
[CRUD.HOOK.beforeToCU]() { |
|
|
[CRUD.HOOK.beforeToCU]() { |
|
|
getFormDisplayFields({ categoryId: 'FFAFBB1647D459C82080A' }).then(data => { |
|
|
|
|
|
|
|
|
this.form.dictionaryConfigId = {} |
|
|
|
|
|
getFormDisplayFields({ categoryId: this.selectedCategory.id }).then(data => { |
|
|
this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput }) |
|
|
this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput }) |
|
|
this.formPreviewData.map(item => { |
|
|
this.formPreviewData.map(item => { |
|
|
this.rules[item.fieldName] = [ |
|
|
this.rules[item.fieldName] = [ |
|
@ -247,15 +219,8 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.crud.defaultForm[item.fieldName] = null |
|
|
this.crud.defaultForm[item.fieldName] = null |
|
|
} |
|
|
} |
|
|
if (item.sysDictionaryId) { |
|
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
|
// // 加载数据字典 |
|
|
|
|
|
// this.getDict(item.sysDictionaryId) |
|
|
|
|
|
// }) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
this.crud.defaultForm.categoryId = 'FFAFBB1647D459C82080A' |
|
|
|
|
|
this.form.categoryId = 'FFAFBB1647D459C82080A' |
|
|
|
|
|
|
|
|
this.form.categoryId = this.selectedCategory.id |
|
|
return true |
|
|
return true |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|