Commit 9481cff2 by Thews

20231208wangwansu

1 parent 43c3eb0c
...@@ -322,6 +322,7 @@ export default { ...@@ -322,6 +322,7 @@ export default {
}).then(() => { }).then(() => {
getJGYSGLDel(this.formData).then(res => { getJGYSGLDel(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("删除成功");
this.getList(); this.getList();
} }
}); });
......
...@@ -417,6 +417,7 @@ export default { ...@@ -417,6 +417,7 @@ export default {
}).then(() => { }).then(() => {
getJGSTPZDel(this.formData).then(res => { getJGSTPZDel(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("删除成功");
this.getList(); this.getList();
} }
}); });
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<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-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-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 icon="el-icon-upload2" size="mini" @click="operate('push',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 icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -239,20 +239,11 @@ export default { ...@@ -239,20 +239,11 @@ export default {
this.getList(); this.getList();
} }
}); });
}else{
// 新建保存
getYMXZDGLAdd(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}
});
} }
}else if (type == "push") { }else if (type == "push") {
this.formData.state = 1;
if (this.formData.dicyId) { if (this.formData.dicyId) {
// 编辑发布 // 编辑发布
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => { getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("发布成功"); this.$message.success("发布成功");
...@@ -261,8 +252,9 @@ export default { ...@@ -261,8 +252,9 @@ export default {
} }
}); });
}else{ }else{
// 新建发布 this.formData = item;
getYMXZDGLAdd(this.formData).then(res => { this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("发布成功"); this.$message.success("发布成功");
this.add_dialog = false; this.add_dialog = false;
...@@ -282,38 +274,19 @@ export default { ...@@ -282,38 +274,19 @@ export default {
}); });
}else if (type == "del") { }else if (type == "del") {
// 删除 // 删除
this.formData = item; // this.formData = item;
this.$confirm("确认删除吗", "提示", { // this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定", // confirmButtonText: "确定",
cancelButtonText: "取消", // cancelButtonText: "取消",
type: "warning" // type: "warning"
}).then(() => { // }).then(() => {
getYMXZDGLDel(this.formData).then(res => { // getYMXZDGLDel(this.formData).then(res => {
if (res.code == 200) { // if (res.code == 200) {
this.getList(); // this.$message.success("删除成功");
} // this.getList();
}); // }
}); // });
}else if (type == "pushAll") { // });
if (this.selectList.length <= 0) {
this.$message.error("请选择一项进行发布");
return;
}
let params = {
dicyId: [],
state: 2
};
this.selectList.map(item => {
params.dicyId.push(item.dicyId)
})
console.log(params);
getJGYSGLUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}
});
} }
}, },
// 新建清空表单 // 新建清空表单
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<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-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-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 icon="el-icon-upload2" size="mini" @click="operate('push',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 icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -196,7 +196,6 @@ export default { ...@@ -196,7 +196,6 @@ export default {
// 查询列表 // 查询列表
getList() { getList() {
getYMXZDGLlist(this.params).then(res => { getYMXZDGLlist(this.params).then(res => {
console.log(res);
if (res.code == 200) { if (res.code == 200) {
this.page.total = res.data.total; this.page.total = res.data.total;
this.tableData = res.data.records; this.tableData = res.data.records;
...@@ -258,9 +257,9 @@ export default { ...@@ -258,9 +257,9 @@ export default {
}); });
} }
}else if (type == "push") { }else if (type == "push") {
this.formData.state = 1;
if (this.formData.dicyId) { if (this.formData.dicyId) {
// 编辑发布 // 编辑发布
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => { getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("发布成功"); this.$message.success("发布成功");
...@@ -269,8 +268,9 @@ export default { ...@@ -269,8 +268,9 @@ export default {
} }
}); });
}else{ }else{
// 新建发布 this.formData = item;
getYMXZDGLAdd(this.formData).then(res => { this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("发布成功"); this.$message.success("发布成功");
this.add_dialog = false; this.add_dialog = false;
...@@ -290,38 +290,19 @@ export default { ...@@ -290,38 +290,19 @@ export default {
}); });
}else if (type == "del") { }else if (type == "del") {
// 删除 // 删除
this.formData = item; // this.formData = item;
this.$confirm("确认删除吗", "提示", { // this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定", // confirmButtonText: "确定",
cancelButtonText: "取消", // cancelButtonText: "取消",
type: "warning" // type: "warning"
}).then(() => { // }).then(() => {
getYMXZDGLDel(this.formData).then(res => { // getYMXZDGLDel(this.formData).then(res => {
if (res.code == 200) { // if (res.code == 200) {
this.getList(); // this.$message.success("删除成功");
} // this.getList();
}); // }
}); // });
}else if (type == "pushAll") { // });
if (this.selectList.length <= 0) {
this.$message.error("请选择一项进行发布");
return;
}
let params = {
dicyId: [],
state: 2
};
this.selectList.map(item => {
params.dicyId.push(item.dicyId)
})
console.log(params);
getJGYSGLUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}
});
} }
}, },
// 新建清空表单 // 新建清空表单
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<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-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-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 icon="el-icon-upload2" size="mini" @click="operate('push',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 icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -268,7 +268,6 @@ export default { ...@@ -268,7 +268,6 @@ export default {
getViewNameList() { getViewNameList() {
getViewNameList().then(res => { getViewNameList().then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log(res);
let arr = JSON.parse(res.msg); let arr = JSON.parse(res.msg);
let viewStr = arr[0].viewName; let viewStr = arr[0].viewName;
this.viewNameList = viewStr.split(","); this.viewNameList = viewStr.split(",");
...@@ -330,9 +329,9 @@ export default { ...@@ -330,9 +329,9 @@ export default {
}); });
} }
}else if (type == "push") { }else if (type == "push") {
this.formData.state = 1;
if (this.formData.dicyId) { if (this.formData.dicyId) {
// 编辑发布 // 编辑发布
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => { getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("发布成功"); this.$message.success("发布成功");
...@@ -341,8 +340,9 @@ export default { ...@@ -341,8 +340,9 @@ export default {
} }
}); });
}else{ }else{
// 新建发布 this.formData = item;
getYMXZDGLAdd(this.formData).then(res => { this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("发布成功"); this.$message.success("发布成功");
this.add_dialog = false; this.add_dialog = false;
...@@ -362,38 +362,19 @@ export default { ...@@ -362,38 +362,19 @@ export default {
}); });
}else if (type == "del") { }else if (type == "del") {
// 删除 // 删除
this.formData = item; // this.formData = item;
this.$confirm("确认删除吗", "提示", { // this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定", // confirmButtonText: "确定",
cancelButtonText: "取消", // cancelButtonText: "取消",
type: "warning" // type: "warning"
}).then(() => { // }).then(() => {
getYMXZDGLDel(this.formData).then(res => { // getYMXZDGLDel(this.formData).then(res => {
if (res.code == 200) { // if (res.code == 200) {
this.getList(); // this.$message.success("删除成功");
} // this.getList();
}); // }
}); // });
}else if (type == "pushAll") { // });
if (this.selectList.length <= 0) {
this.$message.error("请选择一项进行发布");
return;
}
let params = {
dicyId: [],
state: 2
};
this.selectList.map(item => {
params.dicyId.push(item.dicyId)
})
console.log(params);
getJGYSGLUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}
});
} }
}, },
// 新建清空表单 // 新建清空表单
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!