Commit 8804fa40 authored by 徐来柯's avatar 徐来柯

update

parent 8f56f0e8
......@@ -188,6 +188,7 @@ export default {
itemdata:[],
deleteRowData:[],
deleteManyData:[],
currentRow: [],
editData:[],
typeV:'',
pathE:'',
......@@ -226,8 +227,8 @@ export default {
},
methods:{
//查询
query(keyWord){
this.$axios({
async query(keyWord){
await this.$axios({
method:"post",
url:`/api/Schedule/Schedule_Query?argKeyWord=${ keyWord.argKeyWord }&argKeyWord1=${ keyWord.argKeyWord1 }&argWhere=${ keyWord.argWhere }&Stime=${ keyWord.Stime }&Etime=${ keyWord.Etime }`,
}).then((res)=>{
......@@ -532,8 +533,12 @@ export default {
},
//勾选
handleSelectionChange(val){
console.log(val)
if (val && val.length !== 0) {
this.deleteManyData = val
this.currentRow = val
} else {
this.deleteManyData = val
}
},
//暂停
zantin(data){
......@@ -685,14 +690,14 @@ export default {
}
},
//移动接口
A_MoveFun(id1,id2,text){
async A_MoveFun(id1,id2,text){
var $this = this
this.$axios({
await this.$axios({
method:"post",
url:`/api/Schedule/Schedule_Move?argID1=${id1}&&argID2=${id2}`,
}).then((res)=>{
}).then(async (res)=>{
var postData = this.resetData()
$this.query(postData)
await $this.query(postData)
}).catch((err) =>{
this.typeV = '7'
this.deleteShow = true
......@@ -704,15 +709,16 @@ export default {
})
},
//上移
MoveUp(){
async MoveUp(){
if(this.deleteManyData.length == 1 ){
for(let i=0;i<this.AllTableData.length;i++){
if(this.AllTableData[i].ID == this.deleteManyData[0].ID){
if(i != 0){
this.A_MoveFun(this.deleteManyData[0].ID,this.AllTableData[i - 1].ID)
await this.A_MoveFun(this.deleteManyData[0].ID,this.AllTableData[i - 1].ID)
}else{
this.A_MoveFun(this.deleteManyData[0].ID,'','up')
await this.A_MoveFun(this.deleteManyData[0].ID,'','up')
}
this.section()
}
}
}else if(this.deleteManyData.length > 1){
......@@ -725,16 +731,24 @@ export default {
this.deleteShow = true
}
},
section () {
var $this = this
$this.AllTableData.forEach(row => {
$this.$refs.multipleTable.toggleRowSelection(row, row.ID === this.currentRow[0].ID)
})
},
//下移
MoveDown(){
async MoveDown(){
if(this.deleteManyData.length == 1 ){
for(let i=0;i<this.AllTableData.length;i++){
if(this.AllTableData[i].ID == this.deleteManyData[0].ID){
if(this.AllTableData[i].ID === this.deleteManyData[0].ID){
if(i != this.AllTableData.length - 1){
this.A_MoveFun(this.deleteManyData[0].ID,this.AllTableData[i + 1].ID)
await this.A_MoveFun(this.deleteManyData[0].ID,this.AllTableData[i + 1].ID)
}else{
this.A_MoveFun(this.deleteManyData[0].ID,'','down')
await this.A_MoveFun(this.deleteManyData[0].ID,'','down')
}
this.section()
break
}
}
}else if(this.deleteManyData.length > 1){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment