xuechunyuan 3 years ago
commit 0394edc757
  1. 52
      src/views/booknumber/index.vue

@ -14,6 +14,10 @@
<template slot-scope="{row}" slot="people"> <template slot-scope="{row}" slot="people">
<div :class="row.detailList.find(item => item.numberNum == item.apmNum) ? 'cla' :''" v-for="item1 in row.detailList.map(item => item.apmNum)" >{{item1}}</div> <div :class="row.detailList.find(item => item.numberNum == item.apmNum) ? 'cla' :''" v-for="item1 in row.detailList.map(item => item.apmNum)" >{{item1}}</div>
</template> </template>
<template slot-scope="{row}"
slot="hosId">
<span v-text='row.createDeptName'></span>
</template>
<template slot-scope="{row}" slot="menu"> <template slot-scope="{row}" slot="menu">
<el-button @click="handleRegister(row)">修改</el-button> <el-button @click="handleRegister(row)">修改</el-button>
</template> </template>
@ -44,7 +48,7 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<span style="margin-right:10px">选择医院</span> <el-select v-model="deptName"> <span v-show="isShowHos" style="margin-right:10px">选择医院</span> <el-select v-show="isShowHos" v-model="deptName">
<el-option <el-option
v-for="item in hospitalArr" v-for="item in hospitalArr"
:key="item.id" :key="item.id"
@ -169,12 +173,13 @@ export default {
label:'医院', label:'医院',
prop:'hosId', prop:'hosId',
type:'select', type:'select',
hide: true, // hide: true,
viewDisplay:false, viewDisplay:false,
props: { props: {
label: 'deptName', label: 'deptName',
value: 'id' value: 'id'
}, },
slot:true,
dicUrl: '/api/blade-system/dept-hospital/list-hospital', dicUrl: '/api/blade-system/dept-hospital/list-hospital',
search:true search:true
}, },
@ -221,17 +226,19 @@ export default {
isSelect:false, isSelect:false,
hospitalArr:[], hospitalArr:[],
isEdit:false, isEdit:false,
valTime:'' valTime:'',
isShowHos:false
}; };
}, },
computed: { computed: {
}, },
mounted() { mounted() {
console.log(this.userInfo)
if(this.userInfo.role_name !== 'hospital'){ if(this.userInfo.role_name !== 'hospital'){
// this.isShowHos = true
this.option.column.find(item => item.prop == "hosId").search = true this.option.column.find(item => item.prop == "hosId").search = true
}else{ }else{
// this.isShowHos = false
this.option.column.find(item => item.prop == "hosId").search = false this.option.column.find(item => item.prop == "hosId").search = false
} }
var validateTime = (rule, value, callback)=>{ var validateTime = (rule, value, callback)=>{
@ -367,16 +374,13 @@ export default {
methods: { methods: {
clickCalc(day){ clickCalc(day){
let tmp = this.dayArr.find(item => item == day) let tmp = this.dayArr.find(item => item == day)
console.log(tmp)
if(!tmp){ if(!tmp){
this.dayArr.push(day) this.dayArr.push(day)
}else{ }else{
this.dayArr = this.dayArr.filter(item => item != tmp) this.dayArr = this.dayArr.filter(item => item != tmp)
} }
// console.log(this.dayArr)
}, },
spanMethod({ row, column, rowIndex, columnIndex }) { spanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(column)
}, },
beforeOpen(done, type) { beforeOpen(done, type) {
done(); done();
@ -390,6 +394,7 @@ export default {
this.activeName = this.tabArr[0].dictValue; this.activeName = this.tabArr[0].dictValue;
this.isNumber = true; this.isNumber = true;
this.isShow = true; this.isShow = true;
this.deptName = ''
this.tabArr.map(item =>{ this.tabArr.map(item =>{
item.addForm={ item.addForm={
addData: [ addData: [
@ -432,15 +437,17 @@ export default {
}) })
if(this.userInfo.role_name !== "hospital"){ if(this.userInfo.role_name !== "hospital"){
this.selectDay = new Date().getTime(); this.selectDay = new Date().getTime();
this.tabArr.map(item =>{ this.isShowHos = true
item.addOption.column.find(item1 => item1.prop == "select").display = true // this.tabArr.map(item =>{
}) // // item.addOption.column.find(item1 => item1.prop == "select").display = true
// })
}else{ }else{
this.selectDay = new Date().getTime() + 3600 * 1000 * 24 * 7; this.selectDay = new Date().getTime() + 3600 * 1000 * 24 * 7;
this.tabArr.map(item =>{ this.isShowHos = false
item.addOption.column.find(item1 => item1.prop == "select").display = false // this.tabArr.map(item =>{
}) // // item.addOption.column.find(item1 => item1.prop == "select").display = false
// })
} }
}, },
@ -537,10 +544,8 @@ export default {
} }
}) })
// this.tabArr = this.tabArr.filter(item => item.dictValue == this.activeName) // this.tabArr = this.tabArr.filter(item => item.dictValue == this.activeName)
// console.log(this.tabArr)
}) })
console.log(this.tabArr)
}, },
handleClick(tab, event){ handleClick(tab, event){
let tmp = this.tabArr.find(item => item.dictValue == tab.label); let tmp = this.tabArr.find(item => item.dictValue == tab.label);
@ -585,12 +590,20 @@ export default {
}, },
handleSubmit(value,done){ handleSubmit(value,done){
console.log(this.tabArr)
this.count = 0; this.count = 0;
this.tabArr.map(item =>{ this.tabArr.map(item =>{
item.addForm.addData.map(item1 => this.count += item1.num) item.addForm.addData.map(item1 => this.count += item1.num)
item.addForm.addData1.map(item1 => this.count += item1.num) item.addForm.addData1.map(item1 => this.count += item1.num)
}) })
if(this.userInfo.role_name !== "hospital"){
if(this.deptName == ''){
this.$message.error('请选择医院')
return
}
}else{
console.log(this.userInfo)
this.deptName = this.userInfo.dept_id
}
if(this.tabArr[0].addForm.addData.length == 0 && this.tabArr[1].addForm.addData.length == 0 if(this.tabArr[0].addForm.addData.length == 0 && this.tabArr[1].addForm.addData.length == 0
&& this.tabArr[2].addForm.addData.length == 0 && this.tabArr[0].addForm.addData1.length == 0 && this.tabArr[2].addForm.addData.length == 0 && this.tabArr[0].addForm.addData1.length == 0
@ -646,7 +659,6 @@ export default {
} }
let configListVOS = [] let configListVOS = []
this.tabArr.map(item =>{ this.tabArr.map(item =>{
console.log(item)
configListVOS.push({ configListVOS.push({
createDept:values.createDept, createDept:values.createDept,
project:item.dictValue, project:item.dictValue,
@ -697,7 +709,7 @@ export default {
item1.detailList.push({ item1.detailList.push({
period:'下午', period:'下午',
timeFrame:startTime + '-' + endTime, timeFrame:startTime + '-' + endTime,
numberNum:item.num, numberNum:item3.num,
}) })
} }
}) })
@ -707,7 +719,7 @@ export default {
configListVOS = configListVOS.filter(item => item.detailList.length !== 0); configListVOS = configListVOS.filter(item => item.detailList.length !== 0);
values.configListVOS = configListVOS values.configListVOS = configListVOS
} }
console.log(values) // console.log(values)
addExamProject(values).then(res =>{ addExamProject(values).then(res =>{
console.log(res) console.log(res)
if(res.data.code == 200){ if(res.data.code == 200){
@ -754,7 +766,6 @@ export default {
this.query.hosId = this.userInfo.dept_id this.query.hosId = this.userInfo.dept_id
} }
if(releaseTime){ if(releaseTime){
console.log(this.query)
values = { values = {
startTime:this.query.releaseTime[0], startTime:this.query.releaseTime[0],
endTime:this.query.releaseTime[1], endTime:this.query.releaseTime[1],
@ -772,7 +783,6 @@ export default {
} }
} }
getNumList(page.currentPage, page.pageSize,values).then(res =>{ getNumList(page.currentPage, page.pageSize,values).then(res =>{
console.log(res)
const data = res.data.data; const data = res.data.data;
this.page.total = data.total; this.page.total = data.total;
this.data = data.records; this.data = data.records;

Loading…
Cancel
Save