|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="cmain">
|
|
|
- <el-form ref="form" :model="form" :rules="rules">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
|
|
<el-form-item label="项目名称" prop="atvName">
|
|
|
<el-input
|
|
|
v-model="form.atvName"
|
|
@@ -27,10 +27,10 @@
|
|
|
type="textarea"
|
|
|
:rows="5"
|
|
|
v-model="form.content"
|
|
|
- placeholder="请输入建设内容(万)"
|
|
|
+ placeholder="请输入建设内容"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="年度投资计划" prop="plan">
|
|
|
+ <el-form-item label="年度投资计划(万)" prop="plan">
|
|
|
<el-input
|
|
|
type="number"
|
|
|
v-model="form.plan"
|
|
@@ -61,6 +61,7 @@ import {
|
|
|
delARTICLE,
|
|
|
addARTICLE,
|
|
|
updateARTICLE,
|
|
|
+ audit
|
|
|
} from "@/api/portal/ARTICLE/ARTICLE.js";
|
|
|
export default {
|
|
|
data() {
|
|
@@ -121,10 +122,6 @@ export default {
|
|
|
if (this.param.id) {
|
|
|
getARTICLE(this.param.id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
- this.form.content = response.data.content.replace(
|
|
|
- new RegExp("/profile/upload/", "g"),
|
|
|
- this.baseUrl + "/profile/upload/"
|
|
|
- );
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -134,29 +131,58 @@ export default {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateARTICLE(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
- this.$layer.close(this.layerid);
|
|
|
- this.$parent.getList();
|
|
|
- });
|
|
|
- } else {
|
|
|
if (type == 0) {
|
|
|
- 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) {
|
|
|
- this.form.status = 1
|
|
|
- addARTICLE(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("提交审核成功");
|
|
|
+ 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("保存成功");
|
|
|
+ // 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("提交审核成功");
|
|
|
+ // this.$layer.close(this.layerid);
|
|
|
+ // this.$parent.getList();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
});
|
|
|
},
|
|
|
},
|