Commit e4791388a7050c9726c03829adebbe30cbf244fb
1 parent
62e1818e
班主任屏蔽设置答案入口
Showing
2 changed files
with
34 additions
and
26 deletions
src/views/standard/ask/index.vue
| ... | ... | @@ -175,20 +175,23 @@ |
| 175 | 175 | > |
| 176 | 176 | <el-table-column label="操作" align="center"> |
| 177 | 177 | <template slot-scope="scoped"> |
| 178 | - <el-tooltip | |
| 179 | - effect="dark" | |
| 180 | - v-if="scoped.row.answerNum == 0" | |
| 181 | - content="设置答案" | |
| 182 | - placement="top" | |
| 183 | - > | |
| 184 | - <el-button | |
| 185 | - type="primary" | |
| 186 | - circle | |
| 187 | - size="mini" | |
| 188 | - icon="fa fa-file-text" | |
| 189 | - @click="edit(scoped.row)" | |
| 190 | - ></el-button> | |
| 191 | - </el-tooltip> | |
| 178 | + <template v-if="scoped.row.answerNum == 0"> | |
| 179 | + <el-tooltip | |
| 180 | + v-if="role == 'ROLE_JIAOSHI'" | |
| 181 | + effect="dark" | |
| 182 | + content="设置答案" | |
| 183 | + placement="top" | |
| 184 | + > | |
| 185 | + <el-button | |
| 186 | + type="primary" | |
| 187 | + circle | |
| 188 | + size="mini" | |
| 189 | + icon="fa fa-file-text" | |
| 190 | + @click="edit(scoped.row)" | |
| 191 | + ></el-button> | |
| 192 | + </el-tooltip> | |
| 193 | + <template v-else>未设置答案</template> | |
| 194 | + </template> | |
| 192 | 195 | <el-tooltip |
| 193 | 196 | v-else |
| 194 | 197 | effect="dark" | ... | ... |
src/views/standard/test/index.vue
| ... | ... | @@ -291,23 +291,28 @@ |
| 291 | 291 | @click="linkTo(scoped.row)" |
| 292 | 292 | ></el-button> |
| 293 | 293 | </el-tooltip> |
| 294 | - <el-tooltip | |
| 294 | + <template | |
| 295 | 295 | v-if=" |
| 296 | 296 | scoped.row.answerNum == 0 && |
| 297 | 297 | scoped.row.subjectiveScore != scoped.row.examPaperScore |
| 298 | 298 | " |
| 299 | - effect="dark" | |
| 300 | - content="设置答案" | |
| 301 | - placement="top" | |
| 302 | 299 | > |
| 303 | - <el-button | |
| 304 | - type="primary" | |
| 305 | - circle | |
| 306 | - size="mini" | |
| 307 | - icon="fa fa-file-text" | |
| 308 | - @click="edit(scoped.row)" | |
| 309 | - ></el-button> | |
| 310 | - </el-tooltip> | |
| 300 | + <el-tooltip | |
| 301 | + v-if="role == 'ROLE_JIAOSHI'" | |
| 302 | + effect="dark" | |
| 303 | + content="设置答案" | |
| 304 | + placement="top" | |
| 305 | + > | |
| 306 | + <el-button | |
| 307 | + type="primary" | |
| 308 | + circle | |
| 309 | + size="mini" | |
| 310 | + icon="fa fa-file-text" | |
| 311 | + @click="edit(scoped.row)" | |
| 312 | + ></el-button> | |
| 313 | + </el-tooltip> | |
| 314 | + <template v-else>未设置答案</template> | |
| 315 | + </template> | |
| 311 | 316 | <el-tooltip |
| 312 | 317 | v-if=" |
| 313 | 318 | scoped.row.subjectiveScore == scoped.row.examPaperScore && | ... | ... |