commandDetails.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <template>
  2. <view class="container">
  3. <view class="mim-view mim-flex-vertical">
  4. <view class="mim-font-16 bold">
  5. {{ detail.category_1 ? detail.category_1.name : ''}}
  6. {{ detail.category_2 ? '/' + detail.category_2.name : ''}}
  7. {{ detail.category_3 ? '/' + detail.category_3.name : '' }}
  8. {{ detail.category_4 ? '/' + detail.category_4.name : '' }}
  9. {{ detail.category_5 ? '/' + detail.category_5.name : '' }}
  10. </view>
  11. <view class="storm mim-font-14">
  12. {{detail.body || '--'}}
  13. </view>
  14. <u-divider border-color='#f2f2f2' bg-color='#f2f2f2' margin-top='24' margin-bottom='24' use-slot>
  15. </u-divider>
  16. <view class="mim-flex-wrap-space-between">
  17. <text class="mim-font-14">反映人</text>
  18. <text class="mim-font-14">{{detail.name || '--'}}</text>
  19. </view>
  20. <view class="mim-flex-wrap-space-between storm">
  21. <text class="mim-font-14">反映人手机号</text>
  22. <text class="mim-font-14">{{ detail.mobile || '--' }}</text>
  23. </view>
  24. <view class="mim-flex-wrap-space-between storm">
  25. <text class="mim-font-14">反映时间</text>
  26. <text class="mim-font-14">{{detail.complain_date || '--'}}</text>
  27. </view>
  28. </view>
  29. <view class="mim-view mim-flex-vertical">
  30. <view class="mim-flex-wrap-space-between xiezhu-title">
  31. <view class="mim-font-14">任务类型</view>
  32. <view class="mim-font-14">
  33. <u-tag v-if="detail.is_more_department==1" text="指派任务" type="warning" />
  34. <u-tag v-else text="主任务" type="success" />
  35. </view>
  36. </view>
  37. <view class="" v-if="detail.is_more_department==1">
  38. <view class="" v-if="detail.extra.multiData">
  39. <view v-for="(item,index) in detail.extra.multiData" :key="index" class="xiezhu-item">
  40. <view class="mim-flex-wrap-space-between storm">
  41. <view class="mim-font-14">协助部门</view>
  42. <view class="mim-font-14">
  43. {{item.deal_department_name || '--'}}
  44. </view>
  45. </view>
  46. <view class="mim-flex-wrap-space-between storm">
  47. <view class="mim-font-14">处理期限</view>
  48. <view class="mim-font-14">
  49. {{item.limit_day || '--'}}天
  50. </view>
  51. </view>
  52. <view class="mim-flex-wrap-space-between storm">
  53. <view class="mim-font-14">协助内容</view>
  54. </view>
  55. <view class="xiezhu-content">
  56. {{item.body || '--'}}
  57. </view>
  58. <view class="mim-flex-wrap-space-between storm">
  59. <view class="mim-font-14">处理意见</view>
  60. </view>
  61. <view class="xiezhu-content">
  62. {{item.claim || '--'}}
  63. </view>
  64. </view>
  65. </view>
  66. <view class="" v-else>
  67. <view class="mim-flex-wrap-space-between storm">
  68. <view class="mim-font-14">协助部门</view>
  69. <view class="mim-font-14">
  70. {{ detail.extra.deal_department_name || '--'}}
  71. </view>
  72. </view>
  73. <view class="mim-flex-wrap-space-between storm">
  74. <view class="mim-font-14">处理期限</view>
  75. <view class="mim-font-14">
  76. {{ detail.extra.limit_day || '--'}}天
  77. </view>
  78. </view>
  79. <view class="mim-flex-wrap-space-between storm">
  80. <view class="mim-font-14">协助内容</view>
  81. </view>
  82. <view class="xiezhu-content">
  83. {{ detail.extra.body || '--'}}
  84. </view>
  85. <view class="mim-flex-wrap-space-between storm">
  86. <view class="mim-font-14">处理意见</view>
  87. </view>
  88. <view class="xiezhu-content">
  89. {{ detail.extra.claim || '--'}}
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="mim-view mim-flex-vertical">
  95. <view class="mim-font-16 bold">指派信息</view>
  96. <view class="mim-flex-wrap-space-between storm">
  97. <text class="mim-font-14">处理时间</text>
  98. <text class="mim-font-14">{{detail.assign_deal_time || '--'}}</text>
  99. </view>
  100. <view class="mim-flex-wrap-space-between storm">
  101. <text class="mim-font-14">处理部门</text>
  102. <text class="mim-font-14">{{detail.deal_department.name || '--'}}</text>
  103. </view>
  104. <view class="mim-flex-wrap-space-between storm">
  105. <text class="mim-font-14">指派人员</text>
  106. <text class="mim-font-14">{{detail.assign_admin.name}}</text>
  107. </view>
  108. </view>
  109. <view class="mim-view mim-flex-vertical">
  110. <view class="mim-font-16 bold">处理信息</view>
  111. <view class="img_type">
  112. <u-image v-if="type == '1'" src="@/static/images/index/dcl.png" width="240rpx" height="240rpx">
  113. </u-image>
  114. <u-image v-else-if="type == '2'" src="@/static/images/index/clz.png" width="240rpx" height="240rpx">
  115. </u-image>
  116. <u-image v-else-if="type =='3'" src="@/static/images/index/clwj.png" width="240rpx" height="240rpx">
  117. </u-image>
  118. </view>
  119. <view class="mim-flex-wrap-space-between storm">
  120. <text class="mim-font-14">处理状态</text>
  121. <text v-if="type == '1'" class="mim-font-14">待处理</text>
  122. <text v-if="type == '2'" class="mim-font-14">处理中</text>
  123. <text v-if="type == '3'" class="mim-font-14">处理完结</text>
  124. </view>
  125. <view v-if="type == '3'">
  126. <view class="mim-flex-wrap-space-between storm">
  127. <text class="mim-font-14">处理时间</text>
  128. <text class="mim-font-14">{{ detail.deal_time || '--' }}</text>
  129. </view>
  130. <view class="mim-flex-wrap-space-between storm">
  131. <text class="mim-font-14">处理期限</text>
  132. <text class="mim-font-14">{{ detail.deal_limit_day }}天</text>
  133. </view>
  134. <view class="mim-flex-vertical storm">
  135. <text class="mim-font-14">处理结果</text>
  136. </view>
  137. <view class="xiezhu-content">
  138. {{detail.deal_idea || '--'}}
  139. </view>
  140. <u-divider v-if="relevant_document_urls.length" border-color='#f2f2f2' bg-color='#f2f2f2'
  141. margin-top='24' margin-bottom='24' use-slot></u-divider>
  142. <view class="mim-flex-vertical storm" v-if="relevant_document_urls.length">
  143. <text class="mim-font-14 bold">附件详情</text>
  144. <view class="storm pre-box">
  145. <view class="pre-item" v-for="(item, index) in relevant_document_urls">
  146. <u-image :src="item.url" :key="index" mode="aspectFit" @click="previewImage(index)"
  147. height="160" width="160"></u-image>
  148. </view>
  149. </view>
  150. </view>
  151. <u-divider border-color='#f2f2f2' bg-color='#f2f2f2' margin-top='24' margin-bottom='24' use-slot>
  152. </u-divider>
  153. <view class="mim-flex-wrap-space-between">
  154. <text class="mim-font-14 bold">群众满意度</text>
  155. <text class="mim-font-14">{{detail.deal_evaluation}} 分</text>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="mim-view-list"></view>
  160. <view v-if="type != 3 " class="mim-view-last"></view>
  161. <view v-if="type != 3 " class="mim-foot">
  162. <view v-if="type == 1 && detail.is_more_department == 1 && detail.check_status == 1 && admin"
  163. class="mim-button mim-foot-button bold" @click="goPage('audit')">去审核
  164. </view>
  165. <view v-else style="width: 100%;" class="mim-flex-wrap-space-between">
  166. <view v-if="type == 1 && detail.is_more_department == 0" class="mim-button mim-foot-button-first bold"
  167. @click="goPage('application')">
  168. 申请协助
  169. </view>
  170. <view v-if="type == 1 && detail.is_more_department == 1 && detail.check_status == 1"
  171. class="mim-button mim-foot-button-first bold">
  172. 申请协助审核中…
  173. </view>
  174. <!-- <view v-else class="mim-button mim-foot-button-first bold">申请协助审核中…</view> -->
  175. <view v-if="detail.check_status !== 1" class="mim-button mim-foot-button bold"
  176. @click="goPage('finish')">去完结</view>
  177. </view>
  178. </view>
  179. </view>
  180. </template>
  181. <script>
  182. export default {
  183. data() {
  184. return {
  185. form: {
  186. id: ''
  187. },
  188. type: '', //1 待处理 2 处理中 3 处理完结,
  189. detail: {},
  190. relevant_document_urls: [],
  191. buttonPermission: false,
  192. admin: false, //当前用户是否为管理员
  193. department: '', //当前用户部门
  194. };
  195. },
  196. onLoad(e) {
  197. this.form.id = e.id
  198. console.log(this.userDepartment, 'userRoles', this.userRoles)
  199. let roles = this.userRoles
  200. let arr = roles.filter(item => {
  201. return item.name == "admin"
  202. })
  203. if (arr.length > 0) {
  204. this.admin = true
  205. } else {
  206. this.admin = false
  207. }
  208. this.department = this.userDepartment
  209. },
  210. onShow() {
  211. this.commandDetailsFn()
  212. },
  213. methods: {
  214. //显示图片
  215. previewImage(index) {
  216. const urls = this.relevant_document_urls.map(item => item.url);
  217. const current = urls[index]; // 当前显示的图片地址
  218. uni.previewImage({
  219. current: current, // 当前显示的图片地址
  220. urls: urls, // 图片地址数组
  221. });
  222. },
  223. goPage(e) {
  224. switch (e) {
  225. case 'application': //申请协助页面
  226. this.$u.route('/pages/command/application', {
  227. id: this.form.id,
  228. type: '1'
  229. });
  230. break;
  231. case 'finish': //去完结页面
  232. this.$u.route('/pages/command/finish', {
  233. id: this.form.id
  234. });
  235. break;
  236. case 'audit': //(审核)申请协助页面
  237. this.$u.route('/pages/command/application', {
  238. id: this.form.id,
  239. type: '2'
  240. });
  241. break;
  242. default:
  243. console.log('Unknown fruit');
  244. break;
  245. }
  246. },
  247. //详情
  248. async commandDetailsFn() {
  249. const res = await this.$u.api.commandDetails(this.form)
  250. if (res.status === "success") {
  251. this.type = res.data.deal_status
  252. // if (this.type == '2') {
  253. // this.application_status = '申请协助审核中…'
  254. // }
  255. this.detail = res.data
  256. this.relevant_document_urls = res.data.deal_file
  257. }
  258. },
  259. }
  260. }
  261. </script>
  262. <style lang="scss">
  263. page {
  264. background-color: #f7f7f7;
  265. .container {
  266. .mim-view {
  267. overflow: hidden;
  268. .storm {
  269. margin-top: 24rpx;
  270. }
  271. .img_type {
  272. position: absolute;
  273. top: -70rpx;
  274. right: -50rpx;
  275. border-bottom: none;
  276. }
  277. }
  278. .xiezhu-item {
  279. border-top: dashed 1px #dcdbde;
  280. margin-top: 30rpx;
  281. }
  282. .xiezhu-content {
  283. padding: 20rpx;
  284. background-color: #f7f7f7;
  285. border-radius: 10rpx;
  286. margin-top: 10rpx;
  287. }
  288. .pre-box {
  289. display: flex;
  290. align-items: center;
  291. // justify-content: space-between;
  292. flex-wrap: wrap;
  293. }
  294. .pre-item {
  295. width: 160rpx;
  296. height: 160rpx;
  297. overflow: hidden;
  298. position: relative;
  299. margin-left: 20rpx;
  300. margin-bottom: 20rpx;
  301. }
  302. .mim-view-last {
  303. padding: 56rpx;
  304. background: transparent;
  305. }
  306. .mim-foot {
  307. width: 100%;
  308. height: 136rpx;
  309. position: fixed;
  310. bottom: 0;
  311. left: 0;
  312. background-color: #ffffff;
  313. padding: 20rpx 24rpx;
  314. box-sizing: border-box;
  315. &-button {
  316. width: 100%;
  317. border-radius: 48rpx;
  318. opacity: 1;
  319. background: #DE2E27;
  320. font-size: 32rpx;
  321. font-weight: normal;
  322. line-height: 32rpx;
  323. letter-spacing: 0px;
  324. color: #FFFFFF;
  325. height: 96rpx;
  326. cursor: pointer;
  327. &-first {
  328. width: 100%;
  329. border-radius: 48rpx;
  330. opacity: 1;
  331. background: rgba(222, 46, 39, 0.2);
  332. font-size: 32rpx;
  333. font-weight: normal;
  334. line-height: 32rpx;
  335. letter-spacing: 0px;
  336. color: #DE2E27;
  337. height: 96rpx;
  338. cursor: pointer;
  339. border: 2rpx solid #DE2E27;
  340. margin-right: 30rpx;
  341. }
  342. }
  343. }
  344. }
  345. }
  346. </style>