diff --git a/pages.json b/pages.json
index 397bd0c3..a2eab159 100644
--- a/pages.json
+++ b/pages.json
@@ -71,7 +71,7 @@
{
"path": "index",
"style": {
- "navigationBarTitleText": "投诉建议",
+ "navigationBarTitleText": "优质文明服务监督",
"enablePullDownRefresh": true
}
},
diff --git a/pages/complaints/addComplaints.vue b/pages/complaints/addComplaints.vue
index 79e7b848..6ad411af 100644
--- a/pages/complaints/addComplaints.vue
+++ b/pages/complaints/addComplaints.vue
@@ -122,10 +122,17 @@
-
+
+
+ {{ textCount }}/200
+
+
@@ -153,7 +160,7 @@
📷
- 添加图片/视频
+ 添加图片
@@ -177,6 +184,7 @@ export default {
data() {
return {
noPost: true,
+ textCount: 0,
saveMsg: {
action_type: 'Complaints',
ProvinceCode: '',
@@ -198,6 +206,11 @@ export default {
},
// msgType: [{ type: 2000, name: '投诉' }, { type: 4000, name: '咨询' }, { type: 1000, name: '建议' }],
msgType: [{ type: 1000, name: '投诉' }, { type: 1050, name: '表扬' }, { type: 4000, name: "咨询建议" }],
+ msgTypeObj: {
+ 2000: "投诉",
+ 1050: "表扬",
+ 4000: "咨询建议",
+ },
typeIndex: 0,
serverIndex: 0,
tagList: [], // 可选择的建议标签
@@ -266,6 +279,9 @@ export default {
// }
this.saveMsg.PhoneNumber = this.user.MEMBERSHIP_MOBILEPHONE
+ // 初始化字数统计
+ this.textCount = this.saveMsg.Info ? this.saveMsg.Info.length : 0
+
},
onUnload() {
this.saveMsg = {
@@ -283,6 +299,7 @@ export default {
}
this.noPost = true
this.imgsList = []
+ this.textCount = 0
},
methods: {
// 拿到投诉建议的详情
@@ -303,6 +320,7 @@ export default {
Info: this.detailSuggestion.SUGGESTION_REASON,
PhoneNumber: this.detailSuggestion.PHONE_NUMBER,
}
+ this.textCount = this.detailSuggestion.SUGGESTION_REASON ? this.detailSuggestion.SUGGESTION_REASON.length : 0
this.currentService = {
SERVERPART_ID: this.detailSuggestion.SERVERPART_ID,
SERVERPART_NAME: this.detailSuggestion.SERVERPART_NAME,
@@ -310,6 +328,9 @@ export default {
this.imgsList = this.detailSuggestion.IMAGE_URL.split(',')
let labelList = this.detailSuggestion.ENUM_LABEL.split(',')
+
+ this.pageMsg.typeName = this.detailSuggestion.SUGGESTION_TYPE ? this.msgTypeObj[this.detailSuggestion.SUGGESTION_TYPE] : ""
+ this.typeIndex = this.detailSuggestion.SUGGESTION_TYPE === 2000 ? '0' : this.detailSuggestion.SUGGESTION_TYPE === 1050 ? '1' : this.detailSuggestion.SUGGESTION_TYPE === 4000 ? '2' : '0'
console.log('labelListlabelListlabelList', labelList);
let list = JSON.parse(JSON.stringify(this.tagList))
if (list && list.length > 0) {
@@ -687,6 +708,9 @@ export default {
}
})
},
+ updateTextCount(event) {
+ this.textCount = event.detail.value.length
+ },
selectTag(tag) {
if (this.detailSuggestion.SUGGESTION_ID) {
return
@@ -1124,6 +1148,25 @@ export default {
}
}
+/* 字数统计样式 */
+.text-count {
+ display: flex;
+ justify-content: flex-end;
+ padding: 12rpx 24rpx 0;
+
+ .count-text {
+ font-size: 22rpx;
+ color: #7f8c8d;
+
+ &.count-warning {
+ color: #f39c12;
+ }
+
+ &.count-error {
+ color: #e74c3c;
+ }
+ }
+}
/* 响应式适配 */
@media (max-width: 320px) {
diff --git a/pages/complaints/index.vue b/pages/complaints/index.vue
index 4a1bd4d9..9f625cc3 100644
--- a/pages/complaints/index.vue
+++ b/pages/complaints/index.vue
@@ -76,7 +76,8 @@ export default {
action_type: 'GetSuggestionList',
wechatOpenid: _this.user.WECHATAPP_OPENID,
provinceCode: _this.user.PROVINCE_CODE || 530000,
- suggestionType: '2000,1000,4000',
+ // suggestionType: '2000,1000,4000',
+ suggestionType: '2000,1050,4000',
pageSize: _this.pageMsg.pageSize,
pageIndex: _this.pageMsg.pageIndex,
publicParticipation: true