工单小程序2024-11-20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
2.6 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="Urgent-Work-List"
  3. :style="{margin}"
  4. @click="$emit('click')">
  5. <view class="Work-List">
  6. <view class="label">
  7. 任务号
  8. </view>
  9. <view class="text">
  10. {{ obj.taskNo }}
  11. </view>
  12. </view>
  13. <view class="Work-List">
  14. <view class="label">
  15. 担当信息
  16. </view>
  17. <view class="text">
  18. {{ obj.responsibler }}
  19. </view>
  20. </view>
  21. <view class="Work-List">
  22. <view class="label">
  23. 机型信息
  24. </view>
  25. <view class="text">
  26. {{ obj.model }}
  27. </view>
  28. </view>
  29. <view class="Work-List">
  30. <view class="label">
  31. 数量
  32. </view>
  33. <view class="text">
  34. {{ obj.number }}
  35. </view>
  36. </view>
  37. <view class="Work-List">
  38. <view class="label">
  39. 工单状态
  40. </view>
  41. <view class="text">
  42. {{ obj.statusId_dictText }}
  43. </view>
  44. </view>
  45. <!-- <view class="Work-List"
  46. v-if="isShowCollect">
  47. <view class="modi a"
  48. v-if="obj.collectonFlag"
  49. @click.stop="addCollection">
  50. 取消收藏
  51. </view>
  52. <view class="modi"
  53. v-else
  54. @click.stop="addCollection">
  55. 收藏
  56. </view>
  57. </view> -->
  58. <view class="collect"
  59. v-if="isShowCollect"
  60. @click.stop="addCollection">
  61. <uv-icon
  62. size="60rpx"
  63. v-if="obj.collectonFlag"
  64. color="#169bd5"
  65. name="star-fill"></uv-icon>
  66. <uv-icon
  67. size="60rpx"
  68. v-else
  69. name="star"></uv-icon>
  70. </view>
  71. </view>
  72. </template>
  73. <script>
  74. export default {
  75. name: "WorkOrderitem",
  76. props : {
  77. obj : {},
  78. margin : {
  79. default : '30rpx 0'
  80. },
  81. isShowCollect : {
  82. default : false,
  83. }
  84. },
  85. data() {
  86. return {
  87. };
  88. },
  89. methods : {
  90. //收藏信息-添加收藏
  91. addCollection(){
  92. this.$api('addCollection', {
  93. templateId : this.obj.id
  94. }, res => {
  95. this.$emit('getData')
  96. if(res.code == 200){
  97. uni.showToast({
  98. title: res.message,
  99. icon: 'none'
  100. })
  101. this.obj.collectonFlag = !this.obj.collectonFlag
  102. }
  103. })
  104. },
  105. }
  106. }
  107. </script>
  108. <style scoped lang="scss">
  109. .Urgent-Work-List{
  110. box-shadow: 0 0 10rpx 10rpx #00000009;
  111. border-radius: 25rpx;
  112. padding: 15rpx;
  113. background-color: #fff;
  114. font-size: 28rpx;
  115. position: relative;
  116. .collect{
  117. position: absolute;
  118. right: 20rpx;
  119. top: 20rpx;
  120. z-index: 9;
  121. }
  122. .Work-List{
  123. display: flex;
  124. padding: 20rpx 0rpx;
  125. .label{
  126. width: 150rpx;
  127. flex-shrink: 0;
  128. }
  129. .modi{
  130. padding: 15rpx 30rpx;
  131. border-radius: 15rpx;
  132. background-color: $uni-color;
  133. color: #fff;
  134. font-size: 22rpx;
  135. margin-left: auto;
  136. }
  137. .a{
  138. background-color: #fff;
  139. border: 1rpx solid $uni-color;
  140. color: $uni-color;
  141. }
  142. }
  143. }
  144. </style>