Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

admin.vue 37KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <div>
  6. <!-- <el-button
  7. type="primary"
  8. size="small"
  9. icon="el-icon-circle-plus-outline"
  10. style="float:left"
  11. @click="toGet">CA企业认证</el-button> -->
  12. <el-button
  13. type="primary"
  14. size="small"
  15. icon="el-icon-circle-plus-outline"
  16. style="float:left"
  17. @click="openForm(0)">新增</el-button>
  18. <el-button
  19. type="primary"
  20. size="small"
  21. @click="BatchDelete"
  22. >医药师登记</el-button>
  23. <!-- <el-button
  24. type="primary"
  25. size="small"
  26. icon="el-icon-circle-plus-outline"
  27. style="float:left"
  28. @click="toJiaBan">加班</el-button> -->
  29. <el-button
  30. type="primary"
  31. size="small"
  32. icon="el-icon-circle-plus-outline"
  33. style="float:left"
  34. @click="toJiaoYou">加油</el-button>
  35. <!-- <el-button
  36. type="primary"
  37. size="small"
  38. icon="el-icon-circle-plus-outline"
  39. style="float:left"
  40. @click="toTest">短信</el-button> -->
  41. <!-- <el-button
  42. type="primary"
  43. size="small"
  44. icon="el-icon-circle-plus-outline"
  45. style="float:left"
  46. @click="toTestOne">创建个人用户实名</el-button>
  47. <el-button
  48. type="primary"
  49. size="small"
  50. icon="el-icon-circle-plus-outline"
  51. style="float:left"
  52. @click="toTestFive">创建企业用户并实名</el-button>
  53. <el-button
  54. type="primary"
  55. size="small"
  56. icon="el-icon-circle-plus-outline"
  57. style="float:left"
  58. @click="toTestFour">添加企业成员</el-button>
  59. <el-button
  60. type="primary"
  61. size="small"
  62. icon="el-icon-circle-plus-outline"
  63. style="float:left"
  64. @click="toTestTwo">创建个人印章</el-button>
  65. <el-button
  66. type="primary"
  67. size="small"
  68. icon="el-icon-circle-plus-outline"
  69. style="float:left"
  70. @click="toTestThree">创建合同</el-button> -->
  71. <!-- <el-button
  72. type="primary"
  73. size="small"
  74. icon="el-icon-circle-plus-outline"
  75. style="float:left"
  76. @click="toTestSeven">添加合同签署人</el-button> -->
  77. <!-- <el-button
  78. type="primary"
  79. size="small"
  80. icon="el-icon-circle-plus-outline"
  81. style="float:left"
  82. @click="toTestTen"
  83. >
  84. 短信验证码
  85. </el-button> -->
  86. <!-- <el-button
  87. type="primary"
  88. size="small"
  89. icon="el-icon-circle-plus-outline"
  90. style="float:left"
  91. @click="toTestNight">后台签署</el-button>
  92. -->
  93. <!-- <el-button
  94. type="primary"
  95. size="small"
  96. icon="el-icon-circle-plus-outline"
  97. style="float:left"
  98. @click="toTestElement">创建企业用章</el-button> -->
  99. <!-- <el-button
  100. type="primary"
  101. size="small"
  102. icon="el-icon-circle-plus-outline"
  103. style="float:left"
  104. @click="toTestThrityMent">生成PDF</el-button> -->
  105. <!-- <el-button
  106. type="primary"
  107. size="small"
  108. icon="el-icon-circle-plus-outline"
  109. style="float:left"
  110. @click="toTestTwo">创建个人印章</el-button> -->
  111. <!-- <el-button
  112. type="primary"
  113. size="small"
  114. icon="el-icon-circle-plus-outline"
  115. style="float:left"
  116. @click="toTestThree">创建合同</el-button>
  117. <el-button
  118. type="primary"
  119. size="small"
  120. icon="el-icon-circle-plus-outline"
  121. style="float:left"
  122. @click="toTestSeven">添加合同签署人</el-button>
  123. <el-button
  124. type="primary"
  125. size="small"
  126. icon="el-icon-circle-plus-outline"
  127. style="float:left"
  128. @click="toTestTen"
  129. >
  130. 获取短信验证码
  131. </el-button>
  132. <el-button
  133. type="primary"
  134. size="small"
  135. icon="el-icon-circle-plus-outline"
  136. style="float:left"
  137. @click="toTestNight">后台签署</el-button>
  138. <el-button
  139. type="primary"
  140. size="small"
  141. icon="el-icon-circle-plus-outline"
  142. style="float:left"
  143. @click="toTestThrity">合同详情查询</el-button>
  144. <el-button
  145. type="primary"
  146. size="small"
  147. icon="el-icon-circle-plus-outline"
  148. style="float:left"
  149. @click="toWatch">合同在线预览</el-button>
  150. <el-button
  151. type="primary"
  152. size="small"
  153. icon="el-icon-circle-plus-outline"
  154. style="float:left"
  155. @click="toEnd">结束签署</el-button> -->
  156. <!-- <el-button
  157. type="primary"
  158. size="small"
  159. icon="el-icon-circle-plus-outline"
  160. style="float:left"
  161. @click="toSendInformaton">发送短信验证码</el-button> -->
  162. <!--<el-button
  163. type="primary"
  164. size="small"
  165. icon="el-icon-circle-plus-outline"
  166. style="float:left"
  167. @click="toSavePDFInformation">生成PDF</el-button>-->
  168. <!-- <el-button
  169. type="primary"
  170. size="small"
  171. icon="el-icon-circle-plus-outline"
  172. style="float:left"
  173. @click="toCheckPDFInformation">PDF验证</el-button> -->
  174. <!-- <el-button
  175. type="primary"
  176. size="small"
  177. icon="el-icon-circle-plus-outline"
  178. style="float:left"
  179. @click="toAutoDrug">自动生成</el-button> -->
  180. <!-- <el-button
  181. type="primary"
  182. size="small"
  183. icon="el-icon-circle-plus-outline"
  184. style="float:left"
  185. @click="toAutoDiagnose">自动脚本</el-button> -->
  186. </div>
  187. </div>
  188. <div class="app-container">
  189. <el-table
  190. :row-style="{ color: '#303133' }"
  191. :header-cell-style="{
  192. backgroundColor: 'rgb(245, 247, 250)',
  193. color: '#606266'
  194. }"
  195. style="width:100%;"
  196. ref="table"
  197. border
  198. :data="admins"
  199. v-loading="is_loading_admins"
  200. @selection-change="handleSelectionChange"
  201. >
  202. <el-table-column
  203. align="center"
  204. type="selection"
  205. width="55">
  206. </el-table-column>
  207. <el-table-column
  208. label="用户名"
  209. prop="user_name"
  210. min-width="160"
  211. align="center"
  212. ></el-table-column>
  213. <el-table-column v-if="this.$store.getters.xt_user.org_id != 10206" label="医保医师编码" prop="doctor_number" min-width="160" align="center">
  214. <template slot-scope="scope">
  215. <span v-if="scope.row.doctor_number== 0"></span>
  216. <span v-if="scope.row.doctor_number!= 0">{{scope.row.doctor_number}}</span>
  217. </template>
  218. </el-table-column>
  219. <el-table-column v-if="this.$store.getters.xt_user.org_id == 10206" label="员工ID" prop="doctor_number" min-width="160" align="center">
  220. <template slot-scope="scope">
  221. <span v-if="scope.row.doctor_number== 0"></span>
  222. <span v-if="scope.row.doctor_number!= 0">{{scope.row.doctor_number}}</span>
  223. </template>
  224. </el-table-column>
  225. <el-table-column
  226. label="最后登录IP"
  227. prop="ip"
  228. min-width="150"
  229. align="center"
  230. ></el-table-column>
  231. <el-table-column
  232. label="最后登录时间"
  233. prop="last_login_time"
  234. min-width="170"
  235. align="center"
  236. >
  237. <template slot-scope="scope">
  238. <span>{{
  239. scope.row.last_login_time == 0
  240. ? ""
  241. : _parseTime(scope.row.last_login_time, "{y}-{m}-{d} {h}:{i}")
  242. }}</span>
  243. </template>
  244. </el-table-column>
  245. <el-table-column
  246. label="角色"
  247. prop="role_name"
  248. min-width="160"
  249. align="center"
  250. ></el-table-column>
  251. <el-table-column label="状态" min-width="100" align="center">
  252. <template slot-scope="scope">
  253. <div
  254. v-if="scope.row.status == 1"
  255. style="color: #67C23A; font-size:20px;"
  256. >
  257. <li class="el-icon-success"></li>
  258. </div>
  259. <div v-else style="color: #F56C6C; font-size:20px;">
  260. <li class="el-icon-error"></li>
  261. </div>
  262. </template>
  263. </el-table-column>
  264. <el-table-column label="操作" width="240" align="center">
  265. <template slot-scope="scope">
  266. <!-- <span>
  267. <el-button type="primary" size="small" @click="toRenZhen(scope.row.user_id,scope.row.user_name)">
  268. <span>CA个人认证</span>
  269. </el-button>
  270. </span> -->
  271. <!-- <span>
  272. <el-button type="primary" size="small" @click="toQianShu(scope.row.user_id,scope.row.user_name)">
  273. <span>创建签署人用户</span>
  274. </el-button>
  275. </span>
  276. <span>
  277. <el-button type="primary" size="small" @click="toYinZhang(scope.row.user_id,scope.row.user_name)">
  278. <span>创建个人印章</span>
  279. </el-button>
  280. </span> -->
  281. <!--
  282. <span>
  283. <el-button type="primary" size="small" @click="toShouQuan(scope.row.user_id,scope.row.user_name)">
  284. <span>创建企业印章</span>
  285. </el-button>
  286. </span> -->
  287. <el-tooltip
  288. class="item"
  289. effect="dark"
  290. content="编辑"
  291. placement="top"
  292. >
  293. <el-button
  294. type="primary"
  295. icon="el-icon-edit-outline"
  296. size="small"
  297. @click="openForm(scope.row.user_id)"
  298. ></el-button>
  299. </el-tooltip>
  300. <!-- </router-link> -->
  301. <el-tooltip
  302. class="item"
  303. effect="dark"
  304. content="移除"
  305. placement="top"
  306. >
  307. <el-button
  308. type="danger"
  309. size="small"
  310. icon="el-icon-delete"
  311. v-if="
  312. scope.row.status == 1 &&
  313. org.creator != scope.row.user_id &&
  314. scope.row.user_id != local_user_id
  315. "
  316. @click="disableAdminAction(scope.row)"
  317. ></el-button>
  318. </el-tooltip>
  319. <el-tooltip
  320. class="item"
  321. effect="dark"
  322. content="恢复"
  323. placement="top"
  324. >
  325. <el-button
  326. size="small"
  327. type="info"
  328. icon="el-icon-refresh"
  329. v-if="
  330. scope.row.status == 0 &&
  331. org.creator != scope.row.user_id &&
  332. scope.row.user_id != local_user_id
  333. "
  334. @click="recoverAdminAction(scope.row)"
  335. ></el-button>
  336. </el-tooltip>
  337. <span v-if="scope.row.user_type == 2">
  338. <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.user_id,scope.row.is_mark)">
  339. <span v-if="scope.row.is_mark ==0">登记</span>
  340. <span v-if="scope.row.is_mark ==1">撤销</span>
  341. </el-button>
  342. </span>
  343. </template>
  344. </el-table-column>
  345. </el-table>
  346. <el-row style="margin-top: 15px;" v-if="admin_total_count > 10">
  347. <el-col :span="24">
  348. <el-pagination
  349. :total="admin_total_count"
  350. :current-page.sync="current_page"
  351. @current-change="pageChange"
  352. :page-size="10"
  353. layout="total, prev, pager, next, jumper"
  354. ></el-pagination>
  355. </el-col>
  356. </el-row>
  357. <admin-info-form ref="admininfoform"></admin-info-form>
  358. </div>
  359. <el-dialog
  360. title="CA企业认证"
  361. :visible.sync="dialogVisible"
  362. width="50%">
  363. <span>
  364. <el-form>
  365. <el-row>
  366. <el-col>
  367. <el-form-item label="企业类型:">
  368. <el-select
  369. v-model="form.org_type"
  370. filterable
  371. clearable
  372. allow-create
  373. placeholder="选择"
  374. >
  375. <el-option
  376. v-for="item in businessList"
  377. :key="item.id"
  378. :label="item.name "
  379. :value="item.id"
  380. ></el-option>
  381. </el-select>
  382. </el-form-item>
  383. </el-col>
  384. <el-col>
  385. <el-form-item label="企业名称:">
  386. <el-input style="width:200px" v-model="form.enterprise_name" placeholder="请按营业执照上面的公司填写名称"></el-input>
  387. </el-form-item>
  388. </el-col>
  389. <el-col>
  390. <el-form-item label="统一社会信用代码:">
  391. <el-input style="width:200px" v-model="form.code" placeholder="请输入统一社会信息代码"></el-input>
  392. </el-form-item>
  393. </el-col>
  394. <el-col>
  395. <el-form-item label="组织机构代码:">
  396. <el-input style="width:200px" v-model="form.org_code" placeholder="请输入统一社会信息代码"></el-input>
  397. </el-form-item>
  398. </el-col>
  399. <el-col>
  400. <el-form-item label="法定代表人:">
  401. <el-input style="width:200px" v-model="form.legal_person_name" placeholder="请输入统一社会信息代码"></el-input>
  402. </el-form-item>
  403. </el-col>
  404. <el-col>
  405. <el-form-item label="法定代表人身份证:">
  406. <el-input style="width:200px" v-model="form.legal_id_card_num" placeholder="请输入统一社会信息代码"></el-input>
  407. </el-form-item>
  408. </el-col>
  409. <el-col>
  410. <el-form-item label="法人手机号码:">
  411. <el-input style="width:200px" v-model="form.legal_phone" placeholder="请输入法人手机号码"></el-input>
  412. </el-form-item>
  413. </el-col>
  414. </el-row>
  415. </el-form>
  416. </span>
  417. <span slot="footer" class="dialog-footer">
  418. <el-button @click="dialogVisible = false">取 消</el-button>
  419. <el-button type="primary" @click="saveEnterprise">立即认证</el-button>
  420. </span>
  421. </el-dialog>
  422. <el-dialog
  423. title="CA个人认证"
  424. :visible.sync="persionDialogVisible"
  425. width="50%">
  426. <span>
  427. <el-form>
  428. <el-row>
  429. <el-col>
  430. <el-form-item label="姓名:">
  431. <el-input style="width:200px" v-model="personForm.display_name" placeholder="请输入姓名"></el-input>
  432. </el-form-item>
  433. </el-col>
  434. <el-col>
  435. <el-form-item label="身份证号:">
  436. <el-input style="width:200px" v-model="personForm.id_card_num" placeholder="请输入身份证号"></el-input>
  437. </el-form-item>
  438. </el-col>
  439. <el-col>
  440. <el-form-item label="手机号:">
  441. <el-input style="width:200px" v-model="personForm.phone" placeholder="请输入手机号"></el-input>
  442. </el-form-item>
  443. </el-col>
  444. <el-col>
  445. <el-form-item label="验证码:">
  446. <el-input style="width:100px" v-model="form.code" placeholder="请输入验证码"></el-input>
  447. <el-button type="primary" size="small" @click="getCode">获取验证码</el-button>
  448. </el-form-item>
  449. </el-col>
  450. </el-row>
  451. </el-form>
  452. </span>
  453. <span slot="footer" class="dialog-footer">
  454. <el-button @click="persionDialogVisible = false">取 消</el-button>
  455. <el-button type="primary" @click="savePersonEnterprise">立即认证</el-button>
  456. </span>
  457. </el-dialog>
  458. </div>
  459. </template>
  460. <script>
  461. import { adminMainView, getAdmins, setAdminStatus,toSign,toTestOne,toTestTwo,toTestThree,toTestFour,toTestFive,toTestSeven,toTestEight,toTestNight,toTestTen,toTestElement,toTestThrityMent,saveEnterprise,getEnterPriseById,getMobileCode,savePersionEnterPrise,getPerseEnterPriseById,CreatePersionSeal,CreateNewEnterPrise,toTestThrity,toEndEnterPrise,getEnterPriseDetail
  462. ,CreateQianshuUserName,CreateSKDSendInformation,toSavePDFInformation,toCheckPDFInformation,getdruginfoInformation,toAutoDrug,toAutoDiagnose,toAutoJiaYou} from "@/api/role/admin";
  463. import { getRoles } from "@/api/role/role";
  464. import { UploadPrintOrder } from "@/api/role/admin"
  465. import { parseTime } from "@/utils";
  466. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  467. import AdminInfoForm from "./components/AdminInfoForm";
  468. import axios from 'axios'
  469. export default {
  470. name: "adminManage",
  471. data() {
  472. return {
  473. crumbs: [
  474. { path: false, name: "管理中心" },
  475. { path: false, name: "员工管理" }
  476. ],
  477. is_loading_admins: true,
  478. admins: [], // [{user_id, user_name, role_name, title_name, ip, last_login_time, status}]
  479. admin_total_count: 0,
  480. current_page: 1,
  481. roles: [],
  482. is_exist_role: false,
  483. org: null,
  484. isSubSuperAdmin: false,
  485. local_user_id: 0,
  486. selectDrug:[],
  487. dialogVisible:false,
  488. persionDialogVisible:false,
  489. businessList:[
  490. {id:1,name:"企业"},
  491. {id:2,name:"个体工商户"},
  492. {id:3,name:"政府机构"}
  493. ],
  494. form:{
  495. id:0,
  496. org_type:"",
  497. enterprise_name:"",
  498. code:"",
  499. org_code:"",
  500. legal_person_name:"",
  501. legal_id_card_num:"",
  502. legal_phone:"",
  503. },
  504. personForm:{
  505. id:0,
  506. display_name:"",
  507. phone:"",
  508. id_card_num:"",
  509. admin_user_id:"",
  510. code:"",
  511. }
  512. };
  513. },
  514. components: {
  515. BreadCrumb,
  516. AdminInfoForm
  517. },
  518. created: function() {
  519. this.local_user_id = this.$store.getters.xt_user.user.id;
  520. let page = 1;
  521. this.getRoles(page);
  522. adminMainView()
  523. .then(rs => {
  524. this.is_loading_admins = false;
  525. var resp = rs.data;
  526. if (resp.state === 1) {
  527. var adminData = resp.data.admins
  528. console.log("数据",adminData)
  529. this.admins.push(...adminData);
  530. this.admin_total_count = resp.data.total_count;
  531. this.is_exist_role = resp.data.is_exist_role;
  532. this.current_page = 1;
  533. this.org = resp.data.org;
  534. this.isSubSuperAdmin = resp.data.isSubSuperAdmin;
  535. //能进入当前页面的角色只有超级管理员和子管理员,如果当前角色是子管理员,需要把超级管理员和其他子管理员的信息去除,子管理员不能编辑超级管理员和其他子管理员信息,
  536. if (this.isSubSuperAdmin) {
  537. //去除管理员信息
  538. for (let i = 0; i < this.admins.length; i++) {
  539. if (this.admins[i].user_id == this.org.creator) {
  540. this.admins.splice(i, 1);
  541. i--;
  542. }
  543. }
  544. //去除其他子管理员信息
  545. for (let i = 0; i < this.admins.length; i++) {
  546. if (
  547. this.admins[i].user_id != this.local_user_id &&
  548. this.admins[i].is_sub_super_admin
  549. ) {
  550. //将自己排除在外
  551. console.log(this.admins[i]);
  552. this.admins.splice(i, 1);
  553. i--;
  554. }
  555. }
  556. }
  557. } else {
  558. this.$message.error(resp.msg);
  559. }
  560. })
  561. .catch(err => {
  562. this.is_loading_admins = false;
  563. this.$message.error(err);
  564. });
  565. },
  566. computed: {
  567. should_update_admins() {
  568. return this.$store.getters.xt_role_temps.did_admins_changed;
  569. }
  570. },
  571. methods: {
  572. getRoles(page) {
  573. getRoles(page)
  574. .then(rs => {
  575. this.loading_roles = false;
  576. const resp = rs.data;
  577. if (resp.state === 1) {
  578. this.roles.push(...resp.data.roles);
  579. } else {
  580. this.$message.error(resp.msg);
  581. }
  582. })
  583. .catch(err => {
  584. this.loading_roles = false;
  585. this.$message.error(err);
  586. });
  587. },
  588. openForm(adminId) {
  589. this.$refs["admininfoform"].open(adminId, this.roles);
  590. },
  591. _parseTime(time, format) {
  592. return parseTime(time, format);
  593. },
  594. requestAdminsWithPage: function(page) {
  595. this.admins.splice(0, this.admins.length);
  596. this.is_loading_admins = true;
  597. getAdmins(page)
  598. .then(rs => {
  599. this.is_loading_admins = false;
  600. const resp = rs.data;
  601. console.log(resp);
  602. if (resp.state === 1) {
  603. var admindata = resp.data.admins
  604. this.admins.push(...admindata);
  605. this.admin_total_count = resp.data.total_count;
  606. } else {
  607. this.$message.error(resp.msg);
  608. }
  609. })
  610. .catch(err => {
  611. this.is_loading_admins = false;
  612. this.$message.error(err);
  613. });
  614. },
  615. addAdminAction: function() {
  616. this.$router.push({ path: "/role/admin/create" });
  617. },
  618. disableAdminAction: function(row) {
  619. this.$msgbox({
  620. title: "提示",
  621. message: "是否确定要移除该用户",
  622. showCancelButton: true,
  623. confirmButtonText: "确定",
  624. cancelButtonText: "取消",
  625. type: "warning",
  626. beforeClose: (action, instance, done) => {
  627. if (action === "confirm") {
  628. instance.confirmButtonLoading = true;
  629. instance.confirmButtonText = "删除中...";
  630. setAdminStatus(row.user_id, false)
  631. .then(rs => {
  632. done();
  633. instance.confirmButtonLoading = false;
  634. const resp = rs.data;
  635. if (resp.state === 1) {
  636. row.status = 0;
  637. } else {
  638. this.$message.error(resp.msg);
  639. }
  640. })
  641. .catch(err => {
  642. done();
  643. instance.confirmButtonLoading = false;
  644. this.$message.error(err);
  645. });
  646. } else {
  647. done();
  648. }
  649. }
  650. });
  651. },
  652. recoverAdminAction: function(row) {
  653. const loading = this.$loading({
  654. lock: true,
  655. text: "正在恢复管理员...",
  656. spinner: "el-icon-loading",
  657. background: "rgba(0, 0, 0, 0.7)"
  658. });
  659. setAdminStatus(row.user_id, true)
  660. .then(rs => {
  661. loading.close();
  662. const resp = rs.data;
  663. if (resp.state === 1) {
  664. row.status = 1;
  665. } else {
  666. this.$message.error(resp.msg);
  667. }
  668. })
  669. .catch(err => {
  670. loading.close();
  671. this.$message.error(err);
  672. });
  673. },
  674. pageChange: function(nextPage) {
  675. this.requestAdminsWithPage(nextPage);
  676. },
  677. // toLogin(){
  678. // var that = this
  679. // axios.get('http://127.0.0.1:9532/sz/api/doctor/get').then(function(response) {
  680. // if (response.data.state == 0) {
  681. // that.$message.error(response.data.msg)
  682. // return false
  683. // } else {
  684. // that.$message({ message: '登记成功', type: 'success' })
  685. // }
  686. // }).catch(function(error) {
  687. // })
  688. // },
  689. BatchDelete() {
  690. if (this.selectDrug.length == 0) {
  691. this.$message.error("请选择要登记的信息");
  692. return false;
  693. }
  694. this.$confirm(
  695. "确认要登记所选记录吗? <br>",
  696. "备案提示",
  697. {
  698. dangerouslyUseHTMLString: true,
  699. confirmButtonText: "确定",
  700. cancelButtonText: "取消",
  701. type: "warning"
  702. }
  703. ).then(() => {
  704. var ids = [];
  705. var idMap = {};
  706. console.log("3333333",this.selectDrug)
  707. for (const index in this.selectDrug) {
  708. ids.push(this.selectDrug[index].user_id);
  709. idMap[this.selectDrug[index].user_id] = this.selectDrug[index].user_id;
  710. }
  711. var idss = ids.join(',')
  712. let params = {
  713. ids:idss,
  714. admin_user_id:this.$store.getters.xt_user.user.id
  715. }
  716. console.log("prams222",params)
  717. var that = this
  718. axios.get('http://127.0.0.1:9532/sz/api/doctor/get',{ params: params }).then(function(response) {
  719. if (response.data.state == 0) {
  720. that.$message.error(response.data.data.msg)
  721. return false
  722. } else {
  723. that.$message.error(response.data.data.msg)
  724. if(response.data.data.msg == ""){
  725. that.$message.success("登记成功!")
  726. that.adminMainView()
  727. }
  728. if(response.data.data.msg!=""){
  729. that.$message.error(response.data.data.msg)
  730. that.adminMainView()
  731. }
  732. }
  733. }).catch(function(error) {
  734. })
  735. });
  736. },
  737. toReturn(id,is_mark){
  738. var that = this
  739. let params = {
  740. 'id':id,
  741. "is_mark":is_mark,
  742. "admin_user_id":this.$store.getters.xt_user.user.id
  743. }
  744. axios.get('http://127.0.0.1:9532/sz/api/medical/get',{params:params}).then(function(response) {
  745. if (response.data.state == 0) {
  746. that.$message.error(response.data.data.msg)
  747. return false
  748. } else {
  749. if(response.data.data.msg == ""){
  750. that.$message.success("登记成功!")
  751. that.adminMainView()
  752. }
  753. if(response.data.data.msg!=""){
  754. that.$message.error(response.data.data.msg)
  755. that.adminMainView()
  756. }
  757. }
  758. }).catch(function(error) {
  759. })
  760. },
  761. handleSelectionChange(val) {
  762. this.selectDrug = val;
  763. },
  764. toTest(){
  765. toSign().then(response=>{
  766. if(response.data.state ==1){
  767. var sign = response.data.data.sign
  768. console.log("sign",sign)
  769. }
  770. })
  771. },
  772. toTestOne(){
  773. toTestOne().then(response=>{
  774. if(response.data.state==1){
  775. var sign = response.data.data.sign
  776. console.log("sign",sign)
  777. }
  778. })
  779. },
  780. toTestTwo(){
  781. toTestTwo().then(response=>{
  782. if(response.data.state ==1){
  783. var sign = response.data.data.sign
  784. console.log("sign",sign)
  785. }
  786. })
  787. },
  788. toTestThree(){
  789. toTestThree().then(response=>{
  790. if(response.data.state ==1){
  791. var sign = response.data.data.sign
  792. console.log("sign",sign)
  793. }
  794. })
  795. },
  796. toTestFour(){
  797. toTestFour().then(response=>{
  798. if(response.data.state==1){
  799. var sign = response.data.data.sign
  800. console.log("sign",sign)
  801. }
  802. })
  803. },
  804. toTestFive(){
  805. toTestFive().then(response=>{
  806. if(response.data.state==1){
  807. var sign = response.data.data.sign
  808. console.log("sign",sign)
  809. }
  810. })
  811. },
  812. toTestSeven(){
  813. toTestSeven().then(response=>{
  814. if(response.data.state ==1){
  815. var sign = response.data.data.sign
  816. console.log("sign",sign)
  817. }
  818. })
  819. },
  820. toTestEight(){
  821. toTestEight().then(response=>{
  822. if(response.data.state== 1){
  823. var sign = response.data.data.sign
  824. console.log("sign",sign)
  825. this.$message.success("保存")
  826. }
  827. })
  828. },
  829. toTestNight(){
  830. toTestNight().then(response=>{
  831. if(response.data.state == 1){
  832. var sign = response.data.data.sign
  833. console.log("sign",sign)
  834. this.$message.success("保存")
  835. var maprequest = response.data.data.maprequest
  836. console.log("maprequest",maprequest)
  837. }
  838. })
  839. },
  840. toTestTen(){
  841. toTestTen().then(response=>{
  842. if(response.data.state == 1){
  843. var sign = response.data.data.sign
  844. console.log("sign",sign)
  845. this.$message.success("保存")
  846. }
  847. })
  848. },
  849. toTestElement(){
  850. toTestElement().then(response=>{
  851. if(response.data.state == 1){
  852. var sign = response.data.data.sign
  853. console.log("sign",sign)
  854. this.$message.success("保存")
  855. }
  856. })
  857. },
  858. toTestThrityMent(){
  859. toTestThrityMent().then(response=>{
  860. var sign = response.data.data.sign
  861. console.log("sign",sign)
  862. this.$message.success("保存")
  863. })
  864. },
  865. saveEnterprise(){
  866. var params = {
  867. id:this.form.id,
  868. org_type:parseInt(this.form.org_type),
  869. enterprise_name:this.form.enterprise_name,
  870. code:this.form.code,
  871. org_code:this.form.org_code,
  872. legal_person_name:this.form.legal_person_name,
  873. legal_id_card_num:this.form.legal_id_card_num,
  874. legal_phone:this.form.legal_phone,
  875. }
  876. console.log("paramswowo",params)
  877. saveEnterprise(params).then(response=>{
  878. if(response.data.state==1){
  879. var enterPrise = response.data.data.enterPrise
  880. this.dialogVisible = false
  881. this.$message.success("保存成功!")
  882. }
  883. })
  884. },
  885. toGet(){
  886. getEnterPriseById().then(response=>{
  887. if(response.data.state == 1){
  888. this.dialogVisible = true
  889. var enterPrise = response.data.data.enterPrise
  890. this.form.id = enterPrise.id
  891. this.form.org_type = enterPrise.org_type?enterPrise.org_type:""
  892. this.form.enterprise_name = enterPrise.enterprise_name
  893. this.form.code = enterPrise.code
  894. this.form.org_code = enterPrise.org_code
  895. this.form.legal_person_name = enterPrise.legal_person_name
  896. this.form.legal_id_card_num = enterPrise.legal_id_card_num
  897. this.form.legal_phone = enterPrise.legal_phone
  898. }
  899. })
  900. },
  901. toRenZhen(admin_user_id,user_name){
  902. getPerseEnterPriseById(admin_user_id).then(response=>{
  903. if(response.data.state== 1){
  904. var lastPerson = response.data.data.lastPerson
  905. this.personForm.id = lastPerson.id
  906. this.personForm.display_name = user_name
  907. this.personForm.phone = lastPerson.phone
  908. this.personForm.id_card_num = lastPerson.id_card_num
  909. this.personForm.admin_user_id =lastPerson.admin_user_id
  910. this.persionDialogVisible = true
  911. }
  912. })
  913. },
  914. getCode(){
  915. var params = {
  916. phone:this.personForm.phone,
  917. }
  918. console.log("paramsowowo",params)
  919. getMobileCode(params).then(response=>{
  920. if(response.data.state == 1){
  921. var sign = response.data.data.sign
  922. console.log("sign",sign)
  923. this.$message.success("发送成功!")
  924. }
  925. })
  926. },
  927. savePersonEnterprise(){
  928. var params = {
  929. id:this.personForm.id,
  930. display_name:this.personForm.display_name,
  931. phone:this.personForm.phone,
  932. id_card_num:this.personForm.id_card_num,
  933. admin_user_id:this.personForm.admin_user_id,
  934. code:this.personForm.code,
  935. }
  936. console.log("param2o2o2o2",params)
  937. savePersionEnterPrise(params).then(response=>{
  938. if(response.data.state == 1){
  939. var personEnterPrse = response.data.data.personEnterPrse
  940. this.$message.success("认证成功")
  941. this.persionDialogVisible = false
  942. }
  943. })
  944. },
  945. toYinZhang(admin_user_id){
  946. CreatePersionSeal(admin_user_id).then(response=>{
  947. if(response.data.state == 1){
  948. var personSeal = response.data.data.personSeal
  949. this.$message.success("创建成功")
  950. }
  951. })
  952. },
  953. toShouQuan(admin_user_id){
  954. CreateNewEnterPrise(admin_user_id).then(response=>{
  955. if(response.data.state == 1){
  956. var newEnterPrise = response.data.data.newEnterPrise
  957. this.$message.success("保存成功!")
  958. }
  959. })
  960. },
  961. toTestThrity(){
  962. toTestThrity().then(response=>{
  963. if(response.data.state == 1){
  964. var sign = response.data.data.sign
  965. console.log("signwoowow",sign)
  966. }
  967. })
  968. },
  969. toEnd(){
  970. toEndEnterPrise().then(response=>{
  971. if(response.data.state == 1){
  972. var sign = response.data.data.sign
  973. this.$message.success("保存成功")
  974. }
  975. })
  976. },
  977. toWatch(){
  978. getEnterPriseDetail().then(response=>{
  979. if(response.data.state == 1){
  980. var sign = response.data.data.sign
  981. this.$message.success("保存成功")
  982. }
  983. })
  984. },
  985. toQianShu(admin_user_id){
  986. CreateQianshuUserName(admin_user_id).then(response=>{
  987. if(response.data.state==1){
  988. var sign = response.data.data.sign
  989. var userId = response.data.data.userId
  990. this.$message.success("签署成功!")
  991. }
  992. })
  993. },
  994. toSendInformaton(){
  995. CreateSKDSendInformation().then(response=>{
  996. if(response.data.state==1){
  997. var information = response.data.data.information
  998. var orderId = response.data.data.orderId
  999. }
  1000. })
  1001. },
  1002. toSavePDFInformation(){
  1003. toSavePDFInformation().then(response=>{
  1004. if(response.data.state == 1){
  1005. var information = response.data.data.information
  1006. var orderId = response.data.data.orderId
  1007. // var base64Img = 'data:image/png;base64'+","+orderId
  1008. // console.log("base64Img",base64Img)
  1009. // var imgFile = this.base64ImgtoFile(base64Img)
  1010. // this.downloadBlob(imgFile, 'test.png')
  1011. // console.log("imgFilewoowow",imgFile)
  1012. const blob = this.base64ToBlob(orderId, 'application/pdf');
  1013. this.openPdf(blob);
  1014. }
  1015. })
  1016. },
  1017. openPdf(blob) {
  1018. const objectUrl = URL.createObjectURL(blob);
  1019. const a = document.createElement('a');
  1020. a.href = objectUrl;
  1021. a.target = '_blank';
  1022. a.click();
  1023. URL.revokeObjectURL(objectUrl);
  1024. },
  1025. base64ToBlob(base64Data, contentType) {
  1026. contentType = contentType || '';
  1027. const sliceSize = 1024;
  1028. const byteCharacters = window.atob(base64Data);
  1029. const bytesLength = byteCharacters.length;
  1030. const slicesCount = Math.ceil(bytesLength / sliceSize);
  1031. const byteArrays = new Array(slicesCount);
  1032. for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
  1033. const begin = sliceIndex * sliceSize;
  1034. const end = Math.min(begin + sliceSize, bytesLength);
  1035. const bytes = new Array(end - begin);
  1036. for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
  1037. bytes[i] = byteCharacters[offset].charCodeAt(0);
  1038. }
  1039. byteArrays[sliceIndex] = new Uint8Array(bytes);
  1040. }
  1041. return new Blob(byteArrays, {
  1042. type: contentType
  1043. });
  1044. },
  1045. downloadBlob(blob, filename) {
  1046. const url = URL.createObjectURL(blob);
  1047. const a = document.createElement('a');
  1048. a.href = url;
  1049. a.download = filename;
  1050. a.click();
  1051. URL.revokeObjectURL(url);
  1052. },
  1053. toCheckPDFInformation(){
  1054. toCheckPDFInformation().then(response=>{
  1055. if(response.data.data == 1){
  1056. var information = response.data.data.information
  1057. }
  1058. })
  1059. },
  1060. base64ImgtoFile(dataurl, filename = 'file') {
  1061. let arr = dataurl.split(',')
  1062. let mime = arr[0].match(/:(.*?);/)[1]
  1063. let suffix = mime.split('/')[1]
  1064. let bstr = atob(arr[1])
  1065. let n = bstr.length
  1066. let u8arr = new Uint8Array(n)
  1067. while (n--) {
  1068. u8arr[n] = bstr.charCodeAt(n)
  1069. }
  1070. return new File([u8arr], `${filename}.${suffix}`, {
  1071. type: mime
  1072. })
  1073. },
  1074. // toDrugInfo(){
  1075. // getdruginfoInformation().then(response=>{
  1076. // if(response.data.state==1){
  1077. // }
  1078. // })
  1079. // }
  1080. toJiaBan(){
  1081. UploadPrintOrder().then(response=>{
  1082. if(response.data.state ==1){
  1083. }
  1084. })
  1085. },
  1086. toAutoDrug(){
  1087. toAutoDrug().then(Response=>{
  1088. })
  1089. },
  1090. toAutoDiagnose(){
  1091. toAutoDiagnose().then(response=>{
  1092. })
  1093. },
  1094. toJiaoYou(){
  1095. toAutoJiaYou().then(response=>{
  1096. })
  1097. }
  1098. },
  1099. watch: {
  1100. should_update_admins(should_change) {
  1101. if (should_change) {
  1102. this.requestAdminsWithPage(this.current_page);
  1103. }
  1104. }
  1105. }
  1106. };
  1107. </script>
  1108. <style rel="stylesheet/scss" lang="scss" scoped>
  1109. .el-button + .el-button {
  1110. margin-left: 0 !important;
  1111. }
  1112. </style>
  1113. <style>
  1114. .el-table td,
  1115. .el-table th.is-leaf,
  1116. .el-table--border,
  1117. .el-table--group {
  1118. border-color: #d0d3da;
  1119. }
  1120. .el-table--border::after,
  1121. .el-table--group::after,
  1122. .el-table::before {
  1123. background-color: #d0d3da;
  1124. }
  1125. </style>