Commit 45bf38e4 by baihong

规则编辑

parent 4e0a71ab
......@@ -98,8 +98,8 @@
<editor v-model="content" />
<div class="topSearch" style="margin-top: 20px;">
<div class="left">
<Button type="primary" @click="goDetail">取消</Button>
<Button type="primary">保存</Button>
<Button type="primary" @click="content = ''">取消</Button>
<Button type="primary" @click="savecontent">保存</Button>
</div>
</div>
</div>
......@@ -156,7 +156,8 @@ import {
addConfigAward,
editConfigAward,
deleteConfigAward,
getActivityConfigRule
getActivityConfigRule,
updateRule
} from "@/api/clock/activityClocks";
import Editor from "_c/editor";
export default {
......@@ -166,6 +167,7 @@ export default {
},
data() {
return {
gzId: null,
content: "",
payData: [
{
......@@ -299,6 +301,15 @@ export default {
this.getTime();
});
},
savecontent() {
updateRule({
id: this.gzId,
content: this.content,
rule_type: 2
}).then(res => {
this.$Message.success("保存成功!");
});
},
submit() {
this.formValidate.type = this.tab === "3" ? 1 : 2;
this.formValidate.uuid = sessionStorage.getItem("admin_uuid");
......@@ -348,7 +359,8 @@ export default {
language: "cn",
ruleType: 1
}).then(res => {
this.data = res;
this.content = res.content;
this.gzId = res.id;
});
},
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