diff --git a/project/xiushan/apps.import.json b/project/xiushan/apps.import.json
new file mode 100644
index 00000000..c89141eb
--- /dev/null
+++ b/project/xiushan/apps.import.json
@@ -0,0 +1,3 @@
+{
+ "AppCodeGeneration": "动态表单"
+}
diff --git a/project/xiushan/apps/AppMassMessage/AppMassMessage.vue b/project/xiushan/apps/AppMassMessage/AppMassMessage.vue
index 4d041fd1..92a831fe 100644
--- a/project/xiushan/apps/AppMassMessage/AppMassMessage.vue
+++ b/project/xiushan/apps/AppMassMessage/AppMassMessage.vue
@@ -24,7 +24,7 @@ export default {
}
},
created() {
- this.dict.load("leaveMessageType","yesOrNo")
+ this.dict.load("leaveMessageType", "yesOrNo", "msgStatus")
}
}
diff --git a/project/xiushan/apps/AppMassMessage/mmDetail.vue b/project/xiushan/apps/AppMassMessage/mmDetail.vue
index 0fcef18d..f190a7ec 100644
--- a/project/xiushan/apps/AppMassMessage/mmDetail.vue
+++ b/project/xiushan/apps/AppMassMessage/mmDetail.vue
@@ -1,10 +1,10 @@
-
-
- 回复留言
- 关闭留言
+
+
+ 回复留言
+ 关闭留言
@@ -38,6 +38,13 @@
+
+
+
+
+
+
+
@@ -62,11 +69,19 @@ export default {
0: "留言",
1: "回复"
}
+ },
+ isClosed() {
+ return this.detail.status == 2
}
},
data() {
return {
detail: {},
+ dialog: false,
+ form: {},
+ rules: {
+ content: [{required: true, message: "请输入回复内容"}]
+ }
}
},
methods: {
@@ -80,6 +95,34 @@ export default {
}
})
},
+ back() {
+ this.$router.push({})
+ },
+ handleCloseMass(id) {
+ this.$confirm("是否要关闭留言?").then(() => {
+ this.instance.post("/appleavemessage/close", null, {
+ params: {id}
+ }).then(res => {
+ if (res?.code == 0) {
+ this.$message.success("关闭成功")
+ this.back()
+ }
+ })
+ }).catch(() => 0)
+ },
+ submit() {
+ this.$refs.ReplyForm.validate(v => {
+ if (v) {
+ let {id: messageId} = this.detail
+ this.instance.post("/appleavemessagereply/addOrUpdate", {...this.form, messageId, userType: 1}).then(res => {
+ if (res?.code == 0) {
+ this.$message.success("提交成功!")
+ this.back()
+ }
+ })
+ }
+ })
+ }
},
created() {
this.getDetail()
diff --git a/project/xiushan/apps/AppMassMessage/mmList.vue b/project/xiushan/apps/AppMassMessage/mmList.vue
index 1ebd949c..9507c9f2 100644
--- a/project/xiushan/apps/AppMassMessage/mmList.vue
+++ b/project/xiushan/apps/AppMassMessage/mmList.vue
@@ -5,8 +5,10 @@
-
-
+
+
- 公示
- 取消公示
+ 公示
+ 取消公示
详情
@@ -53,7 +55,7 @@ export default {
{label: "留言人", prop: "leaveName"},
{label: "留言提交时间", prop: "createTime"},
{label: "最后回复时间", prop: "lastReplyTime"},
- {label: "是否公示", prop: "isPublic",dict:"yesOrNo"},
+ {label: "是否公示", prop: "isOpen", dict: "yesOrNo", align: 'center'},
{slot: "options"}
]
}
@@ -73,11 +75,13 @@ export default {
this.$router.push({query: {id}})
},
handleEnable(row) {
- let status = (Number(row.status) + 1) % 2
- this.$confirm(`是否要${this.dict.getLabel('portalUserStatus', status)}留言?`).then(() => {
- this.instance.post("/appportaluser/addOrUpdate", {...row, status}).then(res => {
+ let openLabel = row.isOpen == 1 ? "取消公示" : "公示", isOpen = (Number(row.isOpen) + 1) % 2
+ this.$confirm(`是否要${openLabel}留言?`).then(() => {
+ this.instance.post("/appleavemessage/setIsOpen", null, {
+ params: {id: row.id, isOpen}
+ }).then(res => {
if (res?.code == 0) {
- this.$message.success(this.dict.getLabel('portalUserStatus', status) + "成功!")
+ this.$message.success(openLabel + "成功!")
this.getTableData()
}
})