Browse Source

api-档案门类

master
xuhuajiao 2 years ago
parent
commit
1759ea36b7
  1. 26
      src/api/system/category.js
  2. 20
      src/views/system/archivesCategory/baseInfo/index.vue
  3. 58
      src/views/system/archivesCategory/form.vue
  4. 34
      src/views/system/archivesCategory/index.vue

26
src/api/system/category.js

@ -16,4 +16,28 @@ export function FetchCategoryMenuChildren(cid) {
})
}
export default { }
export function add(data) {
return request({
url: 'api/category/editCategory',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/category/editCategory',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/category/delete',
method: 'delete',
data: ids
})
}
export default { add, edit, del, FetchCategoryMenu }

20
src/views/system/archivesCategory/baseInfo/index.vue

@ -8,10 +8,8 @@
<div class="info-item">
<span>节点类型</span>
<p v-if="selectedCategory.isType == 1">文件夹</p>
<p v-else-if="selectedCategory.isType == 2">项目</p>
<p v-else-if="selectedCategory.isType == 3">案卷</p>
<p v-else-if="selectedCategory.isType == 4">卷内</p>
<p v-else-if="selectedCategory.isType == 5">文件</p>
<p v-else-if="selectedCategory.isType == 2">门类</p>
<p v-else-if="selectedCategory.isType == 3"></p>
<p v-else />
</div>
<!-- v-if="selectedCategory.pid !== '0'" -->
@ -24,22 +22,22 @@
<p>{{ selectedCategory.remark ? selectedCategory.remark : '-' }}</p>
</div>
</div>
<div class="base-info-right">
<div v-if="selectedCategory.isType == 2" class="base-info-right">
<!-- <div v-if="selectedCategory.isType !== 1" class="info-item">
<span>档号规则</span>
<p>{{ fileNoFormatStr }}</p>
</div> -->
<div v-if="selectedCategory.isType !== 1" class="info-item">
<div class="info-item">
<span>编码</span>
<p>WS01</p>
<p>{{ selectedCategory.code }}</p>
</div>
<div v-if="selectedCategory.isType !== 1" class="info-item">
<div class="info-item">
<span>整理方式</span>
<p>按件整理</p>
<p>{{ selectedCategory.arrangeType === 1 ? "按件整理" : selectedCategory.arrangeType === 2 ? "按卷整理" : selectedCategory.arrangeType === 3 ? "项目管理(三层)" : "" }}</p>
</div>
<div v-if="selectedCategory.isType !== 1" class="info-item">
<div class="info-item">
<span>是否装盒</span>
<p>装盒</p>
<p>{{ selectedCategory.isCase ? '装盒' : '不装盒' }}</p>
</div>
</div>
</div>

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

@ -3,42 +3,44 @@
<el-dialog append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title">
<div class="setting-dialog">
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px">
<el-form-item label="所属父级" prop="parentName">
<el-form-item v-if="selectedCategory.pid === '0'" label="所属父级" prop="parentName">
<el-input v-model="selectedCategory.cnName" disabled />
</el-form-item>
<el-form-item v-else label="所属父级" prop="parentName">
<el-input v-model="selectedCategory.parentName" disabled />
</el-form-item>
<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-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<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-form-item label="是否装盒" prop="isCase">
<el-radio-group v-model="form.isCase" style="width: 580px;">
<el-radio :label="true">装盒</el-radio>
<el-radio :label="false">不装盒</el-radio>
</el-radio-group>
</el-form-item>
</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-form-item label="整理方式" prop="arrangeType">
<el-radio-group v-model="form.arrangeType" style="width: 580px;">
<el-radio :label="1">按件整理</el-radio>
<el-radio :label="2">按卷整理</el-radio>
<el-radio :label="3">项目管理三层</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-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="4" style="width: 580px;" />
</el-form-item>
</el-form>
@ -52,13 +54,13 @@
<script>
// getCategoryType
import { getCategoryTree } from '@/api/category/category'
import { getCategoryTree } from '@/api/system/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'
const defaultForm = { id: null, parentName: null, cnName: null, code: null, packing: '1', isType: null, makeType: 'piece', remark: null, templateId: null }
const defaultForm = { id: null, parentName: null, cnName: null, code: null, isCase: true, isType: null, arrangeType: null, remark: null, categorySeq: null }
export default {
// components: { Treeselect },
mixins: [
@ -100,18 +102,23 @@ export default {
},
selectOptions: [
{
value: '1',
label: '门类'
value: 1,
label: '文件夹'
},
{
value: '2',
label: '文件夹'
value: 2,
label: '门类'
}
],
templateTree: [],
selectedTemplateNode: {}
}
},
watch: {
selectedCategory: function(newValue, oldValue) {
console.log('newValue', newValue)
}
},
created() {
this.getSelectOptions()
},
@ -154,11 +161,22 @@ export default {
this.form.children = null
}
},
//
[CRUD.HOOK.afterValidateCU](crud) {
console.log(this.pid)
console.log(crud.form)
delete crud.form.parentName
return true
},
updateTemplateValue(node, instanceId) {
this.selectedTemplateNode = node
},
changeType() {
this.isAdd = this.form.isType === '1'
this.isAdd = this.form.isType === 2
if (this.form.isType === 1) {
this.form.isCase = null
this.form.arrangeType = null
}
// if (this.form.isType === 6) {
// // this.crudDict.getDicts()
// this.getTemplateTree()

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

@ -7,21 +7,21 @@
<crudOperation :permission="permission">
<template v-slot:left>
<!-- crud.selections.length === 0 || crud.selections[0].isType === 2 || crud.selections[0].isType === 3 || crud.selections[0].isType === 5 -->
<el-button v-permission="permission.add" size="mini" :disabled="crud.selections.length === 0 || crud.selections[0].isType !== 1" @click="crud.toAdd">
<el-button v-permission="permission.add" size="mini" :disabled="crud.selections.length === 0 || crud.selections[0].isType !== 1 || crud.selections[0].isType === 3" @click="crud.toAdd">
<i class="iconfont icon-xinzeng" />
新增
</el-button>
<el-button v-permission="permission.edit" size="mini" :disabled="crud.selections.length !== 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 4" @click="crud.toEdit(crud.selections[0])">
<el-button v-permission="permission.edit" size="mini" :disabled="crud.selections.length !== 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 3" @click="crud.toEdit(crud.selections[0])">
<i class="iconfont icon-bianji" />
编辑
</el-button>
</template>
<template v-slot:right>
<el-button v-permission="permission.del" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0 || (crud.selections.length === 1 && crud.selections[0].pid === '0' ) || crud.selections[0].isType === 4" @click="toDelete(crud.selections)">
<el-button v-permission="permission.del" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0 || (crud.selections.length === 1 && crud.selections[0].pid === '0' ) || crud.selections[0].isType === 3" @click="toDelete(crud.selections)">
<i class="iconfont icon-shanchu" />
删除
</el-button>
<el-button v-permission="permission.sort" icon="el-icon-sort" size="mini" :loading="sortLoading" :disabled="brotherNodeNum <= 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 5" @click="toSort(crud.selections)">排序</el-button>
<el-button v-permission="permission.sort" icon="el-icon-sort" size="mini" :loading="sortLoading" :disabled="brotherNodeNum <= 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 3" @click="toSort(crud.selections)">排序</el-button>
</template>
</crudOperation>
</div>
@ -32,13 +32,13 @@
<div class="tree-scroll">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.isType===1 " class="iconFolder">
<span v-if="data.isType === 1 " class="iconFolder">
{{ data.cnName }}
</span>
<span v-if="data.isType===2 || data.isType === 3 || data.isType===5" class="iconArch">
<span v-if="data.isType === 2" class="iconArch">
{{ data.cnName }}
</span>
<span v-if="data.isType===4" class="iconFile">
<span v-if="data.isType === 3" class="iconFile">
{{ data.cnName }}
</span>
</span>
@ -53,14 +53,14 @@
<span class="left-bottom-line" />
<ul class="tab-nav">
<li :class="{'active-tab-nav': activeIndex == 0}" @click="changeActiveTab(0)">基本信息<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 1}" @click="changeActiveTab(1)">门类字段管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 2}" @click="changeActiveTab(2)">著录界面管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 3}" @click="changeActiveTab(3)">列表界面浏览设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 4}" @click="changeActiveTab(4)">浏览排序规则设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 5}" @click="changeActiveTab(5)">档号规则设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType !== 1 && selectedCategory.isType !== 4" :class="{'active-tab-nav': activeIndex == 6}" @click="changeActiveTab(6)">归档章设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType !== 1 && selectedCategory.isType !== 4" :class="{'active-tab-nav': activeIndex == 7}" @click="changeActiveTab(7)">公共筛选<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType !== 1 && selectedCategory.isType !== 4" :class="{'active-tab-nav': activeIndex == 8}" @click="changeActiveTab(8)">流程管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 1}" @click="changeActiveTab(1)">门类字段管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 2}" @click="changeActiveTab(2)">著录界面管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 3}" @click="changeActiveTab(3)">列表界面浏览设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 4}" @click="changeActiveTab(4)">浏览排序规则设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 5}" @click="changeActiveTab(5)">档号规则设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType !== 1 && selectedCategory.isType !== 3" :class="{'active-tab-nav': activeIndex == 6}" @click="changeActiveTab(6)">归档章设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType !== 1 && selectedCategory.isType !== 3" :class="{'active-tab-nav': activeIndex == 7}" @click="changeActiveTab(7)">公共筛选<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType !== 1 && selectedCategory.isType !== 3" :class="{'active-tab-nav': activeIndex == 8}" @click="changeActiveTab(8)">流程管理<i /></li>
<!-- 最右侧装饰img -->
<span class="tab-right-img" />
</ul>
@ -100,7 +100,7 @@
</template>
<script>
import crudCategory from '@/api/category/category'
import crudCategory from '@/api/system/category'
import CRUD, { presenter, header } from '@crud/crud'
import eForm from './form'
import sortDialog from './sortDialog'
@ -122,7 +122,7 @@ export default {
cruds() {
return [
CRUD({
title: '门类', url: 'api/archives-type/menu',
title: '门类', url: 'api/category/menu',
crudMethod: { ...crudCategory },
optShow: {
add: false,

Loading…
Cancel
Save