Commit 45bf38e4 by baihong

规则编辑

parent 4e0a71ab
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
<editor v-model="content" /> <editor v-model="content" />
<div class="topSearch" style="margin-top: 20px;"> <div class="topSearch" style="margin-top: 20px;">
<div class="left"> <div class="left">
<Button type="primary" @click="goDetail">取消</Button> <Button type="primary" @click="content = ''">取消</Button>
<Button type="primary">保存</Button> <Button type="primary" @click="savecontent">保存</Button>
</div> </div>
</div> </div>
</div> </div>
...@@ -156,7 +156,8 @@ import { ...@@ -156,7 +156,8 @@ import {
addConfigAward, addConfigAward,
editConfigAward, editConfigAward,
deleteConfigAward, deleteConfigAward,
getActivityConfigRule getActivityConfigRule,
updateRule
} from "@/api/clock/activityClocks"; } from "@/api/clock/activityClocks";
import Editor from "_c/editor"; import Editor from "_c/editor";
export default { export default {
...@@ -166,6 +167,7 @@ export default { ...@@ -166,6 +167,7 @@ export default {
}, },
data() { data() {
return { return {
gzId: null,
content: "", content: "",
payData: [ payData: [
{ {
...@@ -299,6 +301,15 @@ export default { ...@@ -299,6 +301,15 @@ export default {
this.getTime(); this.getTime();
}); });
}, },
savecontent() {
updateRule({
id: this.gzId,
content: this.content,
rule_type: 2
}).then(res => {
this.$Message.success("保存成功!");
});
},
submit() { submit() {
this.formValidate.type = this.tab === "3" ? 1 : 2; this.formValidate.type = this.tab === "3" ? 1 : 2;
this.formValidate.uuid = sessionStorage.getItem("admin_uuid"); this.formValidate.uuid = sessionStorage.getItem("admin_uuid");
...@@ -348,7 +359,8 @@ export default { ...@@ -348,7 +359,8 @@ export default {
language: "cn", language: "cn",
ruleType: 1 ruleType: 1
}).then(res => { }).then(res => {
this.data = res; this.content = res.content;
this.gzId = res.id;
}); });
}, },
getTime() { getTime() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment