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

admin.vue 32KB

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