闫增涛
2024-12-17 7b9b132748af1ccd08eb50d1a8f76638726f2de6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<view class="container">
  <view class="page-body">
    <view class="from-item">
      <view class="label"><text class="icon"></text> 图书名称: </view>
      <view class="item-content">
        {{bookInfo.name}}
      </view>
    </view>
    <view class="from-item">
      <view class="label"><text class="icon">*</text> 姓名: </view>
      <view class="item-content">
        <t-input placeholder="请输入姓名" borderless value="{{name}}" bindchange="bindTnputBlur" disabled="{{disabled}}" />
      </view>
    </view>
    <view class="from-item">
      <view class="label"> <text class="icon">*</text>学校: </view>
      <view class="item-content">
        <t-input placeholder="输学校名称" borderless value="{{school}}" bindchange="onSchoolInput" disabled="{{disabled}}" />
      </view>
    </view>
    <view class="from-item">
      <view class="label"><text class="icon">*</text> 班级: </view>
      <view class="item-content">
        <t-input placeholder="请输入班级" borderless value="{{class}}" bindchange="bindClassBlur" disabled="{{disabled}}" />
      </view>
    </view>
    <view class="from-item">
      <view class="label"><text class="icon">*</text> 学习时长: </view>
      <view class="item-content">
        {{learnTime}}
      </view>
    </view>
    <!-- <view class="from-item">
      <view class="label"> <text class="icon">*</text>反馈内容: </view>
      <view class="item-content">
 
        <t-textarea placeholder="请输入反馈内容" value="{{content}}" disableDefaultPadding="{{true}}" autosize="{{true}}" bind:line-change="onLineChange" maxlength="300" indicator bindchange="bindTextAreaBlur" />
      </view>
    </view> -->
  </view>
  <view class="content-Box">
    <view class="item-title">
      <image src="/static/images/bookService/detail/renwudan/icon.png" class="iconImage" />
      <view>学习任务单</view>
    </view>
    <view class="item-box" wx:if="{{menuList.length > 0 && !loading}}">
      <view wx:for="{{menuList}}" wx:for-item="item" wx:for-index="index" wx:key="id" class="item">
        <view class="itemCon">
          <div wx:if="{{!item.children}}" class="noChild"></div>
          <view wx:if="{{item.children}}">
            <t-icon name="chevron-down" size="48rpx" data-name="chevron-down"  />
          </view>
          <view bind:tap="getTask" data-item="{{item}}" class="itemName">{{ item.name }}</view>
        </view>
        <view class="childBox" wx:if="{{item.children}}">
          <view wx:for="{{item.children}}" wx:for-item="item1" wx:for-index="index" wx:key="id" class="item">
            <view bind:tap="getTask" data-item="{{item1}}" class="itemName">{{ item1.name }}</view>
          </view>
        </view>
      </view>
    </view>
    <view wx:else style="width: 100%; height: min-content;margin-top:40rpx">
      <t-skeleton
        row-col="{{rowCol}}"
        theme="paragraph"
        animation="gradient"
        loading="{{loading}}"
      ></t-skeleton>
    </view>
  </view>
  <view class="popupBox">
    <t-popup visible="{{taskShow}}" bind:visible-change="onVisibleChange" placement="center">
      <view class="block">
        <scroll-view class="srcolbox" scroll-y scroll-height-animation="true">
          <view class="dataList">
            <view wx:if="{{dataList.length > 0}}">
              <view wx:for="{{dataList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="item-Con-Box">
                <view class="description">
                  <view class="label">
                    <view>{{ index + 1 }}、</view>
                    <view class="des">任务描述</view>
                  </view>
                  <view class="name">{{ item.subtaskDescription }}</view>
                </view>
                <view class="pointer">
                  <view class="name">图书建议:</view>
                  <view>{{ item.learningSuggestions }}</view>
                </view>
                <view class="evaluateBox">
                  <view class="box-list">
                    <view class="lable"><text class="icon">*</text>学习反思:</view>
                    <view class="inputBox">
                      <t-textarea placeholder="请输入学习反思" value="{{item.introspection}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" data-index="{{index}}" bindchange="onIntrospectionInput" disabled="{{disabled}}" />
                    </view>
                  </view>
                  <view class="box-list">
                    <view class="lable"><text class="icon">*</text>完成情况:</view>
                    <view class="inputBox">
                      <t-textarea placeholder="请输入完成情况" value="{{item.completion}}" data-index="{{index}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" disabled="{{disabled}}" bindchange="onCompletionInput" />
                    </view>
                  </view>
                  <view class="box-list">
                    <view class="lable"><text class="icon">*</text>自己评:</view>
                    <view class="inputBox">
                      <t-textarea placeholder="请输入评价" value="{{item.selfEvaluation}}" data-index="{{index}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" disabled="{{disabled}}" bindchange="onSelfInput" />
                    </view>
                  </view>
                  <view class="box-list" wx:if="{{consumer == 'classmate' || !consumer}}">
                    <view class="lable">同伴评:</view>
                    <view class="inputBox">
                      <t-textarea placeholder="请输入评价" value="{{item.mateEvaluation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMateInput" data-index="{{index}}" wx:if="{{consumer == 'classmate'  && !evaluated}}" />
                      <view wx:if="{{isUpdate && item.mateEvaluation.length > 0}}" class="rateList">
                        <view wx:for="{{item.mateEvaluation}}" wx:for-item="mateItem" wx:key="index" class="li">
                          <view class="userName">{{ mateItem.userName }}</view>
                          <view>{{ mateItem.evaluation }}</view>
                        </view>
                      </view>
                      <text wx:if="{{consumer != 'classmate' && item.mateEvaluation.length == 0}}">暂无数据</text>
                    </view>
                  </view>
                  <view class="box-list" wx:if="{{consumer == 'teacher' || !consumer}}">
                    <view class="lable">老师评:</view>
                    <view class="inputBox">
                      <t-textarea placeholder="请输入评价" value="{{item.teacherEvaluation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTeacherInput" data-index="{{index}}" wx:if="{{consumer == 'teacher' && !evaluated}}" />
                      <view wx:if="{{isUpdate && item.teacherEvaluation.length > 0}}" class="rateList">
                        <view wx:for="{{item.teacherEvaluation}}" wx:for-item="mateItem" wx:key="index" class="li">
                          <view class="userName"><text></text>{{ mateItem.userName }}</view>
                          <view>{{ mateItem.evaluation }}</view>
                        </view>
                      </view>
                      <text wx:if="{{consumer != 'teacher' && item.teacherEvaluation.length == 0}}">暂无数据</text>
                    </view>
                  </view>
                </view>
              </view>
            </view>
            <view wx:if="{{dataList.length == 0}}" class="empyt">
              <empty />
            </view>
            <view class="buttonBox" wx:if="{{dataList.length > 0}}">
              <t-button class="btn" theme="primary" bind:tap="submitComment" wx:if="{{consumer && !evaluated}}">
                <view slot="content" class="btn-content">提交</view>
              </t-button>
              <t-button class="btn" theme="primary" bind:tap="updateSubmit" wx:if="{{isUpdate && !consumer && dataList.length > 0}}">
                <view slot="content" class="btn-content">邀请评价</view>
              </t-button>
              <t-button class="btn" theme="primary" bind:tap="inviteBtn" wx:if="{{!isUpdate && !consumer && dataList.length > 0}}">
                <view slot="content" class="btn-content">邀请评价</view>
              </t-button>
            </view>
          </view>
        </scroll-view>
        <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseTask" />
      </view>
    </t-popup>
  </view>
  <view class="popup-box" wx:if="{{dialogVisible}}" bindtap="handleClose"></view>
  <view class="info-center" style="top:{{height*0.3}}px;" wx:if="{{dialogVisible}}">
    <view class="block1">
      <t-radio-group value="{{invitee}}" borderless t-class="box" class="radioBox" bind:change="onInviteeChange">
        <t-radio block="{{false}}" label="同伴" value="classmate" class="radio" />
        <t-radio block="{{false}}" label="老师" value="teacher" class="radio" />
      </t-radio-group>
    </view>
    <view class="buttonBox">
      <t-button class="btn" theme="primary" bind:tap="handleClose">
        <view slot="content" class="btn-content">取消</view>
      </t-button>
      
      <t-button class="btn" theme="primary" bind:tap="confirmBtn1" wx:if="{{invitee == 'teacher' &&teacherEvaluated}}">
        <view slot="content" class="btn-content">确定</view>
      </t-button>
      <t-button class="btn" theme="primary" bind:tap="confirmBtn" open-type="share" wx:else>
        <view slot="content" class="btn-content">确定</view>
      </t-button>
    </view>
  </view>
</view>