|
|
@@ -1,32 +1,64 @@
|
|
|
<template>
|
|
|
- <el-dialog v-model="dialogTableVisible" :title="props.title" class="drawer-box">
|
|
|
- <!-- <div class="header">
|
|
|
+ <div
|
|
|
+ ><el-dialog
|
|
|
+ v-model="dialogTableVisible"
|
|
|
+ :modal="false"
|
|
|
+ :show-close="false"
|
|
|
+ draggable
|
|
|
+ :append-to-body="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ >
|
|
|
+ <template #header>
|
|
|
+ <div style="position: relative">
|
|
|
+ <div class="dialog-header">{{ props.title }}</div>
|
|
|
+ <img
|
|
|
+ src="~@/assets/icons/slide-right.png"
|
|
|
+ alt=""
|
|
|
+ class="dialog-return"
|
|
|
+ @click="closeDialog"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- <div class="header">
|
|
|
<div class="header-title">{{ props.title }}</div>
|
|
|
<el-icon class="header-icon" size="20px" @click="closeDrawer"><Close /></el-icon>
|
|
|
</div> -->
|
|
|
- <div class="config-content">
|
|
|
- <div>
|
|
|
- <el-upload
|
|
|
- class="pic-uploader"
|
|
|
- list-type="picture-card"
|
|
|
- :auto-upload="false"
|
|
|
- :show-file-list="false"
|
|
|
- :on-change="onSelectfile"
|
|
|
- :before-upload="beforeAvatarUpload"
|
|
|
- >
|
|
|
- <img v-if="imageUrl" :src="imageUrl" class="avatar" />
|
|
|
- <!-- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon> -->
|
|
|
- <div v-else>
|
|
|
- <el-icon class="avatar-upload-icon"><Plus /></el-icon>
|
|
|
- <div class="uploader-config-text">上传照片</div>
|
|
|
- </div>
|
|
|
- </el-upload>
|
|
|
- <div class="upload-config-tip">只支持.jpg格式</div>
|
|
|
- <div class="upload-notice">上传缩略图</div>
|
|
|
- <div class="upload-tips">备注:车间内部情况的视频流截图</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <div class="config-content">
|
|
|
+ <div>
|
|
|
+ <div class="uploader-title">缩略图</div>
|
|
|
+ <el-upload
|
|
|
+ class="pic-uploader"
|
|
|
+ list-type="picture-card"
|
|
|
+ :auto-upload="false"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-change="onSelectfile"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
+ >
|
|
|
+ <img v-if="imageUrl" :src="imageUrl" class="avatar" />
|
|
|
+ <!-- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon> -->
|
|
|
+ <div v-else>
|
|
|
+ <el-icon class="avatar-upload-icon" size="24px"><Plus /></el-icon>
|
|
|
+ <div class="uploader-config-text">上传照片</div>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <div class="upload-config-tip">只支持.jpg格式</div>
|
|
|
+ <div style="display: flex"
|
|
|
+ ><img src="~@/assets/icons/warn.png" style="width: 14px; height: 14px" alt="" />
|
|
|
+ <div class="upload-notice">上传车间内部情况的视频流截图</div></div
|
|
|
+ >
|
|
|
+
|
|
|
+ <!-- <div class="upload-tips">备注:车间内部情况的视频流截图</div> -->
|
|
|
+ </div>
|
|
|
+ <hr />
|
|
|
+ <div>
|
|
|
+ <div class="content-title"
|
|
|
+ ><div class="uploader-title">填充</div>
|
|
|
+ <el-icon class="refresh-right"><RefreshRight /></el-icon
|
|
|
+ ></div>
|
|
|
+ <el-color-picker v-model="color" />
|
|
|
+ </div>
|
|
|
+ </div> </el-dialog
|
|
|
+ ></div>
|
|
|
|
|
|
<!-- <div v-show="props.visible" class="drawer-box">
|
|
|
<div class="header">
|
|
|
@@ -58,7 +90,7 @@
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { ref } from 'vue';
|
|
|
- import { Close, Plus } from '@element-plus/icons-vue';
|
|
|
+ import { Close, Plus, RefreshRight } from '@element-plus/icons-vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
|
|
const props = defineProps<{
|
|
|
@@ -67,14 +99,17 @@
|
|
|
// workshopTemplateList: WorkshopModuleType[];
|
|
|
}>();
|
|
|
|
|
|
- const emit = defineEmits<{
|
|
|
- // (e: 'update:modelValue'): unknown;
|
|
|
- (e: 'onClose'): unknown;
|
|
|
- }>();
|
|
|
+ const emit = defineEmits(['onClose']);
|
|
|
|
|
|
- const closeDrawer = () => {
|
|
|
- emit('onClose');
|
|
|
- };
|
|
|
+ // const emit = defineEmits<{
|
|
|
+ // // (e: 'update:modelValue'): unknown;
|
|
|
+ // (e: 'onClose'): unknown;
|
|
|
+ // }>();
|
|
|
+
|
|
|
+ // const closeDrawer = () => {
|
|
|
+ // emit('onClose');
|
|
|
+ // };
|
|
|
+ const color = ref('');
|
|
|
const dialogTableVisible = ref(false);
|
|
|
const imageUrl = ref('');
|
|
|
|
|
|
@@ -99,40 +134,78 @@
|
|
|
dialogTableVisible.value = !dialogTableVisible.value;
|
|
|
};
|
|
|
|
|
|
+ const closeDialog = () => {
|
|
|
+ dialogTableVisible.value = false;
|
|
|
+ emit('onClose', true);
|
|
|
+ };
|
|
|
+
|
|
|
defineExpose({ openDialog });
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .drawer-box {
|
|
|
- width: 251px;
|
|
|
- height: 711px;
|
|
|
+ :deep(.el-dialog) {
|
|
|
+ width: 271px !important;
|
|
|
+ height: 800px !important;
|
|
|
+ position: absolute;
|
|
|
+ right: 0px;
|
|
|
+ top: -10px;
|
|
|
+ // height: 660px !important;
|
|
|
}
|
|
|
|
|
|
- .header {
|
|
|
- position: relative;
|
|
|
- // display: flex;
|
|
|
- // font-size: 20px;
|
|
|
+ .dialog-header {
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
- .header-title {
|
|
|
- font-size: 20px;
|
|
|
- margin-left: 26px;
|
|
|
- margin-top: 19px;
|
|
|
+ .dialog-return {
|
|
|
+ position: absolute;
|
|
|
+ right: -10px;
|
|
|
+ top: 0px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
|
|
|
- .header-icon {
|
|
|
- position: absolute;
|
|
|
- top: 5px;
|
|
|
- right: 10px;
|
|
|
+ // :deep(.el-dialog__headerbtn) {
|
|
|
+ // background: url('~@/assets/icons/slide-right.png') !important;
|
|
|
+ // // z-index: 99999999999;
|
|
|
+ // width: 20px;
|
|
|
+ // height: 20px;
|
|
|
+ // background-size: cover;
|
|
|
+ // }
|
|
|
+ // ::v-deep.el-dialog__headerbtn {
|
|
|
+ // background: url('~@/assets/icons/slide-right.png');
|
|
|
+ // background-size: cover;
|
|
|
+ // // position: absolute;
|
|
|
+ // // right: 0px;
|
|
|
+ // // top: -10px;
|
|
|
+ // // i {
|
|
|
+ // // display: none;
|
|
|
+ // // }
|
|
|
+ // // height: 660px !important;
|
|
|
+ // }
|
|
|
+
|
|
|
+ :deep(.el-dialog__headerbtn .el-dialog__close) {
|
|
|
+ display: none;
|
|
|
}
|
|
|
+ // ::v-deep.el-dialog__headerbtn .el-dialog__close {
|
|
|
+ // display: none;
|
|
|
+ // }
|
|
|
|
|
|
+ .drawer-box {
|
|
|
+ width: 251px;
|
|
|
+ height: 711px;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.el-upload--picture-card) {
|
|
|
+ margin-left: 50px;
|
|
|
+ width: 104px;
|
|
|
+ height: 104px;
|
|
|
+ }
|
|
|
.pic-uploader .el-upload {
|
|
|
border: 1px dashed var(--el-border-color);
|
|
|
border-radius: 6px;
|
|
|
- width: 112px;
|
|
|
- height: 120px;
|
|
|
+ width: 104px;
|
|
|
+ height: 104px;
|
|
|
cursor: pointer;
|
|
|
- margin-top: 24px;
|
|
|
- margin-left: 70px;
|
|
|
+ // margin-top: 24px;
|
|
|
+ margin-left: 0px;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
transition: var(--el-transition-duration-fast);
|
|
|
@@ -142,39 +215,64 @@
|
|
|
// .avatar-uploader .el-upload:hover {
|
|
|
// border-color: var(--el-color-primary);
|
|
|
// }
|
|
|
+ .uploader-title {
|
|
|
+ font-size: 12px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
|
|
|
.el-icon.avatar-upload-icon {
|
|
|
font-size: 18px;
|
|
|
- color: #8c939d;
|
|
|
- width: 178px;
|
|
|
- height: 178px;
|
|
|
+ color: black;
|
|
|
+ width: 104px;
|
|
|
+ height: 104px;
|
|
|
text-align: center;
|
|
|
margin-top: -60px;
|
|
|
+ margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.uploader-config-text {
|
|
|
- margin-top: -60px;
|
|
|
- margin-left: 50px;
|
|
|
- font-size: 18px;
|
|
|
- font-weight: 350;
|
|
|
- color: #3d3d3d;
|
|
|
- opacity: 0.4;
|
|
|
+ margin-top: -45px;
|
|
|
+ margin-left: 26px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(0, 0, 0, 0.88);
|
|
|
+ // font-weight: 350;
|
|
|
+ // color: #3d3d3d;
|
|
|
+ // opacity: 0.4;
|
|
|
}
|
|
|
.upload-config-tip {
|
|
|
text-align: center;
|
|
|
- font-size: 18px;
|
|
|
- font-weight: 350;
|
|
|
- color: #3d3d3d;
|
|
|
- opacity: 0.4;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(0, 0, 0, 0.45);
|
|
|
+ // line-height: 22px;
|
|
|
+ margin-left: -20px;
|
|
|
+ margin-top: 8px;
|
|
|
+ margin-bottom: 8px;
|
|
|
}
|
|
|
|
|
|
.upload-notice {
|
|
|
- font-size: 20px;
|
|
|
- text-align: center;
|
|
|
- margin-top: 10px;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(0, 0, 0, 0.45);
|
|
|
+ margin-left: 4px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ // text-align: center;
|
|
|
+ // margin-top: 10px;
|
|
|
}
|
|
|
- .upload-tips {
|
|
|
- font-size: 16px;
|
|
|
- text-align: center;
|
|
|
+ // .upload-tips {
|
|
|
+ // font-size: 16px;
|
|
|
+ // text-align: center;
|
|
|
+ // }
|
|
|
+
|
|
|
+ .content-title {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 16px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .refresh-right {
|
|
|
+ margin-left: 4px;
|
|
|
+ margin-top: 2px;
|
|
|
}
|
|
|
</style>
|