Browse Source

档案管理-分卷装盒/智能分类

master
xuhuajiao 3 years ago
parent
commit
16bf627b64
  1. 3
      src/assets/styles/archives-manage.scss
  2. 137
      src/views/archivesManage/archivesList/index.vue
  3. 5
      src/views/archivesManage/archivesList/module/archivesAnjuan/index.vue
  4. 20
      src/views/archivesManage/archivesList/module/packing/index.vue
  5. 6
      src/views/archivesManage/archivesList/module/uploadFile/index.vue

3
src/assets/styles/archives-manage.scss

@ -326,9 +326,6 @@ $arcCyan: #0FBED9;
text-align: right; text-align: right;
color: #3A99FD; color: #3A99FD;
} }
p{
// flex: 1;
}
} }
} }
::v-deep.hljs{ ::v-deep.hljs{

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

@ -144,6 +144,7 @@ export default {
} }
return null return null
}, },
// //
expandParents(node) { expandParents(node) {
node.expanded = true node.expanded = true
@ -195,14 +196,9 @@ export default {
getIntellClassify() { getIntellClassify() {
getDicts().then(data => { getDicts().then(data => {
if (data) { if (data) {
this.intellClassifyTree = data
// this.intellClassifyTree.filter(item => {
// if (item.childMenus !== null) {
// item.childMenus.map(val => {
// val.ifChild = true
// })
// }
// })
this.intellClassifyTree = data.filter(item => {
return item.dicCode === 'Search_MJ' || item.dicCode === 'Search_BGQX' || item.dicCode === 'Search_JGWT' || item.dicCode === 'Search_BM'
})
} }
}) })
}, },
@ -317,7 +313,7 @@ export default {
json.ifChild = true json.ifChild = true
return json return json
}) })
this.intellClassifyTree.unshift({ id: -1, dicName: '年度', childMenus: newYearArr })
this.intellClassifyTree.unshift({ id: -1, dicName: '年度', dicCode: 'Search_year', childMenus: newYearArr })
} }
this.intellClassifyLoading = false this.intellClassifyLoading = false
}, 500) }, 500)
@ -326,72 +322,63 @@ export default {
// //
handleIntellNodeClick(data, node, ele) { handleIntellNodeClick(data, node, ele) {
if (data) { if (data) {
const selectedKey = this.$refs.smartTree.getCurrentNode()
const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.label
this.treeCurrentNode = ele.$el
// if (data.ifChild) {
// this.treeCurrentNode = ele.$el
// const eles = document.querySelectorAll('.el-tree-node__children .el-tree-node.is-focusable')
// for (let i = 0; i < eles.length; i++) {
// eles[i].classList.remove('is-current')
// }
// this.treeCurrentNode.classList.add('is-current')
// } else {
// ele.$el.classList.remove('is-current')
// console.log(this.treeCurrentNode)
// if (this.treeCurrentNode) {
// this.treeCurrentNode.classList.add('is-current')
// }
// }
if (ele.$el.classList.contains('is-current')) {
this.treeCurrentNode.classList.remove('is-current')
this.smartQuery = {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
this.handleTableList()
} else {
this.treeCurrentNode.classList.add('is-current')
switch (selectedParentVal) {
case '年度':
this.treeCurrentNode.classList.remove('is-current')
if (selectedKey.dicName !== '年度') {
this.smartQuery.archiveYear = selectedKey.dicName
}
break
case '部门名称':
if (selectedKey.dicName !== '部门名称') {
this.smartQuery.department = selectedKey.dicName
}
break
case '保管期限':
if (selectedKey.dicName !== '保管期限') {
this.smartQuery.retention = selectedKey.dicName
}
break
case '密级':
if (selectedKey.dicName !== '密级') {
this.smartQuery.securityClass = selectedKey.dicName
}
break
case ' 机构(问题)':
if (selectedKey.dicName !== '机构(问题)') {
this.smartQuery.organizationMatter = selectedKey.dicName
}
break
default:
this.smartQuery = {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
if (node.childNodes.length === 0) {
const selectedKey = this.$refs.smartTree.getCurrentNode()
const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.data.dicCode
this.treeCurrentNode = ele.$el
// if (data.ifChild) {
// this.treeCurrentNode = ele.$el
// const eles = document.querySelectorAll('.el-tree-node__children .el-tree-node.is-focusable')
// for (let i = 0; i < eles.length; i++) {
// eles[i].classList.remove('is-current')
// }
// this.treeCurrentNode.classList.add('is-current')
// } else {
// ele.$el.classList.remove('is-current')
// console.log(this.treeCurrentNode)
// if (this.treeCurrentNode) {
// this.treeCurrentNode.classList.add('is-current')
// }
// }
if (ele.$el.classList.contains('is-current')) {
this.treeCurrentNode.classList.remove('is-current')
this.smartQuery = {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
} else {
this.treeCurrentNode.classList.add('is-current')
console.log(this.$refs.smartTree.getNode(selectedKey).parent.data)
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
default:
if (selectedKey.dicCode !== 'Search_JGWT') {
console.log(selectedKey.dicName)
this.smartQuery.organizationMatter = selectedKey.dicName
}
}
} }
this.handleTableList() this.handleTableList()
} }

5
src/views/archivesManage/archivesList/module/archivesAnjuan/index.vue

@ -125,7 +125,7 @@
<!-- state-active 已装/已入/已借/已绑 --> <!-- state-active 已装/已入/已借/已绑 -->
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 未装 / 已装 --> <!-- 未装 / 已装 -->
<span class="row-state row-packing state-active">{{ scope.row.case_no ? '已装': '未装' }}</span>
<span :class="['row-state', 'row-packing', scope.row.case_no?'state-active':'']">{{ scope.row.case_no ? '已装': '未装' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!recycleMain.isRecycle" label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> <el-table-column v-if="!recycleMain.isRecycle" label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
@ -143,7 +143,7 @@
<el-table-column v-if="!recycleMain.isRecycle" label="标签" width="100" align="center" :fixed="fixedStatusBar?false:'right'"> <el-table-column v-if="!recycleMain.isRecycle" label="标签" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 未绑 / 已绑 --> <!-- 未绑 / 已绑 -->
<span class="row-state row-binding">{{ scope.row.tid ? '已绑': '未绑' }}</span>
<span :class="['row-state', 'row-binding', scope.row.tid?'state-active':'']">{{ scope.row.tid ? '已绑': '未绑' }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -549,7 +549,6 @@ export default {
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.$message.success('删除成功!') this.$message.success('删除成功!')
this.selections = [] this.selections = []
debugger
this.getTableList() this.getTableList()
this.crud.refresh() this.crud.refresh()
}) })

20
src/views/archivesManage/archivesList/module/packing/index.vue

@ -249,7 +249,6 @@ export default {
} }
archivesParentsId = this.caseData.selections[0].id archivesParentsId = this.caseData.selections[0].id
} }
const arrParams = packingData.map(item => { const arrParams = packingData.map(item => {
const json = {} const json = {}
json.archivesId = item.id json.archivesId = item.id
@ -269,6 +268,7 @@ export default {
this.tableData = [] this.tableData = []
}) })
}, },
//
handlePartParking(row, index) { handlePartParking(row, index) {
if (!this.selections.length) { if (!this.selections.length) {
this.$message.error('请选择要装盒的档案!') this.$message.error('请选择要装盒的档案!')
@ -276,31 +276,24 @@ export default {
} }
this.selectTableData.push(row) this.selectTableData.push(row)
this.tableData.splice(index, 1) this.tableData.splice(index, 1)
this.archivesTable.splice(this.archivesTable.findIndex((item, i) => item.id === this.selections[i].id), this.selections.length)
console.log(row)
this.selections.forEach(item => { this.selections.forEach(item => {
item.caseId = row.id item.caseId = row.id
item.caseName = row.caseName item.caseName = row.caseName
this.archivesTable.splice(this.archivesTable.findIndex(val => val.id === item.id), 1)
this.selectArchivesTable.push(item) this.selectArchivesTable.push(item)
}) })
}, },
//
cancelParking(row, index) { cancelParking(row, index) {
this.tableData.unshift(row) this.tableData.unshift(row)
this.selectTableData.splice(index, 1) this.selectTableData.splice(index, 1)
const returnArr = []
this.selectArchivesTable.forEach((item, i) => { this.selectArchivesTable.forEach((item, i) => {
if (item.caseId === row.id) { if (item.caseId === row.id) {
console.log(item.id) console.log(item.id)
returnArr.push(item)
this.archivesTable.push(item)
} }
}) })
console.log(returnArr)
this.selectArchivesTable.splice(this.selectArchivesTable.findIndex((item, i) => item.id === returnArr[i].id), returnArr.length)
returnArr.forEach(item => {
this.archivesTable.unshift(item)
})
this.selectArchivesTable.splice(this.selectArchivesTable.findIndex((item, i) => item.caseId === row.id), this.archivesTable.length)
}, },
handleComfireCartoning() { handleComfireCartoning() {
if (this.archivesTable.length) { if (this.archivesTable.length) {
@ -322,7 +315,6 @@ export default {
json.categoryId = jnCategoryId json.categoryId = jnCategoryId
return json return json
}) })
console.log(arrParams)
this.FetchCartioning(arrParams) this.FetchCartioning(arrParams)
}, },
clearTableData() { clearTableData() {
@ -339,7 +331,7 @@ export default {
// dialog - close // dialog - close
handleClose(done) { handleClose(done) {
this.showCoverVisible = false this.showCoverVisible = false
// this.caseQuery[this.inputSelect] = ''
this.$set(this.caseQuery, this.inputSelect, '')
this.tableData = [] this.tableData = []
this.selectTableData = [] this.selectTableData = []
this.archivesTable = [] this.archivesTable = []

6
src/views/archivesManage/archivesList/module/uploadFile/index.vue

@ -19,9 +19,9 @@
@row-click="clickRowHandler" @row-click="clickRowHandler"
@selection-change="selectionChangeHandler" @selection-change="selectionChangeHandler"
> >
<el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="file_name" label="文件名称" min-width="140" align="center" />
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" align="center" />
<el-table-column prop="file_type" label="格式" min-width="60" align="center" /> <el-table-column prop="file_type" label="格式" min-width="60" align="center" />
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> <el-table-column prop="file_size" label="大小" min-width="85" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -39,7 +39,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="100" align="center" />
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" />
<el-table-column v-if="!isUploadDetail && !recycleMain.isRecycle" label="操作" min-width="100" align="center"> <el-table-column v-if="!isUploadDetail && !recycleMain.isRecycle" label="操作" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button> <el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>

Loading…
Cancel
Save