diff --git a/src/assets/images/selected.png b/src/assets/images/selected.png
new file mode 100644
index 0000000..eaeba0f
Binary files /dev/null and b/src/assets/images/selected.png differ
diff --git a/src/assets/images/un_selected.png b/src/assets/images/un_selected.png
new file mode 100644
index 0000000..cae3dd1
Binary files /dev/null and b/src/assets/images/un_selected.png differ
diff --git a/src/views/materialContent/index.vue b/src/views/materialContent/index.vue
index 89155f1..77df687 100644
--- a/src/views/materialContent/index.vue
+++ b/src/views/materialContent/index.vue
@@ -3,7 +3,11 @@
-
+
@@ -30,7 +34,7 @@
上传列表
- 多选
+ {{ mulitText }}
@@ -42,7 +46,10 @@ export default {
components: { MaterialList },
data() {
return {
- activeName: 'first'
+ activeName: 'first',
+ isMultiSelected: false,
+ isCheck: null,
+ mulitText: '多选'
}
},
methods: {
@@ -51,6 +58,15 @@ export default {
},
handleUpload() {
this.$refs.MaterialList.UploadList()
+ },
+ multiSelectBtn() {
+ this.isMultiSelected = !this.isMultiSelected
+ if (this.isMultiSelected) {
+ this.mulitText = '取消'
+ } else {
+ this.mulitText = '多选'
+ }
+ // this.$refs.MaterialList.multiSelectList()
}
}
}
diff --git a/src/views/materialContent/materialList/index.vue b/src/views/materialContent/materialList/index.vue
index a8e3d0b..b866fa5 100644
--- a/src/views/materialContent/materialList/index.vue
+++ b/src/views/materialContent/materialList/index.vue
@@ -14,26 +14,25 @@
文件夹
-
-

