mark.vue 12 KB

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