Commit 9481cff2 by Thews

20231208wangwansu

1 parent 43c3eb0c
......@@ -322,6 +322,7 @@ export default {
}).then(() => {
getJGYSGLDel(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("删除成功");
this.getList();
}
});
......
......@@ -417,6 +417,7 @@ export default {
}).then(() => {
getJGSTPZDel(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("删除成功");
this.getList();
}
});
......
......@@ -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-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-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>
</template>
</el-table-column>
......@@ -239,20 +239,11 @@ export default {
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") {
this.formData.state = 1;
if (this.formData.dicyId) {
// 编辑发布
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
......@@ -261,8 +252,9 @@ export default {
}
});
}else{
// 新建发布
getYMXZDGLAdd(this.formData).then(res => {
this.formData = item;
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
......@@ -282,38 +274,19 @@ export default {
});
}else if (type == "del") {
// 删除
this.formData = item;
this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
getYMXZDGLDel(this.formData).then(res => {
if (res.code == 200) {
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();
}
});
// this.formData = item;
// this.$confirm("确认删除吗", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning"
// }).then(() => {
// getYMXZDGLDel(this.formData).then(res => {
// if (res.code == 200) {
// this.$message.success("删除成功");
// this.getList();
// }
// });
// });
}
},
// 新建清空表单
......
......@@ -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-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-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>
</template>
</el-table-column>
......@@ -196,7 +196,6 @@ export default {
// 查询列表
getList() {
getYMXZDGLlist(this.params).then(res => {
console.log(res);
if (res.code == 200) {
this.page.total = res.data.total;
this.tableData = res.data.records;
......@@ -258,9 +257,9 @@ export default {
});
}
}else if (type == "push") {
this.formData.state = 1;
if (this.formData.dicyId) {
// 编辑发布
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
......@@ -269,8 +268,9 @@ export default {
}
});
}else{
// 新建发布
getYMXZDGLAdd(this.formData).then(res => {
this.formData = item;
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
......@@ -290,38 +290,19 @@ export default {
});
}else if (type == "del") {
// 删除
this.formData = item;
this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
getYMXZDGLDel(this.formData).then(res => {
if (res.code == 200) {
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();
}
});
// this.formData = item;
// this.$confirm("确认删除吗", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning"
// }).then(() => {
// getYMXZDGLDel(this.formData).then(res => {
// if (res.code == 200) {
// this.$message.success("删除成功");
// this.getList();
// }
// });
// });
}
},
// 新建清空表单
......
......@@ -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-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-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>
</template>
</el-table-column>
......@@ -268,7 +268,6 @@ export default {
getViewNameList() {
getViewNameList().then(res => {
if (res.code == 200) {
console.log(res);
let arr = JSON.parse(res.msg);
let viewStr = arr[0].viewName;
this.viewNameList = viewStr.split(",");
......@@ -330,9 +329,9 @@ export default {
});
}
}else if (type == "push") {
this.formData.state = 1;
if (this.formData.dicyId) {
// 编辑发布
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
......@@ -341,8 +340,9 @@ export default {
}
});
}else{
// 新建发布
getYMXZDGLAdd(this.formData).then(res => {
this.formData = item;
this.formData.state = 1;
getYMXZDGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
......@@ -362,38 +362,19 @@ export default {
});
}else if (type == "del") {
// 删除
this.formData = item;
this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
getYMXZDGLDel(this.formData).then(res => {
if (res.code == 200) {
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();
}
});
// this.formData = item;
// this.$confirm("确认删除吗", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning"
// }).then(() => {
// getYMXZDGLDel(this.formData).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!