Browse Source

20240419需求更改

master
xuhuajiao 1 year ago
parent
commit
164eb31a63
  1. 16
      src/views/archivesManage/archivesList/module/archivesInfo/index.vue
  2. 682
      src/views/archivesManage/archivesList/module/uploadFile/index.vue
  3. 115
      src/views/archivesManage/archivesSearch/index.vue
  4. 9
      src/views/archivesManage/fileImport/dataImport/index.vue
  5. 4
      src/views/archivesManage/fileImport/importLog/index.vue
  6. 51
      src/views/archivesManage/fileImport/module/detail.vue
  7. 7
      src/views/components/WarehouseWarning.vue
  8. 10
      src/views/system/logManage/warnLog/index.vue
  9. 2
      src/views/system/user/index.vue

16
src/views/archivesManage/archivesList/module/archivesInfo/index.vue

@ -14,13 +14,13 @@
<!-- 基本信息 -->
<div v-if="archivesTabIndex==0" class="base-info item-content">
<el-row>
<el-col v-for="(item,index) in archivesDetailsData" v-show="index<archivesDetailsData.length-5" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item">
<el-col v-for="(item,index) in archivesDetailsData" v-show="index<archivesDetailsData.length-5" :key="index" :span="item.isLine || item.fieldName === 'barcode' ? 24 : 12" class="base-info-item">
<span>{{ item.fieldCnName }}</span>
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p>
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '196px' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p>
</el-col>
</el-row>
<el-row v-if="isDetailsInfo">
<el-col v-for="(item,index) in archivesDetailsData.slice(archivesDetailsData.length-5,archivesDetailsData.length)" :key="'last'+index" :span=" 12" class="base-info-item">
<el-col v-for="(item,index) in archivesDetailsData.slice(archivesDetailsData.length-5,archivesDetailsData.length)" :key="'last'+index" :span="item.isLine || item.fieldName === 'barcode' ? 24 : 12" class="base-info-item">
<span>{{ item.fieldCnName }}</span>
<div v-if="item.fieldName === 'folder_location' && item.context" :style="{ width: item.editLength+'px', marginTop:'-6px'}">
<div v-if="item.context.indexOf(',')">
@ -60,7 +60,7 @@
<script>
// import vkbeautify from 'vkbeautify'
import { form } from '@crud/crud'
// import { form } from '@crud/crud'
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import UploadFile from '../uploadFile/index'
import CallExternal from '@/api/storeManage/deviceManage/device'
@ -68,9 +68,9 @@ export default {
name: 'ArchivesInfo',
components: { UploadFile },
mixins: [
form({})
// form({})
],
inject: ['recycleMain'],
// inject: ['recycleMain'],
props: {
categoryId: {
type: String,
@ -108,9 +108,9 @@ export default {
},
methods: {
getDetial(rowId) {
getDetial(rowId, searchCategoryId) {
const params = {
categoryId: this.categoryId,
categoryId: searchCategoryId || this.categoryId,
archivesId: rowId
}
FetchArchivesDetails(params).then(data => {

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

@ -1,341 +1,341 @@
<template>
<div class="upload-file">
<!-- 上传附件curd -->
<div v-if="isUploadDetail" class="upload-curd">
<div class="upload-btn">
<el-button icon="el-icon-plus" size="small" type="primary">添加</el-button>
<input id="upFile" type="file" name="upFile" @change="changeFile($event)">
</div>
<el-button icon="el-icon-delete" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button>
<el-button icon="el-icon-sort" @click="showSort">排序</el-button>
</div>
<!--表格渲染-->
<el-table
ref="table"
:data="tableData"
style="min-width: 100%"
height="calc(100vh - 382px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<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 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_size" label="大小" min-width="85" align="center">
<template slot-scope="scope">
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }}
</template>
</el-table-column>
<el-table-column prop="file_dpi" label="分辨率" min-width="85" align="center" />
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center">
<template slot-scope="scope">
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'">
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)">
</div>
<div v-else>
<svg-icon icon-class="fujian" class-name="svg-style" />
</div>
</template>
</el-table-column>
<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">
<template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
</template>
</el-table-column>
</el-table>
<!-- 点击缩略图看大图 -->
<el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog" style="max-height:calc(100vh - 230px); overflow:auto;">
<img style="max-width:100%; object-fit: contain;" :src="previewSrc" :onerror="defaultImg">
</div>
</el-dialog>
<!-- 排序 -->
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="排序" :visible.sync="sortVisible" @opened="opened">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序</i>
<el-table :data="sortTableData" class="file-sort" style="width: 100%;max-height: 70vh;" row-key="id">
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="file_name" label="文件名称" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleSort">保存</el-button>
</div>
</div>
</el-dialog>
<!-- 删除附件 -->
<el-dialog title="删除附件" :append-to-body="true" :close-on-click-modal="false" :visible.sync="deleteVisible" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除已选择的附件吗</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList'
import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex'
import { form } from '@crud/crud'
import Sortable from 'sortablejs'
export default {
name: 'UploadFile',
components: {},
mixins: [
form({})
],
inject: ['recycleMain'],
props: {
isUploadDetail: {
type: Boolean,
default: true
},
categoryId: {
type: String,
default: function() {
return ''
}
},
arcId: {
type: String,
default: function() {
return ''
}
}
},
data() {
return {
defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"',
tableData: [], // list
selections: [], // table -
showCoverVisible: false, // dialog
sortTableData: [], // data
sortVisible: false, // dialog
deleteVisible: false, // dialog
deleteData: [], // data
file: null, // change
fileNames: '', // - name
formatType: '', // - type
postfix: '', // -
fileSize: '', // -
filePath: '', // - path
px: '', // -
nowDate: '', //
previewSrc: '' // src
}
},
computed: {
...mapGetters([
'baseApi'
])
},
watch: {
arcId: function(newValue, oldValue) {
}
},
methods: {
//
async changeFile(e) {
this.file = e.target.files[0]
this.fileSize = this.file.size
this.formatType = this.file.type.substring(0, this.file.type.indexOf('/'))
this.fileNames = this.file.name
this.postfix = this.file.name.substring(
this.fileNames.lastIndexOf('.') + 1,
this.fileNames.length
)
if (this.formatType === 'image') {
const fileBase64 = await this.getBase64(this.file)
const res = await this.getImgPx(fileBase64)
this.px = res.width + 'px*' + res.height + 'px'
} else {
this.px = ''
}
//
archivesUpload(this.baseApi + '/api/archives/uploadFile', this.file, this.categoryId).then(res => {
if (res.data.code === 200) {
this.filePath = res.data.data
this.uploadSave()
}
})
},
// -
uploadSave() {
this.nowDate = getCurrentTime()
const json = {
'file_name': this.fileNames,
'file_size': this.fileSize,
'file_type': this.postfix,
'file_path': this.filePath,
'sequence': null,
'archive_id': this.arcId,
'file_dpi': this.px,
'file_thumbnail': '',
'create_time': this.nowDate,
'id': null
}
const arrayUpload = []
arrayUpload.push(json)
const params = {
'categoryId': this.categoryId,
'jsonString': JSON.stringify(arrayUpload)
}
FetchEditFile(params).then(data => {
this.$message.success('上传附件成功!')
this.crud.refresh()
this.getFileList()
})
},
// base64
getBase64(file) {
const reader = new FileReader()
reader.readAsDataURL(file)
return new Promise((resolve) => {
reader.onload = () => {
resolve(reader.result)
}
})
},
//
getImgPx(img) {
const image = new Image()
image.src = img
return new Promise((resolve) => {
image.onload = () => {
const width = image.width
const height = image.height
resolve({ width, height })
}
})
},
// list
getFileList() {
const params = {
'categoryId': this.categoryId,
'archiveId': this.arcId
}
FetchInitArchiveFilesView(params).then(data => {
this.tableData = data.returnlist
})
},
//
downloadFile(row) {
const url = this.baseApi + '/downloadFile' + row.file_path
fetch(url).then(res => res.blob()).then(blob => {
downloadFile(blob, row.file_name.split('.')[0], row.file_type)
}).catch(() => {
this.$message.error('下载文件失败!')
})
},
//
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
},
//
handleDeltConfirm() {
this.deleteVisible = false
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
// fetch
FetchDeleteFile(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.crud.refresh()
this.getFileList()
})
},
// -
rowDrop(className, targetName) {
//
const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody')
const that = this
Sortable.create(tbody, {
//
draggable: '.el-table__row',
onEnd({ newIndex, oldIndex }) {
if (newIndex === oldIndex) return
that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0])
}
})
},
//
opened() {
this.rowDrop('file-sort', 'sortTableData')
},
showSort() {
this.sortVisible = true
this.sortTableData = JSON.parse(JSON.stringify(this.tableData))
},
// -
handleSort() {
const ids = []
const sequences = []
this.sortTableData.map((value, index) => {
ids.push(value.id)
sequences.push(index + 1)
})
const params = {
'categoryId': this.categoryId,
'ids': ids,
'sequences': sequences
}
FetchFileSort(params).then((res) => {
this.sortVisible = false
this.$message.success('附件排序成功!')
this.crud.refresh()
this.getFileList()
})
},
// table
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
},
// table
selectionChangeHandler(val) {
this.selections = val
},
// dialog - close
handleClose(done) {
this.showCoverVisible = false
done()
},
//
showCoverPreview(row) {
this.showCoverVisible = true
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
.svg-style{
width: 60px;
height: 32px;
}
</style>
<template>
<div class="upload-file">
<!-- 上传附件curd -->
<div v-if="isUploadDetail" class="upload-curd">
<div class="upload-btn">
<el-button icon="el-icon-plus" size="small" type="primary">添加</el-button>
<input id="upFile" type="file" name="upFile" @change="changeFile($event)">
</div>
<el-button icon="el-icon-delete" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button>
<el-button icon="el-icon-sort" @click="showSort">排序</el-button>
</div>
<!--表格渲染-->
<el-table
ref="table"
:data="tableData"
style="min-width: 100%"
height="calc(100vh - 382px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<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 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_size" label="大小" min-width="85" align="center">
<template slot-scope="scope">
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }}
</template>
</el-table-column>
<el-table-column prop="file_dpi" label="分辨率" min-width="85" align="center" />
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center">
<template slot-scope="scope">
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'">
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)">
</div>
<div v-else>
<svg-icon icon-class="fujian" class-name="svg-style" />
</div>
</template>
</el-table-column>
<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">
<template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
</template>
</el-table-column>
</el-table>
<!-- 点击缩略图看大图 -->
<el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog" style="max-height:calc(100vh - 230px); overflow:auto;">
<img style="max-width:100%; object-fit: contain;" :src="previewSrc" :onerror="defaultImg">
</div>
</el-dialog>
<!-- 排序 -->
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="排序" :visible.sync="sortVisible" @opened="opened">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序</i>
<el-table :data="sortTableData" class="file-sort" style="width: 100%;max-height: 70vh;" row-key="id">
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="file_name" label="文件名称" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleSort">保存</el-button>
</div>
</div>
</el-dialog>
<!-- 删除附件 -->
<el-dialog title="删除附件" :append-to-body="true" :close-on-click-modal="false" :visible.sync="deleteVisible" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除已选择的附件吗</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList'
import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex'
// import { form } from '@crud/crud'
import Sortable from 'sortablejs'
export default {
name: 'UploadFile',
components: {},
mixins: [
// form({})
],
inject: ['recycleMain'],
props: {
isUploadDetail: {
type: Boolean,
default: true
},
categoryId: {
type: String,
default: function() {
return ''
}
},
arcId: {
type: String,
default: function() {
return ''
}
}
},
data() {
return {
defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"',
tableData: [], // list
selections: [], // table -
showCoverVisible: false, // dialog
sortTableData: [], // data
sortVisible: false, // dialog
deleteVisible: false, // dialog
deleteData: [], // data
file: null, // change
fileNames: '', // - name
formatType: '', // - type
postfix: '', // -
fileSize: '', // -
filePath: '', // - path
px: '', // -
nowDate: '', //
previewSrc: '' // src
}
},
computed: {
...mapGetters([
'baseApi'
])
},
watch: {
arcId: function(newValue, oldValue) {
}
},
methods: {
//
async changeFile(e) {
this.file = e.target.files[0]
this.fileSize = this.file.size
this.formatType = this.file.type.substring(0, this.file.type.indexOf('/'))
this.fileNames = this.file.name
this.postfix = this.file.name.substring(
this.fileNames.lastIndexOf('.') + 1,
this.fileNames.length
)
if (this.formatType === 'image') {
const fileBase64 = await this.getBase64(this.file)
const res = await this.getImgPx(fileBase64)
this.px = res.width + 'px*' + res.height + 'px'
} else {
this.px = ''
}
//
archivesUpload(this.baseApi + '/api/archives/uploadFile', this.file, this.categoryId).then(res => {
if (res.data.code === 200) {
this.filePath = res.data.data
this.uploadSave()
}
})
},
// -
uploadSave() {
this.nowDate = getCurrentTime()
const json = {
'file_name': this.fileNames,
'file_size': this.fileSize,
'file_type': this.postfix,
'file_path': this.filePath,
'sequence': null,
'archive_id': this.arcId,
'file_dpi': this.px,
'file_thumbnail': '',
'create_time': this.nowDate,
'id': null
}
const arrayUpload = []
arrayUpload.push(json)
const params = {
'categoryId': this.categoryId,
'jsonString': JSON.stringify(arrayUpload)
}
FetchEditFile(params).then(data => {
this.$message.success('上传附件成功!')
this.crud.refresh()
this.getFileList()
})
},
// base64
getBase64(file) {
const reader = new FileReader()
reader.readAsDataURL(file)
return new Promise((resolve) => {
reader.onload = () => {
resolve(reader.result)
}
})
},
//
getImgPx(img) {
const image = new Image()
image.src = img
return new Promise((resolve) => {
image.onload = () => {
const width = image.width
const height = image.height
resolve({ width, height })
}
})
},
// list
getFileList() {
const params = {
'categoryId': this.categoryId,
'archiveId': this.arcId
}
FetchInitArchiveFilesView(params).then(data => {
this.tableData = data.returnlist
})
},
//
downloadFile(row) {
const url = this.baseApi + '/downloadFile' + row.file_path
fetch(url).then(res => res.blob()).then(blob => {
downloadFile(blob, row.file_name.split('.')[0], row.file_type)
}).catch(() => {
this.$message.error('下载文件失败!')
})
},
//
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
},
//
handleDeltConfirm() {
this.deleteVisible = false
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
// fetch
FetchDeleteFile(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.crud.refresh()
this.getFileList()
})
},
// -
rowDrop(className, targetName) {
//
const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody')
const that = this
Sortable.create(tbody, {
//
draggable: '.el-table__row',
onEnd({ newIndex, oldIndex }) {
if (newIndex === oldIndex) return
that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0])
}
})
},
//
opened() {
this.rowDrop('file-sort', 'sortTableData')
},
showSort() {
this.sortVisible = true
this.sortTableData = JSON.parse(JSON.stringify(this.tableData))
},
// -
handleSort() {
const ids = []
const sequences = []
this.sortTableData.map((value, index) => {
ids.push(value.id)
sequences.push(index + 1)
})
const params = {
'categoryId': this.categoryId,
'ids': ids,
'sequences': sequences
}
FetchFileSort(params).then((res) => {
this.sortVisible = false
this.$message.success('附件排序成功!')
this.crud.refresh()
this.getFileList()
})
},
// table
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
},
// table
selectionChangeHandler(val) {
this.selections = val
},
// dialog - close
handleClose(done) {
this.showCoverVisible = false
done()
},
//
showCoverPreview(row) {
this.showCoverVisible = true
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
.svg-style{
width: 60px;
height: 32px;
}
</style>

115
src/views/archivesManage/archivesSearch/index.vue

@ -46,7 +46,7 @@
:data="tableData"
style="width: 100%;"
height="calc(100vh - 534px)"
@row-dblclick="handleDbClick"
@cell-dblclick="handleDbClick"
@select-all="selectAll"
@row-click="clickRowHandler"
@select="handleCurrentChange"
@ -111,7 +111,8 @@
<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>
<!-- 详情 -->
<detailDialog ref="detailDom" @openCol="openCol" />
<!-- <detailDialog ref="detailDom" @openCol="openCol" /> -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<!-- 借阅 -->
<el-dialog title="借阅" :visible.sync="lengingVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
@ -130,13 +131,21 @@
</template>
<script>
import detailDialog from './module/detailDialog.vue'
import { querySeniorArchives, FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import ArchivesInfo from '../../archivesManage/archivesList/module/archivesInfo/index'
// import detailDialog from './module/detailDialog.vue'
// , FetchArchivesDetails, FetchArchivesMetadata
import { getCategoryTree } from '@/api/category/category'
import { querySeniorArchives } from '@/api/archivesManage/archivesList'
import { FetchIsExistBorrow, FetchAddArchivesWaitRegister } from '@/api/archivesManage/lendManage'
import CallExternal from '@/api/storeManage/deviceManage/device'
export default {
name: 'ArchivesSearch',
components: { detailDialog },
components: { ArchivesInfo },
provide() {
return {
recycleMain: this
}
},
props: {
isHomeSearch: {
type: Boolean,
@ -145,6 +154,9 @@ export default {
},
data() {
return {
categoryTree: null,
categoryId: null,
arcId: null,
loading: false,
tableData: [],
selections: [],
@ -205,6 +217,7 @@ export default {
await this.getDeviceListAll()
},
mounted() {
this.getCateMenu()
if (localStorage.getItem('homeSearchWords') !== null) {
this.keywords = localStorage.getItem('homeSearchWords')
const homeSearchSelect = localStorage.getItem('homeSearchSelect')
@ -254,36 +267,78 @@ export default {
handleCurrentChange(selection, row) {
this.selections = selection
},
getCateMenu() {
getCategoryTree().then(res => {
this.categoryTree = res
console.log('this.categoryTree', this.categoryTree)
})
},
findItemById(data, id) {
if (Array.isArray(data)) {
for (const item of data) {
const result = this.findItemById(item, id)
if (result) return result
}
} else if (typeof data === 'object') {
if (data.id === id) {
return data
} else {
if (data.children && data.children.length > 0) {
return this.findItemById(data.children, id)
}
}
}
return null
},
//
handleDbClick(row) {
const params = {
'categoryId': row.category_id,
'archivesId': row.archives_id
console.log(this.$refs.archivesInfo)
this.categoryId = row.category_id
this.arcId = row.archives_id
const currentCategory = this.findItemById(this.categoryTree, row.category_id)
console.log(currentCategory.isType)
if (currentCategory.isType === 3) {
this.$refs.archivesInfo.isHasFile = false
this.$refs.archivesInfo.isTidOrBorrow = true
} else {
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.isTidOrBorrow = false
}
FetchArchivesDetails(params).then(res => {
if (res) {
const rowData = {}
res.forEach(item => {
rowData[item.fieldName] = item.context
})
this.$refs.archivesInfo.isDetailsInfo = true
this.$refs.archivesInfo.detailTitle = '档案详情'
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
this.$refs.archivesInfo.getDetial(row.archives_id, row.category_id)
//
if (rowData.folder_location !== null) {
this.openLocation = rowData.folder_location
this.$refs.detailDom.isShowOpen = true
} else {
this.openLocation = null
this.$refs.detailDom.isShowOpen = false
}
// const params = {
// 'categoryId': row.category_id,
// 'archivesId': row.archives_id
// }
// FetchArchivesDetails(params).then(res => {
// if (res) {
// const rowData = {}
// res.forEach(item => {
// rowData[item.fieldName] = item.context
// })
this.$refs.detailDom.rowData = rowData
//
FetchArchivesMetadata(params).then(res => {
this.$refs.detailDom.xmlStr = res
})
this.$refs.detailDom.detailVisible = true
}
})
// //
// if (rowData.folder_location !== null) {
// this.openLocation = rowData.folder_location
// this.$refs.detailDom.isShowOpen = true
// } else {
// this.openLocation = null
// this.$refs.detailDom.isShowOpen = false
// }
// this.$refs.detailDom.rowData = rowData
// //
// FetchArchivesMetadata(params).then(res => {
// this.$refs.detailDom.xmlStr = res
// })
// this.$refs.detailDom.detailVisible = true
// }
// })
},
// /
handleSearch() {

9
src/views/archivesManage/fileImport/dataImport/index.vue

@ -30,7 +30,7 @@
</div>
<div v-show="isShow02" class="step-content">
<div class="import-data-number">案卷<span>{{ ajnum }}</span> / 卷内<span>{{ danum }}</span> / 资料<span>{{ djnum }}</span> </div>
<detail ref="importTableList" :is-log-or-preview="isLogOrPreview" />
<detail ref="importTableList" :is-log-or-preview="isLogOrPreview" :ajnum="ajnum" :danum="danum" :djnum="djnum" />
</div>
<div v-if="isShow02" class="step-bottom-btn">
<el-button @click="handleReturn02">上一步</el-button>
@ -91,9 +91,9 @@ export default {
key: 0,
file: null,
fileList: [],
ajnum: null,
danum: null,
djnum: null,
ajnum: 0,
danum: 0,
djnum: 0,
deleteVisible: false,
zipName: null,
form: {
@ -174,7 +174,6 @@ export default {
this.ajnum = res.ajnum
this.danum = res.danum
this.djnum = res.djnum
this.djnum = res.djnum
this.$refs.importTableList.tableData = res.list.content
this.$refs.importTableList.page.total = res.list.totalElements
this.timer = setTimeout(() => {

4
src/views/archivesManage/fileImport/importLog/index.vue

@ -80,18 +80,18 @@ export default {
},
//
handleDbClick(row) {
this.zipSelect = row
this.zipSelect = { ...row }
if (row.status === 0) {
this.$message({
type: 'info',
message: '当前批量数据导入中,请用户耐心等待,谢谢!'
})
} else {
this.detailVisible = true
crudFileImport.FetchInitImportLogDetail({ page: 0, size: 10, zipid: row.id, type: 1 }).then(res => {
this.$refs.importTableList.tableData = res.content
this.$refs.importTableList.page.total = res.totalElements
})
this.detailVisible = true
}
},
handleClose() {

51
src/views/archivesManage/fileImport/module/detail.vue

@ -121,6 +121,21 @@ export default {
default: function() {
return {}
}
},
//
ajnum: {
type: Number,
default: 0
},
//
danum: {
type: Number,
default: 0
},
//
djnum: {
type: Number,
default: 0
}
},
data() {
@ -137,9 +152,37 @@ export default {
readData: null
}
},
watch: {
zipSelect: {
handler(newVal, oldVal) {
console.log('newValue', newVal)
console.log('oldVal', oldVal)
if (newVal && newVal.ajNum !== 0) {
this.changeActiveTab(0)
} else if (newVal && newVal.djNum !== 0) {
this.changeActiveTab(2)
}
},
deep: true
}
},
mounted() {
console.log(this.zipSelect)
this.getTotalInfo()
this.$nextTick(() => {
if (this.isLogOrPreview === 'preview') {
if (this.ajnum && this.ajnum !== 0) {
this.changeActiveTab(0)
} else if (this.djnum && this.djnum !== 0) {
this.changeActiveTab(2)
}
} else {
if (this.zipSelect && this.zipSelect.ajNum !== 0) {
this.changeActiveTab(0)
} else if (this.zipSelect && this.zipSelect.djNum !== 0) {
this.changeActiveTab(2)
}
}
})
},
methods: {
changeActiveTab(index) {
@ -167,9 +210,9 @@ export default {
if (this.isLogOrPreview === 'preview') {
//
crudFileImport.FetchInitImportPreview({ page: this.page.page - 1, size: this.page.size, type: this.archivesTabIndex + 1 }).then(res => {
this.ajnum = res.ajnum
this.danum = res.danum
this.djnum = res.djnum
// this.ajnum = res.ajnum
// this.danum = res.danum
// this.djnum = res.djnum
this.tableData = res.list.content
this.page.total = res.list.totalElements
})

7
src/views/components/WarehouseWarning.vue

@ -82,7 +82,8 @@ export default {
} else {
this.scrollTimer = setInterval(() => {
this.getAlarmInfo()
}, 1000 * 3 * this.tableData.length)
}, 15000)
// * this.tableData.length
}
},
addTableRefScroll(bodyWrapper) {
@ -107,7 +108,9 @@ export default {
// }
// }
// }
}, 1000 * 3 * this.displayNum)
}, 15000)
// * this.displayNum
console.log('this.displayNum', this.displayNum)
}
},
getAlarmInfo() {

10
src/views/system/logManage/warnLog/index.vue

@ -37,17 +37,17 @@
@selection-change="selectionChangeHandler"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="state" label="状态" min-width="150" align="center">
<el-table-column type="index" label="序号" width="80" align="center" />
<el-table-column prop="state" label="状态" min-width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.state" class="clear">已处理</span>
<span v-if="!scope.row.state" class="clear">未处理</span>
</template>
</el-table-column>
<el-table-column prop="storeroomName" label="库房" align="center" min-width="150" />
<el-table-column prop="deviceName" label="设备" align="center" min-width="150" />
<el-table-column prop="content" label="警情描述" align="center" min-width="180" />
<el-table-column prop="remark" label="说明" align="center" min-width="180" />
<el-table-column prop="deviceName" label="设备" align="center" min-width="200" />
<el-table-column prop="content" label="警情描述" align="center" min-width="240" />
<!-- <el-table-column prop="remark" label="说明" align="center" min-width="180" /> -->
<el-table-column prop="create_time" label="报警时间" align="center" min-width="180">
<template slot-scope="scope">
<div>{{ scope.row.create_time | parseTime }}</div>

2
src/views/system/user/index.vue

@ -3,7 +3,6 @@
<el-row class="container-main" :gutter="20">
<!--侧边部门数据-->
<el-col :xs="9" :sm="6" :md="5" :lg="4" :xl="4">
<div class="head-container" style="padding-left:0">
<el-input v-model="deptName" clearable size="small" placeholder="输入部门名称搜索" prefix-icon="el-icon-search" class="filter-item" @input="getDeptDatas" />
</div>
@ -301,6 +300,7 @@ export default {
this.getRoleLevel()
this.getJobs()
form.enabled = form.enabled.toString()
form.dept.id = this.query.deptId
},
//
[CRUD.HOOK.beforeToAdd]() {

Loading…
Cancel
Save