|
|
|
|
@ -16,6 +16,7 @@
|
|
|
|
|
<el-button type="danger" @click="Del()" style="margin-left: 10px;">删 除</el-button>
|
|
|
|
|
<el-button @click="BatchUpdate(1)" class="status_zhengchang" style="margin-left: 80px;">设为正常号</el-button>
|
|
|
|
|
<el-button @click="BatchUpdate(0)" style="margin-left: 10px;">设为预留号</el-button>
|
|
|
|
|
<el-button @click="PiLiangOpen()" type="warning" style="margin-left: 40px;">批量勾选</el-button>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -128,6 +129,34 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog v-model="PiLiangDialogVisible" >
|
|
|
|
|
<div style="margin-top: -30px;font-size: 16px;margin-bottom: 10px;font-weight: 700;">批量选择号源</div>
|
|
|
|
|
<div style="margin-bottom: 10px;">
|
|
|
|
|
开始时间:
|
|
|
|
|
<el-select v-model="PiliangSelectedStartTime" placeholder="选择开始时间" style="width: 240px">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="(item,index) in list"
|
|
|
|
|
:key="index"
|
|
|
|
|
:label="item.time"
|
|
|
|
|
:value="item.time"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-bottom: 10px;">
|
|
|
|
|
号源间隔:<el-input-number v-model="PiLiangJianGe" :min="1" :max="10" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-bottom: 10px;">
|
|
|
|
|
号源数量:<el-input-number v-model="PiLiangNeedCount" :min="1" :max="10" /> 需要勾选几个
|
|
|
|
|
</div>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span class="dialog-footer">
|
|
|
|
|
<!-- <el-button @click="CreatTiShiDialogVisible = false">取消</el-button> -->
|
|
|
|
|
<el-button type="primary" @click="PiLiangSelectFunc()">
|
|
|
|
|
确 定
|
|
|
|
|
</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -163,6 +192,10 @@
|
|
|
|
|
let list = ref([]);
|
|
|
|
|
let unused_count=ref(0);
|
|
|
|
|
let used_count=ref(0);
|
|
|
|
|
let PiLiangDialogVisible=ref(false)
|
|
|
|
|
let PiliangSelectedStartTime=ref('')//批量勾选时,选中的开始时间
|
|
|
|
|
let PiLiangJianGe=ref(0)//批量勾选时,间隔多少个号源勾选一次
|
|
|
|
|
let PiLiangNeedCount=ref(0)//批量勾选时,需要勾选几个
|
|
|
|
|
const GetList = () => {
|
|
|
|
|
selected_count.value=0
|
|
|
|
|
plan_loading.value = true
|
|
|
|
|
@ -374,6 +407,62 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const PiLiangOpen=()=>{
|
|
|
|
|
PiLiangDialogVisible.value=true
|
|
|
|
|
}
|
|
|
|
|
const PiLiangSelectFunc=()=>{
|
|
|
|
|
if(!!PiliangSelectedStartTime.value && !!PiLiangJianGe.value && !!PiLiangNeedCount.value){
|
|
|
|
|
let start_k=null
|
|
|
|
|
let j=0
|
|
|
|
|
let count=0
|
|
|
|
|
|
|
|
|
|
list.value.forEach((v,i)=>{
|
|
|
|
|
if(v.selected==undefined) v.selected=false
|
|
|
|
|
if(v.time==PiliangSelectedStartTime.value){
|
|
|
|
|
start_k=i
|
|
|
|
|
}
|
|
|
|
|
if(start_k !==null){
|
|
|
|
|
if( (v.selected===false && j==0) || v.selected===true ){
|
|
|
|
|
console.log(v.time)
|
|
|
|
|
if(v.status==2){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(count<PiLiangNeedCount.value){
|
|
|
|
|
// list.value[i].class = "timelist_button_selected"
|
|
|
|
|
if(v.selected===false){
|
|
|
|
|
TimeListClick(v,i)
|
|
|
|
|
}
|
|
|
|
|
count++
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
j++
|
|
|
|
|
if(j%PiLiangJianGe.value===0){
|
|
|
|
|
j=0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if(count==PiLiangNeedCount.value){
|
|
|
|
|
|
|
|
|
|
PiLiangDialogVisible.value=false
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
console.log('count:',count)
|
|
|
|
|
console.log('need:',PiLiangNeedCount.value)
|
|
|
|
|
list.value.forEach((v,i)=>{
|
|
|
|
|
if(v.selected ===true){
|
|
|
|
|
list.value[i].selected=false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
ElMessage.error("剩余号源数量不足,请调整参数")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
ElMessage.error("请设置全部参数")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
searchInfo.value.date=route.query.date
|
|
|
|
|
GetPlanTypeList()
|
|
|
|
|
|