Browse Source

20231030系统管理bug需求修复

master
xuhuajiao 1 year ago
parent
commit
3db7d72afb
  1. 9
      src/views/components/category/PreviewForm.vue
  2. 24
      src/views/system/archiveScopeManage/module/tableList.vue
  3. 2
      src/views/system/archivesCategory/fieldManage/index.vue
  4. 3
      src/views/system/dept/index.vue
  5. 6
      src/views/system/fieldCorresManage/index.vue
  6. 2
      src/views/system/fileLibraryManage/fieldManage/index.vue
  7. 99
      src/views/system/groupManage/index.vue
  8. 92
      src/views/system/role/index.vue

9
src/views/components/category/PreviewForm.vue

@ -75,20 +75,20 @@
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-table v-if="isTableType === 1" ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="id" :tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table v-if="isTableType === 1" ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="id" :tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}" height="600" style="width: 100%; he" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table-column type="selection" width="55" />
<el-table-column prop="fondsNo" label="全宗号" />
<el-table-column prop="fondsName" label="全宗名称" />
<el-table-column prop="fondsOrders" label="排序" width="60" />
</el-table>
<el-table v-if="isTableType === 2" ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="id" :tree-props="{children: 'childArchivesClass', hasChildren: 'hasChildren'}" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table v-if="isTableType === 2" ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="id" :tree-props="{children: 'childArchivesClass', hasChildren: 'hasChildren'}" height="600" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table-column type="selection" width="55" />
<el-table-column label="分类名称" prop="name" width="130" />
<el-table-column label="分类编号" prop="code" />
<el-table-column label="排序" prop="classSeq" />
<el-table-column label="所属门类" prop="categoryName" />
</el-table>
<el-table v-if="isTableType === 3" ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="dictionaryId" :tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table v-if="isTableType === 3" ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="dictionaryId" :tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}" height="600" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table-column type="selection" width="55" />
<el-table-column prop="dictionaryName" label="字典名称" />
<el-table-column prop="dictionaryCode" label="字典代码" />
@ -779,6 +779,9 @@ export default {
background-color: transparent;
@include input_style;
}
::v-deep .vue-treeselect__control{
height: 32px !important;
}
::v-deep .el-input__prefix {
text-align: right;
right: 5px !important;

24
src/views/system/archiveScopeManage/module/tableList.vue

@ -54,23 +54,25 @@
placeholder="选择门类之后再选择档案分类"
/>
</el-form-item>
<el-form-item label="名称" prop="scopeName">
<el-input v-model="form.scopeName" />
</el-form-item>
<el-form-item label="编码" prop="scopeCode">
<el-input v-model="form.scopeCode" />
</el-form-item>
<el-form-item label="保管期限" prop="retention">
<el-select v-model="form.retention" placeholder="请选择" style="width:225px;">
<el-option v-for="item in periodOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-row>
<el-form-item label="名称说明" prop="scopeName">
<el-input v-model="form.scopeName" type="textarea" :rows="6" style="width: 580px;" />
</el-form-item>
</el-row>
<el-form-item label="顶级范围" prop="isTop">
<el-radio-group v-model="form.isTop" @input="changeIsTop">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="保管期限" prop="retention">
<el-select v-model="form.retention" placeholder="请选择" style="width:225px;">
<el-option v-for="item in periodOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item
v-if="form.isTop === '0'"
label="上级分类"
@ -109,7 +111,7 @@
>
<el-table-column type="selection" align="center" width="55" />
<el-table-column :show-overflow-tooltip="true" prop="scopeCode" label="编码" />
<el-table-column :show-overflow-tooltip="true" prop="scopeName" label="名称" />
<el-table-column :show-overflow-tooltip="true" prop="scopeName" label="名称或说明" />
<el-table-column :show-overflow-tooltip="true" prop="retention" label="保管期限">
<template slot-scope="scope">
<div>{{ scope.row.retention === 0 ? '永久' : scope.row.retention === 1 ? '定期30年' : '定期10年' }}</div>
@ -192,8 +194,8 @@ export default {
scopeCode: [{ required: true, message: '编码不可为空', trigger: 'blur' }],
scopeName: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
isTop: [{ required: true, message: '请选择是否为顶级分类', trigger: 'change' }],
pid: [{ required: true, message: '请选择上级分类', trigger: 'change' }],
retention: [{ required: true, message: '请选择保管期限', trigger: 'change' }]
pid: [{ required: true, message: '请选择上级分类', trigger: 'change' }]
// retention: [{ required: true, message: '', trigger: 'change' }]
},
permission: {
add: ['admin', 'scope:add'],

2
src/views/system/archivesCategory/fieldManage/index.vue

@ -10,7 +10,7 @@
</div>
<!--表格渲染-->
<el-table ref="fieldTable" v-loading="crud.loading" :data="crud.data" style="min-width: 100%;" height="calc(100vh - 302px)" crud-tag="field" @selection-change="selectionChangeHandler" @row-click="clickRowHandler">
<el-table-column type="selection" width="55" />
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" />
<el-table-column prop="fieldCnName" label="字段名称" min-width="145" show-overflow-tooltip />
<el-table-column prop="fieldName" label="字段标识" min-width="145" show-overflow-tooltip />

3
src/views/system/dept/index.vue

@ -173,7 +173,8 @@ export default {
reset: true,
download: false,
group: false
}
},
queryOnPresenterCreated: false
})
},
mixins: [presenter(), header(), form(defaultForm), crud()],

