customerManager.vue 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644
  1. <template>
  2. <div>
  3. <ag-grid-layout
  4. toolbar
  5. :table-height="tableHeight"
  6. theme="ag-theme-alpine"
  7. :column-defs="columnDefs"
  8. :row-data="rowData"
  9. :locale-text="localeText"
  10. :grid-options="gridOptions"
  11. :default-col-def="defaultColDef"
  12. :animate-rows="true"
  13. :row-selection="rowSelection"
  14. :framework-components="frameworkComponents"
  15. @filterChanged="filterModifed"
  16. @sortChanged="gridSortChange"
  17. >
  18. <!-- @rowDoubleClicked="getList"-->
  19. <div slot="toolbar" class="inner-toolbar">
  20. <div class="toolbar-search">
  21. <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
  22. </div>
  23. <div class="toolbar-btns">
  24. <el-button v-if="part_view" type="primary" size="mini" :disabled="!isEmptyFrame" @click="handleAdd">{{ this.$t('customerManage.customerAdd') }}</el-button>
  25. <el-button v-if="part_view" type="danger" size="mini" @click="batchDelete">{{ this.$t('action.deleteList') }}</el-button>
  26. </div>
  27. </div>
  28. <el-pagination
  29. v-if="pageData"
  30. slot="pagination"
  31. :current-page="pageData.page_no"
  32. :page-sizes="[10, 20, 50, 100]"
  33. :page-size="pageData.page_size"
  34. layout="total, sizes, prev, pager, next, jumper"
  35. :total="pageData.data_total"
  36. @size-change="handlePageSizeChange"
  37. @current-change="handlePageCurrentChange"
  38. />
  39. </ag-grid-layout>
  40. <!-- 用户信息 -->
  41. <el-dialog :visible.sync="customerFormVisible" :title="this.$t('customerManage.customerInfo')" class="customer-dialog" width="60%">
  42. <el-tabs v-model="activeName" type="border-card" tab-position="bottom" width="50%" @tab-click="handleClick">
  43. <el-tab-pane :label="this.$t('customerManage.baseInfo')" name="customerBaseInfo">
  44. <div>
  45. <el-form ref="editForm" :model="formmodel" :rules="rules" label-width="145px">
  46. <el-row>
  47. <el-col :span="12">
  48. <el-form-item :label="this.$t('customerManage.named')" prop="named">
  49. <el-input v-model="formmodel.named" clearable :placeholder="this.$t('customerManage.inputNamed')" :maxlength="20" />
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="12">
  53. <el-form-item :label="this.$t('customerManage.cardNo')">
  54. <el-input v-model="formmodel.card_no" clearable :placeholder="this.$t('customerManage.inputCardNo')" :maxlength="20" />
  55. </el-form-item>
  56. </el-col>
  57. </el-row>
  58. <el-row>
  59. <el-col :span="12">
  60. <el-form-item :label="this.$t('member.sex')" class="form-item-sex">
  61. <el-radio v-model="formmodel.sex" :label="0">{{ this.$t('member.woman') }}</el-radio>
  62. <el-radio v-model="formmodel.sex" :label="1">{{ this.$t('member.man') }}</el-radio>
  63. <!-- <el-radio v-model="formmodel.sex" :label="2">未知</el-radio>-->
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="12">
  67. <el-form-item :label="this.$t('customerManage.age')" prop="age">
  68. <el-input v-model="formmodel.age" clearable :maxlength="4" :placeholder="this.$t('customerManage.inputAge')">
  69. <el-select slot="append" v-model="formmodel.age_unit" :placeholder="this.$t('customerManage.choiceAgeUnit')">
  70. <el-option :label="this.$t('customerManage.year')" :value="this.$t('customerManage.year')" />
  71. <el-option :label="this.$t('customerManage.month')" :value="this.$t('customerManage.month')" />
  72. <el-option :label="this.$t('customerManage.day')" :value="this.$t('customerManage.day')" />
  73. </el-select>
  74. </el-input>
  75. </el-form-item>
  76. </el-col>
  77. </el-row>
  78. <el-row>
  79. <el-col :span="12">
  80. <el-form-item :label="this.$t('member.mobile')" prop="mobile">
  81. <el-input v-model="formmodel.mobile" clearable :placeholder="this.$t('member.inputMobile')" :maxlength="20" />
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="12">
  85. <el-form-item :label="this.$t('member.homeAddress')" prop="address">
  86. <el-input v-model="formmodel.address" clearable :maxlength="20" :placeholder="this.$t('member.inputHomeAddress')" />
  87. </el-form-item>
  88. </el-col>
  89. <el-col :span="12">
  90. <el-form-item :label="this.$t('member.birthday')" prop="birthday">
  91. <el-date-picker
  92. v-model="formmodel.birthday"
  93. type="date"
  94. :editable="false"
  95. value-format="timestamp"
  96. :placeholder="this.$t('member.choiceBirthday')"
  97. :picker-options="{ disabledDate(time) { return time.getTime() > Date.now() }}"
  98. @change="birthdayChange"
  99. />
  100. </el-form-item>
  101. </el-col>
  102. </el-row>
  103. <el-row>
  104. <el-col :span="12">
  105. <el-form-item :label="this.$t('customerManage.inDate')" prop="in_date">
  106. <el-date-picker
  107. v-model="formmodel.in_date"
  108. type="date"
  109. :editable="false"
  110. value-format="timestamp"
  111. :default-value="new Date()"
  112. :placeholder="this.$t('customerManage.choiceDate')"
  113. :picker-options="{ disabledDate(time) { return time.getTime() > Date.now() }}"
  114. />
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="12">
  118. <el-form-item :label="this.$t('customerManage.outDate2')" prop="out_date">
  119. <el-date-picker
  120. v-model="formmodel.out_date"
  121. type="date"
  122. :editable="false"
  123. value-format="timestamp"
  124. :default-value="new Date()"
  125. :placeholder="this.$t('customerManage.choiceDate')"
  126. :picker-options="{ disabledDate(time) { return time.getTime() <= formmodel.in_date }}"
  127. />
  128. </el-form-item>
  129. </el-col>
  130. </el-row>
  131. <el-row>
  132. <el-col :span="12">
  133. <el-form-item :label="this.$t('customerManage.idType')">
  134. <el-radio v-model="formmodel.id_type" label="身份证">{{ this.$t('customerManage.idCard') }}</el-radio>
  135. <el-radio v-model="formmodel.id_type" label="护照">{{ this.$t('customerManage.passport') }}</el-radio>
  136. <el-radio v-model="formmodel.id_type" label="军人证">{{ this.$t('customerManage.servicemanCard') }}</el-radio>
  137. </el-form-item>
  138. </el-col>
  139. <el-col :span="12">
  140. <el-form-item :label="this.$t('customerManage.idNo')">
  141. <el-input v-model="formmodel.id_no" clearable :placeholder="this.$t('customerManage.inputIdNo')" :maxlength="20" />
  142. </el-form-item>
  143. </el-col>
  144. </el-row>
  145. <el-row>
  146. <el-col :span="16">
  147. <el-row>
  148. <el-col :span="12">
  149. <el-form-item :label="this.$t('customerManage.nickname')" prop="nickname">
  150. <el-input v-model="formmodel.nickname" clearable :placeholder="this.$t('customerManage.inputNickname')" :maxlength="20" />
  151. </el-form-item>
  152. </el-col>
  153. <el-col :span="12">
  154. <el-form-item :label="this.$t('customerManage.frame')" prop="frame_id">
  155. <el-select v-model="formmodel.frame_id" :disabled="bedSelectabled"
  156. :placeholder="this.$t('customerManage.choiceFrame')">
  157. <el-option v-for="(item,index) in emptyBeds" :key="index" :label="item.full_name" :value="item.id" />
  158. </el-select>
  159. </el-form-item>
  160. </el-col>
  161. </el-row>
  162. <el-form-item :label="this.$t('customerManage.illnessDesc3')">
  163. <!-- <el-input-->
  164. <!-- v-model="formmodel.illness_desc"-->
  165. <!-- type="textarea"-->
  166. <!-- :autosize="{ minRows: 2, maxRows: 4}"-->
  167. <!-- :minlength="2"-->
  168. <!-- :maxlength="50"-->
  169. <!-- :placeholder="this.$t('customerManage.inputIllnessDesc')"-->
  170. <!-- />-->
  171. <el-select v-model="formmodel.illness_desc" :placeholder="this.$t('customerManage.choiceIllnessDesc')" clearable>
  172. <el-option v-for="(item, index) in Object.keys(childbirthTypeEnum)" :key="index" :label="childbirthTypeEnum[item]" :value="item" />
  173. </el-select>
  174. </el-form-item>
  175. </el-col>
  176. <el-col :span="8">
  177. <el-form-item :label="this.$t('member.face')">
  178. <el-upload
  179. class="avatar-uploader"
  180. :action="`${uploadServer}/ncs/upload/uploadFile?scene=avatar`"
  181. :show-file-list="false"
  182. :on-success="uploaded"
  183. :before-upload="handleShopLogoBefore"
  184. >
  185. <img v-if="imageUrl" :src="imageUrl" class="avatar">
  186. <i v-else class="el-icon-plus avatar-uploader-icon" />
  187. </el-upload>
  188. </el-form-item>
  189. </el-col>
  190. <!-- <el-row>-->
  191. <!-- <el-col :span="8">-->
  192. <!-- <el-form-item :label="责任医生">-->
  193. <!-- <el-select v-model="formmodel.doctor_id" :placeholder="请选择医生" @change="doctorChange(1)">-->
  194. <!-- <el-option v-for="(item,index) in doctors" :key="index" :label="item.clerk_name" :value="item.clerk_id" />-->
  195. <!-- </el-select>-->
  196. <!-- </el-form-item>-->
  197. <!-- </el-col>-->
  198. <!-- <el-col :span="8">-->
  199. <!-- <el-form-item :label="责任护士">-->
  200. <!-- <el-select v-model="formmodel.nurse_id" :placeholder="请选择护士" @change="doctorChange(2)">-->
  201. <!-- <el-option v-for="(item,index) in nurses" :key="index" :label="item.clerk_name" :value="item.clerk_id" />-->
  202. <!-- </el-select>-->
  203. <!-- </el-form-item>-->
  204. <!-- </el-col>-->
  205. <!-- <el-col :span="8">-->
  206. <!-- <el-form-item :label="责任护工">-->
  207. <!-- <el-select v-model="formmodel.worker_id" :placeholder="请选择护工" @change="doctorChange(3)">-->
  208. <!-- <el-option v-for="(item,index) in workers" :key="index" :label="item.clerk_name" :value="item.clerk_id" />-->
  209. <!-- </el-select>-->
  210. <!-- </el-form-item>-->
  211. <!-- </el-col>-->
  212. <!-- </el-row>-->
  213. <!-- <el-row v-if="nurseData.length > 0">-->
  214. <!-- <el-col v-for="(item, index) in nurseList" :key="index" :span="24 / nurseList.length">-->
  215. <!-- <el-form-item :label="item[0]">-->
  216. <!-- <el-select v-model="nurseData[index].nurse_level" :placeholder="'请选择'+item[0]" @change="changeNurseData(index)">-->
  217. <!-- <el-option v-for="(t,i) in item[1]" :key="i" :label="t.option_name" :value="t.id">-->
  218. <!-- <span style="float: left">{{ t.option_name }}</span>-->
  219. <!-- <span :style="'float: right; background-color: #'+t.color_rgb+';color: #'+t.color_rgb">颜色</span>-->
  220. <!-- </el-option>-->
  221. <!-- </el-select>-->
  222. <!-- </el-form-item>-->
  223. <!-- </el-col>-->
  224. <!-- </el-row>-->
  225. </el-row>
  226. <el-row>
  227. <el-col :span="24" :offset="8">
  228. <vue-qr
  229. v-if="formmodel.member_id && qrCode"
  230. :text="qrCode"
  231. :size="150"
  232. :correctLevel="0"
  233. ></vue-qr>
  234. </el-col>
  235. </el-row>
  236. <el-form-item>
  237. <el-button type="primary" :disabled="isDisabled" class="save" @click="handlerSubmit('editForm')">{{ this.$t('action.save') }}</el-button>
  238. </el-form-item>
  239. </el-form>
  240. </div>
  241. </el-tab-pane>
  242. <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.customerRelative')" name="customerRelative">
  243. <div style="height: 450px">
  244. <!-- <customer-relative :member-id="memberId" />-->
  245. <el-table
  246. :data="relativeData"
  247. height="250"
  248. border
  249. style="width: 100%"
  250. >
  251. <el-table-column
  252. prop="named"
  253. :label="this.$t('customerManage.customerRelativeTrueName')"
  254. width="180"
  255. />
  256. <!-- <el-table-column-->
  257. <!-- prop="sex"-->
  258. <!-- :label="this.$t('member.sex')"-->
  259. <!-- width="180"-->
  260. <!-- :formatter="formatterSex"-->
  261. <!-- />-->
  262. <el-table-column
  263. prop="relative_name"
  264. :label="this.$t('customerManage.relativeName')"
  265. width="180"
  266. :formatter="formatterRelativeName"
  267. />
  268. <el-table-column
  269. prop="mobile"
  270. :label="this.$t('member.mobile')"
  271. />
  272. <el-table-column
  273. :label="this.$t('action.handle')"
  274. width="100"
  275. >
  276. <template slot-scope="scope">
  277. <el-button type="danger" size="mini" @click="handlerDeleteRelative(scope.row.id)">{{ deleted }}</el-button>
  278. </template>
  279. </el-table-column>
  280. </el-table>
  281. <el-form ref="relativeForm" :model="relativeFormModel" :rules="relativeRules" label-width="120px" style="margin-top:20px">
  282. <el-row>
  283. <el-col :span="12">
  284. <el-form-item :label="this.$t('customerManage.customerRelativeTrueName')" prop="true_name">
  285. <el-input v-model="relativeFormModel.true_name" clearable :placeholder="this.$t('customerManage.inputCustomerRelativeTrueName')" :maxlength="20" />
  286. </el-form-item>
  287. </el-col>
  288. <el-col :span="12">
  289. <el-form-item :label="this.$t('customerManage.relativeName')" prop="relative_name">
  290. <!-- <el-input v-model="relativeFormModel.relative_name" clearable-->
  291. <!-- :placeholder="this.$t('customerManage.inputRelativeName')" :maxlength="20" />-->
  292. <el-select v-model="relativeFormModel.relative_name" :placeholder="this.$t('customerManage.choiceRelativeName')" clearable @change="relativeNameChange">
  293. <el-option v-for="(item, index) in Object.keys(relativeNameTypeEnum)" :key="index" :label="relativeNameTypeEnum[item]" :value="item" />
  294. </el-select>
  295. </el-form-item>
  296. </el-col>
  297. </el-row>
  298. <el-row>
  299. <!-- <el-col :span="12">-->
  300. <!-- <el-form-item :label="this.$t('member.sex')" class="form-item-sex">-->
  301. <!-- <el-radio v-model="relativeFormModel.sex" :label="0">{{ this.$t('member.woman') }}</el-radio>-->
  302. <!-- <el-radio v-model="relativeFormModel.sex" :label="1">{{ this.$t('member.man') }}</el-radio>-->
  303. <!-- &lt;!&ndash; <el-radio v-model="relativeFormModel.sex" :label="2">未知</el-radio>&ndash;&gt;-->
  304. <!-- </el-form-item>-->
  305. <!-- </el-col>-->
  306. <el-col :span="12">
  307. <el-form-item :label="this.$t('member.mobile')" prop="mobile">
  308. <el-input v-model="relativeFormModel.mobile" clearable :placeholder="this.$t('member.inputMobile')" :maxlength="20" />
  309. </el-form-item>
  310. </el-col>
  311. <el-col :span="12">
  312. <el-form-item v-if="isChild"
  313. :label="this.$t('member.birthday2')" prop="birthday">
  314. <el-date-picker
  315. v-model="relativeFormModel.birthday"
  316. type="date"
  317. :editable="false"
  318. value-format="timestamp"
  319. :placeholder="this.$t('member.choiceBirthday2')"
  320. :picker-options="{ disabledDate(time) { return time.getTime() > Date.now() }}"
  321. />
  322. </el-form-item>
  323. </el-col>
  324. </el-row>
  325. <el-form-item>
  326. <el-button type="primary" @click="addRelative">{{ this.$t('action.add') }}</el-button>
  327. </el-form-item>
  328. </el-form>
  329. </div>
  330. </el-tab-pane>
  331. <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.vital')" name="customer-vital-sign">
  332. <vital-sign-log :member-id="formmodel.member_id+''" :active-name="'vital_signs1'"/>
  333. </el-tab-pane>
  334. <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.remark')" name="customerRemark">
  335. <div style="height: 450px;display: flex;flex-direction: column;">
  336. <div style="height: 350px;overflow-y: auto;box-sizing:border-box;box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);margin:5px -10px">
  337. <el-card v-for="(item, index) in remarks" :key="index" style="margin-bottom: 10px">
  338. <div>
  339. <span style="margin-left: 20px;font-weight:bold">{{ customerRemarks }}</span><span style="line-height:1.5">{{ item.content }}</span>
  340. </div>
  341. <div style="margin: 10px">
  342. <div style="float: left">
  343. <span v-if="item.file_name">
  344. <el-link :href="item.file_path" icon="el-icon-folder" type="success" target="_blank" :download="item.file_name">{{ item.file_name }}</el-link>
  345. </span>
  346. </div>
  347. <div style="float: right">
  348. <p>
  349. <span style="font-weight:bold">{{ customerRemarkTime }}</span>{{ item.create_time | unixDateFilter }}
  350. <span style="font-weight:bold;margin-left: 10px;">{{ customerRemarkName }}</span>{{ item.create_name }}
  351. </p>
  352. </div>
  353. </div>
  354. </el-card>
  355. </div>
  356. <div style="height: 100px;">
  357. <el-form ref="remarkForm" :model="remarkFormModel" :rules="remarkRules" label-width="100px" style="margin-right: 10px">
  358. <el-row>
  359. <el-col :span="16">
  360. <el-form-item :label="this.$t('action.content')" prop="content">
  361. <el-input
  362. v-model="remarkFormModel.content"
  363. type="textarea"
  364. :autosize="{ minRows: 2, maxRows: 6}"
  365. :minlength="2"
  366. :maxlength="300"
  367. show-word-limit
  368. :placeholder="this.$t('action.inputContent')"
  369. />
  370. </el-form-item>
  371. </el-col>
  372. <el-col :span="8">
  373. <el-form-item :label="this.$t('action.uploader')" style="margin-bottom: 0">
  374. <el-upload
  375. v-if="!attachFilePath"
  376. class="attach-uploader"
  377. :action="`${uploadServer}/ncs/upload/uploadFile?scene=attach`"
  378. :show-file-list="false"
  379. :on-success="attachUploaded"
  380. :before-upload="handleAttachUploadBefore"
  381. >
  382. <i class="el-icon-plus attach-uploader-icon" />
  383. </el-upload>
  384. <span v-if="attachFilePath">{{ remarkFormModel.fileName }}</span>
  385. </el-form-item>
  386. </el-col>
  387. </el-row>
  388. <el-form-item>
  389. <el-button type="primary" @click="addRemark">{{ this.$t('customerManage.addRemark') }}</el-button>
  390. </el-form-item>
  391. </el-form>
  392. </div>
  393. </div>
  394. </el-tab-pane>
  395. <el-tab-pane v-if="formmodel.id && boolDevice" :label="this.$t('customerManage.footprint')" name="footprint">
  396. <my-map-html :map-url="mapUrl" style="width: 100%; height: 670px;"></my-map-html>
  397. </el-tab-pane>
  398. <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.fee')" name="customer-fee-sign">
  399. <customer-fee :customer-id="formmodel.id" :active-name="'fee_signs1'"/>
  400. </el-tab-pane>
  401. </el-tabs>
  402. </el-dialog>
  403. <!-- 用户信息 -->
  404. <!-- 用户换床-->
  405. <el-dialog :visible.sync="changeBedFormVisible" :title="this.$t('customerManage.changeBed')">
  406. <el-form ref="changeBedForm" :model="changeBedFormModel" :rules="changeBedRules" label-width="120px">
  407. <el-row>
  408. <el-col :span="12">
  409. <el-form-item :label="this.$t('customerManage.named')" prop="named">
  410. <el-input v-model="changeBedFormModel.named" clearable :placeholder="this.$t('customerManage.inputNamed')" readonly :maxlength="20" />
  411. </el-form-item>
  412. </el-col>
  413. <el-col :span="12">
  414. <el-form-item :label="this.$t('customerManage.cardNo')">
  415. <el-input v-model="changeBedFormModel.card_no" clearable :placeholder="this.$t('customerManage.inputCardNo')" readonly :maxlength="20" />
  416. </el-form-item>
  417. </el-col>
  418. </el-row>
  419. <el-row>
  420. <el-col :span="12">
  421. <el-form-item :label="this.$t('member.sex')" class="form-item-sex">
  422. <el-radio v-model="changeBedFormModel.sex" :label="0" disabled>{{ this.$t('member.woman') }}</el-radio>
  423. <el-radio v-model="changeBedFormModel.sex" :label="1" disabled>{{ this.$t('member.man') }}</el-radio>
  424. <el-radio v-model="changeBedFormModel.sex" :label="2" disabled>{{ this.$t('member.unknown') }}</el-radio>
  425. </el-form-item>
  426. </el-col>
  427. <el-col :span="12">
  428. <el-form-item :label="this.$t('customerManage.age')" prop="age">
  429. <el-input v-model="changeBedFormModel.age" clearable :maxlength="4" readonly
  430. :placeholder="this.$t('customerManage.inputAge')">
  431. <el-select slot="append" v-model="changeBedFormModel.age_unit" disabled
  432. :placeholder="this.$t('customerManage.choiceAgeUnit')">
  433. <el-option :label="this.$t('customerManage.year')" :value="this.$t('customerManage.year')" />
  434. <el-option :label="this.$t('customerManage.month')" :value="this.$t('customerManage.month')" />
  435. <el-option :label="this.$t('customerManage.day')" :value="this.$t('customerManage.day')" />
  436. </el-select>
  437. </el-input>
  438. </el-form-item>
  439. </el-col>
  440. </el-row>
  441. <el-row>
  442. <el-col :span="12">
  443. <el-form-item :label="this.$t('customerManage.oldBed')" prop="current_bed">
  444. <el-input v-model="changeBedFormModel.current_bed" clearable readonly :maxlength="20" />
  445. </el-form-item>
  446. </el-col>
  447. <el-col :span="12">
  448. <el-form-item :label="this.$t('customerManage.newBed')" prop="frame_id">
  449. <el-select v-model="changeBedFormModel.frame_id" clearable filterable :placeholder="this.$t('customerManage.choiceNewBed')">
  450. <el-option v-for="(item,index) in emptyBeds" :key="index" :label="item.full_name" :value="item.id" />
  451. </el-select>
  452. </el-form-item>
  453. </el-col>
  454. </el-row>
  455. <el-form-item>
  456. <el-button type="primary" class="save" @click="handleChangeBedSubmit('changeBedForm')">{{ this.$t('action.yes') }}</el-button>
  457. </el-form-item>
  458. </el-form>
  459. </el-dialog>
  460. <!-- 用户换床-->
  461. <el-dialog :visible.sync="detailsVisible" :title="formmodel.named + this.$t('customerManage.message')" class="customer-dialog">
  462. <el-descriptions class="margin-top" :column="2" border style="padding: 20px">
  463. <!-- <template slot="extra">-->
  464. <!-- <el-button type="primary" size="small">操作</el-button>-->
  465. <!-- </template>-->
  466. <el-descriptions-item>
  467. <template slot="label"><i class="el-icon-user"></i>{{ this.$t('customerManage.named') }}</template>{{ formmodel.named }}
  468. </el-descriptions-item>
  469. <el-descriptions-item>
  470. <template slot="label"><i class="el-icon-user-solid"></i>{{ this.$t('customerManage.nickname') }}</template>{{ formmodel.nickname }}
  471. </el-descriptions-item>
  472. <el-descriptions-item>
  473. <template slot="label"><i class="el-icon-help"></i>{{ this.$t('customerManage.cardNo') }}</template>{{ formmodel.card_no }}
  474. </el-descriptions-item>
  475. <el-descriptions-item>
  476. <template slot="label"><i class="el-icon-smoking"></i>{{ this.$t('customerManage.frame') }}</template>{{ formmodel.full_name }}
  477. </el-descriptions-item>
  478. <el-descriptions-item>
  479. <template slot="label"><i class="el-icon-time"></i>{{ this.$t('customerManage.inDate') }}</template>{{ formatterDate({ data: { in_date: formmodel.in_date, out_date: formmodel.out_date } }) }}
  480. </el-descriptions-item>
  481. <el-descriptions-item>
  482. <template slot="label"><i class="el-icon-attract"></i>{{ this.$t('member.sex') }}</template>{{ formatterSex(formmodel) }}
  483. </el-descriptions-item>
  484. <el-descriptions-item>
  485. <template slot="label"><i class="el-icon-star-off"></i>{{ this.$t('customerManage.age') }}</template>{{formmodel.age}}{{formmodel.age_unit}}
  486. </el-descriptions-item>
  487. <el-descriptions-item>
  488. <template slot="label"><i class="el-icon-bank-card"></i>{{ this.$t('customerManage.id') }}</template>
  489. <span v-if="formmodel.id_no">{{ formmodel.id_type }} {{ formmodel.id_no }}</span>
  490. <span v-else>{{ this.$t('customerManage.null') }}</span>
  491. </el-descriptions-item>
  492. <el-descriptions-item>
  493. <template slot="label"><i class="el-icon-present"></i>{{ this.$t('member.birthday') }}</template>{{ unixDateFormatter2({ value: formmodel.birthday}) }}
  494. </el-descriptions-item>
  495. <el-descriptions-item>
  496. <template slot="label"><i class="el-icon-mobile-phone"></i>{{ this.$t('member.mobile') }}</template>{{ formmodel.mobile }}
  497. </el-descriptions-item>
  498. <el-descriptions-item :span="2">
  499. <template slot="label"><i class="el-icon-office-building"></i>{{ this.$t('member.homeAddress') }}</template>{{ formmodel.address }}
  500. </el-descriptions-item>
  501. <el-descriptions-item :span="3">
  502. <template slot="label"><i class="el-icon-document"></i>{{ this.$t('customerManage.illnessDesc') }}</template>{{ formmodel.illness_desc }}
  503. </el-descriptions-item>
  504. </el-descriptions>
  505. </el-dialog>
  506. </div>
  507. </template>
  508. <script>
  509. // 月子中心版,没有责任医生,责任护士,责任护工选项 也没有护理项参数
  510. import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
  511. import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
  512. import ButtonCellRenderList from '@/components/AgGridCellRender/ButtonCellRenderList'
  513. import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
  514. import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
  515. import * as API_Customer from '@/api/ncs_customer'
  516. import { unix2Date, unixToDate } from '@/utils/Foundation'
  517. import * as API_Frame from '@/api/ncs_hospitalFrame'
  518. import * as RegExp from '@/utils/RegExp'
  519. // import { serverUrl } from '@/utils/domain'
  520. import * as API_Remark from '@/api/ncs_remark'
  521. import * as API_User from '@/api/user'
  522. import { FRAME_TYPE } from '@/utils/enum/FrameTypeEnum'
  523. import vitalSignLog from '@/views/vital-sign/log'
  524. import CustomerFee from '@/views/ncs_fee/index'
  525. import vueQr from 'vue-qr'
  526. import * as API_SystemConfig from '@/api/ncs_systemconfig'
  527. import {RELATIVE_NAME_TYPE} from "@/utils/enum/RelativeNameTypeEnum";
  528. import {CHILDBIRTH_TYPE} from "@/utils/enum/ChildbirthTypeEnum";
  529. import * as shop_API from "@/api/ncs_shop";
  530. import {getDevicesByUuid} from "@/api/initialize"
  531. import myMapHtml from '@/views/customer/myMapHtml'
  532. import {getRelativeList, removeRelative} from "@/api/ncs_relative";
  533. const serverUrl = domain.serverUrl
  534. export default {
  535. name: 'CustomerManager',
  536. components: { ButtonCellRenderList, ButtonCellRender, ListFilter, RadioFilter, vitalSignLog, vueQr, myMapHtml, CustomerFee },
  537. filters: {
  538. unixDateFilter(val) {
  539. return unixToDate(val)
  540. }
  541. },
  542. props: {
  543. frame: {
  544. type: Object,
  545. default: () => {}
  546. },
  547. part_view: { // 是否为科室视图
  548. type: Boolean,
  549. default: true
  550. }
  551. },
  552. data() {
  553. return {
  554. /** ag-grid参数 **/
  555. pageData: {}, // 翻页数据
  556. columnDefs: null,
  557. rowData: null,
  558. defaultColDef: null,
  559. gridOptions: null,
  560. gridApi: null,
  561. columnApi: null,
  562. localeText: AG_GRID_LOCALE_CN,
  563. filterState: null,
  564. rowSelection: null,
  565. frameworkComponents: null,
  566. isCloud: false,
  567. /** 列表参数 */
  568. params: {
  569. page_size: 20,
  570. page_no: 1,
  571. fixedCondition: this.part_view ? (Object.keys(this.frame).length === 0 ? 'part_id=' + this.$store.getters.partId
  572. : 'part_id=' + this.$store.getters.partId + ' and frame_id =' + this.formmodel.member_id)
  573. : (Object.keys(this.frame).length === 0 ? '1 = 1' : ' frame_id =' + this.formmodel.member_id)
  574. },
  575. customerFormVisible: false,
  576. activeName: 'customerBaseInfo',
  577. formmodel: {
  578. sex: 0,
  579. id_type: '身份证',
  580. age_unit: this.$t('customerManage.year'),
  581. in_date: (new Date()).valueOf(),
  582. mobile: ''
  583. },
  584. /** 上传接口 **/
  585. uploadServer: serverUrl,
  586. imageUrl: null,
  587. /** 是否禁用保存按钮 **/
  588. isDisabled: false,
  589. /** 备注 */
  590. remarks: [],
  591. customerRemarks: this.$t('customerManage.remarks'),
  592. customerRemarkTime: this.$t('customerManage.remarkTime'),
  593. customerRemarkName: this.$t('customerManage.remarkName'),
  594. deleted: this.$t('action.delete'),
  595. remarkParams: {
  596. page_size: 100,
  597. page_no: 1,
  598. sort: 'create_time',
  599. dir: 'desc',
  600. fixedCondition: this.part_view ? (Object.keys(this.frame).length === 0 ? 'part_id=' + this.$store.getters.partId
  601. : 'part_id=' + this.$store.getters.partId + ' and frame_id =' + this.formmodel.member_id)
  602. : (Object.keys(this.frame).length === 0 ? '1 = 1' : ' frame_id =' + this.formmodel.member_id)
  603. },
  604. remarkFormModel: {
  605. content: ''
  606. },
  607. remarkRules: {
  608. content: [{ required: true, message: this.$t('customerManage.inputRemarks'), trigger: 'blur' }]
  609. },
  610. attachFilePath: null,
  611. /** 亲属表单 **/
  612. relativeData: [],
  613. relativeFormModel: {
  614. sex: 0,
  615. true_name: null,
  616. relative_name: null,
  617. mobile: null
  618. },
  619. relativeParams: {
  620. page_size: 100,
  621. page_no: 1,
  622. sort: 'create_time',
  623. dir: 'desc',
  624. fixedCondition: this.part_view ? (Object.keys(this.frame).length === 0 ? 'part_id=' + this.$store.getters.partId
  625. : 'part_id=' + this.$store.getters.partId + ' and frame_id =' + this.formmodel.member_id)
  626. : (Object.keys(this.frame).length === 0 ? '1 = 1' : ' frame_id =' + this.formmodel.member_id)
  627. },
  628. relativeRules: {
  629. true_name: [{ required: true, message: this.$t('customerManage.inputRemarks'), trigger: 'blur' }],
  630. relative_name: [{ required: true, message: this.$t('customerManage.inputRelativeName'), trigger: 'blur' }],
  631. mobile: [
  632. { required: this.isCloud, message: this.$t('member.inputMobile'), trigger: 'blur',
  633. // validator: (rule, value, callback) => {
  634. // // this.isCloud = false
  635. // if (this.isCloud === false) {
  636. // if (value === null || value === '') { // 手机号可为空
  637. // callback()
  638. // }
  639. // // }
  640. // // if (!RegExp.mobile.test(value)) {
  641. // // callback(new Error(this.$t('member.mobileInputMsg')))
  642. // // } else {
  643. // callback()
  644. // }
  645. // }
  646. }
  647. ]
  648. },
  649. /** 换床 */
  650. changeBedFormVisible: false,
  651. changeBedFormModel: {
  652. },
  653. changeBedRules: {
  654. frame_id: [{ required: true, message: this.$t('customerManage.choiceFrame'), trigger: 'blur' }]
  655. },
  656. /** 空床位 **/
  657. emptyBeds: [],
  658. partFrames: [],
  659. /** frame 是否为空床位 */
  660. isEmptyFrame: true,
  661. rules: {
  662. named: [
  663. this.MixinRequired(this.$t('customerManage.inputNamed'))
  664. ],
  665. age: [
  666. { required: true, message: this.$t('customerManage.inputAge'), trigger: 'blur' }
  667. // { required: false, message: '请输入年龄', trigger: 'blur' }
  668. ],
  669. mobile: [
  670. this.MixinRequired(this.$t('member.inputMobile')),
  671. {
  672. validator: (rule, value, callback) => {
  673. // if (!RegExp.mobile.test(value)) {
  674. // callback(new Error(this.$t('member.mobileInputMsg')))
  675. // } else {
  676. callback()
  677. }
  678. }
  679. ],
  680. // mobile: [
  681. // { required: false, message: '请输入手机号码', trigger: 'blur' }
  682. // ],
  683. frame_id: [
  684. { required: Object.keys(this.frame).length === 0, message: this.$t('customerManage.choiceFrame'), trigger: 'blur' } // 没有传入frame 属性,必须选择床位
  685. ]
  686. },
  687. doctors: [],
  688. nurses: [],
  689. workers: [],
  690. nurseData: [],
  691. sexTransfer: [
  692. { key: this.$t('member.man'), value: 1, color: 'green' },
  693. { key: this.$t('member.woman'), value: 0, color: 'red' }
  694. ],
  695. customerStatusTransfer: [
  696. { key: this.$t('customerManage.customerStatusTrue'), value: 0, color: 'green' },
  697. { key: this.$t('customerManage.customerStatusFalse'), value: 1, color: 'red' }
  698. ],
  699. detailsVisible: false,
  700. qrCode: null,
  701. relativeNameTypeEnum: RELATIVE_NAME_TYPE.getValueList(),
  702. childbirthTypeEnum: CHILDBIRTH_TYPE.getValueList(),
  703. isChild: false,
  704. shop: {},
  705. boolDevice: false,
  706. mapUrl: null
  707. }
  708. },
  709. computed: {
  710. tableHeight() {
  711. return Object.keys(this.frame).length === 0 ? this.mainAreaHeight - 130 : this.mainAreaHeight - 174
  712. },
  713. /** 床位是否允许选择,如果已限定空间结构,则不可选 */
  714. bedSelectabled() { return Object.keys(this.frame).length > 0 }
  715. },
  716. watch: {
  717. frame(val, oldvalue) {
  718. if (val.type === FRAME_TYPE.HOSPITAL) { // 医院
  719. this.params.fixedCondition = 'part_id in (SELECT shop_id FROM ncs_shop WHERE parent_id = ' + this.frame.hospital_id + ')'
  720. } else if (val.type === FRAME_TYPE.PART) { // 科室
  721. this.params.fixedCondition = ' part_id =' + this.frame.part_id
  722. } else if (val.type === FRAME_TYPE.ROOM) { // 房间
  723. const ids = []
  724. this.frame.children.forEach(item => {
  725. ids.push(item.id)
  726. })
  727. if (ids.length > 0) {
  728. this.params.fixedCondition = ' frame_id in (' + ids + ')'
  729. } else {
  730. this.params.fixedCondition = ' frame_id = ' + this.frame.id
  731. }
  732. } else {
  733. this.params.fixedCondition = ' frame_id = ' + this.frame.id
  734. }
  735. this.getList()
  736. this.infoChanged()
  737. }
  738. },
  739. beforeMount() {
  740. const _this = this
  741. this.gridOptions = {
  742. onCellDoubleClicked: function (row) {
  743. _this.formmodel = {
  744. ...row.data
  745. }
  746. _this.detailsVisible = true
  747. }
  748. }
  749. this.columnDefs = [
  750. {
  751. headerName: '#',
  752. headerCheckboxSelection: true,
  753. headerCheckboxSelectionFilteredOnly: true,
  754. checkboxSelection: true,
  755. sortable: false, filter: false,
  756. width: 50,
  757. resizable: false,
  758. valueGetter: this.hashValueGetter
  759. },
  760. // { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100 },
  761. { headerName: this.$t('customerManage.named'), field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160 },
  762. { headerName: this.$t('customerManage.nickname'), field: 'nickname', sortable: true, filter: 'agTextColumnFilter', width: 130 },
  763. { headerName: this.$t('customerManage.frame'), field: 'full_name', sortable: true, filter: 'agTextColumnFilter' },
  764. { headerName: this.$t('customerManage.customerStatus'), field: 'status', sortable: true, filterFramework: 'RadioFilter', width: 130,
  765. filterParams: {
  766. listData: this.customerStatusTransfer
  767. },
  768. cellRenderer: this.customerStatusRenderer },
  769. // lockPosition 锁定位置,会在第一列
  770. // lockPinned = true 不能拖动然后固定
  771. // resizeable 单元个大小是否可以调整
  772. { headerName: this.$t('member.sex'), field: 'sex', sortable: true, filterFramework: 'RadioFilter', width: 130,
  773. filterParams: {
  774. listData: this.sexTransfer
  775. },
  776. cellRenderer: this.sexRenderer },
  777. { headerName: this.$t('customerManage.age'), field: 'age', sortable: true, filter: 'agNumberColumnFilter', width: 130, valueFormatter: this.sexFormatter
  778. },
  779. { headerName: this.$t('member.birthday'), field: 'birthday', sortable: true, filter: 'agDateColumnFilter', width: 130, valueFormatter: this.unixDateFormatter2, filterParams: {
  780. comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
  781. const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
  782. return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
  783. }
  784. }},
  785. { headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: true, filter: 'agTextColumnFilter' },
  786. { headerName: this.$t('customerManage.idType'),
  787. field: 'id_type',
  788. sortable: true,
  789. filter: 'agTextColumnFilter',
  790. valueFormatter: this.idCardFormatter
  791. },
  792. { headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', valueFormatter: this.idNoFormatter },
  793. { headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter' },
  794. { headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260 },
  795. { headerName: this.$t('customerManage.inDate'), field: 'in_date', sortable: true, filter: 'agDateColumnFilter', valueFormatter: this.formatterDate, filterParams: {
  796. comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
  797. const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
  798. return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
  799. }
  800. }},
  801. // { headerName: '离开时间', field: 'out_date', sortable: true, filter: 'agDateColumnFilter', valueFormatter: this.unixDateFormatter, filterParams: {
  802. // comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
  803. // const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
  804. // return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
  805. // }
  806. // }},
  807. { headerName: this.$t('action.handle'), field: 'id',
  808. cellRendererFramework: 'ButtonCellRenderList',
  809. cellRendererParams: param => {
  810. return {
  811. list: [
  812. {
  813. onClick: this.handleEdit,
  814. label: this.$t('action.edit'),
  815. buttonType: 'primary',
  816. buttonSize: 'mini'
  817. },
  818. {
  819. onClick: this.handleOut,
  820. label: this.$t('customerManage.outBed'),
  821. buttonType: 'warning',
  822. buttonSize: 'mini',
  823. disabled: param.data['status'] !== 0
  824. },
  825. {
  826. onClick: this.handleChangeBed,
  827. label: this.$t('customerManage.changeBed'),
  828. buttonType: 'success',
  829. buttonSize: 'mini',
  830. disabled: param.data['status'] !== 0
  831. },{
  832. onClick: this.deleteSingle,
  833. label: this.$t('action.delete'),
  834. buttonType: 'danger',
  835. buttonSize: 'mini',
  836. disabled: param.data['member_name'] === 'superadmin'
  837. }
  838. ]}
  839. },
  840. filter: false,
  841. pinned: 'right',
  842. lockPinned: true,
  843. minWidth: this.$i18n.locale === 'zh' ? 260 : 380,
  844. resizable: false,
  845. sortable: false },
  846. // { headerName: '退床', field: 'id',
  847. // cellRendererFramework: 'ButtonCellRender',
  848. // cellRendererParams: param => {
  849. // return {
  850. // onClick: this.handleOut,
  851. // label: '退床',
  852. // buttonType: 'warning',
  853. // buttonSize: 'mini',
  854. // disabled: param.data['status'] !== 0
  855. // }
  856. // },
  857. // filter: false,
  858. // pinned: 'right',
  859. // lockPinned: true,
  860. // width: 80,
  861. // resizable: false,
  862. // sortable: false },
  863. // { headerName: '换床', field: 'id',
  864. // cellRendererFramework: 'ButtonCellRender',
  865. // cellRendererParams: param => {
  866. // return {
  867. // onClick: this.handleChangeBed,
  868. // label: '换床',
  869. // buttonType: 'success',
  870. // buttonSize: 'mini',
  871. // disabled: param.data['status'] !== 0
  872. // }
  873. // },
  874. // filter: false,
  875. // pinned: 'right',
  876. // lockPinned: true,
  877. // width: 80,
  878. // resizable: false,
  879. // sortable: false },
  880. // { headerName: '删除', field: 'shop_id',
  881. // cellRendererFramework: 'ButtonCellRender',
  882. // cellRendererParams: param => {
  883. // return {
  884. // onClick: this.deleteSingle,
  885. // label: '删除',
  886. // buttonType: 'danger',
  887. // buttonSize: 'mini',
  888. // disabled: param.data['member_name'] === 'superadmin'
  889. // }
  890. // },
  891. // pinned: 'right',
  892. // lockPinned: true,
  893. // width: 80,
  894. // resizable: false,
  895. // filter: false,
  896. // sortable: false }
  897. ]
  898. this.defaultColDef = {
  899. // filter: 'agTextColumnFilter',
  900. sortable: true,
  901. resizable: true,
  902. // comparator: this.dateCustomComparator,
  903. filterParams: {
  904. debounceMs: 500,
  905. newRowsAction: 'keep',
  906. textCustomComparator: this.textCustomComparator
  907. }
  908. }
  909. this.rowSelection = 'multiple'
  910. },
  911. mounted() {
  912. window.onresize = this.windowResize()
  913. this.gridApi = this.gridOptions.api
  914. this.gridColumnApi = this.gridOptions.columnApi
  915. this.gridColumnApi.applyColumnState({
  916. state: [
  917. {
  918. colId: 'status',
  919. sort: 'asc'
  920. }
  921. ]
  922. })
  923. this.getShop(this.$store.getters.partId)
  924. this.getCloud()
  925. },
  926. methods: {
  927. windowResize() {
  928. this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
  929. },
  930. getEmptyBeds() {
  931. return new Promise((resolve, reject) => {
  932. if (this.shop.shop_type === "0" && this.shop.parent_id === -1) {
  933. API_Frame.getAllSickbed(this.$store.getters.partId).then(res => {
  934. this.emptyBeds = [...res]
  935. resolve()
  936. }).catch(err => {
  937. this.$message.error(this.$t('customerManage.getEmptyBed') + err.message)
  938. reject()
  939. })
  940. } else {
  941. API_Frame.getSickbedByPartId(this.$store.getters.partId).then(res => {
  942. this.emptyBeds = [...res]
  943. resolve()
  944. }).catch(err => {
  945. this.$message.error(this.$t('customerManage.getEmptyBed') + err.message)
  946. reject()
  947. })
  948. }
  949. })
  950. },
  951. /** 分页大小发生改变 */
  952. handlePageSizeChange(size) {
  953. this.params.page_size = size
  954. this.getList()
  955. },
  956. /** 分页页数发生改变 */
  957. handlePageCurrentChange(page) {
  958. this.params.page_no = page
  959. this.getList()
  960. },
  961. /** 加载列表数据 */
  962. getList() {
  963. const param = this.MixinClone(this.params)
  964. this.gridApi.showLoadingOverlay()
  965. API_Customer.getList(param).then(response => {
  966. this.rowData = [...response.data]
  967. this.pageData = {
  968. page_no: response.page_no,
  969. page_size: response.page_size,
  970. data_total: response.data_total
  971. }
  972. this.$nextTick(() => {
  973. const node = this.gridApi.getDisplayedRowAtIndex(0)
  974. if (node !== null && node !== undefined) {
  975. node.setSelected(true)
  976. }
  977. })
  978. })
  979. },
  980. /**
  981. * 过滤状态发生变化,发送到服务器检索数据
  982. */
  983. filterModifed(param) {
  984. var model = param.api.getFilterModel()
  985. this.params.filter = JSON.stringify(model)
  986. this.getList()
  987. },
  988. gridSortChange(param) {
  989. console.log('sortparam', param)
  990. const columnState = param.columnApi.getColumnState()
  991. // 排序状态
  992. const sortState = columnState.filter(function(s) {
  993. return s.sort != null
  994. }).map(function(s) {
  995. return {
  996. colId: s.colId,
  997. sort: s.sort,
  998. sortIndex: s.sortIndex
  999. }
  1000. }).sort(function(a, b) {
  1001. return a.sortIndex - b.sortIndex
  1002. })
  1003. if (sortState.length > 0) {
  1004. if (sortState.length === 1) {
  1005. this.params.sort = sortState[0].colId
  1006. this.params.dir = sortState[0].sort
  1007. } else {
  1008. let sortstring = ''
  1009. sortState.forEach(function(item) {
  1010. sortstring += item.colId + ' ' + item.sort + ','
  1011. })
  1012. this.params.sort = sortstring.substring(0, sortstring.length - 1)
  1013. this.params.dir = ' '
  1014. }
  1015. } else {
  1016. delete this.params.sort
  1017. delete this.params.dir
  1018. }
  1019. this.getList()
  1020. },
  1021. /** 处理搜索 */
  1022. handlerSearch(keywords) {
  1023. this.params.query = keywords
  1024. this.getList()
  1025. },
  1026. /** 入住登记 **/
  1027. handleAdd() {
  1028. this.customerFormVisible = true
  1029. this.activeName = 'customerBaseInfo'
  1030. this.formmodel = {
  1031. sex: 0,
  1032. id_type: '身份证',
  1033. age_unit: this.$t('customerManage.year'),
  1034. in_date: (new Date()).valueOf(),
  1035. out_date: (new Date()).valueOf(),
  1036. mobile: '',
  1037. part_id: this.part_view ? this.$store.getters.partId : this.frame.part_id
  1038. }
  1039. if (Object.keys(this.frame).length > 0) {
  1040. this.$set(this.formmodel, 'frame_id', this.frame.id)
  1041. }
  1042. },
  1043. /** 性别格式化 **/
  1044. sexRenderer(params) {
  1045. if (params.value === null || params.value === undefined) return ''
  1046. const item = this.sexTransfer.filter(p => p.value === params.value)[0]
  1047. if (item) {
  1048. return '<span style="color:' + item.color + ';">' + item.key + '</span>'
  1049. } else {
  1050. return this.$t('member.unknown')
  1051. }
  1052. },
  1053. /** 状态格式化 **/
  1054. customerStatusRenderer(params) {
  1055. if (params.value === null || params.value === undefined) return ''
  1056. const item = this.customerStatusTransfer.filter(p => p.value === params.value)[0]
  1057. if (item) {
  1058. return '<span style="color:' + item.color + ';">' + item.key + '</span>'
  1059. } else {
  1060. return this.$t('member.unknown')
  1061. }
  1062. },
  1063. /** 格式化时间函数 */
  1064. unixDateFormatter(param) {
  1065. if (!param.value) return ''
  1066. return unix2Date(param.value * 1000)
  1067. },
  1068. unixDateFormatter2(param) {
  1069. if (!param.value) return ''
  1070. return unix2Date(param.value * 1000, 'yyyy-MM-dd')
  1071. },
  1072. sexFormatter(param) {
  1073. return param.value + param.data.age_unit
  1074. },
  1075. /**
  1076. * 身份证转换
  1077. */
  1078. idCardFormatter(param) {
  1079. if (param.value === '身份证') {
  1080. return this.$t('customerManage.idCard');
  1081. } else if (param.value === '护照') {
  1082. return this.$t('customerManage.passport');
  1083. } else if (param.value === '军人证') {
  1084. return this.$t('customerManage.servicemanCard');
  1085. } else {
  1086. return this.$t('customerManage.null');
  1087. }
  1088. },
  1089. idNoFormatter(param) {
  1090. if (param.value) {
  1091. return param.data.id_type + ':' + param.value
  1092. } else {
  1093. return this.$t('customerManage.noIdCard')
  1094. }
  1095. },
  1096. formatterDate(param) {
  1097. let date = unixToDate(param.data.in_date, 'yyyy-MM-dd')
  1098. if (param.data.out_date) {
  1099. date += this.$t('customerManage.to') + unixToDate(param.data.out_date, 'yyyy-MM-dd')
  1100. } else {
  1101. if (param.data.in_date) {
  1102. date += this.$t('customerManage.today')
  1103. }
  1104. }
  1105. return date
  1106. },
  1107. handleClick() {
  1108. if (this.activeName === 'footprint') {
  1109. this.$router.push({path:'/myMapHtml', query: {mapUrl: this.mapUrl}})
  1110. }
  1111. },
  1112. /** 生日选择变化,修改年龄字段 */
  1113. birthdayChange(val) {
  1114. const ageObj = this.getAge(val)
  1115. console.log('ageobj', ageObj)
  1116. this.$set(this.formmodel, 'age_unit', ageObj.ageunit)
  1117. this.$set(this.formmodel, 'age', ageObj.age)
  1118. // this.formmodel.age_unit = ageObj.ageunit
  1119. // this.formmodel.age = ageObj.age
  1120. },
  1121. getAge(birthday) {
  1122. const birth = new Date(birthday)
  1123. const birthYear = birth.getFullYear() // 出生年
  1124. const birthMonth = birth.getMonth() + 1 // 出生月
  1125. const birthDay = birth.getDate() // 出生日
  1126. const nowYear = new Date().getFullYear() // 出生年
  1127. const nowMonth = new Date().getMonth() + 1 // 出生月
  1128. const nowDay = new Date().getDate() // 出生日
  1129. if (nowYear === birthYear) { // 同年
  1130. if (nowMonth === birthMonth) { // 同月
  1131. return {
  1132. age: nowDay - birthDay,
  1133. ageunit: '天'
  1134. }
  1135. } else {
  1136. return {
  1137. age: nowMonth - birthMonth,
  1138. ageunit: '月'
  1139. }
  1140. }
  1141. } else { // 计算周岁
  1142. const ageDiff = nowYear - birthYear // 年之差
  1143. if (ageDiff > 0) {
  1144. if (nowMonth === birthMonth) { // 同月
  1145. const dayDiff = nowDay - birthDay// 日之差
  1146. if (dayDiff < 0) {
  1147. return {
  1148. age: ageDiff - 1,
  1149. ageunit: '岁'
  1150. }
  1151. } else {
  1152. return {
  1153. age: ageDiff,
  1154. ageunit: '岁'
  1155. }
  1156. }
  1157. } else {
  1158. const monthDiff = nowMonth - birthMonth // 月之差
  1159. if (monthDiff < 0) {
  1160. return {
  1161. age: ageDiff - 1,
  1162. ageunit: '岁'
  1163. }
  1164. } else {
  1165. return {
  1166. age: ageDiff,
  1167. ageunit: '岁'
  1168. }
  1169. }
  1170. }
  1171. }
  1172. }
  1173. },
  1174. /** 上传成功后的钩子 更换图片 置空存储数组*/
  1175. uploaded(response) {
  1176. this.imageUrl = serverUrl + '/' + response
  1177. this.formmodel.face = serverUrl + '/' + response
  1178. },
  1179. /** 图片上传之前的校验 */
  1180. handleShopLogoBefore(file) {
  1181. const isImg = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif'
  1182. const isLt2M = file.size / 1024 / 1024 < 2
  1183. if (!isImg) {
  1184. this.$message.error(this.$t('member.faceImg'))
  1185. }
  1186. if (!isLt2M) {
  1187. this.$message.error(this.$t('member.faceSize'))
  1188. }
  1189. return isImg && isLt2M
  1190. },
  1191. /** 入住登记 */
  1192. handlerSubmit(formName) {
  1193. this.$refs[formName].validate(valid => {
  1194. if (valid) {
  1195. this.isDisabled = true
  1196. if (this.formmodel.in_date) {
  1197. this.$set(this.formmodel, 'in_date', this.formmodel.in_date / 1000) // 将毫秒数转换成秒
  1198. }
  1199. if (this.formmodel.out_date) {
  1200. this.$set(this.formmodel, 'out_date', this.formmodel.out_date / 1000) // 将毫秒数转换成秒
  1201. }
  1202. if (this.formmodel.birthday) {
  1203. this.$set(this.formmodel, 'birthday', this.formmodel.birthday / 1000) // 将毫秒数转换成秒
  1204. }
  1205. if (!this.formmodel.id) {
  1206. API_Customer.addAll(this.formmodel).then(res => {
  1207. this.$message.success(this.$t('action.addSuccess'))
  1208. this.customerFormVisible = false
  1209. this.isDisabled = false
  1210. this.getList()
  1211. this.infoChanged()
  1212. this.$emit('saved')
  1213. }).catch(e => {
  1214. this.isDisabled = false
  1215. })
  1216. } else {
  1217. API_Customer.updateAll(this.formmodel).then(res => {
  1218. this.$message.success(this.$t('action.editSuccess'))
  1219. this.customerFormVisible = false
  1220. this.isDisabled = false
  1221. this.getList()
  1222. this.$emit('saved')
  1223. })
  1224. }
  1225. } else {
  1226. this.$message.error(this.$t('action.fromError'))
  1227. return false
  1228. }
  1229. })
  1230. },
  1231. /** 删除用户 **/
  1232. deleteSingle(row) {
  1233. this.handlerDelete(row.id)
  1234. },
  1235. /** 单条数据删除处理 */
  1236. handlerDelete(ids) {
  1237. const test = this.$t('member.deleteMember')
  1238. this.$confirm(test, this.$t('action.waring'), {
  1239. confirmButtonText: this.$t('action.yes'),
  1240. cancelButtonText: this.$t('action.cancel'),
  1241. type: 'warning'
  1242. }).then(() => {
  1243. API_Customer.remove(ids).then(
  1244. response => {
  1245. this.$emit('saved')
  1246. this.getList()
  1247. this.infoChanged()
  1248. }
  1249. ).catch(response => {
  1250. this.$message({
  1251. type: 'info',
  1252. message: response.message
  1253. })
  1254. })
  1255. }).catch(() => {
  1256. this.$message.info(this.$t('action.cancelDelete'))
  1257. })
  1258. },
  1259. handleEdit(row) {
  1260. this.boolDevice = false
  1261. this.relativeRules.mobile[0].required = this.isCloud
  1262. this.formmodel = {
  1263. ...row
  1264. }
  1265. if (row['face']) {
  1266. this.imageUrl = row['face']
  1267. } else {
  1268. this.imageUrl = null
  1269. }
  1270. // 编辑时把当前用户床位加入到空床位,否则会显示一个床位Id号
  1271. this.emptyBeds.push({ id: this.formmodel.frame_id, full_name: this.formmodel.full_name })
  1272. if (this.formmodel.in_date) {
  1273. this.$set(this.formmodel, 'in_date', this.formmodel.in_date * 1000)
  1274. }
  1275. if (this.formmodel.out_date) {
  1276. this.$set(this.formmodel, 'out_date', this.formmodel.out_date * 1000)
  1277. }
  1278. if (this.formmodel.birthday) {
  1279. this.$set(this.formmodel, 'birthday', this.formmodel.birthday * 1000)
  1280. }
  1281. this.customerFormVisible = true
  1282. this.getQrCode()
  1283. this.getRemarks()
  1284. this.getRelatives()
  1285. if (this.isCloud) {
  1286. const _this = this
  1287. getDevicesByUuid(row.uuid).then(res => {
  1288. if (res) {
  1289. _this.boolDevice = true
  1290. _this.mapUrl = res
  1291. }
  1292. })
  1293. }
  1294. },
  1295. /** 出院 退床 **/
  1296. handleOut(row) {
  1297. this.formmodel = {
  1298. ...row,
  1299. status: 1
  1300. }
  1301. this.$confirm(this.$t('customerManage.sureOutBed'), this.$t('action.waring'), {
  1302. confirmButtonText: this.$t('action.yes'),
  1303. cancelButtonText: this.$t('action.cancel'),
  1304. type: 'warning'
  1305. }).then(() => {
  1306. API_Customer.updateAll(this.formmodel).then(res => {
  1307. this.$message.success(this.$t('customerManage.outBedSuccess'))
  1308. this.$emit('saved')
  1309. this.getList()
  1310. this.infoChanged()
  1311. })
  1312. }).catch(() => {
  1313. this.$message.info(this.$t('action.cancelHandle'))
  1314. })
  1315. },
  1316. /** 换床 **/
  1317. handleChangeBed(row) {
  1318. this.changeBedFormVisible = true
  1319. this.changeBedFormModel = {
  1320. ...row,
  1321. current_bed: row.full_name,
  1322. frame_id: null
  1323. }
  1324. },
  1325. /** 提交换床 */
  1326. handleChangeBedSubmit(formName) {
  1327. this.$refs[formName].validate(valid => {
  1328. if (valid) {
  1329. API_Customer.updateAll(this.changeBedFormModel).then(res => {
  1330. this.$message.success(this.$t('customerManage.changeBedSuccess'))
  1331. this.$emit('saved')
  1332. this.getList()
  1333. this.infoChanged()
  1334. this.changeBedFormVisible = false
  1335. })
  1336. } else {
  1337. this.$message.error(this.$t('action.fromError'))
  1338. return false
  1339. }
  1340. })
  1341. },
  1342. /** 获取用户备注 */
  1343. getRemarks() {
  1344. this.remarkParams.fixedCondition = 'part_id=' + this.$store.getters.partId + ' and type=1 and member_id =' + this.formmodel.member_id
  1345. API_Remark.getRemarks(this.remarkParams).then(res => {
  1346. this.remarks = [...res.data]
  1347. })
  1348. },
  1349. /** 添加备注 */
  1350. addRemark() {
  1351. this.$refs['remarkForm'].validate(valid => {
  1352. if (valid) {
  1353. if (!this.filePath) {
  1354. this.fileName = null
  1355. }
  1356. const data = {
  1357. ...this.remarkFormModel,
  1358. partId: this.$store.getters.partId,
  1359. type: 1,
  1360. memberId: this.formmodel.member_id,
  1361. createName: this.$store.getters.userInfo.username
  1362. }
  1363. API_Remark.save(data).then(res => {
  1364. this.$message.success(this.$t('action.addSuccess'))
  1365. this.remarkFormModel = {}
  1366. this.attachFilePath = null
  1367. this.getRemarks()
  1368. })
  1369. } else {
  1370. this.$message.error(this.$t('action.fromError'))
  1371. return false
  1372. }
  1373. })
  1374. },
  1375. /** 附件上传成功 */
  1376. attachUploaded(res) {
  1377. this.attachFilePath = serverUrl + '/' + res
  1378. this.remarkFormModel.filePath = serverUrl + '/' + res
  1379. },
  1380. /** 附件上传之前校验 */
  1381. handleAttachUploadBefore(file) {
  1382. return new Promise((resolve, reject) => {
  1383. const filename = file.name
  1384. this.remarkFormModel.fileName = filename
  1385. const index = filename.lastIndexOf('.')
  1386. const extension = filename.substring(index + 1)
  1387. const isImg = extension === 'jpeg' || extension === 'png' || extension === 'jpg' || extension === 'txt' || extension === 'doc' || extension === 'docx' || extension === 'xls' || extension === 'xlsx'
  1388. const isLt5M = file.size / 1024 / 1024 < 5
  1389. if (!isImg) {
  1390. this.$message.error(this.$t('action.uploaderImg'))
  1391. reject()
  1392. }
  1393. if (!isLt5M) {
  1394. this.$message.error(this.$t('action.uploaderSize'))
  1395. reject()
  1396. }
  1397. resolve()
  1398. })
  1399. },
  1400. /** 添加亲属 */
  1401. addRelative() {
  1402. this.$refs['relativeForm'].validate(valid => {
  1403. if (valid) {
  1404. this.relativeFormModel.relative_id = this.formmodel.member_id
  1405. if (this.relativeFormModel.birthday) {
  1406. this.$set(this.relativeFormModel, 'birthday', this.relativeFormModel.birthday / 1000) // 将毫秒数转换成秒
  1407. }
  1408. API_User.addRelative(this.relativeFormModel).then(res => {
  1409. this.relativeFormModel = {
  1410. sex: 0,
  1411. true_name: null,
  1412. relative_name: null,
  1413. mobile: null
  1414. }
  1415. this.getRelatives()
  1416. })
  1417. }
  1418. })
  1419. },
  1420. /** 拉取亲属列表 **/
  1421. getRelatives() {
  1422. this.relativeParams.fixedCondition = ' member_id=' + this.formmodel.member_id
  1423. getRelativeList(this.relativeParams).then(res => {
  1424. this.relativeData = res.data
  1425. }).catch(() => {
  1426. })
  1427. },
  1428. /** 单条数据删除处理 */
  1429. handlerDeleteRelative(ids) {
  1430. const test = this.$t('customerManage.sureDeleteRelative')
  1431. this.$confirm(test, this.$t('action.waring'), {
  1432. confirmButtonText: this.$t('action.yes'),
  1433. cancelButtonText: this.$t('action.cancel'),
  1434. type: 'warning'
  1435. }).then(() => {
  1436. removeRelative(ids).then(
  1437. response => {
  1438. this.getRelatives()
  1439. }
  1440. ).catch(response => {
  1441. this.$message({
  1442. type: 'info',
  1443. message: response.message
  1444. })
  1445. })
  1446. })
  1447. },
  1448. formatterSex(row) {
  1449. if (row.sex === 1) {
  1450. return this.$t('member.man')
  1451. } else if (row.sex === 0) {
  1452. return this.$t('member.woman')
  1453. } else {
  1454. return this.$t('member.unknown')
  1455. }
  1456. },
  1457. formatterRelativeName(row) {
  1458. return RELATIVE_NAME_TYPE.getDescFromValue(row.relative_name) ? RELATIVE_NAME_TYPE.getDescFromValue(row.relative_name) : row.relative_name
  1459. },
  1460. relativeNameChange(val) {
  1461. if (val === RELATIVE_NAME_TYPE.CHILDREN || val === RELATIVE_NAME_TYPE.BOY || val === RELATIVE_NAME_TYPE.GIRL) {
  1462. this.relativeRules.mobile[0].required = false
  1463. this.relativeRules.mobile[0].validator = (rule, value, callback) => { callback() }
  1464. this.isChild = true
  1465. if (val === RELATIVE_NAME_TYPE.BOY) {
  1466. this.relativeFormModel.sex = 1
  1467. } else if (val === RELATIVE_NAME_TYPE.GIRL) {
  1468. this.relativeFormModel.sex = 0
  1469. }
  1470. }
  1471. else if (val === RELATIVE_NAME_TYPE.HUSBAND || val === RELATIVE_NAME_TYPE.FATHER) {
  1472. this.relativeRules.mobile[0].required = true
  1473. this.isChild = false
  1474. this.relativeFormModel.sex = 1
  1475. }
  1476. else if (val === RELATIVE_NAME_TYPE.WIFE || val === RELATIVE_NAME_TYPE.MOTHER) {
  1477. this.relativeRules.mobile[0].required = true
  1478. this.isChild = false
  1479. this.relativeFormModel.sex = 0
  1480. }
  1481. else {
  1482. this.relativeRules.mobile[0].required = true
  1483. this.isChild = false
  1484. }
  1485. },
  1486. /** 信息变化后操作,如床位状态改变,传入的空间结构变化了 **/
  1487. infoChanged() {
  1488. this.getEmptyBeds().then(() => {
  1489. // 传入结构是否为空床位
  1490. if (Object.keys(this.frame).length > 0) {
  1491. this.isEmptyFrame = this.emptyBeds.filter(p => p.id === this.frame.id).length > 0
  1492. }
  1493. }).catch(() => {
  1494. })
  1495. },
  1496. /** 批量数据删除处理(删除选中的行) */
  1497. batchDelete: function() {
  1498. const rows = this.gridApi.getSelectedRows()
  1499. if (rows.length === 0) {
  1500. this.$message({ type: 'info', message: this.$t('member.pleaseChoiceDelete') })
  1501. return
  1502. }
  1503. const ids = []
  1504. const uids = []
  1505. rows.forEach(function(item) {
  1506. ids.push(item.id)
  1507. uids.push(item.member_id)
  1508. })
  1509. this.handlerDelete(ids.join(','))
  1510. this.deleteMembers(uids) // 同时删除用户
  1511. },
  1512. async deleteMembers(ids) {
  1513. API_User.remove(ids)
  1514. },
  1515. getQrCode(){
  1516. API_User.getUnionId(this.formmodel.member_id).then(r => {
  1517. this.qrCode = 'http://m.wdklian.com/care/apk/care.user?type=USER_LOGIN&uid=' + r
  1518. })
  1519. },
  1520. getCloud() {
  1521. API_SystemConfig.cloud().then(r => {
  1522. this.isCloud = r
  1523. })
  1524. },
  1525. getShop(shopId) {
  1526. shop_API.getShop(shopId).then(res => {
  1527. this.shop = res;
  1528. this.getEmptyBeds()
  1529. this.getPartFrame(shopId)
  1530. })
  1531. },
  1532. getFrame(frame_id) {
  1533. return this.partFrames.filter(item => item.id === frame_id)
  1534. },
  1535. getPartFrame(partId) {
  1536. if (this.shop.shop_type === "0" && this.shop.parent_id === -1) {
  1537. API_Frame.getAllFrames(partId).then(res => {
  1538. this.partFrames = [...res]
  1539. })
  1540. } else {
  1541. API_Frame.getFramesPartId(partId).then(res => {
  1542. this.partFrames = [...res]
  1543. })
  1544. }
  1545. }
  1546. }
  1547. }
  1548. </script>
  1549. <style scoped type="text/scss">
  1550. /deep/ .customer-dialog .el-dialog__body{
  1551. padding: 1px;
  1552. }
  1553. .el-input-group__append .el-select {
  1554. width: 60px;
  1555. }
  1556. /*/deep/ .el-input-group__append {*/
  1557. /* background-color: #fff;*/
  1558. /*}*/
  1559. /deep/ .avatar-uploader,/deep/ .attach-uploader{
  1560. line-height: 0;
  1561. }
  1562. /deep/ .avatar-uploader .el-upload,/deep/.attach-uploader .el-upload {
  1563. border: 1px dashed #d9d9d9;
  1564. border-radius: 6px;
  1565. cursor: pointer;
  1566. position: static;
  1567. overflow: hidden;
  1568. display: inline-block;
  1569. }
  1570. .avatar-uploader .el-upload:hover {
  1571. border-color: #409EFF;
  1572. }
  1573. .avatar-uploader-icon {
  1574. font-size: 28px;
  1575. color: #8c939d;
  1576. width: 110px;
  1577. height: 110px;
  1578. line-height: 110px;
  1579. text-align: center;
  1580. }
  1581. .avatar {
  1582. width: 110px;
  1583. height: 110px;
  1584. display: block;
  1585. }
  1586. .attach-uploader-icon {
  1587. font-size: 28px;
  1588. color: #8c939d;
  1589. width: 60px;
  1590. height: 60px;
  1591. line-height: 60px;
  1592. text-align: center;
  1593. }
  1594. .attach {
  1595. width: 60px;
  1596. height: 60px;
  1597. display: block;
  1598. }
  1599. .el-input .el-select {
  1600. width: 120px;
  1601. }
  1602. </style>