index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="医院名称" prop="hospitalName">
  5. <el-input
  6. v-model="queryParams.hospitalName"
  7. placeholder="请输入医院名称"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="医院类型" prop="hospitalType">
  14. <el-select v-model="queryParams.hospitalType" placeholder="医院类型" clearable size="small">
  15. <el-option
  16. v-for="dict in hospitalTypeOptions"
  17. :key="dict.dictValue"
  18. :label="dict.dictLabel"
  19. :value="dict.dictValue"
  20. />
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item label="医院等级" prop="hospitalLevel">
  24. <el-select v-model="queryParams.hospitalLevel" placeholder="医院等级" clearable size="small">
  25. <el-option
  26. v-for="dict in hospitalleveOptions"
  27. :key="dict.dictValue"
  28. :label="dict.dictLabel"
  29. :value="dict.dictValue"
  30. />
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item label="省市区" prop="cityIds">
  34. <el-input
  35. v-model="queryParams.cityIds"
  36. placeholder="请输入省市区"
  37. clearable
  38. size="small"
  39. @keyup.enter.native="handleQuery"
  40. />
  41. </el-form-item>
  42. <el-form-item label="详细地址" prop="address">
  43. <el-input
  44. v-model="queryParams.address"
  45. placeholder="请输入详细地址"
  46. clearable
  47. size="small"
  48. @keyup.enter.native="handleQuery"
  49. />
  50. </el-form-item>
  51. <el-form-item label="状态" prop="status">
  52. <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
  53. <el-option
  54. v-for="dict in statusOptions"
  55. :key="dict.dictValue"
  56. :label="dict.dictLabel"
  57. :value="dict.dictValue"
  58. />
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item label="联系电话" prop="phone">
  62. <el-input
  63. v-model="queryParams.phone"
  64. placeholder="请输入联系电话"
  65. clearable
  66. size="small"
  67. @keyup.enter.native="handleQuery"
  68. />
  69. </el-form-item>
  70. <el-form-item>
  71. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  72. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  73. </el-form-item>
  74. </el-form>
  75. <el-row :gutter="10" class="mb8">
  76. <el-col :span="1.5">
  77. <el-button
  78. type="primary"
  79. plain
  80. icon="el-icon-plus"
  81. size="mini"
  82. @click="handleAdd"
  83. v-hasPermi="['his:hospital:add']"
  84. >新增</el-button>
  85. </el-col>
  86. <el-col :span="1.5">
  87. <el-button
  88. type="success"
  89. plain
  90. icon="el-icon-edit"
  91. size="mini"
  92. :disabled="single"
  93. @click="handleUpdate"
  94. v-hasPermi="['his:hospital:edit']"
  95. >修改</el-button>
  96. </el-col>
  97. <el-col :span="1.5">
  98. <el-button
  99. type="danger"
  100. plain
  101. icon="el-icon-delete"
  102. size="mini"
  103. :disabled="multiple"
  104. @click="handleDelete"
  105. v-hasPermi="['his:hospital:remove']"
  106. >删除</el-button>
  107. </el-col>
  108. <el-col :span="1.5">
  109. <el-button
  110. type="warning"
  111. plain
  112. icon="el-icon-download"
  113. size="mini"
  114. :loading="exportLoading"
  115. @click="handleExport"
  116. v-hasPermi="['his:hospital:export']"
  117. >导出</el-button>
  118. </el-col>
  119. <el-col :span="1.5">
  120. <el-button
  121. type="info"
  122. plain
  123. icon="el-icon-upload2"
  124. size="mini"
  125. @click="handleImport"
  126. >导入</el-button>
  127. </el-col>
  128. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  129. </el-row>
  130. <el-table v-loading="loading" border :data="hospitalList" @selection-change="handleSelectionChange">
  131. <el-table-column type="selection" width="55" align="center" />
  132. <el-table-column label="医院名称" align="center" prop="hospitalName" width="200px"/>
  133. <el-table-column label="医院类型" align="center" prop="hospitalType" >
  134. <template slot-scope="scope">
  135. <dict-tag :options="hospitalTypeOptions" :value="scope.row.hospitalType"/>
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="医院等级" align="center" prop="hospitalLevel">
  139. <template slot-scope="scope">
  140. <dict-tag :options="hospitalleveOptions" :value="scope.row.hospitalLevel"/>
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="医院照片" align="center" >
  144. <template slot-scope="scope">
  145. <el-popover
  146. placement="right"
  147. title=""
  148. trigger="hover">
  149. <img slot="reference" :src="scope.row.imgUrl" width="60px">
  150. <img :src="scope.row.imgUrl" style="max-width: 250px;">
  151. </el-popover>
  152. </template>
  153. </el-table-column>
  154. <el-table-column label="省市区" align="center" prop="cityIds" width="150px">
  155. <template slot-scope="scope">
  156. {{scope.row.province}}{{scope.row.city}}{{scope.row.district}}
  157. </template>
  158. </el-table-column>
  159. <el-table-column label="详细地址" align="center" prop="address" width="150px"/>
  160. <el-table-column label="状态">
  161. <template slot-scope="scope">
  162. <dict-tag :options="statusOptions" :value="scope.row.status"/>
  163. </template>
  164. </el-table-column>
  165. <el-table-column label="处方印章" align="center" prop="sealUrl">
  166. <template slot-scope="scope">
  167. <el-popover v-if="scope.row.sealUrl!=null &&scope.row.sealUrl!=''"
  168. placement="right"
  169. title=""
  170. trigger="hover">
  171. <img slot="reference" :src="scope.row.sealUrl" width="60px">
  172. <img :src="scope.row.sealUrl" style="max-width: 250px;">
  173. </el-popover>
  174. </template>
  175. </el-table-column>
  176. <el-table-column label="备注" align="center" prop="remark" />
  177. <el-table-column label="联系电话" align="center" prop="phone" width="150px"/>
  178. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px" fixed="right">
  179. <template slot-scope="scope">
  180. <el-button
  181. size="mini"
  182. type="text"
  183. icon="el-icon-edit"
  184. @click="handleUpdate(scope.row)"
  185. v-hasPermi="['his:hospital:edit']"
  186. >修改</el-button>
  187. <el-button
  188. size="mini"
  189. type="text"
  190. @click="handledetails(scope.row)"
  191. v-hasPermi="['his:disease:details']"
  192. >详情</el-button>
  193. <el-button
  194. size="mini"
  195. type="text"
  196. icon="el-icon-delete"
  197. @click="handleDelete(scope.row)"
  198. v-hasPermi="['his:hospital:remove']"
  199. >删除</el-button>
  200. </template>
  201. </el-table-column>
  202. </el-table>
  203. <pagination
  204. v-show="total>0"
  205. :total="total"
  206. :page.sync="queryParams.pageNum"
  207. :limit.sync="queryParams.pageSize"
  208. @pagination="getList"
  209. />
  210. <!-- 添加或修改医院对话框 -->
  211. <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :rules="rules">
  212. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  213. <el-form-item label="医院名称" prop="hospitalName">
  214. <el-input v-model="form.hospitalName" placeholder="请输入医院名称" />
  215. </el-form-item>
  216. <el-form-item label="医院类型" prop="hospitalType">
  217. <el-select v-model="form.hospitalType" placeholder="医院类型" clearable size="small" >
  218. <el-option
  219. v-for="dict in hospitalTypeOptions"
  220. :key="dict.dictValue"
  221. :label="dict.dictLabel"
  222. :value="dict.dictValue"
  223. />
  224. </el-select>
  225. </el-form-item>
  226. <el-form-item label="医院等级" prop="hospitalLevel">
  227. <el-select v-model="form.hospitalLevel" placeholder="医院等级" clearable size="small" >
  228. <el-option
  229. v-for="dict in hospitalleveOptions"
  230. :key="dict.dictValue"
  231. :label="dict.dictLabel"
  232. :value="dict.dictValue"
  233. />
  234. </el-select>
  235. </el-form-item>
  236. <el-form-item label="简介" prop="descs" >
  237. <el-input v-model="form.descs" type="textarea" placeholder="请输入内容" />
  238. </el-form-item>
  239. <el-form-item label="医院照片" >
  240. <el-upload
  241. v-model="form.imgUrl"
  242. class="avatar-uploader"
  243. :action="uploadUrl"
  244. :show-file-list="false"
  245. :on-success="handleAvatarSuccess"
  246. :before-upload="beforeAvatarUpload">
  247. <img v-if="form.imgUrl" :src="form.imgUrl" class="avatar" width="200px">
  248. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  249. </el-upload>
  250. </el-form-item>
  251. <el-form-item label="省市区" >
  252. <el-cascader
  253. ref="citySelect"
  254. v-model="form.cityIds"
  255. :options="citys"
  256. @change="handleCityChange">
  257. </el-cascader>
  258. </el-form-item>
  259. <el-form-item label="详细地址" prop="address">
  260. <el-input placeholder="请输入内容" v-model="form.address" class="input-with-select" />
  261. <!-- <el-button slot="append" icon="el-icon-search" @click="openMap"></el-button> -->
  262. </el-form-item>
  263. <el-form-item label="状态" prop="status">
  264. <el-select v-model="form.status" placeholder="状态" clearable size="small">
  265. <el-option
  266. v-for="dict in statusOptions"
  267. :key="dict.dictValue"
  268. :label="dict.dictLabel"
  269. :value="dict.dictValue"
  270. />
  271. </el-select>
  272. </el-form-item>
  273. <el-form-item label="备注" prop="remark">
  274. <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
  275. </el-form-item>
  276. <el-form-item label="处方印章" prop="sealUrl">
  277. <el-upload
  278. v-model="form.sealUrl"
  279. class="avatar-uploader"
  280. :action="uploadUrl2"
  281. :show-file-list="false"
  282. :on-success="handleAvatarSuccess2"
  283. :before-upload="beforeAvatarUpload">
  284. <img v-if="form.sealUrl" :src="form.sealUrl" class="avatar" width="200px">
  285. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  286. </el-upload>
  287. </el-form-item>
  288. <el-form-item label="联系电话" prop="phone">
  289. <el-input v-model="form.phone" placeholder="请输入联系电话" />
  290. </el-form-item>
  291. </el-form>
  292. <div slot="footer" class="dialog-footer">
  293. <el-button type="primary" @click="submitForm">确 定</el-button>
  294. <el-button @click="cancel">取 消</el-button>
  295. </div>
  296. </el-dialog>
  297. <el-drawer
  298. :with-header="false"
  299. size="75%"
  300. :title="show.title" :visible.sync="show.open">
  301. <hospitalDetails ref="hospitalDetails" />
  302. </el-drawer>
  303. <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  304. <el-upload
  305. ref="upload"
  306. :limit="1"
  307. accept=".xlsx, .xls"
  308. :headers="upload.headers"
  309. :action="upload.url + '?updateSupport=' + upload.updateSupport"
  310. :disabled="upload.isUploading"
  311. :on-progress="handleFileUploadProgress"
  312. :on-success="handleFileSuccess"
  313. :auto-upload="false"
  314. drag
  315. >
  316. <i class="el-icon-upload"></i>
  317. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  318. <div class="el-upload__tip text-center" slot="tip">
  319. <div class="el-upload__tip" slot="tip">
  320. <!-- <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
  321. </div>
  322. <span>仅允许导入xls、xlsx格式文件。</span>
  323. <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
  324. </div>
  325. </el-upload>
  326. <div slot="footer" class="dialog-footer">
  327. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  328. <el-button @click="upload.open = false">取 消</el-button>
  329. </div>
  330. </el-dialog>
  331. <!--
  332. <getPointMap :dialogVisible="dialogVisibleMap"
  333. ref="mapfrom"
  334. title="地图取点" @cancel="mapCancel" @sure="surePoint"/> -->
  335. </div>
  336. </template>
  337. <script>
  338. import { importTemplate,listHospital, getHospital, delHospital, addHospital, updateHospital, exportHospital } from "@/api/his/hospital";
  339. import {getCitys} from "@/api/store/city";
  340. import hospitalDetails from '../../components/his/hospitalDetails.vue';
  341. import getPointMap from "../../components/getPoint_Map.vue";
  342. import { getToken } from "@/utils/auth";
  343. export default {
  344. name: "Hospital",
  345. components: { hospitalDetails,getPointMap },
  346. data() {
  347. return {
  348. dialogVisibleMap:false,
  349. show:{
  350. title:"医院详情",
  351. open:false,
  352. },
  353. upload: {
  354. // 是否显示弹出层
  355. open: false,
  356. // 弹出层标题
  357. title: "",
  358. // 是否禁用上传
  359. isUploading: false,
  360. // 是否更新已经存在的用户数据
  361. updateSupport: 0,
  362. // 设置上传的请求头部
  363. headers: { Authorization: "Bearer " + getToken() },
  364. // 上传的地址
  365. url: process.env.VUE_APP_BASE_API + "/his/hospital/importData"
  366. },
  367. citys:[],
  368. // 状态数据字典
  369. hospitalleveOptions: [],
  370. statusOptions: [],
  371. hospitalTypeOptions: [],
  372. uploadUrl2:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
  373. uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
  374. baseUrl: process.env.VUE_APP_BASE_API,
  375. // 遮罩层
  376. loading: true,
  377. // 导出遮罩层
  378. exportLoading: false,
  379. // 选中数组
  380. ids: [],
  381. // 非单个禁用
  382. single: true,
  383. // 非多个禁用
  384. multiple: true,
  385. // 显示搜索条件
  386. showSearch: true,
  387. // 总条数
  388. total: 0,
  389. // 医院表格数据
  390. hospitalList: [],
  391. // 弹出层标题
  392. title: "",
  393. // 是否显示弹出层
  394. open: false,
  395. // 查询参数
  396. queryParams: {
  397. pageNum: 1,
  398. pageSize: 10,
  399. hospitalName: null,
  400. hospitalType: null,
  401. hospitalLevel: null,
  402. descs: null,
  403. imgUrl: null,
  404. cityIds: null,
  405. province: null,
  406. city: null,
  407. district: null,
  408. address: null,
  409. lng: null,
  410. lat: null,
  411. status: null,
  412. sealUrl: null,
  413. phone: null
  414. },
  415. // 表单参数
  416. form: {},
  417. // 表单校验
  418. rules: {
  419. hospitalName: [
  420. { required: true, message: "医院名称不能为空", trigger: "blur" }
  421. ],
  422. hospitalType: [
  423. { required: true, message: "医院类型不能为空", trigger: "blur" }
  424. ],
  425. hospitalLevel: [
  426. { required: true, message: "医院等级不能为空", trigger: "blur" }
  427. ],
  428. status: [
  429. { required: true, message: "医院状态不能为空", trigger: "blur" }
  430. ],
  431. cityIds: [
  432. { required: true, message: "省市区不能为空", trigger: "blur" }
  433. ],
  434. }
  435. };
  436. },
  437. created() {
  438. this.getCitys();
  439. this.getList();
  440. this.getDicts("sys_company_status").then(response => {
  441. this.statusOptions = response.data;
  442. });
  443. this.getDicts("sys_hospital_type").then(response => {
  444. this.hospitalTypeOptions = response.data;
  445. });
  446. this.getDicts("sys_hospital_level").then(response => {
  447. this.hospitalleveOptions = response.data;
  448. });
  449. },
  450. methods: {
  451. openMap(row){
  452. setTimeout(() => {
  453. this.$refs.mapfrom.mapfrom(this.form);
  454. }, 1);
  455. this.dialogVisibleMap=true;
  456. },
  457. /** 导入按钮操作 */
  458. handleImport() {
  459. this.upload.title = "导入";
  460. this.upload.open = true;
  461. },
  462. /** 下载模板操作 */
  463. importTemplate() {
  464. importTemplate().then(response => {
  465. this.download(response.msg);
  466. });
  467. },
  468. // 文件上传中处理
  469. handleFileUploadProgress(event, file, fileList) {
  470. this.upload.isUploading = true;
  471. },
  472. // 文件上传成功处理
  473. handleFileSuccess(response, file, fileList) {
  474. this.upload.open = false;
  475. this.upload.isUploading = false;
  476. this.$refs.upload.clearFiles();
  477. this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
  478. this.getList();
  479. },
  480. // 提交上传文件
  481. submitFileForm() {
  482. this.$refs.upload.submit();
  483. },
  484. surePoint(value){
  485. //获取到地图返回的经纬度
  486. console.log(value);
  487. this.form.lat=value.lat;
  488. this.form.lng=value.lon;
  489. this.form.address=value.search;
  490. this.mapCancel();
  491. },
  492. mapCancel(){
  493. this.dialogVisibleMap = false;
  494. },
  495. /** 详情按钮 */
  496. handledetails(row){
  497. this.show.open=true;
  498. setTimeout(() => {
  499. this.$refs.hospitalDetails.getDetails(row.hospitalId);
  500. }, 1);
  501. },
  502. handleCityChange(value) {
  503. var nodes=this.$refs.citySelect.getCheckedNodes();
  504. this.form.cityIds=value.toString();
  505. this.form.province=nodes[0].pathLabels[0];
  506. this.form.city=nodes[0].pathLabels[1];
  507. this.form.district=nodes[0].pathLabels[2];
  508. },
  509. getCitys(){
  510. getCitys().then(res => {
  511. this.loading = false;
  512. this.citys=res.data;
  513. })
  514. },
  515. handleAvatarSuccess2(res, file) {
  516. if(res.code==200){
  517. this.form.sealUrl=res.url;
  518. self.$forceUpdate()
  519. }
  520. else{
  521. this.msgError(res.msg);
  522. }
  523. },
  524. handleAvatarSuccess(res, file) {
  525. if(res.code==200){
  526. this.form.imgUrl=res.url;
  527. self.$forceUpdate()
  528. }
  529. else{
  530. this.msgError(res.msg);
  531. }
  532. },
  533. beforeAvatarUpload(file) {
  534. const isLt1M = file.size / 1024 / 1024 < 1;
  535. if (!isLt1M) {
  536. this.$message.error('上传图片大小不能超过 1MB!');
  537. }
  538. return isLt1M;
  539. },
  540. /** 查询医院列表 */
  541. getList() {
  542. this.loading = true;
  543. listHospital(this.queryParams).then(response => {
  544. this.hospitalList = response.rows;
  545. this.total = response.total;
  546. this.loading = false;
  547. });
  548. },
  549. // 取消按钮
  550. cancel() {
  551. this.open = false;
  552. this.form=null;
  553. this.reset();
  554. },
  555. // 表单重置
  556. reset() {
  557. this.form = {
  558. hospitalId: null,
  559. hospitalName: null,
  560. hospitalType: null,
  561. hospitalLevel: null,
  562. descs: null,
  563. imgUrl: null,
  564. cityIds: null,
  565. province: null,
  566. city: null,
  567. district: null,
  568. address: null,
  569. lng: null,
  570. lat: null,
  571. status: null,
  572. remark: null,
  573. sealUrl: null,
  574. phone: null
  575. };
  576. this.resetForm("form");
  577. this.$forceUpdate();
  578. },
  579. /** 搜索按钮操作 */
  580. handleQuery() {
  581. this.queryParams.pageNum = 1;
  582. this.getList();
  583. },
  584. /** 重置按钮操作 */
  585. resetQuery() {
  586. this.resetForm("queryForm");
  587. this.handleQuery();
  588. },
  589. // 多选框选中数据
  590. handleSelectionChange(selection) {
  591. this.ids = selection.map(item => item.hospitalId)
  592. this.single = selection.length!==1
  593. this.multiple = !selection.length
  594. },
  595. /** 新增按钮操作 */
  596. handleAdd() {
  597. this.reset();
  598. this.open = true;
  599. this.title = "添加医院";
  600. },
  601. /** 修改按钮操作 */
  602. handleUpdate(row) {
  603. this.reset();
  604. const hospitalId = row.hospitalId || this.ids
  605. getHospital(hospitalId).then(response => {
  606. this.form = response.data;
  607. this.open = true;
  608. this.title = "修改医院";
  609. this.form.hospitalType = String(this.form.hospitalType)
  610. this.form.status = String(this.form.status)
  611. this.form.hospitalLevel = String(this.form.hospitalLevel)
  612. this.form.cityIds=((this.form.cityIds).split(",")).map(Number)
  613. });
  614. },
  615. /** 提交按钮 */
  616. submitForm() {
  617. this.form.cityIds=(this.form.cityIds).toString()
  618. this.$refs["form"].validate(valid => {
  619. if (valid) {
  620. if (this.form.hospitalId != null) {
  621. updateHospital(this.form).then(response => {
  622. this.msgSuccess("修改成功");
  623. this.open = false;
  624. this.getList();
  625. });
  626. } else {
  627. addHospital(this.form).then(response => {
  628. this.msgSuccess("新增成功");
  629. this.open = false;
  630. this.getList();
  631. });
  632. }
  633. }
  634. });
  635. },
  636. /** 删除按钮操作 */
  637. handleDelete(row) {
  638. const hospitalIds = row.hospitalId || this.ids;
  639. this.$confirm('是否确认删除医院编号为"' + hospitalIds + '"的数据项?', "警告", {
  640. confirmButtonText: "确定",
  641. cancelButtonText: "取消",
  642. type: "warning"
  643. }).then(function() {
  644. return delHospital(hospitalIds);
  645. }).then(() => {
  646. this.getList();
  647. this.msgSuccess("删除成功");
  648. }).catch(() => {});
  649. },
  650. /** 导出按钮操作 */
  651. handleExport() {
  652. const queryParams = this.queryParams;
  653. this.$confirm('是否确认导出所有医院数据项?', "警告", {
  654. confirmButtonText: "确定",
  655. cancelButtonText: "取消",
  656. type: "warning"
  657. }).then(() => {
  658. this.exportLoading = true;
  659. return exportHospital(queryParams);
  660. }).then(response => {
  661. this.download(response.msg);
  662. this.exportLoading = false;
  663. }).catch(() => {});
  664. }
  665. }
  666. };
  667. </script>
  668. <style>
  669. .avatar-uploader .el-upload {
  670. border: 1px dashed #d9d9d9;
  671. border-radius: 6px;
  672. cursor: pointer;
  673. position: relative;
  674. overflow: hidden;
  675. }
  676. .avatar-uploader .el-upload:hover {
  677. border-color: #409EFF;
  678. }
  679. .avatar-uploader-icon {
  680. font-size: 28px;
  681. color: #8c939d;
  682. width: 150px;
  683. height: 150px;
  684. line-height: 150px;
  685. text-align: center;
  686. }
  687. </style>