commandDetails_20230605160319.vue 11 KB

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