| | |
| | | <div class="dietarySurvey-home" > |
| | | <el-row 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> |
| | | <el-form-item label="填报日期"> |
| | | <el-date-picker |
| | | v-model="state.formInline.date" |
| | |
| | | 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)"> |
| | |
| | | </div> |
| | | <el-empty v-if="!patientsInfo.id" description="无数据,请先选择患者"></el-empty> |
| | | <editDietary @shuaxin="onSubmit" ref="editDietaryRef"></editDietary> |
| | | <editDietary2 @shuaxin="onSubmit" ref="editDietaryRef2"></editDietary2> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | 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'; |
| | |
| | | const { patientsInfo } = storeToRefs(storesPat); |
| | | const props = defineProps(['tableHeight']) |
| | | const editDietaryRef=ref() |
| | | const editDietaryRef2=ref() |
| | | const router = useRouter() |
| | | const shortcuts = [ |
| | | { |
| | |
| | | loading: false, |
| | | formInline:{ |
| | | user: '', |
| | | formTableName:'', |
| | | date: [], |
| | | }, |
| | | dialogTableVisible:false |
| | |
| | | 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, |
| | | text: 'Loading', |
| | |
| | | }) |
| | | } |
| | | const addItem=()=>{ |
| | | |
| | | if(state.formInline.formTableName){ |
| | | if(state.formInline.formTableName==='膳食调查表'){ |
| | | editDietaryRef.value.openShow('add') |
| | | }else if(state.formInline.formTableName==='营养膳食调查表'){ |
| | | editDietaryRef2.value.openShow('add') |
| | | } |
| | | }else{ |
| | | ElMessage.warning('请先选择你要添加的表单名称!') |
| | | } |
| | | // router.push({path:'/tiaochabiao1',query:{type:'add',id:0}}) |
| | | } |
| | | // 第一步:定义子组件里面的方法 |
| | |
| | | } |
| | | 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) |
| | | if(state.formInline.formTableName){ |
| | | if(state.formInline.formTableName==='膳食调查表'){ |
| | | editDietaryRef.value.openShow('update',row) |
| | | }else if(state.formInline.formTableName==='营养膳食调查表'){ |
| | | editDietaryRef2.value.openShow('update',row) |
| | | } |
| | | } |
| | | // editDietaryRef.value.openShow('update',row) |
| | | } |
| | | const handleDelete = (index: number, row: any) => { |
| | | console.log(index, row) |