8 changed files with 657 additions and 65 deletions
-
8src/assets/styles/mixin.scss
-
25src/assets/styles/yxk-admin.scss
-
219src/views/system/archivesCategory/archiveSealSetting/index.vue
-
154src/views/system/archivesCategory/archiveSealSetting/module/form.vue
-
117src/views/system/archivesCategory/form.vue
-
27src/views/system/archivesCategory/index.vue
-
141src/views/system/archivesCategory/publicScreening/index.vue
-
31src/views/system/archivesCategory/sortDialog.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> |
@ -1,9 +1,146 @@ |
|||||
<template> |
<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> |
</template> |
||||
|
|
||||
<script> |
<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> |
</script> |
||||
|
|
||||
<style lang='scss' scoped> |
|
||||
|
<style lang="scss" scoped> |
||||
</style> |
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue