Commit 30b5f84a by liuyong
2 parents bde79a56 1178a3e0
......@@ -67,10 +67,10 @@
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-view" size="mini" @click="operate('view',scope.row)">查看</el-button>
<!-- <el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button> -->
<el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button>
<!-- <el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button> -->
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state != 1 ? '':'stopBtn'" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button :class="scope.row.state == 1 ? '':'delBtn'" icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state == 1">删除</el-button>
</div>
</template>
</el-table-column>
......@@ -407,6 +407,9 @@ export default {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
......@@ -416,6 +419,9 @@ export default {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
......@@ -428,6 +434,9 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
......@@ -437,29 +446,49 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
}else if (type == "pushEdit") {
// 编辑发布
this.formData = item
this.formData.state = 1;
getJGYSGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}
this.$confirm("确认发布吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item
this.formData.state = 1;
getJGYSGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "stop") {
// 停用
this.formData = item;
this.formData.state = 0;
getJGYSGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}
this.$confirm("确认停用吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 0;
getJGYSGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "del") {
// 删除
......@@ -473,6 +502,8 @@ export default {
if (res.code == 200) {
this.$message.success("删除成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
......@@ -490,11 +521,20 @@ export default {
params.eleRelaId.push(item.eleRelaId)
})
getJGYSGLUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}
this.$confirm("确认批量发布吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
getJGYSGLUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}
},
......@@ -719,6 +759,16 @@ export default {
height: 30px;
}
}
.editBtn{
color: #0D867F;
}
.delBtn{
color: #DB6209;
}
.stopBtn{
color: #E7A20E;
}
}
.el-pagination{
margin-top: 50px;
......
......@@ -67,10 +67,10 @@
<el-table-column label="操作" width="360" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state != 1 ? '':'stopBtn'" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button :class="scope.row.state != 2 ? '':'delBtn'" icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button>
</div>
</template>
</el-table-column>
......@@ -409,6 +409,9 @@ export default {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
......@@ -418,6 +421,9 @@ export default {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
......@@ -434,6 +440,9 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
......@@ -443,42 +452,66 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
}else if (type == "pushEdit") {
// 编辑发布
this.formData = item
this.formData.state = 1;
getJGSTPZUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}
this.$confirm("确认发布吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item
this.formData.state = 1;
getJGSTPZUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "stop") {
// 停用
this.formData = item;
this.formData.state = 0;
getJGSTPZUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}
this.$confirm("确认停用吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 0;
getJGSTPZUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "del") {
// 删除
this.formData = item;
this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
getJGSTPZDel(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("删除成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
......@@ -495,11 +528,21 @@ export default {
this.selectList.map(item => {
params.viewId.push(item.viewId)
})
getJGSTPZUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}
this.$confirm("确认批量发布吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
getJGSTPZUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}
},
......@@ -654,6 +697,15 @@ export default {
.table_container{
width: 97%;
margin-top: 20px;
.editBtn{
color: #0D867F;
}
.delBtn{
color: #DB6209;
}
.stopBtn{
color: #E7A20E;
}
}
.el-pagination{
margin-top: 50px;
......
......@@ -63,9 +63,9 @@
<el-table-column label="操作" width="360" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button icon="el-icon-upload2" size="mini" @click="operate('push',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state != 1 ? '':'stopBtn'" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<!-- <el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> -->
</div>
</template>
......@@ -388,7 +388,6 @@ export default {
this.add_dialog = true;
this.title = "编辑字典";
this.formData = item;
console.log(this.formData);
this.getProyList(item);
}else if (type == "create") {
this.formData.state = 2;
......@@ -399,6 +398,9 @@ export default {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
......@@ -411,9 +413,18 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
}
}else if (type == "pushEdit") {
this.$confirm("确认发布吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
......@@ -421,18 +432,31 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
}).catch(() => {
});
}else if (type == "stop") {
// 停用
this.formData = item;
this.formData.state = 0;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}
this.$confirm("确认停用吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 0;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "del") {
// 删除
......@@ -542,6 +566,7 @@ export default {
this.add_dialog2 = false;
this.getProyList(this.formData);
}else{
this.add_dialog2 = false;
this.$message.error(res.msg);
}
});
......@@ -564,6 +589,9 @@ export default {
this.$message.success("新建成功");
this.add_dialog2 = false;
this.getProyList(this.formData);
}else{
this.add_dialog2 = false;
this.$message.error(res.msg);
}
});
}
......@@ -579,8 +607,11 @@ export default {
if (res.code == 200) {
this.$message.success("删除成功");
this.getProyList(this.formData);
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
break;
}
......@@ -727,6 +758,15 @@ export default {
.table_container{
width: 97%;
margin-top: 20px;
.editBtn{
color: #0D867F;
}
.delBtn{
color: #DB6209;
}
.stopBtn{
color: #E7A20E;
}
}
.el-pagination{
margin-top: 50px;
......
......@@ -57,9 +57,9 @@
<el-table-column label="操作" width="400" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button icon="el-icon-upload2" size="mini" @click="operate('push',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state != 1 ? '':'stopBtn'" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<!-- <el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> -->
</div>
</template>
......@@ -379,15 +379,9 @@ export default {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}
});
}else{
// 新建保存
getYMXZDGLAdd(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("保存成功");
}else{
this.add_dialog = false;
this.getList();
this.$message.error(res.msg);
}
});
}
......@@ -400,9 +394,18 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
}
}else if (type == "pushEdit") {
this.$confirm("确认发布吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
......@@ -410,18 +413,31 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
}).catch(() => {
});
}else if (type == "stop") {
// 停用
this.formData = item;
this.formData.state = 0;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}
this.$confirm("确认停用吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 0;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "del") {
// 删除
......@@ -508,6 +524,7 @@ export default {
this.add_dialog2 = false;
this.getProyList(this.formData);
}else{
this.add_dialog2 = false;
this.$message.error(res.msg);
}
});
......@@ -530,6 +547,9 @@ export default {
this.$message.success("新建成功");
this.add_dialog2 = false;
this.getProyList(this.formData);
}else{
this.add_dialog2 = false;
this.$message.error(res.msg);
}
});
}
......@@ -545,8 +565,11 @@ export default {
if (res.code == 200) {
this.$message.success("删除成功");
this.getProyList(this.formData);
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
break;
}
......@@ -692,6 +715,15 @@ export default {
.table_container{
width: 97%;
margin-top: 20px;
.editBtn{
color: #0D867F;
}
.delBtn{
color: #DB6209;
}
.stopBtn{
color: #E7A20E;
}
}
.el-pagination{
margin-top: 50px;
......
......@@ -60,9 +60,9 @@
<el-table-column label="操作" width="360" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button icon="el-icon-upload2" size="mini" @click="operate('push',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state != 1 ? '':'stopBtn'" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<!-- <el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> -->
</div>
</template>
......@@ -444,15 +444,9 @@ export default {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}
});
}else{
// 新建保存
getYMXZDGLAdd(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("保存成功");
}else{
this.add_dialog = false;
this.getList();
this.$message.error(res.msg);
}
});
}
......@@ -465,9 +459,18 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
}
}else if (type == "pushEdit") {
this.$confirm("确认发布吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
......@@ -475,18 +478,31 @@ export default {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
}).catch(() => {
});
}else if (type == "stop") {
// 停用
this.formData = item;
this.formData.state = 0;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}
this.$confirm("确认停用吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = item;
this.formData.state = 0;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("停用成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "del") {
// 删除
......@@ -550,7 +566,6 @@ export default {
this.add_dialog2 = true;
this.title2 = "编辑字典属性";
this.formData2 = scopeRow;
console.log(this.formData2);
break;
// 保存
case 'save':
......@@ -575,6 +590,7 @@ export default {
this.add_dialog2 = false;
this.getProyList(this.formData);
}else{
this.add_dialog2 = false;
this.$message.error(res.msg);
}
});
......@@ -597,6 +613,9 @@ export default {
this.$message.success("新建成功");
this.add_dialog2 = false;
this.getProyList(this.formData);
}else{
this.add_dialog2 = false;
this.$message.error(res.msg);
}
});
}
......@@ -612,8 +631,11 @@ export default {
if (res.code == 200) {
this.$message.success("删除成功");
this.getProyList(this.formData);
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
break;
}
......@@ -760,6 +782,15 @@ export default {
.table_container{
width: 97%;
margin-top: 20px;
.editBtn{
color: #0D867F;
}
.delBtn{
color: #DB6209;
}
.stopBtn{
color: #E7A20E;
}
}
.el-pagination{
margin-top: 50px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!