Commit d0ad590b authored by 盖献康's avatar 盖献康

Merge remote-tracking branch 'origin/master'

parents 104a294a 59251f2c
......@@ -120,7 +120,7 @@ export const constantRoutes = [
},
{
path: 'equipment-detail/:id',
path: 'equipment-detail/:id/:identify',
props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-detail'),
name: 'EquipmentDetail',
......
......@@ -70,7 +70,7 @@
<el-row>
<el-col :span="12" style="padding-bottom: 20px;">
<el-button
v-hasPermi="['system:device:add']"
v-hasPermi="['business:device:add']"
class="fourWordsBtn"
icon="el-icon-plus"
@click="handleAdd"
......@@ -89,14 +89,14 @@
>反向选择
</el-button>
<el-button
v-hasPermi="['system:device:import']"
v-hasPermi="['business:device:import']"
class="fourWordsBtn"
icon="el-icon-bottom-left"
@click="handleImport"
>批量导入
</el-button>
<el-button
v-hasPermi="['system:device:export']"
v-hasPermi="['business:device:export']"
class="fourWordsBtn"
icon="el-icon-top-right"
@click="handleExport"
......@@ -169,7 +169,7 @@
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-hasPermi="['system:device:edit']"
v-hasPermi="['business:device:edit']"
size="mini"
type="success"
icon="el-icon-document"
......@@ -179,7 +179,7 @@
>详情
</el-button>
<el-button
v-hasPermi="['system:device:edit']"
v-hasPermi="['business:device:edit']"
plain
size="mini"
type="success"
......
......@@ -88,7 +88,7 @@
</el-col>
</el-row>
<el-table ref="table" v-loading="loading" :data="userList" border :row-key="getRowKeys" @selection-change="handleSelectionChange" @select-all="selectAll($event, false)">
<el-table ref="table" v-loading="loading" :data="userList" border :row-key="getRowKeys" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="设备ID" align="left" prop="deviceCode" :show-overflow-tooltip="true" />
......
<template>
<div style="background-color: #FFFFFF;">
<!-- 病历管理--宠物编辑页-->
<div class="pet-detail">
<div class="medical-edit">
<!-- 头部标题-->
<div style="padding-top:32px;text-align: center;">
<span
......@@ -425,24 +425,47 @@ color: #333333;"
</el-row>
</el-form>
<!--7--用药信息-->
<div style="display: flex">
<div class="title-content">
<div class="title-left">
<div class="tip-green" />
<div
style="padding-left: 13px;font-size: 16px;font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;font-weight: bold;color: #333333;"
class="tip-text"
>用药信息
</div>
</div>
<el-button
class="fourWordsBtn"
icon="el-icon-circle-plus-outline"
size="mini"
@click="handleAdd('petProtect')"
>新增用药
</el-button>
</div>
<!-- 内部信息 -->
<div class="pet-insurance">
<div class="table-content">
<el-form ref="drugForm" :model="drugForm" label-width="0" :rules="drugRules" class="demo-ruleForm">
<el-table :data="petProtect" :header-cell-style="{ background:'#E8E9E8'}" border>
<el-table-column align="center" label="药品名称" prop="protectName">
<el-input v-model="form.petId" maxlength="20" />
<template slot-scope="scope">
<el-form-item v-if="scope.row.inputShow" :prop="'tableData.'+scope.$index+'.protectName'" :rules="drugRules.protectName">
<el-select v-model="scope.row.protectName" placeholder="请选择" clearable>
<el-option
v-for="(item, index) in drugList"
:key="index"
:label="item.dictLabel"
:value="String(item.dictCode)"
/>
</el-select>
</el-form-item>
<span v-else>{{ scope.row.protectName === '' || scope.row.protectName === null ? '-' : scope.row.protectName }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="规格" prop="type" />
<el-table-column align="center" label="数量" prop="date" />
<el-table-column align="center" label="用法" prop="date" />
<el-table-column align="center" label="开药日期" prop="date" />
<el-table-column align="center" label="缴费状态" prop="date" />
<el-table-column align="center" show-overflow-tooltip class-name="small-padding fixed-width" label="操作" min-width="180">
<template slot-scope="scope">
<el-button
......@@ -462,9 +485,19 @@ color: #333333;"
size="mini"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(52,144,206);"
type="primary"
@click="handleUpdate(scope.row)"
@click="handleUpdate(scope.$index,'petProtect')"
>编辑
</el-button>
<el-button
v-hasPermi="['business:case:save']"
icon="el-icon-edit"
plain
size="mini"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(52,144,206);"
type="primary"
@click="handleSave('drugForm','petProtect', scope.$index)"
>保存
</el-button>
<el-button
v-hasPermi="['business:case:edit']"
icon="el-icon-document"
......@@ -478,6 +511,7 @@ color: #333333;"
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!--8--检查信息-->
<div style="display: flex">
......@@ -488,7 +522,7 @@ color: #333333;"
</div>
</div>
<!-- 内部信息 -->
<div class="pet-insurance">
<div class="table-content">
<el-table :data="petProtect" :header-cell-style="{ background:'#E8E9E8'}" border>
<el-table-column align="center" label="检查类型" prop="protectName" />
<el-table-column align="center" label="检查项目" prop="type" />
......@@ -540,7 +574,7 @@ color: #333333;"
</div>
</div>
<!-- 内部信息 -->
<div class="pet-insurance">
<div class="table-content">
<el-table :data="petProtect" :header-cell-style="{ background:'#E8E9E8'}" border>
<el-table-column align="center" label="治疗项目" prop="protectName" />
<el-table-column align="center" label="治疗类型" prop="type" />
......@@ -593,7 +627,7 @@ color: #333333;"
</div>
</div>
<!-- 内部信息 -->
<div class="pet-insurance">
<div class="table-content">
<el-table :data="petProtect" :header-cell-style="{ background:'#E8E9E8'}" border>
<el-table-column align="center" label="入院日期" prop="protectName" />
<el-table-column align="center" label="住院天数" prop="type" />
......@@ -646,7 +680,7 @@ color: #333333;"
</div>
</div>
<!-- 内部信息 -->
<div class="pet-insurance">
<div class="table-content">
<el-table :data="petProtect" :header-cell-style="{ background:'#E8E9E8'}" border>
<el-table-column align="center" label="收费项" prop="protectName" />
<el-table-column align="center" label="明细" prop="type" />
......@@ -678,6 +712,14 @@ export default {
},
data() {
return {
editCunt: {
petProtect: 0
},
drugList: [], // 药品列表
map: {
},
drugForm: {}, // 用药管理table编辑
drugRules: {},
form: {},
// 排序下拉框
insureList: [
......@@ -765,11 +807,13 @@ export default {
petProtect: [{
protectName: '人兽保险',
type: '意外保险',
date: '2025/04/18'
date: '2025/04/18',
inputShow: false
}, {
protectName: '平安保险',
type: '人身保险',
date: '2026/03/25'
date: '2026/03/25',
inputShow: false
}]
}
},
......@@ -777,6 +821,38 @@ export default {
},
methods: {
/** 编辑行*/
handleUpdate(index, tableData) {
// 每个表格只有一行可编辑
if (this.editCunt[tableData] === 0) {
this[tableData][index]['inputShow'] = true
this.editCunt[tableData] += 1
} else {
this.$message({
message: '只可同时编辑一行',
info: 'success'
})
}
},
/** 新增行*/
handleAdd(tableName) {
this[tableName].unshift({
protectName: '',
type: '',
date: '',
inputShow: false
})
},
/** 保存行*/
handleSave(formName, listName, index) {
this.$refs[formName].validate((valid) => {
console.log('22222222222', valid, this[formName], this[listName])
if (valid) {
this[listName][index].inputShow = false
this.editCunt[listName] -= 1
}
})
},
parseTime,
selectDictLabel,
/**
......@@ -802,7 +878,22 @@ export default {
</script>
<style lang="scss" scoped>
//整个页面整体布局
.pet-detail {
.medical-edit {
// 项目标题
.title-content{
display: flex;
justify-content: space-between;
.title-left{
display: flex;
.tip-text{
padding-left: 13px;
font-size: 16px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;
font-weight: bold;
color: #333333;
}
}
}
//最外层嵌套卡片的样式
.box-card {
margin: 20px 20px 20px 20px;
......@@ -841,7 +932,7 @@ export default {
}
//2--宠物保险--模块内信息整体样式
.pet-insurance {
.table-content {
margin: 35px 1% 20px;
}
......@@ -909,3 +1000,13 @@ export default {
color: #333333;
}
</style>
<style lang="scss">
.medical-edit {
// 表格中输入框样式
.el-table{
.el-form-item{
margin-bottom: 0;
}
}
}
</style>
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