Browse Source

bug修正

master
z_yu 3 years ago
parent
commit
33af3bde5c
  1. 2
      src/assets/styles/yxk-admin.scss
  2. 18
      src/views/archivesManage/caseManage/index.vue
  3. 34
      src/views/archivesManage/caseManage/module/openCaseDlg.vue
  4. 8
      src/views/category/baseInfo/index.vue
  5. 8
      src/views/category/listBrowsing/index.vue
  6. 2
      src/views/category/orderingRule/module/form.vue
  7. 118
      src/views/components/BindingTagDlg.vue

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

@ -839,6 +839,8 @@
}
}
.setting-dialog{
z-index: 100;
position: relative;
.des-form{
width: 100% !important;
margin-top: 0 !important;

18
src/views/archivesManage/caseManage/index.vue

@ -17,13 +17,13 @@
</template>
<template v-slot:rightButtonGroup>
<div class="archives-handler-btn">
<el-button class="packing-btn iconfont icon-weibiaoti-2" type="primary">拆盒</el-button>
<el-button class="packing-btn iconfont icon-weibiaoti-2" type="primary" @click="openCase(crud.selections)">拆盒</el-button>
<el-button class="binding-btn iconfont icon-weibiaoti-2" type="primary" :disabled="crud.selections.length !== 1" @click="bindingTag(crud.selections)">绑定标签</el-button>
</div>
</template>
</crudOperation>
</div>
<div class="app-container container-wrap">
<div class="app-container container-wrap">
<span class="right-top-line" />
<span class="left-bottom-line" />
<!--表格渲染-->
@ -51,6 +51,7 @@
<!--新增编辑表单渲染-->
<eForm />
<binding-tag-dlg ref="bindingTag" :binding-id="crud.selections[0] && crud.selections[0].id" :binding-type="2" binding-txt="档案盒" @refresh="crud.refresh" />
<open-case-dlg ref="openCase" @refresh="crud.refresh" />
<pagination />
</div>
</div>
@ -60,13 +61,14 @@
import caseCrudMethod from '@/api/archivesManage/caseManage'
import BindingTagDlg from '@/views/components/BindingTagDlg'
import eForm from './module/form'
import openCaseDlg from './module/openCaseDlg'
import CRUD, { presenter, crud } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
export default {
components: { eForm, crudOperation, rrOperation, pagination, BindingTagDlg },
components: { eForm, crudOperation, rrOperation, pagination, BindingTagDlg, openCaseDlg },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
@ -140,6 +142,10 @@ export default {
this.$refs.bindingTag.tidCode = data[0].tid
}
this.$refs.bindingTag.bindingVisible = true
},
openCase(data) {
this.$refs.openCase.openCaseVisible = true
this.$refs.openCase.caseData = data
}
}
}
@ -150,4 +156,10 @@ export default {
::v-deep div.el-dialog__footer {
text-align: center;
}
.app-container{
margin: 0 20px 20px;
}
.container-wrap{
min-height: calc(100vh - 242px);
}
</style>

34
src/views/archivesManage/caseManage/module/openCaseDlg.vue

@ -0,0 +1,34 @@
<template>
<el-dialog :close-on-click-modal="false" title="拆盒" :visible.sync="openCaseVisible">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<p><span style="color:#fff;">确定拆除当前选择的所有档案盒吗</span></p>
<p><span style="color:#f00;">提示1.确定拆盒后当前盒号下绑定的所有档案数据将一并清除</span></p>
<p><span style="color:#f00;">提示2.若案卷存在多个盒选择其中一个分盒则自动拆掉该案卷的全部档案盒</span></p>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleConfirm">确定</el-button>
<el-button type="primary" @click.native="handleConfirm">取消</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
caseData: [],
openCaseVisible: false
}
},
methods: {
handleConfirm() {
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

8
src/views/category/baseInfo/index.vue

@ -62,11 +62,15 @@ export default {
// },
watch: {
selectedCategory: function(newValue, oldValue) {
this.initData()
if (newValue && newValue.id) {
this.initData()
}
}
},
created() {
this.initData()
if (this.selectedCategory && this.selectedCategory.id) {
this.initData()
}
},
methods: {
initData() {

8
src/views/category/listBrowsing/index.vue

@ -74,7 +74,7 @@
</template>
<script>
import { FetchArchivesTypeManage } from '@/api/category/category'
import { initArchivesView } from '@/api/archivesManage/archivesList'
import { FetchInitArchivesView } from '@/api/archivesManage/archivesList'
import { add } from '@/api/category/listBrowsing'
import eForm from './module/form'
import sortDialog from './module/sortDialog'
@ -149,10 +149,10 @@ export default {
})
},
getBottomTableData() {
initArchivesView({ categoryId: this.selectedCategory.id, isdel: false, page: 0, size: 10 }).then((res) => {
FetchInitArchivesView({ categoryId: this.selectedCategory.id, isdel: false, page: 0, size: 10 }).then((res) => {
this.table.bottom.data.splice(0, this.table.bottom.data.length)
if (res && res.content) {
res.content.forEach((item) => {
if (res && res.list) {
res.list.content.forEach((item) => {
this.table.bottom.data.push(item)
})
}

2
src/views/category/orderingRule/module/form.vue

@ -35,7 +35,7 @@ export default {
data() {
return {
cuDialogVisible: false,
formData: [],
formData: {},
title: ''
}
},

118
src/views/components/BindingTagDlg.vue

@ -124,7 +124,9 @@ export default {
step3Message: '放入标签后开始读取标签',
step4Message: '标签读取成功后,开始绑定档案',
step5Message: '当前标签与' + this.bindingTxt + '绑定成功',
readData: null
readData: {},
timeOut: null,
timer: null
}
},
computed: {
@ -132,6 +134,11 @@ export default {
return this.isBinding ? '重新绑定' : '绑定标签'
}
},
beforeDestroy() {
//
clearTimeout(this.timeOut)
this.timeOut = null
},
methods: {
initData() {
this.step = 1
@ -160,39 +167,81 @@ export default {
}
})
},
// async 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(() => {
// reject(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 = ''
// clearTimeout(this.timer)
// this.timer = setTimeout(() => {
// reject(this.readEpc(param))
// }, 2000)
// } else {
// this.errorStep = 2
// this.step2Message = ''
// reject()
// }
// })
// })
// },
async 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 = '当前标签存在多个,请取出多余的标签只保留一张!'
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 = '未读取到标签,请重新放入'
setTimeout(() => {
resolve(this.readEpc(param))
let res = await RFID.readEpc(param)
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 = '当前标签存在多个,请取出多余的标签只保留一张!'
console.log(1)
if (!this.timer) {
this.timer = setInterval(() => {
this.readEpc(param)
}, 2000)
} else {
this.errorStep = 2
this.step2Message = '读取标签失败'
reject()
}
})
})
throw new Error('当前标签存在多个,请取出多余的标签只保留一张!')
} else if (res.data.length === 1) {
this.readData = res.data[0]
this.step3Message = '读取成功!'
this.step = 4
if (this.timer) {
clearTimeout(this.timer)
}
}
} else if (res.code && res.code === '-2') {
this.errorStep = 2
this.step2Message = '未读取到标签,请重新放入'
if (!this.timer) {
this.timer = setInterval(() => {
this.readEpc(param)
}, 2000)
}
throw new Error('未读取到标签,请重新放入')
} else {
this.errorStep = 2
this.step2Message = '读取标签失败'
throw new Error('读取标签失败')
}
},
async tryConnect(param) {
let res
@ -209,16 +258,16 @@ export default {
}
}
if (res) return res
setTimeout(() => {
this.timeOut = setTimeout(() => {
this.$refs.bindingTagDialog.handleClose()
}, 3000)
throw err
},
async startBind(isCover) {
console.log(isCover)
// return new Promise((resolve, reject) => {
this.step4Message = '绑定中'
const data = { id: this.bindingId, labelType: this.bindingType, tid: this.readData.tid }
console.log(2)
if (isCover || this.readData.tid === this.tidCode) {
data.coverLabel = true
}
@ -264,6 +313,9 @@ export default {
this.$emit('refresh')
done()
this.initData()
if (this.timer) {
clearTimeout(this.timer)
}
},
handleCoverBindingClose(done) {
done()

Loading…
Cancel
Save