|
@@ -129,60 +129,60 @@ export default {
|
|
|
/** 提交按钮 */
|
|
|
submitForm(type) {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- if (this.form.id != null) {
|
|
|
- if (type == 0) {
|
|
|
- updateARTICLE(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
- this.$layer.close(this.layerid);
|
|
|
- this.$parent.getList();
|
|
|
- });
|
|
|
- } else if (type == 1) {
|
|
|
- this.form.status = 1;
|
|
|
- audit(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("提交成功");
|
|
|
- this.$layer.close(this.layerid);
|
|
|
- this.$parent.getList();
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.form.status = 1;
|
|
|
- addARTICLE(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("提交审核成功");
|
|
|
- this.$layer.close(this.layerid);
|
|
|
- this.$parent.getList();
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// if (valid) {
|
|
|
// if (this.form.id != null) {
|
|
|
- // console.log("修改内容");
|
|
|
- // updateARTICLE(this.form).then((response) => {
|
|
|
- // this.$modal.msgSuccess("修改成功");
|
|
|
- // this.$layer.close(this.layerid);
|
|
|
- // this.$parent.getList();
|
|
|
- // });
|
|
|
- // } else {
|
|
|
// if (type == 0) {
|
|
|
- // console.log("草稿保存");
|
|
|
- // this.form.status = 0;
|
|
|
- // addARTICLE(this.form).then((response) => {
|
|
|
- // this.$modal.msgSuccess("保存成功");
|
|
|
+ // updateARTICLE(this.form).then((response) => {
|
|
|
+ // this.$modal.msgSuccess("修改成功");
|
|
|
// this.$layer.close(this.layerid);
|
|
|
// this.$parent.getList();
|
|
|
// });
|
|
|
// } else if (type == 1) {
|
|
|
- // console.log("草稿提交审核");
|
|
|
// this.form.status = 1;
|
|
|
- // addARTICLE(this.form).then((response) => {
|
|
|
- // this.$modal.msgSuccess("提交审核成功");
|
|
|
+ // audit(this.form).then((response) => {
|
|
|
+ // this.$modal.msgSuccess("提交成功");
|
|
|
// this.$layer.close(this.layerid);
|
|
|
// this.$parent.getList();
|
|
|
// });
|
|
|
// }
|
|
|
+ // } else {
|
|
|
+ // this.form.status = 1;
|
|
|
+ // addARTICLE(this.form).then((response) => {
|
|
|
+ // this.$modal.msgSuccess("提交审核成功");
|
|
|
+ // this.$layer.close(this.layerid);
|
|
|
+ // this.$parent.getList();
|
|
|
+ // });
|
|
|
// }
|
|
|
// }
|
|
|
+
|
|
|
+ if (valid) {
|
|
|
+ this.form.status = type;
|
|
|
+ if (this.form.id != null) {
|
|
|
+ // console.log("修改内容");
|
|
|
+ updateARTICLE(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.$layer.close(this.layerid);
|
|
|
+ this.$parent.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (type == 0) {
|
|
|
+ // console.log("草稿保存");
|
|
|
+ addARTICLE(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("保存成功");
|
|
|
+ this.$layer.close(this.layerid);
|
|
|
+ this.$parent.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (type == 1) {
|
|
|
+ // console.log("提交审核");
|
|
|
+ addARTICLE(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("提交审核成功");
|
|
|
+ this.$layer.close(this.layerid);
|
|
|
+ this.$parent.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
},
|