You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2005 lines
66 KiB
2005 lines
66 KiB
<template>
|
|
<div class="box">
|
|
<div style="width: 95%">
|
|
<el-card>
|
|
<div class="publiccss">组合项目</div>
|
|
<div style="display: flex;margin-top:7px;">
|
|
<div style="width: 15%;">
|
|
<div>
|
|
<el-select v-model="department" placeholder="请选择项目类别" filterable :filter-method="remoteMethodes" default-first-option @change="quckDepartments" clearable>
|
|
<el-option
|
|
v-for="item in quckDepartment"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
<div :style="'margin-top: 10px;overflow: scroll;border: 1px solid;height:'+ (window.pageHeight < 600 ? 410 : window.pageHeight - 200) + 'px;'">
|
|
<el-tree
|
|
:data="itemTypeId"
|
|
:props="treeprops"
|
|
@node-click="treeclick"
|
|
node-key="id"
|
|
ref="itemType"
|
|
highlight-current
|
|
auto-expand-parent
|
|
></el-tree>
|
|
</div>
|
|
</div>
|
|
<div style="width:85%;margin-left:5px;">
|
|
<el-table
|
|
:data="tableData"
|
|
style="width: 100%;"
|
|
row-key="id"
|
|
:height="window.pageHeight < 668 ? 200:(window.pageHeight - 120 - 358)"
|
|
class="el-table__body-wrapper tbody"
|
|
@row-click="rowick"
|
|
highlight-current-row
|
|
:row-style="{ height: '40px' }"
|
|
ref="tableData"
|
|
border
|
|
>
|
|
<el-table-column prop="id" label="编号" width="320">
|
|
</el-table-column>
|
|
<el-table-column prop="displayName" label="名称" width="">
|
|
</el-table-column>
|
|
<el-table-column prop="creatorName" label="创建者" width="">
|
|
</el-table-column>
|
|
<el-table-column prop="lastModifierName" label="修改者" width="">
|
|
</el-table-column>
|
|
<el-table-column prop="creationTime" label="创建时间" width="200">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.creationTime | dateFormat }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="lastModificationTime"
|
|
label="修改时间"
|
|
width="200"
|
|
>
|
|
<template slot-scope="scope">
|
|
{{ scope.row.lastModificationTime | dateFormat }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作">
|
|
<template>
|
|
<el-tag
|
|
class="move"
|
|
style="
|
|
cursor: move;
|
|
margin-left: 15px;
|
|
background-color: rgb(245, 245, 245);
|
|
border: none;
|
|
"
|
|
draggable="true"
|
|
>
|
|
<i
|
|
class="el-icon-d-caret"
|
|
style="width: 1rem; height: 1rem; color: rgb(113, 113, 113)"
|
|
></i>
|
|
</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!-- table页 -->
|
|
<el-tabs v-model="activeName">
|
|
<el-tab-pane label="项目明细" name="first">
|
|
<div>
|
|
<span style="margin-top: 10px; padding: 5px; margin-left: 11.7%"
|
|
>项目类别</span
|
|
>
|
|
<el-select
|
|
v-model="values"
|
|
placeholder="请选择"
|
|
@change="ischangs"
|
|
style="margin-top: 5px"
|
|
filterable :filter-method="remoteMethod" default-first-option clearable
|
|
>
|
|
<el-option
|
|
v-for="item in projectid"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
<span style="margin-left: 18.5%; padding: 5px">搜索选择</span>
|
|
<el-select
|
|
value-key="id"
|
|
@change="selectitem"
|
|
filterable
|
|
v-model="flitvalues"
|
|
placeholder="请选择"
|
|
style="margin-top: 5px"
|
|
:filter-method="remoteMethods" default-first-option clearable
|
|
ref="quickAsbOCX"
|
|
>
|
|
<el-option
|
|
v-for="item in filetelists"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
<div class="mainbox">
|
|
<div class="mainleftbox">
|
|
<!-- <div class="weixuan">未选项目</div>
|
|
<div
|
|
v-for="(item, index) in leftdata"
|
|
:key="index"
|
|
@click="clickPaixu(item, index)"
|
|
@dblclick="shuanji(item, index)"
|
|
:class="num === index ? 'activetext' : ''"
|
|
style=""
|
|
>
|
|
<div>{{ item.displayName }}</div>
|
|
</div> -->
|
|
<el-table :data="leftdata" :height="window.pageHeight < 668 ? 200:(window.pageHeight - 121 - 358)" @row-dblclick="dbClickChoosedAsb" border @selection-change="handleSelectionChange" @row-click="chooseAsbItem" highlight-current-row>
|
|
<el-table-column type="index" align="center" label="序号"/>
|
|
<el-table-column prop="displayName" label="未选项目" />
|
|
</el-table>
|
|
</div>
|
|
<div class="Selectbutton">
|
|
<div style="">
|
|
<el-button @click="addall" style="width:111px;"
|
|
>全添加<i class="el-icon-caret-right"></i
|
|
><i class="el-icon-caret-right"></i
|
|
></el-button>
|
|
</div>
|
|
<!-- <div style="margin-top: 18px">
|
|
<el-button @click="addobj" style="width: 111px"
|
|
>添加<i class="el-icon-caret-right"></i>
|
|
</el-button>
|
|
</div>
|
|
<div style="margin-top: 18px">
|
|
<el-button @click="removeright" style="width: 111px"
|
|
>移去<i class="el-icon-caret-left"></i>
|
|
</el-button>
|
|
</div> -->
|
|
<div style="margin-top: 18px">
|
|
<el-button @click="addAbs" style="width: 111px"
|
|
>添加<i class="el-icon-caret-right"></i>
|
|
</el-button>
|
|
</div>
|
|
<div style="margin-top: 18px">
|
|
<el-button @click="delAbs" style="width: 111px"
|
|
>移除<i class="el-icon-caret-left"></i>
|
|
</el-button>
|
|
</div>
|
|
<div style="margin-top: 18px">
|
|
<el-button @click="allclear" style="width:111px;"
|
|
>全移除<i class="el-icon-caret-left"></i
|
|
><i class="el-icon-caret-left"></i>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="mainleftbox">
|
|
<!-- <div class="weixuan">已选项目</div>
|
|
<div
|
|
v-for="(item, index) in rightdata"
|
|
:key="index"
|
|
@click="rightindex(item, index)"
|
|
@dblclick="rightdelite(item, index)"
|
|
:class="nums === index ? 'activetext' : ''"
|
|
>
|
|
<div>{{ item.displayName }}</div>
|
|
</div> -->
|
|
<el-table :data="rightdata" :height="window.pageHeight < 668 ? 200:(window.pageHeight - 121 - 358)" width="100%" @row-dblclick="removeAbs" border
|
|
@selection-change="selecteditems" @row-click="removeAsbItem" highlight-current-row>
|
|
<el-table-column type="index" align="center" label="序号"/>
|
|
<el-table-column label="已选项目" prop="displayName" />
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
<!-- 指引单信息 -->
|
|
<el-tab-pane label="指引信息" name="second">
|
|
<div style="display: flex; width: 100%">
|
|
<div style="width: 95%">
|
|
<el-form ref="guidanceinformation" :rules="guidelinesRules" :model="formdata">
|
|
<el-table
|
|
:data="formdata.guidanceinformationdata"
|
|
style="width: 100%"
|
|
highlight-current-row
|
|
@row-click="guiderow"
|
|
:row-class-name="tableRowClassName"
|
|
:height="window.pageHeight < 668 ? 200:(window.pageHeight - 70 - 358)"
|
|
ref="guidanceinformationdata"
|
|
class="guidelines"
|
|
border
|
|
>
|
|
<el-table-column label="体检中心" width="200">
|
|
<template slot-scope="scope">
|
|
<el-form-item :prop="'guidanceinformationdata.' + scope.$index + '.organizationUnitId'" :rules="guidelinesRules.organizationUnitId">
|
|
<el-select v-model="scope.row.organizationUnitId">
|
|
<el-option v-for="item in organizationUnitdata" :key="item.id" :label="item.displayName" :value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="适用性别" width="200">
|
|
<template slot-scope="scope">
|
|
<el-form-item :prop="'guidanceinformationdata.' + scope.$index + '.forSexId'" :rules="guidelinesRules.forSexId">
|
|
<el-select v-model="scope.row.forSexId">
|
|
<el-option v-for="item in forsexdata" :key="item.id" :label="item.displayName" :value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="指引信息">
|
|
<template slot-scope="scope">
|
|
<el-form-item :prop="'guidanceinformationdata.' + scope.$index + '.guide'" :rules="guidelinesRules.guide">
|
|
<el-input v-model="scope.row.guide" required />
|
|
</el-form-item>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-form>
|
|
</div>
|
|
<div>
|
|
<el-button
|
|
type=""
|
|
@click="createabulletbox"
|
|
style="margin-top: 50px; margin-left: 30px"
|
|
class="commonbutton"
|
|
>新增</el-button
|
|
>
|
|
<div style="margin-top: 10px; margin-left: 30px">
|
|
<el-button
|
|
type=""
|
|
@click="deleteguidelines"
|
|
class="commonbutton"
|
|
>删除</el-button
|
|
>
|
|
</div>
|
|
<div style="margin-top: 10px; margin-left: 30px">
|
|
<el-button
|
|
type=""
|
|
@click="saveguidelines"
|
|
class="commonbutton"
|
|
>保存</el-button
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 科室改为体检中心 -->
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</div>
|
|
<!-- 新增或者编辑弹框 -->
|
|
<el-dialog
|
|
:title="title == 1 ? '新增' : '编辑'"
|
|
:visible.sync="dialogVisible"
|
|
width="70%"
|
|
@close="bindidclose"
|
|
:close-on-click-modal="false"
|
|
>
|
|
<el-form
|
|
:model="form"
|
|
:rules="rules"
|
|
ref="ruleForm"
|
|
label-width="100px"
|
|
>
|
|
<el-row>
|
|
<el-col :span="10">
|
|
<el-form-item label="项目编号" prop="">
|
|
<el-input v-model="form.id" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="项目类别" prop="itemTypeId">
|
|
<!-- <el-select v-model="form.itemTypeId" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in itemTypeId"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-cascader
|
|
v-model="form.itemTypeId"
|
|
:options="itemTypeId"
|
|
:props="{
|
|
value: 'id',
|
|
label: 'displayName',
|
|
children: 'treeChildren'
|
|
}">
|
|
</el-cascader>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="名称" prop="displayName">
|
|
<el-input
|
|
v-model="form.displayName"
|
|
ref="refinput"
|
|
@input="$event=> changeUpdate($event)"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="简称" prop="">
|
|
<el-input v-model="form.shortName"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="适用性别" prop="">
|
|
<el-select v-model="form.forSexId" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in forSexId"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="价格" prop="">
|
|
<el-input v-model="form.price" type="number"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="仪器类别" prop="">
|
|
<el-select v-model="form.deviceTypeId" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in deviceTypeId"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="发票类别" prop="invoiceItemTypeId">
|
|
<el-select
|
|
v-model="form.invoiceItemTypeId"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option
|
|
v-for="item in invoiceItemTypeId"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item
|
|
label="项目结果合并"
|
|
prop=""
|
|
label-width="110px"
|
|
>
|
|
<!-- <el-select
|
|
v-model="form.isItemResultMerger"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option
|
|
v-for="item in isItemResultMerger"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-checkbox v-model="form.isItemResultMergerBox" @change="changeBox('isItemResultMerger')"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="餐前项目" prop="">
|
|
<!-- <el-select v-model="form.isBeforeEat" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in isBeforeEat"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-checkbox v-model="form.isBeforeEatBox" @change="changeBox('isBeforeEat')"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="临床意义" prop="">
|
|
<el-input v-model="form.clinicalMeaning" type="textarea" :autosize="{ minRows: 2, maxRows: 2}"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="默认结果" prop="" class="my-el-form-item">
|
|
<!-- <el-input v-model="form.defaultResult"></el-input> -->
|
|
<div style="display: flex;justify-content: center;">
|
|
<el-input v-model="form.defaultResult" type="textarea" :autosize="{ minRows: 1, maxRows: 1}"/>
|
|
<el-select
|
|
v-model="form.defaultResult"
|
|
style="width: 40px;"
|
|
class="downText"
|
|
>
|
|
<el-option
|
|
v-for="item in defaultResult"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.label"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="启用诊断" prop="">
|
|
<!-- <el-select
|
|
v-model="form.isDiagnosisFunction"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option
|
|
v-for="item in isDiagnosisFunction"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-checkbox v-model="form.isDiagnosisFunctionBox" @change="changeBox('isDiagnosisFunction')"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="诊断函数" prop="">
|
|
<el-input
|
|
v-model="form.diagnosisFunction"
|
|
:disabled="disableddiagnosisFunction"
|
|
>
|
|
<el-button slot="append" icon="el-icon-more" v-if="form.isDiagnosisFunctionBox" @click="diagnosisFunctionBox=true"></el-button>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item
|
|
label="函数处理完毕"
|
|
prop=""
|
|
label-width="110px"
|
|
>
|
|
<!-- <el-select
|
|
v-model="form.isContinueProcess"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option
|
|
v-for="item in isContinueProcess"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-checkbox v-model="form.isContinueProcessBox" @change="changeBox('isContinueProcess')"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="候诊时间" prop="">
|
|
<el-input v-model="form.queueTime" type="nember"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="体检报告" prop="">
|
|
<!-- <el-select
|
|
v-model="form.isPictureRotate"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option
|
|
v-for="item in isPictureRotate"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-checkbox v-model="form.isPictureRotateBox" @change="changeBox('isPictureRotate')"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="检查项目" prop="">
|
|
<!-- <el-select v-model="form.isCheck" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in isCheck"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-checkbox v-model="form.isCheckBox" @change="changeBox('isCheck')"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="启用" prop="">
|
|
<!-- <el-select v-model="form.isActive" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in isActive"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
>
|
|
</el-option>
|
|
</el-select> -->
|
|
<el-checkbox v-model="form.isActiveBox" @change="changeBox('isActive')"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-divider></el-divider>
|
|
<el-row>
|
|
<el-col :span="5">
|
|
<el-form-item label="创建者">
|
|
<el-input v-model="form.creatorName" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="7">
|
|
<el-form-item label="创建时间" style="margin-left: -5%">
|
|
<el-input
|
|
:value="form.creationTime | dateFormat"
|
|
disabled
|
|
style="width: 90%"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="修改者" style="margin-left: -25%">
|
|
<el-input v-model="form.creatorName" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="7">
|
|
<el-form-item label="修改时间" style="margin-left: -5%">
|
|
<el-input
|
|
:value="form.lastModificationTime | dateFormat"
|
|
disabled
|
|
style="width: 90%"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
<el-button type="primary" @click="addoredit">确 定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
<!-- 指引信息新增修改弹框 -->
|
|
<el-dialog
|
|
:title="guidetitle == 1 ? '指引信息新增' : '指引信息修改'"
|
|
:visible.sync="guidetitledialogVisible"
|
|
width="50%"
|
|
>
|
|
<el-row>
|
|
<el-form
|
|
:model="guideform"
|
|
:rules="guiderules"
|
|
ref="ruleForms"
|
|
label-width="100px"
|
|
class="demo-ruleForm"
|
|
>
|
|
<el-col :span="12">
|
|
<el-form-item label="体检中心" prop="organizationUnitId">
|
|
<el-select
|
|
v-model="guideform.organizationUnitId"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option
|
|
v-for="item in organizationUnitdata"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<!-- <el-col :span="12">
|
|
<el-form-item label="组合项目" prop="asbitemId">
|
|
<el-select v-model="guideform.asbitemId" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in asbitemdata"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col> -->
|
|
<el-col :span="12">
|
|
<el-form-item label="适用性别" prop="forSexId">
|
|
<el-select v-model="guideform.forSexId" placeholder="请选择">
|
|
<el-option
|
|
v-for="item in forsexdata"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="指引内容" prop="guide">
|
|
<el-input
|
|
v-model="guideform.guide"
|
|
placeholder="请输入内容"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-form>
|
|
</el-row>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="guidetitledialogVisible = false">取 消</el-button>
|
|
<el-button type="primary" @click="determineguidelines">确 定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
<!-- 诊断函数弹框 -->
|
|
<el-dialog
|
|
title="诊断函数设置"
|
|
:visible.sync="diagnosisFunctionBox"
|
|
width="50%"
|
|
:close-on-click-modal="false"
|
|
>
|
|
<el-form label-width="110px">
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="诊断函数">
|
|
<el-input type="textarea" v-model="diagnosisFunctionText" :autosize="{ minRows: 12, maxRows: 12}"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="diagnosisFunctionBox = false,diagnosisFunctionText=''">取 消</el-button>
|
|
<el-button type="primary" @click="OnsubmitDiagnosis">确 定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
<!-- 按钮区域 -->
|
|
<div style="margin-left: 10px; margin-top: 3%">
|
|
<el-button type="" @click="addll" class="commonbutton">新增</el-button>
|
|
<div style="margin-top: 10px">
|
|
<el-button type="" @click="editpopup" class="commonbutton"
|
|
>编辑</el-button
|
|
>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button type="" @click="deleteid" class="commonbutton"
|
|
>删除</el-button
|
|
>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button type="" @click="topping" class="commonbutton"
|
|
>置顶</el-button
|
|
>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button type="" @click="setlow" class="commonbutton">置底</el-button>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button
|
|
type=""
|
|
:disabled="isshow"
|
|
@click="assertion"
|
|
class="commonbutton"
|
|
>排序</el-button
|
|
>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button
|
|
type=""
|
|
:disabled="isshow"
|
|
@click="cancellation"
|
|
class="commonbutton"
|
|
>取消</el-button
|
|
>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button type="" :disabled="isdislob" @click="Onsubmit" class="commonbutton">确定项目</el-button>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button type="" :disabled="isdislob" @click="projectCancellation" class="commonbutton">取消项目</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { mapState } from "vuex";
|
|
import Sortable from "sortablejs";
|
|
import { getapi, postapi, deletapi } from "@/api/api";
|
|
import { examinationgender, instrumentlist } from "@/request/systemapi";
|
|
import { deepCopy,objCopy} from "../../utlis/proFunc";
|
|
import {
|
|
getporjectlists,
|
|
groupsandlist,
|
|
projectlist,
|
|
invoicetypelist,
|
|
newcombination,
|
|
asbitemgetid,
|
|
updateombination,
|
|
samplesetlow,
|
|
deletescombinationprojectid,
|
|
combination,
|
|
} from "@/request/commonapi";
|
|
export default {
|
|
data() {
|
|
return {
|
|
guiderules: {
|
|
organizationUnitId: [
|
|
{
|
|
required: true,
|
|
message: "请选择体检单位",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
asbitemId: [
|
|
{
|
|
required: true,
|
|
message: "请选择组合项目",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
forSexId: [
|
|
{
|
|
required: true,
|
|
message: "请选择组适用性别",
|
|
trigger: "change",
|
|
},
|
|
],
|
|
guide: [{ required: true, message: "请输入指引内容", trigger: "blur" }],
|
|
},
|
|
guidetitle: 1,
|
|
guideform: {
|
|
organizationUnitId: "",
|
|
asbitemId: "",
|
|
forSexId: "",
|
|
guide: "",
|
|
}, //指引信息的数据对象
|
|
organizationUnitdata: [], //体检中心
|
|
guidetitledialogVisible: false,
|
|
formdata:{
|
|
guidanceinformationdata: []
|
|
},
|
|
activeName: "first",
|
|
isdislob: true,
|
|
filetelists: [],
|
|
flitvalues: [],
|
|
num: 0,
|
|
isshow: true,
|
|
values: [],
|
|
projectid: [],
|
|
initprojectid:[],
|
|
rules: {
|
|
displayName: [
|
|
{ required: true, message: "请输入名称", trigger: "blur" },
|
|
],
|
|
shortName: [{ required: true, message: "请输入简称", trigger: "blur" }],
|
|
forSexId: [
|
|
{ required: true, message: "请选择适用性别", trigger: "blur" },
|
|
],
|
|
itemTypeId: [
|
|
{ required: true, message: "请选择项目类别", trigger: "blur" },
|
|
],
|
|
price: [{ required: true, message: "请输入价格", trigger: "blur" }],
|
|
deviceTypeId: [
|
|
{ required: true, message: "请选择仪器类别", trigger: "blur" },
|
|
],
|
|
invoiceItemTypeId: [
|
|
{ required: true, message: "请选择发票类别", trigger: "blur" },
|
|
],
|
|
isItemResultMerger: [
|
|
{ required: true, message: "请选择项目结果", trigger: "blur" },
|
|
],
|
|
isBeforeEat: [
|
|
{ required: true, message: "请选择餐前项目", trigger: "change" },
|
|
],
|
|
clinicalMeaning: [
|
|
{ required: true, message: "请输入临床意义", trigger: "blur" },
|
|
],
|
|
defaultResult: [
|
|
{ required: true, message: "请输入默认结果", trigger: "blur" },
|
|
],
|
|
queueTime: [
|
|
{ required: true, message: "请输入候诊时间", trigger: "blur" },
|
|
],
|
|
isDiagnosisFunction: [
|
|
{ required: true, message: "请选择启用诊断函数", trigger: "blur" },
|
|
],
|
|
diagnosisFunction: [
|
|
{ required: true, message: "请输入诊断函数", trigger: "blur" },
|
|
],
|
|
isContinueProcess: [
|
|
{
|
|
required: true,
|
|
message: "请选择诊断函数处理完毕后继续处理",
|
|
trigger: "blur",
|
|
},
|
|
],
|
|
isPictureRotate: [
|
|
{ required: true, message: "请选择体检报告图片旋", trigger: "blur" },
|
|
],
|
|
isCheck: [
|
|
{ required: true, message: "请选择是检查项目", trigger: "blur" },
|
|
],
|
|
isActive: [
|
|
{ required: true, message: "请选择是否启用", trigger: "blur" },
|
|
],
|
|
}, //表单校验对象
|
|
form: {
|
|
displayName: "",
|
|
shortName: "",
|
|
forSexId: "U",
|
|
itemTypeId: "",
|
|
price: "0",
|
|
deviceTypeId: null,
|
|
invoiceItemTypeId: "",
|
|
isItemResultMerger: "N",
|
|
isBeforeEat: "N",
|
|
clinicalMeaning: "",
|
|
defaultResult: "未见异常",
|
|
queueTime: "0",
|
|
isDiagnosisFunction: "N",
|
|
diagnosisFunction: "",
|
|
isContinueProcess: "N",
|
|
isPictureRotate: "N",
|
|
isCheck: "N",
|
|
isActive: "Y",
|
|
isActiveBox:true,
|
|
isBeforeEatBox:false,
|
|
isCheckBox:false,
|
|
isContinueProcessBox:false,
|
|
isDiagnosisFunctionBox:false,
|
|
isItemResultMergerBox:false,
|
|
isPictureRotateBox:false
|
|
},
|
|
forSexId: [], //性别
|
|
itemTypeId: [], //项目类别
|
|
deviceTypeId: [], //仪器类别
|
|
invoiceItemTypeId: [], //发票类别
|
|
isItemResultMerger: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //项目结果合并
|
|
isBeforeEat: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //餐前项目
|
|
isDiagnosisFunction: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //启用诊断函数
|
|
isContinueProcess: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //诊断函数处理完毕
|
|
isContinueProcess: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //诊断函数处理完毕后继续处理
|
|
isPictureRotate: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //体检报告图片旋转
|
|
isCheck: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //是检查项目
|
|
isActive: [
|
|
{
|
|
value: "Y",
|
|
label: "是",
|
|
},
|
|
{
|
|
value: "N",
|
|
label: "否",
|
|
},
|
|
], //是否启用
|
|
title: 1,
|
|
dialogVisible: false,
|
|
isshow: true,
|
|
tableHeight: window.innerHeight - 180, //表格动态高度
|
|
screenHeight: window.innerHeight, //内容区域高度
|
|
pages: {
|
|
Filter: "",
|
|
SkipCount: 0,
|
|
MaxResultCount: 100,
|
|
Sorting: "displayOrder desc",
|
|
},
|
|
tableData: [],
|
|
initTableData: [],
|
|
leftdata: [],
|
|
ary2: [],
|
|
ary1: [],
|
|
rightobj: {},
|
|
rightdata: [],
|
|
rightobj: {},
|
|
nums: 0,
|
|
itemid: "", //项目id
|
|
curRow: {},
|
|
asbitemdata: [], //组合项目
|
|
forsexdata: [], //适用性别
|
|
department:"",
|
|
quckDepartment:[],
|
|
treeprops: {
|
|
label: "displayName",
|
|
value: "id",
|
|
children: "treeChildren",
|
|
},
|
|
defaultResult: [
|
|
{
|
|
value: "1",
|
|
label: "未见异常",
|
|
},
|
|
{
|
|
value: "2",
|
|
label: "正常",
|
|
},
|
|
{
|
|
value: "3",
|
|
label: "阴性",
|
|
},
|
|
{
|
|
value: "4",
|
|
label: "无",
|
|
},
|
|
{
|
|
value: "5",
|
|
label: "(—)",
|
|
},
|
|
{
|
|
value: "6",
|
|
label: "-",
|
|
},
|
|
],
|
|
diagnosisFunctionBox:false,
|
|
diagnosisFunctionText:"",
|
|
disableddiagnosisFunction:true,
|
|
initfiletelists:[],
|
|
initItemTypeId:"",
|
|
guidelinesRules:{
|
|
organizationUnitId: [
|
|
{ required: true, message: "请选择体检中心", trigger: "change" },
|
|
],
|
|
forSexId: [
|
|
{ required: true, message: "请选择性别", trigger: "change" },
|
|
],
|
|
guide: [
|
|
{ required: true, message: "请输入指引信息", trigger: "blur" },
|
|
]
|
|
}
|
|
};
|
|
},
|
|
created() {
|
|
// this.getlist();
|
|
this.gitprojectcategory();
|
|
},
|
|
mounted() {
|
|
this.rowDrop();
|
|
this.gitfleslist();
|
|
this.typeid()
|
|
},
|
|
computed: {
|
|
...mapState(["window"]),
|
|
},
|
|
methods: {
|
|
removeAsbItem(row){
|
|
this.ary2=[row]
|
|
},
|
|
chooseAsbItem(row){
|
|
this.ary1=[row]
|
|
},
|
|
changeUpdate(e){
|
|
this.$delete(this.form,'displayName')
|
|
this.$set(this.form,'displayName',e)
|
|
},
|
|
projectCancellation(){
|
|
if(this.form.id==undefined || this.form.id==""){
|
|
this.$message.warning('请选择组合项目')
|
|
this.isdislob=true
|
|
}else{
|
|
this.rowick(this.form)
|
|
this.isdislob=true
|
|
}
|
|
},
|
|
remoteMethods(keyWords) {
|
|
if (keyWords) {
|
|
this.filetelists = [];
|
|
this.initfiletelists.forEach(item => {
|
|
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
) {
|
|
this.filetelists.push(item);
|
|
}
|
|
});
|
|
} else {
|
|
this.filetelists = deepCopy(this.initfiletelists);
|
|
}
|
|
},
|
|
remoteMethod(keyWords) {
|
|
if (keyWords) {
|
|
this.projectid = [];
|
|
this.initprojectid.forEach(item => {
|
|
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
) {
|
|
this.projectid.push(item);
|
|
}
|
|
});
|
|
} else {
|
|
this.projectid = deepCopy(this.initprojectid);
|
|
}
|
|
},
|
|
OnsubmitDiagnosis(){
|
|
this.form.diagnosisFunction=this.diagnosisFunctionText
|
|
this.diagnosisFunctionText=''
|
|
this.diagnosisFunctionBox=false
|
|
console.log("设置诊断函数成功");
|
|
},
|
|
changeBox(type) {
|
|
//赋值
|
|
if(this.form[type+'Box']){
|
|
this.$delete(this.form,type)
|
|
this.$set(this.form,type,"Y")
|
|
}else{
|
|
this.$delete(this.form,type)
|
|
this.$set(this.form,type,"N")
|
|
}
|
|
},
|
|
typeid() {
|
|
projectlist().then((res) => {
|
|
this.itemTypeId = res.data;
|
|
this.itemTypeId=this.formatData(this.itemTypeId)
|
|
console.log(this.itemTypeId)
|
|
});
|
|
},
|
|
formatData(dataList){
|
|
for(let i=0;i<dataList.length;i++){
|
|
if(dataList[i].treeChildren.length<1){
|
|
dataList[i].treeChildren=undefined
|
|
}else{
|
|
this.formatData(dataList[i].treeChildren)
|
|
}
|
|
}
|
|
return dataList
|
|
},
|
|
treeclick(data) {
|
|
this.initItemTypeId=data.id
|
|
postapi('/api/app/asbitem/getasbitemlist',{itemTypeId:data.id}).then((res) => {
|
|
if(res.code != -1){
|
|
this.tableData = res.data;
|
|
this.initTableData=[...res.data]
|
|
}
|
|
});
|
|
this.curRow=this.$options.data().curRow
|
|
this.leftdata=this.$options.data().leftdata
|
|
this.rightdata=this.$options.data().rightdata
|
|
this.formdata=this.$options.data().formdata
|
|
this.values=this.$options.data().values
|
|
this.flitvalues=this.$options.data().flitvalues
|
|
},
|
|
remoteMethodes(keyWords) {
|
|
if (keyWords) {
|
|
this.quckDepartment = [];
|
|
this.initTableData.forEach(item => {
|
|
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|
|
) {
|
|
this.quckDepartment.push(item);
|
|
}
|
|
});
|
|
} else {
|
|
this.quckDepartment = deepCopy(this.initTableData);
|
|
}
|
|
},
|
|
quckDepartments(e){
|
|
if(e){
|
|
let currentKey=""
|
|
this.quckDepartment.forEach(item=>{
|
|
if(e==item.id){
|
|
currentKey=item.itemTypeId
|
|
this.initItemTypeId=item.itemTypeId
|
|
}
|
|
})
|
|
this.$refs['itemType'].setCurrentKey(currentKey)
|
|
let selected = this.$refs['itemType'].getCurrentNode();
|
|
if (this.$refs['itemType'].getNode(selected) && this.$refs['itemType'].getNode(selected).parent) {
|
|
this.expandParents(this.$refs['itemType'].getNode(selected).parent);
|
|
}
|
|
// getapi(`/api/app/asbitem/in-item-type/${currentKey}`)
|
|
postapi('/api/app/asbitem/getasbitemlist',{itemTypeId:currentKey}).then((res) => {
|
|
this.tableData = res.data;
|
|
this.tableData.forEach((item,index)=>{
|
|
if(e==item.id){
|
|
this.$refs['tableData'].setCurrentRow(item);
|
|
this.rowick(item)
|
|
this.tableScrollToRow(this.$refs.tableData, index)
|
|
}
|
|
})
|
|
});
|
|
}else{
|
|
this.remoteMethodes()
|
|
}
|
|
},
|
|
expandParents(node) {
|
|
node.expanded = true;
|
|
if (node.parent) {
|
|
this.expandParents(node.parent);
|
|
}
|
|
},
|
|
tableScrollToRow(tableElement, rowIndex){
|
|
let theTableRows = tableElement.bodyWrapper.querySelectorAll('.el-table__body tbody .el-table__row')
|
|
let scrollTop = 0
|
|
for (let i = 0; i < theTableRows.length; i++) {
|
|
if (i === rowIndex) {
|
|
break
|
|
}
|
|
scrollTop += theTableRows[i].offsetHeight
|
|
}
|
|
tableElement.bodyWrapper.scrollTop = scrollTop
|
|
},
|
|
guiderow(row) {
|
|
this.guideform = row;
|
|
},
|
|
tableRowClassName({ row, rowIndex }) {
|
|
row.index = rowIndex;
|
|
},
|
|
//指引信息删除
|
|
deleteguidelines() {
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
if (this.guideform.asbitemId == "" || this.guideform.asbitemId==undefined) {
|
|
this.$message.warning("请选择删除的数据");
|
|
} else {
|
|
this.$confirm("此操作确定后将永久删除该记录, 是否继续?", "提示", {
|
|
confirmButtonText: "是",
|
|
cancelButtonText: "否",
|
|
type: "warning",
|
|
}).then(() => {
|
|
this.formdata.guidanceinformationdata.splice(this.guideform.index, 1);
|
|
}).catch((err) => {
|
|
if(err == 'cancel'){
|
|
this.$message.info("已取消删除");
|
|
}
|
|
});
|
|
}
|
|
}
|
|
},
|
|
//确定新增或者修改指引ruleForm
|
|
determineguidelines() {
|
|
this.$refs.ruleForms.validate((v) => {
|
|
if (v) {
|
|
postapi("/api/app/asbitem-guide", this.guideform).then((res) => {
|
|
// if (res.code == 1) {
|
|
this.guidetitledialogVisible = false;
|
|
this.getobtainguidance();
|
|
console.log("创建成功");
|
|
// }
|
|
});
|
|
}
|
|
});
|
|
},
|
|
//新增或者编辑需要的api中的id
|
|
publicapi() {
|
|
//获取体检中心
|
|
getapi("/api/app/organization-units/by-code-all").then((res) => {
|
|
this.organizationUnitdata = res.data;
|
|
});
|
|
//获取组合项目 {isFilterActive:'Y'}
|
|
postapi('/api/app/asbitem/getasbitemlist').then(res =>{
|
|
this.asbitemdata = res.data
|
|
})
|
|
//获取适用性别
|
|
getapi("/api/app/for-sex").then((res) => {
|
|
this.forsexdata = res.data;
|
|
});
|
|
},
|
|
//创建弹框
|
|
createabulletbox() {
|
|
// this.guidetitledialogVisible = true;
|
|
// this.guideform = {};
|
|
// this.guidetitle = 1;
|
|
// this.publicapi();
|
|
console.log(this.curRow.id)
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
let peisid=""
|
|
if(window.sessionStorage.getItem("peisid")==="null" || window.sessionStorage.getItem("peisid")===undefined || window.sessionStorage.getItem("peisid")===null){
|
|
peisid=""
|
|
}else{
|
|
peisid=window.sessionStorage.getItem("peisid")
|
|
}
|
|
this.formdata.guidanceinformationdata.push({
|
|
organizationUnitId: peisid,
|
|
asbitemId:this.curRow.id,
|
|
forSexId: "A",
|
|
guide: "",
|
|
});
|
|
}
|
|
},
|
|
saveguidelines(){
|
|
this.$refs["guidanceinformation"].validate((valid, fields) => {
|
|
if (!valid){
|
|
this.$message.warning(fields[Object.keys(fields)[0]][0].message);
|
|
return false;
|
|
}
|
|
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
let sampleGroupId = this.curRow.id;
|
|
let sdate = [];
|
|
this.formdata.guidanceinformationdata.forEach((element) => {
|
|
sdate.push({ organizationUnitId: element.organizationUnitId, forSexId: element.forSexId,guide:element.guide });
|
|
});
|
|
postapi("/api/app/asbitemguide/createasbitemguidemany", {
|
|
asbitemId:sampleGroupId,
|
|
deatils:sdate
|
|
}).then((res) => {
|
|
if(res.code!=-1){
|
|
console.log("保存成功");
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
//获取指引信息guidanceinformationdata
|
|
getobtainguidance(e) {
|
|
if(e!=undefined || e!=""){
|
|
getapi( `/api/app/asbitemguide/getlistinasbitemid?AsbitemId=${e}`).then((res) => {
|
|
if(res.data!=-1){
|
|
this.formdata.guidanceinformationdata = [...res.data];
|
|
}
|
|
});
|
|
}else{
|
|
this.$message.warning("请先选择组合项目")
|
|
}
|
|
},
|
|
//获取项目
|
|
gitfleslist() {
|
|
let pages={
|
|
Filter: "",
|
|
Sorting: "",
|
|
SkipCount: 0,
|
|
MaxResultCount: 100
|
|
}
|
|
getporjectlists(pages).then((res) => {
|
|
this.filetelists = res.data.items;
|
|
this.initfiletelists=[...res.data.items]
|
|
});
|
|
},
|
|
//搜索选择
|
|
selectitem(v) {
|
|
if(v){
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
this.itemid = v.id;
|
|
if(this.rightdata.length<1){
|
|
this.rightdata.push({ displayName: v.displayName,id:v.id });
|
|
this.isdislob=false
|
|
}else{
|
|
for(let i=0;i<this.rightdata.length;i++){
|
|
if(v.id===this.rightdata[i].id){
|
|
return this.$message.warning("已有该项目");
|
|
}
|
|
}
|
|
this.rightdata.push({ displayName: v.displayName,id:v.id });
|
|
this.isdislob=false
|
|
}
|
|
this.$nextTick(() => {
|
|
this.$refs['quickAsbOCX'].blur(); //total asbItemId
|
|
this.flitvalues = ''
|
|
this.filetelists = deepCopy(this.initfiletelists)
|
|
this.$refs['quickAsbOCX'].focus(); //total asbItemId
|
|
});
|
|
}
|
|
}else{
|
|
this.remoteMethods()
|
|
}
|
|
},
|
|
Onsubmit() {
|
|
let sampleGroupId = this.form.id;
|
|
let sdate = [];
|
|
// let sss = { itemId: this.itemid, asbitemId: sampleGroupId };
|
|
// sdate.push(sss);
|
|
this.rightdata.forEach((element) => {
|
|
sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
|
|
});
|
|
// this.leftdata.forEach((element) => {
|
|
// sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
|
|
// });
|
|
// this.leftdata.forEach((element) => {
|
|
// let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
|
|
// sdate.push(sss);
|
|
// });
|
|
// sdate.push(sss);
|
|
console.log({
|
|
asbitemI:sampleGroupId,
|
|
details:sdate
|
|
})
|
|
if(sampleGroupId== undefined || sampleGroupId==""){
|
|
this.$message.warning("请选择组合项目");
|
|
this.isdislob=true
|
|
}else{
|
|
postapi("/api/app/asbitemdetail/createasbitemdetailmany", {
|
|
asbitemId:sampleGroupId,
|
|
details:sdate
|
|
}).then((res) => {
|
|
if(res.code!=-1){
|
|
console.log("操作成功");
|
|
this.isdislob = true;
|
|
}
|
|
})
|
|
}
|
|
// console.log(sdate);
|
|
// if (sampleGroupId == undefined) {
|
|
// this.$message.warning("请选择列表");
|
|
// } else if (this.itemid == "") {
|
|
// this.$message.warning("请选择项目");
|
|
// } else {
|
|
// postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
|
|
// console.log("操作成功");
|
|
// this.isdislob = true;
|
|
// });
|
|
// }
|
|
},
|
|
dbClickChoosedAsb(row, column, event){
|
|
let index = this.leftdata.findIndex((arr) => arr.id == row.id);
|
|
this.leftdata.splice(index, 1);
|
|
this.rightdata.push(row);
|
|
this.isdislob = false;
|
|
},
|
|
handleSelectionChange(val){
|
|
this.ary1=val
|
|
},
|
|
addAbs(){
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
if(this.ary1.length<1){
|
|
this.$message.warning('请选择要添加的项目')
|
|
}else{
|
|
let temporaryLeft=[]
|
|
temporaryLeft = this.leftdata.filter(item => !this.ary1.some(ele=>ele.id === item.id));
|
|
this.leftdata=[...temporaryLeft]
|
|
this.ary1.forEach(item=>{
|
|
this.rightdata.push(item);
|
|
})
|
|
this.isdislob = false;
|
|
}
|
|
}
|
|
},
|
|
removeAbs(row){
|
|
let index = this.rightdata.findIndex((arr) => arr.id == row.id);
|
|
this.rightdata.splice(index, 1);
|
|
this.leftdata.push(row);
|
|
this.isdislob = false;
|
|
},
|
|
selecteditems(val){
|
|
this.ary2=val
|
|
},
|
|
delAbs(){
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
if(this.ary2.length<1){
|
|
this.$message.warning('请选择要移除的项目')
|
|
}else{
|
|
let temporaryRight=[]
|
|
temporaryRight = this.rightdata.filter(item => !this.ary2.some(ele=>ele.id === item.id));
|
|
this.rightdata=[...temporaryRight]
|
|
this.ary2.forEach(item=>{
|
|
this.leftdata.push(item);
|
|
})
|
|
this.isdislob = false;
|
|
}
|
|
}
|
|
},
|
|
//右侧双击移动删除
|
|
rightdelite(item, index) {
|
|
this.isdislob = false;
|
|
this.rightdata.splice(index, 1);
|
|
this.leftdata.push(item);
|
|
// this.updatedate();
|
|
},
|
|
//右侧点击选中
|
|
rightindex(item, index) {
|
|
this.nums = index;
|
|
this.leftobj = item;
|
|
// console.log(this.leftobj);
|
|
},
|
|
//左侧添加按钮
|
|
addobj() {
|
|
if (this.leftdata.length > 0) {
|
|
this.leftdata.splice(this.num, 1);
|
|
this.rightdata.push(this.rightobj);
|
|
this.isdislob = false;
|
|
}
|
|
},
|
|
//右移动
|
|
removeright() {
|
|
if (this.rightdata.length > 0) {
|
|
this.rightdata.splice(this.num, 1);
|
|
this.leftdata.push(this.leftobj);
|
|
this.isdislob = false;
|
|
// this.isdislob=false
|
|
this.updatedate();
|
|
}
|
|
},
|
|
//q全移去
|
|
allclear() {
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
if (this.rightdata.length > 0) {
|
|
this.rightdata.forEach(item=>{
|
|
this.leftdata.push(item);
|
|
})
|
|
this.rightdata=[]
|
|
this.isdislob = false;
|
|
}else{
|
|
this.$message.warning('没有可移除的项目')
|
|
}
|
|
}
|
|
},
|
|
//全添加
|
|
addall() {
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
if (this.leftdata.length > 0) {
|
|
this.leftdata.forEach(item=>{
|
|
this.rightdata.push(item);
|
|
})
|
|
this.leftdata=[]
|
|
this.isdislob = false;
|
|
}else{
|
|
this.$message.warning('没有可添加的项目')
|
|
}
|
|
}
|
|
},
|
|
//左侧双击事件
|
|
shuanji(item, index) {
|
|
console.log(item);
|
|
this.leftdata.splice(index, 1);
|
|
this.rightdata.push(item);
|
|
this.isdislob = false;
|
|
},
|
|
clickPaixu(item, index) {
|
|
this.rightobj = item;
|
|
this.num = index;
|
|
console.log(this.num);
|
|
},
|
|
//获取项目类别 3a0b0b10-719f-5824-6956-8cb70f204013 /api/app/item-type/by-code-all
|
|
gitprojectcategory() {
|
|
getapi("/api/app/item-type/by-code-all").then((res) => {
|
|
this.projectid = res.data;
|
|
this.initprojectid=[...res.data]
|
|
});
|
|
groupsandlist(this.pages).then((res) => {
|
|
this.initTableData = [...res.data.items];
|
|
this.quckDepartment=res.data.items;
|
|
console.log(res);
|
|
});
|
|
},
|
|
//ary1 需要追加的数据 ary2目标数组
|
|
updatedate() {
|
|
this.ary1.forEach((item) => {
|
|
let iscz = false;
|
|
this.ary2.forEach((item2) => {
|
|
if (item2.id == item.id) {
|
|
iscz = true;
|
|
}
|
|
});
|
|
if (!iscz) {
|
|
console.log(item.id);
|
|
this.ary2.push(item);
|
|
// this.allid.push({ id: item.id });
|
|
}
|
|
});
|
|
},
|
|
//项目类别选择
|
|
ischangs(v) {
|
|
if(v){
|
|
if(this.curRow.id==undefined || this.curRow.id==""){
|
|
this.$message.warning("请先选择组合项目")
|
|
}else{
|
|
getapi(`/api/app/item/in-item-type/${v}`).then((res) => {
|
|
let bq=[]
|
|
bq = res.data.filter(item => !this.rightdata.some(ele=>ele.id === item.id));
|
|
this.leftdata = [...bq];
|
|
});
|
|
}
|
|
}else{
|
|
this.remoteMethod()
|
|
}
|
|
},
|
|
bindidclose() {
|
|
this.form = {};
|
|
},
|
|
rowDrop() {
|
|
this.$nextTick(() => {
|
|
const tbody = document.querySelector(".el-table__body-wrapper tbody");
|
|
const _this = this;
|
|
Sortable.create(tbody, {
|
|
handle: ".move",
|
|
animation: 300,
|
|
onChoose({oldIndex}){
|
|
_this.$refs['tableData'].setCurrentRow(_this.tableData[oldIndex]);
|
|
_this.rowick(_this.tableData[oldIndex])
|
|
},
|
|
onEnd({ newIndex, oldIndex }) {
|
|
_this.isshow = false;
|
|
const currRow = _this.tableData.splice(oldIndex, 1)[0];
|
|
_this.tableData.splice(newIndex, 0, currRow);
|
|
_this.tableData.map((item, index) => {
|
|
if (index == newIndex && index == oldIndex) {
|
|
} else if (index == oldIndex) {
|
|
} else if (index == newIndex) {
|
|
}
|
|
});
|
|
console.log(_this.tableData.map((item) => item.displayOrder));
|
|
},
|
|
});
|
|
});
|
|
},
|
|
//取消按钮
|
|
cancellation() {
|
|
this.$message.info("操作取消");
|
|
this.isshow = true;
|
|
this.tableData=this.initTableData
|
|
},
|
|
//确定排序
|
|
assertion() {
|
|
const result = [];
|
|
this.tableData.forEach((item, index) => {
|
|
const currentDisplayOrder = this.initTableData[index].displayOrder;
|
|
if (item.displayOrder != currentDisplayOrder) {
|
|
result.push({ id: item.id, displayOrder: currentDisplayOrder });
|
|
}
|
|
});
|
|
combination({ itemList: result }).then((res) => {
|
|
console.log("操作成功");
|
|
this.isshow = true;
|
|
// this.getlist();
|
|
});
|
|
},
|
|
//置底
|
|
setlow() {
|
|
this.form = { ...this.curRow };
|
|
if (this.form.id == undefined) {
|
|
this.$message.warning("请选择操作的数据");
|
|
} else {
|
|
samplesetlow(this.form.id, 2).then((res) => {
|
|
if(res.code!=-1){
|
|
this.getItemIdList();
|
|
console.log("操作成功");
|
|
}
|
|
});
|
|
}
|
|
},
|
|
//置顶
|
|
topping() {
|
|
this.form = { ...this.curRow };
|
|
if (this.form.id == undefined) {
|
|
this.$message.warning("请选择操作的数据");
|
|
} else {
|
|
samplesetlow(this.form.id, 1).then((res) => {
|
|
if(res.code!=-1){
|
|
console.log("操作成功");
|
|
this.getItemIdList();
|
|
}
|
|
});
|
|
}
|
|
},
|
|
//删除
|
|
deleteid() {
|
|
this.form = { ...this.curRow };
|
|
if (this.form.id == undefined) {
|
|
this.$message.warning("请选择操作的数据");
|
|
} else {
|
|
this.$confirm("是否确认删除, 是否继续?", "提示", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
}).then(() => {
|
|
deletescombinationprojectid(this.form.id).then((res) => {
|
|
console.log(res);
|
|
if (res.code!=-1) {
|
|
console.log("删除成功");
|
|
this.getItemIdList();
|
|
Object.assign(this.$data.form, this.$options.data().form)
|
|
this.curRow=this.$options.data().curRow
|
|
}
|
|
});
|
|
});
|
|
// deletescombinationprojectid(this.form.id).then((res) => {
|
|
// console.log("删除成功");
|
|
// this.getlist();
|
|
// });
|
|
}
|
|
},
|
|
//编辑弹框
|
|
editpopup() {
|
|
this.form = { ...this.curRow };
|
|
if (this.form.id == undefined) {
|
|
this.$message.warning("请点击选择操作的数据");
|
|
} else {
|
|
this.dialogVisible = true;
|
|
this.title = 2;
|
|
if (this.$refs.ruleForm !== undefined){
|
|
this.$refs.ruleForm.resetFields()
|
|
}
|
|
asbitemgetid(this.form.id).then((res) => {
|
|
this.form=res.data
|
|
if (res.data.isItemResultMerger == 'Y') {
|
|
this.form.isItemResultMergerBox = true;
|
|
} else {
|
|
this.form.isItemResultMergerBox = false;
|
|
}
|
|
if (res.data.isBeforeEat == 'Y') {
|
|
this.form.isBeforeEatBox = true;
|
|
} else {
|
|
this.form.isBeforeEatBox = false;
|
|
}
|
|
if (res.data.isDiagnosisFunction == 'Y') {
|
|
this.form.isDiagnosisFunctionBox = true;
|
|
} else {
|
|
this.form.isDiagnosisFunctionBox = false;
|
|
}
|
|
if (res.data.isContinueProcess == 'Y') {
|
|
this.form.isContinueProcessBox = true;
|
|
} else {
|
|
this.form.isContinueProcessBox = false;
|
|
}
|
|
if (res.data.isPictureRotate == 'Y') {
|
|
this.form.isPictureRotateBox = true;
|
|
} else {
|
|
this.form.isPictureRotateBox = false;
|
|
}
|
|
if (res.data.isCheck == 'Y') {
|
|
this.form.isCheckBox = true;
|
|
} else {
|
|
this.form.isCheckBox = false;
|
|
}
|
|
if (res.data.isActive == 'Y') {
|
|
this.form.isActiveBox = true;
|
|
} else {
|
|
this.form.isActiveBox = false;
|
|
}
|
|
});
|
|
//性别
|
|
// examinationgender().then((res) => {
|
|
// this.forSexId = res.data;
|
|
// });
|
|
//适用性别
|
|
getapi("/api/app/for-sex").then((res) => {
|
|
this.forSexId = res.data;
|
|
});
|
|
//项目类别
|
|
// projectlist().then((res) => {
|
|
// this.itemTypeId = res.data;
|
|
// });
|
|
//仪器类别
|
|
instrumentlist().then((res) => {
|
|
this.deviceTypeId = res.data.items;
|
|
console.log(this.deviceTypeId);
|
|
});
|
|
//发票项目类别
|
|
invoicetypelist().then((res) => {
|
|
this.invoiceItemTypeId = res.data.items;
|
|
});
|
|
}
|
|
},
|
|
//确定新增或者编辑
|
|
addoredit() {
|
|
this.$refs.ruleForm.validate((v) => {
|
|
if (v) {
|
|
if (this.title == 1) {
|
|
let obj = {
|
|
displayName: this.form.displayName,
|
|
shortName: this.form.shortName,
|
|
forSexId: this.form.forSexId,
|
|
itemTypeId: this.form.itemTypeId,
|
|
price: Number(this.form.price),
|
|
deviceTypeId: this.form.deviceTypeId,
|
|
invoiceItemTypeId: this.form.invoiceItemTypeId,
|
|
isItemResultMerger: this.form.isItemResultMerger,
|
|
isBeforeEat: this.form.isBeforeEat,
|
|
clinicalMeaning: this.form.clinicalMeaning,
|
|
defaultResult: this.form.defaultResult,
|
|
queueTime: this.form.queueTime,
|
|
isDiagnosisFunction: this.form.isDiagnosisFunction,
|
|
diagnosisFunction: this.form.diagnosisFunction,
|
|
isContinueProcess: this.form.isContinueProcess,
|
|
isPictureRotate: this.form.isPictureRotate,
|
|
isCheck: this.form.isCheck,
|
|
isActive: this.form.isActive,
|
|
};
|
|
newcombination(obj).then((res) => {
|
|
if(res.code!=-1){
|
|
console.log("新增成功");
|
|
this.getItemIdList();
|
|
this.dialogVisible = false;
|
|
this.$nextTick(()=>{
|
|
this.$refs['tableData'].setCurrentRow(res.data);
|
|
this.rowick(res.data)
|
|
})
|
|
}
|
|
});
|
|
} else if (this.title == 2) {
|
|
let obj = {
|
|
displayName: this.form.displayName,
|
|
shortName: this.form.shortName,
|
|
forSexId: this.form.forSexId,
|
|
itemTypeId: this.form.itemTypeId,
|
|
price: Number(this.form.price),
|
|
deviceTypeId: this.form.deviceTypeId,
|
|
invoiceItemTypeId: this.form.invoiceItemTypeId,
|
|
isItemResultMerger: this.form.isItemResultMerger,
|
|
isBeforeEat: this.form.isBeforeEat,
|
|
clinicalMeaning: this.form.clinicalMeaning,
|
|
defaultResult: this.form.defaultResult,
|
|
queueTime: this.form.queueTime,
|
|
isDiagnosisFunction: this.form.isDiagnosisFunction,
|
|
diagnosisFunction: this.form.diagnosisFunction,
|
|
isContinueProcess: this.form.isContinueProcess,
|
|
isPictureRotate: this.form.isPictureRotate,
|
|
isCheck: this.form.isCheck,
|
|
isActive: this.form.isActive,
|
|
};
|
|
updateombination(this.form.id, obj).then((res) => {
|
|
if(res.code!=-1){
|
|
console.log("修改成功");
|
|
this.tableData.forEach((item,index)=>{
|
|
if(res.data.id==item.id){
|
|
this.$set(this.tableData,index,res.data)
|
|
}
|
|
})
|
|
this.curRow={...res.data}
|
|
this.dialogVisible = false;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
},
|
|
getItemIdList(){
|
|
postapi('/api/app/asbitem/getasbitemlist',{itemTypeId:this.initItemTypeId}).then((res) => {
|
|
if(res.code!=-1){
|
|
this.tableData = res.data;
|
|
}
|
|
});
|
|
},
|
|
//新增弹框
|
|
addll() {
|
|
if(this.initItemTypeId==undefined || this.initItemTypeId==""){
|
|
this.$message.warning("请选择项目类别")
|
|
}else{
|
|
this.dialogVisible = true;
|
|
this.title = 1;
|
|
if (this.$refs.ruleForm !== undefined){
|
|
this.$refs.ruleForm.resetFields()
|
|
}
|
|
Object.assign(this.$data.form, this.$options.data().form)
|
|
this.form.itemTypeId=this.initItemTypeId
|
|
this.$nextTick(() => {
|
|
this.$refs.refinput.focus();
|
|
});
|
|
//性别
|
|
examinationgender().then((res) => {
|
|
console.log(res);
|
|
this.forSexId = res.data;
|
|
console.log(this.forSexId);
|
|
});
|
|
// //项目类别
|
|
// projectlist().then((res) => {
|
|
// this.itemTypeId = res.data;
|
|
// });
|
|
//仪器类别
|
|
instrumentlist().then((res) => {
|
|
this.deviceTypeId = res.data.items;
|
|
});
|
|
//发票项目类别
|
|
invoicetypelist().then((res) => {
|
|
this.invoiceItemTypeId = res.data.items;
|
|
});
|
|
}
|
|
},
|
|
rowick(row) {
|
|
this.curRow={...row}
|
|
asbitemgetid(row.id).then((res) => {
|
|
this.curRow = { ...res.data };
|
|
this.form = res.data;
|
|
});
|
|
this.values=row.itemTypeId
|
|
getapi(
|
|
`/api/app/asbitem-detail/asbitem-detail-in-item?AsbitemId=${row.id}`
|
|
).then((res) => {
|
|
this.rightdata = [...res.data];
|
|
getapi(`/api/app/item/in-item-type/${row.itemTypeId}`).then((res) => {
|
|
// this.leftdata = [...res.data];
|
|
let bq=[]
|
|
bq = res.data.filter(item => !this.rightdata.some(ele=>ele.id === item.id));
|
|
this.leftdata = [...bq];
|
|
});
|
|
});
|
|
this.getobtainguidance(this.curRow.id);
|
|
this.publicapi()
|
|
},
|
|
getlist() {
|
|
groupsandlist(this.pages).then((res) => {
|
|
this.initTableData = [...res.data.items];
|
|
this.tableData = res.data.items;
|
|
this.quckDepartment=res.data.items;
|
|
console.log(res);
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
@import "../../assets/css/global_button.css";
|
|
@import "../../assets/css/global_dialog.css";
|
|
@import "../../assets/css/global_table.css";
|
|
@import "../../assets/css/global_form.css";
|
|
@import "../../assets/css/global_input.css";
|
|
@import "../../assets/css/global.css";
|
|
::v-deep .el-table__header th {
|
|
/* font-size: px; */
|
|
background-color: rgb(245, 245, 245); /* 设置表头背景颜色 */
|
|
color: rgb(113, 113, 113); /* 设置表头文字颜色 */
|
|
}
|
|
::v-deep .el-table td.el-table__cell,
|
|
.el-table th.el-table__cell.is-leaf {
|
|
padding: 0;
|
|
}
|
|
.mainleftbox {
|
|
width: 300px;
|
|
border: 1px solid #ccc;
|
|
margin-left: 3%;
|
|
}
|
|
.Selectbutton {
|
|
margin-left: 3%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.mainbox {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-top: 5px;
|
|
}
|
|
.weixuan {
|
|
text-align: center;
|
|
line-height: 20px;
|
|
background: rgb(185, 203, 235);
|
|
}
|
|
.leftbox {
|
|
width: 200px;
|
|
border: 1px solid #ccc;
|
|
}
|
|
.instrumentcategory {
|
|
width: 100%;
|
|
display: flex;
|
|
}
|
|
.box {
|
|
display: flex;
|
|
}
|
|
.confirmcancellation {
|
|
margin-left: 46%;
|
|
}
|
|
.activetext {
|
|
background: rgb(185, 203, 235);
|
|
}
|
|
.weixuan {
|
|
text-align: center;
|
|
line-height: 20px;
|
|
background: rgb(185, 203, 235);
|
|
}
|
|
:deep .el-form-item {
|
|
margin-bottom: 14px;
|
|
}
|
|
:deep(.el-textarea__inner){
|
|
resize: none;
|
|
}
|
|
:deep .el-dialog__header {
|
|
padding: 11px 20px 11px;
|
|
}
|
|
:deep .el-dialog__body {
|
|
padding: 0px 20px 0px;
|
|
}
|
|
:deep .el-form-item {
|
|
margin-bottom: 14px;
|
|
}
|
|
:deep .el-divider--horizontal {
|
|
margin: 0px 0 12px;
|
|
}
|
|
:deep .el-dialog__footer {
|
|
padding: 0px 20px 14px;
|
|
}
|
|
:deep .downText .el-input--suffix .el-input__inner {
|
|
width: 0;
|
|
height: 100%;
|
|
padding: 0 19px;
|
|
}
|
|
:deep .downText .el-input--suffix .el-input__suffix {
|
|
right: 12px;
|
|
}
|
|
:deep .downText{
|
|
display: flex!important;
|
|
}
|
|
:deep .el-input-group__append {
|
|
padding: 0 11px;
|
|
}
|
|
:deep .el-tabs__header{
|
|
margin-bottom: 5px;
|
|
}
|
|
.my-el-form-item :deep .el-form-item__content{
|
|
line-height: 0!important;
|
|
}
|
|
.my-el-form-item :deep .el-input__icon{
|
|
line-height: 0!important;
|
|
}
|
|
.guidelines :deep .el-form-item{
|
|
margin-bottom: 0;
|
|
}
|
|
</style>
|