123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797 |
- <template>
- <div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
- <el-row>
- <el-col :span="24">
- <el-row>
- <el-col :span="8">
- <el-form-item label="姓名" prop="userName">
- <el-input v-model="queryParams.userName" placeholder="请输入姓名" style="width:240px;" clearable @keyup.enter.native="handleQuery" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="身份证号" prop="idCard">
- <el-input v-model="queryParams.idCard" placeholder="请输入身份证号码" style="width:240px;" clearable @keyup.enter.native="handleQuery" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="联系号码" prop="phoneNum">
- <el-input v-model="queryParams.phoneNum" placeholder="请输入联系号码" style="width:240px;"clearable @keyup.enter.native="handleQuery" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="8">
- <el-form-item label="剂次" prop="jici">
- <el-select style="width:240px;" v-model="queryParams.jici" placeholder="剂次" clearable :disabled="shouwestwo">
- <el-option v-for="dict in typeOptionstimesgt" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col><el-col :span="8">
- <el-form-item label="年龄阶段" >
- <el-select v-model="queryParams.params.age" placeholder="年龄阶段" style="width:240px;" clearable>
- <el-option v-for="dict in angesList" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="4.8">
- <el-form-item label="重点行业" prop="keyIndustries">
- <el-select v-model="queryParams.keyIndustries" placeholder="重点行业" clearable style="width:240px;">
- <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col>
-
-
- </el-row>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="8">
- <el-form-item label="疫苗名称" prop="vaccineName">
- <el-select style="width:240px;" v-model="queryParams.vaccineName" placeholder="疫苗名称" clearable :disabled="shouwestwo" >
- <el-option v-for="dict in typeOptionsname" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="接种时间" prop="vaccinationTime">
- <el-date-picker
- clearable
- v-model="queryParams.vaccinationTime"
- type="date"
- value-format="yyyy-MM-dd"
- format="yyyy-MM-dd"
- placeholder="选择接种时间"
- style="width:240px;"
- :disabled="shouwestwo"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="接种地点" prop="vaccinationPlace">
- <el-select v-model="queryParams.vaccinationPlace" placeholder="接种地点" style="width:240px;" clearable :disabled="shouwestwo">
- <el-option v-for="dict in typeOptionsvaccinatio" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="8" class="jehak">
- <el-form-item label="户籍地址" prop="villagerGroup">
- <el-cascader
- placeholder="点击选择户籍地址"
- :options="options"
- filterable
- @change="chahetwo"
- :props="optionProps"
- style="width: 110%;"
- @keyup.enter.native="handleQuery"
- clearable
- ></el-cascader>
- </el-form-item>
- </el-col>
- <el-col :span="14" class="jehak">
- <el-form-item label="居住地址" prop="villagerGroup">
- <!-- <el-cascader
- placeholder="点击选择居住地址"
- :options="options"
- filterable
- @change="chahetwo"
- :props="optionProps"
- style="width: 100%;"
- @keyup.enter.native="handleQuery"
- clearable
- ></el-cascader> -->
- <area-select
- type="text"
- v-model="selectedtwo"
- :data="$pcaa"
- :level="2"
- style="display: flex;line-height: 18px;"
- @change="onSelectedtwo"
- @blur="dakousr"
- class="hues"
- ></area-select>
- </el-form-item>
- </el-col>
-
-
- </el-row>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="5">
- <el-form-item label="接种情况" prop="isVaccination">
- <el-radio-group v-model="queryParams.isVaccination" @change="gywoatwo">
- <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="应种未种" prop="shouldBe">
- <el-radio-group v-model="queryParams.shouldBe" style="width: 100%;" :disabled="!shouwestwo">
- <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
- </el-radio-group>
- <!-- <el-input
- v-model="queryParams.shouldBe"
- placeholder="请输入应种未种
- "
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- /> -->
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="应续未续" prop="shouldSlow">
- <el-radio-group v-model="queryParams.shouldSlow" style="width: 100%;">
- <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
- </el-radio-group>
- <!-- <el-input
- v-model="queryParams.shouldBe"
- placeholder="请输入应种未种
- "
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- /> -->
- </el-form-item>
- </el-col>
-
- <el-col :span="4" style="text-align: center;">
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-col>
- </el-row>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <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>
- <el-col :span="1.5">
- <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['core:info:edit']">修改</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['core:info:remove']">删除</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['core:info:export']">导出</el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
- <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" height="350">
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="姓名" align="center" prop="userName" fixed />
- <el-table-column label="是否完成" align="center" prop="progress" fixed />
- <el-table-column label="最后一次的接种时间" align="center" prop="vaccinationTime" width="150" />
- <el-table-column label="下次应接时间" align="center" prop="vaccinationTimeNext" width="120"/>
- <el-table-column label="联系方式" align="center" prop="phoneNum" />
- <!-- <el-table-column label="性别" align="center" prop="gender" /> -->
- <el-table-column label="身份证号码" align="center" prop="idCard" width="180" />
- <!-- <el-table-column label="现居省份" align="center" prop="province" />
- <el-table-column label="现居市" align="center" prop="city" />
- <el-table-column label="现居县区" align="center" prop="region" /> -->
- <el-table-column label="户籍地址" align="center" prop="domicileSelect" width="250" />
- <el-table-column label="居住地址" align="center" prop="nowInSelect" width="250" />
-
- <!-- <el-table-column label="户籍乡镇" align="center" prop="villageTowns" />
- <el-table-column label="户籍村居" align="center" prop="village" />
- <el-table-column label="户籍村民组" align="center" prop="villagerGroup" /> -->
- <!-- <el-table-column label="户主" align="center" prop="houseType" /> -->
-
- <!-- <el-table-column label="重点行业" align="center" prop="keyIndustries" /> -->
- <!-- <el-table-column label="接种情况" align="center" prop="isVaccination" /> -->
- <!-- <el-table-column label="接种记录" align="center" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button size="mini" type="text" @click="chakei(scope.row)">查看</el-button>
-
- </template>
- </el-table-column> -->
- <!-- v-hasPermi="['core:info:edit']" -->
- <!-- <el-table-column
- label="应种未种
- "
- align="center"
- prop="shouldBe"
- /> -->
- <!-- <el-table-column label="工作单位" align="center" prop="other" /> -->
- <!-- <el-table-column label="进度" align="center" prop="vaccineInfoUserList[0].progress" /> -->
- <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
- <!-- <el-table-column label="状态" align="center" prop="status">
- <template slot-scope="scope">
- <span>{{ scope.row.status==0?'启用' :'停用' }}</span>
- </template>
- </el-table-column> -->
- <!-- <el-table-column label="是否删除" align="center" prop="isDel" /> -->
- <el-table-column label="操作" align="left" class-name="small-padding fixed-width" fixed="right" >
- <template slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['core:info:edit']">查看修改</el-button>
- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" class="hueya" v-hasPermi="['core:info:remove']">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
- <!-- 添加或修改疫苗信息对话框 -->
- <el-dialog :title="title" :visible.sync="open" width="1240px" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
- <el-row>
- <el-col :span="8">
- <el-form-item label="身份证号" prop="idCard"><el-input v-model="form.idCard" placeholder="请输入身份证号码" @blur="idcde" /></el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="姓名" prop="userName"><el-input v-model="form.userName" placeholder="请输入姓名" /></el-form-item>
- </el-col>
- <!-- <el-col :span="6">
- <el-form-item label="出生日期" prop="birthday">
- <el-date-picker
- clearable
- v-model="form.birthday"
- type="date"
- value-format="yyyy-MM-dd"
- format="yyyy-MM-dd "
- style="width: 100%;"
- placeholder="选择出生日期"
- ></el-date-picker>
- </el-form-item>
- </el-col> -->
- <el-col :span="8">
- <el-form-item label="性别" prop="gender">
- <!-- <el-input v-model="form.gender" placeholder="请输入性别" /> -->
- <el-select v-model="form.gender" placeholder="性别" clearable style="width: 100%;">
- <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="8">
- <el-form-item label="联系号码" prop="phoneNum"><el-input v-model="form.phoneNum" placeholder="请输入联系号码" /></el-form-item>
- </el-col>
- <!-- <el-col :span="6">
- <el-form-item label="编号" prop="code"><el-input v-model="form.code" placeholder="请输入编号" /></el-form-item>
- </el-col> -->
- <el-col :span="8">
- <el-form-item label="重点行业" prop="keyIndustries">
- <el-select v-model="form.keyIndustries" placeholder="重点行业" clearable style="width: 100%;">
- <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="年龄" prop="age"><el-input v-model="form.age" placeholder="请输入年龄" /></el-form-item>
- </el-col>
- </el-row>
- </el-col>
- <el-col :span="12">
- <el-form-item label="现居地" prop="region">
- <area-select
- type="text"
- v-model="selected"
- :data="$pcaa"
- :level="2"
- style="display: flex;line-height: 18px;"
- @change="onSelected"
- @blur="dakousr"
- class="hues"
- ></area-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="详细地址" prop="nowIn"><el-input v-model="form.nowIn" type="input" placeholder="请输入内容" /></el-form-item>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="12">
- <el-form-item label="户籍地址" prop="villagerGroup">
- <!-- <el-input v-model="form.villageTowns" type="textarea" placeholder="请输入内容" /> -->
- <!-- <treeselect v-model="form.parentId" :options="deptOptionstwo" :normalizer="normalizer" :flat="true" :maxHeight="150" @select="djieskle" :multiple=true placeholder="点击选择户籍地" /> -->
- <el-cascader
- placeholder="点击选择户籍地址"
- :options="options"
- :filterable="true"
- @change="chahe"
- v-model="villageTownshy"
- :props="optionProps"
- style="width: 100%;"
- ></el-cascader>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="详细地址" prop="domicile"><el-input v-model="form.domicile" type="input" placeholder="请输入户籍详细地址" /></el-form-item>
- </el-col>
- </el-row>
- </el-col>
- <el-col :span="12">
- <el-form-item label="工作单位" prop="work_unit"><el-input v-model="form.workUnit" placeholder="请输入工作单位" /></el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="备注" prop="remark"><el-input v-model="form.remark" placeholder="请输入备注" /></el-form-item>
- </el-col>
- <!-- <el-col :span="12">
- <el-form-item label="人群分类" prop="crowd_classification"><el-input v-model="form.crowd_classification" placeholder="请输入人群分类" /></el-form-item>
- </el-col> -->
- <el-col :span="12">
- <el-form-item label="户主" prop="houseType">
- <!-- <el-select v-model="form.houseType" placeholder="请选择户别"><el-option label="请选择字典生成" value="" /></el-select> -->
- <!-- <el-input v-model="form.houseType" placeholder="请输入内容" /> -->
- <el-select v-model="form.houseType" placeholder="户主" clearable style="width: 100%;">
- <el-option v-for="dict in typeOptionshuuj" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="5.5">
- <el-form-item label="接种情况" prop="isVaccination">
- <!-- <el-input v-model="form.isVaccination" placeholder="请输入接种情况" /> -->
- <el-radio-group v-model="form.isVaccination" @change="gywoa">
- <el-radio v-for="dict in typeOptionsty" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="3">
- <el-form-item label="应种未种" prop="shouldBe">
- <el-checkbox :disabled="shouwes" v-model="form.shouldBe" true-label="是" false-label="否"></el-checkbox>
- </el-form-item>
- </el-col> -->
- <!-- <el-col :span="5">
- <el-form-item label="应续未续" prop="shouldSlow">
- <el-checkbox v-model="form.shouldSlow" true-label="是" false-label="否"></el-checkbox>
- </el-form-item>
- </el-col> -->
- </el-row>
- </el-col>
- <el-col :span="24" style="height: 40px;"><el-form-item label="接种记录 :" prop="shouldBe"></el-form-item></el-col>
- <el-col :span="24" v-for="(item, index) in form.vaccineInfoUserList" :key="index">
- <el-row type="flex">
- <!-- <el-col :span="4"> -->
- <el-form-item label="疫苗名称" class="iejghiadh">
- <el-select v-model="item.vaccineName" placeholder="疫苗名称" style="width:123px" clearable :disabled="naneme" @change="changeheu(index)">
- <el-option
- v-for="dict in typeOptionsname"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="{ value: dict.dictValue, label: dict.dictLabel }"
- />
- </el-select>
- </el-form-item>
- <!-- </el-col> -->
- <!-- <el-col :span="4" class="oiuyty"> -->
- <el-form-item label="接种时间" class="oiuyty">
- <el-date-picker
- clearable
- v-model="item.vaccinationTime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- placeholder="选择接种时间"
- style="width: 167px;"
- :disabled="naneme"
- ></el-date-picker>
- </el-form-item>
- <!-- </el-col> -->
- <el-col :span="4" class="ijeuhdy">
- <el-form-item label="接种地点" >
- <el-select :disabled="naneme" v-model="item.vaccinationPlace" placeholder="接种地点" clearable size="small" style="100%">
- <el-option v-for="dict in typeOptionsvaccinatio" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
- <!-- dict.dictValue -->
- </el-select>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="3"> -->
- <el-form-item label="剂次" class="jhy">
- <!-- <el-input v-model="form.jici" placeholder="请输入剂次" /> -->
- <el-select @change="changeheujici(index)" v-model="item.jici" placeholder="剂次" clearable style="width:75px" :disabled="naneme" >
- <el-option
- v-for="dict in typeOptionstimes"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="{ value: dict.dictValue, label: dict.dictLabel }"
- />
- </el-select>
- </el-form-item>
- <!-- </el-col> -->
- <el-col style="width: 135px;">
- <el-form-item label="进度" class="jhy">
- <el-select v-model="item.progress" placeholder="进度" clearable style="width:100%" :disabled="naneme">
- <el-option v-for="dict in statusOptionstue" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item class="jdueuh">
- <div class="jdidur jdoier">
- <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
- <el-upload
- :disabled="naneme"
- class="upload-demo"
- :headers="{ Authorization: 'Bearer ' + getToken() }"
- :action="process + '/boman-file/upload'"
- :on-change="handleChangertwo"
- :on-success="upImageFntwo"
- :on-error="errtwo"
- :on-remove="reseImagetwo"
- :file-list="item.url == '' ? item.url : JSON.parse(item.url)"
- :on-preview="handlePictureCardPreviewtwo"
- :before-upload="beforstwo"
- >
- <el-button size="small" type="primary">附件上传</el-button>
- </el-upload>
- </el-tooltip>
- <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
- <div class="hyeoa">
- <el-tooltip class="item" effect="dark" content="新增疫苗信息,请慎重操作" placement="top-start">
- <img src="../../../assets/images/icon_tc_add.png" alt="" class="hueyde" @click="tijea(index)" />
- </el-tooltip>
- <el-tooltip class="item" effect="dark" content="删除无法恢复,请慎重操作" placement="top-start">
- <img src="../../../assets/images/delei.png" alt="" class="hueydele" @click="naeyrfakjf(index, item)" />
- </el-tooltip>
- </div>
- </div>
- </el-form-item>
- </el-col>
-
- <!-- <el-col :span="2" class="hjdoecdre"> -->
-
- <!-- </el-col> -->
- </el-row>
- </el-col>
- <el-col :span="24">
- <el-row>
- <el-col :span="7" style="width: 360px;">
- <el-row>
- <el-col :span="16">
- <el-form-item label="禁忌症" prop="contraindication" class="ehiqya">
- <el-select :disabled="shouwes" v-model="form.contraindication" placeholder="禁忌症" clearable size="small" style="width: 100%;">
- <el-option v-for="dict in typeOptionscont" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6" style="margin-left: 10px;">
- <div class="jdidur">
- <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
- <el-upload
- :disabled="shouwes"
- class="upload-demo"
- :headers="{ Authorization: 'Bearer ' + getToken() }"
- :action="process + '/boman-file/upload'"
- :on-change="handleChangert"
- :on-success="upImageFn"
- :on-error="err"
- :on-remove="reseImage"
- :file-list="config"
- :on-preview="handlePictureCardPreview"
- :before-upload="befors"
- >
- <el-button size="small" type="primary">附件上传</el-button>
- </el-upload>
- </el-tooltip>
- <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
- </div>
- </el-col>
-
- </el-row>
- </el-col>
- <el-col :span="9">
- <el-row>
- <el-col :span="18" class="znshu">
- <el-form-item label="暂缓接种" prop="suspend">
- <!-- <el-input
- v-model="form.suspend"
- placeholder="请输入暂缓"
- /> -->
- <el-select :disabled="shouwes" v-model="form.suspend" placeholder="暂缓接种" clearable size="small" style="width: 100%;">
- <el-option v-for="dict in typeOptionstyzandeh" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel" />
- <!-- dict.dictValue -->
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="5" style="margin-left: 10px;">
- <div class="jdidur">
- <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
- <el-upload
- :disabled="shouwes"
- class="upload-demo"
- :headers="{ Authorization: 'Bearer ' + getToken() }"
- :action="process + '/boman-file/upload'"
- :on-change="handleChangerther"
- :on-success="upImageFnther"
- :on-error="err"
- :on-remove="reseImagether"
- :file-list="configther"
- :on-preview="handlePictureCardPreviewther"
- :before-upload="beforsther"
- >
- <el-button size="small" type="primary">附件上传</el-button>
- </el-upload>
- </el-tooltip>
- <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
- </div>
- </el-col>
-
- </el-row>
- </el-col>
- <el-col :span="7">
- <el-row>
- <el-col :span="12" class="heioangd">
- <el-form-item label="其他" prop="other" class="ehiqya">
- <el-select :disabled="shouwes" v-model="form.other" placeholder="其他" clearable size="small" style="width: 100%;">
- <el-option v-for="dict in typeOptionscontqit" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictLabel"/>
- <!-- dictValue -->
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8" style="margin-left: 10px;">
- <div class="jdidur">
- <el-tooltip class="item" effect="dark" content="请上传png/jpg文档,且不超过50MB" placement="top-start">
- <el-upload
- :disabled="shouwes"
- class="upload-demo"
- :headers="{ Authorization: 'Bearer ' + getToken() }"
- :action="process + '/boman-file/upload'"
- :on-change="handleChangerfor"
- :on-success="upImageFnfor"
- :on-error="errfor"
- :on-remove="reseImagefor"
- :file-list="configfor"
- :on-preview="handlePictureCardPreviewfor"
- :before-upload="beforsfor"
- >
- <el-button size="small" type="primary">附件上传</el-button>
- </el-upload>
- </el-tooltip>
- <!-- <div class="el-upload__tip" style="margin-left: 5px; color: red; margin-top: 0;">请上传png/jpg文档,且不超过50MB</div> -->
- </div>
- </el-col>
-
- </el-row>
- </el-col>
-
- </el-row>
- </el-col>
- </el-row>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 图片预览 -->
- <el-dialog :close-on-click-modal="false" title="预览" :visible.sync="imashow" width="1200px" append-to-body>
- <div class="demo-image__preview">
- <img :src="dialogImageUrl" alt="" style="width: 100%;" />
- <!-- <iframe v-if="shouewhu" :src="dialogImageUrl" frameborder="0" style="width: 100%; height: 100vh;"></iframe>
- <a v-if="exelshow" :href="dialogImageUrl" :download="dialogImageUrlname" >{{dialogImageUrlname}} <span style="color: #039BE5;">点击下载</span></a> -->
- </div>
- </el-dialog>
- <!-- 接种记录 -->
- <el-dialog :close-on-click-modal="false" title="接种记录" :visible.sync="jiezhong" width="1200px" append-to-body class="ojhgy">
- <el-table :data="jiezheList" stripe style="width: 100%">
- <el-table-column label="疫苗名称" align="center" prop="vaccineName" />
- <el-table-column label="剂次" align="center" prop="jici" />
- <el-table-column label="接种时间" align="center" prop="vaccinationTime" width="180">
- <template slot-scope="scope">
- <span>{{ scope.row.vaccinationTime }}</span>
- </template>
- </el-table-column>
- <el-table-column label="接种地点" align="center" prop=".vaccinationPlace" />
- </el-table>
- </el-dialog>
- </div>
- </template>
- <script>
- import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe } from '@/api/system/time';
- import { treeselect } from '@/api/system/dept';
- import Treeselect from '@riophae/vue-treeselect';
- import { getToken } from '@/utils/auth';
- import '@riophae/vue-treeselect/dist/vue-treeselect.css';
- export default {
- name: 'Info',
- components: { Treeselect },
- data() {
- return {
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 疫苗信息表格数据
- infoList: [],
- dialogImageUrl: '',
- // 弹出层标题
- title: '',
- // 是否显示弹出层
- open: false,
- process: process.env.VUE_APP_BASE_API,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- villageTowns: null,
- village: null,
- villagerGroup: null,
- houseType: null,
- domicile: null,
- province: null,
- city: null,
- region: null,
- userName: null,
- gender: null,
- idCard: null,
- phoneNum: null,
- keyIndustries: null,
- isVaccination: null,
- vaccineName: null,
- jici: null,
- vaccinationTime: null,
- vaccinationPlace: null,
- contraindication: null,
- suspend: null,
- death: null,
- lostInMissing: null,
- shouldBe: null,
- other: null,
- progress: null,
- status: null,
- isDel: null,
- params:{
- age:''
- }
- },
- config: [],
- comfietg:[],
- configther:[],
- configfor:[],
- // 表单参数
- form: {
- nowIn: '',
- age:'',
- vaccineInfoUserList: [
- {
- vaccineName: '',
- vaccinationTime: '',
- vaccinationPlace: '',
- jici: '',
- progress: '',
- url:''
- }
- ]
- },
- // 表单校验
- rules: {
- region: [{ required: true, message: '区不能为空', trigger: 'blur' }],
- idCard: [{ required: true, message: '身份证号码不能为空', trigger: 'blur' }],
- userName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }]
- },
- selected: ['安徽省', '安庆市', '潜山市'],
- selectedtwo: ['安徽省', '安庆市', '潜山市'],
- statusOptions: [
- {
- dictValue: '女',
- dictLabel: '女'
- },
- {
- dictValue: '男',
- dictLabel: '男'
- }
- ],
- statusOptionstue: [
- {
- dictValue: '已完成',
- dictLabel: '已完成'
- },
- {
- dictValue: '未完成',
- dictLabel: '未完成'
- }
- ],
- typeOptionshuuj: [
- {
- dictValue: '是',
- dictLabel: '是'
- },
- {
- dictValue: '否',
- dictLabel: '否'
- }
- ],
- deptOptionstwo: [],
- options: [],
- optionProps: {
- value: 'label',
- label: 'label',
- children: 'children',
- checkStrictly: true
- },
- heuiq: [],
- typeOptions: [],
- typeOptionsty: [
- {
- dictValue: '是',
- dictLabel: '是'
- },
- {
- dictValue: '否',
- dictLabel: '否'
- }
- ],
- typeOptionstyzandeh:[],
- angesList: [
-
- ],
- typeOptionsname: [],
- typeOptionstimes: [],
- typeOptionsvaccinatio: [],
- typeOptionscont: [],
- typeOptionscontty: [],
- typeOptionscontqit:[],
- // 剂次
- typeOptionstimesgt: [
- {
- dictValue: '1',
- dictLabel: '1'
- },
- {
- dictValue: '2',
- dictLabel: '2'
- },
- {
- dictValue: '3',
- dictLabel: '3'
- },
- {
- dictValue: '4',
- dictLabel: '加强针'
- }
- ],
- imashow: false,
- naneme: false,
- shouwes: false,
- shouwestwo:false,
- villageTownshy: undefined,
- naiseurya: '',
- hsuej: '',
- jdourdjoaj: false,
- jiezhong: false,
- jiezheList: [],
- fireLise:{config:[]},
- nameutaiL:0
- };
- },
- created() {
- this.getList();
- this.getTreeselectjue();
- // 重点行业
- this.getDicts('key_trades').then(response => {
- this.typeOptions = response.data;
- });
- // 疫苗名称
- this.getDicts('vaccine_name').then(response => {
- this.typeOptionsname = response.data;
- });
- // 接种地点
- this.getDicts('vaccination_site').then(response => {
- this.typeOptionsvaccinatio = response.data;
- });
- // 暂缓接种
- this.getDicts('moratorium_on_vaccination').then(response => {
- this.typeOptionstyzandeh = response.data;
- });
- // typeOptionscontty
- // 禁忌症
- this.getDicts('contraindication').then(response => {
- this.typeOptionscont = response.data;
- });
- // 其他 typeOptionscontqit
- this.getDicts('other_status').then(response => {
- this.typeOptionscontqit = response.data;
- });
- // 年龄阶段
- this.getDicts('age_interval').then(response => {
- this.angesList = response.data;
- });
-
- this.form.province = this.selected[0];
- this.form.city = this.selected[1];
- this.form.region = this.selected[2];
- this.queryParams.province = this.selectedtwo[0];
- this.queryParams.city = this.selectedtwo[1];
- this.queryParams.region = this.selectedtwo[2];
- // this.naiseurya = this.form.province + this.form.city + this.form.region;
- },
- methods: {
- onSelected(data) {
- console.log(data, 125);
- // province
- this.form.province = data[0];
- this.form.city = data[1];
- this.form.region = data[2];
- this.naiseurya = this.form.province + this.form.city + this.form.region;
- if (this.jdourdjoaj == false) {
- // 修改
- this.form.nowIn = '';
- }
- // this.form.nowIn = undefined
- // this.form.villageTowns = data[3]
- },
- dakousr() {
- console.log(2345);
- },
- onSelectedtwo(data) {
- console.log(data);
- // province
- this.queryParams.province = data[0];
- this.queryParams.city = data[1];
- this.queryParams.region = data[2];
- // this.queryParams.villageTowns = data[3]
- },
- /** 查询疫苗信息列表 */
- getList() {
- this.loading = true;
- listInfo(this.queryParams).then(response => {
- this.infoList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- getToken() {
- return getToken();
- },
- getTreeselectjue() {
- this.loading = true;
- listRoleer(this.queryParams).then(response => {
- this.options = response.data;
- this.loading = false;
- });
- },
- /** 转换角色数据结构 */
- normalizer(node) {
- // if (node.children && !node.children.length) {
- // delete node.children;
- // }
- return {
- id: node.id,
- label: node.roleName
- };
- },
- // 点击组/角色
- djieskle(node, instanceId) {
- // this.personnel(node.id);
- console.log(node, instanceId);
- },
- // 身份证
- idcde(event) {
- console.log(event);
- // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
- let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
- if (reg.test(this.form.idCard)) {
- this.idea();
- // this.go(this.form.idCard.length);
- // callback()
- } else {
- // callback(new Error('身份证号码不正确'))
- this.msgInfo('身份证号码不正确');
- }
- },
- // 实现自动生成生日,性别,年龄
- go(val) {
- let iden = this.form.idCard;
- let sex = null;
- let birth = null;
- let birthr = '';
- let myDate = new Date();
- let month = myDate.getMonth() + 1;
- let day = myDate.getDate();
- let age = 0;
- if (val === 18) {
- age = myDate.getFullYear() - iden.substring(6, 10) - 1;
- sex = iden.substring(16, 17);
- birth = iden.substring(6, 10) + '-' + iden.substring(10, 12) + '-' + iden.substring(12, 14);
- if (iden.substring(10, 12) < month || (iden.substring(10, 12) == month && iden.substring(12, 14) <= day)) age++;
- }
- if (val === 15) {
- age = myDate.getFullYear() - iden.substring(6, 8) - 1901;
- sex = iden.substring(13, 14);
- birth = '19' + iden.substring(6, 8) + '-' + iden.substring(8, 10) + '-' + iden.substring(10, 12);
- if (iden.substring(8, 10) < month || (iden.substring(8, 10) == month && iden.substring(10, 12) <= day)) age++;
- }
- if (sex % 2 === 0) sex = '女';
- else sex = '男';
- this.form.gender = sex;
- // this.baseInfo.age = age;
- birthr = birth + '';
- console.log(birthr);
- // this.form.birthday = birthr;
- // this.$set(this.form.birthday, birthr)
- // this.baseInfo.birthplace = this.area[iden.substring(0,2)];
- },
- // 请求身份证数据
- idea() {
- idces({ idCard: this.form.idCard }).then(response => {
- console.log(response);
- this.form.gender = response.data.gender;
- // this.form.birthday = response.data.birthday;
- this.form.age = response.data.age
- if (response.data.userName == null) {
- this.form.userName = undefined;
- } else {
- this.form.userName = response.data.userName;
- }
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.jiezhong = false;
- this.imashow = false;
- this.reset();
- },
- gywoa() {
- console.log(this.form.isVaccination);
- if (this.form.isVaccination !== null) {
- if (this.form.isVaccination == '是') {
- // 接种疫苗
- (this.naneme = false), (this.shouwes = true);
- } else {
- (this.naneme = true), (this.shouwes = false);
- }
- }
- },
- gywoatwo() {
- console.log(this.queryParams.isVaccination);
- if (this.queryParams.isVaccination !== null) {
- if (this.queryParams.isVaccination == '是') {
- // 接种疫苗
- // (this.naneme = false), (this.shouwes = true);
- this.shouwestwo = false
- } else {
- // (this.naneme = true), (this.shouwes = false);
- this.shouwestwo = true
- }
- }
- },
- // 上传前控制
- befors(res, file) {
- console.log(res, file);
- console.log(res.name.substr(0, res.name.length - 4));
- // if(res.type !== 'application/pdf'){
- // this.msgSuccess('只能上传pdf文件');
- // return false
- // }else{
- // return true
- // }
- return true;
- },
- // 图片预览
- handlePictureCardPreview(file) {
- console.log(file, 87);
- console.log(file.name.split('.'));
- let hegs = file.name.split('.');
- console.log(hegs[hegs.length - 1]);
- if (hegs[hegs.length - 1] == 'pdf') {
- this.shouewhu = true;
- } else {
- if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
- this.shouewhu = false;
- this.exelshow = false;
- } else {
- this.exelshow = true;
- }
- }
- console.log(this.shouewhu, this.exelshow);
- this.dialogImageUrl = file.url;
- this.dialogImageUrlname = file.name;
- console.log(this.dialogImageUrlname);
- this.dialogVisible = true;
- this.imashow = true;
- },
- // 上传文件
- handleChangert(file, fileList) {
- this.fileList = fileList.slice(-3);
- },
- upImageFn(res, file) {
- if (res.code !== 200) {
- this.msgSuccess('上传失败');
- return false;
- } else {
- this.msgSuccess('上传成功');
- this.config.push(res.data);
- this.config.filter( router=> {
- router.name = '禁忌症附件'
- })
- console.log(res.data);
- console.log(res.data.name.substr(0, res.data.name.length - 4));
- this.form.url = this.config;
- this.form.url = JSON.stringify(this.form.url);
- }
- // querjtgoe.message_title
- console.log(res);
- console.log(res.data.name.substr(-4));
- },
- err() {
- this.msgSuccess('上传失败');
- console.log(35);
- },
- reseImage(file, fileList) {
- let urls = '';
- if (file.response) {
- urls = file.response.url;
- } else {
- urls = file.url;
- }
- for (let i = this.config.length - 1; i >= 0; i--) {
- if (this.config[i].url == urls) {
- this.config.splice(i, 1);
- }
- }
- if (this.config.length == 0) {
- this.form.url = undefined;
- } else {
- this.form.url = JSON.stringify(this.config);
- }
- },
- // 上传前控制
- beforstwo(res, file) {
- console.log(res, file);
- // console.log(res.name.substr(0, res.name.length - 4));
- // if(res.type !== 'application/pdf'){
- // this.msgSuccess('只能上传pdf文件');
- // return false
- // }else{
- // return true
- // }
- return true;
- },
- // 图片预览
- handlePictureCardPreviewtwo(file) {
- console.log(file, 87);
- console.log(file.name.split('.'));
- let hegs = file.name.split('.');
- console.log(hegs[hegs.length - 1]);
- if (hegs[hegs.length - 1] == 'pdf') {
- this.shouewhu = true;
- } else {
- if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
- this.shouewhu = false;
- this.exelshow = false;
- } else {
- this.exelshow = true;
- }
- }
- console.log(this.shouewhu, this.exelshow);
- this.dialogImageUrl = file.url;
- this.dialogImageUrlname = file.name;
- console.log(this.dialogImageUrlname);
- this.dialogVisible = true;
- this.imashow = true;
- },
- // 上传文件
- handleChangertwo(file, fileList) {
- // this.fileList = fileList.slice(-3);
- },
- upImageFntwo(res, file) {
- this.comfietg = []
- if (res.code !== 200) {
- this.msgSuccess('上传失败');
- return false;
- } else {
- this.msgSuccess('上传成功');
- this.comfietg.push(res.data);
- this.comfietg.filter( router=> {
- router.name = '附件'
- })
- console.log(this.comfietg);
- console.log(res.data.name.substr(0, res.data.name.length - 4));
- console.log(this.nameutaiL)
- this.form.vaccineInfoUserList[this.nameutaiL].url = this.comfietg
- // this.form.url = this.config;
- this.form.vaccineInfoUserList[this.nameutaiL].url = JSON.stringify(this.form.vaccineInfoUserList[this.nameutaiL].url);
- }
- // querjtgoe.message_title
- console.log(this.form.vaccineInfoUserList[this.nameutaiL].url);
- console.log(res.data.name.substr(-4));
- },
- errtwo() {
- this.msgInfo('上传失败');
- console.log(35);
- },
- reseImagetwo(file, fileList) {
- let urls = '';
- if (file.response) {
- urls = file.response.url;
- } else {
- urls = file.url;
- }
- for (let i = this.config.length - 1; i >= 0; i--) {
- if (this.comfietg[i].url == urls) {
- this.comfietg.splice(i, 1);
- }
- }
- if (this.comfietg.length == 0) {
- this.form.vaccineInfoUserList[this.nameutaiL].url = [];
- } else {
- this.form.vaccineInfoUserList[this.nameutaiL].url = JSON.stringify(this.form.vaccineInfoUserList[this.nameutaiL].url);
- }
- },
- // 暂缓
- // 上传前控制
- beforsther(res, file) {
- console.log(res, file);
- // console.log(res.name.substr(0, res.name.length - 4));
- // if(res.type !== 'application/pdf'){
- // this.msgSuccess('只能上传pdf文件');
- // return false
- // }else{
- // return true
- // }
- return true;
- },
- // 图片预览
- handlePictureCardPreviewther(file) {
- console.log(file, 87);
- console.log(file.name.split('.'));
- let hegs = file.name.split('.');
- console.log(hegs[hegs.length - 1]);
- if (hegs[hegs.length - 1] == 'pdf') {
- this.shouewhu = true;
- } else {
- if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
- this.shouewhu = false;
- this.exelshow = false;
- } else {
- this.exelshow = true;
- }
- }
- console.log(this.shouewhu, this.exelshow);
- this.dialogImageUrl = file.url;
- this.dialogImageUrlname = file.name;
- console.log(this.dialogImageUrlname);
- this.dialogVisible = true;
- this.imashow = true;
- },
- // 上传文件
- handleChangerther(file, fileList) {
- // this.fileList = fileList.slice(-3);
- },
- upImageFnther(res, file) {
- this.configther = []
- if (res.code !== 200) {
- this.msgSuccess('上传失败');
- return false;
- } else {
- this.msgSuccess('上传成功');
- this.configther.push(res.data);
- this.configther.filter( router=> {
- router.name = '暂缓附件'
- })
- console.log(this.configther);
- console.log(res.data.name.substr(0, res.data.name.length - 4));
- console.log(this.nameutaiL)
- this.form.suspendUrl = this.configther
- // this.form.url = this.config;
- this.form.suspendUrl = JSON.stringify(this.form.suspendUrl);
- }
- // querjtgoe.message_title
- console.log(this.form.suspendUrl);
- console.log(res.data.name.substr(-4));
- },
- errther() {
- this.msgInfo('上传失败');
- console.log(35);
- },
- reseImagether(file, fileList) {
- let urls = '';
- if (file.response) {
- urls = file.response.url;
- } else {
- urls = file.url;
- }
- for (let i = this.config.length - 1; i >= 0; i--) {
- if (this.comfietg[i].url == urls) {
- this.comfietg.splice(i, 1);
- }
- }
- if (this.comfietg.length == 0) {
- this.form.suspendUrl = undefined
- } else {
- this.form.suspendUrl = JSON.stringify(this.form.suspendUrl);
- }
- },
- // 其他
- // 上传前控制
- beforsfor(res, file) {
- console.log(res, file);
- // console.log(res.name.substr(0, res.name.length - 4));
- // if(res.type !== 'application/pdf'){
- // this.msgSuccess('只能上传pdf文件');
- // return false
- // }else{
- // return true
- // }
- return true;
- },
- // 图片预览
- handlePictureCardPreviewfor(file) {
- console.log(file, 87);
- console.log(file.name.split('.'));
- let hegs = file.name.split('.');
- console.log(hegs[hegs.length - 1]);
- if (hegs[hegs.length - 1] == 'pdf') {
- this.shouewhu = true;
- } else {
- if (hegs[hegs.length - 1] == 'jpg' || hegs[hegs.length - 1] == 'png') {
- this.shouewhu = false;
- this.exelshow = false;
- } else {
- this.exelshow = true;
- }
- }
- console.log(this.shouewhu, this.exelshow);
- this.dialogImageUrl = file.url;
- this.dialogImageUrlname = file.name;
- console.log(this.dialogImageUrlname);
- this.dialogVisible = true;
- this.imashow = true;
- },
- // 上传文件
- handleChangerfor(file, fileList) {
- // this.fileList = fileList.slice(-3);
- },
- upImageFnfor(res, file) {
- this.configfor = []
- if (res.code !== 200) {
- this.msgInfo('上传失败');
- return false;
- } else {
- this.msgSuccess('上传成功');
- this.configfor.push(res.data);
- this.configfor.filter( router=> {
- router.name = '其他附件'
- })
- console.log(this.configfor);
- console.log(res.data.name.substr(0, res.data.name.length - 4));
- console.log(this.nameutaiL)
- this.form.otherUrl = this.configfor
- // this.form.url = this.config;
- this.form.otherUrl = JSON.stringify(this.form.otherUrl);
- }
- // querjtgoe.message_title
- console.log(this.form.otherUrl);
- console.log(res.data.name.substr(-4));
- },
- errfor() {
- this.msgInfo('上传失败');
- console.log(35);
- },
- reseImagefor(file, fileList) {
- let urls = '';
- if (file.response) {
- urls = file.response.url;
- } else {
- urls = file.url;
- }
- for (let i = this.config.length - 1; i >= 0; i--) {
- if (this.configfor[i].url == urls) {
- this.configfor.splice(i, 1);
- }
- }
- if (this.configfor.length == 0) {
- this.form.otherUrl = undefined
- } else {
- this.form.otherUrl = JSON.stringify(this.form.otherUrl);
- }
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- villageTowns: null,
- village: null,
- age:'',
- villagerGroup: null,
- houseType: null,
- domicile: null,
- province: null,
- city: null,
- region: null,
- userName: null,
- gender: null,
- idCard: null,
- phoneNum: null,
- keyIndustries: null,
- isVaccination: null,
- vaccinationPlace: null,
- contraindication: null,
- suspend: null,
- death: null,
- lostInMissing: null,
- shouldBe: null,
- other: null,
- nowIn: '',
- remark: null,
- status: '0',
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null,
- isDel: null,
- vaccineInfoUserList: [
- {
- vaccineName: '',
- vaccinationTime: '',
- vaccinationPlace: '',
- jici: '',
- progress: '',
- url:[]
- }
- ]
- };
- this.resetForm('form');
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- console.log(this.queryParams)
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm('queryForm');
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- (this.naneme = false), (this.shouwes = false);
- (this.selected = ['安徽省', '安庆市', '潜山市']), (this.form.province = this.selected[0]);
- this.villageTownshy = '';
- this.naiseurya = '';
- this.hsuej = '';
- this.form.city = this.selected[1];
- this.form.region = this.selected[2];
- this.title = '添加疫苗信息';
- this.jdourdjoaj = true;
- console.log(this.form)
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const id = row.id || this.ids;
- getInfo(id).then(response => {
- this.form = response.data;
- this.selected[0] = response.data.province;
- this.selected[1] = response.data.city;
- this.selected[2] = response.data.region;
- // if(this.form){
- if (this.form.isVaccination !== null) {
- if (this.form.isVaccination == '是') {
- // 接种疫苗
- (this.naneme = false), (this.shouwes = true);
- } else {
- (this.naneme = true), (this.shouwes = false);
- }
- } else {
- this.naneme = false;
- this.shouwes = false;
- }
- if (this.form.dictValue !== null && this.form.dictValue !== undefined) {
- this.jicheru(this.form.dictValue);
- }
- if (this.form.villageTowns !== null) {
- this.villageTownshy = this.form.villageTowns;
- if (this.form.village !== null) {
- this.villageTownshy = this.form.village;
- if (this.form.villagerGroup !== null) {
- this.villageTownshy = this.form.villagerGroup;
- }
- }
- }
- if (this.form.vaccineInfoUserList !== null) {
- if (this.form.vaccineInfoUserList.length == 0) {
- this.form.vaccineInfoUserList = [
- {
- vaccineName: '',
- vaccinationTime: '',
- vaccinationPlace: '',
- jici: '',
- progress: '',
- url:[]
- }
- ];
- }else {
- this.form.vaccineInfoUserList.filter(router =>{
- if(router.url == undefined){
- router.url = []
- }
- })
- }
- }
- // villageTownshy
- // }
- // this.heuiq.push()
- this.naiseurya = '';
- this.hsuej = '';
- this.open = true;
- this.jdourdjoaj = false;
- this.title = '查看编辑疫苗信息';
- });
- },
- chahe(data) {
- console.log(data);
- this.form.villageTowns = data[1];
- this.form.village = data[2];
- this.form.villagerGroup = data[3];
- if (this.form.villageTowns !== undefined) {
- this.hsuej = this.form.villageTowns;
- if (this.form.village !== undefined) {
- this.hsuej = this.form.villageTowns + this.form.village;
- if (this.form.villagerGroup !== undefined) {
- this.hsuej = this.form.villageTowns + this.form.village + this.form.villagerGroup;
- }
- }
- }
- this.form.domicile = '';
- },
- chahetwo(data) {
- this.queryParams.villageTowns = data[1];
- this.queryParams.village = data[2];
- this.queryParams.villagerGroup = data[3];
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs['form'].validate(valid => {
- console.log(this.selected);
- if (valid) {
- if (this.form.id != null) {
- // this.form.nowIn = this.naiseurya + this.form.nowIn;
- // this.form.domicile = this.hsuej + this.form.domicile;
- updateInfo(this.form).then(response => {
- this.msgSuccess('修改成功');
- this.open = false;
- this.getList();
- });
- } else {
- // this.form.nowIn = this.naiseurya + this.form.nowIn;
- // this.form.domicile = this.hsuej + this.form.domicile;
- // if (this.form.nowIn == 'undefined') {
- // this.form.nowIn = null;
- // }
- console.log(this.form)
- // return
- addInfo(this.form).then(response => {
- this.msgSuccess('新增成功');
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$confirm('是否确认删除疫苗信息编号为"' + ids + '"的数据项?', '警告', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(function() {
- return delInfo(ids);
- })
- .then(() => {
- this.getList();
- this.msgSuccess('删除成功');
- });
- },
- /** 导出按钮操作 */
- handleExport() {
- this.download(
- '/boman-web-core/core/info/export',
- {
- ...this.queryParams
- },
- `post_${new Date().getTime()}.xlsx`
- );
- },
- // 疫苗名称改变
- changeheu(index, data) {
- console.log(index, data);
- let hueya = this.form.vaccineInfoUserList[index].vaccineName;
- // this.form.vaccineName = this.form.vaccineName.label;
- this.form.vaccineInfoUserList[index].vaccineName = hueya.label;
- console.log(this.form.vaccineInfoUserList[index].vaccineName);
- this.jicheru(hueya.value);
- },
- // 剂次
- jicheru(data) {
- // 计次
- this.getDicts(data).then(response => {
- this.typeOptionstimes = response.data;
- });
- },
- // 剂次改变
- changeheujici(index) {
- console.log(index);
- let hueya = this.form.vaccineInfoUserList[index].jici;
- // this.form.vaccineName = this.form.vaccineName.label;
- this.form.vaccineInfoUserList[index].jici = hueya.label;
- console.log(this.form.vaccineInfoUserList[index].jici);
- if (hueya.value == this.typeOptionstimes.length) {
- this.form.vaccineInfoUserList[index].progress = '已完成';
- } else {
- this.form.vaccineInfoUserList[index].progress = '未完成';
- }
- },
- // 剂次
- jicherutwo(data) {
- // 计次
- this.getDicts(data).then(response => {
- this.typeOptionstimes = response.data;
- });
- },
- // 疫苗名称改变
- changeheutwo(data) {
- console.log(data);
- this.queryParams.vaccineName = this.queryParams.vaccineName.label;
- console.log(this.queryParams.vaccineName);
- this.jicherutwo(data.value);
- },
- // 点击新增
- tijea(index) {
- console.log(index+ 1)
- this.nameutaiL = index+ 1
- this.form.vaccineInfoUserList.push({
- vaccineName: '',
- vaccinationTime: '',
- vaccinationPlace: '',
- jici: '',
- progress: '',
- url:[]
- });
- },
- // 点击删除
- naeyrfakjf(index, item) {
- if (this.form.vaccineInfoUserList.length == 1) {
- return false;
- }
- if (this.jdourdjoaj == true) {
- // 新增
- this.form.vaccineInfoUserList.splice(index, 1);
- } else {
- // 修改
- let ide = this.form.vaccineInfoUserList[index].id;
- console.log(this.form.vaccineInfoUserList[index]);
- // ()
- console.log(ide);
- if (ide !== undefined) {
- console.log(234);
- delInfort(this.ide).then(response => {
- this.msgSuccess('操作成功');
- });
- }
- this.form.vaccineInfoUserList.splice(index, 1);
- }
- },
- // 点击查看
- chakei(row) {
- console.log(row);
- yiaoe({idCard:row.idCard}).then(response => {
- // this.msgSuccess('操作成功');
- if(response.code == 200){
- this.jiezheList = response.data
- }
- });
-
- this.jiezhong = true;
- }
- }
- };
- </script>
- <style lang="scss">
- .jdueuh{
- .el-form-item__label {
- width: 0px !important;
- }
- .el-form-item__content {
- margin-left: 10px !important;
- // width: 70%;
- }
- }
- .ijeuhdy{
- .el-form-item__label {
- width: 80px !important;
- }
- .el-form-item__content {
- margin-left: 80px !important;
- // width: 70%;
- }
- }
- .znshu{
- .el-form-item__label {
- width: 80px !important;
- // padding-left: 30px;
- }
- .el-form-item__content {
- margin-left: 80px !important;
-
- // width: 70%;
- }
- .el-input__inner{
- padding-left: 0 !important;
- }
- }
- .heioangd{
- .el-form-item__label {
- width: 70px !important;
- }
- .el-form-item__content {
- margin-left: 70px !important;
- // width: 70%;
- }
- }
- .hues {
- .area-select {
- margin-left: 0 !important;
- margin-right: 10px;
- }
- }
- .jehak {
- .el-form-item {
- width: 100%;
- }
- .el-form-item__content {
- width: 60%;
- }
- }
- .oiuyty {
- .el-form-item__label {
- width: 80px !important;
- }
- .el-form-item__content {
- margin-left: 80px !important;
- // width: 70%;
- }
- input {
- padding-right: 0 !important;
- }
- }
- .el-dialog__body {
- padding-top: 0;
- padding-bottom: 0;
- }
- .jhy {
- // width: 100%;
- // .el-form-item__content {
- // width: 100%;
- // margin-left: 0 !important;
- // }
- .el-form-item__content {
- margin-left: 55px !important;
- // width: 70%;
- }
- .el-form-item__label {
- width: 55px !important;
- }
- }
- .ehiqya {
- .el-form-item__content {
- display: flex;
- .jdidur {
- flex: 1;
- margin-left: 10px;
- // text-align: left;
- display: flex;
- }
- }
- .upload-demo {
- display: flex;
- }
- }
- .jdoier{
- display: flex;
- align-items: center;
- .upload-demo {
- display: flex;
- }
- }
- .hueyde {
- width: 18px;
- height: 18px;
- margin: 0 5px;
- margin-right: 10px;
- }
- .hueydele {
- width: 15px;
- height: 18px;
- }
- .hyeoa {
- height: 100%;
- display: flex;
- align-items: center;
- }
- .hjdoecdre {
- // margin-top: 50%;
- transform: translateY(50%);
- }
- .ojhgy {
- .el-dialog {
- padding-bottom: 40px;
- padding-top: 10px;
- }
- .el-dialog__header {
- padding-bottom: 20px;
- }
- .el-table .cell {
- line-height: 50px;
- }
- }
- .hueya{
- margin-left: 0 !important;
- }
- .iejghiadh{
- .el-input__inner{
- padding-right: 0 !important;
- padding-left: 5px !important;
- }
- }
- </style>
|