Преглед на файлове

Merge branch 'master-charge' of http://git.yujin.shuziyunyao.com/yujin/digital-medicine-front into master-charge

lisy преди 4 месеца
родител
ревизия
3961d9dcbb

+ 6 - 6
src/components/DragResizeRotate/DragResizeRotate.vue

@@ -1,8 +1,8 @@
 <template>
-    <VueDragResizeRotate :x="drapJson.x" :y="drapJson.y" class-name-handle="my-handle-class-dd handle" class-name-active="my-active-class-dd" class-name="my-class-dd" :w="drapJson.w" :h="drapJson.h" :r="drapJson.r" :parent="true" @resizing="onResize" @resizestop="onResizeStop" @activated="onActivated" @deactivated="onDeactivated" @dragging="onDrag" @dragstop="onDragStop">
+    <VueDragResizeRotate :x="+drapJson.x" :y="+drapJson.y" class-name-handle="my-handle-class-dd handle" class-name-active="my-active-class-dd" class-name="my-class-dd" :w="+drapJson.w" :h="+drapJson.h" :r="+drapJson.r" :parent="true" @resizing="onResize" @resizestop="onResizeStop" @activated="onActivated" @deactivated="onDeactivated" @dragging="onDrag" @dragstop="onDragStop">
         <slot>
-            <div class="w-100% h-100% d-flex a-c j-c p-rtv">
-                <span>点击事件区域</span>
+            <div class="w-100% h-100% d-flex a-c j-c p-rtv" style="background-color: rgba(116, 251, 229, .3)">
+                <span></span>
                 <div class="f-s-18 c-danger delete-icon_box" @click.stop="deleteItem">
                     <el-icon>
                         <CircleCloseFilled />
