1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
-
- <div>
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toGet">CA企业认证</el-button> -->
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="openForm(0)">新增</el-button>
- <el-button
- type="primary"
- size="small"
- @click="BatchDelete"
- >医药师登记</el-button>
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toJiaBan">加班</el-button> -->
-
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toJiaoYou">加油</el-button>
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTest">短信</el-button> -->
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestOne">创建个人用户实名</el-button>
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestFive">创建企业用户并实名</el-button>
-
-
-
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestFour">添加企业成员</el-button>
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestTwo">创建个人印章</el-button>
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestThree">创建合同</el-button> -->
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestSeven">添加合同签署人</el-button> -->
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestTen"
- >
- 短信验证码
- </el-button> -->
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestNight">后台签署</el-button>
- -->
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestElement">创建企业用章</el-button> -->
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestThrityMent">生成PDF</el-button> -->
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestTwo">创建个人印章</el-button> -->
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestThree">创建合同</el-button>
-
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestSeven">添加合同签署人</el-button>
-
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestTen"
- >
- 获取短信验证码
- </el-button>
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestNight">后台签署</el-button>
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toTestThrity">合同详情查询</el-button>
-
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toWatch">合同在线预览</el-button>
-
- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toEnd">结束签署</el-button> -->
-
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toSendInformaton">发送短信验证码</el-button> -->
-
-
- <!--<el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toSavePDFInformation">生成PDF</el-button>-->
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toCheckPDFInformation">PDF验证</el-button> -->
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toAutoDrug">自动生成</el-button> -->
-
-
- <!-- <el-button
- type="primary"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="float:left"
- @click="toAutoDiagnose">自动脚本</el-button> -->
- </div>
-
-
- </div>
- <div class="app-container">
- <el-table
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- style="width:100%;"
- ref="table"
- border
- :data="admins"
- v-loading="is_loading_admins"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column
- label="用户名"
- prop="user_name"
- min-width="160"
- align="center"
- ></el-table-column>
- <el-table-column v-if="this.$store.getters.xt_user.org_id != 10206" label="医保医师编码" prop="doctor_number" min-width="160" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.doctor_number== 0"></span>
- <span v-if="scope.row.doctor_number!= 0">{{scope.row.doctor_number}}</span>
- </template>
- </el-table-column>
-
- <el-table-column v-if="this.$store.getters.xt_user.org_id == 10206" label="员工ID" prop="doctor_number" min-width="160" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.doctor_number== 0"></span>
- <span v-if="scope.row.doctor_number!= 0">{{scope.row.doctor_number}}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="最后登录IP"
- prop="ip"
- min-width="150"
- align="center"
- ></el-table-column>
- <el-table-column
- label="最后登录时间"
- prop="last_login_time"
- min-width="170"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{
- scope.row.last_login_time == 0
- ? ""
- : _parseTime(scope.row.last_login_time, "{y}-{m}-{d} {h}:{i}")
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="角色"
- prop="role_name"
- min-width="160"
- align="center"
- ></el-table-column>
- <el-table-column label="状态" min-width="100" align="center">
- <template slot-scope="scope">
- <div
- v-if="scope.row.status == 1"
- style="color: #67C23A; font-size:20px;"
- >
- <li class="el-icon-success"></li>
- </div>
- <div v-else style="color: #F56C6C; font-size:20px;">
- <li class="el-icon-error"></li>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="240" align="center">
- <template slot-scope="scope">
-
-
- <!-- <span>
- <el-button type="primary" size="small" @click="toRenZhen(scope.row.user_id,scope.row.user_name)">
- <span>CA个人认证</span>
- </el-button>
- </span> -->
-
- <!-- <span>
- <el-button type="primary" size="small" @click="toQianShu(scope.row.user_id,scope.row.user_name)">
- <span>创建签署人用户</span>
- </el-button>
- </span>
-
- <span>
- <el-button type="primary" size="small" @click="toYinZhang(scope.row.user_id,scope.row.user_name)">
- <span>创建个人印章</span>
- </el-button>
- </span> -->
- <!--
- <span>
- <el-button type="primary" size="small" @click="toShouQuan(scope.row.user_id,scope.row.user_name)">
- <span>创建企业印章</span>
- </el-button>
- </span> -->
- <el-tooltip
- class="item"
- effect="dark"
- content="编辑"
- placement="top"
- >
- <el-button
- type="primary"
- icon="el-icon-edit-outline"
- size="small"
- @click="openForm(scope.row.user_id)"
- ></el-button>
- </el-tooltip>
- <!-- </router-link> -->
- <el-tooltip
- class="item"
- effect="dark"
- content="移除"
- placement="top"
- >
- <el-button
- type="danger"
- size="small"
- icon="el-icon-delete"
- v-if="
- scope.row.status == 1 &&
- org.creator != scope.row.user_id &&
- scope.row.user_id != local_user_id
- "
- @click="disableAdminAction(scope.row)"
- ></el-button>
- </el-tooltip>
- <el-tooltip
- class="item"
- effect="dark"
- content="恢复"
- placement="top"
- >
- <el-button
- size="small"
- type="info"
- icon="el-icon-refresh"
- v-if="
- scope.row.status == 0 &&
- org.creator != scope.row.user_id &&
- scope.row.user_id != local_user_id
- "
- @click="recoverAdminAction(scope.row)"
- ></el-button>
- </el-tooltip>
- <span v-if="scope.row.user_type == 2">
- <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.user_id,scope.row.is_mark)">
- <span v-if="scope.row.is_mark ==0">登记</span>
- <span v-if="scope.row.is_mark ==1">撤销</span>
- </el-button>
- </span>
- </template>
- </el-table-column>
- </el-table>
-
- <el-row style="margin-top: 15px;" v-if="admin_total_count > 10">
- <el-col :span="24">
- <el-pagination
- :total="admin_total_count"
- :current-page.sync="current_page"
- @current-change="pageChange"
- :page-size="10"
- layout="total, prev, pager, next, jumper"
- ></el-pagination>
- </el-col>
- </el-row>
- <admin-info-form ref="admininfoform"></admin-info-form>
- </div>
-
- <el-dialog
- title="CA企业认证"
- :visible.sync="dialogVisible"
- width="50%">
- <span>
-
- <el-form>
- <el-row>
- <el-col>
- <el-form-item label="企业类型:">
- <el-select
- v-model="form.org_type"
- filterable
- clearable
- allow-create
- placeholder="选择"
- >
- <el-option
- v-for="item in businessList"
- :key="item.id"
- :label="item.name "
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col>
- <el-form-item label="企业名称:">
- <el-input style="width:200px" v-model="form.enterprise_name" placeholder="请按营业执照上面的公司填写名称"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col>
- <el-form-item label="统一社会信用代码:">
- <el-input style="width:200px" v-model="form.code" placeholder="请输入统一社会信息代码"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col>
- <el-form-item label="组织机构代码:">
- <el-input style="width:200px" v-model="form.org_code" placeholder="请输入统一社会信息代码"></el-input>
- </el-form-item>
- </el-col>
-
-
- <el-col>
- <el-form-item label="法定代表人:">
- <el-input style="width:200px" v-model="form.legal_person_name" placeholder="请输入统一社会信息代码"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col>
- <el-form-item label="法定代表人身份证:">
- <el-input style="width:200px" v-model="form.legal_id_card_num" placeholder="请输入统一社会信息代码"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col>
- <el-form-item label="法人手机号码:">
- <el-input style="width:200px" v-model="form.legal_phone" placeholder="请输入法人手机号码"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
-
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="saveEnterprise">立即认证</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="CA个人认证"
- :visible.sync="persionDialogVisible"
- width="50%">
- <span>
-
- <el-form>
- <el-row>
-
- <el-col>
- <el-form-item label="姓名:">
- <el-input style="width:200px" v-model="personForm.display_name" placeholder="请输入姓名"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col>
- <el-form-item label="身份证号:">
- <el-input style="width:200px" v-model="personForm.id_card_num" placeholder="请输入身份证号"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col>
- <el-form-item label="手机号:">
- <el-input style="width:200px" v-model="personForm.phone" placeholder="请输入手机号"></el-input>
- </el-form-item>
- </el-col>
-
-
- <el-col>
- <el-form-item label="验证码:">
- <el-input style="width:100px" v-model="form.code" placeholder="请输入验证码"></el-input>
- <el-button type="primary" size="small" @click="getCode">获取验证码</el-button>
- </el-form-item>
- </el-col>
-
- </el-row>
- </el-form>
-
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="persionDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="savePersonEnterprise">立即认证</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
-
- <script>
- 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
- ,CreateQianshuUserName,CreateSKDSendInformation,toSavePDFInformation,toCheckPDFInformation,getdruginfoInformation,toAutoDrug,toAutoDiagnose,toAutoJiaYou} from "@/api/role/admin";
- import { getRoles } from "@/api/role/role";
- import { UploadPrintOrder } from "@/api/role/admin"
- import { parseTime } from "@/utils";
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import AdminInfoForm from "./components/AdminInfoForm";
- import axios from 'axios'
- export default {
- name: "adminManage",
- data() {
- return {
- crumbs: [
- { path: false, name: "管理中心" },
- { path: false, name: "员工管理" }
- ],
- is_loading_admins: true,
- admins: [], // [{user_id, user_name, role_name, title_name, ip, last_login_time, status}]
- admin_total_count: 0,
- current_page: 1,
- roles: [],
- is_exist_role: false,
- org: null,
- isSubSuperAdmin: false,
- local_user_id: 0,
- selectDrug:[],
- dialogVisible:false,
- persionDialogVisible:false,
- businessList:[
- {id:1,name:"企业"},
- {id:2,name:"个体工商户"},
- {id:3,name:"政府机构"}
- ],
- form:{
- id:0,
- org_type:"",
- enterprise_name:"",
- code:"",
- org_code:"",
- legal_person_name:"",
- legal_id_card_num:"",
- legal_phone:"",
- },
- personForm:{
- id:0,
- display_name:"",
- phone:"",
- id_card_num:"",
- admin_user_id:"",
- code:"",
- }
- };
- },
- components: {
- BreadCrumb,
- AdminInfoForm
- },
- created: function() {
-
- this.local_user_id = this.$store.getters.xt_user.user.id;
- let page = 1;
- this.getRoles(page);
- adminMainView()
- .then(rs => {
- this.is_loading_admins = false;
- var resp = rs.data;
- if (resp.state === 1) {
- var adminData = resp.data.admins
- console.log("数据",adminData)
- this.admins.push(...adminData);
- this.admin_total_count = resp.data.total_count;
- this.is_exist_role = resp.data.is_exist_role;
- this.current_page = 1;
- this.org = resp.data.org;
- this.isSubSuperAdmin = resp.data.isSubSuperAdmin;
-
- //能进入当前页面的角色只有超级管理员和子管理员,如果当前角色是子管理员,需要把超级管理员和其他子管理员的信息去除,子管理员不能编辑超级管理员和其他子管理员信息,
- if (this.isSubSuperAdmin) {
- //去除管理员信息
- for (let i = 0; i < this.admins.length; i++) {
- if (this.admins[i].user_id == this.org.creator) {
- this.admins.splice(i, 1);
- i--;
- }
- }
-
- //去除其他子管理员信息
- for (let i = 0; i < this.admins.length; i++) {
- if (
- this.admins[i].user_id != this.local_user_id &&
- this.admins[i].is_sub_super_admin
- ) {
- //将自己排除在外
- console.log(this.admins[i]);
-
- this.admins.splice(i, 1);
- i--;
- }
- }
- }
- } else {
- this.$message.error(resp.msg);
- }
- })
- .catch(err => {
- this.is_loading_admins = false;
- this.$message.error(err);
- });
- },
- computed: {
- should_update_admins() {
- return this.$store.getters.xt_role_temps.did_admins_changed;
- }
- },
- methods: {
- getRoles(page) {
- getRoles(page)
- .then(rs => {
- this.loading_roles = false;
- const resp = rs.data;
- if (resp.state === 1) {
- this.roles.push(...resp.data.roles);
- } else {
- this.$message.error(resp.msg);
- }
- })
- .catch(err => {
- this.loading_roles = false;
- this.$message.error(err);
- });
- },
- openForm(adminId) {
- this.$refs["admininfoform"].open(adminId, this.roles);
- },
- _parseTime(time, format) {
- return parseTime(time, format);
- },
- requestAdminsWithPage: function(page) {
- this.admins.splice(0, this.admins.length);
- this.is_loading_admins = true;
- getAdmins(page)
- .then(rs => {
- this.is_loading_admins = false;
- const resp = rs.data;
- console.log(resp);
- if (resp.state === 1) {
- var admindata = resp.data.admins
-
- this.admins.push(...admindata);
- this.admin_total_count = resp.data.total_count;
- } else {
- this.$message.error(resp.msg);
- }
- })
- .catch(err => {
- this.is_loading_admins = false;
- this.$message.error(err);
- });
- },
- addAdminAction: function() {
- this.$router.push({ path: "/role/admin/create" });
- },
- disableAdminAction: function(row) {
- this.$msgbox({
- title: "提示",
- message: "是否确定要移除该用户",
- showCancelButton: true,
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- beforeClose: (action, instance, done) => {
- if (action === "confirm") {
- instance.confirmButtonLoading = true;
- instance.confirmButtonText = "删除中...";
-
- setAdminStatus(row.user_id, false)
- .then(rs => {
- done();
- instance.confirmButtonLoading = false;
-
- const resp = rs.data;
- if (resp.state === 1) {
- row.status = 0;
- } else {
- this.$message.error(resp.msg);
- }
- })
- .catch(err => {
- done();
- instance.confirmButtonLoading = false;
- this.$message.error(err);
- });
- } else {
- done();
- }
- }
- });
- },
- recoverAdminAction: function(row) {
- const loading = this.$loading({
- lock: true,
- text: "正在恢复管理员...",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
-
- setAdminStatus(row.user_id, true)
- .then(rs => {
- loading.close();
-
- const resp = rs.data;
- if (resp.state === 1) {
- row.status = 1;
- } else {
- this.$message.error(resp.msg);
- }
- })
- .catch(err => {
- loading.close();
- this.$message.error(err);
- });
- },
- pageChange: function(nextPage) {
- this.requestAdminsWithPage(nextPage);
- },
- // toLogin(){
- // var that = this
- // axios.get('http://127.0.0.1:9532/sz/api/doctor/get').then(function(response) {
- // if (response.data.state == 0) {
- // that.$message.error(response.data.msg)
- // return false
- // } else {
- // that.$message({ message: '登记成功', type: 'success' })
- // }
- // }).catch(function(error) {
- // })
- // },
-
- BatchDelete() {
- if (this.selectDrug.length == 0) {
- this.$message.error("请选择要登记的信息");
- return false;
- }
- this.$confirm(
- "确认要登记所选记录吗? <br>",
- "备案提示",
- {
- dangerouslyUseHTMLString: true,
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }
- ).then(() => {
- var ids = [];
- var idMap = {};
- console.log("3333333",this.selectDrug)
- for (const index in this.selectDrug) {
- ids.push(this.selectDrug[index].user_id);
- idMap[this.selectDrug[index].user_id] = this.selectDrug[index].user_id;
- }
-
- var idss = ids.join(',')
- let params = {
- ids:idss,
- admin_user_id:this.$store.getters.xt_user.user.id
- }
- console.log("prams222",params)
- var that = this
- axios.get('http://127.0.0.1:9532/sz/api/doctor/get',{ params: params }).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg)
- return false
- } else {
- that.$message.error(response.data.data.msg)
- if(response.data.data.msg == ""){
- that.$message.success("登记成功!")
- that.adminMainView()
- }
- if(response.data.data.msg!=""){
- that.$message.error(response.data.data.msg)
- that.adminMainView()
- }
- }
- }).catch(function(error) {
- })
- });
- },
- toReturn(id,is_mark){
- var that = this
- let params = {
- 'id':id,
- "is_mark":is_mark,
- "admin_user_id":this.$store.getters.xt_user.user.id
- }
-
- axios.get('http://127.0.0.1:9532/sz/api/medical/get',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg)
- return false
- } else {
-
- if(response.data.data.msg == ""){
- that.$message.success("登记成功!")
- that.adminMainView()
- }
- if(response.data.data.msg!=""){
- that.$message.error(response.data.data.msg)
- that.adminMainView()
- }
- }
- }).catch(function(error) {
- })
- },
-
- handleSelectionChange(val) {
- this.selectDrug = val;
- },
- toTest(){
- toSign().then(response=>{
- if(response.data.state ==1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- }
- })
- },
- toTestOne(){
- toTestOne().then(response=>{
- if(response.data.state==1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- }
- })
- },
- toTestTwo(){
- toTestTwo().then(response=>{
- if(response.data.state ==1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- }
- })
- },
- toTestThree(){
- toTestThree().then(response=>{
- if(response.data.state ==1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- }
- })
- },
- toTestFour(){
- toTestFour().then(response=>{
- if(response.data.state==1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- }
- })
- },
- toTestFive(){
- toTestFive().then(response=>{
- if(response.data.state==1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- }
- })
- },
- toTestSeven(){
- toTestSeven().then(response=>{
- if(response.data.state ==1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- }
- })
- },
- toTestEight(){
- toTestEight().then(response=>{
- if(response.data.state== 1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- this.$message.success("保存")
- }
- })
- },
- toTestNight(){
- toTestNight().then(response=>{
- if(response.data.state == 1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- this.$message.success("保存")
- var maprequest = response.data.data.maprequest
- console.log("maprequest",maprequest)
- }
- })
- },
- toTestTen(){
- toTestTen().then(response=>{
- if(response.data.state == 1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- this.$message.success("保存")
- }
- })
- },
- toTestElement(){
- toTestElement().then(response=>{
- if(response.data.state == 1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- this.$message.success("保存")
- }
- })
- },
- toTestThrityMent(){
- toTestThrityMent().then(response=>{
- var sign = response.data.data.sign
- console.log("sign",sign)
- this.$message.success("保存")
- })
- },
-
- saveEnterprise(){
-
- var params = {
- id:this.form.id,
- org_type:parseInt(this.form.org_type),
- enterprise_name:this.form.enterprise_name,
- code:this.form.code,
- org_code:this.form.org_code,
- legal_person_name:this.form.legal_person_name,
- legal_id_card_num:this.form.legal_id_card_num,
- legal_phone:this.form.legal_phone,
- }
- console.log("paramswowo",params)
- saveEnterprise(params).then(response=>{
- if(response.data.state==1){
- var enterPrise = response.data.data.enterPrise
- this.dialogVisible = false
- this.$message.success("保存成功!")
- }
- })
- },
- toGet(){
- getEnterPriseById().then(response=>{
- if(response.data.state == 1){
- this.dialogVisible = true
- var enterPrise = response.data.data.enterPrise
- this.form.id = enterPrise.id
- this.form.org_type = enterPrise.org_type?enterPrise.org_type:""
- this.form.enterprise_name = enterPrise.enterprise_name
- this.form.code = enterPrise.code
- this.form.org_code = enterPrise.org_code
- this.form.legal_person_name = enterPrise.legal_person_name
- this.form.legal_id_card_num = enterPrise.legal_id_card_num
- this.form.legal_phone = enterPrise.legal_phone
- }
- })
- },
- toRenZhen(admin_user_id,user_name){
-
- getPerseEnterPriseById(admin_user_id).then(response=>{
- if(response.data.state== 1){
- var lastPerson = response.data.data.lastPerson
- this.personForm.id = lastPerson.id
- this.personForm.display_name = user_name
- this.personForm.phone = lastPerson.phone
- this.personForm.id_card_num = lastPerson.id_card_num
- this.personForm.admin_user_id =lastPerson.admin_user_id
- this.persionDialogVisible = true
- }
- })
-
-
- },
- getCode(){
- var params = {
- phone:this.personForm.phone,
- }
- console.log("paramsowowo",params)
- getMobileCode(params).then(response=>{
- if(response.data.state == 1){
- var sign = response.data.data.sign
- console.log("sign",sign)
- this.$message.success("发送成功!")
- }
- })
- },
- savePersonEnterprise(){
- var params = {
- id:this.personForm.id,
- display_name:this.personForm.display_name,
- phone:this.personForm.phone,
- id_card_num:this.personForm.id_card_num,
- admin_user_id:this.personForm.admin_user_id,
- code:this.personForm.code,
- }
- console.log("param2o2o2o2",params)
- savePersionEnterPrise(params).then(response=>{
- if(response.data.state == 1){
- var personEnterPrse = response.data.data.personEnterPrse
- this.$message.success("认证成功")
- this.persionDialogVisible = false
- }
- })
- },
- toYinZhang(admin_user_id){
- CreatePersionSeal(admin_user_id).then(response=>{
- if(response.data.state == 1){
- var personSeal = response.data.data.personSeal
- this.$message.success("创建成功")
- }
- })
- },
- toShouQuan(admin_user_id){
- CreateNewEnterPrise(admin_user_id).then(response=>{
- if(response.data.state == 1){
- var newEnterPrise = response.data.data.newEnterPrise
- this.$message.success("保存成功!")
- }
- })
- },
- toTestThrity(){
- toTestThrity().then(response=>{
- if(response.data.state == 1){
- var sign = response.data.data.sign
- console.log("signwoowow",sign)
- }
- })
- },
- toEnd(){
- toEndEnterPrise().then(response=>{
- if(response.data.state == 1){
- var sign = response.data.data.sign
-
- this.$message.success("保存成功")
- }
- })
- },
- toWatch(){
- getEnterPriseDetail().then(response=>{
- if(response.data.state == 1){
- var sign = response.data.data.sign
-
- this.$message.success("保存成功")
- }
- })
- },
-
- toQianShu(admin_user_id){
-
- CreateQianshuUserName(admin_user_id).then(response=>{
- if(response.data.state==1){
- var sign = response.data.data.sign
- var userId = response.data.data.userId
- this.$message.success("签署成功!")
- }
- })
- },
-
- toSendInformaton(){
- CreateSKDSendInformation().then(response=>{
- if(response.data.state==1){
- var information = response.data.data.information
-
- var orderId = response.data.data.orderId
- }
- })
- },
- toSavePDFInformation(){
- toSavePDFInformation().then(response=>{
- if(response.data.state == 1){
- var information = response.data.data.information
-
- var orderId = response.data.data.orderId
-
- // var base64Img = 'data:image/png;base64'+","+orderId
- // console.log("base64Img",base64Img)
- // var imgFile = this.base64ImgtoFile(base64Img)
- // this.downloadBlob(imgFile, 'test.png')
- // console.log("imgFilewoowow",imgFile)
-
- const blob = this.base64ToBlob(orderId, 'application/pdf');
- this.openPdf(blob);
-
- }
- })
- },
- openPdf(blob) {
- const objectUrl = URL.createObjectURL(blob);
- const a = document.createElement('a');
- a.href = objectUrl;
- a.target = '_blank';
- a.click();
- URL.revokeObjectURL(objectUrl);
- },
- base64ToBlob(base64Data, contentType) {
- contentType = contentType || '';
- const sliceSize = 1024;
- const byteCharacters = window.atob(base64Data);
- const bytesLength = byteCharacters.length;
- const slicesCount = Math.ceil(bytesLength / sliceSize);
- const byteArrays = new Array(slicesCount);
-
- for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
- const begin = sliceIndex * sliceSize;
- const end = Math.min(begin + sliceSize, bytesLength);
-
- const bytes = new Array(end - begin);
- for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
- bytes[i] = byteCharacters[offset].charCodeAt(0);
- }
- byteArrays[sliceIndex] = new Uint8Array(bytes);
- }
-
- return new Blob(byteArrays, {
- type: contentType
- });
- },
- downloadBlob(blob, filename) {
- const url = URL.createObjectURL(blob);
- const a = document.createElement('a');
- a.href = url;
- a.download = filename;
- a.click();
- URL.revokeObjectURL(url);
- },
- toCheckPDFInformation(){
- toCheckPDFInformation().then(response=>{
- if(response.data.data == 1){
- var information = response.data.data.information
- }
- })
- },
-
- base64ImgtoFile(dataurl, filename = 'file') {
- let arr = dataurl.split(',')
- let mime = arr[0].match(/:(.*?);/)[1]
- let suffix = mime.split('/')[1]
- let bstr = atob(arr[1])
- let n = bstr.length
- let u8arr = new Uint8Array(n)
- while (n--) {
- u8arr[n] = bstr.charCodeAt(n)
- }
- return new File([u8arr], `${filename}.${suffix}`, {
- type: mime
- })
- },
- // toDrugInfo(){
- // getdruginfoInformation().then(response=>{
- // if(response.data.state==1){
-
- // }
- // })
- // }
- toJiaBan(){
- UploadPrintOrder().then(response=>{
- if(response.data.state ==1){
-
- }
- })
- },
- toAutoDrug(){
- toAutoDrug().then(Response=>{
-
- })
- },
- toAutoDiagnose(){
- toAutoDiagnose().then(response=>{
-
- })
- },
- toJiaoYou(){
- toAutoJiaYou().then(response=>{
-
- })
- }
-
- },
- watch: {
- should_update_admins(should_change) {
- if (should_change) {
- this.requestAdminsWithPage(this.current_page);
- }
- }
- }
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- .el-button + .el-button {
- margin-left: 0 !important;
- }
- </style>
- <style>
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
- </style>
|