|
@@ -425,11 +425,8 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {
|
|
|
|
- post,
|
|
|
|
- get,
|
|
|
|
- put
|
|
|
|
-} from "@/api/common";
|
|
|
|
|
|
+import { post, get, put } from "@/api/common";
|
|
|
|
+const XEUtils = require("xe-utils");
|
|
|
|
|
|
function getArrayClassification (params) {
|
|
function getArrayClassification (params) {
|
|
var options = {
|
|
var options = {
|
|
@@ -487,6 +484,7 @@ export default {
|
|
activeEndTime: "23:59:59",
|
|
activeEndTime: "23:59:59",
|
|
|
|
|
|
// strategyId: "",
|
|
// strategyId: "",
|
|
|
|
+ templateName: "",
|
|
strategyName: "",
|
|
strategyName: "",
|
|
strategyType: "",
|
|
strategyType: "",
|
|
templateId: "",
|
|
templateId: "",
|
|
@@ -513,6 +511,8 @@ export default {
|
|
oldform: {},
|
|
oldform: {},
|
|
//扩展字段
|
|
//扩展字段
|
|
extJson: {
|
|
extJson: {
|
|
|
|
+ maskText: "",
|
|
|
|
+ maskText2: "",
|
|
jiluBtn: "1",
|
|
jiluBtn: "1",
|
|
jihuoBtn: "1",
|
|
jihuoBtn: "1",
|
|
memberBtn: "1",
|
|
memberBtn: "1",
|
|
@@ -680,7 +680,7 @@ export default {
|
|
});
|
|
});
|
|
|
|
|
|
this.weeks = weekList
|
|
this.weeks = weekList
|
|
- // console.log(this.weeks);
|
|
|
|
|
|
+ console.log(this.weeks);
|
|
// checkedWeeks.forEach((item) => {
|
|
// checkedWeeks.forEach((item) => {
|
|
// this.checkedWeeks.push(weekOptions[item]);
|
|
// this.checkedWeeks.push(weekOptions[item]);
|
|
// });
|
|
// });
|
|
@@ -792,6 +792,7 @@ export default {
|
|
res.templatePhoto = process.env.VUE_APP_BASE_IMG_URL + res.templatePhoto
|
|
res.templatePhoto = process.env.VUE_APP_BASE_IMG_URL + res.templatePhoto
|
|
});
|
|
});
|
|
this.templateList = res.data.list
|
|
this.templateList = res.data.list
|
|
|
|
+ console.log(this.templateList)
|
|
});
|
|
});
|
|
|
|
|
|
//获取策略列表
|
|
//获取策略列表
|
|
@@ -821,16 +822,16 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//新增历史记录
|
|
//新增历史记录
|
|
- addHistory (type, strategyId, text, strategyName) {
|
|
|
|
- post("/record/strategy-record/create", {
|
|
|
|
- type: type,
|
|
|
|
- notes: text,
|
|
|
|
- strategyId: strategyId,
|
|
|
|
- strategyName: strategyName
|
|
|
|
- }).then((res) => {
|
|
|
|
- console.log(res, "新增历史记录", notes);
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ // addHistory (type, strategyId, text, strategyName) {
|
|
|
|
+ // post("/record/strategy-record/create", {
|
|
|
|
+ // type: type,
|
|
|
|
+ // notes: text,
|
|
|
|
+ // strategyId: strategyId,
|
|
|
|
+ // strategyName: strategyName
|
|
|
|
+ // }).then((res) => {
|
|
|
|
+ // console.log(res, "新增历史记录", notes);
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
|
|
onSubmit: function (formName) {
|
|
onSubmit: function (formName) {
|
|
this.$confirm(
|
|
this.$confirm(
|
|
@@ -872,25 +873,49 @@ export default {
|
|
.toString();
|
|
.toString();
|
|
|
|
|
|
|
|
|
|
- // var array1 = JSON.parse(JSON.stringify(this.oldform));
|
|
|
|
- // var array2 = JSON.parse(JSON.stringify(this.form));
|
|
|
|
- // XEUtils.objectEach(array2, (item, key) => {
|
|
|
|
- // if (item != array1[key]) {
|
|
|
|
- // text += `\n${key}:${array1[key]} 改为 ${item}`;
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ var array1 = JSON.parse(JSON.stringify(this.oldform));
|
|
|
|
+ var array2 = JSON.parse(JSON.stringify(this.form));
|
|
|
|
+ console.log(array1, array2)
|
|
|
|
+ let text = "策略:" + this.form.strategyName;
|
|
|
|
+ XEUtils.objectEach(array2, (item, key) => {
|
|
|
|
+ if (item != array1[key]) {
|
|
|
|
+ if (key == "extJson") {
|
|
|
|
+ let ext = JSON.parse(item);
|
|
|
|
+ if (array1[key]) {
|
|
|
|
+ let arr = JSON.parse(array1[key]);
|
|
|
|
+ XEUtils.objectEach(ext, (i, k) => {
|
|
|
|
+ if (i != arr[k]) {
|
|
|
|
+ text += `\n${k}:${arr[k]} 改为 ${i ? i : "空"}`;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ XEUtils.objectEach(ext, (i, k) => {
|
|
|
|
+ text += `\n${k}:空 改为 ${i ? i : "空"}`;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ text += `\n${key}:${array1[key]} 改为 ${item ? item : "空"
|
|
|
|
+ }`;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ // console.log(text)
|
|
|
|
|
|
//编辑操作记录
|
|
//编辑操作记录
|
|
if (this.$route.query.ids) {
|
|
if (this.$route.query.ids) {
|
|
-
|
|
|
|
-
|
|
|
|
this.id = this.$route.ids;
|
|
this.id = this.$route.ids;
|
|
|
|
|
|
-
|
|
|
|
|
|
+ post("/record/strategy-record/create", {
|
|
|
|
+ type: array2.activityType ? array2.activityType : 0,
|
|
|
|
+ notes: text,
|
|
|
|
+ strategyId: array2.id,
|
|
|
|
+ strategyName: array2.strategyName,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(
|
|
|
|
+ type, notes, strategyId, strategyName
|
|
|
|
+ )
|
|
|
|
+ console.log(res, 编辑操作记录)
|
|
|
|
+ })
|
|
//修改
|
|
//修改
|
|
put("/strategy/strategy-info/update", this.form).then((res) => {
|
|
put("/strategy/strategy-info/update", this.form).then((res) => {
|
|
|
|
|