define(function (require) { return function (context) { var $dlg, $form, $s1, $s2; // function queryGrid1() { var _datas2 = []; _datas2.push({ "id": 1, "text": "男" },{ "id": 2, "text": "女" }); return _datas2; } function queryGrid3() { var _datas2 = []; _datas2.push({ "id": 0, "text": "无" },{ "id": 1, "text": "确诊" },{ "id": 2, "text": "疑似" },{ "id": 3, "text": "有接触史" },{ "id": 4, "text": "解除隔离" }) return _datas2; } function queryGrid4() { var _datas2 = []; _datas2.push({ "id": 0, "text": "无咳嗽" },{ "id": 1, "text": "偶有短暂咳嗽" },{ "id": 2, "text": "咳嗽轻度影响生活" },{ "id": 3, "text": "咳嗽严重影响生活" }) return _datas2; } function queryGrid5() { var _datas2 = []; _datas2.push({ "id": 0, "text": "无" },{ "id": 1, "text": "按压有" },{ "id": 2, "text": "偶尔" },{ "id": 3, "text": "持续有" }) return _datas2; } function queryGrid6() { var _datas2 = []; _datas2.push({ "id": 0, "text": "无" },{ "id": 1, "text": "急走或上坡气短" },{ "id": 2, "text": "气短而走路变慢" },{ "id": 3, "text": "走路数分钟后气短" },{ "id": 4, "text": "气短无法离开房间" }) return _datas2; } function queryGrid7() { var _datas2 = []; _datas2.push({ "id": 0, "text": "无" },{ "id": 1, "text": "体力劳动后不能恢复" },{ "id": 2, "text": "轻体力活非常累" },{ "id": 3, "text": "不能正常生活" }) return _datas2; } function queryGrid8() { var _datas2 = []; _datas2.push({ "id": 0, "text": "无" },{ "id": 1, "text": "轻度腹泻少于于3次" },{ "id": 2, "text": "中度腹泻4-6次" },{ "id": 3, "text": "重度腹泻超过6次" }) return _datas2; } function queryGrid9() { var _datas2 = []; _datas2.push({ "id": 1, "text": "武汉市" },{ "id": 2, "text": "宜昌市" },{ "id": 3, "text": "当阳市" },{ "id": 4, "text": "其它地点" }) return _datas2; } function queryGrid10() { var _datas2 = []; _datas2.push({ "id": 1, "text": "武汉市" },{ "id": 2, "text": "宜昌市" },{ "id": 3, "text": "当阳市" },{ "id": 4, "text": "其它地点" }) return _datas2; } function queryGrid11() { var _datas2 = []; _datas2.push({ "id": 1, "text": "武汉市" },{ "id": 2, "text": "宜昌市" },{ "id": 3, "text": "当阳市" },{ "id": 4, "text": "其它地点" }) return _datas2; } function queryGrid12() { var _datas2 = []; _datas2.push({ "id": 1, "text": "武汉市" },{ "id": 2, "text": "宜昌市" },{ "id": 3, "text": "当阳市" },{ "id": 4, "text": "其它地点" }) return _datas2; } function queryGrid13() { var _datas2 = []; _datas2.push({ "id": 0, "text": "否" },{ "id": 1, "text": "是" }) return _datas2; } function queryGrid14() { var _datas2 = []; _datas2.push({ "id": 1, "text": "长途汽车" },{ "id": 2, "text": "火车" },{ "id": 3, "text": "飞机" }) return _datas2; } return { xtype: 'dialog', dialogId: 'dialogOutsideXzId', title:'修改', width: 420, height: 460, onOpen: function () { $dlg = $(this); }, center: { items: { xtype: 'formgroup', //字数过多加上后可让字显示出来 subLabelWidth: '100', subControlWidth: '200', onRender: function () { $form = $(this); }, items: [ [ [{ name: 'suspectedId', label: '疑似id', labelWidth: 150, required: true, width: 350, xtype: "hidden", value: context.row.suspectedId, }, { name: 'userName', label: '姓名', labelWidth: 150, width: 350, required: true, value: context.row.userName }, { name: 'grender', label: '性别', labelWidth: 150, width: 350, required: true, data: queryGrid1(), xtype: 'yvselect', value:context.row.grender }, { name: 'age', label: '岁数', labelWidth: 150, required: true, width: 350, value: context.row.age }], [{ name: 'familyStatus', label: '基本情况', labelWidth: 150, width: 350, required: true, value: context.row.familyStatus, }], [{ label: '新冠肺炎', name: 'medical', labelWidth: 150, width: 350, xtype: 'yvselect', required: true, data: queryGrid3(), value:context.row.medical }, { name: 'temperature', label: "体温", labelWidth: 150, width: 350,required: true, data: queryGrid3(), value:context.row.temperature }], [{ name: 'cough', label: "咳嗽现象", xtype: 'yvselect', labelWidth: 150, required: true, data: queryGrid4(), width: 350, value:context.row.cough }], [{ name: 'muscle', label: '肌肉酸疼', labelWidth: 150, width: 350, maxlength: 10, xtype: 'yvselect', required: true, data: queryGrid5(), value:context.row.muscle }], [{ name: 'dyspnea', label: '呼吸困难', labelWidth: 150,width: 350, xtype: 'yvselect', data: queryGrid6(), required: true, value:context.row.dyspnea, }], [{ name: 'fatigue', label: '乏力现象', xtype: 'yvselect', data: queryGrid7(), labelWidth: 150, width: 350, required: true, value:context.row.fatigue }], [{ name: 'diarrhea', label: '腹泻现象', xtype: 'yvselect', data: queryGrid8(), labelWidth: 150, width: 350, required: true, value:context.row.diarrhea }], [{ name: 'others', label: '其它描述', labelWidth: 150, width: 350, height: '70px', required: true, value:context.row.others, maxlength: 200, validType: 'isBlank' }], [{ name: 'workLocal', label: '工作驻地', labelWidth: 150, width: 350, xtype: 'yvselect', data: queryGrid9(), required: true, value:context.row.workLocal, }], [{ name: 'workLocalOther', label: '工作驻地', labelWidth: 150, width: 350, value:context.row.workLocalOther, }], [{ name: 'todayLocal', label: '今晚驻地', labelWidth: 150, width: 350, required: true, value:context.row.todayLocal,xtype: 'yvselect', data: queryGrid10(), }], [{ name: 'todayLocalOther', label: '今晚驻地', labelWidth: 150, width: 350, value:context.row.todayLocalOther, }], [{ name: 'isTrip', label: '是否出行', labelWidth: 150, width: 350, required: true, value:context.row.isTrip,xtype: 'yvselect', data: queryGrid13(), }], [{ name: 'startLocal', label: '出发地', labelWidth: 150, width: 350, value:context.row.startLocal,xtype: 'yvselect', data: queryGrid11(), }], [{ name: 'startLocalOther', label: '出发地', labelWidth: 150, width: 350, value:context.row.startLocalOther, }], [{ name: 'endLocal', label: '目的地', labelWidth: 150, width: 350, value:context.row.endLocal,xtype: 'yvselect', data: queryGrid12(), }], [{ name: 'endLocalOther', label: '目的地', labelWidth: 150, width: 350, value:context.row.endLocalOther }], [{ name: 'tripType', label: '出行方式', labelWidth: 150, width: 350, value:context.row.tripType,xtype: 'yvselect', data: queryGrid14(), }], [{ name: 'tripTypeDesp', label: '车次/车牌号/航班', labelWidth: 150, width: 350, value:context.row.tripTypeDesp, }], ] ] } }, buttons: [ { text: "保存", iconCls: "fa fa-save", onClick: function () { $.yvan.postForm($form, { url: api('/home/addRibaoTripxq'), success: function () { $.yvan.msg('操作成功'); $dlg.window('close'); if ($.type(context.confirm) === 'function') { context.confirm(); } } }); } }, { text: "关闭", iconCls: "fa fa-times", onClick: function () { $dlg.dialog('close'); if ($.type(context.confirm) === 'function') { context.confirm(); } } }] } ; } ; } );