Browse Source

bug修正

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

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

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

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

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

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

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

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

@ -74,7 +74,7 @@
</template> </template>
<script> <script>
import { FetchArchivesTypeManage } from '@/api/category/category' 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 { add } from '@/api/category/listBrowsing'
import eForm from './module/form' import eForm from './module/form'
import sortDialog from './module/sortDialog' import sortDialog from './module/sortDialog'
@ -149,10 +149,10 @@ export default {
}) })
}, },
getBottomTableData() { 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) 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) this.table.bottom.data.push(item)
}) })
} }

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

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

78
src/views/components/BindingTagDlg.vue

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

Loading…
Cancel
Save