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

配置设置运营

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