|
@@ -0,0 +1,254 @@
|
|
|
+<template>
|
|
|
+ <page-layer>
|
|
|
+ <template #header>
|
|
|
+ <el-input v-model="text" class="w-50 m-2" style="width: 400px" placeholder="请输入系统编码/人事工号/姓名/拼音码/五笔码/院内码"
|
|
|
+ clearable>
|
|
|
+ <template #prepend>关键词 </template>
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" icon="Search" @click="queryEmployeeMi" style="margin-left: 5px">查询</el-button>
|
|
|
+ <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button>
|
|
|
+ </template>
|
|
|
+ <template #main>
|
|
|
+ <el-table :data="tableData.slice(pageSize * (currentPage - 1), pageSize * currentPage)" border
|
|
|
+ style="width: 100%" :height="tableHeight" stripe highlight-current-row>
|
|
|
+ <el-table-column type="index" label="序号" width="50" fixed />
|
|
|
+ <el-table-column prop="delFlag" label="停用" width="50" fixed>
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.delFlag === '1'" style="color:#d12020;">停用</span>
|
|
|
+ <span v-else></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="code" label="系统编码" width="80" fixed />
|
|
|
+ <el-table-column prop="codeRs" label="人事工号" width="80" fixed />
|
|
|
+ <el-table-column prop="name" label="姓名" width="80" fixed />
|
|
|
+ <el-table-column prop="deptName" label="所属科室" width="140" />
|
|
|
+ <el-table-column prop="empPoName" label="职务" width="120" />
|
|
|
+ <el-table-column prop="empTitName" label="技术职称" width="120" />
|
|
|
+ <el-table-column prop="markName" label="在院标志" />
|
|
|
+ <el-table-column prop="ifcadreName" label="干工标志" />
|
|
|
+ <el-table-column prop="pyCode" label="拼音码" width="90" />
|
|
|
+ <el-table-column prop="dcode" label="五笔码" width="90" />
|
|
|
+ <el-table-column prop="ncode" label="院内码" />
|
|
|
+ <el-table-column prop="orderYn" label="医生处方权" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.orderYn === '1'">普通处方权</span>
|
|
|
+ <span v-else-if="scope.row.orderYn === '2'">毒麻药处方权</span>
|
|
|
+ <span v-else></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ysjbName" label="病历级别" />
|
|
|
+ <el-table-column prop="ghChargeName" label="挂号级别" width="100" />
|
|
|
+ <el-table-column prop="doctorXzYp" label="限制药品级别" width="130">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.doctorXzYp === '1'">限制使用药品</span>
|
|
|
+ <span v-else-if="scope.row.doctorXzYp === '2'">特殊使用药品</span>
|
|
|
+ <span v-else>非限制使用药品</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="loginFlag" label="病区允许就诊" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.loginFlag === '1'" style="color:#007175;">允许</span>
|
|
|
+ <span v-else-if="scope.row.loginFlag === '2'" style="color:#d12020;">不允许</span>
|
|
|
+ <span v-else></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="delFlagB" label="停用">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.delFlagB === '1'" style="color:#d12020;">是</span>
|
|
|
+ <span v-else style="color:#007175;">否</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="socialNo" label="身份证号" width="180" />
|
|
|
+ <el-table-column prop="phoneNo" label="电话号码" width="180" />
|
|
|
+ <el-table-column prop="ybCode" label="医保代码" width="180" />
|
|
|
+ <el-table-column label="操作" fixed="right" width="140" align="center" header-align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button :type="scope.row.delFlag === '1' ? 'primary' : 'warning'" size="small"
|
|
|
+ @click="handleStop(scope.row)">
|
|
|
+ <span v-if="scope.row.delFlag === '1'">启用</span>
|
|
|
+ <span v-else>停用</span>
|
|
|
+ </el-button>
|
|
|
+ <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[15, 30, 45, 60]"
|
|
|
+ :total="tableData.length" layout="total, sizes, prev, pager, next, jumper" style="margin-top: 5px"
|
|
|
+ @size-change="handleSizeChange" @current-change="handleCurrentChange">
|
|
|
+ </el-pagination>
|
|
|
+ </template>
|
|
|
+ </page-layer>
|
|
|
+</template>
|
|
|
+<script setup name="EmployeeMi">
|
|
|
+import { ref, onMounted, nextTick } from 'vue'
|
|
|
+import PageLayer from '@/layout/PageLayer.vue'
|
|
|
+import store from '@/store'
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import { selectEmployeeMi, delEmployeeMiByCode, updateEmployeeMiDelFlagByCode } from '@/api/dictionary/personnel/employee-mi.js'
|
|
|
+import { Export } from '@/utils/ExportExcel'
|
|
|
+import { clone } from '@/utils/clone'
|
|
|
+
|
|
|
+const windowSize = store.state.app.windowSize;
|
|
|
+const tableHeight = windowSize.h / 1.07;
|
|
|
+const pageSize = ref(30)
|
|
|
+const currentPage = ref(1)
|
|
|
+const handleSizeChange = (val) => {
|
|
|
+ pageSize.value = val
|
|
|
+}
|
|
|
+const handleCurrentChange = (val) => {
|
|
|
+ currentPage.value = val
|
|
|
+}
|
|
|
+
|
|
|
+const text = ref('')
|
|
|
+const tableData = ref([])
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ nextTick(() => {
|
|
|
+ queryEmployeeMi()
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+// 查询员工字典
|
|
|
+const queryEmployeeMi = () => {
|
|
|
+ selectEmployeeMi(text.value)
|
|
|
+ .then((res) => {
|
|
|
+ tableData.value = res
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const handleDelete = (row) => {
|
|
|
+ let title = '请确认是否删除<span style="color:#d12020;">' + row.name + '</span>?'
|
|
|
+ ElMessageBox.confirm(title, {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
+ }).then(() => {
|
|
|
+ delEmployeeMiByCode(row.code).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: res.cg,
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ qeryDeptDict()
|
|
|
+ return
|
|
|
+ })
|
|
|
+ }).catch((action) => {
|
|
|
+ if (action === 'cancel') {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+const handleStop = (row) => {
|
|
|
+ let delFlag
|
|
|
+ let title
|
|
|
+ if ('1' === row.delFlag) {
|
|
|
+ delFlag = '0'
|
|
|
+ title = '请确认是否启用<span style="color:#d12020;">' + row.name + '</span>?'
|
|
|
+ } else {
|
|
|
+ delFlag = '1'
|
|
|
+ title = '请确认是否停用<span style="color:#d12020;">' + row.name + '</span>?'
|
|
|
+ }
|
|
|
+
|
|
|
+ ElMessageBox.confirm(title, {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
+ }).then(() => {
|
|
|
+ updateEmployeeMiDelFlagByCode(row.code, delFlag).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: res.cg,
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ queryEmployeeMi()
|
|
|
+ return
|
|
|
+ })
|
|
|
+ }).catch((action) => {
|
|
|
+ if (action === 'cancel') {
|
|
|
+ queryEmployeeMi()
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 导出职工信息
|
|
|
+const exportData = () => {
|
|
|
+ if (tableData.value.length === 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: "没有可以导出的数据!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const title = {
|
|
|
+ delFlag: "停用",
|
|
|
+ code: "系统编码",
|
|
|
+ codeRs: "人事工号",
|
|
|
+ name: "姓名",
|
|
|
+ deptName: "所属科室",
|
|
|
+ empPoName: "职务",
|
|
|
+ empTitName: "技术职称",
|
|
|
+ markName: "在院标志",
|
|
|
+ ifcadreName: "干工标志",
|
|
|
+ pyCode: "拼音码",
|
|
|
+ dcode: "五笔码",
|
|
|
+ ncode: "院内码",
|
|
|
+ orderYn: "医生处方权",
|
|
|
+ ysjbName: "病历级别",
|
|
|
+ ghChargeName: "挂号级别",
|
|
|
+ doctorXzYp: "限制药品级别",
|
|
|
+ loginFlag: "病区允许就诊",
|
|
|
+ delFlagB: "停用",
|
|
|
+ socialNo: "身份证号",
|
|
|
+ phoneNo: "电话号码",
|
|
|
+ ybCode: "医保代码",
|
|
|
+ };
|
|
|
+
|
|
|
+ let d = clone(tableData.value)
|
|
|
+ d.forEach(val => {
|
|
|
+ if (val.delFlag === '1') {
|
|
|
+ val.delFlag = '停用'
|
|
|
+ } else {
|
|
|
+ val.delFlag = ''
|
|
|
+ }
|
|
|
+ if (val.orderYn === '1') {
|
|
|
+ val.orderYn = '普通处方权'
|
|
|
+ } else if (val.orderYn === '2') {
|
|
|
+ val.orderYn = '毒麻药处方权'
|
|
|
+ } else {
|
|
|
+ val.orderYn = ''
|
|
|
+ }
|
|
|
+ if (val.doctorXzYp === '1') {
|
|
|
+ val.doctorXzYp = '限制使用药品'
|
|
|
+ } else if (val.doctorXzYp === '2') {
|
|
|
+ val.doctorXzYp = '特殊使用药品'
|
|
|
+ } else {
|
|
|
+ val.doctorXzYp = '非限制使用药品'
|
|
|
+ }
|
|
|
+ if (val.loginFlag === '1') {
|
|
|
+ val.loginFlag = '允许'
|
|
|
+ } else if (val.loginFlag === '2') {
|
|
|
+ val.loginFlag = '不允许'
|
|
|
+ } else {
|
|
|
+ val.loginFlag = ''
|
|
|
+ }
|
|
|
+ if (val.delFlagB === '1') {
|
|
|
+ val.delFlagB = '是'
|
|
|
+ } else {
|
|
|
+ val.delFlagB = '否'
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ Export(d, title, "职工字典信息");
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|