Browse Source

档案门类管理/归档章设置/公共筛选

master
xuhuajiao 2 years ago
parent
commit
962617c8f3
  1. 8
      src/assets/styles/mixin.scss
  2. 25
      src/assets/styles/yxk-admin.scss
  3. 219
      src/views/system/archivesCategory/archiveSealSetting/index.vue
  4. 154
      src/views/system/archivesCategory/archiveSealSetting/module/form.vue
  5. 117
      src/views/system/archivesCategory/form.vue
  6. 25
      src/views/system/archivesCategory/index.vue
  7. 141
      src/views/system/archivesCategory/publicScreening/index.vue
  8. 31
      src/views/system/archivesCategory/sortDialog.vue

8
src/assets/styles/mixin.scss

@ -574,10 +574,10 @@
}
@mixin switch-disabled{
[data-theme="dark"] &{
border-color: rgb(64, 158, 255);
background-color: rgb(64, 158, 255);
}
// [data-theme="dark"] &{
// border-color: rgb(64, 158, 255);
// background-color: rgb(64, 158, 255);
// }
[data-theme="light"] & {
border-color: #D6DBE7 !important;
background-color: #D6DBE7 !important;

25
src/assets/styles/yxk-admin.scss

@ -1503,8 +1503,6 @@ input[type ='number'] {
@include switch-disabled;
}
.vue-treeselect--open-below .vue-treeselect__menu{
padding: 6px 0;
top: 4px !important;
@ -1603,3 +1601,26 @@ input[type ='number'] {
@include tree_children_icon_font;
}
}
// 归档章设置
.format-style{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
width: 300px;
height: 80px;
border-left: 1px solid #E6E8ED;
border-top: 1px solid #E6E8ED;
span{
display: block;
width: 100px;
height: 40px;
margin-left: -1px;
margin-top: -1px;
line-height: 40px;
text-align: center;
border: 1px solid #E6E8ED;
border-left: none;
border-top: none;
}
}

219
src/views/system/archivesCategory/archiveSealSetting/index.vue

@ -1,14 +1,63 @@
<template>
<div>
归档章设置
<div class="setting-contanier">
<div class="chapter-tip">
<p>注意</p>
<span>档号章一般盖在归档文件首页上端居中的空白位置如果位置被占用可将盖在首页上端其他空白处居左或居右</span>
</div>
<div class="chapter-setting">
<div class="chapter-format">
<div class="chapter-item">
<p class="item-title">归档章版式</p>
<span class="item-selected">默认版式</span>
</div>
<div class="chapter-item">
<p class="item-title">预览</p>
<div class="format-style">
<span>全宗号</span>
<span>年度</span>
<span>件号</span>
<span>机构(问题)</span>
<span>保管期限</span>
<span>页数</span>
</div>
</div>
</div>
<div class="chapter-position">
<div class="chapter-item">
<p class="item-title">归档章位置</p>
<span class="item-selected">顶部居中</span>
</div>
<div class="position-style">
<!-- top-left / top-middle / top-right / middle-left / center / middle-right / bottom-left / bottom-middle / bottom-right -->
<span class="top-middle" />
</div>
</div>
<div class="chapter-enable">
<div class="chapter-item">
<p class="item-title">是否启用</p>
<el-switch v-model="enable" class="isEnable-chapter" />
</div>
<div class="chapter-edit">
<el-button size="mini" @click="toEdit()">
<i class="iconfont icon-bianji" />
编辑
</el-button>
</div>
</div>
</div>
<eForm ref="cuform" @refresh="initData" />
</div>
</template>
<script>
import eForm from './module/form'
export default {
name: 'ArchiveSealSetting',
components: { eForm },
data() {
return {
enable: true
}
},
watch: {
@ -16,9 +65,175 @@ export default {
created() {
},
methods: {
toEdit() {
this.$refs.cuform.cuDialogVisible = true
}
}
}
</script>
<style lang="scss" scoped>
@mixin setting-box-style{
[data-theme="dark"] & {
padding: 0 20px 20px 20px;
margin-top: -10px;
}
[data-theme="light"] & {
margin-top: 20px;
}
}
@mixin setting-item-font{
[data-theme="dark"] & {
color: #fff;
}
[data-theme="light"] & {
color: #0C0E1E;
}
}
@mixin setting-item-selected{
[data-theme="dark"] & {
color: #fff;
background-color: #02255f;
}
[data-theme="light"] & {
color: #545B65;
background-color: #F5F7FA;
}
}
.setting-contanier{
@include setting-box-style;
}
.chapter-tip{
padding: 10px 20px 10px 40px;
margin-bottom: 30px;
font-size: 12px;
color: #545B65;
line-height: 26px;
background-color: #EEF5FE;
border: 1px solid #CBDAFF;
border-left: 2px solid #0348F3;
p{
font-size: 14px;
color: #0C0E1E;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
&::before{
content: '\e61e';
color: #215EF4;
margin-left: -24px;
margin-right: 10px;
}
}
}
.chapter-setting{
display: flex;
justify-content: space-between;
}
.chapter-format{
padding-left: 42px;
}
.chapter-item{
display: flex;
justify-content: flex-start;
font-size: 14px;
height: 32px;
line-height: 32px;
margin-bottom: 20px;
p.item-title{
width: 70px;
@include setting-item-font;
text-align: right;
margin-right: 10px;
}
span.item-selected{
display: block;
width: 297px;
padding: 0 13px;
@include setting-item-selected;
}
}
.position-style{
position: relative;
width: 380px;
height: 538px;
background: url('~@/assets/images/system/xt-gdz.png') no-repeat;
background-size: contain;
span{
position: absolute;
width: 118px;
height: 32px;
background: url('~@/assets/images/system/xt-gdx.png') no-repeat;
background-size: contain;
&.top-left{
top: 35px;
left: 25px;
}
&.top-middle{
top: 35px;
left: 50%;
margin-left: -49px;
}
&.top-right{
top: 35px;
right: 15px;
}
&.middle-left{
left: 25px;
top: 50%;
margin-top: -16px;
}
&.center{
left: 50%;
top: 50%;
margin-left: -49px;
margin-top: -16px;
}
&.middle-right{
top: 50%;
right: 15px;
margin-top: -16px;
}
&.bottom-left{
bottom: 35px;
left: 25px;
}
&.bottom-middle{
bottom: 35px;
left: 50%;
margin-left: -49px;
}
&.bottom-right{
bottom: 35px;
right: 15px;
}
}
}
.chapter-enable{
display: flex;
justify-content: flex-start;
.isEnable-chapter{
margin-top: 5px;
::v-deep .el-switch__core{
width: 28px !important;
height: 16px;
&::after{
width: 12px;
height: 12px;
margin-left: 0;
}
}
}
.chapter-edit{
margin-left: 36px;
}
::v-deep .el-switch.is-checked .el-switch__core::after{
margin-left: -13px !important;
}
}
</style>

154
src/views/system/archivesCategory/archiveSealSetting/module/form.vue

@ -0,0 +1,154 @@
<template>
<el-dialog :close-on-click-modal="false" :visible.sync="cuDialogVisible" :title="title">
<div class="setting-dialog">
<el-form ref="formData" :model="form" size="small" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="归档章版式">
<el-select v-model="form.format">
<el-option v-for="option in formatOptions" :key="option.value" :label="option.label" :value="option.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归档章位置">
<el-select v-model="form.position">
<el-option v-for="option in positionOptions" :key="option.value" :label="option.label" :value="option.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="format-style">
<span v-for="item in formatData" :key="item.id">{{ item.value }}</span>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cuDialogVisible = false">取消</el-button>
<el-button type="primary" :loading="loading" @click="save">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import { form } from '@crud/crud'
const defaultForm = {
id: null,
format: '默认版式',
position: '顶部居左'
}
export default {
mixins: [form(defaultForm)],
data() {
return {
title: '编辑归档章',
cuDialogVisible: false,
loading: false,
formatOptions: [{
label: '默认版式',
value: '0'
}],
formatData: [
{
id: 1,
value: '全宗号'
},
{
id: 2,
value: '年度'
},
{
id: 3,
value: '件号'
},
{
id: 4,
value: '机构(问题)'
},
{
id: 5,
value: '保管期限'
},
{
id: 6,
value: '页数'
}
],
positionOptions: [
{
label: '顶部居左',
value: 'topLeft'
},
{
label: '顶部居中',
value: 'topCenter'
},
{
label: '顶部居右',
value: 'topRight'
},
{
label: '中部居左',
value: 'centerLeft'
},
{
label: '中部居中',
value: 'center'
},
{
label: '中部居右',
value: 'centerRight'
},
{
label: '底部居左',
value: 'bottomLeft'
},
{
label: '底部居中',
value: 'bottomCenter'
},
{
label: '底部居右',
value: 'bottomRight'
}
]
}
},
methods: {
save() {
this.$refs['formData'].validate((valid) => {
if (valid) {
this.loading = true
// edit(this.formData.fields).then((res) => {
// this.$message({
// message: '',
// type: 'success',
// duration: 2500
// })
// this.cuDialogVisible = false
// this.loading = false
// this.$emit('refresh')
// })
this.cuDialogVisible = false
this.loading = false
this.$emit('refresh')
} else {
return false
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog .el-dialog__body{
padding-bottom: 0;
}
.dialog-footer{
margin-top: 20px;
}
.format-style{
margin-left: 100px;
}
</style>

117
src/views/system/archivesCategory/form.vue

@ -1,23 +1,45 @@
<template>
<!--表单组件-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="门类名称" prop="cnName">
<el-input v-model="form.cnName" style="width: 370px;" />
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px">
<el-form-item label="所属父级" prop="parentName">
<el-input v-model="selectedCategory.parentName" disabled />
</el-form-item>
<el-form-item label="门类类型" prop="isType">
<el-select v-model="form.isType" style="width: 370px;" :disabled="crud.status.edit === 1" @change="changeType">
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.value" :disabled="item.typeState" />
<el-form-item label="名称" prop="cnName">
<el-input v-model="form.cnName" />
</el-form-item>
<el-form-item label="节点类型" prop="isType">
<!-- :disabled="crud.status.edit === 1" -->
<el-select v-model="form.isType" style="width: 225px;" @change="changeType">
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.label" />
</el-select>
</el-form-item>
<el-form-item v-if="crud.status.add === 1" label="选择模板" prop="templateId">
<treeselect v-model="form.templateId" :flat="true" :options="templateTree" placeholder="" style="width: 370px;" :disabled="form.isType !== 6" :normalizer="normalizer" :default-expand-level="2" @select="updateTemplateValue" />
<el-form-item label="编码" prop="code">
<el-input v-model="form.code" />
</el-form-item>
<el-row v-if="isAdd">
<el-form-item label="是否装盒" prop="packing">
<el-radio-group v-model="form.packing" style="width: 580px;">
<el-radio label="1">装盒</el-radio>
<el-radio label="0">不装盒</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="内容说明">
<el-input v-model="form.remark" style="width: 370px;" type="textarea" :rows="4" />
</el-row>
<el-row v-if="isAdd">
<el-form-item label="整理方式" prop="makeType">
<el-radio-group v-model="form.makeType" style="width: 580px;">
<el-radio label="piece">按件整理</el-radio>
<el-radio label="volumes">按卷整理</el-radio>
<el-radio label="project">项目管理三层</el-radio>
</el-radio-group>
</el-form-item>
</el-row>
<!-- <el-form-item v-if="crud.status.add === 1" label="选择模板" prop="templateId">
<treeselect v-model="form.templateId" :flat="true" :options="templateTree" placeholder="" style="width: 370px;" :disabled="form.isType !== 6" :normalizer="normalizer" :default-expand-level="2" @select="updateTemplateValue" />
</el-form-item> -->
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" :rows="4" style="width: 580px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -29,15 +51,16 @@
</template>
<script>
import { getCategoryTree, getCategoryType } from '@/api/category/category'
// getCategoryType
import { getCategoryTree } from '@/api/category/category'
import { form } from '@crud/crud'
import CRUD from '@crud/crud'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import Treeselect from '@riophae/vue-treeselect'
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
const defaultForm = { id: null, cnName: null, isType: 1, remark: null, templateId: null }
const defaultForm = { id: null, parentName: null, cnName: null, code: null, packing: '1', isType: null, makeType: 'piece', remark: null, templateId: null }
export default {
components: { Treeselect },
// components: { Treeselect },
mixins: [
form(function() {
return Object.assign({ pid: this.pid }, defaultForm)
@ -54,12 +77,37 @@ export default {
data() {
return {
pid: null,
isAdd: false,
rules: {
parentLevel: [
{ required: true, message: '所属父级不可为空', trigger: 'blur' }
],
cnName: [
{ required: true, message: '请输入门类名称', trigger: 'blur' }
{ required: true, message: '名称不可为空', trigger: 'blur' }
],
isType: [
{ required: true, message: '节点类型不可为空', trigger: 'change' }
],
code: [
{ required: true, message: '编码不可为空', trigger: 'blur' }
],
packing: [
{ required: true, message: '请选择是否装盒', trigger: 'change' }
],
makeType: [
{ required: true, message: '请选择装盒类型', trigger: 'change' }
]
},
selectOptions: [],
selectOptions: [
{
value: '1',
label: '门类'
},
{
value: '2',
label: '文件夹'
}
],
templateTree: [],
selectedTemplateNode: {}
}
@ -110,12 +158,13 @@ export default {
this.selectedTemplateNode = node
},
changeType() {
if (this.form.isType === 6) {
// this.crudDict.getDicts()
this.getTemplateTree()
} else {
this.form.dicExplain = null
}
this.isAdd = this.form.isType === '1'
// if (this.form.isType === 6) {
// // this.crudDict.getDicts()
// this.getTemplateTree()
// } else {
// this.form.dicExplain = null
// }
},
getTemplateTree() {
getCategoryTree().then(res => {
@ -123,15 +172,15 @@ export default {
})
},
getSelectOptions() {
getCategoryType().then(res => {
for (const key in res) {
this.selectOptions.push({
value: Number(key),
label: res[key],
typeState: false
})
}
})
// getCategoryType().then(res => {
// for (const key in res) {
// this.selectOptions.push({
// value: Number(key),
// label: res[key],
// typeState: false
// })
// }
// })
},
normalizer(node) {
if (node.children && !node.children.length) {

25
src/views/system/archivesCategory/index.vue

@ -6,7 +6,7 @@
<div class="head-container">
<crudOperation :permission="permission">
<template v-slot:left>
<el-button v-permission="permission.add" size="mini" :disabled="crud.selections.length === 0" @click="crud.toAdd">
<el-button v-permission="permission.add" size="mini" :disabled="crud.selections.length === 0 || crud.selections[0].isType === 2 || crud.selections[0].isType === 3 || crud.selections[0].isType === 5" @click="crud.toAdd">
<i class="iconfont icon-xinzeng" />
新增
</el-button>
@ -68,25 +68,26 @@
</div>
<!--修改新增表单组件-->
<eForm ref="eform" :selected-category="selectedCategory" />
<el-dialog title="确认删除" :visible.sync="deleteVisible" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<el-dialog class="tip-dialog" title="提示" :visible.sync="deleteVisible" :before-close="handleClose">
<div class="setting-dialog">
<p><span style="color:#fff;">确认删除当前门类</span></p>
<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="handleConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<el-dialog title="确认删除" :visible.sync="reconfirmDeleteVisible" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<el-dialog class="tip-dialog" title="确认删除" :visible.sync="reconfirmDeleteVisible" :before-close="handleClose">
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>删除后会永久清除此门类的相关设置及报表请谨慎操作</span></p>
<p class="delt-tip"><span>提示为确保档案安全必须先手工删除此门类的所有档案数据</span></p>
<div class="tip-content">
<p class="tipMsg">删除后会永久清除此门类的相关设置及报表请谨慎操作</p>
<span>提示为确保档案安全必须先手工删除此门类的所有档案数据</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="reconfirmDeleteVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleReconfirm">确定</el-button>
</div>
</div>
@ -271,7 +272,9 @@ export default {
},
handleConfirm() {
this.deleteVisible = false
setTimeout(() => {
this.reconfirmDeleteVisible = true
}, 300)
},
handleReconfirm() {
this.reconfirmDeleteVisible = false

141
src/views/system/archivesCategory/publicScreening/index.vue

@ -1,9 +1,146 @@
<template>
<div>公共筛选</div>
<div>
<!--工具栏-->
<div class="head-container">
<el-button size="mini" @click="crud.toAdd">
<i class="iconfont icon-xinzeng" />
新增
</el-button>
<el-button slot="reference" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">
<i class="iconfont icon-shanchu" />
删除
</el-button>
</div>
<!--表单组件-->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" title="公共筛选设置">
<div class="setting-dialog">
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px">
<el-form-item label="筛选项" prop="filterItem">
<el-select v-model="form.filterItem" style="width: 580px;">
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.label" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</div>
</el-dialog>
<div>
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
highlight-current-row
row-key="id"
@select="crud.selectChange"
@select-all="crud.selectAllChange"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column :show-overflow-tooltip="true" prop="username" label="字段名称" />
<el-table-column prop="nickName" label="字段标识" />
<el-table-column prop="createTime" label="创建日期" width="200px">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import CRUD, { presenter, header, form } from '@crud/crud'
import pagination from '@crud/Pagination'
const defaultForm = { id: null, filterItem: null }
export default {
name: 'PublicScreening',
components: { pagination },
cruds() {
return CRUD({ title: '用户', url: 'api/users' })
},
mixins: [
presenter(),
header(),
form(function() {
return Object.assign({ dicPid: this.dicPid }, defaultForm)
})
],
data() {
return {
selectOptions: [
{
id: 1,
value: '年度',
label: '年度'
},
{
id: 2,
value: '保管期限',
label: '保管期限'
},
{
id: 3,
value: '机构(问题)',
label: '机构(问题)'
}
],
needRefreshTree: false,
rules: {
dicName: [
{ required: true, message: '请输入字典名称', trigger: 'blur' }
],
dicCode: [
{ required: true, message: '请输入字典代码', trigger: 'blur' }
],
isTop: [
{ required: true, message: '请选择是否为顶级节点', trigger: 'change' }
],
sequence: [
{ required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
]
}
}
},
methods: {
[CRUD.HOOK.afterSubmit]() {
this.needRefreshTree = true
},
[CRUD.HOOK.afterDelete]() {
this.needRefreshTree = true
},
//
[CRUD.HOOK.beforeRefresh]() {
},
[CRUD.HOOK.afterRefresh](crud) {
if (this.needRefreshTree) {
this.needRefreshTree = false
this.$emit('treeRefresh', crud.data)
}
},
toDelete(datas) {
// his.crud.confirmDeleteMsg ? this.crud.confirmDeleteMsg : `${datas.length}?`,
console.log(this.crud)
this.$confirm('此操作将删除当前所选字段' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
this.crud.delAllLoading = true
this.crud.doDelete(datas)
}).catch(() => {
})
}
}
}
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
</style>

31
src/views/system/archivesCategory/sortDialog.vue

@ -1,16 +1,15 @@
<template>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" title="排序" :visible.sync="sortVisible" @opened="opened">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<el-dialog class="sort-dialog" :close-on-click-modal="false" title="排序" :visible.sync="sortVisible" @opened="opened">
<div class="setting-dialog">
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序</i>
<i class="drag-tip">提示使用鼠标拖动调整顺序</i>
<el-table :data="sortTableData" :tree-props="{children: 'childrens'}" class="category-sort" style="width: 100%;" :max-height="tableHeight" row-key="id">
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="cnName" label="门类名称" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleSort">保存</el-button>
<el-button @click.native="sortVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleSort">确定</el-button>
</div>
</div>
</el-dialog>
@ -73,12 +72,26 @@ export default {
</script>
<style lang="scss" scoped>
.sort-dialog{
::v-deep .el-dialog{
width: 504px;
padding: 0;
}
::v-deep .el-dialog__header{
margin: 0 20px;
}
::v-deep .el-dialog__body{
padding-top: 0;
}
::v-deep .dialog-footer{
padding: 0 20px;
}
}
.drag-tip {
display: block;
padding-left: 20px;
padding-bottom: 10px;
padding: 15px 20px;
font-style: normal;
font-weight: bold;
color: #fff;
font-weight: normal;
color: #0348F3;
}
</style>
Loading…
Cancel
Save