6
src/views/system/fieldCorresManage/index.vue

@ -92,7 +92,7 @@
@selection-change="crud.selectionChangeHandler"
@cell-dblclick="tableDoubleClick"
>
<el-table-column type="selection" width="55" />
<el-table-column type="selection" width="55" align="center" />
<el-table-column :show-overflow-tooltip="true" prop="rule_name" label="规则名称" />
<el-table-column :show-overflow-tooltip="true" prop="documentName" label="源分类(文件库-文件表)" />
<el-table-column :show-overflow-tooltip="true" prop="categoryName" label=" 目标门类(整理库/管理库-文件表)" />
@ -139,7 +139,7 @@ export default {
add: true,
edit: false,
del: true,
reset: false,
reset: true,
download: false,
group: false
}
@ -210,6 +210,7 @@ export default {
//
this.$refs.corresForm.corresVisible = true
this.$refs.corresForm.title = '新增对应关系'
this.$refs.corresForm.cuform.ruleName = null
this.$refs.corresForm.documentName = null
this.$refs.corresForm.cuform.documentId = this.form.documentId
this.$refs.corresForm.categoryName = this.selectedCategoryName
@ -253,6 +254,7 @@ export default {
this.$refs.corresForm.leftLoading = false
})
//
console.log('categoryId', categoryId)
FetchInitCategoryFieldByPid({ categoryId: categoryId, isType: 2 }).then((res) => {
this.$refs.corresForm.targetData = res.sort((a, b) => {
if (a.isInput !== b.isInput) {

2
src/views/system/fileLibraryManage/fieldManage/index.vue

@ -10,7 +10,7 @@
</div>
<!--表格渲染-->
<el-table ref="fieldTable" v-loading="crud.loading" :data="crud.data" style="min-width: 100%;" height="calc(100vh - 302px)" crud-tag="field" @selection-change="selectionChangeHandler" @row-click="clickRowHandler">
<el-table-column type="selection" width="55" />
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" />
<el-table-column prop="fieldCnName" label="字段名称" min-width="145" show-overflow-tooltip />
<el-table-column prop="fieldName" label="字段标识" min-width="145" show-overflow-tooltip />

99
src/views/system/groupManage/index.vue

@ -111,13 +111,12 @@
@click="saveCategory"
>保存</el-button>
</div>
<!-- :data="menus" @check="menuChange" :default-checked-keys="categoryIds"-->
<!-- :load="getCategoryDataList" @check="menuChange" :default-checked-keys="categoryIds"-->
<el-tree
ref="category"
lazy
:data="categoryDatas"
:load="getCategoryDataList"
:default-checked-keys="categoryIds"
default-expand-all
show-checkbox
node-key="id"
highlight-current
@ -132,7 +131,8 @@
<script>
import crudfonds from '@/api/system/fonds'
import { FetchCategoryMenuChildren } from '@/api/system/category/category'
// FetchCategoryMenuChildren
import { FetchCategoryMenu } from '@/api/system/category/category'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
@ -159,7 +159,7 @@ export default {
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
return {
defaultProps: { children: 'children', label: 'cnName', isLeaf: 'leaf' },
defaultProps: { children: 'children', label: 'cnName' },
currentId: 0, categoryLoading: false, showButton: false,
categoryDatas: [], categoryIds: [], depts: [], deptDatas: [], // 使
categoryAllData: [],
@ -191,7 +191,8 @@ export default {
],
blurryTime: null,
deleteData: [], // data
chooseNode: null
chooseNode: null,
categoryTreeData: []
}
},
computed: {
@ -201,15 +202,32 @@ export default {
},
created() {
},
mounted() {
FetchCategoryMenu().then(res => {
this.categoryDatas = this.filterData(res)
})
},
methods: {
getCategoryDataList(node, resolve) {
setTimeout(() => {
if (node.level > 2) return resolve([])
FetchCategoryMenuChildren(node.data.id ? node.data.id : 0).then(res => {
resolve(res)
// getCategoryDataList(node, resolve) {
// setTimeout(() => {
// if (node.level > 2) return resolve([])
// FetchCategoryMenuChildren(node.data.id ? node.data.id : 0).then(res => {
// resolve(res)
// })
// }, 100)
// },
filterData(data) {
return data.filter(node => {
this.$set(node, 'isChecked', false)
if (node.children && node.children.length > 0) {
node.children = this.filterData(node.children) //
}
return node.isType !== 3 // isType3
})
}, 100)
},
// getCategoryDataList(node, resolve) {
// resolve(this.categoryTreeData)
// },
[CRUD.HOOK.beforeRefresh]() {
if (this.blurryTime) {
this.crud.query.startTime = this.blurryTime[0]
@ -240,9 +258,13 @@ export default {
this.$refs.category.setCheckedKeys([])
// id
this.currentId = val.fondsId
console.log('val', val)
console.log('this.currentId', this.currentId)
crudfonds.FetchFondsDetail({ id: this.currentId }).then((res) => {
console.log(res)
// key
this.categoryIds = []
console.log(res.categorys)
if (res.categorys) {
res.categorys.forEach(function(data) {
_this.categoryIds.push(data.id)
@ -315,36 +337,38 @@ export default {
}).catch(() => {
})
},
categoryChange(categorys) {
console.log(categorys)
if (categorys.pid === 0) {
categorys.isChecked = !categorys.isChecked
this.categoryIds.push(categorys.id)
this.categoryAllData.forEach(childIds => {
if (categorys.isChecked) {
const index = this.categoryIds.indexOf(childIds.id)
if (index !== -1) {
this.categoryIds.splice(index, 1)
}
this.categoryIds.push(childIds.id)
} else {
this.categoryIds = []
findNodeById(id, nodes) {
for (const node of nodes) {
if (node.id === id) {
return node
} else if (node.children.length > 0) {
const foundNode = this.findNodeById(id, node.children)
if (foundNode) {
return foundNode
}
})
} else {
if (this.categoryIds.indexOf(categorys.id) !== -1) {
const index = this.categoryIds.indexOf(categorys.id)
if (index !== -1) {
this.categoryIds.splice(index, 1)
}
} else {
const index = this.categoryIds.indexOf(categorys.id)
if (index === -1) {
this.categoryIds.push(categorys.id)
}
return null
},
getAllChildIds(id, nodes) {
const node = this.findNodeById(id, nodes)
if (node) {
let childIds = [node.id]
for (const child of node.children) {
childIds = childIds.concat(this.getAllChildIds(child.id, nodes))
}
return childIds
} else {
return []
}
this.$refs.category.setCheckedKeys(this.categoryIds)
},
categoryChange(categorys) {
console.log(categorys)
console.log(this.categoryDatas)
const childrenIds = this.getAllChildIds(categorys.id, this.categoryDatas)
console.log('childrenIds', childrenIds)
console.log(this.$refs.category.getCheckedKeys())
this.categoryIds = this.$refs.category.getCheckedKeys()
},
//
saveCategory() {
@ -369,6 +393,7 @@ export default {
update() {
//
crudfonds.FetchInitFondsList().then(res => {
console.log(res)
for (let i = 0; i < this.crud.data.length; i++) {
if (res.fondsId === this.crud.data[i].fondsId) {
this.crud.data[i] = res

92
src/views/system/role/index.vue

@ -106,16 +106,14 @@
node-key="id"
@check="menuChange"
/>
<!-- :load="getFondsDatas" -->
<el-tree
v-show="roleTabIndex == 1"
ref="fonds"
lazy
:data="fondDatas"
:data="fondsAllData"
:default-checked-keys="fondIds"
:load="getFondsDatas"
:props="defaultFondsProps"
check-strictly
accordion
default-expand-all
show-checkbox
node-key="id"
@check="fondsChange"
@ -163,7 +161,7 @@ export default {
data() {
return {
defaultProps: { children: 'children', label: 'label', isLeaf: 'leaf' },
defaultFondsProps: { children: 'children', label: 'fondsName', isLeaf: 'leaf' },
defaultFondsProps: { children: 'children', label: 'fondsName' },
// dateScopes: ['', '', ''], level: 3,
currentId: 0, treeLoading: false, showButton: false,
menus: [], menuIds: [],
@ -198,14 +196,17 @@ export default {
mounted() {
FetchFondsAll().then(res => {
const resArr = []
resArr.push({ fondsName: '全宗选择', id: 0, isChecked: false, children: [] })
if (resArr[0].id === 0) {
res.forEach(item => {
resArr.push({
resArr[0].children.push({
fondsName: item.fondsName,
id: item.id,
leaf: true
id: item.id
})
})
}
this.fondsAllData = resArr
console.log(this.fondsAllData)
})
},
methods: {
@ -269,9 +270,9 @@ export default {
})
if (val.fonds) {
if (this.fondsAllData.length === val.fonds.length) {
_this.fondIds.push(0)
}
// if (this.fondsAllData.length === val.fonds.length) {
// _this.fondIds.push(0)
// }
val.fonds.forEach(function(data) {
_this.fondIds.push(data.id)
})
@ -301,6 +302,7 @@ export default {
menuChange(menu) {
// id
getChild(menu.id).then(childIds => {
console.log(childIds)
// menuIds
if (this.menuIds.indexOf(menu.id) !== -1) {
for (let i = 0; i < childIds.length; i++) {
@ -321,34 +323,36 @@ export default {
})
},
fondsChange(fonds) {
if (fonds.id === 0) {
fonds.isChecked = !fonds.isChecked
this.fondIds.push(fonds.id)
this.fondsAllData.forEach(childIds => {
if (fonds.isChecked) {
const index = this.fondIds.indexOf(childIds.id)
if (index !== -1) {
this.fondIds.splice(index, 1)
}
this.fondIds.push(childIds.id)
} else {
this.fondIds = []
}
})
} else {
if (this.fondIds.indexOf(fonds.id) !== -1) {
const index = this.fondIds.indexOf(fonds.id)
if (index !== -1) {
this.fondIds.splice(index, 1)
}
} else {
const index = this.fondIds.indexOf(fonds.id)
if (index === -1) {
this.fondIds.push(fonds.id)
}
}
}
this.$refs.fonds.setCheckedKeys(this.fondIds)
console.log(this.$refs.fonds.getCheckedKeys())
this.fondIds = this.$refs.fonds.getCheckedKeys()
// if (fonds.id === 0) {
// fonds.isChecked = !fonds.isChecked
// this.fondIds.push(fonds.id)
// this.fondsAllData.forEach(childIds => {
// if (fonds.isChecked) {
// const index = this.fondIds.indexOf(childIds.id)
// if (index !== -1) {
// this.fondIds.splice(index, 1)
// }
// this.fondIds.push(childIds.id)
// } else {
// this.fondIds = []
// }
// })
// } else {
// if (this.fondIds.indexOf(fonds.id) !== -1) {
// const index = this.fondIds.indexOf(fonds.id)
// if (index !== -1) {
// this.fondIds.splice(index, 1)
// }
// } else {
// const index = this.fondIds.indexOf(fonds.id)
// if (index === -1) {
// this.fondIds.push(fonds.id)
// }
// }
// }
// this.$refs.fonds.setCheckedKeys(this.fondIds)
},
//
saveMenu() {
@ -391,8 +395,14 @@ export default {
update() {
//
crudRoles.get(this.currentId).then(res => {
console.log('222', this.crud.data)
for (let i = 0; i < this.crud.data.length; i++) {
if (res.id === this.crud.data[i].id) {
if (res.menus[i].id === this.crud.data[i].menus.id) {
this.crud.data[i] = res
break
}
console.log(res.fonds)
if (res.fonds.id === this.crud.data[i].fonds.id) {
this.crud.data[i] = res
break
}

Loading…
Cancel
Save