123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668 |
- <template>
- <div class="page_consumables">
- <div class="cell clearfix">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.value == schedulType ? 'active' : ''"
- @click="selectSchedulType(item.value)"
- v-for="item in schedulArr"
- :key="item.value"
- >
- {{ item.label }}
- </li>
- </ul>
- </div>
-
- <label class="title"><span class="name">日期查询</span> : </label>
- <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
- :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择日期时间" align="right"
- :picker-options="pickerOptions"></el-date-picker>
- <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
- class="filter-item" v-model="query.keywords"/>
- <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
- </div>
- <div class="cell clearfix" style="justify-content: space-between;">
- <div style="display:flex;">
- <label class="title"> <span class="name">分区</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == partitionType ? 'active' : ''"
- @click="selectPartitionType(item.id)"
- v-for="item in partitionArr"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
- <div>
- <el-button size="small" icon="el-icon-printer" @click="toSett" type="primary" v-if="his_config.is_open == 1">设置</el-button>
- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">打印</el-button>
- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
- <el-button size="small" type="primary" v-if="his_config.is_open != 1" @click="statistics">统计表</el-button>
- <el-button size="small" type="primary" v-if="his_config.is_open == 1" @click="toStatistics">统计表</el-button>
- </div>
- </div>
-
- <div v-if="his_config.is_open != 1">
- <el-table
- :data="list"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column align="center" width="55" label="序号">
- <template slot-scope="scope">
- {{scope.$index + 1}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="55" label="透析机号">
- <template slot-scope="scope">
- {{scope.row.device_number.number}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="55" label="姓名">
- <template slot-scope="scope">
- {{scope.row.patient.name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="55" label="透析号">
- <template slot-scope="scope">
- {{scope.row.patient.dialysis_no}}
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- v-for="(item,index) in rowList"
- :key="item.id"
- :label="item.filed_name_cn"
- >
- <template slot-scope="scope">
- {{getName(scope.row.rowList[index].filed_name_cn,scope.row.dialysis_solution)}}
- </template>
-
- </el-table-column>
-
- <el-table-column align="center" width="100" label="备注">
- <template slot-scope="scope">
- {{scope.row.dialysis_solution.remark}}
- </template>
- </el-table-column>
-
- </el-table>
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- background
- align="right"
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
-
- <div v-if="his_config.is_open == 1">
- <el-table
- :data="list"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column align="center" width="55" label="序号">
- <template slot-scope="scope">
- {{scope.$index + 1}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="55" label="透析机号">
- <template slot-scope="scope">
- {{scope.row.device_number.number}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="55" label="姓名">
- <template slot-scope="scope">
- {{scope.row.patient.name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="55" label="透析号">
- <template slot-scope="scope">
- {{scope.row.patient.dialysis_no}}
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- v-for="(item,index) in typeList"
- :key="item.id"
- :label="item.type_name"
- >
- <template slot-scope="scope">
- {{getStr(scope.row.typeList[index].id,scope.row.projectList,scope.row.patient_id)}}
- </template>
-
- </el-table-column>
-
-
-
- </el-table>
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- background
- align="right"
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
-
-
- <el-dialog
- title="耗材统计表"
- :visible.sync="startDialogVisible"
- width="70%">
- <span>
- <div class="cell clearfix">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <el-select v-model="schedule_type" placeholder="请选择">
- <el-option
- v-for="item in schedulArr"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"> <span class="name">病区选择</span> : </label>
- <el-select v-model="partion_type" placeholder="请选择">
- <el-option
- v-for="item in partitionArr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <el-table
- :data="tableList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="耗材名称">
- <template slot-scope="scope">
- {{scope.row.name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
-
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="startDialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="设置"
- :visible.sync="startDialogVisibleOne"
- width="60%">
- <span>
- <div v-for="(item,index) in goodTypeList" :key="index">
- <span v-if="index == 0"><el-checkbox v-model="checkedOne" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 1"><el-checkbox v-model="checkedTwo" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 2"><el-checkbox v-model="checkedThree" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 3"><el-checkbox v-model="checkedFour" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 4"><el-checkbox v-model="checkedFive" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 5"><el-checkbox v-model="checkedSix" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 6"><el-checkbox v-model="checkedSeven" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 7"><el-checkbox v-model="checkedEnight" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 8"><el-checkbox v-model="checkedNight" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 9"><el-checkbox v-model="checkedTen" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 10"><el-checkbox v-model="checkedEleven">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 11"><el-checkbox v-model="checkedTwenty">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 12"><el-checkbox v-model="checkedTwentyOne">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 13"><el-checkbox v-model="checkedTwentyTwo">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 14"><el-checkbox v-model="checkedTwentyThree">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 15"><el-checkbox v-model="checkedTwentyFour">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 16"><el-checkbox v-model="checkedTwentyFive">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 17"><el-checkbox v-model="checkedTwentySix">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 18"><el-checkbox v-model="checkedTwentySeven">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 19"><el-checkbox v-model="checkedTwentyEight">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 20"><el-checkbox v-model="checkedTwentyNight">{{item.type_name}}</el-checkbox></span>
- </div>
-
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startDialogVisibleOne = false">取 消</el-button>
- <el-button type="primary" @click="saveHisDialysis">确 定</el-button>
- </span>
- </el-dialog>
-
-
-
- <el-dialog
- title="耗材统计表"
- :visible.sync="startHisDialogVisible"
- width="70%">
- <span>
- <div class="cell clearfix">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <el-select v-model="schedule_type" placeholder="请选择">
- <el-option
- v-for="item in schedulArr"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"> <span class="name">病区选择</span> : </label>
- <el-select v-model="partion_type" placeholder="请选择">
- <el-option
- v-for="item in partitionArr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <el-table
- :data="tableList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="耗材名称">
- <template slot-scope="scope">
- {{scope.row.good_name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
-
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startHisDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="startHisDialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- </div>
- </template>
-
-
- <script>
- import { GetAllZone,getPatientDialysisSolutionGroupList,getDialysisGoodTotalCount,saveHisDialysis,getHisDialysisGoodCount } from '@/api/dialysis'
- import {GetAllGoodType} from '@/api/stock'
- import { uParseTime } from "@/utils/tools";
- import { getDataConfig } from '@/utils/data'
- export default {
- components: {
-
- },
- data() {
- return {
- query:{
- total:"",
- schedule_date:"",
- schedule_type:0,
- partition_id:0,
- page:1,
- limit:10,
- keywords:"",
- good_type:0,
- },
- schedulType: 0,
- schedulArr: [
- { value: 0, label: '全部' },
- { value: 1, label: '上午' },
- { value: 2, label: '下午' },
- { value: 3, label: '晚上' }
- ],
- selected_date: "",
- partitionArr: [],
- goodList:[
- { id: 0, name: '全部' },
- { id: 1, name: '已出库' },
- { id: 2, name: '未出库' },
- ],
- partitionType: 0,
- goodType:0,
- tableData: [{
- date: '2016-05-03',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }
- ],
- search_input: '',
- searchAction: '',
- allGoodInfo:[],
- list:[],
- new_list:[],
-
- good_types: [],
- arrKey:[],
- arrList:[],
- total:0,
- pickerOptions:{ //禁用当前日期之前的日期
- disabledDate(v) {
- //Date.now()是javascript中的内置函数,它返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。
- return v.getTime() < new Date().getTime() - 86400000;
- },
- },
- rowList:[],
- dialysate_formulation:[],
- body_fluid_option:[],
- displace_liqui_part_option:[],
- blood_access_option:[],
- hemodialysisPipelinesOptions:[],
- startDialogVisible:false,
- tableList:[],
- schedule_type:0,
- partion_type:0,
- goodTypeList:[],
- his_config:"",
- startDialogVisibleOne:false,
- type_name:false,
- checkedOne:false,
- checkedTwo:false,
- checkedThree:false,
- checkedFour:false,
- checkedFive:false,
- checkedSix:false,
- checkedSeven:false,
- checkedEnight:false,
- checkedNight:false,
- checkedTen:false,
- checkedEleven:false,
- checkedTwenty:false,
- checkedTwentyOne:false,
- checkedTwentyTwo:false,
- checkedTwentyThree:false,
- checkedTwentyFour:false,
- checkedTwentyFive:false,
- checkedTwentySix:false,
- checkedTwentySeven:false,
- checkedTwentyEight:false,
- checkedTwentyNight:false,
- startHisDialogVisible:false,
- typeList:[],
- }
- },
- created() {
- let date = uParseTime(new Date(), "{y}-{m}-{d}")
- var newDate = new Date();
- var y = newDate.getFullYear();
- var m = newDate.getMonth() + 1;
- var d = newDate.getDate();
- var schedule_date =
- y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
-
- this.selected_date = date
- this.query.schedule_date = schedule_date
- this.query.schedule_type = 0
- this.query.partition_id = 0
- this.query.page = 1
- this.getAllZone()
- this.dialysate_formulation = getDataConfig(
- 'hemodialysis',
- 'dialysate_formulation'
- )
- this.body_fluid_option = this.$store.getters.body_fluid
- this.displace_liqui_part_option = this.$store.getters.displace_liqui
- this.blood_access_option = this.$store.getters.blood_access
- this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
- this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
- var filedList = this.$store.getters.xt_user.fileds
- for (let i = 0; i < filedList.length; i++) {
- if ( filedList[i].module == 1 && filedList[i].is_show == 1 && (filedList[i].filed_name_cn == '透析器/灌流器' || filedList[i].filed_name_cn == '透析器' || filedList[i].filed_name_cn == '灌流器' || filedList[i].filed_name_cn == '钾' || filedList[i].filed_name_cn == '钠' || filedList[i].filed_name_cn == '钙' || filedList[i].filed_name_cn == '葡萄糖' || filedList[i].filed_name_cn == '穿刺针' || filedList[i].filed_name_cn == '穿刺针支数')) {
- this.rowList.push(filedList[i])
- }
- }
- this.getlist()
- },
- methods: {
-
- exportList(){
-
- },
- open(){
- this.getlist()
- },
- getlist(){
- getPatientDialysisSolutionGroupList(this.query).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
-
- var total = response.data.data.total
- this.total = total
- var goodType = response.data.data.goodType
- var config = response.data.data.config
- this.his_config = config
-
- if(config.is_open !=1){
- if(list!=null){
- for(let i=0;i<list.length;i++){
- list[i].rowList = []
- list[i].rowList = this.rowList
- }
- }
- this.list= []
- this.list = list
- }
- if(config.is_open == 1){
- if(list!=null){
- this.typeList= []
- for(let i=0;i<goodType.length;i++){
- if(goodType[i].is_open == 1){
- this.typeList.push(goodType[i])
- }
- }
- for(let i=0;i<list.length;i++){
- list[i].projectList = []
- list[i].typeList = []
- list[i].typeList = this.typeList
- }
-
- for(let i=0;i<list.length;i++){
- if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length >0){
- for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
- for(let z=0;z<list[i].his_prescription_template.his_prescription_info[j].project.length;z++){
- list[i].projectList.push(list[i].his_prescription_template.his_prescription_info[j].project[z])
- }
- }
- }
-
- }
- console.log("list列表",list)
- this.list = list
- }
- }
- }
- })
- },
- handleSizeChange(val) {
- this.query.limit = val;
- this.GetDialysisgoods();
- },
- handleCurrentChange(val) {
- this.query.page = val;
- this.GetDialysisgoods();
- },
-
- calCount(query_warehouseout_info) {
- let total = 0
- var array = []
- array = query_warehouseout_info
- for (let i = 0; i < array.length; i++) {
- total = total + array[i].count
- }
- return total
-
- },
- getGoodUserInfo(good_type_id,good_user,last_good_user) {
- var arrlist =[]
- if (good_user != null && good_user.length > 0) {
- let desc = ""
- for (let b = 0; b < good_user.length; b++){
- if(good_type_id == good_user[b].good_type_id)
- desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
- }
- arrlist.push(desc)
- return desc
- }
- return ""
- },
-
- selectSchedulType(scheduleType) {
- this.schedulType = scheduleType
- this.query.schedule_type = scheduleType
- this.query.page = 1
- this.getlist()
- },
- selectPartitionType(partitionType) {
- this.partitionType = partitionType
- this.query.partition_id = partitionType
- this.query.page = 1
- this.getlist()
- },
- selectGoodType(goodType){
- this.goodType = goodType
- this.query.good_type = goodType
- this.getlist()
- },
- getAllZone: function() {
- GetAllZone().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.partitionArr = response.data.data.zone
- this.partitionArr.unshift({ id: 0, name: '全部' })
- }
- })
- },
- statistics() {
-
- var params = {
- schedule_type:this.schedule_type,
- partion_type:this.partion_type,
- selected_date:this.query.schedule_date,
- }
- getDialysisGoodTotalCount(params).then(response=>{
- if(response.data.state == 1){
- this.startDialogVisible = true
- var list = response.data.data.list
- var kaliumCount = 0
- var sodiumCount = 0
- var calciumCount = 0
- var glucoseCount = 0
- var punctureNeedleCount = 0
- console.log("list232323223222wid",list)
- if(list!=null && list.length>0){
- for(let i=0;i<list.length;i++){
- list[i].dialysis_dialyszers_arr = []
- list[i].dialyzer_perfusion_apparatus_arr = []
- list[i].dialysis_irrigation_arr = []
- list[i].puncture_needle_arr = []
- if(list[i].dialysis_solution.dialysis_dialyszers!=""){
- list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
- }
- if(list[i].dialysis_solution.dialyzer_perfusion_apparatus!=""){
- list[i].dialyzer_perfusion_apparatus_arr = list[i].dialysis_solution.dialyzer_perfusion_apparatus.split(",")
- }
- if(list[i].dialysis_solution.dialysis_irrigation!=""){
- list[i].dialysis_irrigation_arr = list[i].dialysis_solution.dialysis_irrigation.split(",")
- }
- if(list[i].dialysis_solution.puncture_needle!="" ){
- list[i].puncture_needle_arr = list[i].dialysis_solution.puncture_needle.split(",")
- }
- kaliumCount += parseInt(list[i].dialysis_solution.kalium)
- sodiumCount += parseInt(list[i].dialysis_solution.sodium)
- calciumCount +=parseInt(list[i].dialysis_solution.calcium)
- glucoseCount += parseInt(list[i].dialysis_solution.glucose)
- punctureNeedleCount += parseInt(list[i].dialysis_solution.puncture_needle_count)
-
- }
- }
- var dialysisDialyszersArr = []
- var dialyzerPerfusionApparaArr = []
- var dialysisIrrigationArr = []
- var punctureNeedleArr = []
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
-
- dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])
- }
- for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
- dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
- }
- for(let y=0;y<list[i].dialysis_irrigation_arr.length;y++){
- dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
- }
- for(let h=0;h<list[i].puncture_needle_arr.length;h++){
- punctureNeedleArr.push(list[i].puncture_needle_arr[h])
- }
- }
- console.log("透析器",dialysisDialyszersArr)
- console.log("透析器/灌流器",dialyzerPerfusionApparaArr)
- console.log("灌流器",dialysisIrrigationArr)
- console.log("穿刺针",punctureNeedleArr)
- let obj = {}
- let objOne = {}
- let objTwo = {}
- let objThree = {}
- for(let i = 0 ; i < dialysisDialyszersArr.length; i++){
- if(obj[dialysisDialyszersArr[i]]){
- obj[dialysisDialyszersArr[i]] +=1
- }else{
- obj[dialysisDialyszersArr[i]] = 1
- }
- }
- let Arr = [];
- for (let i in obj) {
- let a = {};
- a[i] = obj[i];
- a.name = "透析器"
- a.count = obj[i]
- a.specification_name = i
- Arr.push(a);
- }
-
- for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
- if(objOne[dialyzerPerfusionApparaArr[i]]){
- objOne[dialyzerPerfusionApparaArr[i]] +=1
- }else{
- objOne[dialyzerPerfusionApparaArr[i]] = 1
- }
- }
-
- for (let i in objOne) {
- let a = {};
- a[i] = objOne[i];
- a.name = "透析器/灌流器"
- a.count = objOne[i]
- a.specification_name = i
- Arr.push(a);
- }
-
- for(let i=0;i<dialysisIrrigationArr.length;i++){
- if(objTwo[dialysisIrrigationArr[i]]){
- objTwo[dialysisIrrigationArr[i]] +=1
- }else{
- objTwo[dialysisIrrigationArr[i]] = 1
- }
- }
-
- for (let i in objTwo) {
- let a = {};
- a[i] = objTwo[i];
- a.name = "灌流器"
- a.count = objTwo[i]
- a.specification_name = i
- Arr.push(a);
- }
- console.log("newa",Arr)
-
- for(let i = 0 ; i < punctureNeedleArr.length; i++){
- if(objThree[punctureNeedleArr[i]]){
- objThree[punctureNeedleArr[i]] +=1
- }else{
- objThree[punctureNeedleArr[i]] = 1
- }
- }
- for (let i in objThree) {
- let a = {};
- a[i] = objThree[i];
- a.name = "穿刺针"
- a.count = objThree[i]
- a.specification_name = i
- Arr.push(a);
- }
-
-
- var objfive = {name:"钾(mmol/L)",specification_name:"2.0",count:""}
- var objsix = {name:"钠(mmol/L)",specification_name:"1.25",count:""}
- var objseven = {name:"钙(mmol/L)",specification_name:"1.5",count:""}
- var objeight = {name:"葡萄糖(mmol/L)",specification_name:"无糖",count:""}
- var objten = {name:"穿刺针支数",specification_name:"穿刺针支数",count:""}
-
- objfive.count = kaliumCount
- objsix.count = sodiumCount
- objseven.count = calciumCount
- objeight.count = glucoseCount
- objten.count = punctureNeedleCount
- this.tableList.push(objfive)
- this.tableList.push(objsix)
- this.tableList.push(objseven)
- this.tableList.push(objeight)
- this.tableList.push(objten)
- for(let i=0;i<Arr.length;i++){
-
- this.tableList.push(Arr[i])
- }
-
-
- }
- })
-
- },
- toStatistics(){
- var params = {
- schedule_type:this.schedule_type,
- partion_type:this.partion_type,
- selected_date:this.query.schedule_date,
- }
- getHisDialysisGoodCount(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- console.log("list23233223232wode",list)
- this.startHisDialogVisible = true
- var projectList = []
- for(let i=0;i<list.length;i++){
- if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length>0){
- for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
- for(let z=0;z<list[i].his_prescription_template.his_prescription_info[j].project.length;z++){
- projectList.push(list[i].his_prescription_template.his_prescription_info[j].project[z])
- }
- }
- }
- }
- console.log("projectList",projectList)
-
- if(projectList!=null && projectList.length > 0){
- for(let i=0;i<projectList.length;i++){
- projectList[i].good_id = 0
- projectList[i].good_id = projectList[i].good_info.id
- }
- }
-
- let dataInfo = {}
- projectList.forEach((item, index) => {
- let { good_id } = item
- if (!dataInfo[good_id]) {
- dataInfo[good_id] = {
- good_id:item.good_info.id,
- child: [],
- count:0,
- specification_name:item.good_info.specification_name,
- good_name:item.good_info.good_name
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
- for(let i=0;i<projectList.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(projectList[i].good_id == newArr[j].good_id){
- newArr[j].child.push(projectList[i])
- }
- }
- }
-
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<newArr[i].child.length;j++){
- newArr[i].count += parseInt(newArr[i].child[j].count)
- }
- }
- console.log("newArr32323233223wo",newArr)
- this.tableList = newArr
- }
- })
- },
- handleScheduleDateChange(val) {
- this.query.schedule_date = val
- this.query.page = 1
- this.getlist()
- },
- search() {
- this.query.page = 1
- this.getlist()
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]));
- },
- getName(filed_name_cn,val){
- if(filed_name_cn == "透析模式"){
- return this.getModeName(val.mode_id)
- }
- if(filed_name_cn == "血流量"){
- if(val.blood_flow_volume > 0){
- return val.blood_flow_volume
- }else{
- return ""
- }
-
- }
- if(filed_name_cn == "目标超滤量"){
- return val.target_ultrafiltration
- }
- if(filed_name_cn == "透析液配方"){
- return this.getDialysateFormulation(val.dialysate_formulation)
- }
- if(filed_name_cn == "抗凝剂"){
- return this.getAnticoagulant(val.anticoagulant)
- }
- if(filed_name_cn == "首剂"){
- return val.anticoagulant_shouji
- }
- if(filed_name_cn == "维持"){
- return val.anticoagulant_weichi
- }
- if(filed_name_cn == "总量"){
- return val.anticoagulant_zongliang
- }
- if(filed_name_cn == "置换量"){
- return val.replacement_total
- }
- if(filed_name_cn == "钾"){
- return val.kalium
- }
- if(filed_name_cn == "钠"){
- return val.sodium
- }
- if(filed_name_cn == "钙"){
- return val.calcium
- }
- if(filed_name_cn == "碳酸氢盐"){
- return val.bicarbonate
- }
- if(filed_name_cn == "透析液流量"){
- return val.dialysate_flow
- }
- if(filed_name_cn == "透析液温度"){
- return val.dialysate_temperature
- }
- if(filed_name_cn == "电导度"){
- return val.conductivity
- }
- if(filed_name_cn == "透析器/灌流器"){
- return val.dialyzer_perfusion_apparatus
- }
- if(filed_name_cn == "钙名称"){
- return val.anticoagulant_gaimingcheng
- }
- if(filed_name_cn == "钙剂量"){
- return val.anticoagulant_gaijiliang
- }
- if(filed_name_cn == "体液过多症状"){
- return this.getBodyFluid(val.body_fluid)
- }
- if(filed_name_cn == "透析前使用特殊药物"){
- return val.special_medicine
- }
- if(filed_name_cn == "透析前使用其他特殊药物"){
- return val.special_medicine_other
- }
- if(filed_name_cn == "置换液"){
- return this.getDisplace(val.displace_liqui_part)
- }
- if(filed_name_cn == "血管通路"){
- return this.getBloodAccess(val.blood_access)
- }
- if(filed_name_cn == "体液过多其他症状"){
- return val.body_fluid_other
- }
- if(filed_name_cn == "透析时长"){
- return val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
- }
- if(filed_name_cn == "置换液总量"){
- return val.displace_liqui_value
- }
- if(filed_name_cn == "透析器"){
- return val.dialysis_dialyszers
- }
- if(filed_name_cn == "注射器"){
- return ""
- }
- if(filed_name_cn == "抗凝提前停止"){
- return ""
- }
- if(filed_name_cn == "肝素钠"){
- return ""
- }
- if(filed_name_cn == "鱼精蛋白"){
- return ""
- }
- if(filed_name_cn == "下机前推住鱼精蛋白"){
- return ""
- }
- if(filed_name_cn == "无肝素钠备注"){
- return ""
- }
- if(filed_name_cn == "灌流器"){
- return val.dialysis_irrigation
- }
- if(filed_name_cn == "抗凝剂商品名称"){
- return ""
- }
- if(filed_name_cn == "置换速度"){
- return ""
- }
- if(filed_name_cn == "病情"){
- return ""
- }
- if(filed_name_cn == "葡萄糖"){
- return val.glucose
- }
- if(filed_name_cn == "单超时长"){
- return ""
- }
- if(filed_name_cn == "单超脱水"){
- return ""
- }
- if(filed_name_cn == "置换流量"){
- return ""
- }
- if(filed_name_cn == "血浆分离器"){
- return val.plasma_separator
- }
- if(filed_name_cn == "透析管路"){
- return this.getHemodialysisPipelines(val.hemodialysis_pipelines)
- }
- if(filed_name_cn == "透析管路支数"){
- return ""
- }
- if(filed_name_cn == "穿刺针"){
- return val.puncture_needle
- }
- if(filed_name_cn == "穿刺针支数"){
- return val.puncture_needle_count
- }
- if(filed_name_cn == "促红素"){
- return val.epo_count
- }
- if(filed_name_cn == "促红素支数"){
- return val.epo_count
- }
- if(filed_name_cn == "最大超滤率"){
- return val.max_ultrafiltration_rate
- }
- },
- getModeName(id){
- var name = ""
- if(id == 1){
- name = "HD"
- }
- if(id == 2){
- name = "HDF"
- }
- if(id == 3){
- name = "HD+HP"
- }
- if(id == 4){
- name = "HP"
- }
- if(id == 5){
- name = "HF"
- }
- if(id == 6){
- name = "SCUF"
- }
- if(id == 7){
- name = "IUF"
- }
- if(id == 8){
- name = "HFHD"
- }
- if(id == 9){
- name = "HFHD+HP"
- }
- if(id == 10){
- name = "PHF"
- }
- if(id == 11){
- name = "HFR"
- }
- if(id == 12){
- name = "HDF+HP"
- }
- if(id == 13){
- name = "CRRT"
- }
- if(id == 14){
- name = "腹水回输"
- }
- if(id == 19){
- name = "IUF+HD"
- }
- if(id == 20){
- name = "UF"
- }
- if(id == 21){
- name = "HD+"
- }
- if(id == 22){
- name = "血浆胆红素吸附+HDF"
- }
- if(id == 23){
- name = "血浆胆红素吸附"
- }
- if(id == 24){
- name = "I-HDF"
- }
- if(id == 25){
- name = "HD高通"
- }
- if(id == 26){
- name = "CVVH"
- }
- if(id == 27){
- name = "CVVHD"
- }
- if(id == 28){
- name = "CVVHDF"
- }
- if(id == 29){
- name = "PE"
- }
- if(id == 30){
- name = "血浆胆红素吸附+HP"
- }
- if(id == 31){
- name = "HPD"
- }
- if(id == 32){
- name = "HDP"
- }
- return name
- },
- getDialysateFormulation(id){
- var name = ""
- for(let i=0;i<this.dialysate_formulation.length;i++){
- if(id == this.dialysate_formulation[i].id){
- name = this.dialysate_formulation[i].name
- }
- }
- return name
- },
- getAnticoagulant(id){
- var name = ""
- if(id == 1){
- name = "无肝素"
- }
- if(id == 2){
- name = "普通肝素"
- }
- if(id == 3){
- name = "低分子肝素"
- }
- if(id == 4){
- name = "阿加曲班"
- }
- if(id == 5){
- name ="枸橼酸钠"
- }
- if(id == 6){
- name = "低分子肝素钙"
- }
- if(id == 7){
- name = "低分子肝素钠"
- }
- if(id ==8){
- name = "依诺肝素"
- }
- if(id ==9){
- name = "达肝素"
- }
- if(id ==10){
- name = "体外抗凝"
- }
- if(id ==11){
- name = "那曲肝素"
- }
- if(id ==12){
- name = "无抗凝剂"
- }
- if(id ==13){
- name = "那曲肝素钙"
- }
- return name
- },
- getBodyFluid(id){
- var name = ""
- for(let i=0;i<this.body_fluid_option.length;i++){
- if(id == this.body_fluid_option[i].id){
- name = this.body_fluid_option[i].name
- }
- }
- return name
- },
- getDisplace(id){
- var name = ""
- for(let i=0;i<this.displace_liqui_part_option.length;i++){
- if(id == this.displace_liqui_part_option[i].id){
- name = this.displace_liqui_part_option[i].name
- }
- }
- return name
- },
- getBloodAccess(id){
- var name = ""
- for(let i=0;i<this.blood_access_option.length;i++){
- if(id == this.blood_access_option[i].id){
- name = this.blood_access_option[i].name
- }
- }
- return name
- },
- getHemodialysisPipelines(id){
- var name = ""
- for(let i=0;i<this.hemodialysisPipelinesOptions.length;i++){
- if(id == this.hemodialysisPipelinesOptions[i].id){
- name = this.hemodialysisPipelinesOptions[i].name
- }
- }
- return name
- },
- toSett(){
- GetAllGoodType().then(response=>{
- if(response.data.state == 1){
- this.goodTypeList = []
- this.goodTypeList = response.data.data.goodType
-
- console.log("typelist2332233223wo",this.goodTypeList)
- for(let i=0;i<this.goodTypeList.length;i++){
- if(i == 0 && this.goodTypeList[i].is_open == 1){
- this.checkedOne = true
- }
- if(i == 1 && this.goodTypeList[i].is_open == 1){
- this.checkedTwo = true
- }
- if(i == 2 && this.goodTypeList[i].is_open == 1){
- this.checkedThree = true
- }
- if(i == 3 && this.goodTypeList[i].is_open == 1){
- this.checkedFour = true
- }
- if(i == 4 && this.goodTypeList[i].is_open == 1){
- console.log("进来22323")
- this.checkedFive = true
- }
- if(i == 5 && this.goodTypeList[i].is_open == 1){
- this.checkedSix = true
- }
- if(i == 6 && this.goodTypeList[i].is_open == 1){
- this.checkedSeven= true
- }
- if(i == 7 && this.goodTypeList[i].is_open == 1){
- this.checkedEnight= true
- }
- if(i == 8 && this.goodTypeList[i].is_open == 1){
- this.checkedNight= true
- }
- if(i == 9 && this.goodTypeList[i].is_open == 1){
- this.checkedTen= true
- }
- if(i == 10 && this.goodTypeList[i].is_open == 1){
- this.checkedEleven= true
- }
- if(i == 11 && this.goodTypeList[i].is_open == 1){
- this.checkedTwenty= true
- }
- if(i == 12 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyOne= true
- }
- if(i == 13 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyTwo= true
- }
- if(i == 14 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyThree= true
- }
- if(i == 15 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyFour= true
- }
- if(i == 16 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyFive= true
- }
- if(i == 17 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentySix= true
- }
- if(i == 18 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentySeven= true
- }
- if(i == 19 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyEight= true
- }
- if(i == 20 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyNight= true
- }
-
- }
- this.startDialogVisibleOne = true
- }
- })
- },
- saveHisDialysis(){
- var index = 0
- var arr = []
- if(this.checkedOne == true){
- index = 0
- }else{
- index = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_one = 0
- if(this.checkedTwo == true){
- index_one = 1
- }else{
- index_one = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_one == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_two = 0
- if(this.checkedThree == true){
- index_two = 2
- }else{
- index_two = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_two == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_three = 0
- if(this.checkedFour == true){
- index_three = 3
- }else{
- index_three = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_three == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_four = 0
- if(this.checkedFive == true){
- index_four = 4
- }else{
- index_four = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_four == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_five = 0
- if(this.checkedSix == true){
- index_five = 5
- }else{
- index_five = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_five == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_six = 0
- if(this.checkedSeven == true){
- index_six = 6
- }else{
- index_six = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_six == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_seven = 0
- if(this.checkedEnight == true){
- index_seven = 7
- }else{
- index_seven = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_seven == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_eight =0
-
- if(this.checkedNight == true){
- index_eight = 8
- }else{
- index_eight = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_eight == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_night = 0
- if(this.checkedTen == true){
- index_night = 9
- }else{
- index_night = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_night == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_ten = 0
- if(this.checkedEleven == true){
- index_ten = 10
- }else{
- index_ten = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_ten == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_eleven =0
- if(this.checkedTwenty == true){
- index_eleven = 11
- }else{
- index_eleven = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_eleven == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_one = 0
- if(this.checkedTwentyOne == true){
- index_twenty_one = 12
- }else{
- index_twenty_one = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_one == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_two = 0
- if(this.checkedTwentyTwo == true){
- index_twenty_two = 13
- }else{
- index_twenty_two = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_two == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_three = 0
- if(this.checkedTwentyThree == true){
- index_twenty_three = 14
- }else{
- index_twenty_three = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_three == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_four = 0
- if(this.checkedTwentyFour == true){
- index_twenty_four = 15
- }else{
- index_twenty_four = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_four == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_five = 0
- if(this.checkedTwentyFive == true){
- index_twenty_five = 16
- }else{
- index_twenty_five = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_five == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_six = 0
- if(this.checkedTwentySix == true){
- index_twenty_six = 17
- }else{
- index_twenty_six = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_six == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_seven = 0
- if(this.checkedTwentySeven == true){
- index_twenty_seven = 18
- }else{
- index_twenty_seven = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_seven == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_eight = 0
- if(this.checkedTwentyEight == true){
- index_twenty_eight = 19
- }else{
- index_twenty_eight = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_eight == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_night =0
- if(this.checkedTwentyNight == true){
- index_twenty_night = 20
- }else{
- index_twenty_night = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_night == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var params = {
- ids:arr.join(","),
- }
- console.log("params23322322332",params)
- saveHisDialysis(params).then(response=>{
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.$message.success("保存成功!")
- this.startDialogVisibleOne = false
- this.getlist()
- }
- })
-
- },
- getTypeName(val,patient_id){
-
- var str = ""
- var arrNew = []
- if(val.project!=null){
- if(val.patient_id == patient_id){
- var arr = []
- if(val.project!=null){
- for(let i=0;i<val.project.length;i++){
- arr.push(val.project[i])
- }
- for(let i=0;i<arr.length;i++){
- arr[i].good_type_id = 0
- arr[i].good_type_id = arr[i].good_info.good_type_id
- }
-
- let dataInfo = {}
- arr.forEach((item, index) => {
- let { good_type_id } = item
- if (!dataInfo[good_type_id]) {
- dataInfo[good_type_id] = {
- good_type_id:item.good_type_id,
- child: [],
- count:0,
- specification_name:item.good_info.specification_name,
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<arr.length;j++){
- if(newArr[i].good_type_id == arr[j].good_type_id){
- newArr[i].child.push(arr[j])
- }
- }
- }
-
- if(newArr!=null && newArr.length > 0){
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<newArr[i].child.length;j++){
- newArr[i].count += parseInt(newArr[i].child[j].count)
- }
- }
- }
-
- if(newArr!=null && newArr.length >0){
- for(let i=0;i<newArr.length;i++){
- arrNew.push(newArr[i])
- }
- }
-
- }
- }
-
- return arrNew
-
- }
-
- },
- getStr(good_type_id,arrNew,patient_id){
- // console.log("ARR233323",arrNew)
- var arr= []
- var str = ""
- if(arrNew!=null && arrNew.length > 0){
- for(let i=0;i<arrNew.length;i++){
- arrNew[i].good_type_id = 0
- arrNew[i].good_type_id = arrNew[i].good_info.good_type_id
- arrNew[i].good_id = 0
- arrNew[i].good_id = arrNew[i].good_info.id
- if(arrNew[i].patient_id == patient_id && arrNew[i].good_info.good_type_id == good_type_id){
- arr.push(arrNew[i])
- }
- }
- }
-
- let dataInfo = {}
- if(arr!=null && arr.length > 0){
- arr.forEach((item, index) => {
- let { good_id } = item
- if (!dataInfo[good_id]) {
- dataInfo[good_id] = {
- good_id:item.good_id,
- child: [],
- count:0,
- specification_name:item.good_info.specification_name
- }
- }
- })
- let newArr = Object.values(dataInfo)
- console.log("newArr",newArr)
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if( arr[i].good_info.id == newArr[j].good_id){
- newArr[j].child.push(arr[i])
- }
- }
- }
-
- if(newArr!=null && newArr.length > 0){
- for(let j=0;j<newArr.length;j++){
- for(let z=0;z<newArr[j].child.length;z++){
- newArr[j].count += parseInt(newArr[j].child[z].count)
- }
- }
- for(let j=0;j<newArr.length;j++){
- str += newArr[j].specification_name + "*" + newArr[j].count + " "
- }
- }
- }
-
- return str
- }
- }
- }
- </script>
-
-
- <style lang="scss" scoped>
- .page_consumables {
-
- .clearfix:after {
- content: none;
- }
-
- }
- </style>
|