Browse Source

需求更新

master
xuhuajiao 2 months ago
parent
commit
404a10cb86
  1. 2
      .env.development
  2. 2
      .env.production
  3. 2
      public/static/config.js
  4. 1
      src/assets/styles/yxk-admin.scss
  5. 6
      src/views/archivesManage/RFIDArchives/borrowerManage/index.vue
  6. 28
      src/views/archivesManage/RFIDArchives/borrowerManage/module/addBorrower.vue
  7. 10
      src/views/archivesManage/RFIDArchives/components/archiveDetail.vue
  8. 2
      src/views/archivesManage/RFIDArchives/components/lendArchivesList.vue
  9. 226
      src/views/archivesManage/RFIDArchives/returnArchives/index.vue
  10. 108
      src/views/archivesManage/RFIDArchives/toLend/index.vue
  11. 5
      src/views/archivesManage/RFIDArchives/toLend/module/lendRecord.vue
  12. 26
      src/views/archivesManage/archivesList/archivesAnjuan/index.vue
  13. 14
      src/views/archivesManage/archivesList/archivesJuannei/index.vue
  14. 2
      src/views/archivesManage/archivesList/module/archivesInfo/index.vue
  15. 34
      src/views/archivesManage/archivesSearch/index.vue
  16. 2
      src/views/archivesManage/lendManage/components/archiveDetail.vue
  17. 2
      src/views/archivesManage/lendManage/components/lendArchivesList.vue
  18. 5
      src/views/archivesManage/outInStorage/inStorage/module/inDialog.vue
  19. 336
      src/views/components/BindingTagDlg-olc.vue
  20. 180
      src/views/components/BindingTagDlg.vue
  21. 10
      src/views/components/category/PreviewForm.vue
  22. 24
      src/views/storeManage/deviceManage/index.vue
  23. 4
      src/views/storeManage/warehouse3D/archivesStorage/index.vue
  24. 2
      src/views/storeManage/warehouse3D/collateRoom/index.vue
  25. 13
      src/views/storeManage/warehouse3D/deseCabinet/index.vue
  26. 2
      src/views/storeManage/warehouse3D/index.vue
  27. 4
      src/views/storeManage/warehouse3D/module/hkVideo.vue
  28. 4
      src/views/storeManage/warehouse3DConfig/index.vue

2
.env.development

@ -14,7 +14,7 @@ ENV = 'development'
# 许镇-本地服地址
VUE_APP_BASE_API = 'http://192.168.99.72:7080'
VUE_APP_WS_API = 'ws://192.168.99.72:7080'
VUE_APP_WEBRTCSTREAMER_API = '192.168.99.100:8000'
VUE_APP_WEBRTCSTREAMER_API = '127.0.0.1:8000'
VUE_APP_SDEVID = "D003"
# 是否启用 babel-plugin-dynamic-import-node插件

2
.env.production

@ -4,7 +4,7 @@ ENV = 'production'
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
# VUE_APP_BASE_API = 'https://openapitest.aiyxlib.com'
# 火箭军
VUE_APP_BASE_API = 'http://192.168.1.100:7070'
VUE_APP_BASE_API = 'http://192.168.1.100:7080'
# VUE_APP_BASE_API = 'http://192.168.99.107:7070'
# 如果接口是 http 形式, wss 需要改为 ws
# 火箭军

2
public/static/config.js

@ -1,6 +1,6 @@
window.g = {
AXIOS_TIMEOUT: 10000,
ApiUrl: 'http://192.168.1.100:7070', // 配置服务器地址
ApiUrl: 'http://192.168.99.100:7080', // 配置服务器地址
ApiWebRtcServerUrl: '127.0.0.1:8000', // 配置监控视频服务器地址
sDevID:'D003' // 桌面式RFID读写器
}

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

@ -887,6 +887,7 @@
width: 680px !important;
.preview-content{
max-height: calc(100vh - 330px) !important;
min-height: calc(100vh - 620px) !important;
overflow: hidden !important;
overflow-y: auto !important;
border: none !important;

6
src/views/archivesManage/RFIDArchives/borrowerManage/index.vue

@ -36,10 +36,10 @@
<el-table-column type="selection" align="center" width="55" />
<el-table-column type="index" align="center" label="序号" width="100" />
<el-table-column prop="borrowerName" align="center" label="借阅人" min-width="85" />
<el-table-column prop="department" align="center" label="所属部门" min-width="85" />
<el-table-column prop="cardType" align="center" label="证件类型" min-width="85" />
<el-table-column prop="phone" align="center" label="编号" min-width="85" />
<!-- <el-table-column prop="cardType" align="center" label="证件类型" min-width="85" />
<el-table-column prop="idcard" align="center" label="证件号码" min-width="140" />
<el-table-column prop="phone" align="center" label="电话号码" min-width="120" />
<el-table-column prop="phone" align="center" label="电话号码" min-width="120" /> -->
<el-table-column prop="create_time" align="center" label="操作时间" min-width="120">
<template slot-scope="scope">
<div>{{ scope.row.create_time | parseTime }}</div>

28
src/views/archivesManage/RFIDArchives/borrowerManage/module/addBorrower.vue

@ -11,7 +11,7 @@
<el-form-item label="编号" prop="phone">
<el-input v-model.number="form.phone" />
</el-form-item>
<el-form-item label="所属部门" prop="department" class="down-select">
<!-- <el-form-item label="所属部门" prop="department" class="down-select">
<el-select v-model="form.department" placeholder="请选择">
<el-option
v-for="(item,index) in departOptions"
@ -33,7 +33,7 @@
</el-form-item>
<el-form-item label="证件号码" prop="idcard">
<el-input v-model="form.idcard" />
</el-form-item>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="crud.status.cu === 2" @click="crud.submitCU">确认</el-button>
@ -47,8 +47,8 @@
import { form } from '@crud/crud'
import { lendingCrud } from '../../mixins/lending'
// import { validatePhone } from '@/utils/validate'
const defaultForm = { borrowerName: '', cardType: '', department: '', id: '', idcard: '', phone: '' }
// , department: '', idcard: '', phone: ''
const defaultForm = { id: '', borrowerName: '', phone: '' }
export default {
name: 'AddBorrower',
@ -62,20 +62,20 @@ export default {
rules: {
borrowerName: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
phone: [{ required: true, trigger: 'blur', message: '请输入编号' }]
},
}
borrowGoalOptions: [
{ value: '工作考察', label: '工作考察' },
{ value: '学术考究', label: '学术考究' },
{ value: '经济建设', label: '经济建设' },
{ value: '落实政策', label: '落实政策' },
{ value: '个人取证', label: '个人取证' },
{ value: '其他', label: '其他' }
]
// borrowGoalOptions: [
// { value: '', label: '' },
// { value: '', label: '' },
// { value: '', label: '' },
// { value: '', label: '' },
// { value: '', label: '' },
// { value: '', label: '' }
// ]
}
},
mounted() {
this.getDepart()
// this.getDepart()
},
methods: {
}

10
src/views/archivesManage/RFIDArchives/components/archiveDetail.vue

