123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- import {ref} from "vue";
- import {maZuiFangShi} from "../../api/public-api";
- import store from '@/store';
- const getRoles = store.state.user.info.roles
- export function shenHeQuanXian() {
- return getRoles.indexOf(1) > -1 || getRoles.indexOf(8) > -1
- // return getRoles.indexOf(8) > -1
- }
- /**
- * 获取医保诊断
- * @param val 诊断编码
- * @returns {string} 返回名称
- */
- export function getsiDiagTypeName(val) {
- switch (val) {
- case "1":
- return "西医主要诊断"
- case "2":
- return "西医其他诊断"
- case "3":
- return "中医主要诊断"
- case "4":
- return "中医其他诊断"
- default:
- return "没有选择"
- }
- }
- /**
- * 判断这个人是否有申请了
- * @param val
- * @returns {string}
- */
- export function auditName(val) {
- switch (val.auditFlag) {
- case 0:
- return `<span style="color: #909399">${val.psnName}</span>`
- case 1:
- return `<span style="color: #67C23A">${val.psnName}</span>`
- case 2:
- return `<span style="color: #F56C6C">${val.psnName}</span>`
- case 3:
- return `<span style="color: #E6A23C">${val.psnName}</span>`
- default:
- return `${val.psnName}`
- }
- }
- export const qks = ref([
- {code: '0/0', name: '0/0'},
- {code: '1/3', name: 'Ⅰ/丙'},
- {code: '1/1', name: 'Ⅰ/甲'},
- {code: '1/2', name: 'Ⅰ/乙'},
- {code: '2/3', name: 'Ⅱ/丙'},
- {code: '2/1', name: 'Ⅱ/甲'},
- {code: '2/2', name: 'Ⅱ/乙'},
- {code: '3/3', name: 'Ⅲ/丙'},
- {code: '3/1', name: 'Ⅲ/甲'},
- {code: '3/2', name: 'Ⅲ/乙'}
- ])
- export const auditFlags = ref([
- {code: 0, name: '待审核'},
- {code: 1, name: '审核通过'},
- {code: 2, name: '驳回'},
- {code: 3, name: '正在审核'},
- {code: 4, name: '全部'},
- ])
- /**
- *
- * @param qkjb 切口级别
- * @param yhqk 愈合级别
- * @returns {string} 返回信息
- */
- export function qieKouName(qkjb, yhqk) {
- let code = qkjb + '/' + yhqk
- let name = ''
- qks.value.forEach(item => {
- if (item.code === code) {
- return name = item.name
- }
- })
- return name
- }
- /**
- *
- * @type {ToRef<*[]>} 麻醉数组
- */
- export const maZuiFangShis = ref([])
- /**
- * 远程获取麻醉方式
- */
- maZuiFangShi().then((res) => {
- maZuiFangShis.value = res
- })
- /**
- * 麻醉的名字
- * @param val code
- * @returns {string} 名称
- */
- export function maZuiName(val) {
- let name = '未知'
- maZuiFangShis.value.forEach(item => {
- if (item.code === val) {
- return name = item.name
- }
- })
- return name
- }
- /**
- * 医生默认可以默认选择的信息
- * @param arr 数组
- * @param notNode 不需要的 code
- * @returns {*[]} 返回科室
- */
- export function xianZhongChuQu(arr, notNode) {
- let data = []
- arr.forEach(item => {
- if (notNode.indexOf(item.code) === -1) {
- data.push(item.code)
- }
- })
- return data
- }
|