-
- JPG
-
-
人工智能
-
-
-
+
+
![]()
+
- Video
- 03:00
+ {{ item.type }}
+ 03:00
-
防控疫情小贴士
+
{{ item.name }}
+
-
+
-
+
-
+
@@ -91,8 +90,8 @@
-
-
+
+
+
+
+ 即时发布
+ 定时发布
+ 编辑
+ 下载
+ 移动
+ 删除
+
+
+
+
+
+
+
+
+
+
{{ item.name }}
+
+
+
@@ -155,14 +209,29 @@ export default {
return CRUD({ title: '用户', url: 'api/users', crudMethod: { ...crudUser } })
},
mixins: [presenter(), header(), form(defaultForm), crud()],
+ props: {
+ isMultiSelected: {
+ type: Boolean,
+ required: true
+ },
+ mulitText: {
+ type: String,
+ required: true
+ }
+ },
data() {
return {
- mkdirVisible: false,
uploadListVisible: false,
loading_txt: '暂停',
progressLoading: true,
percentage: 0,
colors: '#1e9f4c',
+ layerTitle: '创建文件夹',
+ labelTxt: '文件夹名称',
+ mkdirVisible: false,
+ formType: null,
+ movingVisible: false,
+ movingChecked: null,
// dialogImageUrl: '',
// dialogVisible: false,
// disabled: false
@@ -173,6 +242,40 @@ export default {
type: 'vedio',
size: '3MB'
}
+ ],
+ listData: [
+ {
+ id: '1',
+ name: '人工智能',
+ type: 'JPG',
+ coverImg: require('@/assets/images/background.jpg'),
+ time: ''
+ },
+ {
+ id: '2',
+ name: '防控疫情小贴士',
+ type: 'vedio',
+ coverImg: require('@/assets/images/background.jpg'),
+ time: '03:00'
+ },
+ {
+ id: '3',
+ name: '防控疫情小贴士2',
+ type: 'audio',
+ coverImg: '',
+ time: '01:20'
+ }
+ ],
+ contentIds: [],
+ wjjList: [
+ {
+ id: '1',
+ name: '文件夹1'
+ },
+ {
+ id: '2',
+ name: '文件夹2'
+ }
]
}
},
@@ -181,6 +284,13 @@ export default {
'user'
])
},
+ watch: {
+ isMultiSelected(newName, oldName) {
+ if (newName === false) {
+ this.contentIds = []
+ }
+ }
+ },
mounted: function () {
this.start()
},
@@ -191,6 +301,49 @@ export default {
UploadList() {
this.uploadListVisible = true
},
+ selectedItem(id, type) {
+ console.log('type', type)
+
+ const arr = this.contentIds
+ // includes()方法判断是否包含某一元素,返回true或false表示是否包含元素,对NaN一样有效
+ if (arr.includes(id)) {
+ // 判断数组中是否有选中的id,如果有则去掉
+ const index = arr.indexOf(id)
+ if (index > -1) {
+ arr.splice(index, 1)
+ }
+ } else {
+ this.contentIds.push(id)
+ this.formType = type
+ }
+
+ console.log('formType', this.formType)
+ },
+ editContent() {
+ this.mkdirVisible = true
+ this.labelTxt = '文件名称'
+
+ if (this.formType === 'vedio') {
+ this.layerTitle = '视频编辑'
+ } else if (this.formType === 'audio') {
+ this.layerTitle = '音频编辑'
+ } else {
+ this.layerTitle = '图片编辑'
+ }
+
+ const resType = this.listData.filter(item => {
+ return item.id === this.contentIds[0]
+ })
+ this.form.name = resType[0].name
+ },
+ moveingTo(index) {
+ this.movingVisible = true
+ // this.movingChecked = index
+ },
+ wjjSelected(index) {
+ this.movingChecked = index
+ console.log(this.movingChecked)
+ },
format(percentage) {
return percentage === 100 ? '100%' : `${percentage}%`
},
@@ -208,7 +361,7 @@ export default {
},
// 进度条结束
end() {
- this.loading_txt = '开始'
+ this.loading_txt = '继续'
// const that = this
// that.percentage = 100
clearInterval(this.timeStart)
@@ -236,11 +389,29 @@ export default {
flex-wrap: wrap;
margin-left: 24px;
.material_item {
+ position: relative;
width: 174px;
height: 182px;
border-radius: 4px;
margin: 0 20px 20px 0;
}
+ .checked_btn {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ display: block;
+ width: 24px;
+ height: 24px;
+ background: url(~@/assets/images/un_selected.png) no-repeat;
+ background-size: 24px 24px;
+ cursor: pointer;
+ }
+ .item_multi {
+ border-color: #3a8aeb !important;
+ .checked_btn {
+ background: url(~@/assets/images/selected.png) no-repeat;
+ }
+ }
.cont_upload {
display: flex;
flex-wrap: wrap;
@@ -312,4 +483,82 @@ export default {
width: 128px;
height: 120px;
}
+.upload_layer {
+ ::v-deep .el-dialog__headerbtn {
+ right: -60px;
+ .el-dialog__close {
+ color: #fff;
+ font-size: 26px;
+ }
+ }
+ .upload_list_right {
+ position: absolute;
+ right: 24px;
+ top: 24px;
+ display: flex;
+ font-size: 14px;
+ font-weight: bold;
+ color: #3a8aeb;
+ .upload_return {
+ margin-left: 16px;
+ cursor: pointer;
+ }
+ }
+}
+
+.multi_handle {
+ position: fixed;
+ bottom: 140px;
+ left: 50%;
+ width: 1100px;
+ padding: 25px 150px;
+ background: rgba(0, 0, 0, 0.5);
+ border-radius: 4px;
+ margin-left: -438px;
+ .mulit_btn {
+ padding: 0 24px;
+ height: 34px;
+ font-size: 14px;
+ color: #333;
+ border: none;
+ margin: 0 24px;
+ background-color: #fff;
+ }
+ .mulit_delt_btn {
+ background-color: #ec414d;
+ color: #fff;
+ }
+}
+
+.wjj_layer {
+ ::v-deep .el-dialog__body {
+ padding: 30px 24px;
+ }
+ .wjj_list {
+ display: flex;
+ flex-wrap: wrap;
+ .wjj_item {
+ display: flex;
+ flex-wrap: wrap;
+ align-content: center;
+ justify-content: center;
+ width: 96px;
+ height: 104px;
+ cursor: pointer;
+ &.wjj_item_active {
+ background: #e8f3ff;
+ border: 1px solid #428fec;
+ }
+ .font-icon {
+ width: 64px;
+ height: 55px;
+ }
+ .wjj_name {
+ font-size: 14px;
+ color: #333;
+ margin-top: 8px;
+ }
+ }
+ }
+}