This commit is contained in:
zoujiandong
2025-06-13 19:09:30 +08:00
parent 518a5d1b47
commit a31fc3c1e6
40 changed files with 4210 additions and 532 deletions
+4 -273
View File
@@ -70,84 +70,6 @@
</view>
</z-paging>
</view>
<up-popup
:round="10"
zIndex="9"
:show="showCase"
mode="bottom"
@close="closeCase"
>
<view class="votepop casepop">
<view class="titlebox">
<view class="left" @click="showCase = false">取消</view>
<view class="left continue" @click="continueCase" v-show="level != 3"
>继续选择</view
>
<view class="right" @click="confirmCase">确定</view>
</view>
<view class="casecon">
<view v-show="level == 1" >
<up-radio-group
v-model="caseValue1"
iconPlacement="right"
placement="column"
>
<view
class="column"
v-for="item in labelObj.list1"
:key="item.app_iden"
>
<up-radio
activeColor="#3CC7C0 "
:label="item.label_name"
:name="item.app_iden"
></up-radio>
</view>
</up-radio-group>
</view>
<view v-show="level == 2" >
<up-radio-group
v-model="caseValue2"
iconPlacement="right"
placement="column"
>
<view
class="column"
v-for="item in labelObj.list2"
:key="item.app_iden"
>
<up-radio
activeColor="#3CC7C0 "
:label="item.label_name"
:name="item.app_iden"
></up-radio>
</view>
</up-radio-group>
</view>
<view v-show="level == 3" >
<up-radio-group
v-model="caseValue3"
iconPlacement="right"
placement="column"
>
<view
class="column"
v-for="item in labelObj.list2"
:key="item.app_iden"
>
<up-radio
activeColor="#3CC7C0 "
:label="item.label_name"
:name="item.app_iden"
></up-radio>
</view>
</up-radio-group>
</view>
</view>
</view>
</up-popup>
</template>
<script setup>
@@ -168,97 +90,6 @@ const keyWord = ref("");
const isArticle=ref(true)
const type=ref('doctor')
const navName=ref('医生临床病例库');
const showCase = ref(false);
const caseValue1 = ref("");
const caseValue2 = ref("");
const caseValue3 = ref("");
const level = ref(1);
const labelObj = reactive({
list1: [],
list2: [],
list3: [],
});
const getCaseLabel = (lev,pid=0) => {
api.getCaseLabel({
pid:pid
}).then((res) => {
if (lev == 1) {
labelObj.list1 = res.data.data;
} else if (lev == 2) {
labelObj.list2 = res.data.data;
} else if (lev == 3) {
labelObj.list3 = res.data.data;
}
level.value = lev;
});
};
const confirmCase = () => {
if (level.value == 1 && caseValue1.value == "") {
uni.showToast({ title: "请选择疾病", icon: "none" });
return false;
}
if (level.value == 2 && caseValue2.value == "") {
uni.showToast({ title: "请选择疾病", icon: "none" });
return false;
}
if (level.value == 3 && caseValue3.value == "") {
uni.showToast({ title: "请选择疾病", icon: "none" });
return false;
}
showCase.value = false;
if(level.value == 1){
let label = labelObj.list1.find((item) => item.app_iden == caseValue1.value);
console.log(label);
labelList.value.push({
app_iden:label.app_iden,
label_name:label.label_name,
});
}
if(level.value == 2 ){
let label = labelObj.list2.find((item) => item.app_iden == caseValue2.value);
labelList.value.push({
app_iden:label.app_iden,
label_name:label.label_name,
});
}
if(level.value == 3 ){
let label = labelObj.list3.find((item) => item.app_iden == caseValue3.value);
labelList.value.push({
app_iden:label.app_iden,
label_name:label.label_name,
});
}
//去重
labelList.value=labelList.value.filter((item, index) => labelList.value.findIndex(i => i.app_iden === item.app_iden) === index);
caseValue1.value = "";
caseValue2.value = "";
caseValue3.value = "";
};
const continueCase = () => {
if (level.value == 1 && caseValue1.value == "") {
uni.showToast({ title: "请选择疾病", icon: "none" });
return false;
}
if (level.value == 2 && caseValue2.value == "") {
uni.showToast({ title: "请选择疾病", icon: "none" });
return false;
}
if (level.value == 3 && caseValue3.value == "") {
uni.showToast({ title: "请选择疾病", icon: "none" });
return false;
}
if(level.value == 1 ){
getCaseLabel(2,caseValue1.value);
}else if(level.value == 2 ){
getCaseLabel(3,caseValue2.value);
}
};
const closeCase = () => {
showCase.value = false;
};
const options= ref([
{
label: "正序",
@@ -437,110 +268,7 @@ const changeWord=(value)=>{
</script>
<style lang="scss" scoped>
.votepop {
.confirm {
margin: 39rpx 30rpx 0;
height: 92rpx;
background: #3cc7c0;
border-radius: 15rpx;
display: flex;
align-items: center;
font-size: 31rpx;
color: #ffffff;
justify-content: center;
}
.del {
margin: 30rpx 30rpx 30rpx;
height: 92rpx;
background: #fff;
border-radius: 15rpx;
font-size: 31rpx;
color: #666666;
display: flex;
align-items: center;
justify-content: center;
}
.tips {
margin-top: 30rpx;
font-size: 27rpx;
color: #9ca3af;
line-height: 38rpx;
padding: 0 30rpx;
}
.add {
margin: 0 30rpx;
display: flex;
align-items: center;
height: 92rpx;
justify-content: center;
background: #f5f5f5;
border-radius: 15rpx;
font-size: 31rpx;
color: #4b5563;
.desc {
margin-left: 10rpx;
}
}
.titlebox {
padding: 0 30rpx;
height: 86rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2rpx solid #f3f4f6;
.left {
font-size: 31rpx;
color: #4b5563;
}
.right {
font-size: 31rpx;
color: #3cc7c0;
}
}
.votecon {
max-height: calc(100vh - 530rpx);
overflow-y: scroll;
.row {
display: flex;
align-items: center;
.iconbox {
margin-left: 15rpx;
align-items: center;
}
}
.titlebox {
border: none;
margin: 30rpx 0 20rpx;
.title {
font-size: 31rpx;
color: #111827;
}
.desc {
font-size: 27rpx;
color: #9ca3af;
}
}
}
}
.casepop{
display: flex;
flex-direction: column;
max-height: calc(100vh - 400rpx);
.continue{
color: #2878ff !important;
}
}
.casecon {
flex:1;
overflow-y: scroll;
padding-top: 10rpx;
min-height: 350rpx;
.column {
padding: 0 30rpx;
border-bottom: 2rpx solid #e5e7eb;
}
}
.databox {
height: 162rpx;
background: #ffffff;
@@ -576,6 +304,9 @@ const changeWord=(value)=>{
border-bottom: 2rpx solid rgba(0,0,0,0.08);
align-items: center;
position: relative;
:deep(.u-dropdown__menu__item__text){
font-size: 14px!important;
}
.type{
position: absolute;
left:30rpx;