|
@@ -86,7 +86,7 @@ export default defineComponent({
|
|
|
const parentContainer = reactive({
|
|
|
width: '100vw'
|
|
|
});
|
|
|
- const NPopoverRef = ref()
|
|
|
+ const NPopoverRef = ref();
|
|
|
const setContainer = () => {
|
|
|
const min = Math.min(screen.width, screen.height);
|
|
|
const max = Math.max(screen.width, screen.height);
|
|
@@ -114,7 +114,7 @@ export default defineComponent({
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
handleInit(1);
|
|
|
- window.removeEventListener("resize", resetSize);
|
|
|
+ window.removeEventListener('resize', resetSize);
|
|
|
});
|
|
|
|
|
|
const data = reactive({
|
|
@@ -223,7 +223,7 @@ export default defineComponent({
|
|
|
throttleScale: 0,
|
|
|
throttleRotate: 0
|
|
|
});
|
|
|
- console.log('initMoveable完毕',moveable)
|
|
|
+ console.log('initMoveable完毕', moveable);
|
|
|
moveable
|
|
|
.on('dragStart', ({ target, clientX, clientY }) => {
|
|
|
console.log('dragStart');
|
|
@@ -245,8 +245,8 @@ export default defineComponent({
|
|
|
// clientY
|
|
|
}) => {
|
|
|
isDragIng.value = true;
|
|
|
- if(NPopoverRef.value){
|
|
|
- NPopoverRef.value.setShow(false)
|
|
|
+ if (NPopoverRef.value) {
|
|
|
+ NPopoverRef.value.setShow(false);
|
|
|
}
|
|
|
|
|
|
const subdEl = document.getElementById(
|
|
@@ -328,7 +328,7 @@ export default defineComponent({
|
|
|
// 往又出
|
|
|
directionType.value = 'left';
|
|
|
}
|
|
|
- console.log(target.style.left)
|
|
|
+ console.log(target.style.left);
|
|
|
isDragIng.value = false;
|
|
|
// 在这里进行动画
|
|
|
if (boxBoundaryInfo.isBoundary) {
|
|
@@ -362,38 +362,32 @@ export default defineComponent({
|
|
|
data.detailId = props.detailId || query.detailId;
|
|
|
data.classGroupId = props.classGroupId || query.classGroupId;
|
|
|
|
|
|
-
|
|
|
const subdEl = document.getElementById(`moveNPopoverA`) as HTMLDivElement;
|
|
|
initBoundaryWrap(subdEl, boxBoundaryInfo);
|
|
|
initBoxRectInfo(subdEl, boxBoundaryInfo);
|
|
|
|
|
|
-
|
|
|
window.addEventListener('message', iframeHandle);
|
|
|
getDetail();
|
|
|
- window.addEventListener("resize", resetSize);
|
|
|
+ window.addEventListener('resize', resetSize);
|
|
|
});
|
|
|
|
|
|
- const resetSize = ()=>{
|
|
|
+ const resetSize = () => {
|
|
|
const subdEl = document.getElementById(`moveNPopoverA`) as HTMLDivElement;
|
|
|
- subdEl.style.display = 'none'
|
|
|
-
|
|
|
-
|
|
|
+ subdEl.style.display = 'none';
|
|
|
|
|
|
- boxBoundaryInfo.isBoundary = true;
|
|
|
- boxBoundaryInfo.isBoundaryType= 'right'
|
|
|
- if(NPopoverRef.value){
|
|
|
- NPopoverRef.value.setShow(false)
|
|
|
- }
|
|
|
-
|
|
|
- setTimeout(()=>{
|
|
|
-
|
|
|
- subdEl.style.transition = ''
|
|
|
- initBoxRectInfo(subdEl, boxBoundaryInfo);
|
|
|
- initBoundaryWrap(subdEl, boxBoundaryInfo);
|
|
|
- subdEl.style.display = 'block'
|
|
|
- },100)
|
|
|
+ boxBoundaryInfo.isBoundary = true;
|
|
|
+ boxBoundaryInfo.isBoundaryType = 'right';
|
|
|
+ if (NPopoverRef.value) {
|
|
|
+ NPopoverRef.value.setShow(false);
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ subdEl.style.transition = '';
|
|
|
+ initBoxRectInfo(subdEl, boxBoundaryInfo);
|
|
|
+ initBoundaryWrap(subdEl, boxBoundaryInfo);
|
|
|
+ subdEl.style.display = 'block';
|
|
|
+ }, 100);
|
|
|
+ };
|
|
|
|
|
|
const initBoundaryWrap = (target: any, wrapInfo: any) => {
|
|
|
target.addEventListener('mouseenter', () => {
|
|
@@ -412,7 +406,7 @@ export default defineComponent({
|
|
|
rate(target, 0);
|
|
|
});
|
|
|
target.addEventListener('mouseleave', () => {
|
|
|
- console.log('mouseleave',wrapInfo.isBoundary)
|
|
|
+ console.log('mouseleave', wrapInfo.isBoundary);
|
|
|
if (wrapInfo.isBoundary) {
|
|
|
// 如果在边框 就得还原 元素位置 还原完毕后 去除transition
|
|
|
if (wrapInfo.isBoundaryType == 'left') {
|
|
@@ -511,7 +505,6 @@ export default defineComponent({
|
|
|
wrapInfo.subWidth = RectInfo.width;
|
|
|
wrapInfo.subHeight = RectInfo.height;
|
|
|
target.style.transition = '.3s';
|
|
|
-
|
|
|
};
|
|
|
const onFullScreen = () => {
|
|
|
if (data.type === 'preview') {
|
|
@@ -1204,35 +1197,41 @@ export default defineComponent({
|
|
|
transformOrigin="center"
|
|
|
v-model:show={data.modelAttendStatus}
|
|
|
preset="card"
|
|
|
- class={styles.attendClassModal}
|
|
|
- title={'课后作业'}>
|
|
|
- <div class={styles.modelAttendContent}>{data.modalAttendMessage}</div>
|
|
|
- <NSpace class={styles.modelAttendBtnGroup}>
|
|
|
- <NButton
|
|
|
- type="default"
|
|
|
- round
|
|
|
- onClick={() => {
|
|
|
- data.modelAttendStatus = false;
|
|
|
- handleStop();
|
|
|
- // if (state.application) {
|
|
|
- // emit('close');
|
|
|
- // } else {
|
|
|
- // window.close();
|
|
|
- // }
|
|
|
- data.modelAttendStatus = false;
|
|
|
- }}>
|
|
|
- 暂不布置
|
|
|
- </NButton>
|
|
|
- <NButton
|
|
|
- type="primary"
|
|
|
- round
|
|
|
- onClick={() => {
|
|
|
- data.modelTrainStatus = true;
|
|
|
- data.modelAttendStatus = false;
|
|
|
- }}>
|
|
|
- 布置
|
|
|
- </NButton>
|
|
|
- </NSpace>
|
|
|
+ // class={styles.attendClassModal}
|
|
|
+ title={'课后作业'}
|
|
|
+ class={['modalTitle', styles.removeVisiable]}>
|
|
|
+ <div class={styles.studentRemove}>
|
|
|
+ <p>{data.modalAttendMessage}</p>
|
|
|
+ {/* <div class={styles.modelAttendContent}>
|
|
|
+ {data.modalAttendMessage}
|
|
|
+ </div> */}
|
|
|
+ <NSpace class={styles.btnGroupModal}>
|
|
|
+ <NButton
|
|
|
+ type="default"
|
|
|
+ round
|
|
|
+ onClick={() => {
|
|
|
+ data.modelAttendStatus = false;
|
|
|
+ handleStop();
|
|
|
+ // if (state.application) {
|
|
|
+ // emit('close');
|
|
|
+ // } else {
|
|
|
+ // window.close();
|
|
|
+ // }
|
|
|
+ data.modelAttendStatus = false;
|
|
|
+ }}>
|
|
|
+ 暂不布置
|
|
|
+ </NButton>
|
|
|
+ <NButton
|
|
|
+ type="primary"
|
|
|
+ round
|
|
|
+ onClick={() => {
|
|
|
+ data.modelTrainStatus = true;
|
|
|
+ data.modelAttendStatus = false;
|
|
|
+ }}>
|
|
|
+ 布置
|
|
|
+ </NButton>
|
|
|
+ </NSpace>
|
|
|
+ </div>
|
|
|
</NModal>
|
|
|
|
|
|
{/* 训练设置 */}
|
|
@@ -1375,6 +1374,9 @@ export default defineComponent({
|
|
|
<p>{data.removeContent}</p>
|
|
|
|
|
|
<NSpace class={styles.btnGroupModal} justify="center">
|
|
|
+ <NButton round onClick={() => (data.removeVisiable = false)}>
|
|
|
+ 取消
|
|
|
+ </NButton>
|
|
|
<NButton
|
|
|
round
|
|
|
type="primary"
|
|
@@ -1395,9 +1397,6 @@ export default defineComponent({
|
|
|
}}>
|
|
|
确定
|
|
|
</NButton>
|
|
|
- <NButton round onClick={() => (data.removeVisiable = false)}>
|
|
|
- 取消
|
|
|
- </NButton>
|
|
|
</NSpace>
|
|
|
</div>
|
|
|
</NModal>
|