|
@@ -70,15 +70,15 @@
|
|
|
height="298"
|
|
|
placeholder="请输入不少于10个字的描述"
|
|
|
:placeholder-style="custPlaceholderStyle"
|
|
|
- @input="handleSumPlacontentNum"
|
|
|
+ @input="handleSumMatcontentNum"
|
|
|
/>
|
|
|
- <text class="formitem-sumplacontentnum">{{ sumPlacontentNum }}/200</text>
|
|
|
+ <text class="formitem-summatcontentnum">{{ sumMatcontentNum }}/200</text>
|
|
|
</u-form-item>
|
|
|
</u-form>
|
|
|
<view class="expertsmodalform-footer">
|
|
|
<u-button
|
|
|
type="primary"
|
|
|
- @click="handleComplaintsformSubmit"
|
|
|
+ @click="handleExpertsModalformSubmit"
|
|
|
class="complaint-submitbtn"
|
|
|
>提交</u-button>
|
|
|
</view>
|
|
@@ -88,7 +88,7 @@
|
|
|
<view class="history-expertsmodal">
|
|
|
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="handleScrolltolower">
|
|
|
<view class="history-expertsmodal-listbody">
|
|
|
- <template v-if="hisComplaintsObj.list_empty">
|
|
|
+ <template v-if="hisExpertsModalObj.list_empty">
|
|
|
<view class="history-expertsmodal-nodata">
|
|
|
<text class="expertsmodal-nodata">暂无数据</text>
|
|
|
</view>
|
|
@@ -98,9 +98,9 @@
|
|
|
<u-col
|
|
|
span="12"
|
|
|
class="listbody-col"
|
|
|
- v-for="expertsModalItem in hisComplaintsObj.expertsModalList"
|
|
|
+ v-for="expertsModalItem in hisExpertsModalObj.expertsModalList"
|
|
|
:key="expertsModalItem.plaId"
|
|
|
- @click="handleComplaintsDetails(expertsModalItem)"
|
|
|
+ @click="handleExpertsModalDetails(expertsModalItem)"
|
|
|
>
|
|
|
<view class="listbody-item">
|
|
|
<view class="item-title">
|
|
@@ -125,8 +125,8 @@
|
|
|
</u-row>
|
|
|
</template>
|
|
|
<uni-load-more
|
|
|
- :status="hisComplaintsObj.loadStatus"
|
|
|
- v-if="!hisComplaintsObj.list_empty"
|
|
|
+ :status="hisExpertsModalObj.loadStatus"
|
|
|
+ v-if="!hisExpertsModalObj.list_empty"
|
|
|
></uni-load-more>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
@@ -142,7 +142,7 @@ import {
|
|
|
expertsModalAddData,
|
|
|
expertsModalListData
|
|
|
} from '@/agrcloud-api/expertsmodal';
|
|
|
-import uniLoadMore from "@/agrcloud-components/uni-load-more/uni-load-more.vue"
|
|
|
+import uniLoadMore from "@/agrcloud-components/uni-load-more/uni-load-more"
|
|
|
|
|
|
export default {
|
|
|
name: 'expertsmodal',
|
|
@@ -202,7 +202,7 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- sumPlacontentNum: 0,
|
|
|
+ sumMatcontentNum: 0,
|
|
|
custLabelStyle: {
|
|
|
|
|
|
'font-size': '30rpx',
|
|
@@ -210,7 +210,7 @@ export default {
|
|
|
'font-weight': '400',
|
|
|
},
|
|
|
custPlaceholderStyle: 'font-size: 34rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;',
|
|
|
- hisComplaintsObj: {
|
|
|
+ hisExpertsModalObj: {
|
|
|
loadStatus: 'more',
|
|
|
list_empty: false,
|
|
|
pageTotal: 0,
|
|
@@ -240,15 +240,15 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.hisComplaintsObj.pagination.pageNum = 1;
|
|
|
- this.getComplaintsListData();
|
|
|
+ this.hisExpertsModalObj.pagination.pageNum = 1;
|
|
|
+ this.getExpertsModalListData();
|
|
|
}
|
|
|
this.currentTabs = index;
|
|
|
},
|
|
|
/** 获取历史咨询列表 */
|
|
|
- getComplaintsListData() {
|
|
|
- this.hisComplaintsObj = {
|
|
|
- ...this.hisComplaintsObj,
|
|
|
+ getExpertsModalListData() {
|
|
|
+ this.hisExpertsModalObj = {
|
|
|
+ ...this.hisExpertsModalObj,
|
|
|
list_empty: false,
|
|
|
loadStatus: 'loading',
|
|
|
pageTotal: 0
|
|
@@ -256,59 +256,59 @@ export default {
|
|
|
|
|
|
// 请求获取列表数据
|
|
|
expertsModalListData({
|
|
|
- ...this.hisComplaintsObj.pagination,
|
|
|
+ ...this.hisExpertsModalObj.pagination,
|
|
|
matUser: this.expertsModalForm.matUser,
|
|
|
matPhone: this.expertsModalForm.matPhone
|
|
|
}).then(res => {
|
|
|
// 数据总条数
|
|
|
- this.hisComplaintsObj.pageTotal = res.total || 0;
|
|
|
+ this.hisExpertsModalObj.pageTotal = res.total || 0;
|
|
|
|
|
|
// 如果列表为第一页,返回列表数据清空
|
|
|
- if (this.hisComplaintsObj.pagination.pageNum == 1) {
|
|
|
- this.hisComplaintsObj.expertsModalList = [];
|
|
|
+ if (this.hisExpertsModalObj.pagination.pageNum == 1) {
|
|
|
+ this.hisExpertsModalObj.expertsModalList = [];
|
|
|
};
|
|
|
|
|
|
// 处理返回结果
|
|
|
if ((res.rows || []).length <= 0) { // 返回结果没有数据
|
|
|
- if ((this.hisComplaintsObj.expertsModalList || []).length <= 0) {
|
|
|
- this.hisComplaintsObj.loadStatus = 'noMores';
|
|
|
- this.hisComplaintsObj.list_empty = true;
|
|
|
+ if ((this.hisExpertsModalObj.expertsModalList || []).length <= 0) {
|
|
|
+ this.hisExpertsModalObj.loadStatus = 'noMores';
|
|
|
+ this.hisExpertsModalObj.list_empty = true;
|
|
|
} else {
|
|
|
- this.hisComplaintsObj.loadStatus = 'noMores';
|
|
|
+ this.hisExpertsModalObj.loadStatus = 'noMores';
|
|
|
}
|
|
|
} else { //返回结果有数据
|
|
|
//返回历史咨询列表存在
|
|
|
- this.hisComplaintsObj.list_empty = false;
|
|
|
+ this.hisExpertsModalObj.list_empty = false;
|
|
|
|
|
|
// 获取列表数据分页数量
|
|
|
- this.hisComplaintsObj.pageCount = Math.ceil((res.total || 0) / this.hisComplaintsObj.pagination.pageSize);
|
|
|
- if ((res.total || 0) % this.hisComplaintsObj.pagination.pageSize == 0) {
|
|
|
- this.hisComplaintsObj.pageCount = Math.ceil((res.total || 0) / this.hisComplaintsObj.pagination.pageSize);
|
|
|
- if (this.hisComplaintsObj.pageCount == 1) {
|
|
|
- this.hisComplaintsObj.pageCount--;
|
|
|
+ this.hisExpertsModalObj.pageCount = Math.ceil((res.total || 0) / this.hisExpertsModalObj.pagination.pageSize);
|
|
|
+ if ((res.total || 0) % this.hisExpertsModalObj.pagination.pageSize == 0) {
|
|
|
+ this.hisExpertsModalObj.pageCount = Math.ceil((res.total || 0) / this.hisExpertsModalObj.pagination.pageSize);
|
|
|
+ if (this.hisExpertsModalObj.pageCount == 1) {
|
|
|
+ this.hisExpertsModalObj.pageCount--;
|
|
|
}
|
|
|
} else {
|
|
|
- this.hisComplaintsObj.pageCount--;
|
|
|
+ this.hisExpertsModalObj.pageCount--;
|
|
|
};
|
|
|
|
|
|
// 处理页面状态
|
|
|
- if (this.hisComplaintsObj.pageCount === 0) {
|
|
|
- this.hisComplaintsObj.loadStatus = 'noMores'
|
|
|
+ if (this.hisExpertsModalObj.pageCount === 0) {
|
|
|
+ this.hisExpertsModalObj.loadStatus = 'noMores'
|
|
|
} else {
|
|
|
- this.hisComplaintsObj.loadStatus = 'more'
|
|
|
+ this.hisExpertsModalObj.loadStatus = 'more'
|
|
|
}
|
|
|
|
|
|
// 组装返回数据
|
|
|
- this.hisComplaintsObj.expertsModalList.push.apply(this.hisComplaintsObj.expertsModalList, res.rows || []);
|
|
|
+ this.hisExpertsModalObj.expertsModalList.push.apply(this.hisExpertsModalObj.expertsModalList, res.rows || []);
|
|
|
|
|
|
uni.stopPullDownRefresh();
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|
|
|
- this.hisComplaintsObj.loadStatus = 'noMores';
|
|
|
+ this.hisExpertsModalObj.loadStatus = 'noMores';
|
|
|
});
|
|
|
},
|
|
|
- handleComplaintsformSubmit() {
|
|
|
+ handleExpertsModalformSubmit() {
|
|
|
this.$refs.expertsModalFormRef && this.$refs.expertsModalFormRef.validate(valid => {
|
|
|
if (valid) {
|
|
|
expertsModalAddData(this.expertsModalForm).then(
|
|
@@ -328,22 +328,22 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleScrolltolower() {
|
|
|
- this.hisComplaintsObj.loadStatus = 'loading'
|
|
|
- if (this.hisComplaintsObj.pagination.pageNum - 1 >= this.hisComplaintsObj.pageCount) {
|
|
|
- this.hisComplaintsObj.loadStatus = 'noMores';
|
|
|
+ this.hisExpertsModalObj.loadStatus = 'loading'
|
|
|
+ if (this.hisExpertsModalObj.pagination.pageNum - 1 >= this.hisExpertsModalObj.pageCount) {
|
|
|
+ this.hisExpertsModalObj.loadStatus = 'noMores';
|
|
|
return
|
|
|
} else {
|
|
|
- this.hisComplaintsObj.pagination.pageNum++;
|
|
|
- this.getComplaintsListData();
|
|
|
+ this.hisExpertsModalObj.pagination.pageNum++;
|
|
|
+ this.getExpertsModalListData();
|
|
|
}
|
|
|
},
|
|
|
- handleSumPlacontentNum() {
|
|
|
- this.sumPlacontentNum = this.expertsModalForm.matContent.length;
|
|
|
- if (this.sumPlacontentNum == 200) {
|
|
|
+ handleSumMatcontentNum() {
|
|
|
+ this.sumMatcontentNum = this.expertsModalForm.matContent.length;
|
|
|
+ if (this.sumMatcontentNum == 200) {
|
|
|
this.$msgbox('最多只能输入240个字!', 'none');
|
|
|
}
|
|
|
},
|
|
|
- handleComplaintsDetails(param) {
|
|
|
+ handleExpertsModalDetails(param) {
|
|
|
this.$store.dispatch("SetExpertsDetails", param).then(() => {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/experts/modal/details'
|
|
@@ -382,7 +382,7 @@ export default {
|
|
|
padding-left: 24rpx;
|
|
|
background: #ffffff;
|
|
|
|
|
|
- .formitem-sumplacontentnum {
|
|
|
+ .formitem-summatcontentnum {
|
|
|
position: absolute;
|
|
|
bottom: 0;
|
|
|
right: 0;
|
|
@@ -398,10 +398,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .hiscomplaint-item {
|
|
|
- background: #ffffff;
|
|
|
- }
|
|
|
-
|
|
|
.history-expertsmodal {
|
|
|
.scroll-Y {
|
|
|
height: calc(
|
|
@@ -410,7 +406,7 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- .history-expertsmodal-listbody {
|
|
|
+ &-listbody {
|
|
|
.history-expertsmodal-nodata {
|
|
|
text-align: center;
|
|
|
margin-top: 20rpx;
|