Browse Source

盒管理/智能分类

master
xuhuajiao 1 year ago
parent
commit
c987abe92f
  1. 2
      src/assets/styles/yxk-admin.scss
  2. 283
      src/views/archivesManage/archivesCheck/module/addCheck.vue
  3. 234
      src/views/archivesManage/archivesList/index.vue
  4. 2
      src/views/archivesManage/caseManage/caseList/index.vue

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

@ -636,7 +636,7 @@
.vue-treeselect__placeholder, .vue-treeselect__placeholder,
.vue-treeselect__single-value{ .vue-treeselect__single-value{
height: 28px; height: 28px;
// line-height: 28px;
line-height: 28px;
color: #fff; color: #fff;
} }
.vue-treeselect__control{ .vue-treeselect__control{

283
src/views/archivesManage/archivesCheck/module/addCheck.vue

@ -11,67 +11,59 @@
label-width="80px" label-width="80px"
:rules="rules" :rules="rules"
> >
<el-form-item label="选择区域" prop="selectArea" class="down-select" style="margin-right:10px">
<el-form-item label="选择区域" prop="selectAreaValue" class="down-select" style="margin-right:20px">
<treeselect <treeselect
v-model="selectAreaValue"
:options="selectArea"
v-model="checkForm.selectAreaValue"
:options="selectAreaOptions"
multiple multiple
placeholder="请选择" placeholder="请选择"
style="width:200px;height:30px"
style="width:240px;height:30px"
:limit="1" :limit="1"
:limit-text="count => `+${count}`" :limit-text="count => `+${count}`"
/> />
</el-form-item> </el-form-item>
<!-- @select="treeSelectChange"
@deselect="treeSelectDeselect"
@search-change="treeSelectSearch"
@open="treeSelectOpen"
@close="treeSelectClose" -->
<el-form-item label="选择门类" prop="categoryValue" class="down-select" style="margin-right:10px">
<el-form-item label="选择门类" prop="categoryValue" class="down-select" style="margin-right:20px">
<treeselect <treeselect
ref="treeselect" ref="treeselect"
v-model="categoryValue"
multiple
v-model="checkForm.categoryValue"
flat
:multiple="false"
placeholder="请选择" placeholder="请选择"
:options="category" :options="category"
style="width: 220px;"
style="width: 240px;"
:normalizer="normalizer" :normalizer="normalizer"
:default-expand-level="2" :default-expand-level="2"
:limit="1"
:limit-text="count => `+${count}`"
@input="treeSelectInput" @input="treeSelectInput"
/> />
<!-- <el-select
v-model="categoryValue"
</el-form-item>
<!-- @change="selectChange" -->
<el-form-item label="选择年度" prop="years" class="down-select" style="margin-right:20px">
<el-select
v-model="checkForm.years"
style="width: 200px;height:30px" style="width: 200px;height:30px"
multiple multiple
filterable filterable
clearable clearable
placeholder="请选择" placeholder="请选择"
:collapse-tags="showTags" :collapse-tags="showTags"
@change="selectChange"
> >
<el-option <el-option
v-for="item in category"
v-for="item in yearsOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> -->
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择年度" prop="years" class="down-select">
<!-- @change="selectChange" -->
<el-form-item label="盘点方式" prop="checkType" class="down-select">
<el-select <el-select
v-model="years"
style="width: 140px;height:30px"
multiple
filterable
v-model="checkForm.checkType"
style="width: 240px; height:30px"
clearable clearable
placeholder="请选择" placeholder="请选择"
:collapse-tags="showTags"
> >
<el-option <el-option
v-for="item in yearsOptions"
v-for="item in checkOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@ -80,7 +72,7 @@
</el-form-item> </el-form-item>
<el-button type="primary" size="mini" style="margin:0 0 0 20px;height:30px" @click="handleBuild">生成盘点单</el-button> <el-button type="primary" size="mini" style="margin:0 0 0 20px;height:30px" @click="handleBuild">生成盘点单</el-button>
</el-form> </el-form>
<el-table v-loading="loading" :data="tableData" height="400px" :cell-class-name="cell">
<el-table v-if="isCaseOrFile === 2" v-loading="loading" :data="tableData" height="400px" :cell-class-name="cell">
<el-table-column type="index" align="center" label="序号" width="80" /> <el-table-column type="index" align="center" label="序号" width="80" />
<el-table-column align="center" label="状态" width="100"> <el-table-column align="center" label="状态" width="100">
<template> <template>
@ -97,14 +89,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="categoryName" align="center" show-overflow-tooltip label="门类名称" width="120" /> <el-table-column prop="categoryName" align="center" show-overflow-tooltip label="门类名称" width="120" />
<el-table-column prop="fondsNo" align="center" label="全宗号" width="100" />
<el-table-column prop="archiveNo" align="center" label="档号" width="180" />
<el-table-column prop="fondsNo" align="center" label="全宗号" width="180" show-overflow-tooltip />
<el-table-column prop="archiveNo" align="center" label="档号" width="180" show-overflow-tooltip />
<el-table-column prop="archiveYear" align="center" label="归档年度" width="100" /> <el-table-column prop="archiveYear" align="center" label="归档年度" width="100" />
<el-table-column prop="maintitle" show-overflow-tooltip label="题名" align="center" width="180" /> <el-table-column prop="maintitle" show-overflow-tooltip label="题名" align="center" width="180" />
<el-table-column prop="securityClass" label="保密程度" align="center" width="85" /> <el-table-column prop="securityClass" label="保密程度" align="center" width="85" />
<el-table-column prop="department" label="部门" align="center" width="120" /> <el-table-column prop="department" label="部门" align="center" width="120" />
<el-table-column prop="caseName" label="盒名称" show-overflow-tooltip align="center" width="120" /> <el-table-column prop="caseName" label="盒名称" show-overflow-tooltip align="center" width="120" />
<el-table-column prop="folderLocationDetails" show-overflow-tooltip label="所在位置" align="center" width="260">
<el-table-column prop="folderLocationDetails" show-overflow-tooltip label="所在位置" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!scope.row.folderLocationDetails">-</span> <span v-if="!scope.row.folderLocationDetails">-</span>
<span v-else> <span v-else>
@ -118,12 +110,51 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" />
<div slot="footer" class="dialog-footer">
<el-table
v-if="isCaseOrFile === 1"
ref="table"
v-loading="loading"
:cell-class-name="cell"
:data="tableData"
height="400px"
style="width: 100%;"
@row-dblclick="handleCaseDbClick"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column align="center" label="状态" width="100">
<template>
<!-- 未盘点 -->
<span class="clear">未盘点</span>
</template>
</el-table-column>
<el-table-column prop="depositNum" label="已装" align="center" min-width="56" />
<el-table-column prop="caseName" label="盒名称" :show-overflow-tooltip="true" align="center" min-width="150" />
<el-table-column prop="tid" label="TID" align="center" min-width="180" />
<el-table-column prop="barcode" label="条形码" align="center" min-width="120" />
<el-table-column label="存放位置" align="center" min-width="300">
<template slot-scope="scope">
<span v-if="!scope.row.folderLocationDetails">-</span>
<span v-else>
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag>
</span>
</template>
</el-table-column>
<el-table-column prop="update_time" width="175" label="操作时间" align="center">
<template slot-scope="scope">
<div>{{ scope.row.update_time | parseTime }}</div>
</template>
</el-table-column>
</el-table>
<el-pagination v-if="tableData.length !== 0" :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" />
<div v-if="tableData.length !== 0" slot="footer" class="dialog-footer">
<el-button :disabled="!(tableData.length)" @click="handleSave">保存</el-button> <el-button :disabled="!(tableData.length)" @click="handleSave">保存</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<!-- 档案盒详情 -->
<detailDialog ref="detailDom" />
</div> </div>
</template> </template>
@ -133,34 +164,44 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { menu } from '@/api/storeManage/levelManage/level' import { menu } from '@/api/storeManage/levelManage/level'
import { getCategoryTree } from '@/api/category/category' import { getCategoryTree } from '@/api/category/category'
import { previewArrange, addArrange } from '@/api/archivesManage/archivesCheck' import { previewArrange, addArrange } from '@/api/archivesManage/archivesCheck'
import { FetchInitArchivesView } from '@/api/archivesManage/archivesList'
import { findInCase } from '@/api/archivesManage/caseManage'
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
import detailDialog from '@/views/archivesManage/caseManage/caseList/module/detailDialog'
export default { export default {
name: 'AddCheck', name: 'AddCheck',
components: { Treeselect },
components: { Treeselect, detailDialog },
mixins: [crud()], mixins: [crud()],
data() { data() {
return { return {
loading: false, loading: false,
menusIds: [], menusIds: [],
tableData: [], tableData: [],
checkForm: {},
isCaseOrFile: 0,
checkForm: {
selectAreaValue: [],
categoryValue: null,
years: [],
checkType: null
},
addFormVisible: false, addFormVisible: false,
selectAreaValue: [],
selectArea: [],
selectAreaOptions: [],
defaultProps: { children: 'children', label: 'label' }, defaultProps: { children: 'children', label: 'label' },
nodeKey: 'id', nodeKey: 'id',
defaultCheckedKeys: [], defaultCheckedKeys: [],
categoryValue: [],
oldCategory: [], oldCategory: [],
allCategory: [], allCategory: [],
category: [], category: [],
showTags: true, showTags: true,
years: null,
yearsOptions: [
yearsOptions: [],
checkOptions: [
{ {
value: '2023',
label: '2023'
label: '按盒盘点',
value: 1
},
{
label: '按件盘点',
value: 2
} }
], ],
page: { page: {
@ -175,9 +216,10 @@ export default {
categoryIds: null categoryIds: null
}, },
rules: { rules: {
selectArea: [{ required: true, trigger: 'blur' }],
categoryValue: [{ required: true, trigger: 'blur' }],
years: [{ required: true, trigger: 'blur' }]
selectAreaValue: [{ required: true, trigger: 'change', message: '请选择区域' }],
categoryValue: [{ required: true, trigger: 'change', message: '请选择门类' }],
years: [{ required: true, trigger: 'change', message: '请选择年度' }],
checkType: [{ required: true, trigger: 'change', message: '请选择盘点方式' }]
} }
} }
}, },
@ -215,7 +257,7 @@ export default {
storeroom.children = devices storeroom.children = devices
deviceTree.push(storeroom) deviceTree.push(storeroom)
} }
this.selectArea = deviceTree
this.selectAreaOptions = deviceTree
}) })
}) })
}, },
@ -242,52 +284,53 @@ export default {
// this.oldCategory = JSON.parse(JSON.stringify(this.allCategory)) // this.oldCategory = JSON.parse(JSON.stringify(this.allCategory))
}) })
}, },
// , valueundefined inputv-model
treeSelectInput(value, instanceId) {
console.log(value, 'input事件')
console.log('this.categoryValue', this.categoryValue)
console.log(this.value, 'this.value -- input') //
treeSelectInput(value) {
console.log('this.categoryValue', this.checkForm.categoryValue)
if (this.checkForm.categoryValue) {
this.getYear()
} else {
this.yearsOptions = []
this.checkForm.years = []
}
},
getYear() {
const params = {
'categoryId': this.checkForm.categoryValue,
'isdel': false,
'page': 1,
'size': 10
}
FetchInitArchivesView(params).then(data => {
console.log(data.yearGroup)
if (data) {
this.yearsOptions = data.yearGroup.map(item => {
const json = {}
json.value = item
json.label = item
return json
})
}
})
}, },
//
// treeSelectChange(raw, instanceId) {
// console.log(raw, '')
// setTimeout(() => { // this.value setTimeout
// console.log(this.value, 'this.value -- select')
// })
// },
// multipletrue raw
// treeSelectDeselect(raw, instanceId) {
// console.log(raw, 'deselect-->>')
// },
//
// treeSelectSearch(searchQuery, instanceId) {
// console.log(searchQuery, '')
// },
//
// treeSelectOpen(instanceId) {
// console.log('')
// },
//
// treeSelectClose(value, instanceId) {
// console.log(value, 'value')
// },
// //
handleBuild() { handleBuild() {
if (this.selectAreaValue.length > 0 && this.categoryValue.length > 0) {
this.$refs['form'].validate(valid => {
if (!valid) {
return
}
this.loading = true this.loading = true
const paramsNo = this.getParams() const paramsNo = this.getParams()
if (paramsNo.checkType === 1) {
this.isCaseOrFile = 1
} else {
this.isCaseOrFile = 2
}
this.params.deviceIds = paramsNo.deviceIds this.params.deviceIds = paramsNo.deviceIds
this.params.categoryIds = paramsNo.categoryIds this.params.categoryIds = paramsNo.categoryIds
this.params.page = this.page.page - 1 this.params.page = this.page.page - 1
this.params.size = this.page.size this.params.size = this.page.size
this.doPreArrange(this.params) this.doPreArrange(this.params)
this.loading = false
} else {
this.$message({
message: '区域和门类均不能为空',
type: 'warning'
})
}
})
}, },
handleSave() { handleSave() {
const params = this.getParams() const params = this.getParams()
@ -308,13 +351,13 @@ export default {
}) })
}, },
getParams() { getParams() {
const room = this.selectArea.map(item => { return item.id }) // id
if (this.selectAreaValue.length > 0 && this.categoryValue.length > 0) {
let deviceIds = this.selectAreaValue.filter(item => !room.includes(item)) // id
const room = this.selectAreaOptions.map(item => { return item.id }) // id
if (this.checkForm.selectAreaValue.length > 0 && this.checkForm.categoryValue.length > 0) {
let deviceIds = this.checkForm.selectAreaValue.filter(item => !room.includes(item)) // id
const devIds = JSON.parse(JSON.stringify(deviceIds)) const devIds = JSON.parse(JSON.stringify(deviceIds))
let region = [] let region = []
this.selectArea.forEach(item => {
if (this.selectAreaValue.includes(item.id)) {
this.selectAreaOptions.forEach(item => {
if (this.checkForm.selectAreaValue.includes(item.id)) {
region.push(item.name) region.push(item.name)
const arr = item.children.map(val => { return val.id }) // const arr = item.children.map(val => { return val.id }) //
deviceIds = deviceIds.concat(arr) deviceIds = deviceIds.concat(arr)
@ -328,11 +371,12 @@ export default {
} }
}) })
region = region.join(',') // str region = region.join(',') // str
const categoryIds = this.categoryValue.filter(item => item !== 0)
// const categoryIds = this.checkForm.categoryValue.filter(item => item !== 0)
const params = { const params = {
'categoryIds': categoryIds,
'categoryIds': this.checkForm.categoryValue,
'deviceIds': deviceIds, 'deviceIds': deviceIds,
'region': region
'region': region,
'checkType': this.checkForm.checkType
} }
return params return params
} }
@ -342,6 +386,7 @@ export default {
previewArrange(params).then(res => { previewArrange(params).then(res => {
this.tableData = res.content this.tableData = res.content
this.page.total = res.totalElements this.page.total = res.totalElements
this.loading = false
}) })
}, },
// //
@ -363,33 +408,47 @@ export default {
this.loading = false this.loading = false
}, },
// //
selectChange(val) {
const allCategory = JSON.parse(JSON.stringify(this.allCategory))
if (val[val.length - 1] === 0) { //
this.categoryValue = allCategory
} else {
const arr1 = this.oldCategory.filter(item => item !== 0)
const arr2 = val.filter(item => item !== 0)
if (arr1.length === arr2.length) { //
this.categoryValue = []
} else if (arr1.length < arr2.length && arr2.length === this.category.length - 1) {
this.categoryValue.unshift(0) //
} else {
this.categoryValue = this.categoryValue.filter(item => item !== 0) //
}
}
this.oldCategory = this.categoryValue
},
// selectChange(val) {
// const allCategory = JSON.parse(JSON.stringify(this.allCategory))
// if (val[val.length - 1] === 0) { //
// this.checkForm.categoryValue = allCategory
// } else {
// const arr1 = this.oldCategory.filter(item => item !== 0)
// const arr2 = val.filter(item => item !== 0)
// if (arr1.length === arr2.length) { //
// this.checkForm.categoryValue = []
// } else if (arr1.length < arr2.length && arr2.length === this.category.length - 1) {
// this.checkForm.categoryValue.unshift(0) //
// } else {
// this.checkForm.categoryValue = this.checkForm.categoryValue.filter(item => item !== 0) //
// }
// }
// this.oldCategory = this.checkForm.categoryValue
// },
// //
cell({ row, columnIndex }) { cell({ row, columnIndex }) {
if (columnIndex === 1) { if (columnIndex === 1) {
return 'fail-clear' return 'fail-clear'
} }
}, },
handleCaseDbClick(row) {
this.$refs.detailDom.rowData = row
const params = {
caseId: row.id
}
findInCase(params).then(res => {
if (res) {
this.$refs.detailDom.tableData = res.archives
}
})
this.$refs.detailDom.detailVisible = true
},
handleClose() { handleClose() {
this.getTreeMenu() this.getTreeMenu()
this.getCateMenu() this.getCateMenu()
this.tableData = [] this.tableData = []
this.isCaseOrFile = 0
this.$refs['form'].resetFields()
}, },
normalizer(node) { normalizer(node) {
if (node.children && !node.children.length) { if (node.children && !node.children.length) {
@ -398,7 +457,8 @@ export default {
return { return {
id: node.id, id: node.id,
label: node.cnName, label: node.cnName,
children: node.children
children: node.children,
isDisabled: node.isType !== 3 && node.isType !== 5
} }
} }
@ -411,6 +471,7 @@ export default {
.el-form{ .el-form{
display: flex; display: flex;
flex-wrap: wrap;
padding-left: 12px; padding-left: 12px;
} }
::v-deep .el-dialog{ ::v-deep .el-dialog{
@ -419,7 +480,7 @@ export default {
} }
::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{ ::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{
position: absolute; position: absolute;
right: -160px;
right: -190px;
bottom: -12px; bottom: -12px;
} }
::v-deep .el-dialog__body{ ::v-deep .el-dialog__body{

234
src/views/archivesManage/archivesList/index.vue

@ -1,3 +1,4 @@
<!-- eslint-disable no-return-assign -->
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 门类列表 --> <!-- 门类列表 -->
@ -17,8 +18,31 @@
<span class="left-bottom-line" /> <span class="left-bottom-line" />
<div class="tree-title">智能分类</div> <div class="tree-title">智能分类</div>
<!--智能分类树状结构--> <!--智能分类树状结构-->
<!-- @node-click="handleIntellNodeClick" -->
<!-- @check="nodeCheck" -->
<div class="tree-scroll"> <div class="tree-scroll">
<el-tree ref="smartTree" v-loading="intellClassifyLoading" :data="intellClassifyTree" :props="intellDefaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleIntellNodeClick" />
<el-tree
ref="smartTree"
v-loading="intellClassifyLoading"
:data="intellClassifyTree"
:props="intellDefaultProps"
node-key="dicName"
:check-strictly="true"
:default-expand-all="true"
:default-checked-keys="defaultCheckedKeys"
:expand-on-click-node="false"
@node-click="handleIntellNodeClick"
>
<template #default="{ node }">
<span :title="node.label">
<span>{{ node.label }}</span>
<span
v-if="node.checked && node.data.dicPid !== null"
class="el-icon-check"
/>
</span>
</template>
</el-tree>
</div> </div>
</div> </div>
</el-col> </el-col>
@ -105,6 +129,7 @@ export default {
default: false default: false
} }
}, },
data() { data() {
return { return {
intellClassifyTree: [], intellClassifyTree: [],
@ -122,6 +147,7 @@ export default {
anjuanSelection: {}, anjuanSelection: {},
projectSelection: {}, projectSelection: {},
intellClassifyLoading: false, intellClassifyLoading: false,
nodeCheckDataArr: [],
fixedStatusBar: false, fixedStatusBar: false,
archiveYear: null, archiveYear: null,
smartQuery: { smartQuery: {
@ -137,7 +163,8 @@ export default {
treeCurrentNode: null, treeCurrentNode: null,
nodeClick: false, nodeClick: false,
isHasProject: null, // isHasProject: null, //
isOneClick: false
isOneClick: false,
defaultCheckedKeys: []
} }
}, },
watch: { watch: {
@ -242,8 +269,12 @@ export default {
getDicts().then(data => { getDicts().then(data => {
if (data) { if (data) {
this.intellClassifyTree = data.filter(item => { this.intellClassifyTree = data.filter(item => {
item.checked = false
return item.dicCode === 'Search_MJ' || item.dicCode === 'Search_BGQX' || item.dicCode === 'WZ' || item.dicCode === 'ZT' || item.dicCode === 'QZH' return item.dicCode === 'Search_MJ' || item.dicCode === 'Search_BGQX' || item.dicCode === 'WZ' || item.dicCode === 'ZT' || item.dicCode === 'QZH'
}) })
this.intellClassifyTree.forEach(item => {
item.disabled = item.dicPid === null
})
} }
}) })
}, },
@ -258,7 +289,7 @@ export default {
// //
if (this.$refs.smartTree) { if (this.$refs.smartTree) {
this.treeCurrentNode = null this.treeCurrentNode = null
const smartTreeList = this.intellClassifyTree
// const smartTreeList = this.intellClassifyTree
this.smartQuery = { this.smartQuery = {
'archiveYear': null, 'archiveYear': null,
'department': null, 'department': null,
@ -269,10 +300,11 @@ export default {
'recordType': null, 'recordType': null,
'mediumType': null 'mediumType': null
} }
this.$refs.smartTree.setCurrentKey(null)
smartTreeList.forEach((item, index) => {
this.$refs.smartTree.store.nodesMap[smartTreeList[index].id].expanded = false
})
this.nodeCheckDataArr = []
this.$refs.smartTree.setCheckedKeys([])
// smartTreeList.forEach((item, index) => {
// this.$refs.smartTree.store.nodesMap[smartTreeList[index].dicName].expanded = false
// })
} }
this.crud.selectionChangeHandler([val]) this.crud.selectionChangeHandler([val])
this.selectedCategory = val this.selectedCategory = val
@ -405,20 +437,82 @@ export default {
if (this.$refs[obj].yearGroup.length !== 0) { if (this.$refs[obj].yearGroup.length !== 0) {
const newYearArr = this.$refs[obj].yearGroup.map((item, index) => { const newYearArr = this.$refs[obj].yearGroup.map((item, index) => {
const json = {} const json = {}
json.id = index
json.id = index + 1
json.dicName = item json.dicName = item
json.childMenus = [] json.childMenus = []
json.ifChild = true
json.dicPid = 0
return json return json
}) })
this.intellClassifyTree.unshift({ id: -1, dicName: '年度', dicCode: 'Search_year', childMenus: newYearArr })
this.intellClassifyTree.unshift({ id: 0, dicName: '年度', dicPid: null, dicCode: 'Search_year', disabled: true, childMenus: newYearArr })
console.log(this.intellClassifyTree)
} }
this.intellClassifyLoading = false this.intellClassifyLoading = false
}, 1000) }, 1000)
} }
}, },
unique(arr) {
return Array.from(new Set(arr))
},
//
uncheckChildren(node) {
if (node.childNodes && node.childNodes.length > 0) {
for (const child of node.childNodes) {
const index = this.nodeCheckDataArr.findIndex(item => item.data.dicName === child.data.dicName)
if (index !== -1) {
this.nodeCheckDataArr.splice(index, 1)
}
this.uncheckChildren(child)
}
switch (node.data.dicCode) {
case 'Search_year':
this.smartQuery.archiveYear = null
break
case 'Search_BM':
this.smartQuery.department = null
break
case 'Search_BGQX':
this.smartQuery.retention = null
break
case 'Search_MJ':
this.smartQuery.securityClass = null
break
case 'WZ':
this.smartQuery.recordType = null
break
case 'ZT':
this.smartQuery.mediumType = null
break
case 'QZH':
this.smartQuery.fondsNo = null
break
default:
this.smartQuery.organizationMatter = null
}
this.handleTableList()
}
},
// //
handleIntellNodeClick(data, node, ele) { handleIntellNodeClick(data, node, ele) {
console.log(node)
if (!this.nodeCheckDataArr.includes(node)) {
this.nodeCheckDataArr.push(node)
}
const oldItemIndex = this.nodeCheckDataArr.findIndex(item => item.data.dicName === node.data.dicName)
if (oldItemIndex !== -1) {
this.uncheckChildren(node)
// this.nodeCheckDataArr.splice(oldItemIndex, 1)
} else {
this.nodeCheckDataArr.push(node)
}
const parentDicName = node.parent.data.dicName
this.nodeCheckDataArr = this.nodeCheckDataArr.filter(item => item.parent.data.dicName !== parentDicName)
this.nodeCheckDataArr.push(node)
const ids = Array.from(new Set(this.nodeCheckDataArr.map(item => item.data.dicName)))
this.$refs.smartTree.setCheckedKeys(ids)
if (data) { if (data) {
if (node.childNodes.length === 0) { if (node.childNodes.length === 0) {
if (this.$refs.project) { if (this.$refs.project) {
@ -435,64 +529,66 @@ export default {
} }
const selectedKey = this.$refs.smartTree.getCurrentNode() const selectedKey = this.$refs.smartTree.getCurrentNode()
const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.data.dicCode const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.data.dicCode
this.treeCurrentNode = ele.$el this.treeCurrentNode = ele.$el
this.smartQuery = {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null,
'fondsNo': null,
'recordType': null,
'mediumType': null
}
if (ele.$el.classList.contains('is-current')) {
this.treeCurrentNode.classList.remove('is-current')
} else {
this.treeCurrentNode.classList.add('is-current')
switch (selectedParentVal) {
case 'Search_year':
if (selectedKey.dicCode !== 'Search_year') {
this.smartQuery.archiveYear = selectedKey.dicName
}
break
case 'Search_BM':
if (selectedKey.dicCode !== 'Search_BM') {
this.smartQuery.department = selectedKey.dicName
}
break
case 'Search_BGQX':
if (selectedKey.dicCode !== 'Search_BGQX') {
this.smartQuery.retention = selectedKey.dicName
}
break
case 'Search_MJ':
if (selectedKey.dicCode !== 'Search_MJ') {
this.smartQuery.securityClass = selectedKey.dicName
}
break
case 'WZ':
if (selectedKey.dicCode !== 'WZ') {
this.smartQuery.recordType = selectedKey.dicName
}
break
case 'ZT':
if (selectedKey.dicCode !== 'ZT') {
this.smartQuery.mediumType = selectedKey.dicName
}
break
case 'QZH':
if (selectedKey.dicCode !== 'QZH') {
this.smartQuery.fondsNo = selectedKey.dicName
}
break
default:
if (selectedKey.dicCode !== 'Search_JGWT') {
this.smartQuery.organizationMatter = selectedKey.dicName
}
}
// this.smartQuery = {
// 'archiveYear': null,
// 'department': null,
// 'retention': null,
// 'securityClass': null,
// 'organizationMatter': null,
// 'fondsNo': null,
// 'recordType': null,
// 'mediumType': null
// }
// if (ele.$el.classList.contains('is-current')) {
// this.treeCurrentNode.classList.remove('is-current')
// } else {
// this.treeCurrentNode.classList.add('is-current')
switch (selectedParentVal) {
case 'Search_year':
if (selectedKey.dicCode !== 'Search_year') {
this.smartQuery.archiveYear = selectedKey.dicName
}
break
case 'Search_BM':
if (selectedKey.dicCode !== 'Search_BM') {
this.smartQuery.department = selectedKey.dicName
}
break
case 'Search_BGQX':
if (selectedKey.dicCode !== 'Search_BGQX') {
this.smartQuery.retention = selectedKey.dicName
}
break
case 'Search_MJ':
if (selectedKey.dicCode !== 'Search_MJ') {
this.smartQuery.securityClass = selectedKey.dicName
}
break
case 'WZ':
if (selectedKey.dicCode !== 'WZ') {
this.smartQuery.recordType = selectedKey.dicName
}
break
case 'ZT':
if (selectedKey.dicCode !== 'ZT') {
this.smartQuery.mediumType = selectedKey.dicName
}
break
case 'QZH':
if (selectedKey.dicCode !== 'QZH') {
this.smartQuery.fondsNo = selectedKey.dicName
}
break
default:
if (selectedKey.dicCode !== 'Search_JGWT') {
this.smartQuery.organizationMatter = selectedKey.dicName
}
} }
this.handleTableList() this.handleTableList()
// }
} }
} }
}, },
@ -692,4 +788,12 @@ export default {
margin-left: 5px; margin-left: 5px;
} }
} }
// ::v-deep .el-tree {
// //
// .el-tree-node {
// .el-checkbox .el-checkbox__inner {
// display: none !important;
// }
// }
// }
</style> </style>

2
src/views/archivesManage/caseManage/caseList/index.vue

@ -124,7 +124,7 @@ import CRUD, { presenter, crud } 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'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import detailDialog from './module/detailDialog.vue'
import detailDialog from './module/detailDialog'
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
import printJS from 'print-js' import printJS from 'print-js'

Loading…
Cancel
Save