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

admin.vue 33KB

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