detail.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <template>
  2. <view class="oa-notice-detail">
  3. <view class="input-title">
  4. <text>明天请假一天,到北京办点事明天请假一天,到北京办点事,明天请假一天,到北京办点事,明天请假一天,到北京办点事明天请假一天,到北京办点事,明天请假一天,到北京办点事,明天请假一天,到北京办点事明天请假一天,到北京办点事,明天请假一天,到北京办点事</text>
  5. </view>
  6. <view class="covers-body covers-uploader oa-uploader" v-if="imageList.length !== 0 ">
  7. <view class="uni-uploader">
  8. <view class="uni-uploader-head">
  9. <view class="uni-uploader-title">点击预览图片</view>
  10. <view class="uni-uploader-info">{{ imageList.length }}/6</view>
  11. </view>
  12. <view class="uni-uploader-body">
  13. <view class="uni-uploader__files">
  14. <block v-for="(image, index) in imageList" :key="index">
  15. <view class="uni-uploader__file" style="position: relative;">
  16. <oa-image class="uni-uploader__img" :src="image"></oa-image>
  17. </view>
  18. </block>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="uni-timeline">
  24. <view class="uni-timeline-item" :class="[
  25. index === 0 ? `text-${themeColor.name} uni-timeline-first-item` : '',
  26. index === approveDetail.length - 1 ? 'uni-timeline-last-item' : ''
  27. ]"
  28. v-for="(item, index) in approveDetail" :key="index">
  29. <view class="uni-timeline-item-divider"></view>
  30. <view class="uni-timeline-item-content">
  31. <view>
  32. {{ item.approve }}
  33. </view>
  34. <view class="datetime">
  35. {{item.name}} {{ item.suggest }} {{ item.time }}
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="feedback-title">
  41. <text>问题和意见</text>
  42. <text class="feedback-quick" @tap="chooseMsg">快速键入 <text class="iconfont iconxia"></text></text>
  43. </view>
  44. <view class="feedback-body">
  45. <textarea placeholder="请详细描述您的意见..." v-model="sendDate.suggest" class="feedback-textare" />
  46. </view>
  47. <view class="footer">
  48. <view v-for="(item, index) in radioList" :key="index">
  49. <button class="action-btn" :class="'text-' + themeColor.name" @tap="handleWorksOperation(item.key)">
  50. {{item.value}}
  51. </button>
  52. </view>
  53. </view>
  54. <!--加载动画-->
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. msgContents: [
  62. '同意',
  63. '不同意',
  64. '其他原因'
  65. ],
  66. sendDate: {
  67. type: '1',
  68. suggest: '',
  69. contact_way: ''
  70. },
  71. workState: [{"key":"apply","value":"申请"},{"key":"audit","value":"审核"},{"key":"approve","value":"审批"},{"key":"result","value":"终审"},{"key":"refused","value":"拒绝"}],
  72. worksDetail: {"id":4,"merchant_id":2,"member_id":69,"cate_id":1,"content":"日常报修,2222","log":[{"id":68,"time":1602174818,"action":"repair/approve","suggest":"好好好的","name":"系统管理员","approve":"审批"},{"id":69,"time":1602174760,"action":"repair/audit","suggest":"好的","name":"古月","approve":"审核"},{"id":69,"time":1602174747,"action":"repair/apply","suggest":"提交申请","name":"古月","approve":"申请"}],"remind":0,"sort":0,"state":"approve","status":"repair/approve","created_at":1602174747,"updated_at":1602174818},
  73. approveDetail:[{"id":68,"time":'2020-12-12:12:12:12',"action":"repair/approve","suggest":"好好好的","name":"系统管理员","approve":"审批"},{"id":69,"time":'2020-12-12:12:12:12',"action":"repair/audit","suggest":"好的","name":"古月","approve":"审核"},{"id":69,"time":'2020-12-12:12:12:12',"action":"repair/apply","suggest":"提交申请","name":"古月","approve":"申请"}],
  74. approveId:'',
  75. radioList:[{"key":"repair/audit","value":"审核"},{"key":"repair/refused","value":"拒绝"}],
  76. imageList:['http://wephp-oa.oss-cn-shenzhen.aliyuncs.com/images/2020/09/10/image_1599669475_VQXiR1bX.jpg','http://wephp-oa.oss-cn-shenzhen.aliyuncs.com/images/2020/09/10/image_1599669475_VQXiR1bX.jpg','http://wephp-oa.oss-cn-shenzhen.aliyuncs.com/images/2020/09/10/image_1599669475_VQXiR1bX.jpg'],
  77. id: undefined,
  78. };
  79. },
  80. onShow() {
  81. this.initData();
  82. },
  83. methods: {
  84. initData() {
  85. uni.setNavigationBarColor({
  86. frontColor: '#ffffff',
  87. backgroundColor: this.themeColor.color,
  88. animation: {
  89. duration: 400,
  90. timingFunc: 'easeIn'
  91. }
  92. })
  93. },
  94. // 快速输入
  95. chooseMsg() {
  96. uni.showActionSheet({
  97. itemList: this.msgContents,
  98. success: res => {
  99. this.sendDate.suggest = this.msgContents[res.tapIndex];
  100. }
  101. });
  102. },
  103. async handleWorksOperation(status) {
  104. this.$mHelper.toast('操作成功');
  105. },
  106. }
  107. };
  108. </script>
  109. <style lang="scss">
  110. .oa-notice-detail {
  111. .uni-timeline {
  112. padding: $spacing-lg;
  113. background-color: $color-white;
  114. }
  115. .feedback-title {
  116. display: flex;
  117. flex-direction: row;
  118. justify-content: space-between;
  119. align-items: center;
  120. padding: $spacing-base;
  121. margin-top: $spacing-base;
  122. font-size: $font-base;
  123. }
  124. .feedback-star-view.feedback-title {
  125. justify-content: flex-start;
  126. margin: 0;
  127. }
  128. .feedback-quick {
  129. position: relative;
  130. padding-right: 40upx;
  131. .iconfont {
  132. font-size: $font-sm;
  133. }
  134. }
  135. .feedback-body {
  136. background: $color-white;
  137. padding: $spacing-sm $spacing-base;
  138. .gender-item {
  139. margin-right: 20upx;
  140. .gender-item-text {
  141. padding-left: 10upx;
  142. }
  143. radio .wx-radio-input.wx-radio-input-checked {
  144. background: $uni-color-primary;
  145. border-color: $uni-color-primary;
  146. }
  147. }
  148. }
  149. .feedback-textare {
  150. height: 200upx;
  151. font-size: 34upx;
  152. line-height: 50upx;
  153. width: 100%;
  154. box-sizing: border-box;
  155. padding: 20upx 30upx 0;
  156. }
  157. .footer {
  158. position: fixed;
  159. left: 0;
  160. bottom: 0;
  161. z-index: 98;
  162. width: 100%;
  163. background-color: $color-white;
  164. color: $font-color-base;
  165. box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
  166. display: flex;
  167. justify-content: flex-end;
  168. align-items: center;
  169. padding: 15upx $spacing-base;
  170. .action-btn {
  171. font-size: $font-sm;
  172. margin: 0 0 0 15upx;
  173. padding: 0 $spacing-lg;
  174. text-align: center;
  175. height: 60upx;
  176. line-height: 60upx;
  177. }
  178. }
  179. .banner {
  180. overflow: hidden;
  181. position: relative;
  182. background-color: #ccc;
  183. .banner-img {
  184. height: 300upx;
  185. width: 100%;
  186. }
  187. .banner-title {
  188. max-height: 84upx;
  189. overflow: hidden;
  190. position: absolute;
  191. bottom: 0;
  192. width: 100%;
  193. font-size: 32upx;
  194. font-weight: 400;
  195. line-height: 42upx;
  196. color: white;
  197. z-index: 11;
  198. background-color: rgba(0, 0, 0, 0.25);
  199. padding: 4upx 20upx;
  200. }
  201. }
  202. .banner-title {
  203. padding: $spacing-lg $spacing-lg 0;
  204. font-size: $font-lg;
  205. }
  206. .article-meta {
  207. padding: 20upx 40upx;
  208. display: flex;
  209. flex-direction: row;
  210. justify-content: flex-start;
  211. color: gray;
  212. .article-text {
  213. font-size: 26upx;
  214. line-height: 50upx;
  215. margin: 0 20upx;
  216. }
  217. .article-author,
  218. .article-time {
  219. font-size: 30upx;
  220. }
  221. }
  222. .article-content {
  223. padding: 0 30upx;
  224. overflow: hidden;
  225. font-size: 30upx;
  226. margin-bottom: 30upx;
  227. }
  228. .input-title {
  229. display: flex;
  230. flex-direction: row;
  231. justify-content: space-between;
  232. align-items: center;
  233. padding: $spacing-base;
  234. margin-top: $spacing-base;
  235. font-size: $font-base;
  236. }
  237. .input-body {
  238. background: $color-white;
  239. padding: $spacing-sm $spacing-base;
  240. }
  241. .covers-title {
  242. display: flex;
  243. flex-direction: row;
  244. justify-content: space-between;
  245. align-items: center;
  246. padding: $spacing-base;
  247. margin-top: $spacing-base;
  248. font-size: $font-base;
  249. }
  250. .covers-body {
  251. background: $color-white;
  252. padding: $spacing-sm $spacing-base;
  253. .gender-item {
  254. margin-right: 20upx;
  255. .gender-item-text {
  256. padding-left: 10upx;
  257. }
  258. radio .wx-radio-input.wx-radio-input-checked {
  259. background: $uni-color-primary;
  260. border-color: $uni-color-primary;
  261. }
  262. }
  263. }
  264. .covers-uploader {
  265. padding: 22upx 20upx;
  266. }
  267. }
  268. </style>