From 7fc578dc2032fac935267e92208f7f11384e3800 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期四, 28 十一月 2024 08:36:36 +0800 Subject: [PATCH] 修改了相关bug --- ruoyi-ui/src/views/healthy/index.vue | 1783 ++++++++++++++++++++++------------------------------------ 1 files changed, 677 insertions(+), 1,106 deletions(-) diff --git a/ruoyi-ui/src/views/healthy/index.vue b/ruoyi-ui/src/views/healthy/index.vue index 3ad0155..c4a7f37 100644 --- a/ruoyi-ui/src/views/healthy/index.vue +++ b/ruoyi-ui/src/views/healthy/index.vue @@ -1,523 +1,364 @@ <template> - <div class="app-container" id="printable-content"> - <!-- 鍥炲埌椤堕儴--> - <el-backtop :bottom="150" :right="30"> - <el-button type="primary" circle - class="el-icon-top" - ></el-button> - </el-backtop> - <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;"> - <span>鐜扮姸鍋ュ悍鎯呭喌</span> - <div style="display: flex; align-items: center;"> - <el-button size="mini" type="text" @click="toYearhealthy" v-hasPermi="['person:healthy:healthYear']"> - <div class="form" ><el-icon style="padding-right:110px;"></el-icon> - <span class="text" style="width: 69px;height: 26px;font-size: 16px; padding-left: 10px; - font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">骞村害鍋ュ悍鎯呭喌</span></div> + <div class="app-container" style="opacity: 1;"> + + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> + + <el-form-item label="鐪嬬梾鏃堕棿" prop="checkTime"> + <el-date-picker + v-model="dateRange" + style="width: 240px; + height: 35px; + border-radius: 16px 16px 16px 16px; + opacity: 0.5;" + value-format="yyyy-MM-dd" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + ></el-date-picker> + </el-form-item> + <el-form-item label="鏁戠梾鍖婚櫌" prop="hospital" > + <el-input + v-model="queryParams.hospital" + placeholder="璇疯緭鍏ユ晳鐥呭尰闄�" + clearable + style="width: 200px; + height: 35px; + border-radius: 16px 16px 16px 16px; + opacity: 0.5;" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + + + <el-form-item label="棰樺悕" prop="title"> + <el-input + v-model="queryParams.title" + placeholder="璇疯緭鍏ラ鍚�" + clearable + style="width: 200px; + height: 35px; + border-radius: 16px 16px 16px 16px; + opacity: 0.5;" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + + + + <el-form-item> + <el-button size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3;border-radius:6px 6px 6px 6px;opacity:1;">鎼滅储</el-button> + <el-button size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; border-radius:6px 6px 6px 6px;opacity: 1;">閲嶇疆</el-button> + </el-form-item> + </el-form> + + <el-row :gutter="10" class="mb8" v-if="userId != 2"> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-plus" + size="mini" + @click="handleAdd" + v-hasPermi="['system:role:add']" + >鏂板</el-button> + </el-col> + + <el-col :span="1.5"> + <el-button + type="danger" + plain + icon="el-icon-delete" + size="mini" + :disabled="multiple" + @click="handleDelete" + v-hasPermi="['system:role:remove']" + >鍒犻櫎</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + @click="handleExport" + v-hasPermi="['family:note:export']" + >瀵煎嚭</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + @click="handleExportTemplate" + v-hasPermi="['family:note:export']" + >瀵煎叆妯℃澘涓嬭浇</el-button> + </el-col> + <el-col :span="1.2"> + <el-upload + action="" + class="upload-demo" + :show-file-list="false" + :http-request="handleEnport" + > + <el-button size="mini" type="primary" + plain + icon="el-icon-top">瀵煎叆</el-button> + + </el-upload> + + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + <el-col></el-col> + <el-col> +<el-button size="mini" type="text" @click="toYearhealthy" v-hasPermi="['person:healthy:healthYear']"> + <div class="form1" ><el-icon style="padding-right:100px;"></el-icon> + <span class="text" style="width: 69px;height: 26px;font-size: 16px; + font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">鍋ュ悍鎯呭喌</span></div> + </el-button> + + <el-button size="mini" type="text" @click="toExamination" v-hasPermi="['person:healthy:healthYear']"> + <div class="form2" ><el-icon style="padding-right:50px;"></el-icon> + <span class="text" style="width: 69px;height: 26px;font-size: 16px;margin-right: 20px; + font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">鍘嗗勾浣撴鎯呭喌</span></div> </el-button> - </div> - </h1> + </el-col> + </el-row> - <el-divider /> + <el-table v-loading="loading" :data="healthList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> + + <el-table-column label="鐪嬬梾鏃堕棿" prop="checkTime" sortable width="200" align="center"> + <template slot-scope="scope">{{scope.row.checkTime? scope.row.checkTime: '鈥斺�斺�斺��'}}</template> + </el-table-column> + + <el-table-column label="鏁戠梾鍖婚櫌" prop="hospital" sortable width="120" > + + </el-table-column> + <el-table-column label="棰樺悕" prop="title" sortable width="150" /> + <el-table-column label="娉ㄦ剰浜嬮」" prop="notice" sortable width="150" /> + <el-table-column label="鐢靛瓙鏂囦欢" prop="url" align="center" sortable width="150" > + <template slot-scope="scope" > + <div> + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceLis.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="!(scope.row.url === '' || scope.row.url === ',' || scope.row.url === null)" + > + <img + v-else + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceA.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + + ></div> + </template> + </el-table-column> - <h2 style="font-size:21px">鍩烘湰鎯呭喌</h2> - <el-container> - <div style="padding-left:0px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="濮撳悕" prop="name" label-width="40px"> - <el-input v-model="HealthyBaseList.name " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鑱屼笟" prop="work" label-width="40px"> - <el-input v-model="HealthyBaseList.work" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="浣忓潃" prop="address" label-width="40px"> - <el-input v-model="HealthyBaseList.address" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> + <el-table-column label="澶囨敞" prop="remark" sortable width="120" > + <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template> + </el-table-column> + <el-table-column label="鎿嶄綔" align="center" width="250" class-name="small-padding fixed-width" v-if="userId != 2"> + <template slot-scope="scope" v-if="scope.row.roleId !== 1"> + <div class="button-container"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(scope.row)" + v-hasPermi="['familymodel:economy:info']" + >淇敼</el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['system:role:remove']" + >鍒犻櫎</el-button> + <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:bignote:list']"> + <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button> - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:150px"> - <el-container> - <el-col v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> + </el-dropdown> + </div> + </template> + </el-table-column> + </el-table> - <el-form-item label="鎬у埆" prop="sex" label-width="40px"> - <template v-if="!isEditing"> - <el-input v-model="HealthyBaseList.sex === '鐢�' ? sinds='鐢�':sinds='濂�'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> - </template> - <template v-else> - <el-select v-model="sinds" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" :disabled="dsb"> - <el-option label="鐢�" value='鐢�'></el-option> - <el-option label="濂�" value='濂�'></el-option> - </el-select> - </template> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鐢佃瘽" prop="phone" label-width="40px"> - <el-input v-model="HealthyBaseList.phone " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + style="background: #FEF7FC;" + /> - </el-form> - </el-col> - </el-container> - </div> - - <div style="padding-left:150px"> - <el-container> - <el-col v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> - <el-form-item label="鏂囧寲绋嬪害" prop="educationLevel" label-width="70px"> - <el-input v-model="HealthyBaseList.educationLevel " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鐢靛瓙閭欢" prop="email" label-width="70px"> - <el-input v-model="HealthyBaseList.email" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> + <el-dialog :title="title" @click.native="handleDialogClick" :visible.sync="open" width="800px" append-to-body> + <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px"> - <div style="padding-left:400px;padding-top:30px" > - <el-container > + <el-form-item label="鍙戠敓鏃堕棿" prop="checkTime"> + <el-date-picker v-model="formDat.checkTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" + @click.native.stop + ref="datePicker" + :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd" + ></el-date-picker> + </el-form-item> - <el-row :gutter="10" class="mb8"> - <el-col > - <el-button - plain - @click="handleEdit()" - style="width: 80px;height: 32px;background: #E0EEFE;" - v-if="isShow" - v-hasPermi="['system:role:edit']" - >缂栬緫</el-button> - <el-button v-if="isShow_2" style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">瀹屾垚</el-button> - <br> - - </el-col> - - <el-col style="padding-top: 10px;"> - <el-button - plain - style="width: 80px;height: 32px;background: #D2F3E0;" - @click="handleExport" - v-hasPermi="['family:note:export']" - >瀵煎嚭</el-button></el-col> - - <el-col style="padding-top: 10px;"> - <el-button - plain - style="width: 80px;height: 32px;background: #FFDDE3;" - v-print="'#printable-content'" - v-hasPermi="['family:note:export']" - >鎵撳嵃</el-button></el-col> + <el-form-item label="鏁戠梾鍖婚櫌" prop="hospital"> + <el-input v-model="formDat.hospital" placeholder="璇疯緭鍏ユ晳鐥呭尰闄�" clearable :style="{width: '100%'}" > + </el-input> + </el-form-item> + <el-form-item label="棰樺悕" prop="title"> + <el-input v-model="formDat.title" placeholder="璇疯緭鍏ラ鍚�" clearable :style="{width: '100%'}" > + </el-input> + </el-form-item> + <el-form-item label="娉ㄦ剰浜嬮」" prop="notice"> + <el-input v-model="formDat.notice" placeholder="璇疯緭鍏ユ敞鎰忎簨椤�" clearable :style="{width: '100%'}" > + </el-input> + </el-form-item> - </el-row> + <el-form-item label="澶囨敞" prop="remark"> + <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input> + </el-form-item> - </el-container> - </div> - <!-- </el-dialog> self:user:export--> - </el-container> - <div> - <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="HealthyBaseList" > + <h4 class="form-header">鐩稿叧鍥剧墖 </h4> + <el-upload + action="#" + list-type="picture-card" - <el-row :span="16"> - <el-form-item label="琛�鍨�:" prop="bloodClass" label-width="70px"> - <el-radio-group v-model="HealthyBaseList.bloodClass"> - <el-radio v-for="(option, index) in typeOptions" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> + multiple + :http-request="requestUpload" + :file-list="fileList" + :on-change="handleChange" + :auto-upload="false" + ref="upload" + > + <i slot="default" class="el-icon-plus"></i> + <div slot="file" slot-scope="{file}"> + <img + class="el-upload-list__item-thumbnail" + :src="file.url" + + alt="" + style="width: 126px; height: 126px" + fit="cover" + :preview-src-list="[file.url]" + > + <span class="el-upload-list__item-actions"> + <span + class="el-upload-list__item-preview" + @click="handlePictureCardPreview(file)" + > + <i class="el-icon-zoom-in"></i> + </span> + + <span + v-if="!disabled" + class="el-upload-list__item-delete" + @click="handleRemove(file)" + > + <i class="el-icon-delete"></i> + </span> + </span> + + + </div> + </el-upload> + <el-button + style="margin-left: 10px" + size="small" + type="success" + + @click="picUpload" + >涓婁紶鍒版湇鍔″櫒</el-button> + <h4 class="form-header">鍏朵粬闄勪欢 </h4> + <el-upload + action="" + :file-list="fileListOther" + class="upload-demo" + multiple + + :on-remove="handleRemoveFile" + :show-file-list="true" + ref="upload1" + :on-change="handleChange1" + :auto-upload="false" + list-type="picture-card" + :http-request="requestUpload1" + > + + + + <i slot="default" class="el-icon-plus"></i> + <div slot="file" slot-scope="{file}"> + <!-- 娣诲姞video鍏冪礌鐢ㄤ簬鏄剧ず瑙嗛 --> + <video + v-if="file.url.includes('.mp4')" + class="el-upload-list__item-thumbnail" + :src="file.url" + style="width: 147px; height: 147px" + fit="cover" + ></video> + <img v-else + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceLis.png" + alt="" + style="width: 100%; height: 100%" + fit="cover"></img> + + <span class="el-upload-list__item-actions"> + <span class="el-upload-list__item-name">{{ file.name }}</span> + <span + class="el-upload-list__item-preview" + @click="handleFileCardPreview(file)" + > + <i class="el-icon-zoom-in"></i> + </span> + + <span + + class="el-upload-list__item-delete" + @click="handleRemoveFile(file)" + > + <i class="el-icon-delete"></i> + </span> + </span> + + </div> + + + </el-upload> + <el-button + style="margin-left: 10px" + size="small" + type="success" + @click="fileUpload" + >涓婁紶鍒版湇鍔″櫒</el-button> </el-form> - </div> - <el-container> - <div > - <el-container > - <el-col > - <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="杩囨晱鍙诧細" prop="allergyClass" label-width="70px"> - <el-radio-group v-model="HealthyBaseList.allergyClass"> - <el-radio v-for="(option, index) in typeOptions1" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="甯哥敤鑽墿" prop="medicine" label-width="70px"> - <el-input v-model="HealthyBaseList.medicine" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> + <h4 class="form-header"> </h4> + + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitDataScope">纭� 瀹�</el-button> + <el-button @click="cancelData">鍙� 娑�</el-button> </div> + </el-dialog> - <div style="padding-left: 130px;"> - <el-container > - <el-col > - <el-form ref="elForm" :model="HealthyBaseList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="HealthyBaseList" @selection-change="handleSelectionChange" > - <el-row :span="20"> - <el-form-item label="閬椾紶鐥呭彶:" prop="geneticDiseaseClass" label-width="80px"> - <el-radio-group v-model="HealthyBaseList.geneticDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions2" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="20"> - <el-form-item label="鐩墠鍩虹鐥�" prop="baseDisease" label-width="90px"> - <el-input v-model="HealthyBaseList.baseDisease" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - </el-container> + <!-- 鍒嗛厤瑙掕壊鏁版嵁鏉冮檺瀵硅瘽妗� --> + <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body> - <h2 style="font-size:21px">鐢熸椿涔犳儻</h2> - <el-container> - <div style="padding-left:0px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="楗(鍠�)" prop="eatGood" label-width="70px"> - <el-input v-model="LiveHabbitList.eatGood " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鐖卞ソ" prop="hobby" label-width="40px"> - <el-input v-model="LiveHabbitList.hobby" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - - - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:150px"> - <el-container> - <el-col v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> - - <el-form-item label="楗(蹇�)" prop="eatBad" label-width="70px"> - <el-input v-model="LiveHabbitList.eatBad " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍡滃ソ" prop="addition" label-width="40px"> - <el-input v-model="LiveHabbitList.addition " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - - </el-form> - </el-col> - </el-container> - </div> - </el-container> - <div> - <el-container > - <el-col > - <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="鐫$湢:" prop="sleepClass" label-width="80px"> - <el-radio-group v-model="LiveHabbitList.sleepClass"> - <el-radio v-for="(option, index) in typeOptions3" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - <el-container> - <div style="padding-left:0px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="澶т究" prop="stool" label-width="40px"> - <el-input v-model="LiveHabbitList.stool" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="灏忎究" prop="urine" label-width="40px"> - <el-input v-model="LiveHabbitList.urine" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:170px"> - <el-container> - <el-col v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16" > - <el-form-item label="澶т究瑙勫緥" prop="stoolStatusClass" label-width="70px"> - <el-radio-group v-model="LiveHabbitList.stoolStatusClass"> - <el-radio v-for="(option, index) in typeOptions4" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="灏忎究瑙勫緥" prop="urineStatusClass" label-width="70px"> - <el-radio-group v-model="LiveHabbitList.urineStatusClass"> - <el-radio v-for="(option, index) in typeOptions5" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - </el-container> - <el-container> - <div> - <el-container > - <el-col > - <el-form ref="elForm" :model="LiveHabbitList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="LiveHabbitList" @selection-change="handleSelectionChange" > - - <el-row :span="16"> - <el-form-item label="楗涔犳儻" prop="eatingHabitsClass" label-width="70px"> - <el-radio-group v-model="LiveHabbitList.eatingHabitsClass"> - <el-radio v-for="(option, index) in typeOptions6" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鐢熸椿浜嬩欢" prop="lifeEventClass" label-width="70px"> - <el-radio-group v-model="LiveHabbitList.lifeEventClass"> - <el-radio v-for="(option, index) in typeOptions7" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - </el-container> - - - <h2 style="font-size:21px">鎶ょ悊鏌ヤ綋</h2> - <el-container> - <div style="padding-left:0px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="浣撴俯" prop="temperature" label-width="40px"> - <el-input v-model="HealthHuliList.temperature " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="琛�鍘�" prop="bloodPressure" label-width="40px"> - <el-input v-model="HealthHuliList.bloodPressure" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - - - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:150px"> - <el-container> - <el-col v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> - - <el-form-item label="鑴夋悘" prop="pulse" label-width="40px"> - <el-input v-model="HealthHuliList.pulse " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="浣撻噸" prop="weight" label-width="40px"> - <el-input v-model="HealthHuliList.weight " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:150px"> - <el-container> - <el-col v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> - - <el-form-item label="鍛煎惛" prop="breathe" label-width="40px"> - <el-input v-model="HealthHuliList.breathe " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍥涜偄娲诲姩" prop="movement" label-width="70px"> - <el-input v-model="HealthHuliList.movement " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - - </el-form> - </el-col> - </el-container> - </div> - </el-container> - <el-container> - <div> - <el-container > - <el-col > - <el-form ref="elForm" :model="HealthHuliList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="HealthHuliList" @selection-change="handleSelectionChange" > - - <el-row :span="16"> - <el-form-item label="鐨偆绮樿啘" prop="skinTypeClass" label-width="70px"> - <el-radio-group v-model="HealthHuliList.skinTypeClass"> - <el-radio v-for="(option, index) in typeOptions8" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="蹇冪悊鐘舵��" prop="psychologyTypeClass" label-width="70px"> - <el-radio-group v-model="HealthHuliList.psychologyTypeClass"> - <el-radio v-for="(option, index) in typeOptions9" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鐥呯悊鎬佸害" prop="attitudeClass" label-width="70px"> - <el-radio-group v-model="HealthHuliList.eatingHabitsClass"> - <el-radio v-for="(option, index) in typeOptions10" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍏ㄨ韩钀ュ吇鎯呭喌" prop="nutritionClass" label-width="100px"> - <el-radio-group v-model="HealthHuliList.eatingHabitsClass"> - <el-radio v-for="(option, index) in typeOptions11" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - </el-container> - - - <h2 style="font-size:21px">鐜板瓨鍋ュ悍闂</h2> - - <el-container> - <div> - <el-container > - <el-col > - <el-form ref="elForm" :model="HealthNowList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="HealthNowList" @selection-change="handleSelectionChange" > - - <el-row :span="16"> - <el-form-item label="鑴戣绠$柧鐥�" prop="brainDiseaseClass" label-width="100px"> - <el-radio-group v-model="HealthNowList.brainDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions12" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="蹇冭剰鐤剧梾" prop="heartDiseaseClass" label-width="70px"> - <el-radio-group v-model="HealthNowList.heartDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions13" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="琛�绠$柧鐥�" prop="vascularDiseaseClass" label-width="70px"> - <el-radio-group v-model="HealthNowList.vascularDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions14" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="娑堝寲绯荤粺鐤剧梾" prop="digestiveSystemDiseaseClass" label-width="100px"> - <el-radio-group v-model="HealthNowList.digestiveSystemDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions15" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍛煎惛绯荤粺鐤剧梾" prop="respiratorySystemDiseaseClass" label-width="100px"> - <el-radio-group v-model="HealthNowList.respiratorySystemDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions16" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鑲捐剰鐤剧梾" prop="kidneyDiseaseClass" label-width="100px"> - <el-radio-group v-model="HealthNowList.kidneyDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions17" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍏跺畠鐤剧梾" prop="otherDiseaseClass" label-width="100px"> - <el-radio-group v-model="HealthNowList.otherDiseaseClass"> - <el-radio v-for="(option, index) in typeOptions18" :key="index" :label="option.value" :disabled="dsb">{{ option.label }}</el-radio> - </el-radio-group> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - </el-container> + </el-dialog> </div> </template> @@ -525,22 +366,22 @@ <script> import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; -import {getCategory,listHealthBase,updateHealthBase,listHealthHabit,updateHealthHabit,listHealthHuli,updateHealthHuli,listHealthNow,updateHealthNow} from "@/api/healthy/index"; +import {getInfo} from "@/api/login"; -import { blobValidate } from '../../utils/ruoyi' + +//鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁� --鎺ュソ浜� +import {listHealth,enload,delHealth,uploadPic, addHealth} from "@/api/healthy/index"; +import {Message} from "element-ui"; export default { - name: "show", + name: "ZYearInfo", dicts: ['sys_normal_disable'], data() { return { - dictionary: {}, + userId: undefined, // 閬僵灞� disabled: false, - isEditing:false, - inds: undefined, - sinds: undefined, - loading: false, + loading: true, formData:[], // 閫変腑鏁扮粍 ids: [], @@ -552,27 +393,13 @@ showSearch: true, // 鎬绘潯鏁� total: 0, - //澶村儚涓婁紶 - showBtnDealImg:true, - noneBtnImg:false, - limitCountImg:1,//涓婁紶鍥剧墖鐨勬渶澶ф暟閲� - //涓汉淇℃伅鏁版嵁 - HealthyBaseList:{}, - LiveHabbitList:{}, - HealthHuliList:{}, - HealthNowList:{}, - fit:['fill'], - //涓嬫媺瀹炵幇 - activeNames:['1'], + // 瀹跺ぇ浜嬭琛ㄦ牸鏁版嵁 + economyList: [], // 寮瑰嚭灞傛爣棰� title: "", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, - // open:true, // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛� - bear:undefined, - mrs:undefined, - smrs:undefined, openDataScope: false, menuExpand: false, menuNodeAll: false, @@ -581,23 +408,27 @@ // 鏃ユ湡鑼冨洿 dateRange: [], // 鏁版嵁鑼冨洿閫夐」 - fot:[".jpg",".jif"], + + fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', + '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'], + fileList:[ ], - fileListOther:[ - - ], - editStatus: {}, + fileList1:[], + uploadFileList: [], + uploadFileList1: [], + fileListOther:[], dsb:true, btn:false, - isShow:true, - isShow_2:false, - formDat: { - - + type: undefined, + createTime: undefined, + useFor: undefined, + usePeople: undefined, + kind:undefined, + remark: undefined, + url: "", }, - // 鑿滃崟鍒楄〃 menuOptions: [], // 閮ㄩ棬鍒楄〃 @@ -605,10 +436,21 @@ // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, - pageSize: 5, - startDate:undefined, - content:undefined, - witness:undefined, + pageSize: 10, + type:undefined, + useFor:undefined, + usePeople:undefined, + checkTime:undefined, + + }, + healthList:{ + checkTime:undefined, + type:undefined, + hospital:undefined, + title:undefined, + notice:undefined, + remark:undefined, + url:undefined }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -618,506 +460,110 @@ }, // 琛ㄥ崟鏍¢獙 rules: { + title: [{ + required: true, + message: '璇疯緭鍏ユ爣棰�', + trigger: 'blur' + }], + hospital: [{ + required: true, + message: '璇疯緭鍏ユ晳鐥呭尰闄�', + trigger: 'blur' + }], + type: [{ + required: true, + message: '璇疯緭鍏ョ被鍒�', + trigger: 'blur' + }], + checkTime: [{ + required: true, + message: '閫夋嫨浣撴鏃堕棿', + trigger: 'blur' + }], + notice: [{ + required: true, + message: '璇疯緭鍏ユ敞鎰忎簨椤�', + trigger: 'blur' + }], }, - typeOptions: [],//琛�鍨� - typeOptions100:[],//琛�鍨�2 - typeOptions1: [],//杩囨晱鍙� - typeOptions2: [],//閬椾紶鐥呭彶 - typeOptions3: [],//鐫$湢 - typeOptions4: [],//澶т究瑙勫緥 - typeOptions5: [],//灏忎究瑙勫緥 - typeOptions6: [],//楗涔犳儻 - typeOptions7: [],//鐢熸椿浜嬩欢 - typeOptions8: [],//鐨偆绮樿啘 - typeOptions9: [],//蹇冪悊鐘舵�� - typeOptions10: [],//鐥呯悊鎬佸害 - typeOptions11: [],//鍏ㄨ韩钀ュ吇鎯呭喌 - typeOptions12: [],//鑴戣绠$柧鐥� - typeOptions13: [],//蹇冭剰鐤剧梾 - typeOptions14: [],//琛�绠$柧鐥� - typeOptions15: [],//娑堝寲绯荤粺鐤剧梾 - typeOptions16: [],//鍛煎惛绯荤粺鐤剧梾 - typeOptions17: [],//鑲捐剰鐤剧梾 - typeOptions18: [],//鑲捐剰鐤剧梾 + }; }, created() { - this.getList() + this.getList(); + this.getInfo() + }, methods: { - + handleDialogClick() + { + // 鍏抽棴鏃ユ湡閫夋嫨鍣� + this.$refs.datePicker.handleClose(); + }, + getInfo(){ + console.log('-----------------') + getInfo().then(response=>{ + console.log(response.user.roles[0].roleId,'roleID') + this.userId = response.user.roles[0].roleId + }) + }, // 鍙栨秷鎸夐挳 cancelData() { this.open = false; this.reset(); }, - //涓嬫媺 - handleChange(val) { - console.log(val); + + //闅旇鍙樿壊 + tableRowClassName({row, rowIndex}) { + if (rowIndex % 2 == 0) { + return "statistics-warning-row1"; + } else { + return "statistics-warning-row"; + } }, - /** 鏌ヨ瑙掕壊鍒楄〃 */ + //鍒楄〃鏄剧ず瀹跺ぇ浜嬭 getList() { - this.loading = false; + this.loading = true; + this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] + this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] + // console.log(this.queryParams) + // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { - //涓汉淇℃伅 - listHealthBase(this.queryParams) - .then(response => { - if (response.data.length === 0) { - this.loading = false; - this.HealthyBaseList = {}; - } else { - this.HealthyBaseList = response.data; - this.loading = false; + listHealth(this.queryParams).then(response => { + // alert(123) + // console.log(response.data) + this.healthList = response.data.data; - const query ={} ; - if (query.id = 2) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const bloodClass = this.HealthyBaseList.bloodClass; - console.log(typeOptions) - // 灏哹loodClass鐨勫�艰浆鎹负typeOptions鏁扮粍 - this.typeOptions = Object.keys(bloodClass).map(key => { - return { - label: key, - value: bloodClass[key] - }; - }); - console.log(typeOptions) - - - - }) - .catch(error => { - console.error(error); - });} - if (query.id = 3) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions1 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const allergyClass = this.HealthyBaseList.allergyClass; - const selectedOption = this.typeOptions1.find(option => option.value.toString() === allergyClass); - - if (selectedOption) { - this.HealthyBaseList.allergyClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 4) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions2 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const geneticDiseaseClass = this.HealthyBaseList.geneticDiseaseClass; - const selectedOption = this.typeOptions2.find(option => option.value.toString() === geneticDiseaseClass); - - if (selectedOption) { - this.HealthyBaseList.geneticDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - - } - }) - .catch(error => { - console.error(error); - }); - //鐢熸椿涔犳儻 - listHealthHabit(this.queryParams).then(response => { - if(response.data.length == 0){ - this.loading = false; - this.LiveHabbitList={}; - } - else{ - this.LiveHabbitList = response.data; - this.loading = false; - const query ={} ; - if (query.id = 5) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions3 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const sleepClass = this.LiveHabbitList.sleepClass; - const selectedOption = this.typeOptions3.find(option => option.value.toString() === sleepClass); - - if (selectedOption) { - this.LiveHabbitList.sleepClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 6) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions4 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const stoolStatusClass = this.LiveHabbitList.stoolStatusClass; - const selectedOption = this.typeOptions4.find(option => option.value.toString() === stoolStatusClass); - - if (selectedOption) { - this.LiveHabbitList.stoolStatusClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 7) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions5 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const urineStatusClass = this.LiveHabbitList.urineStatusClass; - const selectedOption = this.typeOptions3.find(option => option.value.toString() === urineStatusClass); - - if (selectedOption) { - this.LiveHabbitList.urineStatusClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 8) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions6 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const eatingHabitsClass = this.LiveHabbitList.eatingHabitsClass; - const selectedOption = this.typeOptions6.find(option => option.value.toString() === eatingHabitsClass); - - if (selectedOption) { - this.LiveHabbitList.eatingHabitsClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 9) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions7 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const lifeEventClass = this.LiveHabbitList.lifeEventClass; - console.log(this.typeOptions7) - console.log(this.LiveHabbitList.lifeEventClass) - console.log(lifeEventClass) - - }) - .catch(error => { - console.error(error); - });} - } - + this.total = response.data.total; + this.loading = false; } ); - - //鎶ょ悊鏌ヤ綋 - listHealthHuli(this.queryParams).then(response => { - if(response.data.length == 0){ - this.loading = false; - this.HealthHuliList={}; - } - else{ - this.HealthHuliList = response.data; - this.loading = false; - const query ={} ; - if (query.id = 10) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions8 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const skinTypeClass = this.HealthHuliList.skinTypeClass; - const selectedOption = this.typeOptions8.find(option => option.value.toString() === skinTypeClass); - - if (selectedOption) { - this.HealthHuliList.skinTypeClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 11) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions9 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const psychologyTypeClass = this.HealthHuliList.psychologyTypeClass; - const selectedOption = this.typeOptions9.find(option => option.value.toString() === psychologyTypeClass); - - if (selectedOption) { - this.HealthHuliList.psychologyTypeClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 12) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions10 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const attitudeClass = this.HealthHuliList.attitudeClass; - const selectedOption = this.typeOptions10.find(option => option.value.toString() === attitudeClass); - - if (selectedOption) { - this.HealthHuliList.attitudeClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 13) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions11 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const nutritionClass = this.HealthHuliList.nutritionClass; - const selectedOption = this.typeOptions11.find(option => option.value.toString() === nutritionClass); - - if (selectedOption) { - this.HealthHuliList.nutritionClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - - } - - } - ); - - //鐜板瓨鍋ュ悍闂 - listHealthNow(this.queryParams).then(response => { - if(response.data.length == 0){ - this.loading = false; - this.HealthNowList={}; - } - else{ - this.HealthNowList = response.data; - this.loading = false; - const query ={} ; - if (query.id = 14) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions12 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const brainDiseaseClass = this.HealthNowList.brainDiseaseClass; - const selectedOption = this.typeOptions12.find(option => option.value.toString() === brainDiseaseClass); - - if (selectedOption) { - this.HealthNowList.brainDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 15) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions13 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const heartDiseaseClass = this.HealthNowList.heartDiseaseClass; - const selectedOption = this.typeOptions13.find(option => option.value.toString() === heartDiseaseClass); - - if (selectedOption) { - this.HealthNowList.heartDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 16) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions14 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const vascularDiseaseClass = this.HealthNowList.vascularDiseaseClass; - const selectedOption = this.typeOptions14.find(option => option.value.toString() === vascularDiseaseClass); - - if (selectedOption) { - this.HealthNowList.vascularDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 17) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions15 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const digestiveSystemDiseaseClass = this.HealthNowList.digestiveSystemDiseaseClass; - const selectedOption = this.typeOptions15.find(option => option.value.toString() === digestiveSystemDiseaseClass); - - if (selectedOption) { - this.HealthNowList.digestiveSystemDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 18) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions16 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const respiratorySystemDiseaseClass = this.HealthNowList.respiratorySystemDiseaseClass; - const selectedOption = this.typeOptions16.find(option => option.value.toString() === respiratorySystemDiseaseClass); - - if (selectedOption) { - this.HealthNowList.respiratorySystemDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 19) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions17 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const kidneyDiseaseClass = this.HealthNowList.kidneyDiseaseClass; - const selectedOption = this.typeOptions17.find(option => option.value.toString() === kidneyDiseaseClass); - - if (selectedOption) { - this.HealthNowList.kidneyDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - if (query.id = 20) { - getCategory(query) - .then(response => { - const itemValues = response.data.itemValues; - const keyValuePairs = itemValues.replace("{", "").replace("}", "").split(","); - this.typeOptions18 = keyValuePairs.map(elem => { - const [label, value] = elem.split(":").map(str => str.trim()); - return { label, value: parseInt(value) }; - }); - - const otherDiseaseClass = this.HealthNowList.otherDiseaseClass; - const selectedOption = this.typeOptions18.find(option => option.value.toString() === otherDiseaseClass); - - if (selectedOption) { - this.HealthNowList.otherDiseaseClass = selectedOption.value.toString(); - } - }) - .catch(error => { - console.error(error); - });} - } - - } - ); - }, - - + handleRemove(file) { + for (let i = 0; i < this.fileList.length; i++) { + if(this.fileList[i].url==file.url) + { + this.$delete(this.fileList,i); + this.$delete(this.uploadFileList,i); + } + } + }, + handleRemoveFile(file) { + for (let i = 0; i < this.fileListOther.length; i++) { + if(this.fileListOther[i].url==file.url) + { + this.$delete(this.fileListOther,i); + this.$delete(this.uploadFileList1,i); + } + } + }, // 鍙栨秷鎸夐挳 cancel() { @@ -1150,135 +596,260 @@ deptCheckStrictly: true, remark: undefined }; - this.resetForm("form"); + this.resetForm("elForm"); }, - + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.dateRange = []; + this.resetForm("queryForm"); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + console.log(this.ids) + this.single = selection.length != 1 + this.multiple = !selection.length + }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { this.reset(); this.open = true; - this.title = "鏂板濠氬Щ淇℃伅"; + this.title = "鏂板鍋ュ悍鎯呭喌"; + }, + + + /** 鏌ョ湅璇︾粏淇℃伅 */ + handleCheck(row) { + const id = row.id; + this.$router.push("/self/healthy/healthyInfo/" + id); }, /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate() { - + handleUpdate(row) { + const id = row.id; let jd = true - // this.$router.push({ - // path:"/self/marry/edit/" + id, - // query:{ - // detail:jd - // } - // }); - }, - // 缂栬緫鎸夐挳 - handleEdit() - { - this.dsb = false - this.btn = true - this.isShow=false - this.isShow_2=true - this.isEditing=true - - }, - - - - /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */ - submitDataScope: function() { - - let ul = this.fileList.map(function (elem){ - return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") - }).join(",") - let uls = this.fileListOther.map(function (elem){ - return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") - }).join(",") - this.formDat.url = ul+","+uls - this.$refs["elForm"].validate(valid => { - if (valid) { - - addMarryOld(this.formDat).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); + this.$router.push({ + path: "/self/healthy/healthyInfo/" + id, + query: { + detail: jd } }); }, - editRow(row) { - this.$set(row, 'isEdit', true); - this.$set(this.editStatus, row.id, true); + handlePictureCardPreview(file) { + this.dialogImageUrl = file.url; + this.dialogVisible = true; }, - //淇敼鍚庣殑淇濆瓨 + /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */ + submitDataScope: function () { - submitForm() { - if(parseInt(this.mrs)) - this.marryList.marryStatus = parseInt(this.mrs) - if(parseInt(this.smrs)) - this.marryList.spouseMarryStatus = parseInt(this.smrs) - if(parseInt(this.bear)) - this.marryList.bearStatus = parseInt(this.bear) - this.marryList.sex = this.sinds - this.marryList.spouseSex = this.inds - this.$refs['elForm'].validate(valid => { + // let ul = this.fileList.map(function (elem) { + // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API, "") + // }).join(",") + // let uls = this.fileListOther.map(function (elem) { + // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API, "") + // }).join(",") + // this.formDat.url = ul + "," + uls + this.$refs["elForm"].validate(valid => { if (valid) { - if (this.marryList.id !== undefined) { - updateMarry(this.marryList).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - // this.open = false; - this.btn=false - this.isEditing = false - this.dsb = true - this.isShow_2=false - this.isShow = true + addHealth(this.formDat).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + // 娓呯┖formDat瀵硅薄鐨勬暟鎹� + Object.keys(this.formDat).forEach(key => { + this.formDat[key] = ''; }); - } else { - this.$modal.msgSuccess("淇敼澶辫触"); + for (let i = 0; i <= this.fileList.length; i++) { + this.handleRemove(this.fileList[0]); + } + for (let i = 0; i < this.fileListOther.length; i++) { + this.handleRemoveFile(this.fileListOther[0]); + } - } + }); } - }) - // 鍒锋柊椤甸潰 - // window.location.reload(); + }); + + }, + handleChange(file, fileList1) { + //瀹氫箟涓�涓叏灞�鏁扮粍uploadFileList鏉ュ仛瀛樺偍 + + // this.uploadFileList.push(file.raw); + console.log("=========5555=========") + console.log(file) + // console.log(this.uploadFileList) + // this.fileList = fileList + //alert(file) + this.uploadFileList.push(file.raw); + this.fileList.push({name:file.name,url:file.url}) + //alert(fileList1.length) + }, + handleChange1(file, fileOtherList1) { + //瀹氫箟涓�涓叏灞�鏁扮粍uploadFileList鏉ュ仛瀛樺偍 + this.uploadFileList1.push(file.raw); + this.fileListOther.push({name:file.name,url:file.url}) + // this.uploadFileList.push(file.raw); + console.log("=========5555=========") + //console.log(file) + // console.log(this.uploadFileList) + // this.fileList = fileList + }, + fileUpload(){ + // var file = params.file; + + var formData = new FormData(); + this.$refs.upload1.submit(); + // formData.append('uploadFile', file); + if(this.uploadFileList1.length==0){ + this.$modal.msgSuccess("鏂囨。涓婁紶鍒楄〃涓嶈兘涓虹┖!"); + return + } + this.uploadFileList1.forEach((elem)=>{ + formData.append("files", elem) + + }) + + let _this = this + + this.uploading = true; + uploadPic(formData).then(response => { + _this.uploadFileList1 = [] + _this.formDat.url = _this.formDat.url+","+response.fileNames + _this.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛!"); + }) + + }, + picUpload() + { + var formData = new FormData(); + //alert(976) + //this.$refs.upload.submit(); + //alert(8) + //alert(this.uploadFileList.length) + if(this.uploadFileList.length==0){ + this.$modal.msgSuccess("鍥剧墖涓婁紶鍒楄〃涓嶈兘涓虹┖锛�"); + return} + //console.log(this.uploadFileList) + this.uploadFileList.forEach((elem)=>{ + formData.append("files", elem) + + }) + //alert(90) + let _this = this + //alert(9) + uploadPic(formData).then(response => { + // alert("dds") + _this.formDat.url = _this.formDat.url+","+response.fileNames + _this.uploadFileList = [] + _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛"); + + }); + }, + requestUpload(params) { + //alert(98) + // this.uploadFileList.push(params.file); + }, + requestUpload1(params) + { + // this.uploadFileList1.push(params.file); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const Ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function () { + return delHealth(Ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => { + }); }, //骞村害鍋ュ悍鎶ュ憡 toYearhealthy(){ - console.log(this.HealthyBaseList.uid) - this.$router.push("/self/healthy/healthYear/" + this.HealthyBaseList.uid); + this.$router.push("/self/healthy/healthYear" ); }, - //闅旇鍙樿壊 - tableRowClassName({ row, rowIndex }) { - if (rowIndex % 2 == 0) { - return "statistics-warning-row1"; + //浣撴琛� + toExamination(){ + this.$router.push("/self/healthy/Examination" ); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + + handleExport() { + const Ids = this.ids; + + if (Ids.length == 0) { + this.download('/zYearInfo/export', { + ...this.queryParams + }, `zYearInfo${new Date().getTime()}.xlsx`) } else { - return "statistics-warning-row"; + this.download('/zYearInfo/export1/' + Ids, {}, `zYearInfo${new Date().getTime()}.xlsx`) } }, + /** 瀵煎叆妯℃澘涓嬭浇鎿嶄綔*/ + handleExportTemplate() + { + this.download('/zYearInfo/model', { + + }, `zYearInfo${new Date().getTime()}.xlsx`) + }, + /** 瀵煎叆鎿嶄綔*/ + handleEnport(params){ + var file = params.file; + var formData = new FormData(); + formData.append('excelImport', file); + let _this = this + enload(formData).then(response => { + _this.getList(); + Message({ message: "瀵煎叆鎴愬姛", type: 'warning' }) + + }).catch(err) + { + Message({ message: "瀵煎叆澶辫触", type: 'error' }) + } - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('/self/user/export', { - ...this.queryParams - }, `self_${new Date().getTime()}.xlsx`) + } - }, - - + } }; - </script> + <style> -.button { - background:center no-repeat url('../../assets/icons/add1.png') ; - margin-left: 69.5vw; +.el-table__row.statistics-warning-row { + background: #E0EEFE; } -.form{ +.el-table__row.statistics-warning-row1 { + background: #FFEFF2; + +} +.form1 { + position: absolute; + right: 60px; + top:20px; background:center/11% no-repeat url('../../assets/icons/form.png') ; -}</style> +} +.form2 { + position: absolute; + right: 200px; + top:20px; + +} +.el-table__cell { + font-size: 14px; /* 璁剧疆瀛椾綋澶у皬 */ +} +.button-container { + display: inline-flex; /* 璁剧疆鎸夐挳瀹瑰櫒涓鸿鍐呭厓绱� */ +} +</style> -- Gitblit v1.9.1