@ -8,9 +8,9 @@
<p><span class="color-blue">单据号:</span><span class="color-white">{{ otherInfo.id }}</span></p>
<p><span class="color-blue">借阅人:</span><span class="color-white">{{ borrowerInfo.borrowerName }}</span></p>
<p><span class="color-blue">所属部门:</span><span class="color-white">{{ borrowerInfo.department }}</span></p>
<p><span class="color-blue">证件类型:</span><span class="color-white">{{ borrowerInfo.cardType }}</span></p>
<!-- <p><span class="color-blue">证件类型:</span><span class="color-white">{{ borrowerInfo.cardType }}</span></p>
<p><span class="color-blue">证件号码:</span><span class="color-white">{{ borrowerInfo.idcard }}</span></p>
<p><span class="color-blue">电话号码:</span><span class="color-white">{{ borrowerInfo.phone }}</span></p>
<p><span class="color-blue">电话号码:</span><span class="color-white">{{ borrowerInfo.phone }}</span></p> -->
<p><span class="color-blue">借阅目的:</span><span class="color-white">{{ otherInfo.purpose }}</span></p>
<p><span class="color-blue">借阅日期:</span><span class="color-white">{{ lendDatesInfo }}</span></p>
<p><span class="color-blue">借阅状态:</span><span :class="borrowStyle(otherInfo.borrow_type)">{{ otherInfo.borrow_type | borrowStatus }}</span></p>
@ -45,11 +45,11 @@
<span :class="borrowStyle(scope.row.borrowType)" style="width:76px">{{ scope.row.borrowType | borrowStatus }}</span>
</template>
</el-table-column>
<el-table-column v-if="isReturn" prop="borrowType" align="center" label="开架操作" min-width="100">
<!-- <el-table-column v-if="isReturn" prop="borrowType" align="center" label="开架操作" min-width="100">
<template slot-scope="scope">
<el-button v-if="scope.row.folderLocationDetails" size="mini" type="primary" @click="openCol(scope.row.folderLocationDetails)">开架</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</div>
</el-dialog>
@ -184,7 +184,7 @@ export default {
},
handleLookVideo() {
this.videoTipVisible = false
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.includes('CAM') })
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.toLowerCase().includes('cam') })
this.open = true
this.$nextTick(() => {
this.$refs.camera.camConfig = this.cameraData[0]

2
src/views/archivesManage/RFIDArchives/components/lendArchivesList.vue

@ -241,7 +241,7 @@ export default {
},
handleLookVideo() {
this.videoTipVisible = false
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.includes('CAM') })
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.toLowerCase().includes('cam') })
this.open = true
this.$nextTick(() => {
this.$refs.camera.camConfig = this.cameraData[0]

226
src/views/archivesManage/RFIDArchives/returnArchives/index.vue

@ -2,7 +2,18 @@
<div class="to-lend">
<div class="head-container head-archives clearfix">
<div class="archives-crud">
<el-button class="iconfont" type="mini"><i class="iconfont icon-rfid-fill" />RFID读取</el-button>
<!-- <el-button
class="iconfont"
type="mini"
:class="{ 'rfid-reading': isRfidReading, 'rfid-retrying': isRetrying }"
:disabled="false"
@click="toggleRfidRead"
>
<i class="iconfont icon-rfid-fill" />
<span v-if="!isRfidReading">RFID读取</span>
<span v-else-if="isRetrying">重试中({{ retryCount }}/3)</span>
<span v-else>停止读取</span>
</el-button> -->
<el-button size="mini" class="iconfont icon-guihuan-fanbai" :disabled="!selections.length" @click="handleReturn">归还</el-button>
<el-button :loading="crud.downloadLoading" :disabled="!selections.length" size="mini" icon="el-icon-download" @click="downloadApi">导出</el-button>
</div>
@ -86,6 +97,8 @@
<script>
import CRUD, { presenter } from '@crud/crud'
import { lendingCrud } from '../mixins/lending'
import { FetchBorrowByTid } from '@/api/archivesManage/lendManage'
import { readEpc } from '@/api/RFID/RFID'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
import releaseAlarm from '../components/releaseAlarm'
@ -116,9 +129,17 @@ export default {
queryOption: [
{ value: 'orderNo', label: '单据号' },
{ value: 'borrowerName', label: '借阅人' },
{ value: 'caseName', label: '档案盒' },
{ value: 'barcode', label: '条形码' }
]
{ value: 'caseName', label: '档案盒' }
// { value: 'barcode', label: '' }
],
isRfidReading: false, // RFIDtrue=false=
lastReadTid: '', // TID
isQuerying: false, //
readTimer: null, //
retryCount: 0, //
maxRetryCount: 3, //
isRetrying: false, //
messageTimer: null //
}
},
created() {
@ -149,6 +170,203 @@ export default {
this.confirmLendOrReturn(1, params, this.selections)
}
}
},
// RFID/
toggleRfidRead() {
if (this.isRfidReading) {
// isFromDestroy=false
this.stopRfidRead()
} else {
this.startRfidRead()
}
},
// RFID
startRfidRead() {
this.isRfidReading = true
this.lastReadTid = ''
this.retryCount = 0
this.isRetrying = false
this.$message.info('已启动RFID读取,正在等待标签...')
this.fetchRfidTag()
},
// RFID
stopRfidRead(isFromDestroy = false) {
if (!isFromDestroy && this.isRfidReading) {
this.$message.success('已停止RFID读取')
}
this.isRfidReading = false
this.isQuerying = false
this.isRetrying = false
if (this.readTimer) {
clearTimeout(this.readTimer)
this.readTimer = null
}
//
if (this.messageTimer) {
clearTimeout(this.messageTimer)
this.messageTimer = null
}
},
// RFID
async fetchRfidTag() {
if (!this.isRfidReading) return
if (this.isQuerying) {
this.readTimer = setTimeout(() => {
this.fetchRfidTag()
}, 1000)
return
}
try {
this.isQuerying = true
const sDevID = process.env.NODE_ENV === 'production' ? window.g.sDevID : process.env.VUE_APP_SDEVID
let res
try {
res = await readEpc({ op: 'RFID_ReadEpc', sDevID: sDevID })
} catch (rawErr) {
throw new Error(rawErr || 'RFID读取接口请求失败')
}
res = JSON.parse(res)
console.log('RFID读取接口返回:', res)
if (res && typeof res === 'object' && res.code === '0') {
this.retryCount = 0
this.isRetrying = false
}
if (!res) {
this.$message({ message: '绑定失败', type: 'error', offset: 8 })
this.handleReadError()
return
}
const result = res
if (result.code === '0') {
console.log('读取标签成功')
if (!result.data || !Array.isArray(result.data) || result.data.length === 0) {
this.$message({ message: '未读取到任何标签数据', type: 'warning', offset: 8 })
this.continueReadCycle()
return
}
const firstTag = result.data[0]
const tid = firstTag.tid || firstTag.TID
if (!tid) {
this.$message({ message: '读取到的标签缺少TID信息', type: 'warning', offset: 8 })
this.continueReadCycle()
return
}
if (tid === this.lastReadTid) {
this.continueReadCycle()
return
}
this.lastReadTid = tid
await this.queryArchiveByTid(tid)
} else if (result.code === '-1') {
this.$message({ message: result.message || '读取标签失败', type: 'error', offset: 8 })
this.handleReadError()
} else if (result.code === '-1000') {
console.log('读写器超时未响应,继续等待标签...')
this.handleReadError()
} else {
this.$message({ message: result.message || `读取失败,错误码:${result.code}`, type: 'error', offset: 8 })
this.handleReadError()
}
} catch (err) {
console.error('RFID读取过程异常:', err)
this.$message({ message: '读取标签时发生异常', type: 'error', offset: 8 })
this.handleReadError()
} finally {
this.isQuerying = false
}
},
// TID
async queryArchiveByTid(tid) {
try {
this.crud.loading = true
let archiveRes
try {
archiveRes = await FetchBorrowByTid({ tid })
} catch (rawErr) {
throw new Error(rawErr)
}
console.log('档案查询结果:', archiveRes)
if (archiveRes && archiveRes.code === 500) {
this.stopRfidRead(false)
this.$message({
message: `${archiveRes.message || '档案状态异常'},已停止RFID读取,请更换标签后重试(TID:${tid}`,
type: 'error',
offset: 8,
duration: 5000
})
return
}
if (Array.isArray(archiveRes) && archiveRes.length > 0) {
const archiveData = archiveRes[0]
const title = archiveData.maintitle || '无标题'
this.$message.success(`成功查询到档案(TID:${tid}):${title}`)
await this.crud.refresh()
this.continueReadCycle()
} else {
this.$message({ message: `TID【${tid}】未查询到对应档案`, type: 'warning', offset: 8 })
this.continueReadCycle()
}
} catch (err) {
// request.js
console.error('查询档案异常-TID:', tid, '错误信息:', err.message)
this.continueReadCycle()
} finally {
this.crud.loading = false
}
},
//
handleReadError() {
this.retryCount++
this.isRetrying = true
//
if (this.messageTimer) {
clearTimeout(this.messageTimer)
this.messageTimer = null
}
if (this.retryCount >= this.maxRetryCount) {
// 500ms
this.messageTimer = setTimeout(() => {
this.$message.error(`读取异常,已停止读取,请检查设备连接`)
// 1000ms
setTimeout(() => {
this.stopRfidRead()
}, 1000)
}, 500)
return
}
this.continueReadCycle()
},
//
continueReadCycle() {
if (!this.isRfidReading) return
const delay = this.isRetrying ? 2000 : 1000
this.readTimer = setTimeout(() => {
this.fetchRfidTag()
}, delay)
}
}
}

