提交 66a5d201 编写于 作者: vino's avatar vino

配置设置运营

上级 ab1de42d
......@@ -46,7 +46,7 @@
</template>
<script>
import { updateDiagnosis } from '../../utils/diagnosis';
import { updateDiagnosis,batchSetOperator } from '../../utils/diagnosis';
let vm = null;
export default {
props: {
......@@ -57,7 +57,15 @@ export default {
diagnoseLogId: {
type: Number,
default: 0
}
},
multipleSelection: {
type: Array,
default: [],
},
batchFlag:{
type: Boolean,
default: false
},
},
data() {
return {
......@@ -81,26 +89,55 @@ export default {
created() {
vm = this;
this.getAdminList();
if(this.batchFlag){
this.title = "批量设置运营";
}
},
methods: {
confirm() {
// 单个设置运营
if (!this.batchFlag) {
let req = {
id:this.diagnoseLogId,
bizType:1,
operatorId:this.model.operatorId,
operatorName:this.model.operatorName
id: this.diagnoseLogId,
bizType: 1,
operatorId: this.model.operatorId,
operatorName: this.model.operatorName
}
updateDiagnosis(req).then(function (res) {
if(res.code == "000000") {
if (res.code == "000000") {
vm.cancel();
vm.$emit('search');
}
else {
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(error);
});
}
// 批量设置运营
else {
let ids = [];
if(this.multipleSelection.length > 0){
for (let i=0;i < this.multipleSelection.length; i++){
ids.push(this.multipleSelection[i].diagnoseLogId);
}
}
let req = {
ids: ids,
operatorId: this.model.operatorId,
operatorName: this.model.operatorName
}
batchSetOperator(req).then(function (res) {
if (res.code == "000000") {
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(error);
});
}
},
cancel(){
......
......@@ -96,12 +96,15 @@ export default {
tableHeight: {
type: Number,
default: 500,
}
},
multipleSelection: {
type: Array,
default: [],
},
},
data() {
return {
tableColumn: TABLE_COLUMN,
multipleSelection: []
tableColumn: TABLE_COLUMN
};
},
mounted() {
......@@ -114,6 +117,7 @@ export default {
// 选择
handleSelectionChange(val) {
this.multipleSelection = val;
this.$emit("update:multipleSelection", this.multipleSelection);
},
//设为待问诊
witeDiagnose(row) {
......
......@@ -16,3 +16,14 @@ export const updateDiagnosis = (params) => {
})
};
/*批量设置运营*/
export const batchSetOperator = (params) => {
return fetch({
headers,
url: getBaseUrl(`/diagnose/admin/diagnose/batch/operator`),
method: 'post',
data: params,
description: '批量设置运营',
})
};
......@@ -174,7 +174,7 @@
</el-row>
<el-row :gutter="5" type="flex" justify="center" align="center">
<el-col :span="24" class="btn-wrap">
<el-button type="success" class="submit-btn big-btn"
<el-button type="success" class="submit-btn big-btn" @click="batchSetOperator"
>批量设置运营</el-button
>
<el-button type="info" class="submit-btn" @click="download"
......@@ -198,6 +198,7 @@
:totalRows="totalRows"
:loading="loading"
:tableHeight="tableHeight"
:multipleSelection.sync="multipleSelection"
@witeDiagnose="witeDiagnose"
@changeRun="changeRun"
@goDetail="goDetail"
......@@ -219,7 +220,7 @@
></table-component>
</el-tab-pane>
</el-tabs>
<match-component @search="search" :matchVisible.sync="matchVisible" :diagnoseLogId="diagnoseLogId"></match-component>
<match-component @search="search" :matchVisible.sync="matchVisible" :diagnoseLogId="diagnoseLogId" :batchFlag="batchFlag" :multipleSelection="multipleSelection"></match-component>
<refund-component :refundVisible.sync="refundVisible" :diagnoseLogId="diagnoseLogId"></refund-component>
<followup-component :followupVisible.sync="followupVisible"></followup-component>
<matching-doctor :doctorVisible.sync="doctorVisible"></matching-doctor>
......@@ -310,6 +311,8 @@ export default {
coordinatingVisible:false,
diagnosisDoctorVisible:false,
appointmentTimeVisible:false,
multipleSelection:[],
batchFlag:false,
pickerOptions1: {
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
......@@ -441,6 +444,7 @@ export default {
changeRun(row) {
this.matchVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.batchFlag = false;
},
//查看详情/编辑详情
goDetail(row,flag) {
......@@ -495,6 +499,19 @@ export default {
},
// 取消预约
// cancelBtn(row) {},
// 批量设置运营
batchSetOperator(){
if(this.multipleSelection.length == 0){
this.$message({
message: '请先选择要操作的数据',
type: "warning"
});
return;
}
this.matchVisible = true;
this.batchFlag = true;
}
},
};
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册