index.vue 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
  4. <el-row>
  5. <el-col :span="24">
  6. <el-row>
  7. <el-col :span="8">
  8. <el-form-item label="姓名" prop="userName">
  9. <el-input v-model="queryParams.userName" placeholder="请输入姓名" style="width:240px;" clearable @keyup.enter.native="handleQuery" />
  10. </el-form-item>
  11. </el-col>
  12. <el-col :span="8">
  13. <el-form-item label="身份证号" prop="idCard">
  14. <el-input v-model="queryParams.idCard" placeholder="请输入身份证号码" style="width:240px;" clearable @keyup.enter.native="handleQuery" />
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="8">
  18. <el-form-item label="联系号码" prop="phoneNum">
  19. <el-input v-model="queryParams.phoneNum" placeholder="请输入联系号码" style="width:240px;"clearable @keyup.enter.native="handleQuery" />
  20. </el-form-item>
  21. </el-col>
  22. </el-row>
  23. </el-col>
  24. <el-col :span="24">
  25. <el-row>
  26. <el-col :span="8">
  27. <el-form-item label="剂次" prop="jici">
  28. <el-select style="width:240px;" v-model="queryParams.jici" placeholder="剂次" clearable :disabled="shouwestwo">
  29. <el-option v-for="dict in typeOptionstimesgt" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  30. </el-select>
  31. </el-form-item>
  32. </el-col><el-col :span="8">
  33. <el-form-item label="年龄阶段" >
  34. <el-select v-model="queryParams.params.age" placeholder="年龄阶段" style="width:240px;" clearable>
  35. <el-option v-for="dict in angesList" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  36. </el-select>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="4.8">
  40. <el-form-item label="重点行业" prop="keyIndustries">
  41. <el-select v-model="queryParams.keyIndustries" placeholder="重点行业" clearable style="width:240px;">
  42. <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  43. </el-select>
  44. </el-form-item>
  45. </el-col>
  46. </el-row>
  47. </el-col>
  48. <el-col :span="24">
  49. <el-row>
  50. <el-col :span="8">
  51. <el-form-item label="疫苗名称" prop="vaccineName">
  52. <el-select style="width:240px;" v-model="queryParams.vaccineName" placeholder="疫苗名称" clearable :disabled="shouwestwo" >
  53. <el-option v-for="dict in typeOptionsname" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
  54. </el-select>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="8">
  58. <el-form-item label="接种时间" prop="vaccinationTime">
  59. <el-date-picker
  60. clearable
  61. v-model="queryParams.vaccinationTime"
  62. type="date"
  63. value-format="yyyy-MM-dd"
  64. format="yyyy-MM-dd"
  65. placeholder="选择接种时间"
  66. style="width:240px;"
  67. :disabled="shouwestwo"
  68. ></el-date-picker>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="8">
  72. <el-form-item label="接种地点" prop="vaccinationPlace">
  73. <el-select v-model="queryParams.vaccinationPlace" placeholder="接种地点" style="width:240px;" clearable :disabled="shouwestwo">
  74. <el-option v-for="dict in typeOptionsvaccinatio" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  75. </el-select>
  76. </el-form-item>
  77. </el-col>
  78. </el-row>
  79. </el-col>
  80. <el-col :span="24">
  81. <el-row>
  82. <el-col :span="8" class="jehak">
  83. <el-form-item label="户籍地址" prop="villagerGroup">
  84. <el-cascader
  85. placeholder="点击选择户籍地址"
  86. :options="options"
  87. filterable
  88. @change="chahetwo"
  89. :props="optionProps"
  90. style="width: 110%;"
  91. @keyup.enter.native="handleQuery"
  92. clearable
  93. ></el-cascader>
  94. </el-form-item>
  95. </el-col>
  96. <el-col :span="14" class="jehak">
  97. <el-form-item label="居住地址" prop="villagerGroup">
  98. <!-- <el-cascader
  99. placeholder="点击选择居住地址"
  100. :options="options"
  101. filterable
  102. @change="chahetwo"
  103. :props="optionProps"
  104. style="width: 100%;"
  105. @keyup.enter.native="handleQuery"
  106. clearable
  107. ></el-cascader> -->
  108. <area-select
  109. type="text"
  110. v-model="selectedtwo"
  111. :data="$pcaa"
  112. :level="2"
  113. style="display: flex;line-height: 18px;"
  114. @change="onSelectedtwo"
  115. @blur="dakousr"
  116. class="hues"
  117. ></area-select>
  118. </el-form-item>
  119. </el-col>
  120. </el-row>
  121. </el-col>
  122. <el-col :span="24">
  123. <el-row>
  124. <el-col :span="5">
  125. <el-form-item label="接种情况" prop="isVaccination">
  126. <el-radio-group v-model="queryParams.isVaccination" @change="gywoatwo">
  127. <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
  128. </el-radio-group>
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="5">
  132. <el-form-item label="应种未种" prop="shouldBe">
  133. <el-radio-group v-model="queryParams.shouldBe" style="width: 100%;" :disabled="!shouwestwo">
  134. <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
  135. </el-radio-group>
  136. <!-- <el-input
  137. v-model="queryParams.shouldBe"
  138. placeholder="请输入应种未种
  139. "
  140. clearable
  141. size="small"
  142. @keyup.enter.native="handleQuery"
  143. /> -->
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="5">
  147. <el-form-item label="应续未续" prop="shouldSlow">
  148. <el-radio-group v-model="queryParams.shouldSlow" style="width: 100%;">
  149. <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
  150. </el-radio-group>
  151. <!-- <el-input
  152. v-model="queryParams.shouldBe"
  153. placeholder="请输入应种未种
  154. "
  155. clearable
  156. size="small"
  157. @keyup.enter.native="handleQuery"
  158. /> -->
  159. </el-form-item>
  160. </el-col>
  161. <el-col :span="4" style="text-align: center;">
  162. <el-form-item>
  163. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  164. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  165. </el-form-item>
  166. </el-col>
  167. </el-row>
  168. </el-col>
  169. </el-row>
  170. </el-form>
  171. <el-row :gutter="10" class="mb8">
  172. <el-col :span="1.5"><el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['core:info:add']">新增</el-button></el-col>
  173. <el-col :span="1.5">
  174. <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['core:info:edit']">修改</el-button>
  175. </el-col>
  176. <el-col :span="1.5">
  177. <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['core:info:remove']">删除</el-button>
  178. </el-col>
  179. <el-col :span="1.5">
  180. <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['core:info:export']">导出</el-button>
  181. </el-col>
  182. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  183. </el-row>
  184. <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" height="350">
  185. <el-table-column type="selection" width="55" align="center" />
  186. <el-table-column label="姓名" align="center" prop="userName" fixed />
  187. <el-table-column label="是否完成" align="center" prop="progress" fixed />
  188. <el-table-column label="最后一次的接种时间" align="center" prop="vaccinationTime" width="150" />
  189. <el-table-column label="下次应接时间" align="center" prop="vaccinationTimeNext" width="120"/>
  190. <el-table-column label="联系方式" align="center" prop="phoneNum" />
  191. <!-- <el-table-column label="性别" align="center" prop="gender" /> -->
  192. <el-table-column label="身份证号码" align="center" prop="idCard" width="180" />
  193. <!-- <el-table-column label="现居省份" align="center" prop="province" />
  194. <el-table-column label="现居市" align="center" prop="city" />
  195. <el-table-column label="现居县区" align="center" prop="region" /> -->
  196. <el-table-column label="户籍地址" align="center" prop="domicileSelect" width="250" />
  197. <el-table-column label="居住地址" align="center" prop="nowInSelect" width="250" />
  198. <!-- <el-table-column label="户籍乡镇" align="center" prop="villageTowns" />
  199. <el-table-column label="户籍村居" align="center" prop="village" />
  200. <el-table-column label="户籍村民组" align="center" prop="villagerGroup" /> -->
  201. <!-- <el-table-column label="户主" align="center" prop="houseType" /> -->
  202. <!-- <el-table-column label="重点行业" align="center" prop="keyIndustries" /> -->
  203. <!-- <el-table-column label="接种情况" align="center" prop="isVaccination" /> -->
  204. <!-- <el-table-column label="接种记录" align="center" class-name="small-padding fixed-width">
  205. <template slot-scope="scope">
  206. <el-button size="mini" type="text" @click="chakei(scope.row)">查看</el-button>
  207. </template>
  208. </el-table-column> -->
  209. <!-- v-hasPermi="['core:info:edit']" -->
  210. <!-- <el-table-column
  211. label="应种未种
  212. "
  213. align="center"
  214. prop="shouldBe"
  215. /> -->
  216. <!-- <el-table-column label="工作单位" align="center" prop="other" /> -->
  217. <!-- <el-table-column label="进度" align="center" prop="vaccineInfoUserList[0].progress" /> -->
  218. <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
  219. <!-- <el-table-column label="状态" align="center" prop="status">
  220. <template slot-scope="scope">
  221. <span>{{ scope.row.status==0?'启用' :'停用' }}</span>
  222. </template>
  223. </el-table-column> -->
  224. <!-- <el-table-column label="是否删除" align="center" prop="isDel" /> -->
  225. <el-table-column label="操作" align="left" class-name="small-padding fixed-width" fixed="right" >
  226. <template slot-scope="scope">
  227. <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['core:info:edit']">查看修改</el-button>
  228. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" class="hueya" v-hasPermi="['core:info:remove']">删除</el-button>
  229. </template>
  230. </el-table-column>
  231. </el-table>
  232. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
  233. <!-- 添加或修改疫苗信息对话框 -->
  234. <el-dialog :title="title" :visible.sync="open" width="1240px" append-to-body>
  235. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  236. <el-row>
  237. <el-col :span="8">
  238. <el-form-item label="身份证号" prop="idCard"><el-input v-model="form.idCard" placeholder="请输入身份证号码" @blur="idcde" /></el-form-item>
  239. </el-col>
  240. <el-col :span="8">
  241. <el-form-item label="姓名" prop="userName"><el-input v-model="form.userName" placeholder="请输入姓名" /></el-form-item>
  242. </el-col>
  243. <!-- <el-col :span="6">
  244. <el-form-item label="出生日期" prop="birthday">
  245. <el-date-picker
  246. clearable
  247. v-model="form.birthday"
  248. type="date"
  249. value-format="yyyy-MM-dd"
  250. format="yyyy-MM-dd "
  251. style="width: 100%;"
  252. placeholder="选择出生日期"
  253. ></el-date-picker>
  254. </el-form-item>
  255. </el-col> -->
  256. <el-col :span="8">
  257. <el-form-item label="性别" prop="gender">
  258. <!-- <el-input v-model="form.gender" placeholder="请输入性别" /> -->
  259. <el-select v-model="form.gender" placeholder="性别" clearable style="width: 100%;">
  260. <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  261. </el-select>
  262. </el-form-item>
  263. </el-col>
  264. <el-col :span="24">
  265. <el-row>
  266. <el-col :span="8">
  267. <el-form-item label="联系号码" prop="phoneNum"><el-input v-model="form.phoneNum" placeholder="请输入联系号码" /></el-form-item>
  268. </el-col>
  269. <!-- <el-col :span="6">
  270. <el-form-item label="编号" prop="code"><el-input v-model="form.code" placeholder="请输入编号" /></el-form-item>
  271. </el-col> -->
  272. <el-col :span="8">
  273. <el-form-item label="重点行业" prop="keyIndustries">
  274. <el-select v-model="form.keyIndustries" placeholder="重点行业" clearable style="width: 100%;">
  275. <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  276. </el-select>
  277. </el-form-item>
  278. </el-col>
  279. <el-col :span="8">
  280. <el-form-item label="年龄" prop="age"><el-input v-model="form.age" placeholder="请输入年龄" /></el-form-item>
  281. </el-col>
  282. </el-row>
  283. </el-col>
  284. <el-col :span="12">
  285. <el-form-item label="现居地" prop="region">
  286. <area-select
  287. type="text"
  288. v-model="selected"
  289. :data="$pcaa"
  290. :level="2"
  291. style="display: flex;line-height: 18px;"
  292. @change="onSelected"
  293. @blur="dakousr"
  294. class="hues"
  295. ></area-select>
  296. </el-form-item>
  297. </el-col>
  298. <el-col :span="12">
  299. <el-form-item label="详细地址" prop="nowIn"><el-input v-model="form.nowIn" type="input" placeholder="请输入内容" /></el-form-item>
  300. </el-col>
  301. <el-col :span="24">
  302. <el-row>
  303. <el-col :span="12">
  304. <el-form-item label="户籍地址" prop="villagerGroup">
  305. <!-- <el-input v-model="form.villageTowns" type="textarea" placeholder="请输入内容" /> -->
  306. <!-- <treeselect v-model="form.parentId" :options="deptOptionstwo" :normalizer="normalizer" :flat="true" :maxHeight="150" @select="djieskle" :multiple=true placeholder="点击选择户籍地" /> -->
  307. <el-cascader
  308. placeholder="点击选择户籍地址"
  309. :options="options"
  310. :filterable="true"
  311. @change="chahe"
  312. v-model="villageTownshy"
  313. :props="optionProps"
  314. style="width: 100%;"
  315. ></el-cascader>
  316. </el-form-item>
  317. </el-col>
  318. <el-col :span="12">
  319. <el-form-item label="详细地址" prop="domicile"><el-input v-model="form.domicile" type="input" placeholder="请输入户籍详细地址" /></el-form-item>
  320. </el-col>
  321. </el-row>
  322. </el-col>
  323. <el-col :span="12">
  324. <el-form-item label="工作单位" prop="work_unit"><el-input v-model="form.workUnit" placeholder="请输入工作单位" /></el-form-item>
  325. </el-col>
  326. <el-col :span="12">
  327. <el-form-item label="备注" prop="remark"><el-input v-model="form.remark" placeholder="请输入备注" /></el-form-item>
  328. </el-col>
  329. <!-- <el-col :span="12">
  330. <el-form-item label="人群分类" prop="crowd_classification"><el-input v-model="form.crowd_classification" placeholder="请输入人群分类" /></el-form-item>
  331. </el-col> -->
  332. <el-col :span="12">
  333. <el-form-item label="户主" prop="houseType">
  334. <!-- <el-select v-model="form.houseType" placeholder="请选择户别"><el-option label="请选择字典生成" value="" /></el-select> -->
  335. <!-- <el-input v-model="form.houseType" placeholder="请输入内容" /> -->
  336. <el-select v-model="form.houseType" placeholder="户主" clearable style="width: 100%;">
  337. <el-option v-for="dict in typeOptionshuuj" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  338. </el-select>
  339. </el-form-item>
  340. </el-col>
  341. <el-col :span="24">
  342. <el-row>
  343. <el-col :span="5.5">
  344. <el-form-item label="接种情况" prop="isVaccination">
  345. <!-- <el-input v-model="form.isVaccination" placeholder="请输入接种情况" /> -->
  346. <el-radio-group v-model="form.isVaccination" @change="gywoa">
  347. <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
  348. </el-radio-group>
  349. </el-form-item>
  350. </el-col>
  351. <!-- <el-col :span="3">
  352. <el-form-item label="应种未种" prop="shouldBe">
  353. <el-checkbox :disabled="shouwes" v-model="form.shouldBe" true-label="是" false-label="否"></el-checkbox>
  354. </el-form-item>
  355. </el-col> -->
  356. <!-- <el-col :span="5">
  357. <el-form-item label="应续未续" prop="shouldSlow">
  358. <el-checkbox v-model="form.shouldSlow" true-label="是" false-label="否"></el-checkbox>
  359. </el-form-item>
  360. </el-col> -->
  361. </el-row>
  362. </el-col>
  363. <el-col :span="24" style="height: 40px;"><el-form-item label="接种记录 :" prop="shouldBe"></el-form-item></el-col>
  364. <el-col :span="24" v-for="(item, index) in form.vaccineInfoUserList" :key="index">
  365. <el-row type="flex">
  366. <!-- <el-col :span="4"> -->
  367. <el-form-item label="疫苗名称" class="iejghiadh">
  368. <el-select v-model="item.vaccineName" placeholder="疫苗名称" style="width:123px" clearable :disabled="naneme" @change="changeheu(index)">
  369. <el-option
  370. v-for="dict in typeOptionsname"
  371. :key="dict.dictValue"
  372. :label="dict.dictLabel"
  373. :value="{ value: dict.dictValue, label: dict.dictLabel }"
  374. />
  375. </el-select>
  376. </el-form-item>
  377. <!-- </el-col> -->
  378. <!-- <el-col :span="4" class="oiuyty"> -->
  379. <el-form-item label="接种时间" class="oiuyty">
  380. <el-date-picker
  381. clearable
  382. v-model="item.vaccinationTime"
  383. type="datetime"
  384. value-format="yyyy-MM-dd HH:mm:ss"
  385. format="yyyy-MM-dd HH:mm:ss"
  386. placeholder="选择接种时间"
  387. style="width: 167px;"
  388. :disabled="naneme"
  389. ></el-date-picker>
  390. </el-form-item>
  391. <!-- </el-col> -->
  392. <el-col :span="4" class="ijeuhdy">
  393. <el-form-item label="接种地点" >
  394. <el-select :disabled="naneme" v-model="item.vaccinationPlace" placeholder="接种地点" clearable size="small" style="100%">
  395. <el-option v-for="dict in typeOptionsvaccinatio" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
  396. <!-- dict.dictValue -->
  397. </el-select>
  398. </el-form-item>
  399. </el-col>
  400. <!-- <el-col :span="3"> -->
  401. <el-form-item label="剂次" class="jhy">
  402. <!-- <el-input v-model="form.jici" placeholder="请输入剂次" /> -->
  403. <el-select @change="changeheujici(index)" v-model="item.jici" placeholder="剂次" clearable style="width:75px" :disabled="naneme" >
  404. <el-option
  405. v-for="dict in typeOptionstimes"
  406. :key="dict.dictValue"
  407. :label="dict.dictLabel"
  408. :value="{ value: dict.dictValue, label: dict.dictLabel }"
  409. />
  410. </el-select>
  411. </el-form-item>
  412. <!-- </el-col> -->
  413. <el-col style="width: 135px;">
  414. <el-form-item label="进度" class="jhy">
  415. <el-select v-model="item.progress" placeholder="进度" clearable style="width:100%" :disabled="naneme">
  416. <el-option v-for="dict in statusOptionstue" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
  417. </el-select>
  418. </el-form-item>
  419. </el-col>
  420. <el-col :span="3">
  421. <el-form-item class="jdueuh">
  422. <div class="jdidur jdoier">
  423. <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
  424. <el-upload
  425. :disabled="naneme"
  426. class="upload-demo"
  427. :headers="{ Authorization: 'Bearer ' + getToken() }"
  428. :action="process + '/boman-file/upload'"
  429. :on-change="handleChangertwo"
  430. :on-success="upImageFntwo"
  431. :on-error="errtwo"
  432. :on-remove="reseImagetwo"
  433. :file-list="item.url == '' ? item.url : JSON.parse(item.url)"
  434. :on-preview="handlePictureCardPreviewtwo"
  435. :before-upload="beforstwo"
  436. >
  437. <el-button size="small" type="primary">附件上传</el-button>
  438. </el-upload>
  439. </el-tooltip>
  440. <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
  441. <div class="hyeoa">
  442. <el-tooltip class="item" effect="dark" content="新增疫苗信息,请慎重操作" placement="top-start">
  443. <img src="../../../assets/images/icon_tc_add.png" alt="" class="hueyde" @click="tijea(index)" />
  444. </el-tooltip>
  445. <el-tooltip class="item" effect="dark" content="删除无法恢复,请慎重操作" placement="top-start">
  446. <img src="../../../assets/images/delei.png" alt="" class="hueydele" @click="naeyrfakjf(index, item)" />
  447. </el-tooltip>
  448. </div>
  449. </div>
  450. </el-form-item>
  451. </el-col>
  452. <!-- <el-col :span="2" class="hjdoecdre"> -->
  453. <!-- </el-col> -->
  454. </el-row>
  455. </el-col>
  456. <el-col :span="24">
  457. <el-row>
  458. <el-col :span="7" style="width: 360px;">
  459. <el-row>
  460. <el-col :span="16">
  461. <el-form-item label="禁忌症" prop="contraindication" class="ehiqya">
  462. <el-select :disabled="shouwes" v-model="form.contraindication" placeholder="禁忌症" clearable size="small" style="width: 100%;">
  463. <el-option v-for="dict in typeOptionscont" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  464. </el-select>
  465. </el-form-item>
  466. </el-col>
  467. <el-col :span="6" style="margin-left: 10px;">
  468. <div class="jdidur">
  469. <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
  470. <el-upload
  471. :disabled="shouwes"
  472. class="upload-demo"
  473. :headers="{ Authorization: 'Bearer ' + getToken() }"
  474. :action="process + '/boman-file/upload'"
  475. :on-change="handleChangert"
  476. :on-success="upImageFn"
  477. :on-error="err"
  478. :on-remove="reseImage"
  479. :file-list="config"
  480. :on-preview="handlePictureCardPreview"
  481. :before-upload="befors"
  482. >
  483. <el-button size="small" type="primary">附件上传</el-button>
  484. </el-upload>
  485. </el-tooltip>
  486. <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
  487. </div>
  488. </el-col>
  489. </el-row>
  490. </el-col>
  491. <el-col :span="9">
  492. <el-row>
  493. <el-col :span="18" class="znshu">
  494. <el-form-item label="暂缓接种" prop="suspend">
  495. <!-- <el-input
  496. v-model="form.suspend"
  497. placeholder="请输入暂缓"
  498. /> -->
  499. <el-select :disabled="shouwes" v-model="form.suspend" placeholder="暂缓接种" clearable size="small" style="width: 100%;">
  500. <el-option v-for="dict in typeOptionstyzandeh" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
  501. <!-- dict.dictValue -->
  502. </el-select>
  503. </el-form-item>
  504. </el-col>
  505. <el-col :span="5" style="margin-left: 10px;">
  506. <div class="jdidur">
  507. <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
  508. <el-upload
  509. :disabled="shouwes"
  510. class="upload-demo"
  511. :headers="{ Authorization: 'Bearer ' + getToken() }"
  512. :action="process + '/boman-file/upload'"
  513. :on-change="handleChangerther"
  514. :on-success="upImageFnther"
  515. :on-error="err"
  516. :on-remove="reseImagether"
  517. :file-list="configther"
  518. :on-preview="handlePictureCardPreviewther"
  519. :before-upload="beforsther"
  520. >
  521. <el-button size="small" type="primary">附件上传</el-button>
  522. </el-upload>
  523. </el-tooltip>
  524. <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
  525. </div>
  526. </el-col>
  527. </el-row>
  528. </el-col>
  529. <el-col :span="7">
  530. <el-row>
  531. <el-col :span="12" class="heioangd">
  532. <el-form-item label="其他" prop="other" class="ehiqya">
  533. <el-select :disabled="shouwes" v-model="form.other" placeholder="其他" clearable size="small" style="width: 100%;">
  534. <el-option v-for="dict in typeOptionscontqit" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel"/>
  535. <!-- dictValue -->
  536. </el-select>
  537. </el-form-item>
  538. </el-col>
  539. <el-col :span="8" style="margin-left: 10px;">
  540. <div class="jdidur">
  541. <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
  542. <el-upload
  543. :disabled="shouwes"
  544. class="upload-demo"
  545. :headers="{ Authorization: 'Bearer ' + getToken() }"
  546. :action="process + '/boman-file/upload'"
  547. :on-change="handleChangerfor"
  548. :on-success="upImageFnfor"
  549. :on-error="errfor"
  550. :on-remove="reseImagefor"
  551. :file-list="configfor"
  552. :on-preview="handlePictureCardPreviewfor"
  553. :before-upload="beforsfor"
  554. >
  555. <el-button size="small" type="primary">附件上传</el-button>
  556. </el-upload>
  557. </el-tooltip>
  558. <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
  559. </div>
  560. </el-col>
  561. </el-row>
  562. </el-col>
  563. </el-row>
  564. </el-col>
  565. </el-row>
  566. </el-form>
  567. <div slot="footer" class="dialog-footer">
  568. <el-button type="primary" @click="submitForm">确 定</el-button>
  569. <el-button @click="cancel">取 消</el-button>
  570. </div>
  571. </el-dialog>
  572. <!-- 图片预览 -->
  573. <el-dialog :close-on-click-modal="false" title="预览" :visible.sync="imashow" width="1200px" append-to-body>
  574. <div class="demo-image__preview">
  575. <img :src="dialogImageUrl" alt="" style="width: 100%;" />
  576. <!-- <iframe v-if="shouewhu" :src="dialogImageUrl" frameborder="0" style="width: 100%; height: 100vh;"></iframe>
  577. <a v-if="exelshow" :href="dialogImageUrl" :download="dialogImageUrlname" >{{dialogImageUrlname}} <span style="color: #039BE5;">点击下载</span></a> -->
  578. </div>
  579. </el-dialog>
  580. <!-- 接种记录 -->
  581. <el-dialog :close-on-click-modal="false" title="接种记录" :visible.sync="jiezhong" width="1200px" append-to-body class="ojhgy">
  582. <el-table :data="jiezheList" stripe style="width: 100%">
  583. <el-table-column label="疫苗名称" align="center" prop="vaccineName" />
  584. <el-table-column label="剂次" align="center" prop="jici" />
  585. <el-table-column label="接种时间" align="center" prop="vaccinationTime" width="180">
  586. <template slot-scope="scope">
  587. <span>{{ scope.row.vaccinationTime }}</span>
  588. </template>
  589. </el-table-column>
  590. <el-table-column label="接种地点" align="center" prop=".vaccinationPlace" />
  591. </el-table>
  592. </el-dialog>
  593. </div>
  594. </template>
  595. <script>
  596. import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe } from '@/api/system/time';
  597. import { treeselect } from '@/api/system/dept';
  598. import Treeselect from '@riophae/vue-treeselect';
  599. import { getToken } from '@/utils/auth';
  600. import '@riophae/vue-treeselect/dist/vue-treeselect.css';
  601. export default {
  602. name: 'Info',
  603. components: { Treeselect },
  604. data() {
  605. return {
  606. // 遮罩层
  607. loading: true,
  608. // 选中数组
  609. ids: [],
  610. // 非单个禁用
  611. single: true,
  612. // 非多个禁用
  613. multiple: true,
  614. // 显示搜索条件
  615. showSearch: true,
  616. // 总条数
  617. total: 0,
  618. // 疫苗信息表格数据
  619. infoList: [],
  620. dialogImageUrl: '',
  621. // 弹出层标题
  622. title: '',
  623. // 是否显示弹出层
  624. open: false,
  625. process: process.env.VUE_APP_BASE_API,
  626. // 查询参数
  627. queryParams: {
  628. pageNum: 1,
  629. pageSize: 10,
  630. villageTowns: null,
  631. village: null,
  632. villagerGroup: null,
  633. houseType: null,
  634. domicile: null,
  635. province: null,
  636. city: null,
  637. region: null,
  638. userName: null,
  639. gender: null,
  640. idCard: null,
  641. phoneNum: null,
  642. keyIndustries: null,
  643. isVaccination: null,
  644. vaccineName: null,
  645. jici: null,
  646. vaccinationTime: null,
  647. vaccinationPlace: null,
  648. contraindication: null,
  649. suspend: null,
  650. death: null,
  651. lostInMissing: null,
  652. shouldBe: null,
  653. other: null,
  654. progress: null,
  655. status: null,
  656. isDel: null,
  657. params:{
  658. age:''
  659. }
  660. },
  661. config: [],
  662. comfietg:[],
  663. configther:[],
  664. configfor:[],
  665. // 表单参数
  666. form: {
  667. nowIn: '',
  668. age:'',
  669. vaccineInfoUserList: [
  670. {
  671. vaccineName: '',
  672. vaccinationTime: '',
  673. vaccinationPlace: '',
  674. jici: '',
  675. progress: '',
  676. url:''
  677. }
  678. ]
  679. },
  680. // 表单校验
  681. rules: {
  682. region: [{ required: true, message: '区不能为空', trigger: 'blur' }],
  683. idCard: [{ required: true, message: '身份证号码不能为空', trigger: 'blur' }],
  684. userName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }]
  685. },
  686. selected: ['安徽省', '安庆市', '潜山市'],
  687. selectedtwo: ['安徽省', '安庆市', '潜山市'],
  688. statusOptions: [
  689. {
  690. dictValue: '女',
  691. dictLabel: '女'
  692. },
  693. {
  694. dictValue: '男',
  695. dictLabel: '男'
  696. }
  697. ],
  698. statusOptionstue: [
  699. {
  700. dictValue: '已完成',
  701. dictLabel: '已完成'
  702. },
  703. {
  704. dictValue: '未完成',
  705. dictLabel: '未完成'
  706. }
  707. ],
  708. typeOptionshuuj: [
  709. {
  710. dictValue: '是',
  711. dictLabel: '是'
  712. },
  713. {
  714. dictValue: '否',
  715. dictLabel: '否'
  716. }
  717. ],
  718. deptOptionstwo: [],
  719. options: [],
  720. optionProps: {
  721. value: 'label',
  722. label: 'label',
  723. children: 'children',
  724. checkStrictly: true
  725. },
  726. heuiq: [],
  727. typeOptions: [],
  728. typeOptionsty: [
  729. {
  730. dictValue: '是',
  731. dictLabel: '是'
  732. },
  733. {
  734. dictValue: '否',
  735. dictLabel: '否'
  736. }
  737. ],
  738. typeOptionstyzandeh:[],
  739. angesList: [
  740. ],
  741. typeOptionsname: [],
  742. typeOptionstimes: [],
  743. typeOptionsvaccinatio: [],
  744. typeOptionscont: [],
  745. typeOptionscontty: [],
  746. typeOptionscontqit:[],
  747. // 剂次
  748. typeOptionstimesgt: [
  749. {
  750. dictValue: '1',
  751. dictLabel: '1'
  752. },
  753. {
  754. dictValue: '2',
  755. dictLabel: '2'
  756. },
  757. {
  758. dictValue: '3',
  759. dictLabel: '3'
  760. },
  761. {
  762. dictValue: '4',
  763. dictLabel: '加强针'
  764. }
  765. ],
  766. imashow: false,
  767. naneme: false,
  768. shouwes: false,
  769. shouwestwo:false,
  770. villageTownshy: undefined,
  771. naiseurya: '',
  772. hsuej: '',
  773. jdourdjoaj: false,
  774. jiezhong: false,
  775. jiezheList: [],
  776. fireLise:{config:[]},
  777. nameutaiL:0
  778. };
  779. },
  780. created() {
  781. this.getList();
  782. this.getTreeselectjue();
  783. // 重点行业
  784. this.getDicts('key_trades').then(response => {
  785. this.typeOptions = response.data;
  786. });
  787. // 疫苗名称
  788. this.getDicts('vaccine_name').then(response => {
  789. this.typeOptionsname = response.data;
  790. });
  791. // 接种地点
  792. this.getDicts('vaccination_site').then(response => {
  793. this.typeOptionsvaccinatio = response.data;
  794. });
  795. // 暂缓接种
  796. this.getDicts('moratorium_on_vaccination').then(response => {
  797. this.typeOptionstyzandeh = response.data;
  798. });
  799. // typeOptionscontty
  800. // 禁忌症
  801. this.getDicts('contraindication').then(response => {
  802. this.typeOptionscont = response.data;
  803. });
  804. // 其他 typeOptionscontqit
  805. this.getDicts('other_status').then(response => {
  806. this.typeOptionscontqit = response.data;
  807. });
  808. // 年龄阶段
  809. this.getDicts('age_interval').then(response => {
  810. this.angesList = response.data;
  811. });
  812. this.form.province = this.selected[0];
  813. this.form.city = this.selected[1];
  814. this.form.region = this.selected[2];
  815. this.queryParams.province = this.selectedtwo[0];
  816. this.queryParams.city = this.selectedtwo[1];
  817. this.queryParams.region = this.selectedtwo[2];
  818. // this.naiseurya = this.form.province + this.form.city + this.form.region;
  819. },
  820. methods: {
  821. onSelected(data) {
  822. console.log(data, 125);
  823. // province
  824. this.form.province = data[0];
  825. this.form.city = data[1];
  826. this.form.region = data[2];
  827. this.naiseurya = this.form.province + this.form.city + this.form.region;
  828. if (this.jdourdjoaj == false) {
  829. // 修改
  830. this.form.nowIn = '';
  831. }
  832. // this.form.nowIn = undefined
  833. // this.form.villageTowns = data[3]
  834. },
  835. dakousr() {
  836. console.log(2345);
  837. },
  838. onSelectedtwo(data) {
  839. console.log(data);
  840. // province
  841. this.queryParams.province = data[0];
  842. this.queryParams.city = data[1];
  843. this.queryParams.region = data[2];
  844. // this.queryParams.villageTowns = data[3]
  845. },
  846. /** 查询疫苗信息列表 */
  847. getList() {
  848. this.loading = true;
  849. listInfo(this.queryParams).then(response => {
  850. this.infoList = response.rows;
  851. this.total = response.total;
  852. this.loading = false;
  853. });
  854. },
  855. getToken() {
  856. return getToken();
  857. },
  858. getTreeselectjue() {
  859. this.loading = true;
  860. listRoleer(this.queryParams).then(response => {
  861. this.options = response.data;
  862. this.loading = false;
  863. });
  864. },
  865. /** 转换角色数据结构 */
  866. normalizer(node) {
  867. // if (node.children && !node.children.length) {
  868. // delete node.children;
  869. // }
  870. return {
  871. id: node.id,
  872. label: node.roleName
  873. };
  874. },
  875. // 点击组/角色
  876. djieskle(node, instanceId) {
  877. // this.personnel(node.id);
  878. console.log(node, instanceId);
  879. },
  880. // 身份证
  881. idcde(event) {
  882. console.log(event);
  883. // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
  884. let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  885. if (reg.test(this.form.idCard)) {
  886. this.idea();
  887. // this.go(this.form.idCard.length);
  888. // callback()
  889. } else {
  890. // callback(new Error('身份证号码不正确'))
  891. this.msgInfo('身份证号码不正确');
  892. }
  893. },
  894. // 实现自动生成生日,性别,年龄
  895. go(val) {
  896. let iden = this.form.idCard;
  897. let sex = null;
  898. let birth = null;
  899. let birthr = '';
  900. let myDate = new Date();
  901. let month = myDate.getMonth() + 1;
  902. let day = myDate.getDate();
  903. let age = 0;
  904. if (val === 18) {
  905. age = myDate.getFullYear() - iden.substring(6, 10) - 1;
  906. sex = iden.substring(16, 17);
  907. birth = iden.substring(6, 10) + '-' + iden.substring(10, 12) + '-' + iden.substring(12, 14);
  908. if (iden.substring(10, 12) < month || (iden.substring(10, 12) == month && iden.substring(12, 14) <= day)) age++;
  909. }
  910. if (val === 15) {
  911. age = myDate.getFullYear() - iden.substring(6, 8) - 1901;
  912. sex = iden.substring(13, 14);
  913. birth = '19' + iden.substring(6, 8) + '-' + iden.substring(8, 10) + '-' + iden.substring(10, 12);
  914. if (iden.substring(8, 10) < month || (iden.substring(8, 10) == month && iden.substring(10, 12) <= day)) age++;
  915. }
  916. if (sex % 2 === 0) sex = '女';
  917. else sex = '男';
  918. this.form.gender = sex;
  919. // this.baseInfo.age = age;
  920. birthr = birth + '';
  921. console.log(birthr);
  922. // this.form.birthday = birthr;
  923. // this.$set(this.form.birthday, birthr)
  924. // this.baseInfo.birthplace = this.area[iden.substring(0,2)];
  925. },
  926. // 请求身份证数据
  927. idea() {
  928. idces({ idCard: this.form.idCard }).then(response => {
  929. console.log(response);
  930. this.form.gender = response.data.gender;
  931. // this.form.birthday = response.data.birthday;
  932. this.form.age = response.data.age
  933. if (response.data.userName == null) {
  934. this.form.userName = undefined;
  935. } else {
  936. this.form.userName = response.data.userName;
  937. }
  938. });
  939. },
  940. // 取消按钮
  941. cancel() {
  942. this.open = false;
  943. this.jiezhong = false;
  944. this.imashow = false;
  945. this.reset();
  946. },
  947. gywoa() {
  948. console.log(this.form.isVaccination);
  949. if (this.form.isVaccination !== null) {
  950. if (this.form.isVaccination == '是') {
  951. // 接种疫苗
  952. (this.naneme = false), (this.shouwes = true);
  953. } else {
  954. (this.naneme = true), (this.shouwes = false);
  955. }
  956. }
  957. },
  958. gywoatwo() {
  959. console.log(this.queryParams.isVaccination);
  960. if (this.queryParams.isVaccination !== null) {
  961. if (this.queryParams.isVaccination == '是') {
  962. // 接种疫苗
  963. // (this.naneme = false), (this.shouwes = true);
  964. this.shouwestwo = false
  965. } else {
  966. // (this.naneme = true), (this.shouwes = false);
  967. this.shouwestwo = true
  968. }
  969. }
  970. },
  971. // 上传前控制
  972. befors(res, file) {
  973. console.log(res, file);
  974. console.log(res.name.substr(0, res.name.length - 4));
  975. // if(res.type !== 'application/pdf'){
  976. // this.msgSuccess('只能上传pdf文件');
  977. // return false
  978. // }else{
  979. // return true
  980. // }
  981. return true;
  982. },
  983. // 图片预览
  984. handlePictureCardPreview(file) {
  985. console.log(file, 87);
  986. console.log(file.name.split('.'));
  987. let hegs = file.name.split('.');
  988. console.log(hegs[hegs.length - 1]);
  989. if (hegs[hegs.length - 1] == 'pdf') {
  990. this.shouewhu = true;
  991. } else {
  992. if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
  993. this.shouewhu = false;
  994. this.exelshow = false;
  995. } else {
  996. this.exelshow = true;
  997. }
  998. }
  999. console.log(this.shouewhu, this.exelshow);
  1000. this.dialogImageUrl = file.url;
  1001. this.dialogImageUrlname = file.name;
  1002. console.log(this.dialogImageUrlname);
  1003. this.dialogVisible = true;
  1004. this.imashow = true;
  1005. },
  1006. // 上传文件
  1007. handleChangert(file, fileList) {
  1008. this.fileList = fileList.slice(-3);
  1009. },
  1010. upImageFn(res, file) {
  1011. if (res.code !== 200) {
  1012. this.msgSuccess('上传失败');
  1013. return false;
  1014. } else {
  1015. this.msgSuccess('上传成功');
  1016. this.config.push(res.data);
  1017. this.config.filter( router=> {
  1018. router.name = '禁忌症附件'
  1019. })
  1020. console.log(res.data);
  1021. console.log(res.data.name.substr(0, res.data.name.length - 4));
  1022. this.form.url = this.config;
  1023. this.form.url = JSON.stringify(this.form.url);
  1024. }
  1025. // querjtgoe.message_title
  1026. console.log(res);
  1027. console.log(res.data.name.substr(-4));
  1028. },
  1029. err() {
  1030. this.msgSuccess('上传失败');
  1031. console.log(35);
  1032. },
  1033. reseImage(file, fileList) {
  1034. let urls = '';
  1035. if (file.response) {
  1036. urls = file.response.url;
  1037. } else {
  1038. urls = file.url;
  1039. }
  1040. for (let i = this.config.length - 1; i >= 0; i--) {
  1041. if (this.config[i].url == urls) {
  1042. this.config.splice(i, 1);
  1043. }
  1044. }
  1045. if (this.config.length == 0) {
  1046. this.form.url = undefined;
  1047. } else {
  1048. this.form.url = JSON.stringify(this.config);
  1049. }
  1050. },
  1051. // 上传前控制
  1052. beforstwo(res, file) {
  1053. console.log(res, file);
  1054. // console.log(res.name.substr(0, res.name.length - 4));
  1055. // if(res.type !== 'application/pdf'){
  1056. // this.msgSuccess('只能上传pdf文件');
  1057. // return false
  1058. // }else{
  1059. // return true
  1060. // }
  1061. return true;
  1062. },
  1063. // 图片预览
  1064. handlePictureCardPreviewtwo(file) {
  1065. console.log(file, 87);
  1066. console.log(file.name.split('.'));
  1067. let hegs = file.name.split('.');
  1068. console.log(hegs[hegs.length - 1]);
  1069. if (hegs[hegs.length - 1] == 'pdf') {
  1070. this.shouewhu = true;
  1071. } else {
  1072. if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
  1073. this.shouewhu = false;
  1074. this.exelshow = false;
  1075. } else {
  1076. this.exelshow = true;
  1077. }
  1078. }
  1079. console.log(this.shouewhu, this.exelshow);
  1080. this.dialogImageUrl = file.url;
  1081. this.dialogImageUrlname = file.name;
  1082. console.log(this.dialogImageUrlname);
  1083. this.dialogVisible = true;
  1084. this.imashow = true;
  1085. },
  1086. // 上传文件
  1087. handleChangertwo(file, fileList) {
  1088. // this.fileList = fileList.slice(-3);
  1089. },
  1090. upImageFntwo(res, file) {
  1091. this.comfietg = []
  1092. if (res.code !== 200) {
  1093. this.msgSuccess('上传失败');
  1094. return false;
  1095. } else {
  1096. this.msgSuccess('上传成功');
  1097. this.comfietg.push(res.data);
  1098. this.comfietg.filter( router=> {
  1099. router.name = '附件'
  1100. })
  1101. console.log(this.comfietg);
  1102. console.log(res.data.name.substr(0, res.data.name.length - 4));
  1103. console.log(this.nameutaiL)
  1104. this.form.vaccineInfoUserList[this.nameutaiL].url = this.comfietg
  1105. // this.form.url = this.config;
  1106. this.form.vaccineInfoUserList[this.nameutaiL].url = JSON.stringify(this.form.vaccineInfoUserList[this.nameutaiL].url);
  1107. }
  1108. // querjtgoe.message_title
  1109. console.log(this.form.vaccineInfoUserList[this.nameutaiL].url);
  1110. console.log(res.data.name.substr(-4));
  1111. },
  1112. errtwo() {
  1113. this.msgInfo('上传失败');
  1114. console.log(35);
  1115. },
  1116. reseImagetwo(file, fileList) {
  1117. let urls = '';
  1118. if (file.response) {
  1119. urls = file.response.url;
  1120. } else {
  1121. urls = file.url;
  1122. }
  1123. for (let i = this.config.length - 1; i >= 0; i--) {
  1124. if (this.comfietg[i].url == urls) {
  1125. this.comfietg.splice(i, 1);
  1126. }
  1127. }
  1128. if (this.comfietg.length == 0) {
  1129. this.form.vaccineInfoUserList[this.nameutaiL].url = [];
  1130. } else {
  1131. this.form.vaccineInfoUserList[this.nameutaiL].url = JSON.stringify(this.form.vaccineInfoUserList[this.nameutaiL].url);
  1132. }
  1133. },
  1134. // 暂缓
  1135. // 上传前控制
  1136. beforsther(res, file) {
  1137. console.log(res, file);
  1138. // console.log(res.name.substr(0, res.name.length - 4));
  1139. // if(res.type !== 'application/pdf'){
  1140. // this.msgSuccess('只能上传pdf文件');
  1141. // return false
  1142. // }else{
  1143. // return true
  1144. // }
  1145. return true;
  1146. },
  1147. // 图片预览
  1148. handlePictureCardPreviewther(file) {
  1149. console.log(file, 87);
  1150. console.log(file.name.split('.'));
  1151. let hegs = file.name.split('.');
  1152. console.log(hegs[hegs.length - 1]);
  1153. if (hegs[hegs.length - 1] == 'pdf') {
  1154. this.shouewhu = true;
  1155. } else {
  1156. if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
  1157. this.shouewhu = false;
  1158. this.exelshow = false;
  1159. } else {
  1160. this.exelshow = true;
  1161. }
  1162. }
  1163. console.log(this.shouewhu, this.exelshow);
  1164. this.dialogImageUrl = file.url;
  1165. this.dialogImageUrlname = file.name;
  1166. console.log(this.dialogImageUrlname);
  1167. this.dialogVisible = true;
  1168. this.imashow = true;
  1169. },
  1170. // 上传文件
  1171. handleChangerther(file, fileList) {
  1172. // this.fileList = fileList.slice(-3);
  1173. },
  1174. upImageFnther(res, file) {
  1175. this.configther = []
  1176. if (res.code !== 200) {
  1177. this.msgSuccess('上传失败');
  1178. return false;
  1179. } else {
  1180. this.msgSuccess('上传成功');
  1181. this.configther.push(res.data);
  1182. this.configther.filter( router=> {
  1183. router.name = '暂缓附件'
  1184. })
  1185. console.log(this.configther);
  1186. console.log(res.data.name.substr(0, res.data.name.length - 4));
  1187. console.log(this.nameutaiL)
  1188. this.form.suspendUrl = this.configther
  1189. // this.form.url = this.config;
  1190. this.form.suspendUrl = JSON.stringify(this.form.suspendUrl);
  1191. }
  1192. // querjtgoe.message_title
  1193. console.log(this.form.suspendUrl);
  1194. console.log(res.data.name.substr(-4));
  1195. },
  1196. errther() {
  1197. this.msgInfo('上传失败');
  1198. console.log(35);
  1199. },
  1200. reseImagether(file, fileList) {
  1201. let urls = '';
  1202. if (file.response) {
  1203. urls = file.response.url;
  1204. } else {
  1205. urls = file.url;
  1206. }
  1207. for (let i = this.config.length - 1; i >= 0; i--) {
  1208. if (this.comfietg[i].url == urls) {
  1209. this.comfietg.splice(i, 1);
  1210. }
  1211. }
  1212. if (this.comfietg.length == 0) {
  1213. this.form.suspendUrl = undefined
  1214. } else {
  1215. this.form.suspendUrl = JSON.stringify(this.form.suspendUrl);
  1216. }
  1217. },
  1218. // 其他
  1219. // 上传前控制
  1220. beforsfor(res, file) {
  1221. console.log(res, file);
  1222. // console.log(res.name.substr(0, res.name.length - 4));
  1223. // if(res.type !== 'application/pdf'){
  1224. // this.msgSuccess('只能上传pdf文件');
  1225. // return false
  1226. // }else{
  1227. // return true
  1228. // }
  1229. return true;
  1230. },
  1231. // 图片预览
  1232. handlePictureCardPreviewfor(file) {
  1233. console.log(file, 87);
  1234. console.log(file.name.split('.'));
  1235. let hegs = file.name.split('.');
  1236. console.log(hegs[hegs.length - 1]);
  1237. if (hegs[hegs.length - 1] == 'pdf') {
  1238. this.shouewhu = true;
  1239. } else {
  1240. if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
  1241. this.shouewhu = false;
  1242. this.exelshow = false;
  1243. } else {
  1244. this.exelshow = true;
  1245. }
  1246. }
  1247. console.log(this.shouewhu, this.exelshow);
  1248. this.dialogImageUrl = file.url;
  1249. this.dialogImageUrlname = file.name;
  1250. console.log(this.dialogImageUrlname);
  1251. this.dialogVisible = true;
  1252. this.imashow = true;
  1253. },
  1254. // 上传文件
  1255. handleChangerfor(file, fileList) {
  1256. // this.fileList = fileList.slice(-3);
  1257. },
  1258. upImageFnfor(res, file) {
  1259. this.configfor = []
  1260. if (res.code !== 200) {
  1261. this.msgInfo('上传失败');
  1262. return false;
  1263. } else {
  1264. this.msgSuccess('上传成功');
  1265. this.configfor.push(res.data);
  1266. this.configfor.filter( router=> {
  1267. router.name = '其他附件'
  1268. })
  1269. console.log(this.configfor);
  1270. console.log(res.data.name.substr(0, res.data.name.length - 4));
  1271. console.log(this.nameutaiL)
  1272. this.form.otherUrl = this.configfor
  1273. // this.form.url = this.config;
  1274. this.form.otherUrl = JSON.stringify(this.form.otherUrl);
  1275. }
  1276. // querjtgoe.message_title
  1277. console.log(this.form.otherUrl);
  1278. console.log(res.data.name.substr(-4));
  1279. },
  1280. errfor() {
  1281. this.msgInfo('上传失败');
  1282. console.log(35);
  1283. },
  1284. reseImagefor(file, fileList) {
  1285. let urls = '';
  1286. if (file.response) {
  1287. urls = file.response.url;
  1288. } else {
  1289. urls = file.url;
  1290. }
  1291. for (let i = this.config.length - 1; i >= 0; i--) {
  1292. if (this.configfor[i].url == urls) {
  1293. this.configfor.splice(i, 1);
  1294. }
  1295. }
  1296. if (this.configfor.length == 0) {
  1297. this.form.otherUrl = undefined
  1298. } else {
  1299. this.form.otherUrl = JSON.stringify(this.form.otherUrl);
  1300. }
  1301. },
  1302. // 表单重置
  1303. reset() {
  1304. this.form = {
  1305. id: null,
  1306. villageTowns: null,
  1307. village: null,
  1308. age:'',
  1309. villagerGroup: null,
  1310. houseType: null,
  1311. domicile: null,
  1312. province: null,
  1313. city: null,
  1314. region: null,
  1315. userName: null,
  1316. gender: null,
  1317. idCard: null,
  1318. phoneNum: null,
  1319. keyIndustries: null,
  1320. isVaccination: null,
  1321. vaccinationPlace: null,
  1322. contraindication: null,
  1323. suspend: null,
  1324. death: null,
  1325. lostInMissing: null,
  1326. shouldBe: null,
  1327. other: null,
  1328. nowIn: '',
  1329. remark: null,
  1330. status: '0',
  1331. createBy: null,
  1332. createTime: null,
  1333. updateBy: null,
  1334. updateTime: null,
  1335. isDel: null,
  1336. vaccineInfoUserList: [
  1337. {
  1338. vaccineName: '',
  1339. vaccinationTime: '',
  1340. vaccinationPlace: '',
  1341. jici: '',
  1342. progress: '',
  1343. url:[]
  1344. }
  1345. ]
  1346. };
  1347. this.resetForm('form');
  1348. },
  1349. /** 搜索按钮操作 */
  1350. handleQuery() {
  1351. this.queryParams.pageNum = 1;
  1352. console.log(this.queryParams)
  1353. this.getList();
  1354. },
  1355. /** 重置按钮操作 */
  1356. resetQuery() {
  1357. this.resetForm('queryForm');
  1358. this.handleQuery();
  1359. },
  1360. // 多选框选中数据
  1361. handleSelectionChange(selection) {
  1362. this.ids = selection.map(item => item.id);
  1363. this.single = selection.length !== 1;
  1364. this.multiple = !selection.length;
  1365. },
  1366. /** 新增按钮操作 */
  1367. handleAdd() {
  1368. this.reset();
  1369. this.open = true;
  1370. (this.naneme = false), (this.shouwes = false);
  1371. (this.selected = ['安徽省', '安庆市', '潜山市']), (this.form.province = this.selected[0]);
  1372. this.villageTownshy = '';
  1373. this.naiseurya = '';
  1374. this.hsuej = '';
  1375. this.form.city = this.selected[1];
  1376. this.form.region = this.selected[2];
  1377. this.title = '添加疫苗信息';
  1378. this.jdourdjoaj = true;
  1379. console.log(this.form)
  1380. },
  1381. /** 修改按钮操作 */
  1382. handleUpdate(row) {
  1383. this.reset();
  1384. const id = row.id || this.ids;
  1385. getInfo(id).then(response => {
  1386. this.form = response.data;
  1387. this.selected[0] = response.data.province;
  1388. this.selected[1] = response.data.city;
  1389. this.selected[2] = response.data.region;
  1390. // if(this.form){
  1391. if (this.form.isVaccination !== null) {
  1392. if (this.form.isVaccination == '是') {
  1393. // 接种疫苗
  1394. (this.naneme = false), (this.shouwes = true);
  1395. } else {
  1396. (this.naneme = true), (this.shouwes = false);
  1397. }
  1398. } else {
  1399. this.naneme = false;
  1400. this.shouwes = false;
  1401. }
  1402. if (this.form.dictValue !== null && this.form.dictValue !== undefined) {
  1403. this.jicheru(this.form.dictValue);
  1404. }
  1405. if (this.form.villageTowns !== null) {
  1406. this.villageTownshy = this.form.villageTowns;
  1407. if (this.form.village !== null) {
  1408. this.villageTownshy = this.form.village;
  1409. if (this.form.villagerGroup !== null) {
  1410. this.villageTownshy = this.form.villagerGroup;
  1411. }
  1412. }
  1413. }
  1414. if (this.form.vaccineInfoUserList !== null) {
  1415. if (this.form.vaccineInfoUserList.length == 0) {
  1416. this.form.vaccineInfoUserList = [
  1417. {
  1418. vaccineName: '',
  1419. vaccinationTime: '',
  1420. vaccinationPlace: '',
  1421. jici: '',
  1422. progress: '',
  1423. url:[]
  1424. }
  1425. ];
  1426. }else {
  1427. this.form.vaccineInfoUserList.filter(router =>{
  1428. if(router.url == undefined){
  1429. router.url = []
  1430. }
  1431. })
  1432. }
  1433. }
  1434. // villageTownshy
  1435. // }
  1436. // this.heuiq.push()
  1437. this.naiseurya = '';
  1438. this.hsuej = '';
  1439. this.open = true;
  1440. this.jdourdjoaj = false;
  1441. this.title = '查看编辑疫苗信息';
  1442. });
  1443. },
  1444. chahe(data) {
  1445. console.log(data);
  1446. this.form.villageTowns = data[1];
  1447. this.form.village = data[2];
  1448. this.form.villagerGroup = data[3];
  1449. if (this.form.villageTowns !== undefined) {
  1450. this.hsuej = this.form.villageTowns;
  1451. if (this.form.village !== undefined) {
  1452. this.hsuej = this.form.villageTowns + this.form.village;
  1453. if (this.form.villagerGroup !== undefined) {
  1454. this.hsuej = this.form.villageTowns + this.form.village + this.form.villagerGroup;
  1455. }
  1456. }
  1457. }
  1458. this.form.domicile = '';
  1459. },
  1460. chahetwo(data) {
  1461. this.queryParams.villageTowns = data[1];
  1462. this.queryParams.village = data[2];
  1463. this.queryParams.villagerGroup = data[3];
  1464. },
  1465. /** 提交按钮 */
  1466. submitForm() {
  1467. this.$refs['form'].validate(valid => {
  1468. console.log(this.selected);
  1469. if (valid) {
  1470. if (this.form.id != null) {
  1471. // this.form.nowIn = this.naiseurya + this.form.nowIn;
  1472. // this.form.domicile = this.hsuej + this.form.domicile;
  1473. updateInfo(this.form).then(response => {
  1474. this.msgSuccess('修改成功');
  1475. this.open = false;
  1476. this.getList();
  1477. });
  1478. } else {
  1479. // this.form.nowIn = this.naiseurya + this.form.nowIn;
  1480. // this.form.domicile = this.hsuej + this.form.domicile;
  1481. // if (this.form.nowIn == 'undefined') {
  1482. // this.form.nowIn = null;
  1483. // }
  1484. console.log(this.form)
  1485. // return
  1486. addInfo(this.form).then(response => {
  1487. this.msgSuccess('新增成功');
  1488. this.open = false;
  1489. this.getList();
  1490. });
  1491. }
  1492. }
  1493. });
  1494. },
  1495. /** 删除按钮操作 */
  1496. handleDelete(row) {
  1497. const ids = row.id || this.ids;
  1498. this.$confirm('是否确认删除疫苗信息编号为"' + ids + '"的数据项?', '警告', {
  1499. confirmButtonText: '确定',
  1500. cancelButtonText: '取消',
  1501. type: 'warning'
  1502. })
  1503. .then(function() {
  1504. return delInfo(ids);
  1505. })
  1506. .then(() => {
  1507. this.getList();
  1508. this.msgSuccess('删除成功');
  1509. });
  1510. },
  1511. /** 导出按钮操作 */
  1512. handleExport() {
  1513. this.download(
  1514. '/boman-web-core/core/info/export',
  1515. {
  1516. ...this.queryParams
  1517. },
  1518. `post_${new Date().getTime()}.xlsx`
  1519. );
  1520. },
  1521. // 疫苗名称改变
  1522. changeheu(index, data) {
  1523. console.log(index, data);
  1524. let hueya = this.form.vaccineInfoUserList[index].vaccineName;
  1525. // this.form.vaccineName = this.form.vaccineName.label;
  1526. this.form.vaccineInfoUserList[index].vaccineName = hueya.label;
  1527. console.log(this.form.vaccineInfoUserList[index].vaccineName);
  1528. this.jicheru(hueya.value);
  1529. },
  1530. // 剂次
  1531. jicheru(data) {
  1532. // 计次
  1533. this.getDicts(data).then(response => {
  1534. this.typeOptionstimes = response.data;
  1535. });
  1536. },
  1537. // 剂次改变
  1538. changeheujici(index) {
  1539. console.log(index);
  1540. let hueya = this.form.vaccineInfoUserList[index].jici;
  1541. // this.form.vaccineName = this.form.vaccineName.label;
  1542. this.form.vaccineInfoUserList[index].jici = hueya.label;
  1543. console.log(this.form.vaccineInfoUserList[index].jici);
  1544. if (hueya.value == this.typeOptionstimes.length) {
  1545. this.form.vaccineInfoUserList[index].progress = '已完成';
  1546. } else {
  1547. this.form.vaccineInfoUserList[index].progress = '未完成';
  1548. }
  1549. },
  1550. // 剂次
  1551. jicherutwo(data) {
  1552. // 计次
  1553. this.getDicts(data).then(response => {
  1554. this.typeOptionstimes = response.data;
  1555. });
  1556. },
  1557. // 疫苗名称改变
  1558. changeheutwo(data) {
  1559. console.log(data);
  1560. this.queryParams.vaccineName = this.queryParams.vaccineName.label;
  1561. console.log(this.queryParams.vaccineName);
  1562. this.jicherutwo(data.value);
  1563. },
  1564. // 点击新增
  1565. tijea(index) {
  1566. console.log(index+ 1)
  1567. this.nameutaiL = index+ 1
  1568. this.form.vaccineInfoUserList.push({
  1569. vaccineName: '',
  1570. vaccinationTime: '',
  1571. vaccinationPlace: '',
  1572. jici: '',
  1573. progress: '',
  1574. url:[]
  1575. });
  1576. },
  1577. // 点击删除
  1578. naeyrfakjf(index, item) {
  1579. if (this.form.vaccineInfoUserList.length == 1) {
  1580. return false;
  1581. }
  1582. if (this.jdourdjoaj == true) {
  1583. // 新增
  1584. this.form.vaccineInfoUserList.splice(index, 1);
  1585. } else {
  1586. // 修改
  1587. let ide = this.form.vaccineInfoUserList[index].id;
  1588. console.log(this.form.vaccineInfoUserList[index]);
  1589. // ()
  1590. console.log(ide);
  1591. if (ide !== undefined) {
  1592. console.log(234);
  1593. delInfort(this.ide).then(response => {
  1594. this.msgSuccess('操作成功');
  1595. });
  1596. }
  1597. this.form.vaccineInfoUserList.splice(index, 1);
  1598. }
  1599. },
  1600. // 点击查看
  1601. chakei(row) {
  1602. console.log(row);
  1603. yiaoe({idCard:row.idCard}).then(response => {
  1604. // this.msgSuccess('操作成功');
  1605. if(response.code == 200){
  1606. this.jiezheList = response.data
  1607. }
  1608. });
  1609. this.jiezhong = true;
  1610. }
  1611. }
  1612. };
  1613. </script>
  1614. <style lang="scss">
  1615. .jdueuh{
  1616. .el-form-item__label {
  1617. width: 0px !important;
  1618. }
  1619. .el-form-item__content {
  1620. margin-left: 10px !important;
  1621. // width: 70%;
  1622. }
  1623. }
  1624. .ijeuhdy{
  1625. .el-form-item__label {
  1626. width: 80px !important;
  1627. }
  1628. .el-form-item__content {
  1629. margin-left: 80px !important;
  1630. // width: 70%;
  1631. }
  1632. }
  1633. .znshu{
  1634. .el-form-item__label {
  1635. width: 80px !important;
  1636. // padding-left: 30px;
  1637. }
  1638. .el-form-item__content {
  1639. margin-left: 80px !important;
  1640. // width: 70%;
  1641. }
  1642. .el-input__inner{
  1643. padding-left: 0 !important;
  1644. }
  1645. }
  1646. .heioangd{
  1647. .el-form-item__label {
  1648. width: 70px !important;
  1649. }
  1650. .el-form-item__content {
  1651. margin-left: 70px !important;
  1652. // width: 70%;
  1653. }
  1654. }
  1655. .hues {
  1656. .area-select {
  1657. margin-left: 0 !important;
  1658. margin-right: 10px;
  1659. }
  1660. }
  1661. .jehak {
  1662. .el-form-item {
  1663. width: 100%;
  1664. }
  1665. .el-form-item__content {
  1666. width: 60%;
  1667. }
  1668. }
  1669. .oiuyty {
  1670. .el-form-item__label {
  1671. width: 80px !important;
  1672. }
  1673. .el-form-item__content {
  1674. margin-left: 80px !important;
  1675. // width: 70%;
  1676. }
  1677. input {
  1678. padding-right: 0 !important;
  1679. }
  1680. }
  1681. .el-dialog__body {
  1682. padding-top: 0;
  1683. padding-bottom: 0;
  1684. }
  1685. .jhy {
  1686. // width: 100%;
  1687. // .el-form-item__content {
  1688. // width: 100%;
  1689. // margin-left: 0 !important;
  1690. // }
  1691. .el-form-item__content {
  1692. margin-left: 55px !important;
  1693. // width: 70%;
  1694. }
  1695. .el-form-item__label {
  1696. width: 55px !important;
  1697. }
  1698. }
  1699. .ehiqya {
  1700. .el-form-item__content {
  1701. display: flex;
  1702. .jdidur {
  1703. flex: 1;
  1704. margin-left: 10px;
  1705. // text-align: left;
  1706. display: flex;
  1707. }
  1708. }
  1709. .upload-demo {
  1710. display: flex;
  1711. }
  1712. }
  1713. .jdoier{
  1714. display: flex;
  1715. align-items: center;
  1716. .upload-demo {
  1717. display: flex;
  1718. }
  1719. }
  1720. .hueyde {
  1721. width: 18px;
  1722. height: 18px;
  1723. margin: 0 5px;
  1724. margin-right: 10px;
  1725. }
  1726. .hueydele {
  1727. width: 15px;
  1728. height: 18px;
  1729. }
  1730. .hyeoa {
  1731. height: 100%;
  1732. display: flex;
  1733. align-items: center;
  1734. }
  1735. .hjdoecdre {
  1736. // margin-top: 50%;
  1737. transform: translateY(50%);
  1738. }
  1739. .ojhgy {
  1740. .el-dialog {
  1741. padding-bottom: 40px;
  1742. padding-top: 10px;
  1743. }
  1744. .el-dialog__header {
  1745. padding-bottom: 20px;
  1746. }
  1747. .el-table .cell {
  1748. line-height: 50px;
  1749. }
  1750. }
  1751. .hueya{
  1752. margin-left: 0 !important;
  1753. }
  1754. .iejghiadh{
  1755. .el-input__inner{
  1756. padding-right: 0 !important;
  1757. padding-left: 5px !important;
  1758. }
  1759. }
  1760. </style>