108
src/views/archivesManage/RFIDArchives/toLend/index.vue

@ -1,7 +1,6 @@
<template>
<div class="to-lend">
<div class="head-container">
<!-- RFID读取按钮始终可点击动态显示状态 -->
<el-button
class="iconfont"
type="mini"
@ -33,7 +32,7 @@
<el-table-column type="index" label="序号" align="center" width="55" />
<el-table-column prop="categoryName" label="门类名称" align="center" min-width="85" />
<el-table-column prop="archiveNo" label="档号" align="center" min-width="120" />
<el-table-column prop="maintitle" align="center" label="题名" min-width="120" />
<el-table-column prop="maintitle" align="center" label="题名" min-width="120" show-overflow-tooltip />
<el-table-column prop="caseName" align="center" label="盒名称" min-width="85" />
<el-table-column prop="folderLocationDetails" align="center" label="存放位置" min-width="160">
<template slot-scope="scope">
@ -74,7 +73,7 @@
<script>
import CRUD, { presenter } from '@crud/crud'
import { FetchBorrowByTid } from '@/api/archivesManage/lendManage'
import { FetchReadGW } from '@/api/RFID/RFID'
import { readEpc } from '@/api/RFID/RFID'
import { lendingCrud } from '../mixins/lending'
import pagination from '@crud/Pagination'
import lendRecord from './module/lendRecord.vue'
@ -109,12 +108,18 @@ export default {
readTimer: null, //
retryCount: 0, //
maxRetryCount: 3, //
isRetrying: false //
isRetrying: false, //
messageTimer: null //
}
},
beforeDestroy() {
//
this.stopRfidRead(true)
//
if (this.messageTimer) {
clearTimeout(this.messageTimer)
this.messageTimer = null
}
},
methods: {
//
@ -173,6 +178,11 @@ export default {
clearTimeout(this.readTimer)
this.readTimer = null
}
//
if (this.messageTimer) {
clearTimeout(this.messageTimer)
this.messageTimer = null
}
},
// RFID
@ -188,32 +198,41 @@ export default {
try {
this.isQuerying = true
const sDevID = process.env.NODE_ENV === 'production' ? window.g.sDevID : process.env.VUE_APP_SDEVID
const param = { 'sDevID': sDevID }
const res = await FetchReadGW(param)
let res
try {
res = await readEpc({ op: 'RFID_ReadEpc', sDevID: sDevID })
} catch (rawErr) {
throw new Error(rawErr || 'RFID读取接口请求失败')
}
res = JSON.parse(res)
console.log('RFID读取接口返回:', res)
this.retryCount = 0
this.isRetrying = false
if (res && typeof res === 'object' && res.code === '0') {
this.retryCount = 0
this.isRetrying = false
}
if (!res) {
this.$message({ message: '绑定失败', type: 'error', offset: 8 })
this.continueReadCycle()
return
}
let result
try {
result = typeof res === 'string' ? JSON.parse(res) : res
} catch (parseErr) {
console.error('解析RFID返回结果失败:', parseErr)
this.$message({ message: '读取标签数据格式错误', type: 'error', offset: 8 })
this.handleReadError()
return
}
const result = res
if (result.code === '0') {
console.log('读取标签成功')
const tid = result.tid || result.TID
if (!result.data || !Array.isArray(result.data) || result.data.length === 0) {
this.$message({ message: '未读取到任何标签数据', type: 'warning', offset: 8 })
this.continueReadCycle()
return
}
const firstTag = result.data[0]
const tid = firstTag.tid || firstTag.TID
if (!tid) {
this.$message({ message: '读取到的标签缺少TID信息', type: 'warning', offset: 8 })
this.continueReadCycle()
@ -232,7 +251,7 @@ export default {
this.handleReadError()
} else if (result.code === '-1000') {
console.log('读写器超时未响应,继续等待标签...')
this.continueReadCycle()
this.handleReadError()
} else {
this.$message({ message: result.message || `读取失败,错误码:${result.code}`, type: 'error', offset: 8 })
this.handleReadError()
@ -250,21 +269,42 @@ export default {
async queryArchiveByTid(tid) {
try {
this.crud.loading = true
const archiveRes = await FetchBorrowByTid({ tid })
let archiveRes
try {
archiveRes = await FetchBorrowByTid({ tid })
} catch (rawErr) {
throw new Error(rawErr)
}
console.log('档案查询结果:', archiveRes)
if (archiveRes && archiveRes.code !== 500 && archiveRes.data) {
this.$message.success(`成功查询到档案(TID:${tid}):${archiveRes.data.maintitle}`)
if (archiveRes && archiveRes.code === 500) {
this.stopRfidRead(false)
this.$message({
message: `${archiveRes.message || '档案状态异常'},已停止RFID读取,请更换标签后重试(TID:${tid}`,
type: 'error',
offset: 8,
duration: 5000
})
return
}
if (Array.isArray(archiveRes) && archiveRes.length > 0) {
const archiveData = archiveRes[0]
const title = archiveData.maintitle || '无标题'
this.$message.success(`成功查询到档案(TID:${tid}):${title}`)
await this.crud.refresh()
this.continueReadCycle()
} else {
this.$message({ message: `TID【${tid}】未查询到对应档案`, type: 'warning', offset: 8 })
this.continueReadCycle()
}
} catch (err) {
console.error('查询档案失败:', err)
this.$message({ message: `查询档案失败:${err.message || '网络异常'}`, type: 'error', offset: 8 })
// request.js
console.error('查询档案异常-TID:', tid, '错误信息:', err.message)
this.continueReadCycle()
} finally {
this.crud.loading = false
this.continueReadCycle()
}
},
@ -273,9 +313,21 @@ export default {
this.retryCount++
this.isRetrying = true
//
if (this.messageTimer) {
clearTimeout(this.messageTimer)
this.messageTimer = null
}
if (this.retryCount >= this.maxRetryCount) {
this.$message.error(`读取异常已重试${this.maxRetryCount}次,已停止读取,请检查设备连接`)
this.stopRfidRead()
// 500ms
this.messageTimer = setTimeout(() => {
this.$message.error(`读取异常,已停止读取,请检查设备连接`)
// 1000ms
setTimeout(() => {
this.stopRfidRead()
}, 1000)
}, 500)
return
}

5
src/views/archivesManage/RFIDArchives/toLend/module/lendRecord.vue

@ -82,7 +82,8 @@
</template>
<script>
import { FetchFindBorrowerByQuery, FetchReRegister } from '@/api/archivesManage/lendManage'
// FetchReRegister,
import { FetchFindBorrowerByQuery, FetchRegisterBorrow } from '@/api/archivesManage/lendManage'
import { form } from '@crud/crud'
// import { validatePhone } from '@/utils/validate'
import { lendingCrud } from '../../mixins/lending'
@ -179,7 +180,7 @@ export default {
'purpose': this.recordForm.purpose,
'rbIds': rbIds
}
FetchReRegister(params).then(data => {
FetchRegisterBorrow(params).then(data => {
console.log(data)
this.$message({
message: '登记成功!',

26
src/views/archivesManage/archivesList/archivesAnjuan/index.vue

@ -28,7 +28,7 @@
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="anjuanQuery[anjuanInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 220px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList">
<el-select slot="prepend" v-model="anjuanInputSelect" style="width: 112px" @change="querySelect(anjuanInputSelect)">
<el-select slot="prepend" v-model="anjuanInputSelect" style="width: 90px" @change="querySelect(anjuanInputSelect)">
<el-option
v-for="item in queryOption"
:key="item.value"
@ -346,21 +346,21 @@ export default {
resetQuery() {
if (this.selectedCategory.isType === 5) {
this.queryOption = [
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '档号' },
{ value: 'responsibleby', label: '责任者' },
{ value: 'docNo', label: '发文字号 ' },
{ value: 'barcode', label: '条形码' },
{ value: 'folderLocation', label: '地址码' },
{ value: 'tempNo', label: '临时卷号' }
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '编号' }
// { value: 'responsibleby', label: '' },
// { value: 'docNo', label: ' ' },
// { value: 'barcode', label: '' },
// { value: 'folderLocation', label: '' },
// { value: 'tempNo', label: '' }
]
} else {
this.queryOption = [
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '档号' },
{ value: 'archiveCtgNo', label: '实体分类号' },
{ value: 'barcode', label: '条形码' },
{ value: 'folderLocation', label: '地址码' }
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '档号' }
// { value: 'archiveCtgNo', label: '' },
// { value: 'barcode', label: '' },
// { value: 'folderLocation', label: '' }
]
}
this.anjuanInputSelect = this.queryOption[0].value

14
src/views/archivesManage/archivesList/archivesJuannei/index.vue

@ -29,7 +29,7 @@
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="juanneiQuery[juanneiInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 220px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList">
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 100px" @change="querySelect(juanneiInputSelect)">
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 90px" @change="querySelect(juanneiInputSelect)">
<el-option
v-for="item in queryOption"
:key="item.value"
@ -240,12 +240,12 @@ export default {
junneiData: [],
juanneiQuery: {},
queryOption: [
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '档号' },
{ value: 'responsibleby', label: '责任者' },
{ value: 'documentNo', label: '文件编号 ' },
{ value: 'barcode', label: '条形码' },
{ value: 'folderLocation', label: '地址码' }
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '编号' }
// { value: 'responsibleby', label: '' },
// { value: 'documentNo', label: ' ' },
// { value: 'barcode', label: '' },
// { value: 'folderLocation', label: '' }
],
juanneiInputSelect: '',
lengingVisible: false, //

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

@ -10,7 +10,7 @@
<li v-if="isHasFile" :class="{'active': archivesTabIndex == 1}" @click="changeActiveTab(1)">附件</li>
<li :class="{'active': archivesTabIndex == 2}" @click="changeActiveTab(2)">元数据</li>
</ul>
<el-button v-if="isShowOpen" style="position: absolute; right: 30px; top: 0; z-index: 9999;" @click="openCol">开架</el-button>
<!-- <el-button v-if="isShowOpen" style="position: absolute; right: 30px; top: 0; z-index: 9999;" @click="openCol">开架</el-button> -->
<!-- 基本信息 -->
<div v-if="archivesTabIndex==0" class="base-info item-content">
<el-row>

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

@ -66,9 +66,9 @@
</el-table-column>
<el-table-column prop="category_name" label="门类名称" align="center" show-overflow-tooltip min-width="170" />
<el-table-column prop="child" label="子条数目" align="center" width="100" />
<el-table-column prop="archive_no" label="号" align="center" show-overflow-tooltip min-width="220" />
<el-table-column prop="maintitle" label="名" show-overflow-tooltip align="center" min-width="240" />
<el-table-column prop="doc_no" label="发文字号" show-overflow-tooltip width="140" align="center" />
<el-table-column prop="archive_no" label="号" align="center" show-overflow-tooltip min-width="220" />
<el-table-column prop="maintitle" label="名" show-overflow-tooltip align="center" min-width="240" />
<!-- <el-table-column prop="doc_no" label="发文字号" show-overflow-tooltip width="140" align="center" />
<el-table-column prop="serial_no" label="序号" width="100" align="center" />
<el-table-column prop="fonds_no" label="全宗号" align="center" min-width="180" />
<el-table-column prop="archive_year" label="年度" align="center" min-width="100" />
@ -76,7 +76,7 @@
<el-table-column prop="retention" label="保管期限" align="center" min-width="100" />
<el-table-column prop="arrive_class" label="收发类别" width="140" align="center" />
<el-table-column prop="temp_no" label="临时卷号" show-overflow-tooltip width="140" align="center" />
<el-table-column prop="created_date" label="成文日期" align="center" min-width="180" />
<el-table-column prop="created_date" label="成文日期" align="center" min-width="180" /> -->
<el-table-column prop="case_name" label="盒名称" show-overflow-tooltip align="center" min-width="200" />
<el-table-column prop="folder_location_details" label="所在位置" align="center" min-width="300">
<template slot-scope="scope">
@ -174,19 +174,19 @@ export default {
keywords: '',
select: ['maintitle'],
options: [
{ value: 'maintitle', label: '名' },
{ value: 'archive_no', label: '档号' },
{ value: 'responsibleby', label: '责任者' },
{ value: 'doc_no', label: '发文字号' },
{ value: 'record_type', label: '文种' },
{ value: 'fonds_no', label: '全宗号' },
{ value: 'archive_year', label: '年度' },
{ value: 'security_class', label: '密级' },
{ value: 'retention', label: '保管期限' },
{ value: 'case_name', label: '盒名称' },
{ value: 'barcode', label: '条形码' },
{ value: 'folder_location', label: '地址码' },
{ value: 'temp_no', label: '临时卷号' }
{ value: 'maintitle', label: '名' },
{ value: 'archive_no', label: '编号' }
// { value: 'responsibleby', label: '' },
// { value: 'doc_no', label: '' },
// { value: 'record_type', label: '' },
// { value: 'fonds_no', label: '' },
// { value: 'archive_year', label: '' },
// { value: 'security_class', label: '' },
// { value: 'retention', label: '' },
// { value: 'case_name', label: '' },
// { value: 'barcode', label: '' },
// { value: 'folder_location', label: '' },
// { value: 'temp_no', label: '' }
],
page: {
total: 0,

2
src/views/archivesManage/lendManage/components/archiveDetail.vue

@ -184,7 +184,7 @@ export default {
},
handleLookVideo() {
this.videoTipVisible = false
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.includes('CAM') })
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.toLowerCase().includes('cam') })
this.open = true
this.$nextTick(() => {
this.$refs.camera.camConfig = this.cameraData[0]

2
src/views/archivesManage/lendManage/components/lendArchivesList.vue

@ -241,7 +241,7 @@ export default {
},
handleLookVideo() {
this.videoTipVisible = false
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.includes('CAM') })
this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.toLowerCase().includes('cam') })
this.open = true
this.$nextTick(() => {
this.$refs.camera.camConfig = this.cameraData[0]

5
src/views/archivesManage/outInStorage/inStorage/module/inDialog.vue

@ -129,7 +129,7 @@
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<p>入库成功</p>
<p style="color:#f00;margin:10px 0;display:block">提示如果当前设备不在线或者未勾选联动操作请人工完成上架操作</p>
<!-- <p style="color:#f00;margin:10px 0;display:block">提示如果当前设备不在线或者未勾选联动操作请人工完成上架操作</p> -->
</div>
</el-dialog>
</div>
@ -299,7 +299,8 @@ export default {
if (this.deviceType === 1) {
params = {
deviceId: this.deviceId, //
position: this.fieldNum + '-' + obj.colNum + '-' + obj.sectionNum + '-' + obj.levelNum + '-' + obj.direction,
// position: this.fieldNum + '-' + obj.colNum + '-' + obj.sectionNum + '-' + obj.levelNum + '-' + obj.direction,
position: obj.colNum + '-' + obj.direction + '-' + obj.sectionNum + '-' + obj.levelNum,
deviceType: this.deviceType
}
} else {

336
src/views/components/BindingTagDlg-olc.vue

@ -0,0 +1,336 @@
<template>
<div>
<el-dialog ref="bindingTagDialog" class="bindingDialog" :title="bindingTitle" :visible.sync="bindingVisible" :close-on-click-modal="false" :before-close="handleClose" @opened="opened">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="binding-wrap">
<div v-if="isBinding" class="rebinding">
<span>TID</span>
<el-input v-model="tidCode" placeholder="请输入内容" />
</div>
<div v-else class="binding-flow">
<div class="step-item">
<!-- step-active 完成 step-loading 进行种 -->
<span class="step-left-num" :class="{ 'step-active': 1 <= step, 'step-loading': 1 === step }">1</span>
<div class="step-right-cont">
<p class="step-title">第一步<span>连接读写器</span></p>
<p class="step-tip" :class="{ 'tip-error': 1 === errorStep, 'tip-active': 1 <= step }">{{ step1Message }}</p>
<!-- err: 连接失败请检查网络 -->
<!-- err: 当前电脑未绑定读写器请到档案设备里进行绑定 -->
</div>
</div>
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 2 <= step, 'step-loading': 2 === step }">2</span>
<div class="pulse1" />
<div class="pulse2" />
<div class="pulse3" />
<div class="step-right-cont">
<p class="step-title">第二步<span>放入标签</span></p>
<p class="step-tip" :class="{ 'tip-error': 2 === errorStep, 'tip-active': 2 <= step }">{{ step2Message }}</p>
<!-- tip: 请放入标签 -->
<!-- tip: 已放入标签 -->
<!-- err: 未读取到标签请重新放入 -->
</div>
</div>
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 3 <= step, 'step-loading': 3 === step }">3</span>
<div class="step-right-cont">
<p class="step-title">第三步<span>读取标签</span></p>
<p class="step-tip" :class="{ 'tip-error': 3 === errorStep, 'tip-active': 3 <= step }">{{ step3Message }}</p>
<!-- tip: 放入标签后开始读取标签 -->
<!-- tip: 读取成功 -->
<!-- err: 当前标签存在多个请取出多余的标签只保留一张 -->
</div>
</div>
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 4 <= step, 'step-loading': 4 === step }">4</span>
<div class="step-right-cont">
<p class="step-title">第四步<span>开始绑定</span></p>
<p class="step-tip" :class="{ 'tip-error': 4 === errorStep, 'tip-active': 4 <= step }">{{ step4Message }}</p>
<!-- tip: 标签读取成功后开始绑定档案 -->
<!-- tip: 绑定中 -->
<!-- err: 当前标签已被绑定是否覆盖 -->
<!-- 3s后 弹出覆盖绑定dialog -->
<!-- tip: 已覆盖 -->
<!-- err: 绑定失败请拿走当前标签 -->
</div>
</div>
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 5 === step }">5</span>
<div class="step-right-cont">
<p class="step-title">第五步<span>绑定成功</span></p>
<p class="step-tip" :class="{ 'tip-error': 5 === errorStep,'tip-active': 5 === step }">{{ step5Message }}</p>
<!-- tip: 当前标签与档案绑定成功 -->
<!-- tip: 绑定成功 -->
</div>
</div>
</div>
<div v-if="isBinding" slot="footer" class="dialog-footer">
<el-button type="primary" @click="nextStep">下一步</el-button>
</div>
</div>
</div>
</el-dialog>
<!-- 是否覆盖 -->
<el-dialog ref="coverBindingDialog" title="覆盖绑定" :append-to-body="true" :visible.sync="coverBindingVisible" :before-close="handleCoverBindingClose">
<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="doCoverBinding">确定覆盖</el-button>
<el-button type="text" @click="cancel">取消</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import RFID from '@/api/RFID/RFID'
import { bingdingLabel } from '@/api/storeManage/tagManage/bindTagList'
export default {
name: 'BindingTagDlg',
components: {},
mixins: [],
props: {
bindingId: {
type: String,
default: ''
},
bindingType: {
type: Number,
default: 1
},
bindingTxt: {
type: String,
default: '档案'
}
},
data() {
return {
isBinding: false, //
bindingVisible: false, //
tidCode: '',
coverBindingVisible: false,
step: 1,
errorStep: 0,
step1Message: '连接中',
step2Message: '请放入标签',
step3Message: '放入标签后开始读取标签',
step4Message: '标签读取成功后,开始绑定档案',
step5Message: '当前标签与' + this.bindingTxt + '绑定成功',
readData: {},
timeOut: null,
timer: null,
devIp: '',
devId: ''
}
},
computed: {
bindingTitle: function() {
return this.isBinding ? '重新绑定' : '绑定标签'
}
},
beforeDestroy() {
//
clearTimeout(this.timeOut)
this.timeOut = null
},
methods: {
initData() {
this.step = 1
this.errorStep = 0
this.step1Message = '连接中'
this.step2Message = '请放入标签'
this.step3Message = '放入标签后开始读取标签'
this.step4Message = '标签读取成功后,开始绑定档案'
this.step5Message = '当前标签与' + this.bindingTxt + '绑定成功'
this.isBinding = false
this.coverLabel = false
this.tidCode = ''
},
async checkStatus(param) {
return RFID.checkStatus(param).then((res) => {
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.step = 2
this.step1Message = '连接成功'
return true
} else {
this.errorStep = 1
if (res.code && res.code === '-1') {
this.step1Message = '读写器状态异常(例如读写器USB线未插入)'
} else if (res.code === '-1000') {
this.step1Message = '读写器超时未响应(例如终端读写服务未开启或网络异常)'
}
}
})
},
readEpc(param) {
return new Promise((resolve, reject) => {
RFID.readEpc(param).then(res => {
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.step = 3
this.errorStep = 0
this.step2Message = '已放入标签'
if (res.data.length > 1) {
this.errorStep = 3
this.step3Message = '当前标签存在多个,请取出多余的标签只保留一张!'
clearTimeout(this.timer)
this.timer = setTimeout(() => {
resolve(this.readEpc(param))
}, 2000)
} else if (res.data.length === 1) {
this.readData = res.data[0]
this.step3Message = '读取成功!'
this.step = 4
resolve()
}
} else if (res.code && res.code === '-2') {
this.errorStep = 2
this.step2Message = '未读取到标签,请重新放入'
this.step = 2
clearTimeout(this.timer)
this.timer = setTimeout(() => {
resolve(this.readEpc(param))
}, 2000)
} else {
this.errorStep = 2
this.step2Message = '读取标签失败'
reject()
}
})
})
},
async tryConnect(param) {
let res
let err
const MAX_NUM_RETRIES = 3
for (let i = 0; i < MAX_NUM_RETRIES; i++) {
try {
res = await this.checkStatus(param)
break
} catch (e) {
err = e
this.errorStep = 1
this.step1Message = '连接失败,请检查网络'
}
}
if (res) return res
// this.timeOut = setTimeout(() => {
// this.$refs.bindingTagDialog.handleClose()
// }, 3000)
throw err
},
async startBind(isCover) {
console.log(isCover)
return await new Promise(async(resolve, reject) => {
this.step4Message = '绑定中'
const data = { id: this.bindingId, labelType: this.bindingType, tid: this.readData.tid }
if (isCover || this.readData.tid === this.tidCode) {
data.coverLabel = true
}
const res = await bingdingLabel(data)
if (res === '当前标签已被绑定') {
this.coverBindingVisible = true
resolve()
} else if (res === 1) {
let writeRes = await RFID.writeEPC({ op: 'RFID_WriteEPC', sDevID: this.devId, EAS: '1', Type: this.bindingType, Code: this.bindingId, Tid: this.readData.tid, ip: this.devIp })
writeRes = JSON.parse(writeRes)
if (writeRes.code === '0') {
this.step = 5
resolve()
} else if (writeRes.code === '-1') {
// this.$message({
// message: writeRes.message,
// type: 'error',
// duration: 2500
// })
this.errorStep = 5
this.step5Message = writeRes.message
reject()
} else if (writeRes.code === '-1000') {
// this.$message({
// message: '',
// type: 'error',
// duration: 2500
// })
this.errorStep = 5
this.step5Message = '读写器超时未响应'
reject()
}
} else {
this.step5Message = '绑定失败'
this.errorStep = 5
reject()
}
})
},
async getDevId() {
return await new Promise(async(resolve, reject) => {
const mac = await RFID.getDeviceMac()
if (!mac || mac === '') {
this.step1Message = '获取mac地址失败'
this.errorStep = 1
reject('获取mac地址失败')
} else {
const dev = await RFID.getDeviceIdByMac(mac)
if (!dev || dev === {} || !dev.deviceId) {
this.step1Message = '当前电脑未绑定读写器,请到档案设备里进行绑定'
this.errorStep = 1
reject('当前电脑未绑定读写器,请到档案设备里进行绑定')
} else {
resolve(dev)
}
}
})
},
async opened() {
if (!this.isBinding) {
const devInfo = await this.getDevId()
this.devId = devInfo.deviceId
this.devIp = devInfo.deviceIp + ':' + devInfo.devicePort
await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: devInfo.deviceId, ip: this.devIp })
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: devInfo.deviceId, ip: this.devIp })
await this.startBind()
}
},
async nextStep() {
this.isBinding = false
this.opened()
},
//
handleClose(done) {
this.coverBindingVisible = false
this.$emit('refresh')
done()
this.initData()
if (this.timer) {
clearTimeout(this.timer)
}
},
handleCoverBindingClose(done) {
done()
this.bindingVisible = false
this.initData()
},
doCoverBinding() {
this.coverBindingVisible = false
this.startBind(true)
},
cancel() {
this.$refs.coverBindingDialog.handleClose()
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
</style>

180
src/views/components/BindingTagDlg.vue

@ -10,44 +10,37 @@
<el-input v-model="tidCode" placeholder="请输入内容" />
</div>
<div v-else class="binding-flow">
<!-- 核心修改1步骤编号从1开始原第二步现在第一步 -->
<div class="step-item">
<!-- step-active 完成 step-loading 进行种 -->
<span class="step-left-num" :class="{ 'step-active': 1 <= step, 'step-loading': 1 === step }">1</span>
<div class="step-right-cont">
<p class="step-title">第一步<span>连接读写器</span></p>
<p class="step-tip" :class="{ 'tip-error': 1 === errorStep, 'tip-active': 1 <= step }">{{ step1Message }}</p>
<!-- err: 连接失败请检查网络 -->
<!-- err: 当前电脑未绑定读写器请到档案设备里进行绑定 -->
</div>
</div>
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 2 <= step, 'step-loading': 2 === step }">2</span>
<div class="pulse1" />
<div class="pulse2" />
<div class="pulse3" />
<div class="step-right-cont">
<p class="step-title"><span>放入标签</span></p>
<p class="step-tip" :class="{ 'tip-error': 2 === errorStep, 'tip-active': 2 <= step }">{{ step2Message }}</p>
<p class="step-title">第一步<span>放入标签</span></p>
<p class="step-tip" :class="{ 'tip-error': 1 === errorStep, 'tip-active': 1 <= step }">{{ step1Message }}</p>
<!-- tip: 请放入标签 -->
<!-- tip: 已放入标签 -->
<!-- err: 未读取到标签请重新放入 -->
</div>
</div>
<!-- 原第三步现在第二步 -->
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 3 <= step, 'step-loading': 3 === step }">3</span>
<span class="step-left-num" :class="{ 'step-active': 2 <= step, 'step-loading': 2 === step }">2</span>
<div class="step-right-cont">
<p class="step-title"><span>读取标签</span></p>
<p class="step-tip" :class="{ 'tip-error': 3 === errorStep, 'tip-active': 3 <= step }">{{ step3Message }}</p>
<p class="step-title"><span>读取标签</span></p>
<p class="step-tip" :class="{ 'tip-error': 2 === errorStep, 'tip-active': 2 <= step }">{{ step2Message }}</p>
<!-- tip: 放入标签后开始读取标签 -->
<!-- tip: 读取成功 -->
<!-- err: 当前标签存在多个请取出多余的标签只保留一张 -->
</div>
</div>
<!-- 原第四步现在第三步 -->
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 4 <= step, 'step-loading': 4 === step }">4</span>
<span class="step-left-num" :class="{ 'step-active': 3 <= step, 'step-loading': 3 === step }">3</span>
<div class="step-right-cont">
<p class="step-title"><span>开始绑定</span></p>
<p class="step-tip" :class="{ 'tip-error': 4 === errorStep, 'tip-active': 4 <= step }">{{ step4Message }}</p>
<p class="step-title"><span>开始绑定</span></p>
<p class="step-tip" :class="{ 'tip-error': 3 === errorStep, 'tip-active': 3 <= step }">{{ step3Message }}</p>
<!-- tip: 标签读取成功后开始绑定档案 -->
<!-- tip: 绑定中 -->
<!-- err: 当前标签已被绑定是否覆盖 -->
@ -56,11 +49,12 @@
<!-- err: 绑定失败请拿走当前标签 -->
</div>
</div>
<!-- 原第五步现在第四步 -->
<div class="step-item">
<span class="step-left-num" :class="{ 'step-active': 5 === step }">5</span>
<span class="step-left-num" :class="{ 'step-active': 4 === step }">4</span>
<div class="step-right-cont">
<p class="step-title"><span>绑定成功</span></p>
<p class="step-tip" :class="{ 'tip-error': 5 === errorStep,'tip-active': 5 === step }">{{ step5Message }}</p>
<p class="step-title"><span>绑定成功</span></p>
<p class="step-tip" :class="{ 'tip-error': 4 === errorStep,'tip-active': 4 === step }">{{ step4Message }}</p>
<!-- tip: 当前标签与档案绑定成功 -->
<!-- tip: 绑定成功 -->
</div>
@ -117,13 +111,13 @@ export default {
bindingVisible: false, //
tidCode: '',
coverBindingVisible: false,
step: 1,
step: 1, // 21
errorStep: 0,
step1Message: '连接中',
step2Message: '请放入标签',
step3Message: '放入标签后开始读取标签',
step4Message: '标签读取成功后,开始绑定档案',
step5Message: '当前标签与' + this.bindingTxt + '绑定成功',
// 3step2step1step3step2...
step1Message: '请放入标签', // step2Message
step2Message: '放入标签后开始读取标签', // step3Message
step3Message: '标签读取成功后,开始绑定档案', // step4Message
step4Message: '当前标签与' + this.bindingTxt + '绑定成功', // step5Message
readData: {},
timeOut: null,
timer: null,
@ -143,95 +137,60 @@ export default {
},
methods: {
initData() {
this.step = 1
this.step = 1 //
this.errorStep = 0
this.step1Message = '连接中'
this.step2Message = '请放入标签'
this.step3Message = '放入标签后开始读取标签'
this.step4Message = '标签读取成功后,开始绑定档案'
this.step5Message = '当前标签与' + this.bindingTxt + '绑定成功'
//
this.step1Message = '请放入标签'
this.step2Message = '放入标签后开始读取标签'
this.step3Message = '标签读取成功后,开始绑定档案'
this.step4Message = '当前标签与' + this.bindingTxt + '绑定成功'
this.isBinding = false
this.coverLabel = false
this.tidCode = ''
},
async checkStatus(param) {
return RFID.checkStatus(param).then((res) => {
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.step = 2
this.step1Message = '连接成功'
return true
} else {
this.errorStep = 1
if (res.code && res.code === '-1') {
this.step1Message = '读写器状态异常(例如读写器USB线未插入)'
} else if (res.code === '-1000') {
this.step1Message = '读写器超时未响应(例如终端读写服务未开启或网络异常)'
}
}
})
},
readEpc(param) {
return new Promise((resolve, reject) => {
RFID.readEpc(param).then(res => {
res = JSON.parse(res)
if (res.code && res.code === '0') {
this.step = 3
this.step = 2 // 4
this.errorStep = 0
this.step2Message = '已放入标签'
this.step1Message = '已放入标签' //
if (res.data.length > 1) {
this.errorStep = 3
this.step3Message = '当前标签存在多个,请取出多余的标签只保留一张!'
this.errorStep = 2 //
this.step2Message = '当前标签存在多个,请取出多余的标签只保留一张!'
clearTimeout(this.timer)
this.timer = setTimeout(() => {
resolve(this.readEpc(param))
}, 2000)
} else if (res.data.length === 1) {
this.readData = res.data[0]
this.step3Message = '读取成功!'
this.step = 4
this.step2Message = '读取成功!' //
this.step = 3 //
resolve()
}
} else if (res.code && res.code === '-2') {
this.errorStep = 2
this.step2Message = '未读取到标签,请重新放入'
this.step = 2
this.errorStep = 1 //
this.step1Message = '未读取到标签,请重新放入'
this.step = 1 //
clearTimeout(this.timer)
this.timer = setTimeout(() => {
resolve(this.readEpc(param))
}, 2000)
} else {
this.errorStep = 2
this.step2Message = '读取标签失败'
this.errorStep = 1 //
this.step1Message = '读取标签失败'
reject()
}
})
})
},
async tryConnect(param) {
let res
let err
const MAX_NUM_RETRIES = 3
for (let i = 0; i < MAX_NUM_RETRIES; i++) {
try {
res = await this.checkStatus(param)
break
} catch (e) {
err = e
this.errorStep = 1
this.step1Message = '连接失败,请检查网络'
}
}
if (res) return res
// this.timeOut = setTimeout(() => {
// this.$refs.bindingTagDialog.handleClose()
// }, 3000)
throw err
},
async startBind(isCover) {
console.log(isCover)
return await new Promise(async(resolve, reject) => {
this.step4Message = '绑定中'
this.step3Message = '绑定中' //
const data = { id: this.bindingId, labelType: this.bindingType, tid: this.readData.tid }
if (isCover || this.readData.tid === this.tidCode) {
data.coverLabel = true
@ -241,42 +200,36 @@ export default {
this.coverBindingVisible = true
resolve()
} else if (res === 1) {
let writeRes = await RFID.writeEPC({ op: 'RFID_WriteEPC', sDevID: this.devId, EAS: '1', Type: this.bindingType, Code: this.bindingId, Tid: this.readData.tid, ip: this.devIp })
const sDevID = process.env.NODE_ENV === 'production' ? window.g.sDevID : process.env.VUE_APP_SDEVID
// , ip: this.devIp
let writeRes = await RFID.writeEPC({ op: 'RFID_WriteEPC', sDevID: sDevID, EAS: '1', Type: this.bindingType, Code: this.bindingId, Tid: this.readData.tid })
writeRes = JSON.parse(writeRes)
if (writeRes.code === '0') {
this.step = 5
this.step = 4
this.handleClose()
resolve()
} else if (writeRes.code === '-1') {
// this.$message({
// message: writeRes.message,
// type: 'error',
// duration: 2500
// })
this.errorStep = 5
this.step5Message = writeRes.message
this.errorStep = 4
this.step4Message = writeRes.message
reject()
} else if (writeRes.code === '-1000') {
// this.$message({
// message: '',
// type: 'error',
// duration: 2500
// })
this.errorStep = 5
this.step5Message = '读写器超时未响应'
this.errorStep = 4
this.step4Message = '读写器超时未响应'
reject()
}
} else {
this.step5Message = '绑定失败'
this.errorStep = 5
this.step4Message = '绑定失败'
this.errorStep = 4
reject()
}
})
},
async getDevId() {
return await new Promise(async(resolve, reject) => {
const mac = await RFID.getDeviceMac()
if (!mac || mac === '') {
this.step1Message = '获取mac地址失败'
this.step1Message = '获取mac地址失败,无法读取标签'
this.errorStep = 1
reject('获取mac地址失败')
} else {
@ -291,22 +244,32 @@ export default {
}
})
},
async opened() {
if (!this.isBinding) {
const devInfo = await this.getDevId()
this.devId = devInfo.deviceId
this.devIp = devInfo.deviceIp + ':' + devInfo.devicePort
await this.tryConnect({ op: 'RFID_CheckStatus', sDevID: devInfo.deviceId, ip: this.devIp })
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: devInfo.deviceId, ip: this.devIp })
await this.startBind()
try {
// const devInfo = await this.getDevId()
// this.devId = devInfo.deviceId
// this.devIp = devInfo.deviceIp + ':' + devInfo.devicePort
//
const sDevID = process.env.NODE_ENV === 'production' ? window.g.sDevID : process.env.VUE_APP_SDEVID
// ip: this.devIp
await this.readEpc({ op: 'RFID_ReadEpc', sDevID: sDevID })
await this.startBind()
} catch (err) {
console.error('初始化失败:', err)
}
}
},
async nextStep() {
this.isBinding = false
this.opened()
},
//
handleClose(done) {
this.bindingVisible = false
this.coverBindingVisible = false
this.$emit('refresh')
done()
@ -315,15 +278,18 @@ export default {
clearTimeout(this.timer)
}
},
handleCoverBindingClose(done) {
done()
this.bindingVisible = false
this.initData()
},
doCoverBinding() {
this.coverBindingVisible = false
this.startBind(true)
},
cancel() {
this.$refs.coverBindingDialog.handleClose()
}

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

@ -45,13 +45,13 @@
</el-col>
</draggable>
</el-row>
<el-row v-if="!isHasCode" style="border-top: 1px solid #339cff; padding: 20px 20px 0 20px;">
<!-- <el-row v-if="!isHasCode" style="border-top: 1px solid #339cff; padding: 20px 20px 0 20px;">
<el-col v-for="(item,index) in formPreviewData.slice(formPreviewData.length-1,formPreviewData.length)" :key="'barcode'+index">
<el-form-item :label="item.fieldCnName" :prop="item.fieldName">
<el-input v-model="addOrUpdateForm[item.fieldName]" type="text" style="width: 510px" :disabled="isDisabled || isEdit" :validate-event="!isDisabled" @keyup.enter.native="isRepeatHandle(item)" @blur="isRepeatHandle(item)" />
</el-form-item>
</el-col>
</el-row>
</el-row> -->
</el-form>
<!-- 弹框形式的内容展示 -->
@ -421,6 +421,12 @@ export default {
this.setParentsId = parent_id
}
}
// barcode
console.log(this.addOrUpdateForm['archive_no'])
if (this.addOrUpdateForm['archive_no'] !== '') {
this.$set(this.addOrUpdateForm, 'barcode', this.addOrUpdateForm['archive_no'])
}
delete this.addOrUpdateForm.id
this.$refs[formName].validate((valid) => {
if (valid) {

24
src/views/storeManage/deviceManage/index.vue

@ -137,11 +137,33 @@ export default {
[CRUD.HOOK.beforeToEdit](crud, form) {
form.deviceDetails = null
},
// [CRUD.HOOK.beforeSubmit]() {
// this.crud.form.pid = this.defaultExpandedKeys[0]
// this.crud.form.remark = this.crud.form.name
// console.log(this.crud.form)
// console.log(this.crud.data)
// if (!this.crud.form.sort) {
// this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return { sort: Math.max(prev.sort, cur.sort) } }).sort + 1
// }
// },
[CRUD.HOOK.beforeSubmit]() {
this.crud.form.pid = this.defaultExpandedKeys[0]
this.crud.form.remark = this.crud.form.name
if (!this.crud.form.sort) {
this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return { sort: Math.max(prev.sort, cur.sort) } }).sort + 1
let maxSort = 0 //
if (this.crud.data && this.crud.data.length > 0) {
const firstItem = this.crud.data[0]
if (firstItem.children && firstItem.children.length > 0) {
maxSort = firstItem.children.reduce((prev, cur) => {
const currentSort = cur.sort || 0
return { sort: Math.max(prev.sort, currentSort) }
}, { sort: 0 }).sort
}
}
this.crud.form.sort = maxSort + 1
}
},
toDelete(data) {

4
src/views/storeManage/warehouse3D/archivesStorage/index.vue

@ -86,7 +86,7 @@ export default {
components: { WarehouseWarning, AccessDoor, hkVideo },
data() {
return {
roomId: 'D6490DA3D4261E8C26D0E3',
roomId: '01A1DC2123C2B75E1A579D',
allDisplayConfigData: [],
displayConfigData: [],
url: '',
@ -191,7 +191,7 @@ export default {
if (deviceData.toLowerCase().includes('cam')) {
this.open = true
this.$nextTick(() => {
this.$refs.camera.getVideoUrl(deviceData)
this.$refs.camera.getVideoUrl(this.roomId, deviceData)
})
}
}

2
src/views/storeManage/warehouse3D/collateRoom/index.vue

@ -140,7 +140,7 @@ export default {
// if (event.data && event.data.data) {
// const data = event.data.data
// _this.deviceId = data
// if (_this.deviceId.includes('CAM')) {
// if (_this.deviceId.toLowerCase().includes('cam')) {
// _this.$nextTick(() => {
// this.$refs.camera.openVideoVisible = true
// this.$refs.camera.videoTitle = _this.deviceId

13
src/views/storeManage/warehouse3D/deseCabinet/index.vue

@ -1,7 +1,8 @@
<template>
<div class="app-container">
<div class="cabinet-top">
<p v-if="deviceData" class="cabinet-info">{{ deviceData.deviceName }} - {{ deviceData.areaNo }} - {{ cabinetNum }} </p>
<!-- <p v-if="deviceData" class="cabinet-info">{{ deviceData.deviceName }} - {{ deviceData.areaNo }} - {{ cabinetNum }} </p> -->
<p v-if="deviceData" class="cabinet-info">{{ deviceData.deviceName }} - {{ cabinetNum }} </p>
<div class="cabinet-des">
<p>档案总数{{ archivesNum }}</p>
<span class="cabinet-on">在库</span>
@ -112,7 +113,7 @@ export default {
loading: false,
// D6490DA3D4261E8C26D0E3
// 8F68A6B645B34B00B7ADFE
storeroomId: 'D6490DA3D4261E8C26D0E3', // id
storeroomId: '01A1DC2123C2B75E1A579D', // id
deviceData: null, // data
cabinetNum: null, // num
isFixed: false, //
@ -186,6 +187,7 @@ export default {
this.loading = false
if (item.deviceTypeId.name === '密集架') { //
this.deviceData = item
console.log('deviceData', item)
this.totalPartRowNum = item.partNo * item.rowNo
let rowNo
if (this.cabinetNum > 8) { //
@ -213,15 +215,16 @@ export default {
async getInBorrowByQuCol() {
const params = {
deviceId: this.deviceData.id,
quNo: this.deviceData.areaNo,
// quNo: this.deviceData.areaNo,
quNo: '1',
colNo: this.cabinetNum
}
CallExternal.FetchInBorrowByQuCol(params).then(data => {
data.forEach(item => {
if (item.direction === '') {
if (item.direction === 'A面') {
this.left.push(item)
}
if (item.direction === '') {
if (item.direction === 'B面') {
this.right.push(item)
}
})

2
src/views/storeManage/warehouse3D/index.vue

@ -130,7 +130,7 @@ export default {
// }
// console.log('this.camConfigData', this.camConfigData)
// //
// if (data.includes('CAM')) {
// if (data.toLowerCase().includes('cam')) {
// const camConfig = this.camConfigData.find((x) => { return x.divPosition === data })
// console.log(1, camConfig)
// if (camConfig && camConfig.isDisplay && camConfig.bindState) {

4
src/views/storeManage/warehouse3D/module/hkVideo.vue

@ -42,8 +42,8 @@ export default {
this.cleanupVideoStream()
},
methods: {
getVideoUrl(deviceData) {
displayConfigApi.list({ storeroomId: '', isQueryAll: 1 }).then((res) => {
getVideoUrl(roomId, deviceData) {
displayConfigApi.list({ storeroomId: roomId, isQueryAll: 1 }).then((res) => {
if (res) {
const camConfig = res.find((x) => { return x.divPosition === deviceData })
console.log(1, camConfig)

4
src/views/storeManage/warehouse3DConfig/index.vue

@ -61,7 +61,7 @@
</el-select>
</el-form-item>
<el-form-item label="参数绑定" prop="deviceSpecParams">
<el-select ref="paramsSelect" v-model="form.deviceSpecParams" filterable :multiple="isMultiple" clearable placeholder="请选择" :disabled="form.divPosition && form.divPosition.includes('CAM')">
<el-select ref="paramsSelect" v-model="form.deviceSpecParams" filterable :multiple="isMultiple" clearable placeholder="请选择" :disabled="form.divPosition && form.divPosition.toLowerCase().includes('cam')">
<el-option v-for="item in paramsOptions" :key="item.id" :label="item.label" :value="item.value">
<span style="float: left">{{ item.label }}&nbsp;-&nbsp;{{ item.info }}</span>
</el-option>
@ -194,7 +194,7 @@ export default {
this.form.deviceInfo = {}
}
let deviceTypeId
const isCAM = this.form.divPosition.includes('CAM')
const isCAM = this.form.divPosition.toLowerCase().includes('cam')
if (isCAM) {
deviceTypeId = this.cameraTypeId
} else if (this.form.divPosition.includes('TOP')) {

Loading…
Cancel
Save