detail.wxml 9.0 KB
<!--pages/detail/detail.wxml-->
<view class='detailBox'>
  <!-- 作业情况 -->
  <view class='main1'>
    <!-- 名称 -->
    <view class='main1_top'>
      <view class='main1_topTxt'>{{obj.work_name}}</view>

      <view class='main_topImg2 copyHomeWork' bindtap='copyHomeWork'>
        <image src='/image/copy.png' class="del_btn"></image>
        复制作业
      </view>
      <button open-type='share' class='shareBtn'>
        <view class='main1_topImg'>
          <image src='/image/45.png'></image>
        </view>
        分享
      </button>
      <view class='main_topImg2' bindtap='removeHomework'>
        <image src='/image/73.png' class="del_btn"></image>
        删除
      </view>
    </view>
    <!-- 内容 -->
    <view class='main1_con'>
      <!-- 文字 -->
      <view class='main1_conTxt'>{{obj.workdesc}}</view>
      <!-- 图片 -->
      <view class='main_conImgBox' wx:if="{{obj.images !=''}}">
        <view class='main_conImg' wx:for="{{obj.images}}" wx:key='{{index}}' bindtap='yuFun2' data-img="{{item}}">
          <image src='{{item}}'></image>
        </view>
      </view>
    </view>
    <!-- 底部信息 -->
    <view class='main1_bottom'>
      <view class='main1_botTxt1'>布置班级:{{obj.class_name}}</view>
      <view class='main1_botTxt2'>截止时间:{{obj.endtime}}</view>
      <view class='main1_bot3'>
        <view class='main1_bot3txt'>提交情况:</view>
        <view class='main1_bot3txt2'>
          <view class='main1_bot3txt2_2' style='width:{{num}}'></view>
        </view>
        <view class='main1_bot3txt3'>{{list.msg.wannum}}/{{list.msg.totalnum}}</view>
        <view class="poster" bindtap="drawImage">导出作业海报</view>
      </view>
    </view>
  </view>
  <!-- 未完成的学生 -->
  <view class='main2'>
    <view class='main2_top'>
      <view class='main2_topTxt'>未完成的学生</view>
      <!-- <view class='main2_topImg'>
                <image src='/image/14.png'></image>
            </view> -->
            <view class="action_copy" bindtap="copy_name" > <image src="/image/copy.png" class="main1_topImg"></image>复制名单</view>
    </view>
    <!-- 有未完成的情况时 -->
    <view class='main2_false' wx:if="{{list.msg.weinum>0}}">
      <view class='main2_falseLi' wx:for="{{unfinished}}" wx:key>
        <view class='main2_falseImg'>
          <image src='/image/46.png'></image>
        </view>
        <view class='main2_falseLiTxt'>{{item.name}}</view>
      </view>
    </view>
    <!-- 没有学生时 -->
    <view wx:if="{{list.msg.weinum == 0 }}">
      <view class='main2_trueTxts'>已经全部完成了(●'◡'●)</view>
    </view>
    <!-- 都完成时 -->
    <!-- <view class='main2_true' wx:if="{{list.msg.weinum == 0 }}">
            <view class='main2_trueImg'>
                <image src='/image/50.png'></image>
            </view>
            <view class='main2_trueTxt'>您的学生全部完成了作业!</view>
        </view> -->
  </view>

  <!-- 查看作业 -->
  <view class='main3'>
    <view class='main3_title'>已提交的作业</view>
    <!-- 暂无作业 -->
    <view wx:if="{{comments == ''}}" class='nullClass'>暂无作业</view>
    <!-- 列表 -->
    <view class='main3_li' wx:for="{{comments}}" wx:key>
      <view class='main3_liTop'>
        <view class='main3_liTopImg1'>
          <image src='{{item.openid.image}}'></image>
        </view>
        <view class='main3_liTopRight'>
          <view class='main3_liTopTxt'>
            <view class='main3_liTopTxt1'>{{item.openid.studentInfo}}</view>
            <view class='main3_liTopTxt2'>{{item.formtime}}</view>
          </view>
          
          <!-- <view class='main3_liTopImg2' bindtap='linkFun' data-id="{{obj.id}}" data-is="{{item.is}}" data-titid="{{item.id}}" data-index="{{index}}">
            <image wx:if="{{item.is == 0}}" src='/image/30.png'></image>
            <image wx:if="{{item.is == 1}}" src='/image/29.png'></image>
          </view> -->
        </view>
      </view>
      <!-- 内容 -->
      <view class='main3_Con'>
        <!-- 文字 -->
        <view class='main3_ConTxt'>{{item.desc}}</view>

        <!-- 语音 -->
        <view class='main3_audio' wx:if="{{item.auto!=''}}">
          <view class='main3_bg' bindtap='pauseaudio' data-src="{{item.auto}}" data-dir="{{item.s}}" wx:if="{{qid}}"></view>
          <view class='main3_bg' bindtap='playaudio' data-src="{{item.auto}}" data-dir="{{item.s}}" wx:else></view>
          <view class='voiceImg'>
            <image src='/image/87.gif' class='shengyins' wx:if='{{qid}}'></image>
            <image src='/image/86.png' wx:else></image>
          </view>
          <!-- <view class='voiceTxt' wx:if='{{qid}}'>{{myaudio.duration}}</view> -->
          <view class='voiceTxt'>{{item.duration}}</view>
        </view>
        <!-- 图片 -->
        <view class='main3_ConPicture'>
          <view class='main3_ConPicImg' wx:if="{{item.pigai_images[0]!=''}}" wx:for="{{item.pigai_images}}" wx:key wx:for-item='ite' wx:for-index='inde'>
            <image src='{{ite}}' bindtap='yuFun' data-src="{{ite}}" data-item='{{item}}'></image>
          </view>
          <!-- 视频 -->
          <view class='main3_video' wx:if="{{item.video!=''}}">
            <video src='{{item.video}}'></video>
            <view class='videoMask' bindtap='goVideo' data-src="{{item.video}}"></view>
          </view>
        </view>
        <!--操作-->
        <view class="action_Box">
          <view class="main_action_set {{item.is_nice==1?'':'unmark'}}" bindtap="setYouxiu" id="{{item.id}}" data-index='{{index}}'>
            <image class="setAction" wx:if='{{item.is_nice == 1}}' src="/image/youxiu.png"></image>
            <image class="setAction" wx:else src="/image/unyouxiu.png"></image>
            优秀
          </view>
          <view class="action_item" wx:if='{{item.pigai_images[0]!=""}}' bindtap="markHomeWork" data-index='{{index}}' id="{{item.id}}">
            <view class="action_img_box">
              <image src='/image/right.png'  mode="widthFix"></image>
            </view>
            批改
          </view>

          <view class="action_item" bindtap="ac_comment" data-index='{{index}}' id="{{item.id}}">
            <view class="action_img_box">
              <image src='/image/pinglun.png' style='position: relative; top:4rpx;' mode="widthFix"></image>
            </view>
            评论
          </view>

          <view class="action_item" bindtap='linkFun' data-id="{{obj.id}}" data-is="{{item.is}}" data-titid="{{item.id}}" data-index="{{index}}">
            <block wx:if="{{item.is == 0}}">
              <view class="action_img_box" >
                <image src='/image/30.png' class="zan" mode="widthFix"></image>
              </view>

            </block>
            <block wx:if="{{item.is == 1}}">
            <view class="active_zan">
              <view class="action_img_box" >
                <image src='/image/29.png' class="zan" mode="widthFix"></image>
              </view>
              已赞
            </view>
   
            </block>
          </view>
        </view>
        <!-- 评论区域 -->
        <view class="comment_list">
          <view class="commentItem" wx:for='{{item.tall}}' wx:for-item='sec'>
            <view class="teacher">{{sec.teacher_name}}:</view>{{sec.content}}
          </view>
        </view>
        <!-- <view class="comment_box" wx:if='{{item.showComment}}'>
          <input class="text_input" placeholder="随便说几句" focus="{{item.showComment}}" cursor-spacing='35'	 bindinput="input_comment" data-index="{{index}}"></input>
          <view class="comment_action_box">
            <view class="single_btn" bindtap="cancleComment" data-index="{{index}}">取消</view>
            <view class="single_btn" bindtap="subComment" data-index="{{index}}" id="{{item.id}}">提交</view>
          </view>
        </view> -->
      </view>
    </view>
  </view>
