|
@@ -0,0 +1,487 @@
|
|
|
+<template>
|
|
|
+ <div class="ManageItemBatchWrapper">
|
|
|
+ <crumbs :title="title" :param="$route.params" linkTo="RecordItemList"></crumbs>
|
|
|
+ <div class="contents">
|
|
|
+ <div class="content">
|
|
|
+ <el-form ref="form" :label-position="labelPosition" label-width="125px" class="add-record-form" >
|
|
|
+
|
|
|
+ <el-form-item label="选择医院:" prop="brbaxx">
|
|
|
+ <el-select v-model="hospitalId"
|
|
|
+ placeholder="请选择医院"
|
|
|
+ size="small"
|
|
|
+ @change="changeHospital">
|
|
|
+ <el-option
|
|
|
+ v-for="item in hospitalList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="条目列表:" prop="hospitalList">
|
|
|
+ <!-- <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="tableData"
|
|
|
+ tooltip-effect="light"
|
|
|
+ style="width: 100%"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="医院名称"
|
|
|
+ prop="hospitalName"
|
|
|
+ width="240">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="扣分值"
|
|
|
+ width="240">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input class="tipsMsg" v-model="scope.row.value" placeholder="请输入扣分值"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="提示语"
|
|
|
+ width="240"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input class="tipsMsg" v-model="scope.row.tipMsg" placeholder="请输入提示语"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table> -->
|
|
|
+ <el-collapse v-model="activeLeftNames" @change="handleChange" v-if="caseLIst.length > 0">
|
|
|
+ <el-collapse-item v-for="(item, index) in caseLIst" :title="item.name" :name="item.id" :key="item.id">
|
|
|
+ <!-- <el-checkbox-group v-model="checkAllMap[item.remark]" >
|
|
|
+ <el-checkbox v-for=" casesEntry in item.qcCasesEntry" :label="casesEntry.id" :key="casesEntry.id">{{casesEntry.name}}
|
|
|
+ <el-input placeholder="请输入扣分值"></el-input>
|
|
|
+ </el-checkbox>
|
|
|
+ </el-checkbox-group> -->
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="item.qcCasesEntry"
|
|
|
+ tooltip-effect="light"
|
|
|
+ style="width: 100%"
|
|
|
+ @selection-change="handleSelectionChange($event,item.remark)">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="60">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="条目编码"
|
|
|
+ prop="code"
|
|
|
+ width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="条目名称"
|
|
|
+ prop="name"
|
|
|
+ width="240">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="医院数据模块"
|
|
|
+ prop="modeName"
|
|
|
+ width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop=""
|
|
|
+ label="扣分值"
|
|
|
+ width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input class="scoreInp" v-model="scope.row.score" placeholder="请输入扣分值"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="提示语"
|
|
|
+ width="240"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input class="tipsMsg" v-model="scope.row.msg" placeholder="请输入提示语"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="是否启用"
|
|
|
+ width="120"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-checkbox v-model="scope.row.isUsed" :checked="scope.row.isUsed == '1'" :disabled="getIsUsed(scope.row)" true-label="1" false-label="0"></el-checkbox>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
+ </el-form-item>
|
|
|
+ <p class="oper">
|
|
|
+ <el-button style="margin-right: 30px" size="small" type="primary" @click="comfirn('form')">确定</el-button>
|
|
|
+ <el-button size="small" @click="cancel">取消</el-button>
|
|
|
+ </p>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script type="text/javascript">
|
|
|
+ import api from '@api/records.js';
|
|
|
+ import config from '@api/config.js';
|
|
|
+ import utils from '@api/utils.js';
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name:'ManageItemBatch',
|
|
|
+ data(){
|
|
|
+ return{
|
|
|
+ // data:{},
|
|
|
+ labelPosition:'left',
|
|
|
+ /*zybljlList:[
|
|
|
+ {name:'aaa',content:'333333'},
|
|
|
+ {name:'vvv',content:'333sa'}
|
|
|
+ ],*/
|
|
|
+ hospitalList:[],
|
|
|
+ caseLIst:[],
|
|
|
+ sexType:[],
|
|
|
+ bloodType:[],
|
|
|
+ rhType:[],
|
|
|
+ title:'批量管理',
|
|
|
+ hospitalId:'',
|
|
|
+ tableData:[],
|
|
|
+ checkAllMap:{
|
|
|
+
|
|
|
+ },
|
|
|
+ multipleSelection: [],
|
|
|
+ id:null,
|
|
|
+ activeLeftNames: ['1'],
|
|
|
+ modifier:''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created(){
|
|
|
+ const userLoginDTO = JSON.parse(localStorage.getItem('userLoginDTO'))
|
|
|
+ this.modifier = userLoginDTO && userLoginDTO.linkman
|
|
|
+
|
|
|
+ this.getRecordHopitalList()
|
|
|
+ // this.getRecordInpModule()
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ toggleSelection(values) {
|
|
|
+ setTimeout(()=>{
|
|
|
+ // this.$refs.multipleTable[6].toggleRowSelection(this.caseLIst[6].qcCasesEntry[0]);
|
|
|
+ // this.$refs.multipleTable[6].toggleRowSelection(this.caseLIst[6].qcCasesEntry[1]);
|
|
|
+ for(let i = 0; i < values.length; i++){
|
|
|
+ if(values[i].length > 0){
|
|
|
+ values[i].forEach(value=>{
|
|
|
+ const index = this.caseLIst[i].qcCasesEntry.findIndex(item =>item.id === value.id)
|
|
|
+ this.$refs.multipleTable[i].toggleRowSelection(this.caseLIst[i].qcCasesEntry[index]);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // if (rows) {
|
|
|
+ // rows.forEach(row => {
|
|
|
+ // this.$refs.multipleTable.toggleRowSelection(row);
|
|
|
+ // // console.log('this.$refs.multipleTabl',this.$refs.multipleTable)
|
|
|
+ // // const domLen = this.$refs.multipleTable.length
|
|
|
+ // // const values = Object.values(this.checkAllMap)
|
|
|
+ // // console.log('values,',values)
|
|
|
+ // // for(let i = 0; i < values.length; i++){
|
|
|
+ // // if(values[i].length > 0){
|
|
|
+ // // console.length('aaaaaaaaaaa')
|
|
|
+ // // this.$refs.multipleTable[i].toggleRowSelection(value[i]);
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // console.log('bbbb')
|
|
|
+ // const domLen = this.$refs.multipleTabl.length
|
|
|
+ // for(let i = 0; i < domLen; i++){
|
|
|
+ // // this.$refs.multipleTable[i].clearSelection();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ handleSelectionChange(val,remark) {
|
|
|
+ this.checkAllMap[remark] = val;
|
|
|
+ },
|
|
|
+ getIsUsed(row){
|
|
|
+ // if(this.multipleSelection.findIndex(it => it.hospitalId ==row.hospitalId) > -1){
|
|
|
+ // return false
|
|
|
+ // } else{
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+
|
|
|
+ },
|
|
|
+ handleChange(val) {
|
|
|
+ },
|
|
|
+ changeHospital(val){
|
|
|
+ this.getRecordInpModule().then(()=>{
|
|
|
+ this.getRecordByHospital(val)
|
|
|
+ }
|
|
|
+ )
|
|
|
+
|
|
|
+ },
|
|
|
+ getRecordInpModule(){
|
|
|
+ return api.getRecordInpModule({}).then((res)=>{
|
|
|
+ const result = res.data;
|
|
|
+ if(result.code==0){
|
|
|
+ let caseLIst = result.data
|
|
|
+
|
|
|
+ this.caseLIst = caseLIst //提醒每项加分值和备注
|
|
|
+
|
|
|
+ const checkAllMap = {}
|
|
|
+ for(let i = 0; i < this.caseLIst.length; i++){
|
|
|
+ checkAllMap[this.caseLIst[i].remark] = []
|
|
|
+ }
|
|
|
+ this.checkAllMap = checkAllMap
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message:result.msg,
|
|
|
+ type:'warning',
|
|
|
+ showClose: true
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getRecordHopitalList(){
|
|
|
+ return api.getRecordHopitalList({}).then((res)=>{
|
|
|
+ const result = res.data;
|
|
|
+ if(result.code==0){
|
|
|
+ this.hospitalList = result.data
|
|
|
+ const tableData = []
|
|
|
+ for(let i = 0; i < this.hospitalList.length; i++){
|
|
|
+ tableData.push({
|
|
|
+ hospitalId: this.hospitalList[i].id,
|
|
|
+ hospitalName: this.hospitalList[i].name,
|
|
|
+ value: '',
|
|
|
+ tipMsg:''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.tableData = tableData
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message:result.msg,
|
|
|
+ type:'warning',
|
|
|
+ showClose: true
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getRecordByHospital(hospitalId){
|
|
|
+ const param = {
|
|
|
+ hospitalId: hospitalId
|
|
|
+ }
|
|
|
+ return api.getRecordByHospital(param).then((res)=>{
|
|
|
+ const result = res.data;
|
|
|
+ if(result.code==0){
|
|
|
+ this.hospitalItemList = result.data
|
|
|
+ for (let i = 0; i< this.hospitalItemList.length; i++){
|
|
|
+ const hospitalItem = this.hospitalItemList[i]
|
|
|
+ let caseItem = this.caseLIst.find(item =>item.id === hospitalItem.casesId)
|
|
|
+ for(let j = 0; j < hospitalItem.getAllByHospitalDetialDTOS.length; j++){
|
|
|
+
|
|
|
+ const checkedItem = hospitalItem.getAllByHospitalDetialDTOS[j]
|
|
|
+ let recordItem = caseItem.qcCasesEntry.find(item => item.id === checkedItem.casesEntryId)
|
|
|
+ recordItem.score = checkedItem.score
|
|
|
+ recordItem.msg = checkedItem.msg
|
|
|
+ recordItem.isUsed = checkedItem.isUsed
|
|
|
+ recordItem.modeName = checkedItem.modeName
|
|
|
+ this.checkAllMap[caseItem.remark].push(recordItem)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.caseLIst = JSON.parse(JSON.stringify(this.caseLIst))
|
|
|
+ const values = Object.values(this.checkAllMap)
|
|
|
+ this.toggleSelection(values)
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message:result.msg,
|
|
|
+ type:'warning',
|
|
|
+ showClose: true
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancel(){
|
|
|
+ this.$router.push({
|
|
|
+ name: 'RecordItemList',
|
|
|
+ params: Object.assign({}, this.$route.params)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ comfirn(form){
|
|
|
+ if(!this.hospitalId){
|
|
|
+ this.$message({
|
|
|
+ message:"请选择医院",
|
|
|
+ type:'warning',
|
|
|
+ showClose: true
|
|
|
+ });
|
|
|
+ }
|
|
|
+ const values = Object.values(this.checkAllMap)
|
|
|
+ let casesEntryHospitals = []
|
|
|
+ for(let i = 0; i < values.length; i++){
|
|
|
+ for(let j = 0; j < values[i].length;j++){
|
|
|
+ const value = values[i][j]
|
|
|
+ let item = {
|
|
|
+ "casesEntryId": value.id,
|
|
|
+ "creator": "0",
|
|
|
+ "hospitalId": this.hospitalId,
|
|
|
+ "modifier": this.modifier,
|
|
|
+ "msg": value.msg,
|
|
|
+ "remark": value.remark,
|
|
|
+ "score": value.score,
|
|
|
+ "isUsed":value.isUsed
|
|
|
+ }
|
|
|
+ casesEntryHospitals.push(item)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let param = {
|
|
|
+ "casesEntryHospitals": casesEntryHospitals,
|
|
|
+ "hospitalIds": [
|
|
|
+ this.hospitalId
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ api.updateRecordByHospital(param).then((res)=>{
|
|
|
+ if(res.data.code==0){
|
|
|
+ this.$message({
|
|
|
+ message:"修改成功",
|
|
|
+ type:'success',
|
|
|
+ showClose: true
|
|
|
+ });
|
|
|
+ //返回带搜索条件的首页
|
|
|
+ this.$router.push({
|
|
|
+ name: 'RecordItemList',
|
|
|
+ params: Object.assign({}, this.$route.params)
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ type:'warning',
|
|
|
+ showClose: true
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ /*if(!this.form.name.trim() || !this.form.refreshTime.trim()){
|
|
|
+ this.$message({
|
|
|
+ message:'请填写相关内容',
|
|
|
+ type:'warning'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }*/
|
|
|
+ /*this.$refs[form].validate((valid) => {
|
|
|
+ if (valid) {*/
|
|
|
+ // if(this.basyid){//修改
|
|
|
+ // const param = Object.assign({},this.form,{basyid:this.basyid,brzyid:this.brzyid});
|
|
|
+ // api.saveRecord(param).then((res)=>{
|
|
|
+ // if(res.data.code==0){
|
|
|
+ // this.$message({
|
|
|
+ // message:"修改成功",
|
|
|
+ // type:'success'
|
|
|
+ // });
|
|
|
+ // //返回带搜索条件的首页
|
|
|
+ // this.$router.push({
|
|
|
+ // name: 'RecordManager',
|
|
|
+ // params: Object.assign({}, this.$route.params)
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // this.$message({
|
|
|
+ // message:res.data.msg,
|
|
|
+ // type:'warning'
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }else{//添加
|
|
|
+ // // 复制时把list多余字段过滤掉,如id等
|
|
|
+ // const detail = this.list;
|
|
|
+ // let copyDetail=[];
|
|
|
+ // let item={};
|
|
|
+ // if(detail && detail.length>0){
|
|
|
+ // for(let i=0; i<detail.length; i++){
|
|
|
+ // item.title = detail[i].title;
|
|
|
+ // item.description = detail[i].description;
|
|
|
+ // copyDetail.push(item);
|
|
|
+ // item={};
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // const params = Object.assign({},this.form);
|
|
|
+ // // api.addVersInfo(this.form).then((res)=>{
|
|
|
+ // api.saveRecord(params).then((res)=>{
|
|
|
+ // if(res.data.code==0){
|
|
|
+ // this.$message({
|
|
|
+ // message:"添加成功",
|
|
|
+ // type:'success'
|
|
|
+ // })
|
|
|
+ // // this.$router.push({path: 'LT-GBBXXWH-BBXXWH'});
|
|
|
+ // this.$router.push({name: 'RecordManager'});
|
|
|
+ // }else{
|
|
|
+ // this.$message({
|
|
|
+ // message:res.data.msg,
|
|
|
+ // type:'warning'
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ /*} else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });*/
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="less">
|
|
|
+ @import "../../less/admin.less";
|
|
|
+ .ManageItemBatchWrapper{
|
|
|
+ .container{
|
|
|
+ min-width: 1050px;
|
|
|
+ }
|
|
|
+ .content{
|
|
|
+ background: #fff;
|
|
|
+ padding: 20px 20px 50px;
|
|
|
+ color: #545455;
|
|
|
+ min-width: 1040pxpx;
|
|
|
+ position: relative;
|
|
|
+ .short-inp{
|
|
|
+ width: 200px;
|
|
|
+ }
|
|
|
+ .sub-title{
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ .oper{
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ /deep/.el-table__row td:nth-child(3){
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ /deep/.el-input{
|
|
|
+ .el-input__inner{
|
|
|
+ border: 1px solid #333;
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /deep/.el-checkbox__inner{
|
|
|
+ border: 1px solid #333;
|
|
|
+ }
|
|
|
+ /deep/.tipsMsg{
|
|
|
+ .el-input__inner{
|
|
|
+ width:200px;
|
|
|
+ height: 30px;
|
|
|
+ display: inline-block;
|
|
|
+ border: 1px solid #333;
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /deep/.scoreInp.el-input{
|
|
|
+ width:50px;
|
|
|
+ .el-input__inner{
|
|
|
+ width:50px;
|
|
|
+ height: 30px;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+</style>
|