@@ -78,18 +78,18 @@ watch(() => prop.modelValue, (newVal) => {
 }
 
 .my-active-class-dd {
-    border-color: #74FBE5;
+    border-color: rgb(116, 251, 229);
 }
 
 .my-class-dd {
     touch-action: none;
     position: absolute;
     box-sizing: border-box;
-    border: 1px dashed;
+    border: 2px dashed;
     border-color: #74FBE5;
 }
 
 .my-handle-class-dd {
-    border: 1px solid #74FBE5;
+    border: 2px solid #74FBE5;
 }
 </style>

+ 25 - 17
src/components/TelViewTem/TelViewTem.vue

@@ -1,8 +1,11 @@
 <template>
-    <div class="tel-view-tem" :style="containerStyle" @mousedown="onMouseDown">
+    <div class="tel-view-tem" @mousedown="onMouseDown">
+        <img class="bg-src" :src="bgSrc" />
         <!-- 拖动选区样式 -->
         <div v-if="isDragging" class="drag-area" :style="dragAreaStyle"></div>
-        <slot></slot>
+        <div class="pro-content">
+          <slot></slot>
+        </div>
     </div>
 </template>
 
@@ -27,19 +30,7 @@ const endPoint = ref({ x: 0, y: 0 });
 const imgHeight = ref(props.minHeight);
 const imgWidth = ref(props.width);
 
-watch(() => props.bgSrc, (val) => {
-  if (val) {
-    const img = new window.Image();
-    img.src = val;
-    img.onload = () => {
-      imgHeight.value = img.height;
-      imgWidth.value = img.width;
-    };
-  } else {
-    imgHeight.value = props.minHeight;
-    imgWidth.value = props.width;
-  }
-}, { immediate: true });
+
 
 const containerStyle: any = computed(() => {
   if (props.bgSrc) {
@@ -76,8 +67,8 @@ const dragAreaStyle: any = computed(() => {
     top: `${y}px`,
     width: `${w}px`,
     height: `${h}px`,
-    border: '1px dashed #409eff',
-    background: 'rgba(64,158,255,0.1)',
+    border: '2px dashed #409eff',
+    background: 'rgba(116, 251, 229,0.3)',
     pointerEvents: 'none',
     zIndex: 10,
   };
@@ -133,7 +124,24 @@ function onMouseUp() {
   position: relative;
 }
 .drag-area {
+  position: relative;
   z-index: 100;
   transition: none;
 }
+.bg-src {
+  width: 750px;
+  display: block;
+  user-select: none;
+  pointer-events: none;
+  height: auto;
+  object-fit: contain;
+  z-index: -1;
+}
+.pro-content {
+  position: absolute;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+}
 </style>

+ 0 - 5
src/views/training/meeting/index.vue

@@ -106,11 +106,6 @@
                                 <el-button v-if="row.tempStatus == '1' && row.trainingStatus !== '2'" type="primary" text @click="temporary(row)" :disabled="row.trainingStatus == '2'">查看</el-button>
                             </template>
                         </vxe-column>
-                        <vxe-column title="会议门户" align="center" field="createByName" width="120" :formatter="colNoData">
-                            <template #default="{ row }">
-                                <el-button type="primary" text @click="router.push({ path: 'ptpl-edit', query: { meetid: row?.id } })">编辑</el-button>
-                            </template>
-                        </vxe-column>
                         <vxe-column title=" 创建人" align="center" field="createByName" width="70" :formatter="colNoData" />
                         <vxe-column title="创建时间" align="center" field="createTime" width="160" :formatter="colNoData" />
                         <vxe-column title="操作" width="240" fixed="right">

+ 1 - 1
src/views/training/models/meeting-tpl-events.vue

@@ -118,7 +118,7 @@ watch(
 <style lang="scss" scoped>
 .bg-img-item_view {
     background-size: cover;
-    background-position: center;
+    background-position: center top;
     border: 1px solid transparent;
 }
 .delete-icon-tpl {

+ 3 - 3
src/views/training/models/meeting-tpl-h5.vue

@@ -1,10 +1,10 @@
 <template>
     <template v-if="form.img">
         <div class="flex1" style="overflow: auto;">
-            <TelViewTem @selectArea="selectArea" :enableDraw="enableDraw" bgColor="#f7f7f7" :bgSrc="form.img">
+            <TelViewTem @selectArea="selectArea" :enableDraw="enableDraw" bgColor="#fff" :bgSrc="form.img">
                 <DragResizeRotate v-if="form.bgm" v-model="form.bgmRact" @activated="activatedBgm($event)" @deactivated="deactivatedBgm">
                     <div class="w-100% h-100% d-flex j-c a-c">
-                        <img src="@/assets/images/bg_music_icon.png" />
+                        <img class="w-100% h-100%" src="@/assets/images/bg_music_icon.png" />
                     </div>
                 </DragResizeRotate>
                 <template v-for="(item, index) in form?.events" :key="index">
@@ -70,7 +70,7 @@ const deactivatedBgm = async () => {
         id: form.value.id,
         bgmRact: form.value.bgmRact || {
             x: 100,
-            y: 100,
+            y: 650,
             w: 50,
             h: 50
         },

+ 3 - 1
src/views/training/models/meeting-tpl-list.vue

@@ -74,12 +74,13 @@ const clickSetIndex = async (item: any) => {
 }
 .bg-img-item_view {
     background-size: cover;
-    background-position: center;
+    background-position: center top;
     border: 1px solid transparent;
 }
 .item-hover {
     cursor: pointer;
     &:hover {
+        background-color: rgba(#2A6D52, .3);
         .bg-img-item_view {
             border-color: var(--el-color-primary);
         }
@@ -88,6 +89,7 @@ const clickSetIndex = async (item: any) => {
         }
     }
     &.checked {
+         background-color: rgba(#2A6D52, .3);
         .bg-img-item_view {
             border-color: var(--el-color-primary);
         }

+ 3 - 1
src/views/training/models/select-meeting-tpl-page.vue

@@ -76,12 +76,13 @@ watch(
 <style scoped lang="scss">
 .bg-img-item_view {
     background-size: cover;
-    background-position: center;
+    background-position: center top;
     border: 1px solid transparent;
 }
 .item-hover {
     cursor: pointer;
     &:hover {
+        background-color: rgba(#2A6D52, .3);
         .bg-img-item_view {
             border-color: var(--el-color-primary);
         }
@@ -90,6 +91,7 @@ watch(
         }
     }
     &.checked {
+        background-color: rgba(#2A6D52, .3);
         .bg-img-item_view {
             border-color: var(--el-color-primary);
         }

+ 6 - 4
src/views/training/ptpl/edit/index.vue

@@ -19,13 +19,13 @@
                 </div>
             </div>
             <div class="flex1 ov-hd d-flex">
-                <div class="bg-#f8f8f8 w-200 box-sizing-border over-auto">
+                <div class="bg-#fff w-200 box-sizing-border over-auto">
                     <MeetingTplList v-if="meetid" :meetid="meetid" @selectItem="selectItem" :list="list"
                         @setIndex="setIndexTpl" @addMeetingTpls="addMeetingTpls" @delete="deleteListTpl"
                         @changeLabel="changeLabel"></MeetingTplList>
                 </div>
-                <div class="flex1 ov-hd d-flex flex-cln a-c">
-                    <div v-if="form.id" @click="changeLabel(form)" class="w-750 pd2-10-0 f-w-5">
+                <div class="flex1 ov-hd d-flex flex-cln a-c bg-#f7f7f7">
+                    <div v-if="form.id" @click="changeLabel(form)" class="w-750 pd2-10-0 f-w-5 f-s-18">
                         {{ form?.label }}
                         <el-icon>
                             <EditPen />
@@ -34,7 +34,7 @@
                     <MeetingTplH5 v-if="form.id" v-model="form" @activated="activated"
                         @deleteItemEvents="deleteItemEvents" @muisc="setMuisc"></MeetingTplH5>
                 </div>
-                <div class="bg-#f8f8f8 w-240">
+                <div class="bg-#fff w-300">
                     <MeetingTplEvents v-if="curEvent" v-model="curEvent" :dict="dict" @save="saveEevent" :list="list">
                     </MeetingTplEvents>
                 </div>
@@ -75,6 +75,8 @@ const saveEevent = (item: any) => {
     const index = form.value.events.findIndex((it: any) => it.id === item.id);
     if (index === -1) return;
     form.value.events[index] = item;
+    // 保存成功
+    proxy?.$modal.msgSuccess('保存成功');
 };
 const deleteItemEvents = (item: any) => {
     if (curEvent.value?.id === item.id) {