dispatch.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <template>
  2. <div class="addRepair">
  3. <div class="reportBody">
  4. <ul class="detailUl">
  5. <li class="detailLi">
  6. <span class="liName">当前企业</span>
  7. <span class="liInfo">无锡XXXXX有限公司</span>
  8. </li>
  9. <li class="detailLi">
  10. <span class="liName">
  11. <span style="color: red;margin-right: 10rpx;">*</span>
  12. 您是想
  13. </span>
  14. <span class="liInfo">
  15. <label class="radio" @click.stop="isCheck=true" >
  16. <radio value="报事" :checked="isCheck" color="#0365F9"/>报事
  17. </label>
  18. <label class="radio" @click.stop="isCheck=false" >
  19. <radio value="咨询" :checked="!isCheck" color="#0365F9"/>咨询
  20. </label>
  21. </span>
  22. </li>
  23. <li class="detailLi2">
  24. <span class="liName">
  25. 快捷选择
  26. </span>
  27. <div class="detailLi2Box">
  28. <div class="detailLi2BoxTop">
  29. <div class="checkItem" :class="item.isCheck?'checked':''" v-for="item in checkList" @click="clickCheck(item)">{{item.name}}</div>
  30. </div>
  31. <van-field
  32. :value="form.contant"
  33. autosize
  34. type="textarea"
  35. placeholder="请输入文字进行报事报修描述"
  36. class="myField"
  37. maxlength="800"
  38. show-word-limit
  39. />
  40. </div>
  41. </li>
  42. <li class="detailLi">
  43. <span class="liName">
  44. <span style="color: red;margin-right: 10rpx;">*</span>
  45. 位置
  46. </span>
  47. <span class="liInfo">
  48. <label class="radio" @click.stop="isCheck2=true" >
  49. <radio value="报事" :checked="isCheck2" color="#0365F9"/>室内
  50. </label>
  51. <label class="radio" @click.stop="isCheck2=false" >
  52. <radio value="咨询" :checked="!isCheck2" color="#0365F9"/>公区
  53. </label>
  54. </span>
  55. </li>
  56. <li class="detailLi2">
  57. <span class="liName">
  58. 补充说明
  59. <span style="color: #B3B3B3;font-size: 28rpx">(支持图片/视频上传限20M内,最多6张)</span>
  60. </span>
  61. <div class="detailLi2Box" style="margin: 24rpx 0 0 0">
  62. <van-uploader
  63. :max-count="6"
  64. @delete="deleteRYXXZP"
  65. :file-list="fileList"
  66. @after-read="uploadRYXXZP"
  67. :show-upload="true"
  68. />
  69. </div>
  70. </li>
  71. <li class="detailLi">
  72. <span class="liName">
  73. 报事人
  74. </span>
  75. <span class="liInfo">
  76. 章敏-18915281562 <img src="../parkActivity/image/phoneIcon.png" class="phoneIcon">
  77. </span>
  78. </li>
  79. <li class="detailLi" style="border-bottom: none">
  80. <span class="liName">
  81. 报事时间
  82. </span>
  83. <span class="liInfo">
  84. 2024-05-16 15:30
  85. </span>
  86. </li>
  87. </ul>
  88. </div>
  89. <div class="handleBox">
  90. <div class="handleTitle">处理情况</div>
  91. <div class="imageBox">
  92. <div class="imageItem">
  93. <img src="./image/upImage.svg" class="handleImg">
  94. <span>上报</span>
  95. </div>
  96. <img src="./image/arrow.png" class="handleArrow">
  97. <div class="imageItem">
  98. <img src="./image/acceptance.svg" class="handleImg">
  99. <span>受理</span>
  100. </div>
  101. <img src="./image/arrow.png" class="handleArrow">
  102. <div class="imageItem">
  103. <img :src="optionsType==='待受理'?require('./image/unHandle.svg'):require('./image/handle.svg')" class="handleImg">
  104. <span>处理</span>
  105. </div>
  106. <img src="./image/arrow.png" class="handleArrow">
  107. <div class="imageItem">
  108. <img src="./image/evaluate.svg" class="handleImg">
  109. <span>评价</span>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="reportBody">
  114. <ul class="detailUl">
  115. <li class="detailLi">
  116. <span class="liInfo">
  117. <label>
  118. <radio value="报事" :checked="true" color="#0365F9" />派单
  119. </label>
  120. <label style="margin-left: 64rpx">
  121. <radio value="咨询" :checked="false" color="#0365F9" disabled/>处理
  122. </label>
  123. </span>
  124. </li>
  125. <li class="detailLi">
  126. <span class="liName">
  127. 派单给
  128. </span>
  129. <span class="liInfo">
  130. 李开心
  131. </span>
  132. </li>
  133. <li class="detailLi2">
  134. <span class="liName" style="margin-bottom: 16rpx">
  135. 备注
  136. </span>
  137. <van-field
  138. :value="form.contant"
  139. autosize
  140. type="textarea"
  141. placeholder="请输入文字进行报事报修描述"
  142. class="myField2"
  143. maxlength="800"
  144. show-word-limit
  145. />
  146. </li>
  147. </ul>
  148. </div>
  149. <div class="buttonBox">
  150. <button class="zcBtn" @tap="closePage" :class="optionsType==='已处理'?'btn2':'btn '">关闭</button>
  151. <button class="btn tjBtn" v-if="optionsType==='待受理'">提交派单</button>
  152. <button class="btn tjBtn" v-if="optionsType==='待处理'">处理完成</button>
  153. </div>
  154. </div>
  155. </template>
  156. <script>
  157. export default {
  158. data(){
  159. return{
  160. isCheck:false,
  161. isCheck2:false,
  162. form:{
  163. contant:''
  164. },
  165. checkList:[
  166. {name:'挂件安装',isCheck:true},
  167. {name:'我要投诉',isCheck:false},
  168. {name:'疏通管道',isCheck:false},
  169. {name:'维修线路',isCheck:false},
  170. {name:'更换灯泡',isCheck:false},
  171. {name:'网络维修',isCheck:false},
  172. {name:'保洁服务',isCheck:false},
  173. {name:'其他维修',isCheck:false},
  174. ],
  175. fileList:[],
  176. optionsType:''
  177. }
  178. },
  179. onLoad(options) {
  180. console.log(options);
  181. this.optionsType = options.type
  182. if (options.type==='待处理'){
  183. uni.setNavigationBarTitle({
  184. title: '报修处理',
  185. });
  186. }else if(options.type==='已处理'){
  187. uni.setNavigationBarTitle({
  188. title: '报修详情',
  189. });
  190. }else {
  191. uni.setNavigationBarTitle({
  192. title: '报修派单',
  193. });
  194. }
  195. },
  196. methods:{
  197. // toRecord() {
  198. // uni.navigateTo({
  199. // url:'/pages/subPackages/reportRepair/repairRecord'
  200. // })
  201. // },
  202. closePage() {
  203. uni.navigateTo({
  204. url:'/pages/subPackages/todo/repairAcceptance'
  205. })
  206. },
  207. clickCheck(item){
  208. item.isCheck = !item.isCheck
  209. },
  210. deleteRYXXZP(event) {
  211. this.fileList.splice(event.detail.index, 1);
  212. this.$forceUpdate();
  213. },
  214. uploadRYXXZP(event) {
  215. console.log(event)
  216. let that = this;
  217. const { file } = event.detail;
  218. uni.uploadFile({
  219. url: that.$constant.BASE_URI + "/wx/fileController/upload",
  220. filePath: file.url,
  221. name: "file",
  222. formData: { user: "test" },
  223. success(res) {
  224. // 上传完成需要更新 fileList
  225. let data = JSON.parse(res.data);
  226. that.fileList.push({
  227. imgUrl: "/FileController/download/" + data.data[0],
  228. id: data.data[0],
  229. url:
  230. that.$constant.BASE_URI +
  231. "/FileController/download/" +
  232. data.data[0],
  233. isImage: true,
  234. });
  235. },
  236. fail(res) {},
  237. });
  238. },
  239. }
  240. }
  241. </script>
  242. <style lang="scss">
  243. .addRepair{
  244. .reportBody{
  245. margin-top: 24rpx;
  246. padding: 38rpx 36rpx;
  247. background: white;
  248. //height: 1416rpx;
  249. box-sizing: border-box;
  250. .record {
  251. display: flex;
  252. align-items: center;
  253. justify-content: flex-end;
  254. color: #0365F9;
  255. font-size: 32rpx;
  256. .recordImg{
  257. width: 36rpx;
  258. height: 36rpx;
  259. padding: 5rpx 0 0 10rpx;
  260. }
  261. }
  262. .detailUl{
  263. margin-top: 20rpx;
  264. .liName{
  265. font-size: 32rpx;
  266. color: rgba(51, 51, 51, 1);
  267. white-space: nowrap;
  268. }
  269. .detailLi{
  270. display: flex;
  271. justify-content: space-between;
  272. align-items: center;
  273. padding: 32rpx 0;
  274. border-bottom: 2rpx solid #E6E6E6;
  275. .liInfo{
  276. display: inline-block;
  277. text-align: right;
  278. max-width: 428rpx;
  279. color: rgba(102, 102, 102, 1);
  280. font-size: 32rpx;
  281. line-height: 38rpx;
  282. display: flex;
  283. align-items: center;
  284. .radio{
  285. margin-left: 64rpx;
  286. }
  287. .phoneIcon{
  288. width: 64rpx;
  289. height: 64rpx;
  290. margin-left: 24rpx;
  291. }
  292. }
  293. }
  294. .detailLi2{
  295. display: flex;
  296. flex-direction: column;
  297. padding: 32rpx 0;
  298. border-bottom: 2rpx solid #E6E6E6;
  299. .detailLi2BoxTop{
  300. display: flex;
  301. flex-wrap: wrap;
  302. justify-content: space-between;
  303. margin: 12rpx 0;
  304. .checkItem{
  305. width: 160rpx;
  306. height: 64rpx;
  307. font-size: 28rpx;
  308. color: #666666;
  309. display: flex;
  310. align-items: center;
  311. justify-content: center;
  312. background: #F5F7FA;
  313. border-radius: 8rpx;
  314. margin: 12rpx 0;
  315. }
  316. .checked{
  317. background: #0365F9;
  318. color: white;
  319. }
  320. }
  321. }
  322. }
  323. }
  324. .van-cell {
  325. background: #F5F7FA !important;
  326. border-radius: 8rpx;
  327. font-size: 28rpx;
  328. }
  329. .buttonBox{
  330. display: flex;
  331. justify-content: center;
  332. .btn{
  333. width: 240rpx;
  334. height: 80rpx;
  335. display: flex;
  336. border-radius: 8rpx;
  337. align-items: center;
  338. justify-content: center;
  339. margin: 48rpx 16rpx 150rpx 16rpx;
  340. color: white;
  341. letter-spacing: 2rpx;
  342. text-indent: 2rpx;
  343. }
  344. .btn2{
  345. width: 654rpx;
  346. height: 96rpx;
  347. display: flex;
  348. border-radius: 8rpx;
  349. align-items: center;
  350. justify-content: center;
  351. margin: 48rpx 48rpx 150rpx 48rpx;
  352. color: white;
  353. letter-spacing: 2rpx;
  354. text-indent: 2rpx;
  355. }
  356. .zcBtn{
  357. background: rgba(0, 0, 0, 0.05);
  358. color: rgba(3, 101, 249, 1);
  359. &::after{
  360. border: none;
  361. }
  362. }
  363. .tjBtn{
  364. background: #0365F9;
  365. }
  366. }
  367. .handleBox{
  368. background: white;
  369. padding: 32rpx;
  370. margin: 24rpx 0;
  371. .handleTitle{
  372. color: rgba(34, 34, 34, 1);
  373. font-size: 36rpx;
  374. font-weight: 600;
  375. }
  376. .imageBox{
  377. display: flex;
  378. justify-content: space-evenly;
  379. align-items: center;
  380. margin-top: 48rpx;
  381. .handleImg{
  382. width: 72rpx;
  383. height: 72rpx;
  384. margin-bottom: 8rpx;
  385. }
  386. .handleArrow{
  387. width: 64rpx;
  388. height: 20rpx;
  389. }
  390. }
  391. .imageItem{
  392. display: flex;
  393. flex-direction: column;
  394. align-items: center;
  395. color: rgba(34, 34, 34, 1);
  396. font-size: 28rpx;
  397. }
  398. }
  399. }
  400. </style>