dialogLiaodan.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. define(function (require) {
  2. return function (context) {
  3. var $dlg, $form, $s1, $s2;
  4. //
  5. function queryGrid1() {
  6. var _datas2 = [];
  7. _datas2.push({
  8. "id": 1,
  9. "text": "男"
  10. },{
  11. "id": 2,
  12. "text": "女"
  13. });
  14. return _datas2;
  15. }
  16. function queryGrid3() {
  17. var _datas2 = [];
  18. _datas2.push({
  19. "id": 0,
  20. "text": "无"
  21. },{
  22. "id": 1,
  23. "text": "确诊"
  24. },{
  25. "id": 2,
  26. "text": "疑似"
  27. },{
  28. "id": 3,
  29. "text": "有接触史"
  30. },{
  31. "id": 4,
  32. "text": "解除隔离"
  33. })
  34. return _datas2;
  35. }
  36. function queryGrid4() {
  37. var _datas2 = [];
  38. _datas2.push({
  39. "id": 0,
  40. "text": "无咳嗽"
  41. },{
  42. "id": 1,
  43. "text": "偶有短暂咳嗽"
  44. },{
  45. "id": 2,
  46. "text": "咳嗽轻度影响生活"
  47. },{
  48. "id": 3,
  49. "text": "咳嗽严重影响生活"
  50. })
  51. return _datas2;
  52. }
  53. function queryGrid5() {
  54. var _datas2 = [];
  55. _datas2.push({
  56. "id": 0,
  57. "text": "无"
  58. },{
  59. "id": 1,
  60. "text": "按压有"
  61. },{
  62. "id": 2,
  63. "text": "偶尔"
  64. },{
  65. "id": 3,
  66. "text": "持续有"
  67. })
  68. return _datas2;
  69. }
  70. function queryGrid6() {
  71. var _datas2 = [];
  72. _datas2.push({
  73. "id": 0,
  74. "text": "无"
  75. },{
  76. "id": 1,
  77. "text": "急走或上坡气短"
  78. },{
  79. "id": 2,
  80. "text": "气短而走路变慢"
  81. },{
  82. "id": 3,
  83. "text": "走路数分钟后气短"
  84. },{
  85. "id": 4,
  86. "text": "气短无法离开房间"
  87. })
  88. return _datas2;
  89. }
  90. function queryGrid7() {
  91. var _datas2 = [];
  92. _datas2.push({
  93. "id": 0,
  94. "text": "无"
  95. },{
  96. "id": 1,
  97. "text": "体力劳动后不能恢复"
  98. },{
  99. "id": 2,
  100. "text": "轻体力活非常累"
  101. },{
  102. "id": 3,
  103. "text": "不能正常生活"
  104. })
  105. return _datas2;
  106. }
  107. function queryGrid8() {
  108. var _datas2 = [];
  109. _datas2.push({
  110. "id": 0,
  111. "text": "无"
  112. },{
  113. "id": 1,
  114. "text": "轻度腹泻少于于3次"
  115. },{
  116. "id": 2,
  117. "text": "中度腹泻4-6次"
  118. },{
  119. "id": 3,
  120. "text": "重度腹泻超过6次"
  121. })
  122. return _datas2;
  123. }
  124. function queryGrid9() {
  125. var _datas2 = [];
  126. _datas2.push({
  127. "id": 1,
  128. "text": "武汉市"
  129. },{
  130. "id": 2,
  131. "text": "宜昌市"
  132. },{
  133. "id": 3,
  134. "text": "当阳市"
  135. },{
  136. "id": 4,
  137. "text": "其它地点"
  138. })
  139. return _datas2;
  140. }
  141. function queryGrid10() {
  142. var _datas2 = [];
  143. _datas2.push({
  144. "id": 1,
  145. "text": "武汉市"
  146. },{
  147. "id": 2,
  148. "text": "宜昌市"
  149. },{
  150. "id": 3,
  151. "text": "当阳市"
  152. },{
  153. "id": 4,
  154. "text": "其它地点"
  155. })
  156. return _datas2;
  157. }
  158. function queryGrid11() {
  159. var _datas2 = [];
  160. _datas2.push({
  161. "id": 1,
  162. "text": "武汉市"
  163. },{
  164. "id": 2,
  165. "text": "宜昌市"
  166. },{
  167. "id": 3,
  168. "text": "当阳市"
  169. },{
  170. "id": 4,
  171. "text": "其它地点"
  172. })
  173. return _datas2;
  174. }
  175. function queryGrid12() {
  176. var _datas2 = [];
  177. _datas2.push({
  178. "id": 1,
  179. "text": "武汉市"
  180. },{
  181. "id": 2,
  182. "text": "宜昌市"
  183. },{
  184. "id": 3,
  185. "text": "当阳市"
  186. },{
  187. "id": 4,
  188. "text": "其它地点"
  189. })
  190. return _datas2;
  191. }
  192. function queryGrid13() {
  193. var _datas2 = [];
  194. _datas2.push({
  195. "id": 0,
  196. "text": "否"
  197. },{
  198. "id": 1,
  199. "text": "是"
  200. })
  201. return _datas2;
  202. }
  203. function queryGrid14() {
  204. var _datas2 = [];
  205. _datas2.push({
  206. "id": 1,
  207. "text": "长途汽车"
  208. },{
  209. "id": 2,
  210. "text": "火车"
  211. },{
  212. "id": 3,
  213. "text": "飞机"
  214. })
  215. return _datas2;
  216. }
  217. return {
  218. xtype: 'dialog',
  219. dialogId: 'dialogOutsideXzId',
  220. title:'修改',
  221. width: 420,
  222. height: 460,
  223. onOpen: function () {
  224. $dlg = $(this);
  225. },
  226. center: {
  227. items: {
  228. xtype: 'formgroup',
  229. //字数过多加上后可让字显示出来
  230. subLabelWidth: '100',
  231. subControlWidth: '200',
  232. onRender: function () {
  233. $form = $(this);
  234. },
  235. items: [
  236. [
  237. [{
  238. name: 'suspectedId',
  239. label: '疑似id',
  240. labelWidth: 150, required: true,
  241. width: 350,
  242. xtype: "hidden",
  243. value: context.row.suspectedId,
  244. },
  245. {
  246. name: 'userName',
  247. label: '姓名',
  248. labelWidth: 150,
  249. width: 350,
  250. required: true,
  251. value: context.row.userName
  252. },
  253. {
  254. name: 'grender',
  255. label: '性别',
  256. labelWidth: 150,
  257. width: 350,
  258. required: true,
  259. data: queryGrid1(),
  260. xtype: 'yvselect',
  261. value:context.row.grender
  262. },
  263. {
  264. name: 'age',
  265. label: '岁数',
  266. labelWidth: 150,
  267. required: true,
  268. width: 350,
  269. value: context.row.age
  270. }],
  271. [{
  272. name: 'familyStatus',
  273. label: '基本情况',
  274. labelWidth: 150,
  275. width: 350, required: true,
  276. value: context.row.familyStatus,
  277. }],
  278. [{
  279. label: '新冠肺炎',
  280. name: 'medical',
  281. labelWidth: 150,
  282. width: 350,
  283. xtype: 'yvselect',
  284. required: true,
  285. data: queryGrid3(),
  286. value:context.row.medical
  287. },
  288. {
  289. name: 'temperature',
  290. label: "体温",
  291. labelWidth: 150,
  292. width: 350,required: true,
  293. data: queryGrid3(),
  294. value:context.row.temperature
  295. }],
  296. [{
  297. name: 'cough',
  298. label: "咳嗽现象",
  299. xtype: 'yvselect',
  300. labelWidth: 150, required: true,
  301. data: queryGrid4(),
  302. width: 350,
  303. value:context.row.cough
  304. }],
  305. [{
  306. name: 'muscle',
  307. label: '肌肉酸疼',
  308. labelWidth: 150,
  309. width: 350,
  310. maxlength: 10,
  311. xtype: 'yvselect', required: true,
  312. data: queryGrid5(),
  313. value:context.row.muscle
  314. }],
  315. [{
  316. name: 'dyspnea',
  317. label: '呼吸困难', labelWidth: 150,width: 350,
  318. xtype: 'yvselect',
  319. data: queryGrid6(),
  320. required: true, value:context.row.dyspnea,
  321. }],
  322. [{
  323. name: 'fatigue',
  324. label: '乏力现象',
  325. xtype: 'yvselect',
  326. data: queryGrid7(),
  327. labelWidth: 150, width: 350, required: true,
  328. value:context.row.fatigue
  329. }],
  330. [{
  331. name: 'diarrhea',
  332. label: '腹泻现象',
  333. xtype: 'yvselect',
  334. data: queryGrid8(),
  335. labelWidth: 150, width: 350, required: true,
  336. value:context.row.diarrhea
  337. }],
  338. [{
  339. name: 'others',
  340. label: '其它描述', labelWidth: 150, width: 350, height: '70px',
  341. required: true, value:context.row.others,
  342. maxlength: 200, validType: 'isBlank'
  343. }],
  344. [{
  345. name: 'workLocal',
  346. label: '工作驻地', labelWidth: 150, width: 350, xtype: 'yvselect',
  347. data: queryGrid9(),
  348. required: true, value:context.row.workLocal,
  349. }],
  350. [{
  351. name: 'workLocalOther',
  352. label: '工作驻地', labelWidth: 150, width: 350,
  353. value:context.row.workLocalOther,
  354. }],
  355. [{
  356. name: 'todayLocal',
  357. label: '今晚驻地', labelWidth: 150, width: 350,
  358. required: true, value:context.row.todayLocal,xtype: 'yvselect',
  359. data: queryGrid10(),
  360. }],
  361. [{
  362. name: 'todayLocalOther',
  363. label: '今晚驻地', labelWidth: 150, width: 350,
  364. value:context.row.todayLocalOther,
  365. }],
  366. [{
  367. name: 'isTrip',
  368. label: '是否出行', labelWidth: 150, width: 350,
  369. required: true, value:context.row.isTrip,xtype: 'yvselect',
  370. data: queryGrid13(),
  371. }],
  372. [{
  373. name: 'startLocal',
  374. label: '出发地', labelWidth: 150, width: 350,
  375. value:context.row.startLocal,xtype: 'yvselect',
  376. data: queryGrid11(),
  377. }],
  378. [{
  379. name: 'startLocalOther',
  380. label: '出发地', labelWidth: 150, width: 350,
  381. value:context.row.startLocalOther,
  382. }],
  383. [{
  384. name: 'endLocal',
  385. label: '目的地', labelWidth: 150, width: 350,
  386. value:context.row.endLocal,xtype: 'yvselect',
  387. data: queryGrid12(),
  388. }],
  389. [{
  390. name: 'endLocalOther',
  391. label: '目的地', labelWidth: 150, width: 350,
  392. value:context.row.endLocalOther
  393. }],
  394. [{
  395. name: 'tripType',
  396. label: '出行方式', labelWidth: 150, width: 350,
  397. value:context.row.tripType,xtype: 'yvselect',
  398. data: queryGrid14(),
  399. }],
  400. [{
  401. name: 'tripTypeDesp',
  402. label: '车次/车牌号/航班', labelWidth: 150, width: 350,
  403. value:context.row.tripTypeDesp,
  404. }],
  405. ]
  406. ]
  407. }
  408. },
  409. buttons:
  410. [
  411. {
  412. text: "保存", iconCls: "fa fa-save", onClick: function () {
  413. $.yvan.postForm($form, {
  414. url: api('/home/addRibaoTripxq'),
  415. success: function () {
  416. $.yvan.msg('操作成功');
  417. $dlg.window('close');
  418. if ($.type(context.confirm) === 'function') {
  419. context.confirm();
  420. }
  421. }
  422. });
  423. }
  424. }, {
  425. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  426. $dlg.dialog('close');
  427. if ($.type(context.confirm) === 'function') {
  428. context.confirm();
  429. }
  430. }
  431. }]
  432. }
  433. ;
  434. }
  435. ;
  436. }
  437. );