Commit 75750759 by 唐玉峰

vue3->vue2

parent f2a6b31e
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<el-row> <el-row>
<el-col :span="7"><span class="key a13">出生日期 </span></el-col> <el-col :span="7"><span class="key a13">出生日期 </span></el-col>
<el-col :span="17" <el-col :span="17"
><span class="values"> {{ changeValue("a13") != "——" ? transformTime(changeValue("a13")) : changeValue("a13") }}</span></el-col ><span class="values"> {{ changeValue("a13") != "——" ? transformTimestamp(changeValue("a13")) : changeValue("a13") }}</span></el-col
> >
</el-row> </el-row>
</el-col> </el-col>
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
<el-row> <el-row>
<el-col :span="8"><span class="key b12">入院时间 </span></el-col> <el-col :span="8"><span class="key b12">入院时间 </span></el-col>
<el-col :span="16" <el-col :span="16"
><span class="values">{{ changeValue("b12") != "——" ? transformTime(changeValue("b12")) : changeValue("b12") }}</span></el-col ><span class="values">{{ changeValue("b12") != "——" ? transformTimestamp(changeValue("b12")) : changeValue("b12") }}</span></el-col
> >
</el-row> </el-row>
</el-col> </el-col>
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
<el-row> <el-row>
<el-col :span="8"><span class="key b15">出院时间 </span></el-col> <el-col :span="8"><span class="key b15">出院时间 </span></el-col>
<el-col :span="16" <el-col :span="16"
><span class="values">{{ changeValue("b15") != "——" ? transformTime(changeValue("b15")) : changeValue("b15") }}</span></el-col ><span class="values">{{ changeValue("b15") != "——" ? transformTimestamp(changeValue("b15")) : changeValue("b15") }}</span></el-col
> >
</el-row> </el-row>
</el-col> </el-col>
...@@ -669,7 +669,7 @@ ...@@ -669,7 +669,7 @@
<el-row> <el-row>
<el-col :span="3"><span class="key b33">质控日期</span></el-col> <el-col :span="3"><span class="key b33">质控日期</span></el-col>
<el-col :span="15" <el-col :span="15"
><span class="values">{{ changeValue("b33") != "——" ? transformTime(changeValue("b33")) : changeValue("b33") }}</span></el-col ><span class="values">{{ changeValue("b33") != "——" ? transformTimestamp(changeValue("b33")) : changeValue("b33") }}</span></el-col
> >
</el-row> </el-row>
</div> </div>
...@@ -680,7 +680,7 @@ ...@@ -680,7 +680,7 @@
<el-table-column prop="opS_CODE" label="手术及操作编码"></el-table-column> <el-table-column prop="opS_CODE" label="手术及操作编码"></el-table-column>
<el-table-column prop="opS_TIME" label="手术及操作日期"> <el-table-column prop="opS_TIME" label="手术及操作日期">
<template #default="scope"> <template #default="scope">
{{ scope.row.opS_TIME ? transformTime(scope.row.opS_TIME) : "" }} {{ scope.row.opS_TIME ? transformTimestamp(scope.row.opS_TIME) : "" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="opS_LEVEL" label="手术级别"></el-table-column> <el-table-column prop="opS_LEVEL" label="手术级别"></el-table-column>
...@@ -1066,68 +1066,55 @@ import { reactive, toRefs, computed, onMounted, nextTick } from "@vue/compositio ...@@ -1066,68 +1066,55 @@ import { reactive, toRefs, computed, onMounted, nextTick } from "@vue/compositio
import { transformTimestamp } from "../../utils/formatTime"; import { transformTimestamp } from "../../utils/formatTime";
import { decimal } from "../../utils/decimal"; import { decimal } from "../../utils/decimal";
export default { export default {
props: { props: ["clicktitle", "medicalrecord"],
Object, //弹出层是否显示 computed: {
clicktitle: String, //点击的文本内容 diagnosis() {
medicalrecord: Object, if (this.medicalrecord?.diagnosis) {
}, if (this.medicalrecord?.diagnosis.length < 4) {
setup(props, context) { for (let i = this.medicalrecord?.diagnosis.length; i <= 4; i++) {
const state = reactive({}); this.medicalrecord?.diagnosis.push({});
const transformTime = computed(() => {
return transformTimestamp;
});
// 添加表头calss
const headerRowStyle = ({ row, column, rowIndex, columnIndex }) => {
if (column.label == "手术及操作编码") {
return "ops";
} }
};
const diagnosisclass = ({ row, column, rowIndex, columnIndex }) => {
if (column.label == "出院诊断") {
return "diagnosis";
} }
}; return this.medicalrecord?.diagnosis;
const diagnosis = computed(() => {
if (props.medicalrecord.diagnosis) {
if (props.medicalrecord.diagnosis.length < 4) {
for (let i = props.medicalrecord.diagnosis.length; i <= 4; i++) {
props.medicalrecord.diagnosis.push({});
} }
},
ops() {
if (this.medicalrecord?.ops) {
if (this.medicalrecord?.ops.length < 4) {
for (let i = this.medicalrecord?.ops.length; i <= 4; i++) {
this.medicalrecord?.ops.push({});
} }
return props.medicalrecord.diagnosis;
} }
}); return this.medicalrecord?.ops;
const ops = computed(() => {
if (props.medicalrecord.ops) {
if (props.medicalrecord.ops.length < 4) {
for (let i = props.medicalrecord.ops.length; i <= 4; i++) {
props.medicalrecord.ops.push({});
} }
},
},
mounted() {
console.log(this.medicalrecord);
console.log(this.clicktitle);
},
methods: {
decimal,
transformTimestamp,
// 添加表头calss
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.label == "手术及操作编码") {
return "ops";
} }
return props.medicalrecord.ops; },
diagnosisclass({ row, column, rowIndex, columnIndex }) {
if (column.label == "出院诊断") {
return "diagnosis";
} }
}); },
function changeValue(str) { changeValue(str) {
let obj = props.medicalrecord; let obj = this.medicalrecord;
if (str && obj) { if (str && obj) {
return obj[str] ? obj[str] : "——"; return obj[str] ? obj[str] : "——";
} else { } else {
return "——"; return "——";
} }
} },
return {
...toRefs(state),
changeValue,
transformTime,
diagnosis,
ops,
decimal,
headerRowStyle,
diagnosisclass,
};
}, },
}; };
</script> </script>
......
...@@ -21,7 +21,6 @@ function errorMsg(d) { ...@@ -21,7 +21,6 @@ function errorMsg(d) {
console.log(d.response); console.log(d.response);
if (d.response.status == "401") { if (d.response.status == "401") {
Vue.prototype.$message.error("登录信息失效,重新登录!"); Vue.prototype.$message.error("登录信息失效,重新登录!");
sessionStorage.clear(); sessionStorage.clear();
this.$router.push("/login").catch((err) => { this.$router.push("/login").catch((err) => {
console.log("输出报错", err); console.log("输出报错", err);
......
...@@ -420,12 +420,8 @@ export default { ...@@ -420,12 +420,8 @@ export default {
opsList: [], //手术 opsList: [], //手术
}; };
}, },
mounted() { async mounted() {
this.getCaseHis(this.$route.query.id); this.getCaseHis(this.$route.query.id);
if (this.searchForm.diagName.length > 0) {
this.getlist();
}
}, },
methods: { methods: {
goback() { goback() {
...@@ -445,7 +441,6 @@ export default { ...@@ -445,7 +441,6 @@ export default {
http.post(`/medical/Get/casehisData?id=${code}`, {}) http.post(`/medical/Get/casehisData?id=${code}`, {})
.then((data) => { .then((data) => {
this.casehisObj = data; this.casehisObj = data;
console.log("data", data);
this.diagMapList = data.diagMapList; this.diagMapList = data.diagMapList;
this.opsMapList = data.opsMapList; this.opsMapList = data.opsMapList;
this.getlist(); this.getlist();
...@@ -466,15 +461,6 @@ export default { ...@@ -466,15 +461,6 @@ export default {
this.nolistShow = true; this.nolistShow = true;
// this.nodataShow = false; // this.nodataShow = false;
} }
for (var i = 0; i < this.CorePercents.length; i++) {
this.$nextTick(() => {
initEcharts(categoryChart(this.CorePercents[i].drugPercent, "#2CABE3"), `indexChart${i}`);
initEcharts(categoryChart(this.CorePercents[i].materialsPercent, "#71D875"), `indexCharttwo${i}`);
initEcharts(categoryChart(this.CorePercents[i].inspectPercent, "#F35E77"), `indexCharttree${i}`);
initEcharts(categoryChart(this.CorePercents[i].testPercent, "#FFB321"), `indexChartfore${i}`);
initEcharts(categoryChart(this.CorePercents[i].otherPercent, "#C05EF3"), `indexChartfile${i}`);
});
}
}) })
.catch((error) => {}); .catch((error) => {});
}, },
......
...@@ -145,9 +145,7 @@ ...@@ -145,9 +145,7 @@
<script> <script>
import http from "../utils/http"; import http from "../utils/http";
import { reactive, toRefs, onMounted, nextTick, computed } from "@vue/composition-api";
import medicalRecordHomepage from "../components/medicalRecordHomepage/index.vue"; import medicalRecordHomepage from "../components/medicalRecordHomepage/index.vue";
import { useRoute, useRouter } from "../utils/useVueRouter";
import $ from "jquery"; import $ from "jquery";
import { setItem, getItem } from "../utils/auth"; import { setItem, getItem } from "../utils/auth";
import { Message, Loading } from "element-ui"; import { Message, Loading } from "element-ui";
...@@ -156,8 +154,8 @@ export default { ...@@ -156,8 +154,8 @@ export default {
medicalRecordHomepage, medicalRecordHomepage,
}, },
name: "outseeQualityControl", name: "outseeQualityControl",
setup() { data() {
let state = reactive({ return {
medicalrecord: null, medicalrecord: null,
ScoringDetails: null, ScoringDetails: null,
caseHistoryScoreData: null, caseHistoryScoreData: null,
...@@ -178,37 +176,45 @@ export default { ...@@ -178,37 +176,45 @@ export default {
splithtml3: "", //病房 splithtml3: "", //病房
keys: [], //获取所有的问卷key keys: [], //获取所有的问卷key
values: [], // values: [], //
}); loadingOption1: {
var route = useRoute(); // 加载loading
fullscreen: true,
onMounted(() => { text: "正在加载...",
console.log(route.value); spinner: "el-icon-loading",
}); background: "rgba(0, 0, 0, 0.5)",
},
};
},
mounted() {
if (this.$route.query.id) {
this.getScoringDetails(this.$route.query.id);
this.getHomePage(this.$route.query.id);
setItem("outpid", this.$route.query.id);
}
},
methods: {
//同步数据 //同步数据
const getSynchronous = (id) => { getSynchronous(id) {
http.post(`/medical/get/Synchronization?id=${route.value.query.id}`) http.post(`/medical/get/Synchronization?id=${this.$route.query.id}`)
.then((data) => { .then((data) => {
Message.success(data.message); Message.success(data.message);
}) })
.catch((error) => { .catch((error) => {
Message.error(error); Message.error(error);
}); });
}; },
//获取到点击的值 //获取到点击的值
const handleNodeClick = (data) => { handleNodeClick(data) {
let arr = document.getElementsByClassName(data.columnName); let arr = document.getElementsByClassName(data.columnName);
let dom = $("#medicalRecord").find("#clickColor"); let dom = $("#medicalRecord").find("#clickColor");
if (dom.length != 0) { if (dom.length != 0) {
dom.removeAttr("id"); dom.removeAttr("id");
} }
arr[0].setAttribute("id", "clickColor"); arr[0].setAttribute("id", "clickColor");
this.scrollTop();
},
scrollTop(); scrollTop() {
};
function scrollTop() {
if ($("#clickColor").position()) { if ($("#clickColor").position()) {
$(".outseeQualityControl_box_Content_left").animate( $(".outseeQualityControl_box_Content_left").animate(
{ {
...@@ -221,77 +227,51 @@ export default { ...@@ -221,77 +227,51 @@ export default {
500 500
); );
} }
} },
const loadingOption1 = {
// 加载loading
fullscreen: true,
text: "正在加载...",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.5)",
};
//获取患者基本信息树形数据 //获取患者基本信息树形数据
function getScoringDetails(id) { getScoringDetails(id) {
var loadingInstance1 = Loading.service(loadingOption1); var loadingInstance1 = Loading.service(this.loadingOption1);
http.post(`/medical/get/GetCaseHisRule?id=${id}`, {}) http.post(`/medical/get/GetCaseHisRule?id=${id}`, {})
.then((data) => { .then((data) => {
state.departmentTree = data[0].rulesLists; this.departmentTree = data[0].rulesLists;
state.rightdepartmentTree = data[1].rulesLists; this.rightdepartmentTree = data[1].rulesLists;
state.fruleCount = data[0].ruleCount; this.fruleCount = data[0].ruleCount;
state.ruleCount = data[1].ruleCount; this.ruleCount = data[1].ruleCount;
if (state.fruleCount == 0 || state.ruleCount == 0) { if (this.fruleCount == 0 || this.ruleCount == 0) {
state.isnodataShow = true; this.isnodataShow = true;
} }
loadingInstance1.close(); loadingInstance1.close();
}) })
.catch((error) => { .catch((error) => {
loadingInstance1.close(); loadingInstance1.close();
}); });
} },
// 获取病案首页数据 // 获取病案首页数据
function getHomePage(id) { getHomePage(id) {
http.post(`/medical/Get/HomeHisPage?id=${id}`, {}) http.post(`/medical/Get/HomeHisPage?id=${id}`, {})
.then((data) => { .then((data) => {
state.medicalrecord = data; this.medicalrecord = data;
state.keys = Object.keys(data); this.keys = Object.keys(data);
}) })
.catch((error) => {}); .catch((error) => {});
} },
//点击非编码问题 //点击非编码问题
const leftcode = () => { leftcode() {
state.isleftcodeShow = true; this.isleftcodeShow = true;
}; },
//点击编码问题 //点击编码问题
const rightcode = () => { rightcode() {
state.isleftcodeShow = false; this.isleftcodeShow = false;
}; },
onMounted(() => {
if (route.value.query.id) {
getScoringDetails(route.value.query.id);
getHomePage(route.value.query.id);
setItem("outpid", route.value.query.id);
}
});
return {
...toRefs(state),
handleNodeClick,
leftcode,
rightcode,
getSynchronous,
};
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
// @import '../styles/mixin.scss';
// @import 'styles/media/components/outseeQualityControl.scss';
.outseeQualityControl { .outseeQualityControl {
height: 96%; height: 96%;
background-color: white; background-color: white;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment