健康一体级/设备类型修改

This commit is contained in:
zzyuan 2025-09-25 14:20:18 +08:00
parent ce5a1c5d0f
commit 9b2a0f5d61
7 changed files with 1005 additions and 679 deletions

View File

@ -235,7 +235,17 @@ export function getReportByIdApi(data) {
}
// 查询健康一体机列表
export function getPhysicalListApi(data) {
return request({
url: '/smart-canteen/hardwareScreen/physicalList',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}

View File

@ -417,14 +417,14 @@ export default {
handleNutritionChange(value) {
console.log("选中营养信息类别",value)
this.nutritionAllList(value)
this.$set(this.form,"nutritionId",null)
},
//
nutritionAllList(value){
let param = {
categoryId:value
}
nutritionAllListApi(param).then((response) => {
this.$set(this.form,"nutritionId",null)
nutritionAllListApi(param).then((response) => {
this.nutritionOptions = response.data;
});
},

View File

@ -1,667 +1,327 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="关 键 字">
<el-input v-model="queryParams.articleTitle" placeholder="请输入用户姓名、手机号" maxlength="20" clearable style="width: 220px"/>
</el-form-item>
<el-form-item label="所属位置" prop="placeIdList">
<el-cascader v-model="queryParams.placeIdList"
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item label="所属组织" prop="deptIdList">
<el-cascader v-model="queryParams.deptIdList"
:options="deptOptions" :filterable="true" placeholder="请选择所属组织" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item label="慢性病">
<el-select v-model="queryParams.chronicList" placeholder="请选择慢性病" multiple style="width: 220px" clearable collapse-tags>
<el-option v-for="item in chronicOptions"
:key="item.chronicId"
:label="item.chronicName"
:value="item.chronicId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="饮食医嘱">
<el-select v-model="queryParams.doctorAdvice" placeholder="请选择饮食医嘱" multiple style="width: 220px" clearable collapse-tags>
<el-option v-for="item in doctorAdviceOptions"
:key="item.doctorAdvice"
:label="item.doctorAdviceName"
:value="item.doctorAdvice"
></el-option>
</el-select>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字" prop="keyWord">
<el-input v-model="queryParams.keyWord" placeholder="请输入员工姓名,编号" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="记录时间">
<el-date-picker
v-model="dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd" style="width: 400px"
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData" height="800">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="用户姓名" align="center" prop="userName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="用户手机号" align="center" prop="phone" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ hidePhone(scope.row.phone) }}</span>
</template>
</el-table-column>
<el-table-column label="部门名称" align="center" prop="deptName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName" :show-overflow-tooltip="true"/>
<el-table-column label="位置" align="center" prop="subPlace" :show-overflow-tooltip="true"/>
<el-table-column label="记录时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleView(scope.row)"
>查看详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 查看对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<div style="width: 100%;height: 400px;overflow-y: auto;">
<el-descriptions class="margin-top" title="基本信息" :column="3" size="small" border>
<el-descriptions-item>
<template slot="label">用户编号</template>
{{form.userId}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">用户姓名</template>
{{ form.userName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">用户手机号</template>
{{ form.phone }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">部门名称</template>
{{ form.deptName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">设备名称</template>
{{ form.deviceName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">位置</template>
{{ form.subPlace }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">记录时间</template>
{{ form.createTime }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" title="健康信息" :column="3" size="small" border>
<el-descriptions-item>
<template slot="label">性别</template>
{{ form.sex }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">年纪</template>
{{ form.age }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">身高</template>
{{ form.height }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">体重</template>
{{ form.weight }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">bmi值</template>
{{ form.bmi }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">体脂</template>
{{ form.bodyFat }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">肌肉含量</template>
{{ form.muscle }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">骨骼质量</template>
{{ form.boneMass }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">含水量</template>
{{ form.waterContent }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">细胞外液</template>
{{ form.extwater }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">蛋白质含量</template>
{{ form.protein }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">新陈代谢度</template>
{{ form.metabolism }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">脂肪水平</template>
{{ form.fatLevel }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">身体年龄</template>
{{ form.bodyAge }}
</el-descriptions-item>
</el-descriptions>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel"> </el-button>
</div>
</el-dialog>
<el-table v-loading="loading" :data="tableListData" height="800" ref="multipleTable">
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" >
</el-table-column>
<el-table-column label="用户手机号" align="center" prop="mobile" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="位置信息" align="center" prop="placeFullName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="饮食医嘱" align="center" prop="doctorAdvice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.doctorAdvice==1">禁食</span>
<span v-if="scope.row.doctorAdvice==2">流食</span>
<span v-if="scope.row.doctorAdvice==3">半流食</span>
<span v-if="scope.row.doctorAdvice==4">治疗饮食</span>
</template>
</el-table-column>
<el-table-column label="就诊号" align="center" prop="doctorNum" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="住院号" align="center" prop="hospitalNum" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="住院日期" align="center" prop="inpatientDate" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="慢性病" align="center" prop="chronicNames" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="劳动强度" align="center" prop="labourIntensity" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.labourIntensity==1">轻劳动</span>
<span v-if="scope.row.labourIntensity==2">中等强度劳动</span>
<span v-if="scope.row.labourIntensity==3">重强度劳动</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框 -->
<el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
<el-form ref="form" :model="form" label-width="90px">
<el-row justify="center">
<table align="center" width="80%" cellspacing="0">
<tr >
<td colspan="4" class="table-title">个人信息</td>
</tr>
<tr >
<td class="table-label"><i class="text-red">*</i> <span >用户姓名</span></td>
<td class="table-content"><span >{{form.nickName}}</span></td>
<td class="table-label"><i class="text-red">*</i> <span >用户编号</span></td>
<td class="table-content"><span >{{form.userId}}</span></td>
</tr>
<tr >
<td class="table-label"><i class="text-red">*</i> <span >所属组织</span></td>
<td class="table-content"><span >{{form.orgFullName}}</span></td>
<td class="table-label"><span >用户类别</span></td>
<td class="table-content"><span >{{form.userType==1?'其它':'系统'}}</span></td>
</tr>
<tr >
<td class="table-label"><span >用户手机号</span></td>
<td class="table-content"><span >{{form.mobile}}</span></td>
<td class="table-label"><span >性别</span></td>
<td class="table-content"><span >{{form.sex==1?'男':'女'}}</span></td>
</tr>
<tr >
<td class="table-label"><span >位置信息</span></td>
<td class="table-content"><span ></span></td>
<td class="table-label"><span >出生日期</span></td>
<td class="table-content"><span >{{form.birthday}}</span></td>
</tr>
<tr >
<td colspan="4" class="table-title">健康信息</td>
</tr>
<tr >
<td class="table-label"><span >就诊号</span></td>
<td class="table-content">
<el-input
v-model="form.doctorNum"
placeholder="请输入就诊号"
maxlength="40"
show-word-limit
/>
</td>
<td class="table-label"><span >住院号</span></td>
<td class="table-content">
<el-input
v-model="form.hospitalNum"
placeholder="请输入住院号"
maxlength="40"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >身高</span></td>
<td class="table-content">
<el-input
v-model="form.height"
placeholder="请输入住身高"
maxlength="3"
show-word-limit
/>
</td>
<td class="table-label"><span >体重</span></td>
<td class="table-content">
<el-input
v-model="form.weight"
placeholder="请输入住体重"
maxlength="5"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >血型</span></td>
<td class="table-content">
<el-select v-model="form.bloodType" placeholder="请选择血型" style="width: 100%">
<el-option v-for="item in this.bloodTypeOptions"
:key="item.bloodType"
:label="item.bloodTypeName"
:value="item.bloodType"
></el-option>
</el-select>
</td>
<td class="table-label"><span >慢性病</span></td>
<td class="table-content">
<el-select v-model="form.chronicList" placeholder="请选择慢性病" @change="$forceUpdate()" multiple style="width: 100%" clearable collapse-tags>
<el-option v-for="item in chronicOptions"
:key="item.chronicId"
:label="item.chronicName"
:value="item.chronicId"
></el-option>
</el-select>
</td>
</tr>
<tr >
<td class="table-label"><span >怀孕状态</span></td>
<td class="table-content">
<el-select v-model="form.pregnantStatus" placeholder="请选择怀孕状态" style="width: 100%">
<el-option v-for="item in this.pregnantOptions"
:key="item.pregnantStatus"
:label="item.pregnantStatusName"
:value="item.pregnantStatus"
></el-option>
</el-select>
</td>
<td class="table-label"><span >怀孕日期</span></td>
<td class="table-content">
<el-date-picker
v-model="form.pregnancyDate"
type="date"
align="right"
unlink-panels
value-format="yyyy-MM-dd" style="width: 100%"
>
</el-date-picker>
</td>
</tr>
<tr >
<td class="table-label"><span >是否住院</span></td>
<td class="table-content">
<el-select v-model="form.ifHospitalized" placeholder="请选择是否住院" style="width: 100%">
<el-option v-for="item in this.ifHospitalizedOptions"
:key="item.ifHospitalized"
:label="item.ifHospitalizedName"
:value="item.ifHospitalized"
></el-option>
</el-select>
</td>
<td class="table-label"><span >住院日期</span></td>
<td class="table-content">
<el-date-picker
v-model="form.inpatientDate"
type="date"
align="right"
unlink-panels
value-format="yyyy-MM-dd" style="width: 100%"
>
</el-date-picker>
</td>
</tr>
<tr >
<td class="table-label"><span >劳动强度</span></td>
<td class="table-content">
<el-select v-model="form.labourIntensity" placeholder="请选择劳动强度" style="width: 100%">
<el-option v-for="item in this.labourIntensityOptions"
:key="item.labourIntensity"
:label="item.labourIntensityName"
:value="item.labourIntensity"
></el-option>
</el-select>
</td>
<td class="table-label"><span >过敏源</span></td>
<td class="table-content">
<el-input
v-model="form.allergen"
placeholder="请输入过敏源"
maxlength="40"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >饮食医嘱</span></td>
<td class="table-content">
<el-select v-model="form.doctorAdvice" placeholder="请选择饮食医嘱" style="width: 100%" >
<el-option v-for="item in doctorAdviceOptions"
:key="item.doctorAdvice"
:label="item.doctorAdviceName"
:value="item.doctorAdvice"
></el-option>
</el-select>
</td>
<td class="table-label"><span >体重控制目标</span></td>
<td class="table-content">
<el-select v-model="form.weightControl" placeholder="请选择" style="width: 100%" >
<el-option v-for="item in weightControlOptions"
:key="item.weightControl"
:label="item.weightControlName"
:value="item.weightControl"
></el-option>
</el-select>
</td>
</tr>
<tr >
<td class="table-label"><span >BMI(kg/)</span></td>
<td class="table-content">{{form.bmi}}</td>
<td colspan="2"></td>
</tr>
</table>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
<el-dialog :visible.sync="dialogVisible" width="700px">
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import { deptTreeSelect } from '@/api/system/user'
import { dictHealthChronicApi,getHealthSciencePageApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi,getHealthInfoDetailApi,editHealthInfoApi,delHealthInfoApi } from "@/api/healthCenter/index";
import { imgUpLoadTwo } from '@/api/system/upload'
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
<script>
import { getPhysicalListApi } from "@/api/healthCenter/index";
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
export default {
name: "",
dicts: [],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableListData: [],
title:"",
//
open: false,
dateRange:[new Date(),new Date()],
chronicOptions:[],
doctorAdviceOptions:[{"doctorAdvice":"1","doctorAdviceName":"禁食"},
{"doctorAdvice":"2","doctorAdviceName":"流食"},
{"doctorAdvice":"3","doctorAdviceName":"半流食"},
{"doctorAdvice":"4","doctorAdviceName":"治疗饮食"},
],
bloodTypeOptions:[
{"bloodType":"1","bloodTypeName":"A型"},
{"bloodType":"2","bloodTypeName":"B型"},
{"bloodType":"3","bloodTypeName":"AB型"},
{"bloodType":"4","bloodTypeName":"O型"},
{"bloodType":"5","bloodTypeName":"Rh阳型"},
{"bloodType":"6","bloodTypeName":"Rh阴型"}
],//
weightControlOptions:[
{"weightControl":"1","weightControlName":"减重"},
{"weightControl":"2","weightControlName":"增重"}
],//
ifHospitalizedOptions:[
{"ifHospitalized":"1","ifHospitalizedName":"是"},
{"ifHospitalized":"2","ifHospitalizedName":"否"}
],//
pregnantOptions:[
{"pregnantStatus":"0","pregnantStatusName":"保密"},
{"pregnantStatus":"1","pregnantStatusName":"未怀孕"},
{"pregnantStatus":"2","pregnantStatusName":"孕妇(早期)"},
{"pregnantStatus":"3","pregnantStatusName":"孕妇(中期)"},
{"pregnantStatus":"4","pregnantStatusName":"孕妇(晚期)"},
{"pregnantStatus":"5","pregnantStatusName":"乳母"}
],//怀
labourIntensityOptions:[
{"labourIntensity":"1","labourIntensityName":"轻劳动"},
{"labourIntensity":"2","labourIntensityName":"中等强度劳动"},
{"labourIntensity":"3","labourIntensityName":"重强度劳动"}
],//
//
queryParams: {
pageNum: 1,
pageSize: 10,
articleTitle: undefined,//
deptIdList:[],//
chronicList:[], //
placeIdList:[], //
doctorAdvice:[],//
articleType:null //
},
form: {
nickName:null,
userId:null,
orgFullName:null,
userType:null,
mobile:null,
sex:1,
birthday:null,
doctorNum:null,
hospitalNum:null,
height:null,
weight:null,
bloodType:null,
chronicList:[],
pregnantStatus:null,
pregnancyDate:null,
ifHospitalized:null,
inpatientDate:null,
labourIntensity:null,
allergen:null,
doctorAdvice:null,
weightControl:null,
},//
};
},
created() {
this.getDeptTree()
this.getList()
this.getChronicList()
},
computed: {
//1
uploadDisabled() {
return this.checkUrlList.length > 0
},
},
methods: {
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then((response) => {
this.deptOptions = this.filterTree(response.data)
})
},
filterTree(nodes) {
return nodes
.map((node) => {
if (node.children) {
node.children = this.filterTree(node.children)
}
return node
})
.filter((node) => node.status !== '1')
},
//
getChronicList() {
dictHealthChronicApi({}).then((response) => {
this.chronicOptions = response.data;
console.log("this.chronicOptions",this.chronicOptions)
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [new Date(),new Date()]
this.queryParams = {
pageNum: 1,
pageSize: 10,
articleTitle: "",//
deptIdList:[],
chronicList:[], //
placeIdList:[], //
doctorAdvice:[],
articleType:null //
}
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
this.loading = true;
let param = {
"pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize,
"articleTitle":this.queryParams.articleTitle,
"deptIds":this.queryParams.deptIdList.join(",")||"",
"doctorAdvices":this.queryParams.doctorAdvice.join(",")||"",
"chronicIds":this.queryParams.chronicList.join(",")||""
}
// if(this.queryParams.chronicList.length>0){
// this.queryParams.chronicIds = this.queryParams.chronicList.join(",")
// }else{
// this.queryParams.chronicIds = ""
// }
console.log("param",param);
getHealthInfoPageApi(param).then(response => {
this.tableListData = response.rows;
console.log("this.tableListData",this.tableListData);
this.tableListData.forEach(item=>{
this.$set(item,"mobile",decryptWithSM4(item.mobile))
})
this.total = Number(response.total);
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.fileList=[]
this.checkUrlList=[]
this.checkUrlNameList=[]
this.form = {
articleTitle:null,
summary:null,
chronicIdList:[],
coverPhoto:null,
articleType:1,
articleContent: null,
};
this.resetForm("form");
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增";
},
handleUpdate(row) {
this.form = Object.assign({}, row);
getHealthInfoDetailApi(this.form).then(response => {
this.form=response.data;
console.log("this.form",this.form);
this.form.chronicList=this.form.chronicIds!=null?this.form.chronicIds.split(","):[];
if(this.form.coverPhoto){
this.fileList=[{url:this.form.coverPhoto}];
this.checkUrlList=[this.form.coverPhoto];
}else{
this.fileList=[];
this.checkUrlList=[];
name: "",
dicts: [],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableListData: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
},
dialogVisible:false,//
dialogImageUrl:"",//
dateRange:this.defaultDateRange(),
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const start = new Date();
const end = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
picker.$emit('pick', [start, end]);
}
},{
text: '最近一个月',
onClick(picker) {
const start = new Date();
const end = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
},{
text: '最近三个月',
onClick(picker) {
const start = new Date();
const end = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
picker.$emit('pick', [start, end]);
}
}]
},
open:false,
title:"查看",
form:{}
};
},
created() {
this.getList();
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = this.defaultDateRange()
this.queryParams = {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
}
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
this.loading = true;
let param = {
"pageNum": this.queryParams.pageNum,
"pageSize": this.queryParams.pageSize,
"keyWord": this.queryParams.keyWord,
}
if(this.dateRange&&this.dateRange.length>0){
param.startDate=this.formatDate(this.dateRange[0])
param.endDate=this.formatDate(this.dateRange[1])
}else{
param.startDate=undefined;
param.endDate=undefined;
}
getPhysicalListApi(param).then(response => {
this.tableListData = response.rows;
this.tableListData.forEach(item=>{
if(item.phone&&item.phone!=""){
this.$set(item,"phone",decryptWithSM4(item.phone))
}
this.open = true;
this.title = "修改健康档案";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
console.log("this.form",this.form)
if(this.form.chronicList.length>0){
this.form.chronicIds = this.form.chronicList.join(",")
}else{
this.form.chronicIds = ""
}
if (this.form.userId != undefined) {
editHealthInfoApi(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
}
}
});
},
handleDelete(row) {
this.$modal.confirm('是否确认删除数据项?').then(function() {
console.log("row",row)
return delHealthInfoApi(row);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
openImg(row) {
this.dialogImageUrl = row.coverPhoto;
this.dialogVisible = true;
},
//
imgUpLoad(param, name, index) {
// console.log(param,'image')
param.type = 'canteen'
imgUpLoadTwo(param).then((res) => {
if (res.code == 200) {
this.checkUrlList.push(res.data.url)
this.checkUrlNameList.push(res.data.name)
} else {
this.$modal.msgError(res.msg)
}
})
.catch((error) => {
this.$modal.msgError(error)
})
},
handleAvatarSuccess(res, file) {
console.log('success')
},
handleRemove(file, fileList) {
let sum = 0
this.checkUrlNameList.forEach((item, index) => {
if (item == file.name) {
sum = index
}
})
this.checkUrlNameList.splice(sum, 1)
this.checkUrlList.splice(sum, 1)
},
//
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
//
formatDate(date) {
// YYYY-MM-DD
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
getDecryptWithSM4(obj){
return decryptWithSM4(obj);
},
getEncryptWithSM4(obj){
return encryptWithSM4(obj);
},
}
})
this.total = Number(response.total);
this.loading = false;
});
},
/* 手机号码脱敏 */
hidePhone(phone) {
if (!phone) return ''
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
},
handleView(row){
this.form = row;
this.open=true;
},
cancel(){
this.open = false
},
openImg(row) {
this.dialogImageUrl = row.imgUrl;
this.dialogVisible = true;
},
defaultDateRange() {
const end = new Date(new Date().toLocaleDateString());
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
const start = new Date((new Date().toLocaleDateString()));
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
this.start = parseInt(start.getTime() / 1000)
this.end = parseInt(end.getTime() / 1000)
return [start, end]
},
//
formatDate(date) {
// YYYY-MM-DD
date = new Date(date)
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
//
formatDateTime(date) {
// YYYY-MM-DD
date = new Date(date)
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
const hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
}
};
</script>
<style lang="scss" scoped>
.remind-question{
width: 100%;
height: 50px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
}
.remind-title{
width: 100%;
height: 40px;
font-size: 16px;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
justify-content: center;
}
table td, table th{
border-left: 1px solid #dfe6ec;
border-right: 1px solid #dfe6ec;
border-top: 1px solid #dfe6ec;
}
.table-title {
height: 45px;
background-color: #f8f8f9;
}
.table-label{
height: 45px;
width: 110px;
min-width: 100px;
background-color: #f8f8f9;
}
.table-content{
min-width: 250px;
}
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>

View File

@ -0,0 +1,667 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="关 键 字">
<el-input v-model="queryParams.articleTitle" placeholder="请输入用户姓名、手机号" maxlength="20" clearable style="width: 220px"/>
</el-form-item>
<el-form-item label="所属位置" prop="placeIdList">
<el-cascader v-model="queryParams.placeIdList"
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item label="所属组织" prop="deptIdList">
<el-cascader v-model="queryParams.deptIdList"
:options="deptOptions" :filterable="true" placeholder="请选择所属组织" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item label="慢性病">
<el-select v-model="queryParams.chronicList" placeholder="请选择慢性病" multiple style="width: 220px" clearable collapse-tags>
<el-option v-for="item in chronicOptions"
:key="item.chronicId"
:label="item.chronicName"
:value="item.chronicId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="饮食医嘱">
<el-select v-model="queryParams.doctorAdvice" placeholder="请选择饮食医嘱" multiple style="width: 220px" clearable collapse-tags>
<el-option v-for="item in doctorAdviceOptions"
:key="item.doctorAdvice"
:label="item.doctorAdviceName"
:value="item.doctorAdvice"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableListData" height="800" ref="multipleTable">
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" >
</el-table-column>
<el-table-column label="用户手机号" align="center" prop="mobile" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="位置信息" align="center" prop="placeFullName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="饮食医嘱" align="center" prop="doctorAdvice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.doctorAdvice==1">禁食</span>
<span v-if="scope.row.doctorAdvice==2">流食</span>
<span v-if="scope.row.doctorAdvice==3">半流食</span>
<span v-if="scope.row.doctorAdvice==4">治疗饮食</span>
</template>
</el-table-column>
<el-table-column label="就诊号" align="center" prop="doctorNum" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="住院号" align="center" prop="hospitalNum" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="住院日期" align="center" prop="inpatientDate" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="慢性病" align="center" prop="chronicNames" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="劳动强度" align="center" prop="labourIntensity" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.labourIntensity==1">轻劳动</span>
<span v-if="scope.row.labourIntensity==2">中等强度劳动</span>
<span v-if="scope.row.labourIntensity==3">重强度劳动</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框 -->
<el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
<el-form ref="form" :model="form" label-width="90px">
<el-row justify="center">
<table align="center" width="80%" cellspacing="0">
<tr >
<td colspan="4" class="table-title">个人信息</td>
</tr>
<tr >
<td class="table-label"><i class="text-red">*</i> <span >用户姓名</span></td>
<td class="table-content"><span >{{form.nickName}}</span></td>
<td class="table-label"><i class="text-red">*</i> <span >用户编号</span></td>
<td class="table-content"><span >{{form.userId}}</span></td>
</tr>
<tr >
<td class="table-label"><i class="text-red">*</i> <span >所属组织</span></td>
<td class="table-content"><span >{{form.orgFullName}}</span></td>
<td class="table-label"><span >用户类别</span></td>
<td class="table-content"><span >{{form.userType==1?'其它':'系统'}}</span></td>
</tr>
<tr >
<td class="table-label"><span >用户手机号</span></td>
<td class="table-content"><span >{{form.mobile}}</span></td>
<td class="table-label"><span >性别</span></td>
<td class="table-content"><span >{{form.sex==1?'男':'女'}}</span></td>
</tr>
<tr >
<td class="table-label"><span >位置信息</span></td>
<td class="table-content"><span ></span></td>
<td class="table-label"><span >出生日期</span></td>
<td class="table-content"><span >{{form.birthday}}</span></td>
</tr>
<tr >
<td colspan="4" class="table-title">健康信息</td>
</tr>
<tr >
<td class="table-label"><span >就诊号</span></td>
<td class="table-content">
<el-input
v-model="form.doctorNum"
placeholder="请输入就诊号"
maxlength="40"
show-word-limit
/>
</td>
<td class="table-label"><span >住院号</span></td>
<td class="table-content">
<el-input
v-model="form.hospitalNum"
placeholder="请输入住院号"
maxlength="40"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >身高</span></td>
<td class="table-content">
<el-input
v-model="form.height"
placeholder="请输入住身高"
maxlength="3"
show-word-limit
/>
</td>
<td class="table-label"><span >体重</span></td>
<td class="table-content">
<el-input
v-model="form.weight"
placeholder="请输入住体重"
maxlength="5"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >血型</span></td>
<td class="table-content">
<el-select v-model="form.bloodType" placeholder="请选择血型" style="width: 100%">
<el-option v-for="item in this.bloodTypeOptions"
:key="item.bloodType"
:label="item.bloodTypeName"
:value="item.bloodType"
></el-option>
</el-select>
</td>
<td class="table-label"><span >慢性病</span></td>
<td class="table-content">
<el-select v-model="form.chronicList" placeholder="请选择慢性病" @change="$forceUpdate()" multiple style="width: 100%" clearable collapse-tags>
<el-option v-for="item in chronicOptions"
:key="item.chronicId"
:label="item.chronicName"
:value="item.chronicId"
></el-option>
</el-select>
</td>
</tr>
<tr >
<td class="table-label"><span >怀孕状态</span></td>
<td class="table-content">
<el-select v-model="form.pregnantStatus" placeholder="请选择怀孕状态" style="width: 100%">
<el-option v-for="item in this.pregnantOptions"
:key="item.pregnantStatus"
:label="item.pregnantStatusName"
:value="item.pregnantStatus"
></el-option>
</el-select>
</td>
<td class="table-label"><span >怀孕日期</span></td>
<td class="table-content">
<el-date-picker
v-model="form.pregnancyDate"
type="date"
align="right"
unlink-panels
value-format="yyyy-MM-dd" style="width: 100%"
>
</el-date-picker>
</td>
</tr>
<tr >
<td class="table-label"><span >是否住院</span></td>
<td class="table-content">
<el-select v-model="form.ifHospitalized" placeholder="请选择是否住院" style="width: 100%">
<el-option v-for="item in this.ifHospitalizedOptions"
:key="item.ifHospitalized"
:label="item.ifHospitalizedName"
:value="item.ifHospitalized"
></el-option>
</el-select>
</td>
<td class="table-label"><span >住院日期</span></td>
<td class="table-content">
<el-date-picker
v-model="form.inpatientDate"
type="date"
align="right"
unlink-panels
value-format="yyyy-MM-dd" style="width: 100%"
>
</el-date-picker>
</td>
</tr>
<tr >
<td class="table-label"><span >劳动强度</span></td>
<td class="table-content">
<el-select v-model="form.labourIntensity" placeholder="请选择劳动强度" style="width: 100%">
<el-option v-for="item in this.labourIntensityOptions"
:key="item.labourIntensity"
:label="item.labourIntensityName"
:value="item.labourIntensity"
></el-option>
</el-select>
</td>
<td class="table-label"><span >过敏源</span></td>
<td class="table-content">
<el-input
v-model="form.allergen"
placeholder="请输入过敏源"
maxlength="40"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >饮食医嘱</span></td>
<td class="table-content">
<el-select v-model="form.doctorAdvice" placeholder="请选择饮食医嘱" style="width: 100%" >
<el-option v-for="item in doctorAdviceOptions"
:key="item.doctorAdvice"
:label="item.doctorAdviceName"
:value="item.doctorAdvice"
></el-option>
</el-select>
</td>
<td class="table-label"><span >体重控制目标</span></td>
<td class="table-content">
<el-select v-model="form.weightControl" placeholder="请选择" style="width: 100%" >
<el-option v-for="item in weightControlOptions"
:key="item.weightControl"
:label="item.weightControlName"
:value="item.weightControl"
></el-option>
</el-select>
</td>
</tr>
<tr >
<td class="table-label"><span >BMI(kg/)</span></td>
<td class="table-content">{{form.bmi}}</td>
<td colspan="2"></td>
</tr>
</table>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import { deptTreeSelect } from '@/api/system/user'
import { dictHealthChronicApi,getHealthSciencePageApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi,getHealthInfoDetailApi,editHealthInfoApi,delHealthInfoApi } from "@/api/healthCenter/index";
import { imgUpLoadTwo } from '@/api/system/upload'
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
export default {
name: "",
dicts: [],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableListData: [],
title:"",
//
open: false,
dateRange:[new Date(),new Date()],
chronicOptions:[],
doctorAdviceOptions:[{"doctorAdvice":"1","doctorAdviceName":"禁食"},
{"doctorAdvice":"2","doctorAdviceName":"流食"},
{"doctorAdvice":"3","doctorAdviceName":"半流食"},
{"doctorAdvice":"4","doctorAdviceName":"治疗饮食"},
],
bloodTypeOptions:[
{"bloodType":"1","bloodTypeName":"A型"},
{"bloodType":"2","bloodTypeName":"B型"},
{"bloodType":"3","bloodTypeName":"AB型"},
{"bloodType":"4","bloodTypeName":"O型"},
{"bloodType":"5","bloodTypeName":"Rh阳型"},
{"bloodType":"6","bloodTypeName":"Rh阴型"}
],//
weightControlOptions:[
{"weightControl":"1","weightControlName":"减重"},
{"weightControl":"2","weightControlName":"增重"}
],//
ifHospitalizedOptions:[
{"ifHospitalized":"1","ifHospitalizedName":"是"},
{"ifHospitalized":"2","ifHospitalizedName":"否"}
],//
pregnantOptions:[
{"pregnantStatus":"0","pregnantStatusName":"保密"},
{"pregnantStatus":"1","pregnantStatusName":"未怀孕"},
{"pregnantStatus":"2","pregnantStatusName":"孕妇(早期)"},
{"pregnantStatus":"3","pregnantStatusName":"孕妇(中期)"},
{"pregnantStatus":"4","pregnantStatusName":"孕妇(晚期)"},
{"pregnantStatus":"5","pregnantStatusName":"乳母"}
],//怀
labourIntensityOptions:[
{"labourIntensity":"1","labourIntensityName":"轻劳动"},
{"labourIntensity":"2","labourIntensityName":"中等强度劳动"},
{"labourIntensity":"3","labourIntensityName":"重强度劳动"}
],//
//
queryParams: {
pageNum: 1,
pageSize: 10,
articleTitle: undefined,//
deptIdList:[],//
chronicList:[], //
placeIdList:[], //
doctorAdvice:[],//
articleType:null //
},
form: {
nickName:null,
userId:null,
orgFullName:null,
userType:null,
mobile:null,
sex:1,
birthday:null,
doctorNum:null,
hospitalNum:null,
height:null,
weight:null,
bloodType:null,
chronicList:[],
pregnantStatus:null,
pregnancyDate:null,
ifHospitalized:null,
inpatientDate:null,
labourIntensity:null,
allergen:null,
doctorAdvice:null,
weightControl:null,
},//
};
},
created() {
this.getDeptTree()
this.getList()
this.getChronicList()
},
computed: {
//1
uploadDisabled() {
return this.checkUrlList.length > 0
},
},
methods: {
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then((response) => {
this.deptOptions = this.filterTree(response.data)
})
},
filterTree(nodes) {
return nodes
.map((node) => {
if (node.children) {
node.children = this.filterTree(node.children)
}
return node
})
.filter((node) => node.status !== '1')
},
//
getChronicList() {
dictHealthChronicApi({}).then((response) => {
this.chronicOptions = response.data;
console.log("this.chronicOptions",this.chronicOptions)
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [new Date(),new Date()]
this.queryParams = {
pageNum: 1,
pageSize: 10,
articleTitle: "",//
deptIdList:[],
chronicList:[], //
placeIdList:[], //
doctorAdvice:[],
articleType:null //
}
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
this.loading = true;
let param = {
"pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize,
"articleTitle":this.queryParams.articleTitle,
"deptIds":this.queryParams.deptIdList.join(",")||"",
"doctorAdvices":this.queryParams.doctorAdvice.join(",")||"",
"chronicIds":this.queryParams.chronicList.join(",")||""
}
// if(this.queryParams.chronicList.length>0){
// this.queryParams.chronicIds = this.queryParams.chronicList.join(",")
// }else{
// this.queryParams.chronicIds = ""
// }
console.log("param",param);
getHealthInfoPageApi(param).then(response => {
this.tableListData = response.rows;
console.log("this.tableListData",this.tableListData);
this.tableListData.forEach(item=>{
this.$set(item,"mobile",decryptWithSM4(item.mobile))
})
this.total = Number(response.total);
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.fileList=[]
this.checkUrlList=[]
this.checkUrlNameList=[]
this.form = {
articleTitle:null,
summary:null,
chronicIdList:[],
coverPhoto:null,
articleType:1,
articleContent: null,
};
this.resetForm("form");
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增";
},
handleUpdate(row) {
this.form = Object.assign({}, row);
getHealthInfoDetailApi(this.form).then(response => {
this.form=response.data;
console.log("this.form",this.form);
this.form.chronicList=this.form.chronicIds!=null?this.form.chronicIds.split(","):[];
if(this.form.coverPhoto){
this.fileList=[{url:this.form.coverPhoto}];
this.checkUrlList=[this.form.coverPhoto];
}else{
this.fileList=[];
this.checkUrlList=[];
}
this.open = true;
this.title = "修改健康档案";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
console.log("this.form",this.form)
if(this.form.chronicList.length>0){
this.form.chronicIds = this.form.chronicList.join(",")
}else{
this.form.chronicIds = ""
}
if (this.form.userId != undefined) {
editHealthInfoApi(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
}
}
});
},
handleDelete(row) {
this.$modal.confirm('是否确认删除数据项?').then(function() {
console.log("row",row)
return delHealthInfoApi(row);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
openImg(row) {
this.dialogImageUrl = row.coverPhoto;
this.dialogVisible = true;
},
//
imgUpLoad(param, name, index) {
// console.log(param,'image')
param.type = 'canteen'
imgUpLoadTwo(param).then((res) => {
if (res.code == 200) {
this.checkUrlList.push(res.data.url)
this.checkUrlNameList.push(res.data.name)
} else {
this.$modal.msgError(res.msg)
}
})
.catch((error) => {
this.$modal.msgError(error)
})
},
handleAvatarSuccess(res, file) {
console.log('success')
},
handleRemove(file, fileList) {
let sum = 0
this.checkUrlNameList.forEach((item, index) => {
if (item == file.name) {
sum = index
}
})
this.checkUrlNameList.splice(sum, 1)
this.checkUrlList.splice(sum, 1)
},
//
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
//
formatDate(date) {
// YYYY-MM-DD
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
getDecryptWithSM4(obj){
return decryptWithSM4(obj);
},
getEncryptWithSM4(obj){
return encryptWithSM4(obj);
},
}
};
</script>
<style lang="scss" scoped>
.remind-question{
width: 100%;
height: 50px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
}
.remind-title{
width: 100%;
height: 40px;
font-size: 16px;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
justify-content: center;
}
table td, table th{
border-left: 1px solid #dfe6ec;
border-right: 1px solid #dfe6ec;
border-top: 1px solid #dfe6ec;
}
.table-title {
height: 45px;
background-color: #f8f8f9;
}
.table-label{
height: 45px;
width: 110px;
min-width: 100px;
background-color: #f8f8f9;
}
.table-content{
min-width: 250px;
}
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>

View File

@ -2,7 +2,7 @@
<div class="app-container">
<div style="width: 100%;overflow-y: auto;">
<el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
<el-tab-pane :label="item.label" :name="item.key" v-for="(item,index) in deviceTypeList" :key="index"></el-tab-pane>
<el-tab-pane :label="item.deviceTypeName" :name="item.deviceType" v-for="(item,index) in deviceTypeList" :key="index"></el-tab-pane>
</el-tabs>
</div>
@ -160,13 +160,14 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="activeName==1||activeName==3">
<el-form-item label="设备通道号:" prop="channel">
<el-input v-model="form.channel"
placeholder="请输入设备通道号"
maxlength="30" @input="(v)=>(form.channel=v.replace(/[^\d]/g,''))"
/>
</el-form-item>
<!-- 摄像头硬盘录像机通道号从33开始D1=33D2=34 -->
</el-col>
<!-- <el-col :span="12">
@ -348,13 +349,7 @@ export default {
//
getKitchenDeviceType(){
getKitchenDeviceTypeApi({}).then((response) => {
let obj = response.data
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
console.log(`Key: ${key}, Value: ${obj[key]}`);
this.deviceTypeList.push({"key":key,"label":obj[key]})
}
}
this.deviceTypeList = response.data;
})
},
//

View File

@ -8,9 +8,9 @@
<el-select v-model="queryParams.deviceType" style="width: 100%;" placeholder="请选择设备类型">
<el-option
v-for="item in deviceTypeList"
:key="item.key"
:label="item.label"
:value="item.key"
:key="item.deviceType"
:label="item.deviceTypeName"
:value="item.deviceType"
></el-option>
</el-select>
</el-form-item>
@ -95,13 +95,7 @@ export default {
//
getKitchenDeviceType(){
getKitchenDeviceTypeApi({}).then((response) => {
let obj = response.data
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
console.log(`Key: ${key}, Value: ${obj[key]}`);
this.deviceTypeList.push({"key":key,"label":obj[key]})
}
}
this.deviceTypeList = response.data
})
},
/** 搜索按钮操作 */

View File

@ -1181,7 +1181,7 @@ export default {
// });
},
goList(){
this.$router.push({ path: "/kitchen/environment/alarmRecord",query: {activeName:6}});
this.$router.push({ path: "/kitchen/violation/cameraRecord"});
},
goList2(){
this.$router.push({ path: "/kitchen/environment/alarmRecord",query: {activeName:5}});