index.vue 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563
  1. <template>
  2. <div class="app-container">
  3. <div style="margin-bottom: 20px;">
  4. <p style="font-size: 16px;line-height: 24px; color: #333; font-weight: 700;">当前单位:<span style="font-weight: 400; color: #009fe8; margin-right: 15px; ">{{dneyhsd.dqdw == null? '暂无数据' : dneyhsd.dqdw}}</span>
  5. 镇:<span style="font-weight: 400; color: #009fe8; margin-right: 15px; ">{{dneyhsd.zhen == null? '暂无数据' : dneyhsd.zhen}}个</span> 村:<span style="font-weight: 400; color: #009fe8;margin-right: 15px;">{{dneyhsd.cun == null? '暂无数据' : dneyhsd.cun}}个</span> 组:<span style="font-weight: 400; color: #009fe8; margin-right: 15px;">{{dneyhsd.zu == null? '暂无数据' : dneyhsd.zu}}个</span> 常住人口:<span style="font-weight: 400; margin-right: 15px; color: #f66b0e;">{{dneyhsd.czrk == null? '暂无数据' : dneyhsd.czrk}}人</span> <span @click="chakei(0)">新增:<span style="font-weight: 400; margin-right: 15px; color: #00b034;" >{{dneyhsd.xz == null? '暂无数据' : dneyhsd.xz}}人</span></span> <span @click="chakei(1)">减少:<span style="font-weight: 400; margin-right: 15px; color: #fa2323;" >{{dneyhsd.js == null? '暂无数据' : dneyhsd.js}}人</span></span></p>
  6. </div>
  7. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="70px">
  8. <el-row>
  9. <el-col :span="24">
  10. <el-row>
  11. <el-col :span="6">
  12. <el-form-item label="身份证号" prop="idCard">
  13. <el-input v-model="queryParams.idCard" placeholder="请输入身份证号码" style="width:180px;" clearable @keyup.enter.native="handleQuery" />
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="6">
  17. <el-form-item label="姓名" prop="userName">
  18. <el-input v-model="queryParams.userName" placeholder="请输入姓名" style="width:180px;" clearable @keyup.enter.native="handleQuery" />
  19. </el-form-item>
  20. </el-col>
  21. <el-col :span="6">
  22. <el-form-item label="联系号码" prop="phoneNum">
  23. <el-input v-model="queryParams.phoneNum" placeholder="请输入联系号码" style="width:180px;"clearable @keyup.enter.native="handleQuery" />
  24. </el-form-item>
  25. </el-col>
  26. <el-col :span="6">
  27. <el-form-item label="年龄阶段" >
  28. <el-select v-model="queryParams.params.age" placeholder="年龄阶段" style="width:180px;" clearable>
  29. <el-option v-for="dict in angesList" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  30. </el-select>
  31. </el-form-item>
  32. </el-col>
  33. </el-row>
  34. </el-col>
  35. <el-col :span="24">
  36. <el-row>
  37. <el-col :span="12" class="jehak">
  38. <el-form-item label="居住地址" prop="villagerGroup">
  39. <el-cascader
  40. placeholder="点击选择居住地址"
  41. :options="optionsList"
  42. filterable
  43. @change="chahetwo"
  44. :props="optionPropsss"
  45. style="width: 140%;"
  46. @keyup.enter.native="handleQuery"
  47. clearable
  48. ref = "cdd"
  49. v-model="listd"
  50. @active-item-change="handleItemChange"
  51. ></el-cascader>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="8" class="jehak">
  55. <el-form-item label="户籍地址" prop="villagerGroup">
  56. <el-cascader
  57. placeholder="点击选择户籍地址"
  58. :options="options"
  59. filterable
  60. @change="chahetwo"
  61. :props="optionPropstwo"
  62. style="width: 125%;"
  63. @keyup.enter.native="handleQuery"
  64. clearable
  65. ></el-cascader>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="4" >
  69. <el-form-item>
  70. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  71. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  72. </el-form-item>
  73. </el-col>
  74. </el-row>
  75. </el-col>
  76. <el-col :span="24">
  77. <el-row>
  78. </el-row>
  79. </el-col>
  80. </el-row>
  81. </el-form>
  82. <el-row :gutter="10" class="mb8">
  83. <el-col :span="1.5"><el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" >新增</el-button></el-col>
  84. <el-col :span="1.5">
  85. <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" >修改</el-button>
  86. </el-col>
  87. <el-col :span="1.5">
  88. <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" >删除</el-button>
  89. </el-col>
  90. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  91. </el-row>
  92. <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" height="350">
  93. <el-table-column type="selection" width="55" align="center" />
  94. <el-table-column label="姓名" align="center" prop="userName" fixed width="110"/>
  95. <el-table-column label="联系方式" align="center" prop="phoneNum" width="110" />
  96. <el-table-column label="身份证号码" align="center" prop="idCard" width="180" />
  97. <el-table-column label="户籍地址" align="center" prop="domicileSelect" width="250" />
  98. <!-- nowInSelect -->
  99. <el-table-column label="居住地址" align="center" prop="nowInSelect" />
  100. <el-table-column label="是否户主" align="center" prop="houseType" width="90" />
  101. <el-table-column label="认领人" align="center" prop="rlr" width="90" />
  102. <el-table-column label="操作" align="left" class-name="small-padding fixed-width" fixed="right" width="120">
  103. <template slot-scope="scope">
  104. <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" >查看修改</el-button>
  105. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" class="hueya" >删除</el-button>
  106. <el-button v-if="scope.row.houseType == '是'" size="mini" type="text" icon="el-icon-edit" @click="handleDeletefamide(scope.row)" class="hueya" >查看家庭成员</el-button>
  107. </template>
  108. </el-table-column>
  109. </el-table>
  110. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
  111. <!-- 添加或修改疫苗信息对话框 -->
  112. <el-dialog :title="title" :visible.sync="opens" width="1240px" append-to-body>
  113. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  114. <el-row>
  115. <el-col :span="8">
  116. <el-form-item label="身份证号" prop="idCard"><el-input v-model="form.idCard" placeholder="请输入身份证号码" @blur="idcde" /></el-form-item>
  117. </el-col>
  118. <el-col :span="8">
  119. <el-form-item label="姓名" prop="userName"><el-input v-model="form.userName" placeholder="请输入姓名" /></el-form-item>
  120. </el-col>
  121. <el-col :span="8">
  122. <el-form-item label="性别" prop="gender">
  123. <!-- <el-input v-model="form.gender" placeholder="请输入性别" /> -->
  124. <el-select v-model="form.gender" placeholder="性别" clearable style="width: 100%;">
  125. <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  126. </el-select>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="24">
  130. <el-row>
  131. <el-col :span="8">
  132. <el-form-item label="联系号码" prop="phoneNum"><el-input v-model="form.phoneNum" placeholder="请输入联系号码" /></el-form-item>
  133. </el-col>
  134. <el-col :span="8">
  135. <el-form-item label="人员分类" prop="keyIndustries">
  136. <el-select v-model="form.keyIndustries" placeholder="人员分类" clearable style="width: 100%;">
  137. <el-option v-for="dict in typeOptionsname" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  138. </el-select>
  139. </el-form-item>
  140. </el-col>
  141. <el-col :span="8">
  142. <el-form-item label="年龄" prop="age"><el-input v-model="form.age" placeholder="请输入年龄" /></el-form-item>
  143. </el-col>
  144. </el-row>
  145. </el-col>
  146. <el-col :span="24">
  147. <el-row>
  148. <el-col :span="12">
  149. <el-form-item label="户籍地址" prop="villageTowns">
  150. <!-- <el-input v-model="form.villageTowns" type="textarea" placeholder="请输入内容" /> -->
  151. <!-- <treeselect v-model="form.parentId" :options="deptOptionstwo" :normalizer="normalizer" :flat="true" :maxHeight="150" @select="djieskle" :multiple=true placeholder="点击选择户籍地" /> -->
  152. <el-cascader
  153. placeholder="点击选择户籍地址"
  154. :options="options"
  155. :filterable="true"
  156. separator="/"
  157. @change="chahe"
  158. v-model="villageTownshy"
  159. :props="optionProps"
  160. style="width: 100%;"
  161. ref="myCascader"
  162. ></el-cascader>
  163. </el-form-item>
  164. </el-col>
  165. <el-col :span="12">
  166. <el-form-item label="详细地址" prop="domicile"><el-input v-model="form.domicile" type="input" placeholder="请输入户籍详细地址" /></el-form-item>
  167. </el-col>
  168. </el-row>
  169. </el-col>
  170. <el-col :span="12">
  171. <el-form-item label="居住地址" prop="province">
  172. <el-cascader
  173. :placeholder="nhdyesfgh"
  174. :options="optionsList"
  175. :filterable="true"
  176. separator="/"
  177. @change="onSelected"
  178. v-model="selected"
  179. :props="optionPropsss"
  180. style="width: 100%;"
  181. ref="myCascaderf"
  182. @active-item-change="handleItemChange"
  183. :class="[nhdyesfgh == '点击选择居住地址' ? '' : 'placf']"
  184. ></el-cascader>
  185. </el-form-item>
  186. </el-col>
  187. <el-col :span="12">
  188. <el-form-item label="详细地址" prop="nowIn"><el-input v-model="form.nowIn" type="input" placeholder="请输入内容" /></el-form-item>
  189. </el-col>
  190. <el-col :span="24">
  191. <el-col :span="12">
  192. <el-form-item label="户主" prop="houseType">
  193. <el-select v-model="form.houseType" placeholder="户主" clearable style="width: 100%;" @change="changese">
  194. <el-option v-for="dict in typeOptionshuuj" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  195. </el-select>
  196. </el-form-item>
  197. </el-col>
  198. <el-col :span="12">
  199. <el-form-item label="户编号" prop="code">
  200. <el-input v-model="form.code" placeholder="请输入户主编号"/>
  201. <!-- :disabled="nhe" -->
  202. </el-form-item>
  203. </el-col>
  204. </el-col>
  205. </el-row>
  206. </el-form>
  207. <div slot="footer" class="dialog-footer">
  208. <el-button type="primary" @click="submitForm">确 定</el-button>
  209. <el-button @click="cancel">取 消</el-button>
  210. </div>
  211. </el-dialog>
  212. <!-- 图片预览 -->
  213. <el-dialog :close-on-click-modal="false" title="删除原因" :visible.sync="imashow" width="800px" append-to-body >
  214. <el-form ref="formgt" :model="formgt" :rules="ruleshy" label-width="100px" style="padding-bottom: 30px;">
  215. <el-form-item label="删除原因:" prop="houseType">
  216. <el-select v-model="formgt.houseType" placeholder="请选择删除原因" clearable style="width: 100%;">
  217. <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  218. </el-select>
  219. </el-form-item>
  220. </el-form>
  221. <div slot="footer" class="dialog-footer">
  222. <el-button type="primary" @click="submitFormfr">确 定</el-button>
  223. <el-button @click="cancel">取 消</el-button>
  224. </div>
  225. </el-dialog>
  226. <el-dialog :close-on-click-modal="false" title="查看信息" :visible.sync="jiezhong" width="1100px" append-to-body class="ojhgy">
  227. <el-table :data="jiezheList" stripe style="width: 100%">
  228. <el-table-column type="selection" width="55" align="center" />
  229. <el-table-column label="姓名" align="center" prop="userName" fixed width="100"/>
  230. <el-table-column label="与户主关系" align="center" prop="yhzgx" fixed width="100"/>
  231. <el-table-column label="联系方式" align="center" prop="phoneNum" width="110" />
  232. <el-table-column label="身份证号码" align="center" prop="idCard" width="180" />
  233. <el-table-column label="户籍地址" align="center" prop="domicileSelect" width="250" />
  234. <!-- nowInSelect -->
  235. <el-table-column label="居住地址" align="center" prop="nowInSelect" />
  236. <!-- <el-table-column label="是否户主" align="center" prop="houseType" width="90" /> -->
  237. <el-table-column v-if="nhyesoder !== 3" label="操作人" align="center" prop="updateBy" width="90" />
  238. <el-table-column v-if="nhyesoder !== 3" label="创建时间" align="center" prop="createTime" />
  239. </el-table>
  240. </el-table>
  241. <pagination v-show="totalfr > 0" :total="totalfr" :page.sync="ndhuwosdjh.pageNum" :limit.sync="ndhuwosdjh.pageSize" @pagination="chakei" />
  242. </el-dialog>
  243. </div>
  244. </template>
  245. <script>
  246. import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr,importLog,listInfotj,listRoleergth,listInfotjxz,listInfotjjs,listInfotjjsfaml } from '@/api/system/resident';
  247. import { treeselect } from '@/api/system/dept';
  248. import Treeselect from '@riophae/vue-treeselect';
  249. import { getToken } from '@/utils/auth';
  250. import '@riophae/vue-treeselect/dist/vue-treeselect.css';
  251. export default {
  252. name: 'Info',
  253. components: { Treeselect },
  254. data() {
  255. return {
  256. // 遮罩层
  257. loading: true,
  258. // 选中数组
  259. ids: [],
  260. // 非单个禁用
  261. single: true,
  262. // 非多个禁用
  263. multiple: true,
  264. // 显示搜索条件
  265. showSearch: true,
  266. // 总条数
  267. total: 0,
  268. ruleshy:{},
  269. // 疫苗信息表格数据
  270. infoList: [],
  271. dialogImageUrl: '',
  272. // 弹出层标题
  273. title: '',
  274. totalfr:0,
  275. // 是否显示弹出层
  276. opens: false,
  277. process: process.env.VUE_APP_BASE_API,
  278. // 查询参数
  279. queryParams: {
  280. pageNum: 1,
  281. pageSize: 10,
  282. villageTowns: null,
  283. village: null,
  284. villagerGroup: null,
  285. houseType: null,
  286. province: null,
  287. city: null,
  288. userName: null,
  289. ryrl: true,
  290. gender: null,
  291. idCard: null,
  292. phoneNum: null,
  293. keyIndustries: null,
  294. isVaccination: null,
  295. vaccineName: null,
  296. vaccinationTime: null,
  297. vaccinationPlace: null,
  298. contraindication: null,
  299. params:{
  300. age:''
  301. }
  302. },
  303. config: [],
  304. comfietg:[],
  305. configther:[],
  306. configfor:[],
  307. // 表单参数
  308. form: {
  309. nowIn: '',
  310. age:'',
  311. code:'',
  312. vaccineInfoUserList: [
  313. {
  314. vaccineName: '',
  315. vaccinationTime: '',
  316. vaccinationPlace: '',
  317. jici: '',
  318. progress: '',
  319. url:null,
  320. disableg:false
  321. }
  322. ]
  323. },
  324. // 用户导入参数
  325. upload: {
  326. // 是否显示弹出层(用户导入)
  327. opens: false,
  328. // 弹出层标题(用户导入)
  329. title: "",
  330. // 是否禁用上传
  331. isUploading: false,
  332. // 是否更新已经存在的用户数据
  333. updateSupport: 0,
  334. // 设置上传的请求头部
  335. headers: { Authorization: "Bearer " + getToken() },
  336. // 上传的地址
  337. url: process.env.VUE_APP_BASE_API + "/boman-web-core//file/common/importYmjz"
  338. },
  339. // 表单校验
  340. rules: {
  341. province: [{ required: true, message: '居住地址不能为空', trigger: 'blur' }],
  342. idCard: [{ required: true, message: '身份证号码不能为空', trigger: 'blur' }],
  343. userName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
  344. villageTowns:[{ required: true, message: '户籍地址不能为空或不能只选潜山市', trigger: 'blur' }],
  345. },
  346. selected: [12, 340800000000, 340882000000, 340882100000, 340882100002],
  347. selectedtwo: [],
  348. statusOptions: [
  349. {
  350. dictValue: '女',
  351. dictLabel: '女'
  352. },
  353. {
  354. dictValue: '男',
  355. dictLabel: '男'
  356. }
  357. ],
  358. statusOptionstue: [
  359. {
  360. dictValue: '已完成',
  361. dictLabel: '已完成'
  362. },
  363. {
  364. dictValue: '未完成',
  365. dictLabel: '未完成'
  366. }
  367. ],
  368. typeOptionshuuj: [
  369. {
  370. dictValue: '是',
  371. dictLabel: '是'
  372. },
  373. {
  374. dictValue: '否',
  375. dictLabel: '否'
  376. }
  377. ],
  378. deptOptionstwo: [],
  379. options: [],
  380. optionss:[],
  381. optionsList: [],
  382. optionProps: {
  383. value: 'label',
  384. label: 'label',
  385. children: 'children',
  386. checkStrictly: true
  387. },
  388. optionPropsss: {
  389. value: 'areaId',
  390. label: 'name',
  391. checkStrictly: true,
  392. lazy: true,
  393. lazyLoad: this.lazyLoads,
  394. leaf: "leaf"
  395. },
  396. optionPropstwo: {
  397. value: 'id',
  398. label: 'label',
  399. children: 'children',
  400. checkStrictly: true
  401. },
  402. heuiq: [],
  403. typeOptions: [],
  404. typeOptionsty: [
  405. {
  406. dictValue: '是',
  407. dictLabel: '是'
  408. },
  409. {
  410. dictValue: '否',
  411. dictLabel: '否'
  412. }
  413. ],
  414. typeOptionstyzandeh:[],
  415. angesList: [
  416. ],
  417. typeOptionsname: [],
  418. typeOptionstimes: [],
  419. typeOptionsvaccinatio: [],
  420. typeOptionscont: [],
  421. typeOptionscontty: [],
  422. typeOptionscontqit:[],
  423. // 剂次
  424. typeOptionstimesgt: [
  425. {
  426. dictValue: '1',
  427. dictLabel: '1'
  428. },
  429. {
  430. dictValue: '2',
  431. dictLabel: '2'
  432. },
  433. {
  434. dictValue: '3',
  435. dictLabel: '3'
  436. },
  437. {
  438. dictValue: '加强针',
  439. dictLabel: '加强针'
  440. }
  441. ],
  442. imashow: false,
  443. naneme: false,
  444. shouwes: false,
  445. shouwestwo:false,
  446. villageTownshy: undefined,
  447. naiseurya: '',
  448. hsuej: '',
  449. jdourdjoaj: false,
  450. jiezhong: false,
  451. jiezheList: [],
  452. fireLise:{config:[]},
  453. nameutaiL:0,
  454. jue:false,
  455. nhue:true,
  456. exportflag:true,
  457. errorlog:false,
  458. errorList:[],
  459. idfer:0,
  460. formgt:{},
  461. list: [],
  462. listd:[],
  463. dneyhsd:{},
  464. nhdyesfgh:'点击选择居住地址',
  465. nhe:false,
  466. nhyesoder:0,
  467. ndhuwosdjh:{
  468. pageNum: 1,
  469. pageSize: 10,
  470. }
  471. };
  472. },
  473. created() {
  474. this.getList();
  475. this.getTreeselectjue();
  476. this.mnyesfjer(0)
  477. this.getTreeselectjuetj()
  478. // 重点行业
  479. this.getDicts('person_type').then(response => {
  480. this.typeOptions = response.data;
  481. });
  482. // 疫苗名称
  483. this.getDicts('renyuanfenlei').then(response => {
  484. this.typeOptionsname = response.data;
  485. });
  486. // 年龄阶段
  487. this.getDicts('age_interval').then(response => {
  488. this.angesList = response.data;
  489. });
  490. // this.form.province = this.selected[0];
  491. // this.form.city = this.selected[1];
  492. // this.form.region = this.selected[2];
  493. console.log(this.selected,456)
  494. // this.queryParams.province = this.selectedtwo[0];
  495. // this.queryParams.city = this.selectedtwo[1];
  496. // this.queryParams.region = this.selectedtwo[2];
  497. // this.naiseurya = this.form.province + this.form.city + this.form.region;
  498. },
  499. mounted() {
  500. console.log(136)
  501. },
  502. methods: {
  503. onSelected(data) {
  504. console.log(data, 125);
  505. console.log(this.$refs['myCascaderf'].getCheckedNodes()[0].pathLabels)
  506. // province
  507. let nhdye = []
  508. nhdye = this.$refs['myCascaderf'].getCheckedNodes()[0].pathLabels
  509. // id
  510. // this.form.province = data[0];
  511. // this.form.city = data[1];
  512. // this.form.region = data[2];
  513. // 名称
  514. this.form.province = nhdye[0];
  515. this.form.city = nhdye[1];
  516. this.form.region = nhdye[2];
  517. this.form.residenceTown = nhdye[3];
  518. this.form.residenceVillage = nhdye[4];
  519. this.naiseurya = this.form.province + this.form.city + this.form.region;
  520. if (this.jdourdjoaj == false) {
  521. // 修改
  522. this.form.nowIn = '';
  523. }
  524. // this.form.nowIn = undefined
  525. // this.form.villageTowns = data[3]
  526. },
  527. dakousr() {
  528. console.log(2345);
  529. },
  530. mnyesfjer(index){
  531. this.loading = true;
  532. let pids = {}
  533. pids.pid = index
  534. listRoleergth(pids).then(response => {
  535. this.optionsList = this.handleData(response.data);
  536. this.loading = false;
  537. });
  538. },
  539. // // 模拟请求一级节点
  540. // getfristChild() {
  541. // return [
  542. // {
  543. // label: "第一个",
  544. // hasChdild: true,
  545. // leaf: false,
  546. // pid: null,
  547. // value: "1",
  548. // },
  549. // {
  550. // label: "第2个",
  551. // hasChdild: true,
  552. // leaf: false,
  553. // pid: null,
  554. // value: "2",
  555. // },
  556. // {
  557. // label: "第3个",
  558. // hasChdild: true,
  559. // leaf: true,
  560. // pid: null,
  561. // value: "3",
  562. // },
  563. // ];
  564. // },
  565. // // 模拟请求子级节点
  566. // getOther(value) {
  567. // let res = [];
  568. // if (value == 1) {
  569. // res = [
  570. // {
  571. // label: "第一个1",
  572. // hasChdild: false,
  573. // pid: 1,
  574. // value: "11",
  575. // leaf: false, // 差别: 这里加了是否叶子节点属性,后面都加了
  576. // },
  577. // {
  578. // label: "第一个2",
  579. // hasChdild: false,
  580. // pid: 1,
  581. // value: "12",
  582. // leaf: false,
  583. // },
  584. // ];
  585. // }
  586. // if (value == 2) {
  587. // res = [
  588. // {
  589. // label: "第2个1",
  590. // hasChdild: false,
  591. // pid: 2,
  592. // leaf: true,
  593. // value: "5",
  594. // },
  595. // {
  596. // label: "第2个2",
  597. // hasChdild: false,
  598. // leaf: true,
  599. // pid: 2,
  600. // value: "6",
  601. // },
  602. // ];
  603. // }
  604. // if (value == 11) {
  605. // res = [
  606. // {
  607. // label: "第3个1",
  608. // hasChdild: false,
  609. // pid: 2,
  610. // leaf: true,
  611. // value: "111",
  612. // },
  613. // {
  614. // label: "第3个2",
  615. // hasChdild: false,
  616. // leaf: true,
  617. // pid: 2,
  618. // value: "112",
  619. // },
  620. // ];
  621. // }
  622. // return res;
  623. // },
  624. // // 模拟请求一级节点
  625. // getfristChild() {
  626. // return [
  627. // {
  628. // label: "第一个",
  629. // hasChdild: true,
  630. // pid: null,
  631. // value: "1",
  632. // },
  633. // {
  634. // label: "第2个",
  635. // hasChdild: true,
  636. // pid: null,
  637. // value: "2",
  638. // },
  639. // {
  640. // label: "第3个",
  641. // hasChdild: true,
  642. // pid: null,
  643. // value: "3",
  644. // },
  645. // ];
  646. // },
  647. // // 模拟请求子级节点
  648. // getOther(value) {
  649. // let res = [];
  650. // if (value == 1) {
  651. // res = [
  652. // {
  653. // label: "第一个1",
  654. // hasChdild: false,
  655. // pid: 1,
  656. // value: "3",
  657. // },
  658. // {
  659. // label: "第一个2",
  660. // hasChdild: false,
  661. // pid: 1,
  662. // value: "4",
  663. // },
  664. // ];
  665. // }
  666. // if (value == 2) {
  667. // res = [
  668. // {
  669. // label: "第2个1",
  670. // hasChdild: false,
  671. // pid: 2,
  672. // value: "5",
  673. // },
  674. // {
  675. // label: "第2个2",
  676. // hasChdild: false,
  677. // pid: 2,
  678. // value: "6",
  679. // },
  680. // ];
  681. // }
  682. // return res;
  683. // },
  684. // lazyLoads(node, resolve){
  685. // if (node.level == 0) {
  686. // console.log(node,2547);
  687. // if (this.list.length > 0) {
  688. // // 存在回显的id我们才去设置回显
  689. // let res = this.format(); // 这里就是获取第一次要回显的内容了
  690. // console.log("00000", res);
  691. // this.optionsList = res; // 有回显第一次就直接给绑定的对象,不要resolve
  692. // } else {
  693. // let res = this.getfristChild(); // 不存在就默认加载第一集节点
  694. // console.log(res,67)
  695. // resolve(res);
  696. // }
  697. // } else {
  698. // // 记录选择的,不然会点击字节点加载时丢失数据
  699. // let list = this.list;
  700. // // 有children属性了就不要再请求了,不然字节点会重复
  701. // if (!node.data.children) {
  702. // // 获取子节点数据
  703. // let res = this.getOther(node.data.value);
  704. // setTimeout(() => {
  705. // // 模拟延时,实际不需要
  706. // resolve(res);
  707. // }, 100);
  708. // } else {
  709. // resolve([]);
  710. // }
  711. // // 重新把选择的id放回来-
  712. // // this.$nextTick(() => {
  713. // // this.list = [...new Set([...this.list, ...list])]; //差别: 合并并且去重
  714. // // });
  715. // setTimeout(() => {
  716. // this.list = [...new Set([...this.list, ...list])]; //差别: 合并并且去重
  717. // }, 250);
  718. // }
  719. // },
  720. // lazyLoads(node, resolve) {
  721. // console.log(node)
  722. // if (node.level == 0) {
  723. // let res = this.mnyesfjer(0); // 不存在就默认加载第一集节点
  724. // resolve(res);
  725. // } else {
  726. // // 有children属性了就不要再请求了,不然字节点会重复
  727. // // if (!node.data.children) {
  728. // // 获取子节点数据
  729. // let res = this.mnyesfjer(node.data.areaId);
  730. // console.log(node.children)
  731. // let nfhh = node.children.push(res)
  732. // setTimeout(() => {
  733. // resolve(nfhh);
  734. // }, 200);
  735. // // } else {
  736. // // resolve([]);
  737. // // }
  738. // }
  739. // },
  740. format() {
  741. let res = this.getfristChild(); // 拿一级数据
  742. this.list.forEach((item) => {
  743. // 遍历回显的id 二维数组
  744. if (item.length > 1) {
  745. item.forEach(async (sitem, index) => {
  746. if (index == item.length - 1) {
  747. return; // 如果是一级节点就不用查找了
  748. }
  749. let arr = this.getOther(sitem); // 不是一级,获取子级
  750. this.findItem(res, arr, sitem); // 判断当前拿到的子级数据属于哪个一级数据下的子级,并且加到当前一级的children属性下
  751. });
  752. }
  753. });
  754. },
  755. // 递归判断
  756. findItem(res, arr, id) {
  757. for (let i = 0; i < res.length; i++) {
  758. if (res[i].value === id) {
  759. res[i].children = arr; // 有chidlren 也要判断是不是这个children下的子级
  760. return res;
  761. }
  762. if (res[i].children) {
  763. this.findItem(res[i].children, arr, id);
  764. }
  765. }
  766. return res;
  767. },
  768. // getAddress() {
  769. // this.mnyesfjer(0).then(res => {
  770. // this.optionsList = this.handleData(res.data);
  771. // }).catch(err => {
  772. // })
  773. // },
  774. handleItemChange(val) {
  775. console.log(val,235)
  776. let code = val ? val[val.length - 1] : ''; //需请求数据的上级地址的code值
  777. let level = val.length + 1; //需请求第几级地址
  778. this.optionsList = this.handleData(this.optionsList, code, level);
  779. },
  780. handleData(data, val, level) {
  781. console.log(data,val,level)
  782. for (let i = 0; i < data.length; i++) {
  783. if(!data[i].children) {
  784. this.$set(data[i], 'children', []);
  785. }
  786. if(data[i].areaId === val){
  787. let vfer = {}
  788. vfer.pid = val
  789. listRoleergth(vfer).then(res => {
  790. if(res.data.length) {
  791. data[i].children = res.data;
  792. data[i].children.forEach(ele => {
  793. this.$set(ele, 'children', [])
  794. });
  795. }else {
  796. data[i].children = undefined;
  797. }
  798. }).catch(err => {
  799. });
  800. }else {
  801. if(data[i].children.length){
  802. this.handleData(data[i].children,val,level)
  803. }
  804. }
  805. }
  806. return data;
  807. },
  808. onSelectedtwo(data) {
  809. console.log(data);
  810. // province
  811. this.queryParams.province = data[0];
  812. this.queryParams.city = data[1];
  813. this.queryParams.region = data[2];
  814. // this.queryParams.villageTowns = data[3]
  815. },
  816. /** 查询疫苗信息列表 */
  817. getList() {
  818. this.loading = true;
  819. listInfo(this.queryParams).then(response => {
  820. this.infoList = response.rows;
  821. this.total = response.total;
  822. this.loading = false;
  823. });
  824. },
  825. getToken() {
  826. return getToken();
  827. },
  828. getTreeselectjue() {
  829. this.loading = true;
  830. let pids = {}
  831. pids.pid = 0
  832. listRoleer().then(response => {
  833. this.options = response.data;
  834. this.loading = false;
  835. });
  836. },
  837. // 统计数据
  838. getTreeselectjuetj() {
  839. this.loading = true;
  840. listInfotj().then(response => {
  841. this.dneyhsd = response.data
  842. this.loading = false;
  843. });
  844. },
  845. /** 转换角色数据结构 */
  846. normalizer(node) {
  847. // if (node.children && !node.children.length) {
  848. // delete node.children;
  849. // }
  850. return {
  851. id: node.id,
  852. label: node.roleName
  853. };
  854. },
  855. // 点击组/角色
  856. djieskle(node, instanceId) {
  857. // this.personnel(node.id);
  858. console.log(node, instanceId);
  859. },
  860. // 身份证
  861. idcde(event) {
  862. console.log(event);
  863. // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
  864. let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  865. if (reg.test(this.form.idCard)) {
  866. this.idea();
  867. // this.go(this.form.idCard.length);
  868. // callback()
  869. } else {
  870. // callback(new Error('身份证号码不正确'))
  871. this.msgInfo('身份证号码不正确');
  872. }
  873. },
  874. // 实现自动生成生日,性别,年龄
  875. go(val) {
  876. let iden = this.form.idCard;
  877. let sex = null;
  878. let birth = null;
  879. let birthr = '';
  880. let myDate = new Date();
  881. let month = myDate.getMonth() + 1;
  882. let day = myDate.getDate();
  883. let age = 0;
  884. if (val === 18) {
  885. age = myDate.getFullYear() - iden.substring(6, 10) - 1;
  886. sex = iden.substring(16, 17);
  887. birth = iden.substring(6, 10) + '-' + iden.substring(10, 12) + '-' + iden.substring(12, 14);
  888. if (iden.substring(10, 12) < month || (iden.substring(10, 12) == month && iden.substring(12, 14) <= day)) age++;
  889. }
  890. if (val === 15) {
  891. age = myDate.getFullYear() - iden.substring(6, 8) - 1901;
  892. sex = iden.substring(13, 14);
  893. birth = '19' + iden.substring(6, 8) + '-' + iden.substring(8, 10) + '-' + iden.substring(10, 12);
  894. if (iden.substring(8, 10) < month || (iden.substring(8, 10) == month && iden.substring(10, 12) <= day)) age++;
  895. }
  896. if (sex % 2 === 0) sex = '女';
  897. else sex = '男';
  898. this.form.gender = sex;
  899. // this.baseInfo.age = age;
  900. birthr = birth + '';
  901. console.log(birthr);
  902. // this.form.birthday = birthr;
  903. // this.$set(this.form.birthday, birthr)
  904. // this.baseInfo.birthplace = this.area[iden.substring(0,2)];
  905. },
  906. // 请求身份证数据
  907. idea() {
  908. idces({ idCard: this.form.idCard }).then(response => {
  909. console.log(response);
  910. this.form.gender = response.data.gender;
  911. // this.form.birthday = response.data.birthday;
  912. this.form.age = response.data.age
  913. this.form.code = response.data.code
  914. if (response.data.userName == null) {
  915. this.form.userName = undefined;
  916. } else {
  917. this.form.userName = response.data.userName;
  918. }
  919. });
  920. },
  921. // 取消按钮
  922. cancel() {
  923. this.opens = false;
  924. this.jiezhong = false;
  925. this.imashow = false;
  926. this.errorlog=false;
  927. this.reset();
  928. },
  929. gywoa() {
  930. console.log(this.form.isVaccination);
  931. if (this.form.isVaccination !== null) {
  932. if (this.form.isVaccination == '是') {
  933. // 接种疫苗
  934. this.naneme = false,
  935. this.shouwes = true;
  936. }else {
  937. this.naneme = true,
  938. this.shouwes = false,
  939. this.form.vaccineInfoUserList = [{
  940. vaccineName: '',
  941. vaccinationTime: '',
  942. vaccinationPlace: '',
  943. jici: '',
  944. progress: '',
  945. url:null
  946. }
  947. ]
  948. }
  949. }
  950. },
  951. gywoatwo() {
  952. console.log(this.queryParams.isVaccination);
  953. if (this.queryParams.isVaccination !== null) {
  954. if (this.queryParams.isVaccination == '是') {
  955. // 接种疫苗
  956. // (this.naneme = false), (this.shouwes = true);
  957. this.shouwestwo = false
  958. } else {
  959. // (this.naneme = true), (this.shouwes = false);
  960. this.shouwestwo = true
  961. }
  962. }
  963. },
  964. // 表单重置
  965. reset() {
  966. this.form = {
  967. id: null,
  968. villageTowns: null,
  969. village: null,
  970. age:'',
  971. code:'',
  972. villagerGroup: null,
  973. houseType: null,
  974. domicile: null,
  975. province: null,
  976. city: null,
  977. region: null,
  978. userName: null,
  979. gender: null,
  980. idCard: null,
  981. phoneNum: null,
  982. keyIndustries: null,
  983. isVaccination: null,
  984. vaccinationPlace: null,
  985. contraindication: null,
  986. nowIn: '',
  987. remark: null,
  988. residenceTown:null,
  989. residenceVillage:null
  990. };
  991. this.resetForm('form');
  992. },
  993. /** 搜索按钮操作 */
  994. handleQuery() {
  995. this.queryParams.pageNum = 1;
  996. console.log(this.queryParams)
  997. this.getList();
  998. },
  999. /** 重置按钮操作 */
  1000. resetQuery() {
  1001. this.nhue = false
  1002. this.selectedtwo = []
  1003. setTimeout( ()=>{
  1004. this.nhue = true
  1005. },100)
  1006. this.queryParams.province = undefined; this.queryParams.city = undefined; this.queryParams.region = undefined;
  1007. this.queryParams.deptId = undefined
  1008. this.listd = []
  1009. this.resetForm('queryForm');
  1010. this.handleQuery();
  1011. },
  1012. // 多选框选中数据
  1013. handleSelectionChange(selection) {
  1014. this.ids = selection.map(item => item.id);
  1015. this.single = selection.length !== 1;
  1016. this.multiple = !selection.length;
  1017. },
  1018. /** 新增按钮操作 */
  1019. handleAdd() {
  1020. this.reset();
  1021. this.opens = true;
  1022. (this.naneme = false),
  1023. (this.shouwes = false);
  1024. this.selected = ['安徽省', '安庆市', '潜山市'],
  1025. this.form.province = this.selected[0];
  1026. this.villageTownshy = '';
  1027. this.naiseurya = '';
  1028. this.hsuej = '';
  1029. this.form.city = this.selected[1];
  1030. this.form.region = this.selected[2];
  1031. this.title = '添加常住人口';
  1032. this.jdourdjoaj = true;
  1033. this.jue = true
  1034. this.form.province = '安徽省';
  1035. this.form.city = '安庆市';
  1036. this.form.region = '潜山市';
  1037. this.form.residenceTown = '梅城镇';
  1038. this.form.residenceVillage = '龙井社区';
  1039. this.nhdyesfgh = this.form.province + '/' + this.form.city + '/' + this.form.region + '/' + this.form.residenceTown + '/' + this.form.residenceVillage;
  1040. console.log(this.form)
  1041. },
  1042. /** 修改按钮操作 */
  1043. handleUpdate(row) {
  1044. this.reset();
  1045. const id = row.id || this.ids;
  1046. getInfo(id).then(response => {
  1047. this.form = response.data;
  1048. this.jue = false
  1049. if(response.data.province !== null && response.data.province !== ""){
  1050. this.nhdyesfgh = response.data.province;
  1051. if(response.data.city !== null && response.data.city !== ""){
  1052. this.nhdyesfgh = response.data.province + '/' + response.data.city;
  1053. if(response.data.region !== null && response.data.region !== ""){
  1054. this.nhdyesfgh = response.data.province + '/' + response.data.city + '/' + response.data.region;
  1055. if(this.form.residenceTown !==null && this.form.residenceTown !=='' && this.form.residenceTown !== undefined){
  1056. this.nhdyesfgh = response.data.province + '/' + response.data.city + '/' + response.data.region + '/' + this.form.residenceTown;
  1057. if(this.form.residenceVillage !==null && this.form.residenceVillage !=='' && this.form.residenceVillage !== undefined){
  1058. this.nhdyesfgh = response.data.province + '/' + response.data.city + '/' + response.data.region + '/' + this.form.residenceTown + '/' + this.form.residenceVillage;
  1059. }
  1060. }
  1061. }else{
  1062. // this.nhdyesfgh ='点击选择居住地址'
  1063. }
  1064. }else{
  1065. // this.nhdyesfgh ='点击选择居住地址'
  1066. }
  1067. }else{
  1068. this.nhdyesfgh ='点击选择居住地址'
  1069. }
  1070. // if(response.data.province !== null){
  1071. // this.selected[0] = response.data.province;
  1072. // }else{
  1073. // this.selected[0] ='安徽省'
  1074. // }
  1075. // if(response.data.city !== null){
  1076. // this.selected[1] = response.data.city;
  1077. // }else{
  1078. // this.selected[1] = '安庆市'
  1079. // }
  1080. // if(response.data.region !== null){
  1081. // this.selected[2] = response.data.region;
  1082. // }else{
  1083. // this.selected[2] = '潜山市'
  1084. // }
  1085. // this.onSelected(this.selected)
  1086. setTimeout( ()=>{
  1087. this.jue = true
  1088. },100)
  1089. // this.jue = true
  1090. console.log(this.selected,98767)
  1091. // if(this.form){
  1092. if (this.form.isVaccination !== null) {
  1093. if (this.form.isVaccination == '是') {
  1094. // 接种疫苗
  1095. (this.naneme = false), (this.shouwes = true);
  1096. } else {
  1097. (this.naneme = true), (this.shouwes = false);
  1098. }
  1099. } else {
  1100. this.naneme = false;
  1101. this.shouwes = false;
  1102. }
  1103. if (this.form.dictValue !== null && this.form.dictValue !== undefined) {
  1104. this.jicheru(this.form.dictValue);
  1105. }
  1106. if (this.form.villageTowns !== null) {
  1107. this.villageTownshy = this.form.villageTowns;
  1108. if (this.form.village !== null) {
  1109. this.villageTownshy = this.form.village;
  1110. if (this.form.villagerGroup !== null) {
  1111. this.villageTownshy = this.form.villagerGroup;
  1112. }
  1113. }
  1114. }else{
  1115. this.villageTownshy = '';
  1116. }
  1117. console.log(this.villageTownshy,3455)
  1118. if (this.form.vaccineInfoUserList !== null) {
  1119. if (this.form.vaccineInfoUserList.length == 0) {
  1120. }else {
  1121. this.form.isVaccination = '是'
  1122. this.form.vaccineInfoUserList.filter(router =>{
  1123. if(router.url == undefined){
  1124. router.url = null
  1125. }else if(router.url == []){
  1126. router.url = null
  1127. }
  1128. router.disableg = true
  1129. })
  1130. }
  1131. }
  1132. // villageTownshy
  1133. // }
  1134. // this.heuiq.push()
  1135. this.naiseurya = '';
  1136. this.hsuej = '';
  1137. this.opens = true;
  1138. this.jdourdjoaj = false;
  1139. this.title = '查看编辑常住人口';
  1140. });
  1141. },
  1142. chahe(data) {
  1143. console.log(data);
  1144. // let labelValue = this.$refs['myCascader'].inputValue
  1145. // console.log(labelValue)
  1146. console.log(this.$refs['myCascader'])
  1147. this.form.villageTowns = data[1];
  1148. this.form.village = data[2];
  1149. this.form.villagerGroup = data[3];
  1150. if (this.form.villageTowns !== undefined) {
  1151. this.hsuej = this.form.villageTowns;
  1152. if (this.form.village !== undefined) {
  1153. this.hsuej = this.form.villageTowns + this.form.village;
  1154. if (this.form.villagerGroup !== undefined) {
  1155. this.hsuej = this.form.villageTowns + this.form.village + this.form.villagerGroup;
  1156. }
  1157. }
  1158. }
  1159. this.form.domicile = '';
  1160. // if(this.jdourdjoaj == true){
  1161. // //新增
  1162. // this.form.nowIn = this.hsuej
  1163. // }else{
  1164. // this.form.nowIn != this.hsuej
  1165. // }
  1166. },
  1167. chahetwo(data) {
  1168. console.log(data)
  1169. // this.queryParams.villageTowns = data[1];
  1170. // this.queryParams.village = data[2];
  1171. // this.queryParams.villagerGroup = data[3];
  1172. this.queryParams.deptId = data[ data.length - 1]
  1173. },
  1174. /** 提交按钮 */
  1175. submitForm() {
  1176. this.$refs['form'].validate(valid => {
  1177. console.log(this.selected);
  1178. if (valid) {
  1179. if (this.form.id != null) {
  1180. // this.form.nowIn = this.naiseurya + this.form.nowIn;
  1181. // this.form.domicile = this.hsuej + this.form.domicile;
  1182. updateInfo(this.form).then(response => {
  1183. this.msgSuccess('修改成功');
  1184. this.opens = false;
  1185. this.getList();
  1186. });
  1187. } else {
  1188. // this.form.nowIn = this.naiseurya + this.form.nowIn;
  1189. // this.form.domicile = this.hsuej + this.form.domicile;
  1190. // if (this.form.nowIn == 'undefined') {
  1191. // this.form.nowIn = null;
  1192. // }
  1193. console.log(this.form)
  1194. // return
  1195. addInfo(this.form).then(response => {
  1196. this.msgSuccess('新增成功');
  1197. this.opens = false;
  1198. this.getList();
  1199. });
  1200. }
  1201. }
  1202. });
  1203. },
  1204. /** 删除按钮操作 */
  1205. handleDelete(row) {
  1206. const ids = row.id || this.ids;
  1207. this.idfer = ids
  1208. this.imashow = true;
  1209. // this.$confirm('是否确认删除疫苗信息编号为"' + ids + '"的数据项?', '警告', {
  1210. // confirmButtonText: '确定',
  1211. // cancelButtonText: '取消',
  1212. // type: 'warning'
  1213. // })
  1214. // .then(function() {
  1215. // return delInfo(ids);
  1216. // })
  1217. // .then(() => {
  1218. // this.getList();
  1219. // this.msgSuccess('删除成功');
  1220. // });
  1221. },
  1222. submitFormfr(){
  1223. // formgt
  1224. if(this.formgt.houseType == null || this.formgt.houseType == undefined){
  1225. this.$message.error('请选择删除原因');
  1226. return false
  1227. }
  1228. let nhue = {}
  1229. nhue.deleteReason = this.formgt.houseType
  1230. nhue.id = this.idfer
  1231. delInfo(nhue).then(response => {
  1232. this.msgSuccess('删除成功');
  1233. this.imashow = false;
  1234. this.getList();
  1235. });
  1236. },
  1237. /** 导出按钮操作 */
  1238. handleExport() {
  1239. var heuia = {
  1240.      tableName: "vaccine_info",
  1241.      empty: false,
  1242.      condition: {}
  1243. }
  1244. var that=this;
  1245. heuia.condition = this.queryParams
  1246. const queryParams = this.queryParams
  1247. this.$confirm('是否确认导出?', "警告", {
  1248. confirmButtonText: "确定",
  1249. cancelButtonText: "取消",
  1250. type: "warning"
  1251. }).then(function() {
  1252. return exportConfig(heuia);
  1253. }).then(response => {
  1254. const jues= response.data
  1255. that.exportflag=false;
  1256. that.$alert('数据导入中,系统将自动处理数据,请稍后查看结果', "导出结果", { dangerouslyUseHTMLString: true });
  1257. // that.msgSuccess('数据导入中,系统将自动处理数据,请稍后查看结果');
  1258. // exportConfigtyr().then(responsr => {
  1259. // console.log(responsr)
  1260. // if(responsr.data == true){
  1261. // // this.download(jues);
  1262. // // window.location.href = jues
  1263. // window.open(jues)
  1264. // }else{
  1265. // this.msgSuccess('数据暂未加载完成,请稍后点击导出进度按钮查看');
  1266. // }
  1267. // });
  1268. })
  1269. // this.download('/boman-web-core/core/info/export',
  1270. // {
  1271. // ...this.queryParams
  1272. // },
  1273. // `post_${new Date().getTime()}.xlsx`
  1274. // );
  1275. },
  1276. // 点击查看
  1277. chakei(row) {
  1278. console.log(row);
  1279. let nhyes= {pageNum: 1,
  1280. pageSize: 10,}
  1281. this.nhyesoder = row
  1282. if(row == 0){
  1283. // 新增
  1284. listInfotjxz(this.ndhuwosdjh).then(response => {
  1285. // this.msgSuccess('操作成功');
  1286. this.jiezheList = response.rows
  1287. this.totalfr = response.total
  1288. })
  1289. } else if(row == 1){
  1290. // 减少
  1291. listInfotjjs(this.ndhuwosdjh).then(response => {
  1292. // this.msgSuccess('操作成功');
  1293. this.jiezheList = response.rows
  1294. this.totalfr = response.total
  1295. } )
  1296. }// yiaoe({idCard:row.idCard}).then(response => {
  1297. // // this.msgSuccess('操作成功');
  1298. // if(response.code == 200){
  1299. // this.jiezheList = response.data
  1300. // }
  1301. // });
  1302. this.jiezhong = true;
  1303. },
  1304. // 查看家庭成员信息
  1305. handleDeletefamide(row){
  1306. this.jiezhong = true;
  1307. this.nhyesoder = 3
  1308. listInfotjjsfaml(row.code).then(response => {
  1309. // this.msgSuccess('操作成功');
  1310. this.jiezheList = response.data
  1311. this.totalfr = 0
  1312. } )
  1313. },
  1314. /** 导入按钮操作 */
  1315. handleImport() {
  1316. this.upload.title = "数据导入";
  1317. this.upload.opens = true;
  1318. },
  1319. // 判断是否选择户主
  1320. changese(){
  1321. console.log(this.form.houseType)
  1322. if(this.form.houseType == '是'){
  1323. this.form.code = this.form.idCard
  1324. this.nhe = false
  1325. }else{
  1326. this.form.code != this.form.idCard
  1327. this.nhe = true
  1328. }
  1329. }
  1330. }
  1331. };
  1332. </script>
  1333. <style lang="scss">
  1334. .placf {
  1335. .el-input {
  1336. .el-input__inner::placeholder{
  1337. color: #333;
  1338. }
  1339. /* 谷歌 */
  1340. .el-input__inner::-webkit-input-placeholder {
  1341. color: #333;
  1342. }
  1343. /* 火狐 */
  1344. .el-input__inner:-moz-placeholder {
  1345. color: #333;
  1346. }
  1347. /*ie*/
  1348. .el-input__inner:-ms-input-placeholder {
  1349. color: #333;
  1350. }
  1351. }
  1352. }
  1353. .jdueuh{
  1354. .el-form-item__label {
  1355. width: 0px !important;
  1356. }
  1357. .el-form-item__content {
  1358. margin-left: 10px !important;
  1359. // width: 70%;
  1360. }
  1361. }
  1362. .ijeuhdy{
  1363. .el-form-item__label {
  1364. width: 80px !important;
  1365. }
  1366. .el-form-item__content {
  1367. margin-left: 80px !important;
  1368. // width: 70%;
  1369. }
  1370. }
  1371. .znshu{
  1372. .el-form-item__label {
  1373. width: 80px !important;
  1374. // padding-left: 30px;
  1375. }
  1376. .el-form-item__content {
  1377. margin-left: 80px !important;
  1378. // width: 70%;
  1379. }
  1380. .el-input__inner{
  1381. padding-left: 0 !important;
  1382. }
  1383. }
  1384. .heioangd{
  1385. .el-form-item__label {
  1386. width: 70px !important;
  1387. }
  1388. .el-form-item__content {
  1389. margin-left: 70px !important;
  1390. // width: 70%;
  1391. }
  1392. }
  1393. .hues {
  1394. .area-select {
  1395. margin-left: 0 !important;
  1396. margin-right: 10px;
  1397. }
  1398. }
  1399. .jehak {
  1400. .el-form-item {
  1401. width: 100%;
  1402. }
  1403. .el-form-item__content {
  1404. width: 60%;
  1405. }
  1406. }
  1407. .oiuyty {
  1408. .el-form-item__label {
  1409. width: 80px !important;
  1410. }
  1411. .el-form-item__content {
  1412. margin-left: 80px !important;
  1413. // width: 70%;
  1414. }
  1415. input {
  1416. padding-right: 0 !important;
  1417. }
  1418. }
  1419. .el-dialog__body {
  1420. padding-top: 0;
  1421. padding-bottom: 0;
  1422. }
  1423. .jhy {
  1424. // width: 100%;
  1425. // .el-form-item__content {
  1426. // width: 100%;
  1427. // margin-left: 0 !important;
  1428. // }
  1429. .el-form-item__content {
  1430. margin-left: 55px !important;
  1431. // width: 70%;
  1432. }
  1433. .el-form-item__label {
  1434. width: 55px !important;
  1435. }
  1436. }
  1437. .ehiqya {
  1438. .el-form-item__content {
  1439. display: flex;
  1440. .jdidur {
  1441. flex: 1;
  1442. margin-left: 10px;
  1443. // text-align: left;
  1444. display: flex;
  1445. }
  1446. }
  1447. .upload-demo {
  1448. display: flex;
  1449. }
  1450. }
  1451. .jdoier{
  1452. display: flex;
  1453. align-items: center;
  1454. .upload-demo {
  1455. display: flex;
  1456. }
  1457. }
  1458. .hueyde {
  1459. width: 18px;
  1460. height: 18px;
  1461. margin: 0 5px;
  1462. margin-right: 10px;
  1463. }
  1464. .hueydele {
  1465. width: 15px;
  1466. height: 18px;
  1467. }
  1468. .hyeoa {
  1469. height: 100%;
  1470. display: flex;
  1471. align-items: center;
  1472. }
  1473. .hjdoecdre {
  1474. // margin-top: 50%;
  1475. transform: translateY(50%);
  1476. }
  1477. .ojhgy {
  1478. .el-dialog {
  1479. padding-bottom: 40px;
  1480. padding-top: 10px;
  1481. }
  1482. .el-dialog__header {
  1483. padding-bottom: 20px;
  1484. }
  1485. .el-table .cell {
  1486. line-height: 50px;
  1487. }
  1488. }
  1489. .hueya{
  1490. margin-left: 0 !important;
  1491. }
  1492. .iejghiadh{
  1493. .el-input__inner{
  1494. padding-right: 0 !important;
  1495. padding-left: 5px !important;
  1496. }
  1497. }
  1498. </style>