studentEditTag.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <u-popup :show="showTag" @close="showTag=false" mode="center" round="20" style="width: 80%;z-index: 888;" closeable>
  3. <view class="bg-white ui-border-radius-20 ui-p" style="width: 650rpx;box-sizing: border-box;">
  4. <h4 class="ui-mt30">{{ tagInfo.parentTab.tab_name }} - {{ tagInfo.studentTab.tab_name }}</h4>
  5. <view class="ui-mt30 ui-flex ui-flex-align-center" >
  6. <span class="ui-flex ui-flex-align-center">
  7. <span class="f32 ui-mr20">分数</span>
  8. <u-number-box :disabledInput="true" @change="changeScore" :value="score" :min="tagInfo.type==1 ? 1 : '-5'" :max="tagInfo.type==1 ? 5 : '-1'"></u-number-box>
  9. </span>
  10. </view>
  11. <view class="ui-mt30">
  12. <u-radio-group
  13. v-model="tagInfo.type"
  14. placement="row">
  15. <u-radio activeColor="#05cca1" disabled label="好评" :name="1"></u-radio>
  16. <u-radio activeColor="#05cca1" disabled label="差评" :name="2" style="margin-left: 40rpx;"></u-radio>
  17. </u-radio-group>
  18. </view>
  19. <view class="ui-mt30 ui-flex ui-flex-column ui-flex-center ui-flex-align-center">
  20. <u-button @click="queding()" style="width: 35%;" type="primary" color="#05cca1" size="small" :plain="true" text="确定修改"></u-button>
  21. <view class="text-center ui-mt20" @click="querenshanchu">
  22. <u--text text="删除" style="text-decoration: underline;" type="info"></u--text>
  23. </view>
  24. </view>
  25. </view>
  26. </u-popup>
  27. </template>
  28. <script>
  29. import { shanchubiaoqianByTeacherId,laoshixiugaibiaoqian,laoshiXiugaiXueshengBiaoqianFenshu,laoshiShanchuXueshengBiaoqian } from "@/common/api/tab.js"
  30. export default {
  31. data() {
  32. return {
  33. showTag : false,
  34. tagInfo : {
  35. parentTab : {},
  36. studentTab : {}
  37. },
  38. score : '',
  39. }
  40. },
  41. methods: {
  42. changeScore(val){
  43. this.score=val.value
  44. },
  45. open(){
  46. this.showTag=true
  47. },
  48. change(val){
  49. },
  50. queding(){
  51. this.$api.sendRequest({
  52. url: laoshiXiugaiXueshengBiaoqianFenshu,
  53. data : {
  54. tab_log_id : this.tagInfo.id,
  55. teacher_id : this.$store.state.teacher_id,
  56. score : this.score
  57. },
  58. method : 'post',
  59. success: res => {
  60. uni.showToast({
  61. title: '修改成功',
  62. icon: "none"
  63. })
  64. this.showTag=false
  65. this.tagInfo.score=this.score
  66. },
  67. })
  68. },
  69. querenshanchu(){
  70. uni.showModal({
  71. title: '提示',
  72. content: '确定删除吗',
  73. confirmColor : '#05cca1',
  74. success: (res)=> {
  75. if (res.confirm) {
  76. this.$api.sendRequest({
  77. url: laoshiShanchuXueshengBiaoqian,
  78. data : {
  79. tab_log_id : this.tagInfo.id,
  80. teacher_id : this.$store.state.teacher_id
  81. },
  82. method : 'post',
  83. success: res => {
  84. uni.showToast({
  85. title: '删除成功',
  86. icon: "none"
  87. })
  88. this.showTag=false
  89. this.$emit("del",)
  90. },
  91. })
  92. }
  93. }
  94. });
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. /deep/.uni-data-tree-input {
  101. display: none;
  102. }
  103. .edit-tag {
  104. }
  105. .edit-tag-item-btn {
  106. background: rgba(5, 204, 161, 0.10);
  107. border-radius: 14.33px;
  108. padding: 4rpx 20rpx;
  109. width: fit-content;
  110. }
  111. .edit-tag-item {
  112. background: rgba(5, 204, 161, 0.10);
  113. border-radius: 14.33px;
  114. padding: 4rpx 20rpx;
  115. margin-right: 32rpx;
  116. margin-bottom: 32rpx;
  117. position: relative;
  118. .edit-tag-item-icon {
  119. position: absolute;
  120. width: 40rpx;
  121. border-radius: 50%;
  122. height: 40rpx;
  123. text-align: center;
  124. line-height: 40rpx;
  125. background-color: rgba(66, 185, 131, 1);
  126. right: -20rpx;
  127. top: -20rpx;
  128. }
  129. }
  130. .edit-tag-item-add {}
  131. </style>