|
@@ -10,19 +10,20 @@
|
|
|
<el-table-column label="名称" prop="name"></el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
|
- <el-button size="small" split-button type="primary" @click="ceBianLanDianJi('查看', scope.row)">查看 </el-button>
|
|
|
- <el-button v-if="chaZhaoLeiXing !== 1" type="danger" @click="ceBianLanDianJi('删除', scope.row)">删除 </el-button>
|
|
|
+ <el-button size="small" split-button type="primary" @click="ceBianLanDianJi('查看', scope.row)">查看</el-button>
|
|
|
+ <el-button v-if="chaZhaoLeiXing !== 1" type="danger" @click="ceBianLanDianJi('删除', scope.row)">删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
- :current-page="jianChaFenLeiShuJu.currentPage"
|
|
|
- :page-size="20"
|
|
|
- :pager-count="5"
|
|
|
- :total="jianChaFenLeiShuJu.total"
|
|
|
- layout="prev,pager,next,total"
|
|
|
- small
|
|
|
- @current-change="jianChaFenLeiFenYe"
|
|
|
+ :current-page="jianChaFenLeiShuJu.currentPage"
|
|
|
+ :page-size="20"
|
|
|
+ :pager-count="5"
|
|
|
+ :total="jianChaFenLeiShuJu.total"
|
|
|
+ layout="prev,pager,next,total"
|
|
|
+ small
|
|
|
+ @current-change="jianChaFenLeiFenYe"
|
|
|
>
|
|
|
</el-pagination>
|
|
|
</el-aside>
|
|
@@ -30,25 +31,24 @@
|
|
|
<el-button icon="el-icon-arrow-left" style="font-size: 14px" text @click="router.go(-1)">返回</el-button>
|
|
|
<el-button @click="dianJiBaoCunShenQing">保存</el-button>
|
|
|
<el-button @click="clickSaveTemplate">存为模板</el-button>
|
|
|
- <cuo-wu-xin-xi />
|
|
|
- <xc-code code="ctrl + s" description="保存" />
|
|
|
- <xc-code code="ctrl + m" description="保存模板" />
|
|
|
- <xc-code code="ctrl + 1" description="编辑项目" />
|
|
|
+ <cuo-wu-xin-xi/>
|
|
|
+ <xc-code code="ctrl + s" description="保存"/>
|
|
|
+ <xc-code code="ctrl + m" description="保存模板"/>
|
|
|
+ <xc-code code="ctrl + 1" description="编辑项目"/>
|
|
|
<!-- 这里是检查的数据信息 -->
|
|
|
<el-table :data="xuanZhongJianCha.data" :header-cell-class-name="starAdd" :height="windowSize.h / 1.4">
|
|
|
<el-table-column label="编辑" width="120" fixed="left">
|
|
|
<template #default="scope">
|
|
|
- <el-button icon="el-icon-edit" round type="primary" @click="dianJiBianJi(scope.row, scope.$index)"></el-button>
|
|
|
- <el-button
|
|
|
- icon="el-icon-delete"
|
|
|
- round
|
|
|
- type="danger"
|
|
|
- @click="
|
|
|
- xuanZhongJianCha.data.splice(scope.$index, 1)
|
|
|
- xuanZhongJianCha.weiBianMa.splice(scope.$index, 1)
|
|
|
- "
|
|
|
- >
|
|
|
- </el-button>
|
|
|
+ <el-button icon="el-icon-edit" round type="primary"
|
|
|
+ @click="dianJiBianJi(scope.row, scope.$index)"></el-button>
|
|
|
+ <el-icon>
|
|
|
+ <Delete/>
|
|
|
+ <el-button
|
|
|
+ round
|
|
|
+ type="danger"
|
|
|
+ @click="deleteInspectionCheck(scope.$index)">
|
|
|
+ </el-button>
|
|
|
+ </el-icon>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="项目编码" prop="orderCode"></el-table-column>
|
|
@@ -118,11 +118,12 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
- <bian-ji-jian-cha-shen-qing ref="bianJiRef" :jian-cha="jianCha" @fanYe="bianJiFanYe" @dialogCloses="initializationShortcut" />
|
|
|
+ <bian-ji-jian-cha-shen-qing ref="bianJiRef" :jian-cha="jianCha" @fanYe="bianJiFanYe"
|
|
|
+ @dialogCloses="initializationShortcut"/>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="TianJiaJianChaJianYan">
|
|
|
-import { computed, onMounted, ref } from 'vue'
|
|
|
+import {computed, onMounted, ref} from 'vue'
|
|
|
import {
|
|
|
baoCunJianChaJianYanMuBan,
|
|
|
baoCunJianYanJianCha,
|
|
@@ -132,16 +133,21 @@ import {
|
|
|
shanShuJianChaMuBan,
|
|
|
} from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
|
|
|
import store from '@/store'
|
|
|
-import { clone } from '@/utils/clone'
|
|
|
-import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
-import { listNotBlank, stringNotBlank } from '@/utils/blank-utils'
|
|
|
-import BianJiJianChaShenQing from '@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/BianJiJianChaJianYanShenQing.vue'
|
|
|
-import { huanHangXianShi } from '@/utils/date'
|
|
|
-import { cuoWuXinXi, huanZheXinXi, youWuXuanZheHuanZhe } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
|
|
|
+import {clone} from '@/utils/clone'
|
|
|
+import {ElMessage, ElMessageBox} from 'element-plus'
|
|
|
+import {listNotBlank, stringNotBlank} from '@/utils/blank-utils'
|
|
|
+import BianJiJianChaShenQing
|
|
|
+ from '@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/BianJiJianChaJianYanShenQing.vue'
|
|
|
+import {huanHangXianShi} from '@/utils/date'
|
|
|
+import {
|
|
|
+ cuoWuXinXi,
|
|
|
+ huanZheXinXi,
|
|
|
+ youWuXuanZheHuanZhe
|
|
|
+} from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
|
|
|
import router from '@/router'
|
|
|
-import { yaoPinXiangMuPiPeiYiBao } from '@/api/public-api'
|
|
|
+import {yaoPinXiangMuPiPeiYiBao} from '@/api/public-api'
|
|
|
import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
|
|
|
-import { logoutShortcut, xcHotKey } from '@/utils/xckeydown'
|
|
|
+import {logoutShortcut, xcHotKey} from '@/utils/xckeydown'
|
|
|
import Sleep from '@/utils/sleep'
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -242,10 +248,11 @@ const dianJiBaoCunShenQing = () => {
|
|
|
type: 'warning',
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- baoCunShuJu()
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ .then(() => {
|
|
|
+ baoCunShuJu()
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
} else {
|
|
|
baoCunShuJu()
|
|
|
}
|
|
@@ -256,23 +263,24 @@ function baoCunShuJu() {
|
|
|
ElMessageBox.confirm('确定要保存这些数据吗?', '提示', {
|
|
|
type: 'warning',
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- let data = huanZheXinXi.value
|
|
|
- data.list = xuanZhongJianCha.value.data
|
|
|
- data.reqType = props.jianCha ? 3 : 2
|
|
|
- baoCunJianYanJianCha(data)
|
|
|
- .then((res) => {
|
|
|
- xuanZhongJianCha.value.weiBianMa = []
|
|
|
- xuanZhongJianCha.value.data = []
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- cuoWuXinXi.value = e
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ .then(() => {
|
|
|
+ let data = huanZheXinXi.value
|
|
|
+ data.list = xuanZhongJianCha.value.data
|
|
|
+ data.reqType = props.jianCha ? 3 : 2
|
|
|
+ baoCunJianYanJianCha(data)
|
|
|
+ .then((res) => {
|
|
|
+ xuanZhongJianCha.value.weiBianMa = []
|
|
|
+ xuanZhongJianCha.value.data = []
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ cuoWuXinXi.value = e
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-const ceBianLanDianJi = (name, { code, bwCode }) => {
|
|
|
+const ceBianLanDianJi = (name, {code, bwCode}) => {
|
|
|
if (!props.jianCha) {
|
|
|
bwCode = ''
|
|
|
}
|
|
@@ -289,21 +297,22 @@ const ceBianLanDianJi = (name, { code, bwCode }) => {
|
|
|
ElMessageBox.confirm('是否要删除该检查模板', '提示', {
|
|
|
type: 'warning',
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- shanShuJianChaMuBan(code, store.state.user.info.deptCode)
|
|
|
- })
|
|
|
- .catch((e) => {})
|
|
|
+ .then(() => {
|
|
|
+ shanShuJianChaMuBan(code, store.state.user.info.deptCode)
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const baoCunMuBanJiaoYan = ref({
|
|
|
tcName: [
|
|
|
- { required: true, message: '名称不能为空', trigger: 'blur' },
|
|
|
- { min: 1, max: 30, message: '长度在 1 到 30 个字', trigger: 'blur' },
|
|
|
+ {required: true, message: '名称不能为空', trigger: 'blur'},
|
|
|
+ {min: 1, max: 30, message: '长度在 1 到 30 个字', trigger: 'blur'},
|
|
|
],
|
|
|
- orderType: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
|
|
- sortNo: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
|
|
- tcFlag: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
|
|
+ orderType: [{required: true, message: '名称不能为空', trigger: 'blur'}],
|
|
|
+ sortNo: [{required: true, message: '名称不能为空', trigger: 'blur'}],
|
|
|
+ tcFlag: [{required: true, message: '名称不能为空', trigger: 'blur'}],
|
|
|
})
|
|
|
|
|
|
const dianJiBaoCunMuBan = async (form) => {
|
|
@@ -318,10 +327,11 @@ const dianJiBaoCunMuBan = async (form) => {
|
|
|
confirmButtonText: '覆盖',
|
|
|
cancelButtonText: '取消',
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- faSongBaoCunMuBan()
|
|
|
- })
|
|
|
- .catch((e) => {})
|
|
|
+ .then(() => {
|
|
|
+ faSongBaoCunMuBan()
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ })
|
|
|
} else {
|
|
|
faSongBaoCunMuBan()
|
|
|
}
|
|
@@ -364,7 +374,7 @@ const shortcutToOpenEditing = () => {
|
|
|
}
|
|
|
|
|
|
let hotKeyList = {
|
|
|
- ctrl: { s: dianJiBaoCunShenQing, m: clickSaveTemplate, 1: shortcutToOpenEditing },
|
|
|
+ ctrl: {s: dianJiBaoCunShenQing, m: clickSaveTemplate, 1: shortcutToOpenEditing},
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -382,6 +392,11 @@ const starAdd = (obj) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const deleteInspectionCheck = (index) => {
|
|
|
+ xuanZhongJianCha.data.splice(index, 1)
|
|
|
+ xuanZhongJianCha.weiBianMa.splice(index, 1)
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
initializationShortcut()
|
|
|
dianJiLeiXingChaXun()
|