1 line
4.8 KiB
JSON
1 line
4.8 KiB
JSON
{"ast":null,"code":"import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, vModelText as _vModelText, withDirectives as _withDirectives, createTextVNode as _createTextVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\";\nconst _hoisted_1 = {\n id: \"result\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n return _openBlock(), _createElementBlock(_Fragment, null, [_cache[4] || (_cache[4] = _createElementVNode(\"h3\", null, \"居民血压管理系统\", -1 /* CACHED */)), _createElementVNode(\"div\", _hoisted_1, _toDisplayString($data.result), 1 /* TEXT */), _cache[5] || (_cache[5] = _createTextVNode(\" 居民姓名:\")), _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n id: \"userName\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.userName = $event)\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $data.userName]]), _cache[6] || (_cache[6] = _createTextVNode(\" sbp:\")), _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n id: \"sbp\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => $data.sbp = $event)\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $data.sbp]]), _cache[7] || (_cache[7] = _createTextVNode(\" dbp:\")), _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n id: \"dbp\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $data.dbp = $event)\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $data.dbp]]), _createElementVNode(\"input\", {\n type: \"button\",\n id: \"getResult\",\n onClick: _cache[3] || (_cache[3] = (...args) => $options.getResult && $options.getResult(...args)),\n value: \"getResult\"\n })], 64 /* STABLE_FRAGMENT */);\n}","map":{"version":3,"names":["id","_createElementVNode","_hoisted_1","_toDisplayString","$data","result","type","userName","$event","sbp","dbp","onClick","_cache","args","$options","getResult","value"],"sources":["C:\\exam_app\\app_vue\\src\\components\\Hypertension_1.vue"],"sourcesContent":["<template>\r\n <h3>居民血压管理系统</h3>\r\n <div id=\"result\">{{result}}</div>\r\n 居民姓名:<input type=\"text\" id=\"userName\" v-model=\"userName\">\r\n sbp:<input type=\"text\" id=\"sbp\" v-model=\"sbp\">\r\n dbp:<input type=\"text\" id=\"dbp\" v-model=\"dbp\">\r\n <input type=\"button\" id=\"getResult\" @click=\"getResult\" value=\"getResult\">\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: \"Hypertension_1\",\r\n data(){\r\n return{\r\n proxy:\"/examServer\",\r\n url:\"/public_api/v1/api_for_vue_exam_hypertension_1\",\r\n userName:\"古文萱\",\r\n sbp:0,\r\n dbp:0,\r\n result:\"\",\r\n }\r\n },\r\n methods:{\r\n getResult(){\r\n\r\n const formData = new FormData();\r\n\r\n formData.append(\"userName\", this.userName);\r\n formData.append(\"sbp\", this.sbp);\r\n formData.append(\"dbp\", this.dbp);\r\n\r\n let url = this.proxy+this.url;\r\n let that = this;\r\n\r\n this.axios.post(\r\n url,\r\n formData,\r\n {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data'\r\n }\r\n }\r\n\r\n ).then(\r\n function (response) {\r\n that.result= response.data;\r\n },\r\n function (error) {\r\n console.log(\"有可能是防火墙没有开\");\r\n console.log(error.data);\r\n }\r\n )\r\n\r\n },\r\n },\r\n mounted() {\r\n window.myVue=this;\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n\r\n</style>"],"mappings":";;EAESA,EAAE,EAAC;AAAQ;;uFADhBC,mBAAA,CAAiB,YAAb,UAAQ,qBACZA,mBAAA,CAAiC,OAAjCC,UAAiC,EAAAC,gBAAA,CAAdC,KAAA,CAAAC,MAAM,kB,2CAAQ,QAC5B,I,gBAAAJ,mBAAA,CAAoD;IAA7CK,IAAI,EAAC,MAAM;IAACN,EAAE,EAAC,UAAU;+DAAUI,KAAA,CAAAG,QAAQ,GAAAC,MAAA;iDAARJ,KAAA,CAAAG,QAAQ,E,8CAAE,OACrD,I,gBAAAN,mBAAA,CAA0C;IAAnCK,IAAI,EAAC,MAAM;IAACN,EAAE,EAAC,KAAK;+DAAUI,KAAA,CAAAK,GAAG,GAAAD,MAAA;iDAAHJ,KAAA,CAAAK,GAAG,E,8CAAE,OAC1C,I,gBAAAR,mBAAA,CAA0C;IAAnCK,IAAI,EAAC,MAAM;IAACN,EAAE,EAAC,KAAK;+DAAUI,KAAA,CAAAM,GAAG,GAAAF,MAAA;iDAAHJ,KAAA,CAAAM,GAAG,E,GAC5CT,mBAAA,CAAyE;IAAlEK,IAAI,EAAC,QAAQ;IAACN,EAAE,EAAC,WAAW;IAAEW,OAAK,EAAAC,MAAA,QAAAA,MAAA,UAAAC,IAAA,KAAEC,QAAA,CAAAC,SAAA,IAAAD,QAAA,CAAAC,SAAA,IAAAF,IAAA,CAAS;IAAEG,KAAK,EAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |