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