diff --git a/src/assets/images/screen/book.png b/src/assets/images/screen/book.png
index 4e1f835..4f98c7d 100644
Binary files a/src/assets/images/screen/book.png and b/src/assets/images/screen/book.png differ
diff --git a/src/assets/styles/digitalScreen.scss b/src/assets/styles/digitalScreen.scss
index c1e8972..2d8e0ad 100644
--- a/src/assets/styles/digitalScreen.scss
+++ b/src/assets/styles/digitalScreen.scss
@@ -208,7 +208,7 @@
width: 110px;
height: 160px;
flex-shrink: 0; // 禁止压缩,保持固定尺寸
- border: 2px solid #fff;
+ // border: 2px solid #fff;
border-radius: 4px;
transition: all 0.2s;
margin: 0 5px;
@@ -223,8 +223,8 @@
object-fit: cover;
}
.book-select, .book-delete {
- position: absolute;
- bottom: 3px;
+ // position: absolute;
+ // bottom: 3px;
display: flex;
align-items: center;
justify-content: center;
@@ -236,10 +236,10 @@
}
}
.book-select {
- left: 6px;
+ // left: 6px;
.icon-wancheng {
display: none;
- color: #0348F3;
+ color: #fff;
}
.icon-weixuan {
color: #fff;
@@ -248,7 +248,7 @@
}
.book-delete {
- right: 3px;
+ // right: 3px;
.icon-shanchu {
font-size: 16px;
color: #ED4A41;
@@ -271,9 +271,32 @@
}
&.book-list-item--selected {
- background:rgba(0,0,0,0.5);
- border-color: #ED4A41;
- box-shadow: 0 2px 12px rgba(3, 72, 243, 0.2);
+ position: relative;
+ // background:rgba(0,0,0,0.5);
+ // border-color: #ED4A41;
+ // box-shadow: 0 2px 12px rgba(3, 72, 243, 0.2);
+ .select-style{
+ position: relative;
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ .select-mask{
+ width: 100%;
+ height: 100%;
+ background:rgba(0,0,0,0.3);
+ }
+ .icon-wancheng{
+ position: absolute;
+ right: 10px;
+ top: 10px;
+ z-index: 9999;
+ color: #fff;
+ font-size: 26px;
+ }
+ }
+
}
}
.book-upload-btn{
diff --git a/src/views/components/upload.vue b/src/views/components/upload.vue
index ffa2ce1..421303d 100644
--- a/src/views/components/upload.vue
+++ b/src/views/components/upload.vue
@@ -38,6 +38,10 @@ export default {
uploadType: {
type: String,
default: ''
+ },
+ limitNum: {
+ type: Number,
+ default: 0
}
},
data() {
@@ -63,6 +67,11 @@ export default {
methods: {
// 选择附件
async changeFile(e) {
+ if (this.limitNum && this.limitNum >= 3) {
+ this.$message({ message: '最多只可上传3张图片', type: 'error', offset: 8 })
+ return false
+ }
+
const file = e.target.files[0]
if (file && file.type.startsWith('image/')) {
diff --git a/src/views/digitalScreen/index.vue b/src/views/digitalScreen/index.vue
index b6f009d..0b9547c 100644
--- a/src/views/digitalScreen/index.vue
+++ b/src/views/digitalScreen/index.vue
@@ -24,20 +24,24 @@
@click="handleTabClick(index)"
>
-
封面预览
@@ -56,7 +56,7 @@ export default { return { btnLoading: false, addBookDialogVisible: false, - form: { id: null, name: null, author: null, isbn: null, callnos: null, publisherdate: null, publisher: null, imgPath: null, explain: null }, + form: { id: null, name: null, author: null, isbn: null, callnos: null, publisherdate: null, publisher: null, imgPath: null, explain: null, libcode: null }, bookCover: null, labelName: '图书封面', rules: { @@ -80,7 +80,8 @@ export default { }, computed: { ...mapGetters([ - 'baseApi' + 'baseApi', + 'user' ]) }, created() { @@ -98,15 +99,22 @@ export default { }, handleClose() { this.addBookDialogVisible = false + this.$refs['form'].resetFields() + this.$refs['form'].clearValidate() + this.$refs.uploadCoverRefs.fileNames = '' + this.form.imgPath = null + this.bookCover = null }, handleComfired() { this.$refs.form.validate((valid) => { if (valid) { this.addBookDialogVisible = false - console.log(this.form) + this.form.libcode = this.user.fonds.fondsNo FetchEditScreenBookRecommend(this.form).then((res) => { - if (res.code !== 500) { + console.log('res', res) + if (res) { this.$message({ message: '推荐图书新增成功', type: 'success', offset: 8 }) + this.$emit('refresh') } else { this.$message({ message: res.message, type: 'error', offset: 8 }) } diff --git a/src/views/digitalScreen/module/advSetting.vue b/src/views/digitalScreen/module/advSetting.vue index d74db73..b34169a 100644 --- a/src/views/digitalScreen/module/advSetting.vue +++ b/src/views/digitalScreen/module/advSetting.vue @@ -33,7 +33,11 @@ :class="{ 'book-list-item--selected': book.selected }" >