| | |
| | | <template> |
| | | <div class="dietarySurvey-home" > |
| | | <el-row style="padding-left: 10px;"> |
| | | <el-row v-if="patientsInfo.id" style="padding-left: 10px;"> |
| | | <el-form size="small" :inline="true" :model="state.formInline"> |
| | | <!-- <el-form-item label="填报人"> |
| | | <!-- <el-form-item label="调差表"> |
| | | <el-select style="width: 120px;" |
| | | v-model="state.formInline.user" |
| | | placeholder="Activity zone" |
| | | v-model="state.formInline.formTableName" |
| | | placeholder="不选默认查全部" |
| | | clearable |
| | | > |
| | | <el-option label="Zone one" value="shanghai" /> |
| | | <el-option label="Zone two" value="beijing" /> |
| | | <el-option label="膳食生活调查表" value="膳食生活调查表" /> |
| | | <el-option label="膳食调查表" value="膳食调查表" /> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item label="填报日期"> |
| | |
| | | format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | <!-- <el-date-picker style="width: 120px;" |
| | | v-model="state.formInline.date" |
| | | type="date" |
| | | placeholder="Pick a date" |
| | | clearable |
| | | /> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmit">查询</el-button> |
| | |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | <el-table-column prop="surveryTime" label="填表时间" show-overflow-tooltip /> |
| | | <el-table-column prop="surveryTime" label="填表时间" show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{scope.row.surveryTime?.substring(0,11)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="surveryTime" label="调查表名称" show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{scope.row.suveryFormName}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="surveryPersonName" label="填表人" show-overflow-tooltip /> |
| | | <el-table-column prop="updateTime" label="更新时间" show-overflow-tooltip /> |
| | | <!-- <el-table-column prop="updateTime" label="更新时间" show-overflow-tooltip /> --> |
| | | <el-table-column label="操作" > |
| | | <template #default="scope"> |
| | | <el-button size="small" @click="handleEdit(scope.$index, scope.row)"> |
| | |
| | | import { usePatientsInfo } from '/@/stores/patientsInfo'; |
| | | import {list,tiaochabiaoInfo,deleteId} from '/@/api/tiaochabiao/index' |
| | | import { computed, reactive, ref } from 'vue'; |
| | | import ItemTable from './dietaryDtaile.vue' |
| | | import editDietary2 from './editDietary2.vue' |
| | | import editDietary from './editDietary.vue' |
| | | import { useRoute,useRouter } from 'vue-router'; |
| | | import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'; |
| | |
| | | loading: false, |
| | | formInline:{ |
| | | user: '', |
| | | formTableName:'膳食生活调查表', |
| | | date: [], |
| | | }, |
| | | dialogTableVisible:false |
| | |
| | | const pasm={ |
| | | page: state.page, |
| | | size: state.size, |
| | | wherecondition: `patient_code = '${patientsInfo.value.code}'`, |
| | | wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}'`, |
| | | ordercondition: 'survery_time desc' |
| | | } |
| | | if(state.formInline.date.length===2){ |
| | | if(state.formInline?.date?.length===2){ |
| | | pasm.wherecondition+=` and survery_time BETWEEN '${state.formInline.date[0]} 00:00:00' AND '${state.formInline.date[1]} 23:59:59'` |
| | | } |
| | | if(state.formInline?.formTableName){ |
| | | pasm.wherecondition+=`and suvery_form_name='${state.formInline.formTableName}'` |
| | | } |
| | | const loading = ElLoading.service({ |
| | | lock: true, |
| | |
| | | }) |
| | | } |
| | | const addItem=()=>{ |
| | | |
| | | editDietaryRef.value.openShow('add') |
| | | // router.push({path:'/tiaochabiao1',query:{type:'add',id:0}}) |
| | | } |
| | |
| | | const pasm = { |
| | | page: 1, |
| | | size: 10, |
| | | wherecondition:`patient_code='${patientsInfo.value.code}'`, |
| | | wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}'`, |
| | | ordercondition:'survery_time DESC' |
| | | } |
| | | if(state.formInline.date.length===2){ |
| | | if(state.formInline?.date?.length===2){ |
| | | pasm.wherecondition+=`and survery_time BETWEEN '${state.formInline.date[0]} 00:00:00' AND '${state.formInline.date[1]} 23:59:59'` |
| | | } |
| | | if(state.formInline.formTableName){ |
| | | pasm.wherecondition+=`and suvery_form_name='${state.formInline.formTableName}'` |
| | | } |
| | | const loading = ElLoading.service({ |
| | | lock: true, |
| | |
| | | * 编辑 |
| | | */ |
| | | const handleEdit = (index: number, row: any) => { |
| | | console.log(index, row) |
| | | console.log(index, row,state.formInline.formTableName) |
| | | editDietaryRef.value.openShow('update',row) |
| | | } |
| | | const handleDelete = (index: number, row: any) => { |