index.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <template>
  2. <view class="content">
  3. <view class="text-area">
  4. <text class="top-line"></text>
  5. <form @submit="formSubmit" @reset="formReset" class="form-text">
  6. <view class="form-top">人员基本信息</view>
  7. <view class="form-name">姓 名:{{name}}</view>
  8. <text class="form-line1"></text>
  9. <view class="form-phone">联系方式:{{phone}}</view>
  10. <text class="form-line2"></text>
  11. <view class="form-card">身份证号:{{card}}</view>
  12. <text class="form-line3"></text>
  13. <view class="form-ma">码 色:<text :class="{'yellow': sm_color == '黄码', 'red': sm_color == '红码'}">{{ma_color}}</text></view>
  14. <text class="form-line4"></text>
  15. <view class="form-type">人员类型:{{people_type}}</view>
  16. <text class="form-line5"></text>
  17. <view class="form-time">时 间:{{time}}</view>
  18. <text class="form-line6"></text>
  19. <view class="form-unit">处理单位:{{unit}}</view>
  20. <text class="form-line7"></text>
  21. <view class="form-place">监测地点:{{place}}</view>
  22. <text class="form-line8"></text>
  23. <view class="form-select" v-if="this.state==0">
  24. <view class="form-way">处置方式:
  25. <picker @change="bindPickerChange" :value="index" :range="array">
  26. <text class="uni-input">{{array[index]}}</text>
  27. <image src="../../static/select_img.png" class="select-img"></image>
  28. </picker>
  29. </view>
  30. </view>
  31. <view class="form-detail" v-if="this.state==0">处置详情:
  32. <textarea placeholder="请输入处置详情" v-model="mark"></textarea>
  33. </view>
  34. <view class="handle" v-if="this.state==0">
  35. <button form-type="submit" type="primary" @click="sub">确认处置</button>
  36. </view>
  37. <view class="form-select" v-if="this.state==1">
  38. <view class="form-way">处置方式:{{message}}
  39. </view>
  40. </view>
  41. <view class="form-detail" v-if="this.state==1">处置详情:{{xinxi_mark}}
  42. </view>
  43. <view class="handle" v-if="this.state==1">
  44. <view class="yihandle">已处置</view>
  45. </view>
  46. </form>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. array: ['集中隔离', '居家隔离','发送协查','居家监测','正常管理', '闭环管理','其他情况','自我监测'],
  55. index: 0,
  56. sm_color:'黄码',
  57. id:'',
  58. name:'',
  59. phone:'',
  60. card:'',
  61. ma_color:'',
  62. people_type:'',
  63. time:'',
  64. unit:'',
  65. place:'',
  66. way:'',
  67. mark:'',
  68. uuid:'',
  69. xinxi:'',
  70. state:'',
  71. message:'',
  72. xinxi_mark:'',
  73. }
  74. },
  75. onLoad() {
  76. let curPage = getCurrentPages();
  77. let route = curPage[curPage.length - 1].route; //获取当前页面的路由
  78. let params = curPage[curPage.length - 1].options; //获取当前页面参数,如果有则返回参数的对象,没有参数返回空对象{}
  79. let keys = Object.keys(params); //获取对象的key 返回对象key的数组
  80. // console.log(route)
  81. // console.log(keys)
  82. if (keys.length > 0) {
  83. // this.id = keys.reduce((pre, cur) => {
  84. // return pre +keys + '/';
  85. // }, '?').slice(-1, 1);
  86. this.id = keys.reduce((pre, cur) => {
  87. return keys[0];
  88. },);
  89. // this.ltime = keys.reduce((pre, cur) => {
  90. // return keys[1];
  91. // },);
  92. }
  93. // console.log(this.id)
  94. // console.log(this.ltime)
  95. this.getUnPeople()
  96. uni.$on('refreshData',() => {
  97. this.getUnPeople()
  98. })
  99. },
  100. methods: {
  101. //异常人员信息
  102. getUnPeople() {
  103. this.$axios.post('/bigData2/userqueryHandlerByUUId.action?id='+this.id, {
  104. headers: {
  105. 'Content-Type': 'application/json',
  106. }
  107. })
  108. .then(res => {
  109. // console.log(res.data)
  110. this.name=res.data.data[0].sm_name
  111. this.phone=res.data.data[0].sm_phone
  112. this.card=res.data.data[0].sm_card
  113. this.ma_color=res.data.data[0].sm_color
  114. this.people_type=res.data.data[0].sm_type
  115. this.time=res.data.data[0].sm_time
  116. this.unit=res.data.data[0].handler_unit
  117. this.place=res.data.data[0].sm_place
  118. this.way=res.data.data[0].handler_type
  119. this.uuid=res.data.data[0].uuid
  120. this.state=res.data.data[0].handler_state2
  121. this.message=res.data.data[0].handler_message
  122. this.xinxi_mark=res.data.data[0].message_commit
  123. })
  124. .catch(err => {
  125. console.log(err)
  126. })
  127. },
  128. //提交处置
  129. getTijiao() {
  130. console.log(this.uuid)
  131. if(this.index=='0') {
  132. this.xinxi='集中隔离'
  133. }else if(this.index=='1') {
  134. this.xinxi='居家隔离'
  135. }else if(this.index=='2') {
  136. this.xinxi='发送协查'
  137. }else if(this.index=='3') {
  138. this.xinxi='居家监测'
  139. }else if(this.index=='4') {
  140. this.xinxi='正常管理'
  141. }else if(this.index=='5') {
  142. this.xinxi='闭环管理'
  143. }else if(this.index=='6') {
  144. this.xinxi='其他情况'
  145. }else if(this.index=='7') {
  146. this.xinxi='自我监测'
  147. }
  148. console.log(this.xinxi)
  149. console.log(this.mark)
  150. this.$axios.post('/bigData2/userupdateHand.action?uuid='+this.uuid + '&handler_message=' + this.xinxi + '&sm_time=' + this.time + '&message_commit=' + this.mark +'&id=' +this.id, {
  151. headers: {
  152. 'Content-Type': 'application/json',
  153. }
  154. })
  155. .then(res => {
  156. // console.log(res)
  157. uni.showToast({
  158. title: '提交成功',
  159. icon: 'success',
  160. duration: 1000
  161. })
  162. setTimeout(() => {
  163. uni.navigateTo({
  164. url: "./success",
  165. });
  166. }, 600);
  167. })
  168. .catch(err => {
  169. console.log(err)
  170. uni.showToast({
  171. title: '提交失败',
  172. icon: 'defeat',
  173. duration: 1000
  174. })
  175. })
  176. },
  177. sub() {
  178. this.getTijiao()
  179. },
  180. //选择框
  181. bindPickerChange: function(e) {
  182. this.index = e.target.value
  183. },
  184. }
  185. }
  186. </script>
  187. <style>
  188. .content {
  189. display: flex;
  190. flex-direction: column;
  191. align-items: center;
  192. justify-content: center;
  193. }
  194. .text-area {
  195. display: flex;
  196. justify-content: center;
  197. }
  198. .top-line{
  199. margin-top: 0rpx;
  200. margin-left: 0;
  201. position: absolute;
  202. width: 750rpx;
  203. height: 1rpx;
  204. background: #CCCCCC;
  205. }
  206. .form-text{
  207. margin-top: 32rpx;
  208. display: flex;
  209. width: 690rpx;
  210. height: 1461rpx;
  211. background: #FFFFFF;
  212. box-shadow: 0rpx 0rpx 17rpx 1rpx rgba(0, 0, 0, 0.22);
  213. border-radius: 20rpx;
  214. }
  215. .form-top{
  216. width: 690rpx;
  217. height: 120rpx;
  218. background: linear-gradient(90deg, #42A9FE 0%, #2A71DD 100%);
  219. border-radius: 20rpx 20rpx 0rpx 0rpx;
  220. font-size: 32rpx;
  221. font-family: PingFang SC;
  222. font-weight: 500;
  223. color: #FFFFFF;
  224. text-align: center;
  225. line-height: 120rpx;
  226. }
  227. .form-name{
  228. margin-left: 41rpx;
  229. margin-top: 44rpx;
  230. font-size: 28rpx;
  231. font-family: PingFang SC;
  232. font-weight: 500;
  233. color: #333333;
  234. }
  235. .form-line1{
  236. display: flex;
  237. margin-left: 40rpx;
  238. margin-top: 45rpx;
  239. width: 610rpx;
  240. height: 1rpx;
  241. background: #CCCCCC;
  242. }
  243. .form-phone{
  244. margin-left: 41rpx;
  245. margin-top: 44rpx;
  246. font-size: 28rpx;
  247. font-family: PingFang SC;
  248. font-weight: 500;
  249. color: #333333;
  250. }
  251. .form-line2{
  252. display: flex;
  253. margin-left: 40rpx;
  254. margin-top: 45rpx;
  255. width: 610rpx;
  256. height: 1rpx;
  257. background: #CCCCCC;
  258. }
  259. .form-card{
  260. margin-left: 41rpx;
  261. margin-top: 44rpx;
  262. font-size: 28rpx;
  263. font-family: PingFang SC;
  264. font-weight: 500;
  265. color: #333333;
  266. }
  267. .form-line3{
  268. display: flex;
  269. margin-left: 40rpx;
  270. margin-top: 45rpx;
  271. width: 610rpx;
  272. height: 1rpx;
  273. background: #CCCCCC;
  274. }
  275. .form-ma{
  276. margin-left: 41rpx;
  277. margin-top: 44rpx;
  278. font-size: 28rpx;
  279. font-family: PingFang SC;
  280. font-weight: 500;
  281. color: #333333;
  282. }
  283. >>>.yellow {
  284. color: #F4B800;
  285. }
  286. >>>.red {
  287. color: #FF4A4A;
  288. }
  289. .form-line4{
  290. display: flex;
  291. margin-left: 40rpx;
  292. margin-top: 45rpx;
  293. width: 610rpx;
  294. height: 1rpx;
  295. background: #CCCCCC;
  296. }
  297. .form-type{
  298. margin-left: 41rpx;
  299. margin-top: 44rpx;
  300. font-size: 28rpx;
  301. font-family: PingFang SC;
  302. font-weight: 500;
  303. color: #333333;
  304. }
  305. .form-line5{
  306. display: flex;
  307. margin-left: 40rpx;
  308. margin-top: 45rpx;
  309. width: 610rpx;
  310. height: 1rpx;
  311. background: #CCCCCC;
  312. }
  313. .form-time{
  314. margin-left: 41rpx;
  315. margin-top: 44rpx;
  316. font-size: 28rpx;
  317. font-family: PingFang SC;
  318. font-weight: 500;
  319. color: #333333;
  320. }
  321. .form-line6{
  322. display: flex;
  323. margin-left: 40rpx;
  324. margin-top: 45rpx;
  325. width: 610rpx;
  326. height: 1rpx;
  327. background: #CCCCCC;
  328. }
  329. .form-unit{
  330. margin-left: 41rpx;
  331. margin-top: 38rpx;
  332. font-size: 28rpx;
  333. font-family: PingFang SC;
  334. font-weight: 500;
  335. color: #333333;
  336. }
  337. .form-line7{
  338. display: flex;
  339. margin-left: 40rpx;
  340. margin-top: 45rpx;
  341. width: 610rpx;
  342. height: 1rpx;
  343. background: #CCCCCC;
  344. }
  345. .form-place{
  346. margin-left: 41rpx;
  347. margin-top: 39rpx;
  348. font-size: 28rpx;
  349. font-family: PingFang SC;
  350. font-weight: 500;
  351. color: #333333;
  352. }
  353. .form-line8{
  354. display: flex;
  355. margin-left: 40rpx;
  356. margin-top: 45rpx;
  357. width: 610rpx;
  358. height: 1rpx;
  359. background: #CCCCCC;
  360. }
  361. .form-way{
  362. margin-left: 41rpx;
  363. margin-top: 44rpx;
  364. font-size: 28rpx;
  365. font-family: PingFang SC;
  366. font-weight: 500;
  367. color: #333333;
  368. }
  369. .form-way picker{
  370. margin-left: 141rpx;
  371. margin-top: -47rpx;
  372. width: 243rpx;
  373. height: 63rpx;
  374. background: #F2F2F2;
  375. border: 1rpx solid #808080;
  376. border-radius: 10rpx;
  377. text-align: center;
  378. line-height: 63rpx;
  379. }
  380. .select-img{
  381. position: absolute;
  382. margin-left: 35rpx;
  383. margin-top: 23rpx;
  384. width: 20rpx;
  385. height: 20rpx;
  386. }
  387. .form-detail{
  388. margin-left: 41rpx;
  389. margin-top: 24rpx;
  390. font-size: 28rpx;
  391. font-family: PingFang SC;
  392. font-weight: 500;
  393. color: #333333;
  394. }
  395. .form-detail textarea{
  396. margin-left: 141rpx;
  397. margin-top: -47rpx;
  398. width: 468rpx;
  399. height: 159rpx;
  400. border: 1rpx solid #BFBFBF;
  401. border-radius: 10rpx;
  402. }
  403. .handle{
  404. margin-left: 145rpx;
  405. margin-top: 88rpx;
  406. width: 468rpx;
  407. width: 400rpx;
  408. height: 105rpx;
  409. border-radius: 10rpx;
  410. }
  411. .yihandle{
  412. margin-left: 145rpx;
  413. margin-top: 80rpx;
  414. width: 468rpx;
  415. width: 400rpx;
  416. height: 105rpx;
  417. font-size: 34rpx;
  418. font-weight: 400;
  419. color: #007AFF;
  420. }
  421. </style>