update
This commit is contained in:
parent
8e85589d36
commit
7c1984398c
@ -71,7 +71,7 @@
|
|||||||
{
|
{
|
||||||
"path": "index",
|
"path": "index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "投诉建议",
|
"navigationBarTitleText": "优质文明服务监督",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -122,10 +122,17 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="textarea-wrapper">
|
<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"
|
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>
|
</textarea>
|
||||||
|
<view class="text-count">
|
||||||
|
<text class="count-text"
|
||||||
|
:class="{ 'count-warning': textCount > 180, 'count-error': textCount >= 200 }">
|
||||||
|
{{ textCount }}/200
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 图片上传区域 -->
|
<!-- 图片上传区域 -->
|
||||||
@ -153,7 +160,7 @@
|
|||||||
<view class="upload-btn" @click="choeseImg"
|
<view class="upload-btn" @click="choeseImg"
|
||||||
v-if="(imgsList.length < 9) && !detailSuggestion.SUGGESTION_ID">
|
v-if="(imgsList.length < 9) && !detailSuggestion.SUGGESTION_ID">
|
||||||
<view class="upload-icon">📷</view>
|
<view class="upload-icon">📷</view>
|
||||||
<text class="upload-text">添加图片/视频</text>
|
<text class="upload-text">添加图片</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -177,6 +184,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
noPost: true,
|
noPost: true,
|
||||||
|
textCount: 0,
|
||||||
saveMsg: {
|
saveMsg: {
|
||||||
action_type: 'Complaints',
|
action_type: 'Complaints',
|
||||||
ProvinceCode: '',
|
ProvinceCode: '',
|
||||||
@ -198,6 +206,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// msgType: [{ type: 2000, name: '投诉' }, { type: 4000, name: '咨询' }, { type: 1000, name: '建议' }],
|
// msgType: [{ type: 2000, name: '投诉' }, { type: 4000, name: '咨询' }, { type: 1000, name: '建议' }],
|
||||||
msgType: [{ type: 1000, name: '投诉' }, { type: 1050, name: '表扬' }, { type: 4000, name: "咨询建议" }],
|
msgType: [{ type: 1000, name: '投诉' }, { type: 1050, name: '表扬' }, { type: 4000, name: "咨询建议" }],
|
||||||
|
msgTypeObj: {
|
||||||
|
2000: "投诉",
|
||||||
|
1050: "表扬",
|
||||||
|
4000: "咨询建议",
|
||||||
|
},
|
||||||
typeIndex: 0,
|
typeIndex: 0,
|
||||||
serverIndex: 0,
|
serverIndex: 0,
|
||||||
tagList: [], // 可选择的建议标签
|
tagList: [], // 可选择的建议标签
|
||||||
@ -266,6 +279,9 @@ export default {
|
|||||||
// }
|
// }
|
||||||
this.saveMsg.PhoneNumber = this.user.MEMBERSHIP_MOBILEPHONE
|
this.saveMsg.PhoneNumber = this.user.MEMBERSHIP_MOBILEPHONE
|
||||||
|
|
||||||
|
// 初始化字数统计
|
||||||
|
this.textCount = this.saveMsg.Info ? this.saveMsg.Info.length : 0
|
||||||
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
this.saveMsg = {
|
this.saveMsg = {
|
||||||
@ -283,6 +299,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.noPost = true
|
this.noPost = true
|
||||||
this.imgsList = []
|
this.imgsList = []
|
||||||
|
this.textCount = 0
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 拿到投诉建议的详情
|
// 拿到投诉建议的详情
|
||||||
@ -303,6 +320,7 @@ export default {
|
|||||||
Info: this.detailSuggestion.SUGGESTION_REASON,
|
Info: this.detailSuggestion.SUGGESTION_REASON,
|
||||||
PhoneNumber: this.detailSuggestion.PHONE_NUMBER,
|
PhoneNumber: this.detailSuggestion.PHONE_NUMBER,
|
||||||
}
|
}
|
||||||
|
this.textCount = this.detailSuggestion.SUGGESTION_REASON ? this.detailSuggestion.SUGGESTION_REASON.length : 0
|
||||||
this.currentService = {
|
this.currentService = {
|
||||||
SERVERPART_ID: this.detailSuggestion.SERVERPART_ID,
|
SERVERPART_ID: this.detailSuggestion.SERVERPART_ID,
|
||||||
SERVERPART_NAME: this.detailSuggestion.SERVERPART_NAME,
|
SERVERPART_NAME: this.detailSuggestion.SERVERPART_NAME,
|
||||||
@ -310,6 +328,9 @@ export default {
|
|||||||
this.imgsList = this.detailSuggestion.IMAGE_URL.split(',')
|
this.imgsList = this.detailSuggestion.IMAGE_URL.split(',')
|
||||||
|
|
||||||
let labelList = this.detailSuggestion.ENUM_LABEL.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);
|
console.log('labelListlabelListlabelList', labelList);
|
||||||
let list = JSON.parse(JSON.stringify(this.tagList))
|
let list = JSON.parse(JSON.stringify(this.tagList))
|
||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
@ -687,6 +708,9 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
updateTextCount(event) {
|
||||||
|
this.textCount = event.detail.value.length
|
||||||
|
},
|
||||||
selectTag(tag) {
|
selectTag(tag) {
|
||||||
if (this.detailSuggestion.SUGGESTION_ID) {
|
if (this.detailSuggestion.SUGGESTION_ID) {
|
||||||
return
|
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) {
|
@media (max-width: 320px) {
|
||||||
|
|||||||
@ -76,7 +76,8 @@ export default {
|
|||||||
action_type: 'GetSuggestionList',
|
action_type: 'GetSuggestionList',
|
||||||
wechatOpenid: _this.user.WECHATAPP_OPENID,
|
wechatOpenid: _this.user.WECHATAPP_OPENID,
|
||||||
provinceCode: _this.user.PROVINCE_CODE || 530000,
|
provinceCode: _this.user.PROVINCE_CODE || 530000,
|
||||||
suggestionType: '2000,1000,4000',
|
// suggestionType: '2000,1000,4000',
|
||||||
|
suggestionType: '2000,1050,4000',
|
||||||
pageSize: _this.pageMsg.pageSize,
|
pageSize: _this.pageMsg.pageSize,
|
||||||
pageIndex: _this.pageMsg.pageIndex,
|
pageIndex: _this.pageMsg.pageIndex,
|
||||||
publicParticipation: true
|
publicParticipation: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user