</view>

<!-- 评论区域 -->
<view class="comment_bg" bindtap="closeComment" wx:if='{{showComment}}'>
  <view class="comment_box" catchtap="catchTap">
      <view class="comment_input_box">
        <input class="input_box" bindinput="input_comment" value="{{tempValue}}"></input>  
        <view class="send_btn" bindtap="subComment">发送</view>
      </view>
      <view class="comments_list">
        <view class="comment_item" wx:for='{{commentList}}' wx:key='' bindtap="setValue" data-content='{{item.content}}'>{{item.content}}</view>
        <view class="comment_add" bindtap="manageComment">+管理快捷评语</view>
      </view>
  </view>
</view>


<!-- 绘制海报 -->

<view style='width:0;height:0;overflow:hidden; position:absolute;top:0;left:-800px' >
    <canvas canvas-id="springCanvas" style="width:375px;height:650px"></canvas>   
</view> 
<!-- 海报预览 -->

<view class="mask" wx:if='{{createPoster}}'>
  <view class="imgBox">
  <view class="closeBg" bindtap="closePoster">
    <image src="/image/83.png"></image>
  </view>
    <image src="{{posterUrl}}" mode="widthFix"></image>
    <view class="view_btn" bindlongtap="previewImg">长按保存转发</view>
  </view>  
</view>