18 changed files with 518 additions and 315 deletions
-
1package.json
-
14src/assets/iconfonts/light/iconfont.css
-
2src/assets/iconfonts/light/iconfont.js
-
14src/assets/iconfonts/light/iconfont.json
-
BINsrc/assets/iconfonts/light/iconfont.ttf
-
BINsrc/assets/iconfonts/light/iconfont.woff
-
BINsrc/assets/iconfonts/light/iconfont.woff2
-
BINsrc/assets/images/user.jpg
-
2src/views/digitalScreen/module/areaSetting.vue
-
16src/views/faceRecognition/faceRecLog.vue
-
31src/views/faceRecognition/module/batchImport.vue
-
151src/views/faceRecognition/module/faceSearch.vue
-
72src/views/faceRecognition/module/selfRegister.vue
-
196src/views/faceRecognition/personInfoManage.vue
-
13src/views/inquiryMachine/column.vue
-
52src/views/inquiryMachine/content.vue
-
175src/views/inquiryMachine/form.vue
-
94src/views/inquiryMachine/menu.vue
2
src/assets/iconfonts/light/iconfont.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
After Width: 110 | Height: 160 | Size: 2.9 KiB |
@ -0,0 +1,31 @@ |
|||
<template> |
|||
<el-dialog :close-on-click-modal="false" :modal-append-to-body="false" append-to-body title="批量导入" :visible.sync="batchImportVisible"> |
|||
<div class="setting-dialog" style="display: flex; justify-content: center; flex-direction: column; align-items: center;"> |
|||
<p>注意:批量导入,需在指定的模板文件内完成数据录入后,上传文件,再由系统执行导入操作!</p> |
|||
<div class="btn-wrap"> |
|||
<el-button size="mini"> <i class="iconfont icon-xiazai" />下载模板</el-button> |
|||
<el-button size="mini"> <i class="iconfont icon-piliangchengjian" />导入文件</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
batchImportVisible: false |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.btn-wrap{ |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
</style> |
@ -0,0 +1,151 @@ |
|||
<template> |
|||
<el-dialog :close-on-click-modal="false" :modal-append-to-body="false" append-to-body title="人脸查询" :visible.sync="faceSearchVisible"> |
|||
<div class="setting-dialog" style="display: flex; justify-content: flex-start;"> |
|||
<div class="upload-img-input"> |
|||
<input ref="fileInput" type="file" @change="changeFile($event)"> |
|||
<div class="upload-libImg"> |
|||
<img src="~@/assets/images/user.jpg" alt=""> |
|||
<span>点击上传照片进行比对</span> |
|||
</div> |
|||
</div> |
|||
<ul class="face-result-info"> |
|||
<li><span>馆代码:</span>ftzn</li> |
|||
<li><span>读者证号:</span>78198239</li> |
|||
<li><span>姓名:</span>张三</li> |
|||
<li><span>身份证号:</span>420105198500000000</li> |
|||
<li><span>性别:</span>男</li> |
|||
<li><span>联系方式:</span>15800000000</li> |
|||
<li><span>类型:</span>普通用户</li> |
|||
</ul> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
// import { mapGetters } from 'vuex' |
|||
// import { getCurrentTime } from '@/utils/index' |
|||
import { upload } from '@/utils/upload' |
|||
export default { |
|||
data() { |
|||
return { |
|||
faceSearchVisible: false, |
|||
file: null, |
|||
fileNames: '', |
|||
fileSize: '', |
|||
filePath: '', |
|||
px: '', |
|||
imageUrl: null |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
async changeFile(e) { |
|||
const file = e.target.files[0] |
|||
|
|||
if (file && file.type.startsWith('image/')) { |
|||
this.file = e.target.files[0] |
|||
this.fileSize = this.file.size |
|||
this.fileNames = this.file.name |
|||
|
|||
const fileBase64 = await this.getBase64(this.file) |
|||
const res = await this.getImgPx(fileBase64) |
|||
this.imageUrl = fileBase64 |
|||
this.px = res.width + 'px*' + res.height + 'px' |
|||
upload(this.baseApi + '/api/fileRelevant/uploadOtherImg', this.file).then(res => { |
|||
console.log(res) |
|||
if (res.data.code === 200) { |
|||
this.filePath = res.data.data |
|||
// this.$emit('childCover', res.data.data) |
|||
} |
|||
}) |
|||
} else { |
|||
this.$message({ message: '只可上传图片', type: 'error', offset: 8 }) |
|||
this.imageUrl = null |
|||
} |
|||
}, |
|||
// 将上传的图片转为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 }) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.upload-img-input{ |
|||
position: relative; |
|||
width: 150px; |
|||
height: 230px; |
|||
& input{ |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
width: 150px; |
|||
height: 230px; |
|||
opacity: 0; |
|||
z-index: 9999; |
|||
} |
|||
} |
|||
.upload-libImg{ |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
width: 150px; |
|||
height: 230px; |
|||
font-size: 14px; |
|||
font-weight: bold; |
|||
color: #0c0e1e; |
|||
text-align: center; |
|||
overflow: hidden; |
|||
& img{ |
|||
display: block; |
|||
height: 200px; |
|||
} |
|||
& span{ |
|||
display: block; |
|||
margin-top: 10px; |
|||
} |
|||
} |
|||
|
|||
.face-result-info{ |
|||
margin-left: 20px; |
|||
padding-left: 10px; |
|||
border-left: 1px solid #EBEEF5; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
li{ |
|||
width: 50%; |
|||
line-height: 20px; |
|||
font-size: 14px; |
|||
font-weight: bold; |
|||
color: #0c0e1e; |
|||
span{ |
|||
display: inline-block; |
|||
width: 70px; |
|||
text-align: right; |
|||
font-weight: normal; |
|||
color: #606266; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,72 @@ |
|||
<template> |
|||
<el-dialog :close-on-click-modal="false" :modal-append-to-body="false" append-to-body title="自助注册" :visible.sync="selfRegisterVisible"> |
|||
<div class="setting-dialog"> |
|||
<a |
|||
:href="link" |
|||
target="_blank" |
|||
rel="noopener noreferrer" |
|||
class="external-link" |
|||
> |
|||
{{ link }} |
|||
</a> |
|||
<div class="qrcode-wrapper"> |
|||
<div ref="qrcode" class="qrcode" /> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import Qrcode from 'qrcodejs2' |
|||
export default { |
|||
data() { |
|||
return { |
|||
selfRegisterVisible: false, |
|||
link: 'http://192.168.99.72:8080/selfhelp/initReaderCheck.do?strLibcode=FTZN' |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
generateQrcode() { |
|||
const qrcodeRef = this.$refs.qrcode |
|||
if (!qrcodeRef) return |
|||
|
|||
new Qrcode(qrcodeRef, { |
|||
text: this.link, |
|||
width: 200, |
|||
height: 200, |
|||
colorDark: '#333', |
|||
colorLight: '#fff', |
|||
correctLevel: Qrcode.CorrectLevel.L |
|||
}) |
|||
}, |
|||
open() { |
|||
this.selfRegisterVisible = true |
|||
this.$nextTick(() => this.generateQrcode()) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.setting-dialog{ |
|||
text-align: center; |
|||
} |
|||
.external-link { |
|||
font-size: 16px; |
|||
// color: #0348f3; |
|||
text-decoration: none; |
|||
} |
|||
.external-link:hover { |
|||
text-decoration: underline; |
|||
} |
|||
|
|||
.qrcode-wrapper { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
padding: 20px; |
|||
} |
|||
|
|||
</style> |
@ -1,175 +0,0 @@ |
|||
<template> |
|||
<!--表单组件--> |
|||
<el-dialog append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title"> |
|||
<div class="setting-dialog"> |
|||
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px"> |
|||
<el-form-item v-if="selectedMenu.pid === '0'" label="所属父级" prop="parentName"> |
|||
<el-input v-model="selectedMenu.title" disabled /> |
|||
</el-form-item> |
|||
<el-form-item v-else label="所属父级" prop="parentName"> |
|||
<el-input v-model="selectedMenu.parentName" disabled /> |
|||
</el-form-item> |
|||
<el-form-item label="编码" prop="code"> |
|||
<el-input v-model="form.code" disabled /> |
|||
</el-form-item> |
|||
<el-form-item label="名称" prop="title"> |
|||
<el-input v-model="form.title" /> |
|||
</el-form-item> |
|||
<el-form-item label="菜单类型" prop="type"> |
|||
<el-select v-model="form.type" style="width: 225px;" @change="changeType"> |
|||
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-row v-if="form.type && (form.type === 2 || form.type === 3)"> |
|||
<!-- @remove-tag="deleteTag" @change="changeColumn" --> |
|||
<el-form-item style="width: 100%;" label="栏目绑定" prop="bind" class="is-required selecct-dropdown"> |
|||
<el-select v-model="form.queryTopicList" style="width: 584px" value-key="id" multiple placeholder="请选择" :popper-append-to-body="false"> |
|||
<el-option v-for="item in columnDatas" :key="item.id" :label="item.title" :value="item" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-row> |
|||
<el-form-item label="备注" prop="remarks"> |
|||
<el-input v-model="form.remarks" type="textarea" :rows="4" style="width: 580px;" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
|||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchQueryTopicTree } from '@/api/inquiryMachine/column' |
|||
import { form } from '@crud/crud' |
|||
import CRUD from '@crud/crud' |
|||
import { mapGetters } from 'vuex' |
|||
|
|||
const defaultForm = { id: null, parentId: null, parentName: null, title: null, code: null, queryTopicList: null, type: null, remarks: null } |
|||
export default { |
|||
mixins: [ |
|||
form(function() { |
|||
return Object.assign({ libcode: this.user.fonds.fondsNo }, defaultForm) |
|||
}) |
|||
], |
|||
props: { |
|||
selectedMenu: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
pid: null, |
|||
isAdd: false, |
|||
rules: { |
|||
parentId: [ |
|||
{ required: true, message: '所属父级不可为空', trigger: 'blur' } |
|||
], |
|||
title: [ |
|||
{ required: true, message: '名称不可为空', trigger: 'blur' } |
|||
], |
|||
type: [ |
|||
{ required: true, message: '菜单类型不可为空', trigger: 'change' } |
|||
], |
|||
// code: [ |
|||
// { required: true, message: '编码不可为空', trigger: 'blur' } |
|||
// ], |
|||
queryTopicList: [ |
|||
{ |
|||
required: () => { |
|||
return this.form.type === 2 || this.form.type === 3 |
|||
}, |
|||
message: '栏目绑定不可为空', |
|||
trigger: 'change' |
|||
} |
|||
] |
|||
}, |
|||
selectOptions: [ |
|||
{ value: 1, label: '菜单' }, |
|||
{ value: 2, label: '栏目显示' }, |
|||
{ value: 3, label: '栏目列表' }, |
|||
{ value: 4, label: '新书推荐' } |
|||
], |
|||
columnDatas: [], |
|||
bindColumn: [] |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi', |
|||
'user' |
|||
]) |
|||
}, |
|||
watch: { |
|||
selectedMenu: function(newValue, oldValue) { |
|||
// console.log('newValue', newValue) |
|||
}, |
|||
'form.type': function(newType) { |
|||
if (newType !== 2 && newType !== 3) { |
|||
this.form.queryTopicList = null |
|||
} |
|||
this.$nextTick(() => { |
|||
this.$forceUpdate() |
|||
}) |
|||
} |
|||
}, |
|||
created() { |
|||
this.getInitQueryTopic() |
|||
}, |
|||
methods: { |
|||
getInitQueryTopic() { |
|||
FetchQueryTopicTree().then(res => { |
|||
this.columnDatas = res |
|||
}) |
|||
}, |
|||
// changeColumn(value) { |
|||
// this.bindColumn = [] |
|||
// value.forEach(function(data, index) { |
|||
// const role = { id: data } |
|||
// this.bindColumn.push(role) |
|||
// }) |
|||
// }, |
|||
// deleteTag(value) { |
|||
// this.bindColumn.forEach(function(data, index) { |
|||
// if (data.id === value.id) { |
|||
// this.bindColumn.splice(index, value) |
|||
// } |
|||
// }) |
|||
// }, |
|||
// 提交前的验证 |
|||
[CRUD.HOOK.afterValidateCU](crud) { |
|||
delete crud.form.parentName |
|||
delete crud.form.queryMenuTopics |
|||
const { queryTopicList, ...otherFields } = crud.form |
|||
crud.form = { |
|||
queryMenu: otherFields, |
|||
queryTopicList: queryTopicList |
|||
} |
|||
console.log(crud.form) |
|||
return true |
|||
}, |
|||
changeType(val) { |
|||
console.log('val', val) |
|||
// this.isAdd = this.form.type === 2 |
|||
}, |
|||
normalizer(node) { |
|||
if (node.children && !node.children.length) { |
|||
delete node.children |
|||
} |
|||
return { |
|||
id: node.id, |
|||
label: node.title, |
|||
children: node.children, |
|||
isDisabled: node.type !== 2 && node.type !== 3 && node.type !== 5 |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue