update
This commit is contained in:
parent
8e85589d36
commit
7c1984398c
@ -71,7 +71,7 @@
|
||||
{
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投诉建议",
|
||||
"navigationBarTitleText": "优质文明服务监督",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
|
||||
@ -122,10 +122,17 @@
|
||||
</view>
|
||||
|
||||
<view class="textarea-wrapper">
|
||||
<textarea class="form-textarea" cols="30" rows="6" cursor-spacing="200"
|
||||
<textarea class="form-textarea" cols="30" rows="6" cursor-spacing="200" maxlength="200"
|
||||
placeholder="请详细描述您的问题,我们将及时跟进解决(添加图片将有助于我们解决您的问题)" v-model="saveMsg.Info"
|
||||
:class="{ 'textarea-filled': saveMsg.Info }" :disabled="detailSuggestion.SUGGESTION_ID">
|
||||
:class="{ 'textarea-filled': saveMsg.Info }" :disabled="detailSuggestion.SUGGESTION_ID"
|
||||
@input="updateTextCount">
|
||||
</textarea>
|
||||
<view class="text-count">
|
||||
<text class="count-text"
|
||||
:class="{ 'count-warning': textCount > 180, 'count-error': textCount >= 200 }">
|
||||
{{ textCount }}/200
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 图片上传区域 -->
|
||||
@ -153,7 +160,7 @@
|
||||
<view class="upload-btn" @click="choeseImg"
|
||||
v-if="(imgsList.length < 9) && !detailSuggestion.SUGGESTION_ID">
|
||||
<view class="upload-icon">📷</view>
|
||||
<text class="upload-text">添加图片/视频</text>
|
||||
<text class="upload-text">添加图片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -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) {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user