Commit ada48f20 authored by denghr's avatar denghr

删除的el-popover改成$confirm

parent 3864ff2e
...@@ -72,18 +72,7 @@ ...@@ -72,18 +72,7 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" type="primary" @click="compileAppUpload(scope.row)">编辑 <el-button size="small" type="primary" @click="compileAppUpload(scope.row)">编辑
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" @click="deleteApp(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteApp(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -419,7 +408,12 @@ ...@@ -419,7 +408,12 @@
}, },
deleteApp(row){ deleteApp(row){
console.log(JSON.stringify(row)) console.log(JSON.stringify(row))
removeAppVersion(row.id).then(res=>{ this.$confirm('确定删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeAppVersion(row.id).then(res=>{
if (res.rel) { if (res.rel) {
this.$notify.success({ this.$notify.success({
title: '删除成功', title: '删除成功',
...@@ -433,6 +427,7 @@ ...@@ -433,6 +427,7 @@
} }
this.getList() this.getList()
}) })
})
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(file, fileList); console.log(file, fileList);
......
...@@ -55,18 +55,7 @@ ...@@ -55,18 +55,7 @@
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button> <el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button size="small" type="success" @click="handleDown(scope.row)" style="margin-left:0px" v-show="scope.row.status==1">下架</el-button> <el-button size="small" type="success" @click="handleDown(scope.row)" style="margin-left:0px" v-show="scope.row.status==1">下架</el-button>
<el-button size="small" type="success" @click="handleUp(scope.row)" style="margin-left:0px" v-show="scope.row.status==2">上架</el-button> <el-button size="small" type="success" @click="handleUp(scope.row)" style="margin-left:0px" v-show="scope.row.status==2">上架</el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)" style="margin-left:0px" v-show="scope.row.status==2">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5 v-show="scope.row.status==2">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -538,24 +527,30 @@ ...@@ -538,24 +527,30 @@
* 操作-删除 * 操作-删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delObj(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delObj(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
} }
} }
......
...@@ -55,18 +55,7 @@ ...@@ -55,18 +55,7 @@
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button> <el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button size="small" type="success" @click="handleDown(scope.row)" style="margin-left:0px" v-show="scope.row.status==1">下架</el-button> <el-button size="small" type="success" @click="handleDown(scope.row)" style="margin-left:0px" v-show="scope.row.status==1">下架</el-button>
<el-button size="small" type="success" @click="handleUp(scope.row)" style="margin-left:0px" v-show="scope.row.status==2">上架</el-button> <el-button size="small" type="success" @click="handleUp(scope.row)" style="margin-left:0px" v-show="scope.row.status==2">上架</el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)" style="margin-left:0px" v-show="scope.row.status==2">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5 v-show="scope.row.status==2">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -508,24 +497,31 @@ ...@@ -508,24 +497,31 @@
* 操作-删除 * 操作-删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delObj(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delObj(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
} }
} }
......
...@@ -41,18 +41,7 @@ ...@@ -41,18 +41,7 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑 <el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -377,24 +366,30 @@ ...@@ -377,24 +366,30 @@
* 操作-删除 * 操作-删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delBanner(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delBanner(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
getUrl(drivingLicensePath) { getUrl(drivingLicensePath) {
return process.env.BASE_API + return process.env.BASE_API +
......
...@@ -25,19 +25,7 @@ ...@@ -25,19 +25,7 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑 <el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑
</el-button> </el-button>
<el-popover <el-button type="danger" v-if="scope.row.type!=88" size="small" @click="deleteHandler(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" v-if="scope.row.type!=88" size="small" v-popover:popover5>删除</el-button>
<!--<el-button size="small" type="danger" @click="deleteHandler(scope.row)">删除--> <!--<el-button size="small" type="danger" @click="deleteHandler(scope.row)">删除-->
<!--</el-button>--> <!--</el-button>-->
</template> </template>
...@@ -291,24 +279,30 @@ ...@@ -291,24 +279,30 @@
* 操作-删除 * 操作-删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delGeneral(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delGeneral(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
this.$notify({
title: '删除失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
}); });
} })
});
}, },
/** /**
......
...@@ -32,18 +32,7 @@ ...@@ -32,18 +32,7 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑 <el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -299,24 +288,30 @@ ...@@ -299,24 +288,30 @@
* 删除 * 删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delCampsiteTag(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delCampsiteTag(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
this.$notify({
title: '删除失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
}); });
} })
});
}, },
/** /**
* 编辑营地类别 * 编辑营地类别
......
...@@ -70,18 +70,7 @@ ...@@ -70,18 +70,7 @@
</el-button> </el-button>
<el-button size="small" type="warn" v-if="scope.row.saleState==1 && campsiteshop_btn_update_salestatus" @click="upStatus(scope.row)">下架 <el-button size="small" type="warn" v-if="scope.row.saleState==1 && campsiteshop_btn_update_salestatus" @click="upStatus(scope.row)">下架
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)" v-if="campsiteshop_btn_del">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5 v-if="campsiteshop_btn_del">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -195,25 +184,31 @@ import { ...@@ -195,25 +184,31 @@ import {
* 操作-删除 * 操作-删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delCampsiteShop(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delCampsiteShop(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.oneCampsiteDialogVisible = false; title: '成功',
this.getList(); message: '删除成功',
} else { type: 'success',
this.$notify({ duration: 2000
title: '删除失败', });
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', this.oneCampsiteDialogVisible = false;
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
/** /**
* 上架、下架 参数 id status 1-上架;2-下架 post * 上架、下架 参数 id status 1-上架;2-下架 post
......
...@@ -81,18 +81,7 @@ ...@@ -81,18 +81,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
<el-popover <el-button v-if="form.showTitle == '途径地编辑'" type="danger" @click="deleteHandler()">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler()">确定</el-button>
</div>
</el-popover>
<el-button v-if="form.showTitle == '途径地编辑'" type="danger" v-popover:popover5>删除</el-button>
<el-button type="primary" @click="okHandler('form')">确 定</el-button> <el-button type="primary" @click="okHandler('form')">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -268,8 +257,14 @@ ...@@ -268,8 +257,14 @@
* */ * */
deleteHandler(formName) { deleteHandler(formName) {
// 删除 // 删除
this.form.method = 'delete'; this.$confirm('确定删除吗?', '提示', {
this.$emit(this.form.eventName, this.form); confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.form.method = 'delete';
this.$emit(this.form.eventName, this.form);
})
}, },
querySearch(queryString, cb) { querySearch(queryString, cb) {
let selectArry = []; let selectArry = [];
......
...@@ -64,18 +64,7 @@ ...@@ -64,18 +64,7 @@
<el-table-column align="center" label="操作" fixed="right"> <el-table-column align="center" label="操作" fixed="right">
<template scope="scope"> <template scope="scope">
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button> <el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)">删除</el-button>
ref="popover1"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover1>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -501,17 +490,23 @@ ...@@ -501,17 +490,23 @@
that.editDialogVisible = true; that.editDialogVisible = true;
}, },
deleteHandler(row){ deleteHandler(row){
delObj(row.id).then(() => { this.$confirm('确定删除吗?', '提示', {
this.$notify({ confirmButtonText: '确定',
title: '成功', cancelButtonText: '取消',
message: '删除成功', type: 'warning'
type: 'success', }).then(() => {
duration: 2000 delObj(row.id).then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
row.visible2 = false;
const index = this.list.indexOf(row);
this.list.splice(index, 1);
}); });
row.visible2 = false; })
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
}, },
/** /**
* 创建 * 创建
......
...@@ -66,11 +66,13 @@ ...@@ -66,11 +66,13 @@
<div style="margin: 20px 0;"><span style="font-size: 18px;font-weight: bold;">出游人信息 成人{{form.orderTourDetail.adultNum}}人 儿童{{form.orderTourDetail.childNum}}</span></div> <div style="margin: 20px 0;"><span style="font-size: 18px;font-weight: bold;">出游人信息 成人{{form.orderTourDetail.adultNum}}人 儿童{{form.orderTourDetail.childNum}}</span></div>
<table class="orderDetail"> <table class="orderDetail">
<tr><th>姓名</th><th>电话</th><th>身份证号</th></tr> <tr><th>姓名</th><th>电话</th><th>身份证号</th></tr>
<tr v-for="(item,index) in form.orderTourDetail.userVoList " :key="index"> <template v-if="form.orderTourDetail.userVoList.length>0">
<td>{{item.realname}}</td> <tr v-for="(item,index) in form.orderTourDetail.userVoList " :key="index">
<td>{{item.username}}</td> <td>{{item.realname}}</td>
<td>{{item.idNumber}}</td> <td>{{item.username}}</td>
</tr> <td>{{item.idNumber}}</td>
</tr>
</template>
</table> </table>
</div> </div>
</el-form> </el-form>
...@@ -201,7 +203,8 @@ ...@@ -201,7 +203,8 @@
this.costDetail = JSON.parse(a.orderTourDetail.costDetail) this.costDetail = JSON.parse(a.orderTourDetail.costDetail)
var cost = ''; var cost = '';
this.costDetail.children.forEach(function(a1) { this.costDetail.children.forEach(function(a1) {
cost += a1.key + ":" +a1.detail+" " var detail = a1.detail==undefined?'':a1.detail
cost += a1.key + ":" +detail+" "
}) })
if (this.form.status == 2) { if (this.form.status == 2) {
this.form.ststusName = '取消'; this.form.ststusName = '取消';
......
...@@ -426,7 +426,8 @@ ...@@ -426,7 +426,8 @@
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail) this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail)
var cost = ''; var cost = '';
this.costDetail.children.forEach(function(a) { this.costDetail.children.forEach(function(a) {
cost += a.key + ":" +a.detail+" " var detail = a.detail==undefined?'':a.detail
cost += a.key + ":" +detail+" "
}) })
this.tourCostDetail = cost this.tourCostDetail = cost
if(this.form.orderRentVehicleDetail.driverType==1) { if(this.form.orderRentVehicleDetail.driverType==1) {
......
...@@ -63,18 +63,7 @@ ...@@ -63,18 +63,7 @@
</el-button> </el-button>
<el-button size="small" type="warn" v-if="scope.row.status==1" @click="upStatus(scope.row)">下架 <el-button size="small" type="warn" v-if="scope.row.status==1" @click="upStatus(scope.row)">下架
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -500,25 +489,31 @@ ...@@ -500,25 +489,31 @@
* 操作-删除 * 操作-删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
goodDel(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', goodDel(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.oneTourDialogVisible = false; title: '成功',
this.getList(); message: '删除成功',
} else { type: 'success',
this.$notify({ duration: 2000
title: '删除失败', });
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', this.oneTourDialogVisible = false;
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
/** /**
* 上架、下架 参数 id status 1-上架;2-下架 post * 上架、下架 参数 id status 1-上架;2-下架 post
......
...@@ -91,18 +91,7 @@ ...@@ -91,18 +91,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
<el-popover <el-button v-if="form.showTitle == '途径地编辑'" type="danger" @click="deleteHandler()">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler()">确定</el-button>
</div>
</el-popover>
<el-button v-if="form.showTitle == '途径地编辑'" type="danger" v-popover:popover5>删除</el-button>
<el-button type="primary" @click="okHandler('form')">确 定</el-button> <el-button type="primary" @click="okHandler('form')">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -278,8 +267,14 @@ ...@@ -278,8 +267,14 @@
* */ * */
deleteHandler(formName) { deleteHandler(formName) {
// 删除 // 删除
this.form.method = 'delete'; this.$confirm('确定删除吗?', '提示', {
this.$emit(this.form.eventName, this.form); confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.form.method = 'delete';
this.$emit(this.form.eventName, this.form);
})
}, },
querySearch(queryString, cb) { querySearch(queryString, cb) {
let selectArry = []; let selectArry = [];
......
...@@ -49,18 +49,7 @@ ...@@ -49,18 +49,7 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑 <el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -315,24 +304,30 @@ ...@@ -315,24 +304,30 @@
* 删除 * 删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
deleteTourTag(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', deleteTourTag(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
/** /**
* 操作-编辑 * 操作-编辑
......
...@@ -83,18 +83,7 @@ ...@@ -83,18 +83,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="100" fixed="right"> <el-table-column align="center" label="操作" width="100" fixed="right">
<template scope="scope"> <template scope="scope">
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)" v-if="memberEnter_btn_del">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5 v-if="memberEnter_btn_del">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -356,24 +345,30 @@ ...@@ -356,24 +345,30 @@
* 删除 * 删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delMemberObj(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delMemberObj(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message:response.message?response.message: '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message:response.message?response.message: '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
//excel上传 //excel上传
handleRemove(file, fileList) { handleRemove(file, fileList) {
......
...@@ -139,19 +139,7 @@ ...@@ -139,19 +139,7 @@
</el-button> </el-button>
<el-button v-if="scope.row.status==1&&userList_btn_unmute" size="small" type="danger" @click="available(scope.row)">取消禁用 <el-button v-if="scope.row.status==1&&userList_btn_unmute" size="small" type="danger" @click="available(scope.row)">取消禁用
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" v-if="userList_btn_del" @click="deleteUser(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteUser(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-if="userList_btn_del" v-popover:popover5>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -1149,21 +1137,27 @@ ...@@ -1149,21 +1137,27 @@
this.$forceUpdate() this.$forceUpdate()
}, },
deleteUser(row){ deleteUser(row){
deleteUser(row.userId).then( this.$confirm('确定删除吗?', '提示', {
res=>{ confirmButtonText: '确定',
if (res.rel) { cancelButtonText: '取消',
this.$notify.success({ type: 'warning'
title: '删除成功', }).then(() => {
message: `success` deleteUser(row.userId).then(
}) res=>{
} else { if (res.rel) {
this.$notify.warning({ this.$notify.success({
title: '删除失败', title: '删除成功',
message: `failed` message: `success`
}) })
} } else {
this.getList() this.$notify.warning({
}) title: '删除失败',
message: `failed`
})
}
this.getList()
})
})
} }
} }
} }
......
...@@ -338,18 +338,7 @@ ...@@ -338,18 +338,7 @@
</el-button> </el-button>
<el-button size="small" class="el-button el-button--text el-button--small" @click="handleBookInfo(scope.row)">预订信息</el-button> <el-button size="small" class="el-button el-button--text el-button--small" @click="handleBookInfo(scope.row)">预订信息</el-button>
<el-button size="small" class="el-button el-button--text el-button--small" @click="handleDepartureLog(scope.row)">出车记录</el-button> <el-button size="small" class="el-button el-button--text el-button--small" @click="handleDepartureLog(scope.row)">出车记录</el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)" v-if="vehicleInfo_btn_ret">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5 v-if="vehicleInfo_btn_ret">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -1952,25 +1941,31 @@ ...@@ -1952,25 +1941,31 @@
* 删除 * 删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delObj(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delObj(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.bannerDialogVisible = false; title: '成功',
this.getList(); message: '删除成功',
} else { type: 'success',
this.$notify({ duration: 2000
title: '删除失败', });
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', this.bannerDialogVisible = false;
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
resetTemp() { resetTemp() {
this.form = { this.form = {
......
...@@ -78,18 +78,7 @@ ...@@ -78,18 +78,7 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" type="success" @click="handleUpdate(scope.row)">{{vehicleTypeList_btn_edit?'编辑':'查看'}} <el-button size="small" type="success" @click="handleUpdate(scope.row)">{{vehicleTypeList_btn_edit?'编辑':'查看'}}
</el-button> </el-button>
<el-popover <el-button type="danger" size="small" @click="deleteHandler(scope.row)" v-if="vehicleTypeList_btn_del">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5 v-if="vehicleTypeList_btn_del">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -213,25 +202,31 @@ ...@@ -213,25 +202,31 @@
* 删除 * 删除
* */ * */
deleteHandler(row) { deleteHandler(row) {
delVehicleModel(row.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', delVehicleModel(row.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.bannerDialogVisible = false; title: '成功',
this.getList(); message: '删除成功',
} else { type: 'success',
this.$notify({ duration: 2000
title: '删除失败', });
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', this.bannerDialogVisible = false;
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
/** /**
* 编辑 * 编辑
......
...@@ -51,18 +51,7 @@ ...@@ -51,18 +51,7 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" type="success" @click="handleUpdate(scope.row)">{{vehicleTypeLabel_btn_save?'编辑':'查看'}} <el-button size="small" type="success" @click="handleUpdate(scope.row)">{{vehicleTypeLabel_btn_save?'编辑':'查看'}}
</el-button> </el-button>
<el-popover <el-button type="danger" v-if="scope.row.parent.id != 1 && scope.row.parent.id!= 14&&vehicleTypeLabel_btn_del" size="small" @click="deleteHandler(scope.row)">删除</el-button>
ref="popover5"
placement="top"
width="160"
v-model="scope.row.parent.visible2">
<p>确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.parent.visible2 = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" v-if="scope.row.parent.id != 1 && scope.row.parent.id!= 14&&vehicleTypeLabel_btn_del" size="small" v-popover:popover5>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -342,24 +331,30 @@ ...@@ -342,24 +331,30 @@
* 删除一个标签 * 删除一个标签
* */ * */
deleteHandler(row) { deleteHandler(row) {
deleteVehicleType(row.parent.id).then(response => { this.$confirm('确定删除吗?', '提示', {
if (response.status === 200) { confirmButtonText: '确定',
this.$notify({ cancelButtonText: '取消',
title: '成功', type: 'warning'
message: '删除成功', }).then(() => {
type: 'success', deleteVehicleType(row.parent.id).then(response => {
duration: 2000 if (response.status === 200) {
}); this.$notify({
this.getList(); title: '成功',
} else { message: '删除成功',
this.$notify({ type: 'success',
title: '删除失败', duration: 2000
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', });
type: 'error', this.getList();
duration: 2000 } else {
}); this.$notify({
} title: '删除失败',
}); message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
/** /**
* 操作-编辑 * 操作-编辑
......
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