xq-csg-weapp_uni-ts
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.

336 lines
8.0KB

  1. <template>
  2. <view>
  3. <custom-nav-bar position="fixed" color="black" left-text="诉求详情" left-arrow border />
  4. <view class="myAppeal">
  5. <!-- 内容部分 -->
  6. <view class="myAppeal-conent">
  7. <view class="godd-replay-head">
  8. <image src="/static/packages/enterprise/image/my-appeal.png" mode="aspectFill" />
  9. <text class="myAppeal-head-title">{{ List.enterpriseName }}</text>
  10. </view>
  11. <view class="myAppeal-flex">
  12. <block v-for="(type, index) in typeList" :key="index">
  13. <view v-if="List.appealType + '' === type.value" class="myAppeal-type"
  14. :style="'background-color: ' + type.cssClass + ';'">{{ type.label }}</view>
  15. </block>
  16. <view>
  17. <text class="myAppeal-conent-block">{{ getDateTime(List.createTime, 2) }}</text>
  18. <block v-for="(state, index) in statusList" :key="index">
  19. <text v-if="List.appealProcessStatus + '' === state.value"
  20. class="myAppeal-conent-bg myAppeal-conent-block" :style="'background-color: ' + state.cssClass + ';'">
  21. {{ state.label }}
  22. </text>
  23. </block>
  24. </view>
  25. </view>
  26. <view class="myAppeal-title mt-21 uniline">{{ List.appealTitle }}</view>
  27. <view class="myAppeal-subheading">
  28. <rich-text :nodes="List.appealContent" />
  29. </view>
  30. <view class="myAppeal-imgage" v-if="List.appealEnclosure">
  31. <image mode="aspectFill" data-name="appealEnclosure" @tap="viewImage" :data-item="item" :src="item"
  32. v-for="(item, index) in List.appealEnclosure" :key="index"></image>
  33. </view>
  34. <view class="myAppeal-conent-block mt-21" v-if="List.appealCurrentLocation !== null">
  35. {{ List.appealCurrentLocation }}
  36. </view>
  37. <!-- 判断是否有回复信息 -->
  38. <block v-if="List.perfectReplyFlag === 1">
  39. <view class="good-reply-title">
  40. <text>处理过程</text>
  41. </view>
  42. <view class="myAppeal-bg">
  43. <view>
  44. <view class="flex flex-v-center">
  45. <image src="/static/images/ic-success.png" mode="aspectFill"></image>
  46. <text>{{ List.nickName || '' }}</text>
  47. </view>
  48. </view>
  49. <view class="myAppeal-bg-conent">
  50. <rich-text :nodes="List.appealReply || ''" />
  51. <view class="myAppeal-conent-block mt-16">{{ getDateTime(List.replyTime, 2) }}</view>
  52. </view>
  53. </view>
  54. </block>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <!-- <script module="toods" lang="wxs" src="@/wxs/util.wxs"></script> -->
  60. <script>
  61. // TODO: 企业-我的诉求详情 + 民生-我的调解详情此页面复用
  62. import * as enterprise from '@/api/enterprise';
  63. import * as publicApi from '@/api/publicApi';
  64. import * as peopleApi from '@/api/peopleApi';
  65. import utils from '@/utils/util.map'
  66. export default {
  67. data() {
  68. return {
  69. option: {},
  70. type: {
  71. value: '',
  72. cssClass: '',
  73. label: ''
  74. },
  75. status: 'appeal_process_status',
  76. typeList: [],
  77. statusList: [],
  78. List: {},
  79. state: {
  80. value: '',
  81. cssClass: '',
  82. label: ''
  83. }
  84. };
  85. },
  86. async onLoad(option) {
  87. // TODO: key:是区分企业-我的诉求详情和民生-我的调解详情 key默认为 1:企业
  88. this.option = option
  89. await this.getAppealApi();
  90. await this.getTypeList();
  91. await this.getStateList();
  92. },
  93. methods: {
  94. getDateTime(time){
  95. return utils.getDateTime(time)
  96. },
  97. // 返回我的诉求
  98. onClickLeft() {
  99. uni.navigateTo({
  100. url: `/packages/enterprise/pages/my-appeal/my-appeal?name=${this.option.name}`
  101. });
  102. },
  103. // 获取类型字典
  104. async getTypeList() {
  105. const res = await publicApi.getDictDataApi({
  106. dictType: this.type
  107. });
  108. if (res.data) {
  109. this.typeList = res.data.list
  110. }
  111. },
  112. // 获取状态字典
  113. async getStateList() {
  114. const res = await publicApi.getDictDataApi({
  115. dictType: this.status
  116. });
  117. if (res.data) {
  118. this.statusList = res.data.list
  119. }
  120. },
  121. // 查看图片
  122. viewImage(event) {
  123. const url = event.currentTarget.dataset.item;
  124. const name = event.currentTarget.dataset.name;
  125. uni.previewImage({
  126. current: url,
  127. // 当前显示图片的http链接
  128. urls: this.List[name] // 需要预览的图片http链接列表
  129. });
  130. },
  131. // 获得诉求
  132. async getAppealApi() {
  133. let res = await enterprise.getAppealIdApi({
  134. id: this.option.id
  135. });
  136. if (res.data) {
  137. this.List = res.data
  138. }
  139. }
  140. }
  141. };
  142. </script>
  143. <style lang="less">
  144. page {
  145. background-color: #fff;
  146. }
  147. .mt-16 {
  148. margin-top: 16rpx;
  149. }
  150. .mt-20 {
  151. margin-top: 40rpx;
  152. }
  153. .mt-21 {
  154. margin-top: 21rpx;
  155. }
  156. .myAppeal {
  157. padding: 37rpx 32rpx 40rpx 40rpx;
  158. }
  159. .myAppeal>.myAppeal-title {
  160. position: relative;
  161. width: 175rpx;
  162. height: 10rpx;
  163. background: #ffe5e9;
  164. border-radius: 2rpx;
  165. line-height: 0;
  166. margin-top: 10px;
  167. text {
  168. position: absolute;
  169. top: -5px;
  170. text-align: center;
  171. width: 100%;
  172. font-size: 36rpx;
  173. font-weight: 500;
  174. color: #000000;
  175. }
  176. }
  177. .myAppeal-conent {
  178. height: 100%;
  179. &:not(:first-child) {
  180. margin-top: 37rpx;
  181. }
  182. .godd-replay-head {
  183. display: flex;
  184. .myAppeal-head-title {
  185. font-size: 32rpx;
  186. font-weight: 500;
  187. color: #fe3b53;
  188. }
  189. image {
  190. width: 44rpx;
  191. height: 44rpx;
  192. border-radius: 50%;
  193. margin-right: 24rpx;
  194. }
  195. }
  196. .myAppeal-flex {
  197. margin-top: 32rpx;
  198. display: flex;
  199. align-items: center;
  200. justify-content: space-between;
  201. .myAppeal-type {
  202. width: 88rpx;
  203. height: 38rpx;
  204. line-height: 38rpx;
  205. text-align: center;
  206. color: #fff;
  207. box-shadow: 2px 2px 2px 0px rgba(12, 181, 207, 0.1);
  208. border-radius: 8rpx;
  209. }
  210. .myAppeal-conent-title {
  211. font-size: 32rpx;
  212. font-weight: 400;
  213. color: #fe3b53;
  214. }
  215. .myAppeal-conent-bg {
  216. padding: 5rpx 20rpx;
  217. height: 38rpx;
  218. text-align: center;
  219. color: #fff;
  220. line-height: 38rpx;
  221. box-shadow: 2px 2px 2px 0px rgba(254, 61, 85, 0.1);
  222. border-radius: 500rpx;
  223. margin-left: 39rpx;
  224. }
  225. }
  226. }
  227. .myAppeal-conent-block {
  228. font-size: 24rpx;
  229. font-weight: 400;
  230. color: #999999;
  231. }
  232. .myAppeal-title {
  233. font-size: 32rpx;
  234. font-weight: 500;
  235. color: #000000;
  236. }
  237. .myAppeal-subheading {
  238. font-size: 28rpx;
  239. font-weight: 400;
  240. color: #333333;
  241. margin-top: 24rpx;
  242. }
  243. .myAppeal-imgage {
  244. margin-top: 24rpx;
  245. display: grid;
  246. grid-template-columns: 1fr 1fr 1fr;
  247. image {
  248. width: 222rpx;
  249. height: 222rpx;
  250. border-radius: 10rpx;
  251. margin-right: 10rpx;
  252. }
  253. }
  254. .good-reply-title {
  255. position: relative;
  256. width: 175rpx;
  257. height: 10rpx;
  258. background: #ffced6;
  259. border-radius: 2rpx;
  260. line-height: 0;
  261. margin-top: 60rpx;
  262. text {
  263. position: absolute;
  264. top: -5px;
  265. text-align: center;
  266. width: 100%;
  267. font-size: 36rpx;
  268. font-weight: 500;
  269. color: #000000;
  270. }
  271. }
  272. .myAppeal-bg {
  273. width: 678rpx;
  274. height: 232rpx;
  275. border-radius: 8px;
  276. margin-top: 50rpx;
  277. image {
  278. width: 32rpx;
  279. height: 32rpx;
  280. margin-right: 8rpx;
  281. }
  282. text {
  283. font-size: 28rpx;
  284. font-weight: 400;
  285. color: #fe3b53;
  286. }
  287. .myAppeal-bg-conent {
  288. margin-top: 16rpx;
  289. margin-left: 30rpx;
  290. padding: 20rpx 24rpx 20rpx 28rpx;
  291. font-size: 28rpx;
  292. font-weight: 400;
  293. color: #333333;
  294. border-radius: 8rpx;
  295. background: #f7f7f7;
  296. }
  297. }
  298. </style>